Vergleich admin/modules/user/mass_mail.php - 1.4.0 - 1.4.11

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 73Zeile 73
	$html_personalisation = $text_personalisation = "<script type=\"text/javascript\">\n<!--\ndocument.write('{$lang->personalize_message} ";
foreach($replacement_fields as $value => $name)
{

	$html_personalisation = $text_personalisation = "<script type=\"text/javascript\">\n<!--\ndocument.write('{$lang->personalize_message} ";
foreach($replacement_fields as $value => $name)
{

		$html_personalisation .= " [<a href=\"#\" onclick=\"$(\'htmlmessage\').value += \'{$value}\'; return false;\">{$name}</a>], ";
$text_personalisation .= " [<a href=\"#\" onclick=\"$(\'message\').value += \'{$value}\'; return false;\">{$name}</a>], ";

		$html_personalisation .= " [<a href=\"#\" onclick=\"insertText(\'{$value}\', \$(\'htmlmessage\')); return false;\">{$name}</a>], ";
$text_personalisation .= " [<a href=\"#\" onclick=\"insertText(\'{$value}\', \$(\'message\')); return false;\">{$name}</a>], ";

	}
$html_personalisation = substr($html_personalisation, 0, -2)."');\n</script>\n";
$text_personalisation = substr($text_personalisation, 0, -2)."');\n</script>\n";

	}
$html_personalisation = substr($html_personalisation, 0, -2)."');\n</script>\n";
$text_personalisation = substr($text_personalisation, 0, -2)."');\n</script>\n";

Zeile 515Zeile 515
	}

Event.observe($('automatic_text'), 'click', ToggleAutomatic);

	}

Event.observe($('automatic_text'), 'click', ToggleAutomatic);

 
	
function insertText(value, textarea)
{
// Internet Explorer
if(document.selection)
{
textarea.focus();
var selection = document.selection.createRange();
selection.text = value;
}
// Firefox
else if(textarea.selectionStart || textarea.selectionStart == '0')
{
var start = textarea.selectionStart;
var end = textarea.selectionEnd;
textarea.value = textarea.value.substring(0, start) + value + textarea.value.substring(end, textarea.value.length);
}
else
{
textarea.value += value;
}
}

	
</script>";


	
</script>";


	$form_container = new FormContainer("{$lang->edit_mass_mail}: {$lang->define_the_recipients}");


	$form_container = new FormContainer("{$lang->edit_mass_mail}: {$lang->define_the_recipients}");


	$form_container->output_row($lang->username_contains, "", $form->generate_text_box('conditions[username]', $input['conditions']['username'], array('id' => 'username')), 'username');
$form_container->output_row($lang->email_addr_contains, "", $form->generate_text_box('conditions[email]', $input['conditions']['email'], array('id' => 'email')), 'email');


	$form_container->output_row($lang->username_contains, "", $form->generate_text_box('conditions[username]', $input['conditions']['username'], array('id' => 'username')), 'username');
$form_container->output_row($lang->email_addr_contains, "", $form->generate_text_box('conditions[email]', $input['conditions']['email'], array('id' => 'email')), 'email');


Zeile 527Zeile 549
	while($usergroup = $db->fetch_array($query))
{
$options[$usergroup['gid']] = $usergroup['title'];

	while($usergroup = $db->fetch_array($query))
{
$options[$usergroup['gid']] = $usergroup['title'];

	}

$form_container->output_row($lang->members_of, $lang->additional_user_groups_desc, $form->generate_select_box('conditions[usergroup][]', $options, $input['conditions']['usergroup'], array('id' => 'usergroups', 'multiple' => true, 'size' => 5)), 'usergroups');

	}

$form_container->output_row($lang->members_of, $lang->additional_user_groups_desc, $form->generate_select_box('conditions[usergroup][]', $options, $input['conditions']['usergroup'], array('id' => 'usergroups', 'multiple' => true, 'size' => 5)), 'usergroups');


$greater_options = array(
"greater_than" => $lang->greater_than,


$greater_options = array(
"greater_than" => $lang->greater_than,

Zeile 537Zeile 559
		"less_than" => $lang->less_than
);
$form_container->output_row($lang->post_count_is, "", $form->generate_select_box('conditions[postnum_dir]', $greater_options, $input['conditions']['postnum_dir'], array('id' => 'numposts_dir'))." ".$form->generate_text_box('conditions[postnum]', $input['conditions']['numposts'], array('id' => 'numposts')), 'numposts');

		"less_than" => $lang->less_than
);
$form_container->output_row($lang->post_count_is, "", $form->generate_select_box('conditions[postnum_dir]', $greater_options, $input['conditions']['postnum_dir'], array('id' => 'numposts_dir'))." ".$form->generate_text_box('conditions[postnum]', $input['conditions']['numposts'], array('id' => 'numposts')), 'numposts');





	// Need to do reg date & last visit periods. FIGURE OUT HOW TO HANDLE/DISPLAY (Do the same as StoreSuite)

