Zeile 43 | Zeile 43 |
---|
$db->delete_query("maillogs", "mid IN ({$log_ids})"); $num_deleted = $db->affected_rows(); }
|
$db->delete_query("maillogs", "mid IN ({$log_ids})"); $num_deleted = $db->affected_rows(); }
|
}
$plugins->run_hooks("admin_tools_mailerrors_prune_commit");
// Log admin action log_admin_action($num_deleted);
| // Log admin action log_admin_action($num_deleted); }
$plugins->run_hooks("admin_tools_maillogs_prune_commit");
|
flash_message($lang->selected_logs_deleted, 'success'); admin_redirect("index.php?module=tools-maillogs");
| flash_message($lang->selected_logs_deleted, 'success'); admin_redirect("index.php?module=tools-maillogs");
|
Zeile 56 | Zeile 56 |
---|
if($mybb->input['action'] == "view") {
|
if($mybb->input['action'] == "view") {
|
$query = $db->simple_select("maillogs", "*", "mid='".$mybb->get_input('mid', 1)."'");
| $query = $db->simple_select("maillogs", "*", "mid='".$mybb->get_input('mid', MyBB::INPUT_INT)."'");
|
$log = $db->fetch_array($query);
|
$log = $db->fetch_array($query);
|
|
|
if(!$log['mid']) { exit; }
$plugins->run_hooks("admin_tools_maillogs_view");
|
if(!$log['mid']) { exit; }
$plugins->run_hooks("admin_tools_maillogs_view");
|
|
|
$log['toemail'] = htmlspecialchars_uni($log['toemail']); $log['fromemail'] = htmlspecialchars_uni($log['fromemail']); $log['subject'] = htmlspecialchars_uni($log['subject']); $log['dateline'] = date($mybb->settings['dateformat'], $log['dateline']).", ".date($mybb->settings['timeformat'], $log['dateline']); if($mybb->settings['mail_logging'] == 1)
|
$log['toemail'] = htmlspecialchars_uni($log['toemail']); $log['fromemail'] = htmlspecialchars_uni($log['fromemail']); $log['subject'] = htmlspecialchars_uni($log['subject']); $log['dateline'] = date($mybb->settings['dateformat'], $log['dateline']).", ".date($mybb->settings['timeformat'], $log['dateline']); if($mybb->settings['mail_logging'] == 1)
|
{
| {
|
$log['message'] = $lang->na;
|
$log['message'] = $lang->na;
|
}
| }
|
else { $log['message'] = nl2br(htmlspecialchars_uni($log['message']));
| else { $log['message'] = nl2br(htmlspecialchars_uni($log['message']));
|
Zeile 82 | Zeile 82 |
---|
?> <div class="modal"> <div style="overflow-y: auto; max-height: 400px;">
|
?> <div class="modal"> <div style="overflow-y: auto; max-height: 400px;">
|
<?php
| <?php
|
$table = new Table();
$table->construct_cell($lang->to.":"); $table->construct_cell("<a href=\"mailto:{$log['toemail']}\">{$log['toemail']}</a>");
|
$table = new Table();
$table->construct_cell($lang->to.":"); $table->construct_cell("<a href=\"mailto:{$log['toemail']}\">{$log['toemail']}</a>");
|
$table->construct_row();
| $table->construct_row();
|
$table->construct_cell($lang->from.":"); $table->construct_cell("<a href=\"mailto:{$log['fromemail']}\">{$log['fromemail']}</a>");
|
$table->construct_cell($lang->from.":"); $table->construct_cell("<a href=\"mailto:{$log['fromemail']}\">{$log['fromemail']}</a>");
|
$table->construct_row();
| $table->construct_row();
|
$table->construct_cell($lang->ip_address.":"); $table->construct_cell(my_inet_ntop($db->unescape_binary($log['ipaddress'])));
|
$table->construct_cell($lang->ip_address.":"); $table->construct_cell(my_inet_ntop($db->unescape_binary($log['ipaddress'])));
|
$table->construct_row();
| $table->construct_row();
|
$table->construct_cell($lang->subject.":"); $table->construct_cell($log['subject']);
|
$table->construct_cell($lang->subject.":"); $table->construct_cell($log['subject']);
|
$table->construct_row();
| $table->construct_row();
|
$table->construct_cell($lang->date.":"); $table->construct_cell($log['dateline']); $table->construct_row();
| $table->construct_cell($lang->date.":"); $table->construct_cell($log['dateline']); $table->construct_row();
|
Zeile 133 | Zeile 133 |
---|
if($mybb->input['page'] && $mybb->input['page'] > 1) {
|
if($mybb->input['page'] && $mybb->input['page'] > 1) {
|
$mybb->input['page'] = $mybb->get_input('page', 1);
| $mybb->input['page'] = $mybb->get_input('page', MyBB::INPUT_INT);
|
$start = ($mybb->input['page']*$per_page)-$per_page; } else
| $start = ($mybb->input['page']*$per_page)-$per_page; } else
|
Zeile 156 | Zeile 156 |
---|
else if($mybb->input['from_type'] == "email") { $mybb->input['fromemail'] = $mybb->input['from_value'];
|
else if($mybb->input['from_type'] == "email") { $mybb->input['fromemail'] = $mybb->input['from_value'];
|
}
| }
|
if($mybb->input['to_type'] == "user") {
| if($mybb->input['to_type'] == "user") {
|
Zeile 167 | Zeile 167 |
---|
$mybb->input['toemail'] = $mybb->input['to_value']; } }
|
$mybb->input['toemail'] = $mybb->input['to_value']; } }
|
$touid = (int)$mybb->input['touid'];
| $touid = $mybb->get_input('touid', MyBB::INPUT_INT);
|
$toname = $db->escape_string($mybb->input['toname']); $toemail = $db->escape_string_like($mybb->input['toemail']);
|
$toname = $db->escape_string($mybb->input['toname']); $toemail = $db->escape_string_like($mybb->input['toemail']);
|
$fromuid = (int)$mybb->input['fromuid']; $fromname = $db->escape_string($mybb->input['fromname']);
| $fromuid = $mybb->get_input('fromuid', MyBB::INPUT_INT);
|
$fromemail = $db->escape_string_like($mybb->input['fromemail']);
$subject = $db->escape_string_like($mybb->input['subject']);
|
$fromemail = $db->escape_string_like($mybb->input['fromemail']);
$subject = $db->escape_string_like($mybb->input['subject']);
|
|
|
// Begin criteria filtering if($mybb->input['subject'])
|
// Begin criteria filtering if($mybb->input['subject'])
|
{
| {
|
$additional_sql_criteria .= " AND l.subject LIKE '%{$subject}%'"; $additional_criteria[] = "subject=".urlencode($mybb->input['subject']);
|
$additional_sql_criteria .= " AND l.subject LIKE '%{$subject}%'"; $additional_criteria[] = "subject=".urlencode($mybb->input['subject']);
|
}
| }
|
if($mybb->input['fromuid'])
|
if($mybb->input['fromuid'])
|
{
| {
|
$query = $db->simple_select("users", "uid, username", "uid = '{$fromuid}'"); $user = $db->fetch_array($query); $from_filter = $user['username'];
| $query = $db->simple_select("users", "uid, username", "uid = '{$fromuid}'"); $user = $db->fetch_array($query); $from_filter = $user['username'];
|
Zeile 196 | Zeile 195 |
---|
} else if($mybb->input['fromname']) {
|
} else if($mybb->input['fromname']) {
|
$query = $db->simple_select("users", "uid, username", "LOWER(username) = '{$fromname}'"); $user = $db->fetch_array($query);
| $user = get_user_by_username($mybb->input['fromname'], array('fields' => 'uid, username'));
|
$from_filter = $user['username'];
if(!$user['uid'])
| $from_filter = $user['username'];
if(!$user['uid'])
|
Zeile 270 | Zeile 268 |
---|
$form = new Form("index.php?module=tools-maillogs&action=prune", "post");
$table = new Table;
|
$form = new Form("index.php?module=tools-maillogs&action=prune", "post");
$table = new Table;
|
$table->construct_header($form->generate_check_box("checkall", 1, '', array('class' => 'checkall')));
| $table->construct_header($form->generate_check_box("allbox", 1, '', array('class' => 'checkall')));
|
$table->construct_header($lang->subject, array("colspan" => 2)); $table->construct_header($lang->from, array("class" => "align_center", "width" => "20%")); $table->construct_header($lang->to, array("class" => "align_center", "width" => "20%"));
| $table->construct_header($lang->subject, array("colspan" => 2)); $table->construct_header($lang->from, array("class" => "align_center", "width" => "20%")); $table->construct_header($lang->to, array("class" => "align_center", "width" => "20%"));
|
Zeile 432 | Zeile 430 |
---|
{ $from_type = "email"; }
|
{ $from_type = "email"; }
|
$form_container->output_row($lang->from, "", $form->generate_select_box('from_type', $user_email, $from_type)." ".$form->generate_text_box('from_value', $from_filter, array('id' => 'from_value')), 'from_value');
| $form_container->output_row($lang->from, "", $form->generate_select_box('from_type', $user_email, $from_type)." ".$form->generate_text_box('from_value', htmlspecialchars_uni($from_filter), array('id' => 'from_value')), 'from_value');
|
if($to_username) { $to_type = "user";
| if($to_username) { $to_type = "user";
|
Zeile 441 | Zeile 439 |
---|
{ $to_type = "email"; }
|
{ $to_type = "email"; }
|
$form_container->output_row($lang->to, "", $form->generate_select_box('to_type', $user_email, $to_type)." ".$form->generate_text_box('to_value', $to_filter, array('id' => 'to_value')), 'to_value');
| $form_container->output_row($lang->to, "", $form->generate_select_box('to_type', $user_email, $to_type)." ".$form->generate_text_box('to_value', htmlspecialchars_uni($to_filter), array('id' => 'to_value')), 'to_value');
|
$form_container->end(); $buttons = array(); $buttons[] = $form->generate_submit_button($lang->filter_user_email_log);
| $form_container->end(); $buttons = array(); $buttons[] = $form->generate_submit_button($lang->filter_user_email_log);
|
Zeile 450 | Zeile 448 |
---|
$page->output_footer(); }
|
$page->output_footer(); }
|
?>
| |