Zeile 82 | Zeile 82 |
---|
$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";
|
| $localized_time_offset = (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
|
// All done here if($mybb->request_method == "post") {
| // All done here if($mybb->request_method == "post") {
|
Zeile 93 | Zeile 95 |
---|
// Delivering in the future else {
|
// Delivering in the future else {
|
if(strstr($mybb->input['deliverytime_time'], "pm"))
| if(stristr($mybb->input['deliverytime_time'], "pm"))
|
{ $mybb->input['deliveryhour'] += 12; }
|
{ $mybb->input['deliveryhour'] += 12; }
|
|
|
$exploded = explode(':', $mybb->input['endtime_time']); $mybb->input['deliveryhour'] = (int)$exploded[0];
|
$exploded = explode(':', $mybb->input['endtime_time']); $mybb->input['deliveryhour'] = (int)$exploded[0];
|
|
|
$exploded = explode(' ', $exploded[1]); $mybb->input['deliveryminute'] = (int)$exploded[0];
|
$exploded = explode(' ', $exploded[1]); $mybb->input['deliveryminute'] = (int)$exploded[0];
|
$delivery_date = gmmktime($mybb->input['deliveryhour'], $mybb->input['deliveryminute'], 0, $mybb->input['endtime_month'], $mybb->input['endtime_day'], $mybb->input['endtime_year']) + $mybb->user['timezone']*3600;
| $delivery_date = gmmktime($mybb->input['deliveryhour'], $mybb->input['deliveryminute'], 0, $mybb->input['endtime_month'], $mybb->input['endtime_day'], $mybb->input['endtime_year']) - $localized_time_offset;
|
if($delivery_date <= TIME_NOW) { $errors[] = $lang->error_only_in_future;
| if($delivery_date <= TIME_NOW) { $errors[] = $lang->error_only_in_future;
|
Zeile 147 | Zeile 149 |
---|
else if($mybb->input['format'] == 0 && !$mybb->input['message']) { $errors[] = $lang->error_missing_plain_text;
|
else if($mybb->input['format'] == 0 && !$mybb->input['message']) { $errors[] = $lang->error_missing_plain_text;
|
} }
| } }
|
if(!$errors) { // Sending via a PM if($mybb->input['type'] == 1)
|
if(!$errors) { // Sending via a PM if($mybb->input['type'] == 1)
|
{
| {
|
$mybb->input['format'] = 0; $mybb->input['htmlmessage'] = ''; }
| $mybb->input['format'] = 0; $mybb->input['htmlmessage'] = ''; }
|
Zeile 169 | Zeile 171 |
---|
else if($mybb->input['format'] == 1) { $mybb->input['message'] = '';
|
else if($mybb->input['format'] == 1) { $mybb->input['message'] = '';
|
}
| }
|
else if($mybb->input['format'] == 0) { $mybb->input['htmlmessage'] = '';
| else if($mybb->input['format'] == 0) { $mybb->input['htmlmessage'] = '';
|
Zeile 191 | Zeile 193 |
---|
);
$plugins->run_hooks("admin_user_mass_email_edit_commit");
|
);
$plugins->run_hooks("admin_user_mass_email_edit_commit");
|
|
|
$db->update_query("massemails", $updated_email, "mid='{$email['mid']}'");
flash_message($lang->success_mass_mail_saved, 'success');
| $db->update_query("massemails", $updated_email, "mid='{$email['mid']}'");
flash_message($lang->success_mass_mail_saved, 'success');
|
Zeile 222 | Zeile 224 |
---|
} else {
|
} else {
|
| // correct date by timezone and dst $offset =
|
$input['delivery_type'] = "future";
|
$input['delivery_type'] = "future";
|
$time = date("d-n-Y-h-i-a", $email['senddate']);
| $time = gmdate("d-n-Y", $email['senddate'] + $localized_time_offset);
|
$time = explode('-', $time);
|
$time = explode('-', $time);
|
$input['deliveryhour'] = (int)$time[3]; $input['deliveryminute'] = (int)$time[4];
| |
$input['deliverymonth'] = (int)$time[1]; $input['deliveryday'] = (int)$time[0]; $input['deliveryyear'] = (int)$time[2];
|
$input['deliverymonth'] = (int)$time[1]; $input['deliveryday'] = (int)$time[0]; $input['deliveryyear'] = (int)$time[2];
|
$input['deliverymeridiem'] = $time[5];
| $input['endtime_time'] = gmdate($mybb->settings['timeformat'], $email['senddate'] + $localized_time_offset);
|
$delivery_type_checked['future'] = " checked=\"checked\""; } }
| $delivery_type_checked['future'] = " checked=\"checked\""; } }
|
Zeile 239 | Zeile 241 |
---|
$input['delivery_type'] = "now"; $delivery_type_checked['now'] = " checked=\"checked\""; }
|
$input['delivery_type'] = "now"; $delivery_type_checked['now'] = " checked=\"checked\""; }
|
}
if($input['deliveryhour']) { $input['endtime_time'] = (int)$input['deliveryhour'].":"; } else { $input['endtime_time'] = "12:"; }
if($input['deliveryminute']) { $input['endtime_time'] .= (int)$input['deliveryminute']." "; } else { $input['endtime_time'] .= "00 "; }
if($input['deliverymeridiem']) { $input['endtime_time'] .= $input['deliverymeridiem']; } else { $input['endtime_time'] .= "am"; }
| } if(!$input['endtime_time']) { $input['endtime_time'] = gmdate($mybb->settings['timeformat'], TIME_NOW + $localized_time_offset); }
|
if(!$input['deliveryyear']) {
|
if(!$input['deliveryyear']) {
|
$enddateyear = gmdate('Y', TIME_NOW); } else { $enddateyear = (int)$input['deliveryyear'];
| $enddateyear = gmdate('Y', TIME_NOW + $localized_time_offset); } else { $enddateyear = (int)$input['deliveryyear'];
|
}
if(!$input['deliverymonth'])
|
}
if(!$input['deliverymonth'])
|
{ $input['enddatemonth'] = gmdate('n', TIME_NOW);
| { $input['enddatemonth'] = gmdate('n', TIME_NOW + $localized_time_offset);
|
} else { $input['enddatemonth'] = (int)$input['deliverymonth'];
|
} else { $input['enddatemonth'] = (int)$input['deliverymonth'];
|
}
if(!$input['deliveryday'])
| }
if(!$input['deliveryday'])
|
{
|
{
|
$input['enddateday'] = gmdate('j', TIME_NOW);
| $input['enddateday'] = gmdate('j', TIME_NOW + $localized_time_offset);
|
} else {
| } else {
|
Zeile 435 | Zeile 415 |
---|
} } else if($input['format'] == 1 && $input['type'] != 1)
|
} } else if($input['format'] == 1 && $input['type'] != 1)
|
{
| {
|
$text_display = 'display: none;'; } else if($input['format'] == 0 || $input['type'] == 1)
| $text_display = 'display: none;'; } else if($input['format'] == 0 || $input['type'] == 1)
|
Zeile 446 | Zeile 426 |
---|
echo "<div id=\"message_html\" style=\"{$html_display}\">"; $form_container = new FormContainer("{$lang->edit_mass_mail}: {$lang->define_html_message}"); $form_container->output_row("{$lang->define_html_message_desc}:", $html_personalisation, $form->generate_text_area('htmlmessage', $input['htmlmessage'], array('id' => 'htmlmessage', 'rows' => 15, 'cols '=> 70, 'style' => 'width: 95%'))."<div id=\"automatic_display\" style=\"{$automatic_display}\">".$form->generate_check_box('automatic_text', 1, $lang->auto_gen_plain_text, array('checked' => $automatic_text_check, "id" => "automatic_text"))."</div>");
|
echo "<div id=\"message_html\" style=\"{$html_display}\">"; $form_container = new FormContainer("{$lang->edit_mass_mail}: {$lang->define_html_message}"); $form_container->output_row("{$lang->define_html_message_desc}:", $html_personalisation, $form->generate_text_area('htmlmessage', $input['htmlmessage'], array('id' => 'htmlmessage', 'rows' => 15, 'cols '=> 70, 'style' => 'width: 95%'))."<div id=\"automatic_display\" style=\"{$automatic_display}\">".$form->generate_check_box('automatic_text', 1, $lang->auto_gen_plain_text, array('checked' => $automatic_text_check, "id" => "automatic_text"))."</div>");
|
$form_container->end();
| $form_container->end();
|
echo "</div>";
echo "<div id=\"message_text\" style=\"{$text_display}\">";
| echo "</div>";
echo "<div id=\"message_text\" style=\"{$text_display}\">";
|
Zeile 457 | Zeile 437 |
---|
echo " <script type=\"text/javascript\">
|
echo " <script type=\"text/javascript\">
|
function ToggleFormat() { var v = $('#format option:selected').val(); if(v == 2) {
| function ToggleFormat() { var v = $('#format option:selected').val(); if(v == 2) {
|
$('#automatic_display').show(); $('#message_html').show(); if($('#automatic_text').checked) { $('#message_text').hide();
|
$('#automatic_display').show(); $('#message_html').show(); if($('#automatic_text').checked) { $('#message_text').hide();
|
}
| }
|
else { $('#message_text').show(); }
|
else { $('#message_text').show(); }
|
}
| }
|
else if(v == 1) { $('#message_text').hide(); $('#message_html').show(); $('#automatic_display').hide();
|
else if(v == 1) { $('#message_text').hide(); $('#message_html').show(); $('#automatic_display').hide();
|
} else { $('#message_text').show(); $('#message_html').hide(); }
| } else { $('#message_text').show(); $('#message_html').hide(); }
|
} $(document).on('change', '#format', function() { ToggleFormat();
| } $(document).on('change', '#format', function() { ToggleFormat();
|
Zeile 536 | Zeile 516 |
---|
// Internet Explorer if(document.selection) {
|
// Internet Explorer if(document.selection) {
|
textarea.focus();
| textarea.trigger('focus');
|
var selection = document.selection.createRange(); selection.text = value; }
| var selection = document.selection.createRange(); selection.text = value; }
|
Zeile 557 | Zeile 537 |
---|
$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->username_contains, "", $form->generate_text_box('conditions[username]', htmlspecialchars_uni($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');
$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));
| $form_container->output_row($lang->email_addr_contains, "", $form->generate_text_box('conditions[email]', $input['conditions']['email'], array('id' => 'email')), 'email');
$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));
|
Zeile 594 | Zeile 574 |
---|
$form_container->output_row($lang->user_last_active, "", $form->generate_select_box('conditions[lastactive_dir]', $more_options, $input['conditions']['lastactive_dir'], array('id' => 'lastactive_dir'))." ".$form->generate_numeric_field('conditions[lastactive]', $input['conditions']['lastactive'], array('id' => 'lastactive', 'min' => 0))." ".$form->generate_select_box('conditions[lastactive_date]', $date_options, $input['conditions']['lastactive_date'], array('id' => 'lastactive_date'))." {$lang->ago}", 'lastactive');
$form_container->end();
|
$form_container->output_row($lang->user_last_active, "", $form->generate_select_box('conditions[lastactive_dir]', $more_options, $input['conditions']['lastactive_dir'], array('id' => 'lastactive_dir'))." ".$form->generate_numeric_field('conditions[lastactive]', $input['conditions']['lastactive'], array('id' => 'lastactive', 'min' => 0))." ".$form->generate_select_box('conditions[lastactive_date]', $date_options, $input['conditions']['lastactive_date'], array('id' => 'lastactive_date'))." {$lang->ago}", 'lastactive');
$form_container->end();
|
|
|
$buttons[] = $form->generate_submit_button($lang->save_mass_mail); $form->output_submit_wrapper($buttons);
$form->end(); $page->output_footer(); }
|
$buttons[] = $form->generate_submit_button($lang->save_mass_mail); $form->output_submit_wrapper($buttons);
$form->end(); $page->output_footer(); }
|
|
|
if($mybb->input['action'] == "send") { $page->add_breadcrumb_item($lang->send_mass_mail);
| if($mybb->input['action'] == "send") { $page->add_breadcrumb_item($lang->send_mass_mail);
|
Zeile 615 | Zeile 595 |
---|
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"); }
|
}
| }
|
$replacement_fields = array( "{username}" => $lang->username, "{email}" => $lang->email_addr,
| $replacement_fields = array( "{username}" => $lang->username, "{email}" => $lang->email_addr,
|
Zeile 626 | Zeile 606 |
---|
$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=\"insertText(\'{$value}\', \'htmlmessage\'); return false;\">{$name}</a>], "; $text_personalisation .= " [<a href=\"#\" onclick=\"insertText(\'{$value}\', \'message\'); 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>], "; }
|
Zeile 634 | Zeile 614 |
---|
$text_personalisation = substr($text_personalisation, 0, -2)."');\n// --></script>\n";
$plugins->run_hooks("admin_user_mass_email_send_start");
|
$text_personalisation = substr($text_personalisation, 0, -2)."');\n// --></script>\n";
$plugins->run_hooks("admin_user_mass_email_send_start");
|
if($mybb->input['step'] == 4) {
| $localized_time_offset = (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
if($mybb->input['step'] == 4) {
|
// All done here if($mybb->request_method == "post") {
| // All done here if($mybb->request_method == "post") {
|
Zeile 648 | Zeile 630 |
---|
// Delivering in the future else {
|
// Delivering in the future else {
|
if(strstr($mybb->input['deliverytime_time'], "pm"))
| if(stristr($mybb->input['deliverytime_time'], "pm"))
|
{ $mybb->input['deliveryhour'] += 12; }
| { $mybb->input['deliveryhour'] += 12; }
|
Zeile 659 | Zeile 641 |
---|
$exploded = explode(' ', $exploded[1]); $mybb->input['deliveryminute'] = (int)$exploded[0];
|
$exploded = explode(' ', $exploded[1]); $mybb->input['deliveryminute'] = (int)$exploded[0];
|
$delivery_date = gmmktime($mybb->input['deliveryhour'], $mybb->input['deliveryminute'], 0, $mybb->input['endtime_month'], $mybb->input['endtime_day'], $mybb->input['endtime_year']) + $mybb->user['timezone']*3600;
| $delivery_date = gmmktime($mybb->input['deliveryhour'], $mybb->input['deliveryminute'], 0, $mybb->input['endtime_month'], $mybb->input['endtime_day'], $mybb->input['endtime_year'])- $localized_time_offset;
|
if($delivery_date <= TIME_NOW) { $errors[] = $lang->error_only_in_future;
| if($delivery_date <= TIME_NOW) { $errors[] = $lang->error_only_in_future;
|
Zeile 680 | Zeile 662 |
---|
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 707 | Zeile 689 |
---|
else { $input['delivery_type'] = "future";
|
else { $input['delivery_type'] = "future";
|
$time = date("d-n-Y-h-i-a", $email['senddate']);
| $time = gmdate("d-n-Y", $email['senddate'] + $localized_time_offset);
|
$time = explode('-', $time);
|
$time = explode('-', $time);
|
$input['deliveryhour'] = (int)$time[3]; $input['deliveryminute'] = (int)$time[4];
| |
$input['deliverymonth'] = (int)$time[1]; $input['deliveryday'] = (int)$time[0]; $input['deliveryyear'] = (int)$time[2];
|
$input['deliverymonth'] = (int)$time[1]; $input['deliveryday'] = (int)$time[0]; $input['deliveryyear'] = (int)$time[2];
|
$input['deliverymeridiem'] = $time[5];
| $input['endtime_time'] = gmdate($mybb->settings['timeformat'], $email['senddate'] + $localized_time_offset);
|
$delivery_type_checked['future'] = " checked=\"checked\""; } }
| $delivery_type_checked['future'] = " checked=\"checked\""; } }
|
Zeile 751 | Zeile 731 |
---|
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&action=preview&mid={$email['mid']}', null, true);\">{$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&action=preview&mid={$email['mid']}', null, true);\">{$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>");
| // Recipient counts & details $table->construct_cell("<strong>{$lang->total_recipients}:</strong>");
|
Zeile 765 | Zeile 745 |
---|
$table->construct_row();
$table->output("{$lang->send_mass_mail}: {$lang->step_four} - {$lang->review_message}");
|
$table->construct_row();
$table->output("{$lang->send_mass_mail}: {$lang->step_four} - {$lang->review_message}");
|
if($input['deliveryhour']) { $input['endtime_time'] = (int)$input['deliveryhour'].":"; } else { $input['endtime_time'] = "12:"; }
if($input['deliveryminute']) { $input['endtime_time'] .= (int)$input['deliveryminute']." "; } else { $input['endtime_time'] .= "00 "; }
if($input['deliverymeridiem']) { $input['endtime_time'] .= $input['deliverymeridiem']; } else
| if(!$input['endtime_time'])
|
{
|
{
|
$input['endtime_time'] .= "am";
| $input['endtime_time'] = gmdate($mybb->settings['timeformat'], TIME_NOW + $localized_time_offset);
|
}
if(!$input['deliveryyear'])
|
}
if(!$input['deliveryyear'])
|
{ $enddateyear = gmdate('Y', TIME_NOW); } else {
| { $enddateyear = gmdate('Y', TIME_NOW + $localized_time_offset); } else {
|
$enddateyear = (int)$input['deliveryyear']; }
if(!$input['deliverymonth']) {
|
$enddateyear = (int)$input['deliveryyear']; }
if(!$input['deliverymonth']) {
|
$input['enddatemonth'] = gmdate('n', TIME_NOW);
| $input['enddatemonth'] = gmdate('n', TIME_NOW + $localized_time_offset);
|
} else {
| } else {
|
Zeile 813 | Zeile 771 |
---|
if(!$input['deliveryday']) {
|
if(!$input['deliveryday']) {
|
$input['enddateday'] = gmdate('j', TIME_NOW);
| $input['enddateday'] = gmdate('j', TIME_NOW + $localized_time_offset);
|
} else {
| } else {
|
Zeile 842 | Zeile 800 |
---|
if($month == "offset") { continue;
|
if($month == "offset") { continue;
|
}
| }
|
if($key == $input['enddatemonth']) { $enddatemonth .= "<option value=\"{$key}\" selected=\"selected\">{$month}</option>\n";
| if($key == $input['enddatemonth']) { $enddatemonth .= "<option value=\"{$key}\" selected=\"selected\">{$month}</option>\n";
|
Zeile 993 | Zeile 951 |
---|
$form_container = new FormContainer("{$lang->send_mass_mail}: {$lang->step_three} - {$lang->define_the_recipients}");
|
$form_container = new FormContainer("{$lang->send_mass_mail}: {$lang->step_three} - {$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->username_contains, "", $form->generate_text_box('conditions[username]', htmlspecialchars_uni($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');
$options = array();
| $form_container->output_row($lang->email_addr_contains, "", $form->generate_text_box('conditions[email]', $input['conditions']['email'], array('id' => 'email')), 'email');
$options = array();
|
Zeile 1191 | Zeile 1149 |
---|
$next = 3; } admin_redirect("index.php?module=user-mass_mail&action=send&step={$next}&mid={$mid}");
|
$next = 3; } admin_redirect("index.php?module=user-mass_mail&action=send&step={$next}&mid={$mid}");
|
} }
| } }
|
$page->output_header("{$lang->send_mass_mail}: {$lang->step_one}");
| $page->output_header("{$lang->send_mass_mail}: {$lang->step_one}");
|
Zeile 1369 | Zeile 1327 |
---|
// Internet Explorer if(document.selection) {
|
// Internet Explorer if(document.selection) {
|
textarea.focus();
| textarea.trigger('focus');
|
var selection = document.selection.createRange(); selection.text = value; }
| var selection = document.selection.createRange(); selection.text = value; }
|
Zeile 1538 | Zeile 1496 |
---|
if($mybb->input['action'] == "cancel") {
|
if($mybb->input['action'] == "cancel") {
|
| if(!verify_post_check($mybb->input['my_post_key'])) { flash_message($lang->invalid_post_verify_key2, 'error'); admin_redirect("index.php?module=user-users"); }
|
// Cancel the delivery of a mass-email. $query = $db->simple_select("massemails", "*", "mid='".$mybb->get_input('mid', MyBB::INPUT_INT)."'"); $mass_email = $db->fetch_array($query);
| // Cancel the delivery of a mass-email. $query = $db->simple_select("massemails", "*", "mid='".$mybb->get_input('mid', MyBB::INPUT_INT)."'"); $mass_email = $db->fetch_array($query);
|