$form_container->end();

	// Need to do reg date & last visit periods. FIGURE OUT HOW TO HANDLE/DISPLAY (Do the same as StoreSuite)

$form_container->end();





	$buttons[] = $form->generate_submit_button($lang->save_mass_mail);
$form->output_submit_wrapper($buttons);


	$buttons[] = $form->generate_submit_button($lang->save_mass_mail);
$form->output_submit_wrapper($buttons);


Zeile 575Zeile 597
	$html_personalisation = $text_personalisation = "<script type=\"text/javascript\">\n<!--\ndocument.write('{$lang->personalize_message}: ";
foreach($replacement_fields as $value => $name)
{

	$html_personalisation = $text_personalisation = "<script type=\"text/javascript\">\n<!--\ndocument.write('{$lang->personalize_message}: ";
foreach($replacement_fields as $value => $name)
{

		$html_personalisation .= " [<a href=\"#\" onclick=\"$(\'htmlmessage\').value += \'{$value}\'; return false;\">{$name}</a>], ";
$text_personalisation .= " [<a href=\"#\" onclick=\"$(\'message\').value += \'{$value}\'; return false;\">{$name}</a>], ";

		$html_personalisation .= " [<a href=\"#\" onclick=\"insertText(\'{$value}\', \$(\'htmlmessage\')); return false;\">{$name}</a>], ";
$text_personalisation .= " [<a href=\"#\" onclick=\"insertText(\'{$value}\', \$(\'message\')); return false;\">{$name}</a>], ";

	}
$html_personalisation = substr($html_personalisation, 0, -2)."');\n</script>\n";
$text_personalisation = substr($text_personalisation, 0, -2)."');\n</script>\n";

	}
$html_personalisation = substr($html_personalisation, 0, -2)."');\n</script>\n";
$text_personalisation = substr($text_personalisation, 0, -2)."');\n</script>\n";

Zeile 595Zeile 617
			else
{
if(strstr($mybb->input['deliverytime_time'], "pm"))

			else
{
if(strstr($mybb->input['deliverytime_time'], "pm"))

				{

				{

					$mybb->input['deliveryhour'] += 12;
}


					$mybb->input['deliveryhour'] += 12;
}


Zeile 618Zeile 640
				$updated_email = array(
"status" => 1,
"senddate" => $delivery_date

				$updated_email = array(
"status" => 1,
"senddate" => $delivery_date

				);
$db->update_query("massemails", $updated_email, "mid='{$email['mid']}'");


				);
$db->update_query("massemails", $updated_email, "mid='{$email['mid']}'");


				flash_message($lang->success_mass_mail_saved, 'success');
admin_redirect("index.php?module=user/mass_mail");
}
}

				flash_message($lang->success_mass_mail_saved, 'success');
admin_redirect("index.php?module=user/mass_mail");
}
}





		// Show summary of the mass email we've just been creating and allow the user to specify the delivery date
$page->output_header("{$lang->send_mass_mail}: {$lang->step_four}");


		// Show summary of the mass email we've just been creating and allow the user to specify the delivery date
$page->output_header("{$lang->send_mass_mail}: {$lang->step_four}");


Zeile 633Zeile 655
		
// If we have any error messages, show them
if($errors)

		
// If we have any error messages, show them
if($errors)

		{

		{

			$page->output_inline_error($errors);
$input = $mybb->input;
}

			$page->output_inline_error($errors);
$input = $mybb->input;
}

