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

  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->output_row($lang->username_contains, "", $form->generate_text_box('conditions[username]', $input['conditions']['username'], array('id' => 'username')), 'username');

	$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');

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');


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 598Zeile 620
				{
$mybb->input['deliveryhour'] += 12;
}

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

				

				

				$exploded = explode(':', $mybb->input['endtime_time']);
$mybb->input['deliveryhour'] = intval($exploded[0]);


				$exploded = explode(':', $mybb->input['endtime_time']);
$mybb->input['deliveryhour'] = intval($exploded[0]);


Zeile 609Zeile 631
				if($delivery_date <= TIME_NOW)
{
$errors[] = $lang->error_only_in_future;

				if($delivery_date <= TIME_NOW)
{
$errors[] = $lang->error_only_in_future;

				}

				}

			}

if(!$errors)

			}

if(!$errors)

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

					"senddate" => $delivery_date
);
$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");
}

Zeile 643Zeile 665
			{
$input = array();
if($email['senddate'] <= TIME_NOW)

			{
$input = array();
if($email['senddate'] <= TIME_NOW)

				{

				{

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

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

Zeile 677Zeile 699
		else if($email['type'] == 0)
{
$delivery_type = $lang->email;

		else if($email['type'] == 0)
{
$delivery_type = $lang->email;

		}

		}

		$table->construct_cell($delivery_type);

		$table->construct_cell($delivery_type);

		$table->construct_row();

		$table->construct_row();

		
$table->construct_cell("<strong>{$lang->subject}:</strong>");
$table->construct_cell(htmlspecialchars_uni($email['subject']));

		
$table->construct_cell("<strong>{$lang->subject}:</strong>");
$table->construct_cell(htmlspecialchars_uni($email['subject']));

Zeile 688Zeile 710
		$table->construct_cell("<strong>{$lang->message}:</strong>");
$format_preview = '';
if($email['format'] == 0 || $email['format'] == 2)

		$table->construct_cell("<strong>{$lang->message}:</strong>");
$format_preview = '';
if($email['format'] == 0 || $email['format'] == 2)

		{

		{

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

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

		}

		}

		if($email['format'] == 2)
{
$format_preview .= " {$lang->and} <br />";

		if($email['format'] == 2)
{
$format_preview .= " {$lang->and} <br />";

		}

		}

		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);

		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_row();


		// Recipient counts & details
$table->construct_cell("<strong>{$lang->total_recipients}:</strong>");
$table->construct_cell(my_number_format($email['totalcount'])." - <a href=\"index.php?module=user/mass_mail&amp;action=send&amp;step=3&amp;mid={$email['mid']}\">{$lang->change_recipient_conds}</a>");

		// Recipient counts & details
$table->construct_cell("<strong>{$lang->total_recipients}:</strong>");
$table->construct_cell(my_number_format($email['totalcount'])." - <a href=\"index.php?module=user/mass_mail&amp;action=send&amp;step=3&amp;mid={$email['mid']}\">{$lang->change_recipient_conds}</a>");

Zeile 883Zeile 905
				$updated_email = array(
"totalcount" => $num,
"conditions" => $db->escape_string(serialize($mybb->input['conditions']))

				$updated_email = array(
"totalcount" => $num,
"conditions" => $db->escape_string(serialize($mybb->input['conditions']))

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


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


				// Take the user to the next step
admin_redirect("index.php?module=user/mass_mail&action=send&step=4&mid={$email['mid']}");
}

				// Take the user to the next step
admin_redirect("index.php?module=user/mass_mail&action=send&step=4&mid={$email['mid']}");
}

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>";