Vergleich admin/modules/tools/mailerrors.php - 1.8.25 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 22Zeile 22
{
$plugins->run_hooks("admin_tools_mailerrors_prune");


{
$plugins->run_hooks("admin_tools_mailerrors_prune");


	if($mybb->input['delete_all'])

	if(!empty($mybb->input['delete_all']))

	{
$db->delete_query("mailerrors");
$num_deleted = $db->affected_rows();

	{
$db->delete_query("mailerrors");
$num_deleted = $db->affected_rows();

Zeile 35Zeile 35
		flash_message($lang->all_logs_deleted, 'success');
admin_redirect("index.php?module=tools-mailerrors");
}

		flash_message($lang->all_logs_deleted, 'success');
admin_redirect("index.php?module=tools-mailerrors");
}

	else if(is_array($mybb->input['log']))

	else if(!empty($mybb->input['log']) && is_array($mybb->input['log']))

	{
$log_ids = implode(",", array_map("intval", $mybb->input['log']));
if($log_ids)

	{
$log_ids = implode(",", array_map("intval", $mybb->input['log']));
if($log_ids)

Zeile 59Zeile 59
	$query = $db->simple_select("mailerrors", "*", "eid='".$mybb->get_input('eid', MyBB::INPUT_INT)."'");
$log = $db->fetch_array($query);


	$query = $db->simple_select("mailerrors", "*", "eid='".$mybb->get_input('eid', MyBB::INPUT_INT)."'");
$log = $db->fetch_array($query);


	if(!$log['eid'])

	if(!$log)

	{
exit;
}

	{
exit;
}

Zeile 75Zeile 75
	$log['message'] = nl2br(htmlspecialchars_uni($log['message']));

?>

	$log['message'] = nl2br(htmlspecialchars_uni($log['message']));

?>

	



<div class="modal">
<div style="overflow-y: auto; max-height: 400px;">


<div class="modal">
<div style="overflow-y: auto; max-height: 400px;">


Zeile 108Zeile 108

$table->construct_cell($lang->from.":");
$table->construct_cell("<a href=\"mailto:{$log['fromaddress']}\">{$log['fromaddress']}</a>");


$table->construct_cell($lang->from.":");
$table->construct_cell("<a href=\"mailto:{$log['fromaddress']}\">{$log['fromaddress']}</a>");

	$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_cell($lang->date.":");
$table->construct_cell($log['dateline']);

	$table->construct_row();

	$table->construct_row();


$table->construct_cell($log['message'], array("colspan" => 2));
$table->construct_row();


$table->construct_cell($log['message'], array("colspan" => 2));
$table->construct_row();





	$table->output($lang->email);

?>
</div>

	$table->output($lang->email);

?>
</div>

</div>

</div>

	<?php

	<?php

	



	exit;
}

if(!$mybb->input['action'])
{

	exit;
}

if(!$mybb->input['action'])
{

	$query = $db->simple_select("mailerrors l", "COUNT(eid) AS logs", "1=1 {$additional_sql_criteria}");

	$query = $db->simple_select("mailerrors l", "COUNT(eid) AS logs");

	$total_rows = $db->fetch_field($query, "logs");

$per_page = 20;


	$total_rows = $db->fetch_field($query, "logs");

$per_page = 20;


	if($mybb->input['page'] && $mybb->input['page'] > 1)


	$mybb->input['page'] = $mybb->get_input('page', MyBB::INPUT_INT);
if($mybb->input['page'] > 1)

	{

	{

		$mybb->input['page'] = $mybb->get_input('page', MyBB::INPUT_INT);

 
		$start = ($mybb->input['page']*$per_page)-$per_page;
$pages = ceil($total_rows / $per_page);
if($mybb->input['page'] > $pages)

		$start = ($mybb->input['page']*$per_page)-$per_page;
$pages = ceil($total_rows / $per_page);
if($mybb->input['page'] > $pages)

Zeile 172Zeile 172
	$form = new Form("index.php?module=tools-mailerrors&amp;action=prune", "post");

// Begin criteria filtering

	$form = new Form("index.php?module=tools-mailerrors&amp;action=prune", "post");

// Begin criteria filtering

	if($mybb->input['subject'])


	$additional_sql_criteria = '';
if(!empty($mybb->input['subject']))

	{
$additional_sql_criteria .= " AND subject LIKE '%".$db->escape_string_like($mybb->input['subject'])."%'";
$additional_criteria[] = "subject=".htmlspecialchars_uni($mybb->input['subject']);
$form->generate_hidden_field("subject", $mybb->input['subject']);

	{
$additional_sql_criteria .= " AND subject LIKE '%".$db->escape_string_like($mybb->input['subject'])."%'";
$additional_criteria[] = "subject=".htmlspecialchars_uni($mybb->input['subject']);
$form->generate_hidden_field("subject", $mybb->input['subject']);

	}

if($mybb->input['fromaddress'])
{

	}

if(!empty($mybb->input['fromaddress']))
{

		$additional_sql_criteria .= " AND fromaddress LIKE '%".$db->escape_string_like($mybb->input['fromaddress'])."%'";
$additional_criteria[] = "fromaddress=".urlencode($mybb->input['fromaddress']);
$form->generate_hidden_field("fromaddress", $mybb->input['fromaddress']);

		$additional_sql_criteria .= " AND fromaddress LIKE '%".$db->escape_string_like($mybb->input['fromaddress'])."%'";
$additional_criteria[] = "fromaddress=".urlencode($mybb->input['fromaddress']);
$form->generate_hidden_field("fromaddress", $mybb->input['fromaddress']);

	}

if($mybb->input['toaddress'])

	}

if(!empty($mybb->input['toaddress']))

	{
$additional_sql_criteria .= " AND toaddress LIKE '%".$db->escape_string_like($mybb->input['toaddress'])."%'";
$additional_criteria[] = "toaddress=".urlencode($mybb->input['toaddress']);
$form->generate_hidden_field("toaddress", $mybb->input['toaddress']);
}


	{
$additional_sql_criteria .= " AND toaddress LIKE '%".$db->escape_string_like($mybb->input['toaddress'])."%'";
$additional_criteria[] = "toaddress=".urlencode($mybb->input['toaddress']);
$form->generate_hidden_field("toaddress", $mybb->input['toaddress']);
}


	if($mybb->input['error'])

	if(!empty($mybb->input['error']))

	{
$additional_sql_criteria .= " AND error LIKE '%".$db->escape_string_like($mybb->input['error'])."%'";
$additional_criteria[] = "error=".urlencode($mybb->input['error']);
$form->generate_hidden_field("error", $mybb->input['error']);

	{
$additional_sql_criteria .= " AND error LIKE '%".$db->escape_string_like($mybb->input['error'])."%'";
$additional_criteria[] = "error=".urlencode($mybb->input['error']);
$form->generate_hidden_field("error", $mybb->input['error']);

	}


	}


	if($additional_criteria)

	if($additional_criteria)

	{

	{

		$additional_criteria = "&amp;".implode("&amp;", $additional_criteria);

		$additional_criteria = "&amp;".implode("&amp;", $additional_criteria);

	}

	}

	else
{
$additional_criteria = '';

	else
{
$additional_criteria = '';

Zeile 215Zeile 216
	$table->construct_header($lang->to, array("class" => "align_center", "width" => "20%"));
$table->construct_header($lang->error_message, array("class" => "align_center", "width" => "30%"));
$table->construct_header($lang->date_sent, array("class" => "align_center", "width" => "20%"));

	$table->construct_header($lang->to, array("class" => "align_center", "width" => "20%"));
$table->construct_header($lang->error_message, array("class" => "align_center", "width" => "30%"));
$table->construct_header($lang->date_sent, array("class" => "align_center", "width" => "20%"));

	



	$query = $db->simple_select('mailerrors', '*', "1=1 $additional_sql_criteria", array('order_by' => 'dateline', 'order_dir' => 'DESC', 'limit_start' => $start, 'limit' => $per_page));

	$query = $db->simple_select('mailerrors', '*', "1=1 $additional_sql_criteria", array('order_by' => 'dateline', 'order_dir' => 'DESC', 'limit_start' => $start, 'limit' => $per_page));

	



	while($log = $db->fetch_array($query))
{
$log['subject'] = htmlspecialchars_uni($log['subject']);

	while($log = $db->fetch_array($query))
{
$log['subject'] = htmlspecialchars_uni($log['subject']);

		$log['toemail'] = htmlspecialchars_uni($log['toemail']);

		$log['toaddress'] = htmlspecialchars_uni($log['toaddress']);

		$log['error'] = htmlspecialchars_uni($log['error']);
$log['dateline'] = my_date('relative', $log['dateline']);

$table->construct_cell($form->generate_check_box("log[{$log['eid']}]", $log['eid'], ''));
$table->construct_cell("<a href=\"javascript:MyBB.popupWindow('index.php?module=tools-mailerrors&amp;action=view&amp;eid={$log['eid']}', null, true);\">{$log['subject']}</a>");

		$log['error'] = htmlspecialchars_uni($log['error']);
$log['dateline'] = my_date('relative', $log['dateline']);

$table->construct_cell($form->generate_check_box("log[{$log['eid']}]", $log['eid'], ''));
$table->construct_cell("<a href=\"javascript:MyBB.popupWindow('index.php?module=tools-mailerrors&amp;action=view&amp;eid={$log['eid']}', null, true);\">{$log['subject']}</a>");

		$find_from = "<div class=\"float_right\"><a href=\"index.php?module=tools-mailerrors&amp;toaddress={$log['toaddress']}\"><img src=\"styles/{$page->style}/images/icons/find.png\" title=\"{$lang->fine_emails_to_addr}\" alt=\"{$lang->find}\" /></a></div>";

		$find_from = "<div class=\"float_right\"><a href=\"index.php?module=tools-mailerrors&amp;toaddress={$log['toaddress']}\"><img src=\"styles/{$page->style}/images/icons/find.png\" title=\"{$lang->find_emails_to_addr}\" alt=\"{$lang->find}\" /></a></div>";

		$table->construct_cell("{$find_from}<div>{$log['toaddress']}</div>");
$table->construct_cell($log['error']);
$table->construct_cell($log['dateline'], array("class" => "align_center"));

		$table->construct_cell("{$find_from}<div>{$log['toaddress']}</div>");
$table->construct_cell($log['error']);
$table->construct_cell($log['dateline'], array("class" => "align_center"));

Zeile 254Zeile 255

$form = new Form("index.php?module=tools-mailerrors", "post");
$form_container = new FormContainer($lang->filter_system_email_log);


$form = new Form("index.php?module=tools-mailerrors", "post");
$form_container = new FormContainer($lang->filter_system_email_log);

	$form_container->output_row($lang->subject_contains, "", $form->generate_text_box('subject', $mybb->input['subject'], array('id' => 'subject')), 'subject');
$form_container->output_row($lang->error_message_contains, "", $form->generate_text_box('error', $mybb->input['error'], array('id' => 'error')), 'error');
$form_container->output_row($lang->to_address_contains, "", $form->generate_text_box('toaddress', $mybb->input['toaddress'], array('id' => 'toaddress')), 'toaddress');
$form_container->output_row($lang->from_address_contains, "", $form->generate_text_box('fromaddress', $mybb->input['fromaddress'], array('id' => 'fromaddress')), 'fromaddress');

	$form_container->output_row($lang->subject_contains, "", $form->generate_text_box('subject', $mybb->get_input('subject'), array('id' => 'subject')), 'subject');
$form_container->output_row($lang->error_message_contains, "", $form->generate_text_box('error', $mybb->get_input('error'), array('id' => 'error')), 'error');
$form_container->output_row($lang->to_address_contains, "", $form->generate_text_box('toaddress', $mybb->get_input('toaddress'), array('id' => 'toaddress')), 'toaddress');
$form_container->output_row($lang->from_address_contains, "", $form->generate_text_box('fromaddress', $mybb->get_input('fromaddress'), array('id' => 'fromaddress')), 'fromaddress');


$form_container->end();
$buttons = array();


$form_container->end();
$buttons = array();