Zeile 646Zeile 668
				{
$input['delivery_type'] = "now";
$delivery_type_checked['now'] = " checked=\"checked\"";

				{
$input['delivery_type'] = "now";
$delivery_type_checked['now'] = " checked=\"checked\"";

				}

				}

				else
{
$input['delivery_type'] = "future";

				else
{
$input['delivery_type'] = "future";

Zeile 698Zeile 720
		if($email['format'] == 1 || $email['format'] == 2)
{
$format_preview.= "{$lang->html_based} - <a href=\"#\" onclick=\"javascript:MyBB.popupWindow('index.php?module=user/mass_mail&amp;action=preview&amp;mid={$email['mid']}', 'preview', 450, 450);\">{$lang->preview}</a>";

		if($email['format'] == 1 || $email['format'] == 2)
{
$format_preview.= "{$lang->html_based} - <a href=\"#\" onclick=\"javascript:MyBB.popupWindow('index.php?module=user/mass_mail&amp;action=preview&amp;mid={$email['mid']}', 'preview', 450, 450);\">{$lang->preview}</a>";

		}

		}

		$table->construct_cell($format_preview);
$table->construct_row();


		$table->construct_cell($format_preview);
$table->construct_row();


Zeile 721Zeile 743
		if($input['deliveryminute'])
{
$input['endtime_time'] .= intval($input['deliveryminute'])." ";

		if($input['deliveryminute'])
{
$input['endtime_time'] .= intval($input['deliveryminute'])." ";

		}
else
{

		}
else
{

			$input['endtime_time'] .= "00 ";
}


			$input['endtime_time'] .= "00 ";
}


Zeile 748Zeile 770
		if(!$input['deliverymonth'])
{
$input['enddatemonth'] = gmdate('n', TIME_NOW);

		if(!$input['deliverymonth'])
{
$input['enddatemonth'] = gmdate('n', TIME_NOW);

		}
else

		}
else

		{
$input['enddatemonth'] = intval($input['deliverymonth']);
}

		{
$input['enddatemonth'] = intval($input['deliverymonth']);
}

Zeile 761Zeile 783
		else
{
$input['enddateday'] = intval($input['deliveryday']);

		else
{
$input['enddateday'] = intval($input['deliveryday']);

		}


		}


		$monthnames = array(
"offset",
$lang->january,

		$monthnames = array(
"offset",
$lang->january,

Zeile 788Zeile 810
			}

if($key == $input['enddatemonth'])

			}

if($key == $input['enddatemonth'])

			{

			{

				$enddatemonth .= "<option value=\"{$key}\" selected=\"selected\">{$month}</option>\n";
}
else

				$enddatemonth .= "<option value=\"{$key}\" selected=\"selected\">{$month}</option>\n";
}
else

Zeile 814Zeile 836
		
$form = new Form("index.php?module=user/mass_mail&amp;action=send&amp;step=4&amp;mid={$email['mid']}", "post");
$form_container = new FormContainer("{$lang->send_mass_mail}: {$lang->step_four} - {$lang->define_delivery_date}");

		
$form = new Form("index.php?module=user/mass_mail&amp;action=send&amp;step=4&amp;mid={$email['mid']}", "post");
$form_container = new FormContainer("{$lang->send_mass_mail}: {$lang->step_four} - {$lang->define_delivery_date}");





			$actions = "<script type=\"text/javascript\">
function checkAction(id)
{

			$actions = "<script type=\"text/javascript\">
function checkAction(id)
{

Zeile 826Zeile 848
		            {
checked = e.value;
}

		            {
checked = e.value;
}

		        });

		        });

		        $$('.'+id+'s').each(function(e)
{
Element.hide(e);

		        $$('.'+id+'s').each(function(e)
{
Element.hide(e);

Zeile 1134Zeile 1156
			$type_pm_checked = false;
}
else if($mybb->input['type'] == 1)

			$type_pm_checked = false;
}
else if($mybb->input['type'] == 1)

		{

		{

			$type_email_checked = false;
$type_pm_checked = true;
}

			$type_email_checked = false;
$type_pm_checked = true;
}

Zeile 1254Zeile 1276
		}

Event.observe($('automatic_text'), 'click', ToggleAutomatic);

		}

Event.observe($('automatic_text'), 'click', ToggleAutomatic);

 
		
function insertText(value, textarea)
{
// Internet Explorer
if(document.selection)
{
textarea.focus();
var selection = document.selection.createRange();
selection.text = value;
}
// Firefox
else if(textarea.selectionStart || textarea.selectionStart == '0')
{
var start = textarea.selectionStart;
var end = textarea.selectionEnd;
textarea.value = textarea.value.substring(0, start) + value + textarea.value.substring(end, textarea.value.length);
}
else
{
textarea.value += value;
}
}

		
</script>";


		
</script>";


Zeile 1289Zeile 1333
		$plugins->run_hooks("admin_user_mass_email_delete_commit");

// Log admin action

		$plugins->run_hooks("admin_user_mass_email_delete_commit");

// Log admin action

		log_admin_action($mass_email['mid'], $mass_email['subject']);

flash_message($lang->success_mass_mail_deleted, 'success');
admin_redirect("index.php?module=user/mass_mail");
}
else
{
$page->output_confirm_action("index.php?module=user/mass_mail&amp;action=delete&amp;mid={$mass_email['mid']}", $lang->mass_mail_deletion_confirmation);
}
}

















		log_admin_action($mass_email['mid'], $mass_email['subject']);

if($mybb->input['archive'] == 1)
{
flash_message($lang->success_mass_mail_deleted, 'success');
admin_redirect("index.php?module=user/mass_mail&action=archive");
}
else
{
flash_message($lang->success_mass_mail_deleted, 'success');
admin_redirect("index.php?module=user/mass_mail");
}
}
else
{
if($mybb->input['archive'] == 1)
{
$page->output_confirm_action("index.php?module=user/mass_mail&amp;action=delete&amp;mid={$mass_email['mid']}&amp;archive=1", $lang->mass_mail_deletion_confirmation);
}
else
{
$page->output_confirm_action("index.php?module=user/mass_mail&amp;action=delete&amp;mid={$mass_email['mid']}", $lang->mass_mail_deletion_confirmation);
}
}
}


if($mybb->input['action'] == "preview")
{
$query = $db->simple_select("massemails", "*", "mid='".intval($mybb->input['mid'])."'");

if($mybb->input['action'] == "preview")
{
$query = $db->simple_select("massemails", "*", "mid='".intval($mybb->input['mid'])."'");

Zeile 1309Zeile 1368
	{
flash_message($lang->error_invalid_mid, 'error');
admin_redirect("index.php?module=user/mass_mail");

	{
flash_message($lang->error_invalid_mid, 'error');
admin_redirect("index.php?module=user/mass_mail");

	}


	}


	?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/1">

	?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/1">

Zeile 1325Zeile 1384
		<div id="content">	
<?php


		<div id="content">	
<?php


	if($mybb->input['format'] == 'text' || !$mass_email['message'])

	if($mybb->input['format'] == 'text' || !$mass_email['htmlmessage'])

	{
// Show preview of the text version
echo nl2br($mass_email['message']);

	{
// Show preview of the text version
echo nl2br($mass_email['message']);

		exit;

 
	}
else
{
// Preview the HTML version
echo $mass_email['htmlmessage'];

	}
else
{
// Preview the HTML version
echo $mass_email['htmlmessage'];

		exit;

 
	}

?>

	}

?>

Zeile 1344Zeile 1401
	</body>
</html>
<?php

	</body>
</html>
<?php

 
	exit;

}

}

 


if($mybb->input['action'] == "resend")
{
// Copy and resend an email

if($mybb->input['action'] == "resend")
{
// Copy and resend an email

Zeile 1368Zeile 1427
		"subject" => $db->escape_string($mass_email['subject']),
"message" => $db->escape_string($mass_email['message']),
"htmlmessage" => $db->escape_string($mass_email['htmlmessage']),

		"subject" => $db->escape_string($mass_email['subject']),
"message" => $db->escape_string($mass_email['message']),
"htmlmessage" => $db->escape_string($mass_email['htmlmessage']),

 
		"type" => $db->escape_string($mass_email['type']),

		"format" => $db->escape_string($mass_email['format']),
"dateline" => TIME_NOW,
"senddate" => '0',

		"format" => $db->escape_string($mass_email['format']),
"dateline" => TIME_NOW,
"senddate" => '0',

Zeile 1445Zeile 1505
		$table->construct_cell(my_number_format($email['totalcount']), array("class" => "align_center"));

$table->construct_cell("<a href=\"index.php?module=user/mass_mail&amp;action=resend&amp;mid={$email['mid']}\">{$lang->resend}</a>", array("width" => 100, "class" => "align_center"));

		$table->construct_cell(my_number_format($email['totalcount']), array("class" => "align_center"));

$table->construct_cell("<a href=\"index.php?module=user/mass_mail&amp;action=resend&amp;mid={$email['mid']}\">{$lang->resend}</a>", array("width" => 100, "class" => "align_center"));

		$table->construct_cell("<a href=\"index.php?module=user/mass_mail&amp;action=delete&amp;mid={$email['mid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->mass_mail_deletion_confirmation}')\">{$lang->delete}</a>", array("width" => 100, "class" => "align_center"));

		$table->construct_cell("<a href=\"index.php?module=user/mass_mail&amp;action=delete&amp;mid={$email['mid']}&amp;my_post_key={$mybb->post_code}&amp;archive=1\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->mass_mail_deletion_confirmation}')\">{$lang->delete}</a>", array("width" => 100, "class" => "align_center"));


$table->construct_row();
}


$table->construct_row();
}