Vergleich admin/modules/tools/mailerrors.php - 1.6.4 - 1.6.12

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: mailerrors.php 5297 2010-12-28 22:01:14Z Tomm $

 * $Id$

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 22Zeile 22
if($mybb->input['action'] == "prune" && $mybb->request_method == "post")
{
$plugins->run_hooks("admin_tools_mailerrors_prune");

if($mybb->input['action'] == "prune" && $mybb->request_method == "post")
{
$plugins->run_hooks("admin_tools_mailerrors_prune");

	



	if($mybb->input['delete_all'])
{
$db->delete_query("mailerrors");
$num_deleted = $db->affected_rows();

	if($mybb->input['delete_all'])
{
$db->delete_query("mailerrors");
$num_deleted = $db->affected_rows();

		



		$plugins->run_hooks("admin_tools_mailerrors_prune_delete_all_commit");

		$plugins->run_hooks("admin_tools_mailerrors_prune_delete_all_commit");

		



		// Log admin action
log_admin_action($num_deleted);

		// Log admin action
log_admin_action($num_deleted);

		



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

Zeile 45Zeile 45
			$num_deleted = $db->affected_rows();
}
}

			$num_deleted = $db->affected_rows();
}
}

	



	$plugins->run_hooks("admin_tools_mailerrors_prune_commit");

	$plugins->run_hooks("admin_tools_mailerrors_prune_commit");

	



	// Log admin action
log_admin_action($num_deleted);

	// Log admin action
log_admin_action($num_deleted);

	



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

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

Zeile 58Zeile 58
if($mybb->input['action'] == "view")
{
$plugins->run_hooks("admin_tools_mailerrors_view");

if($mybb->input['action'] == "view")
{
$plugins->run_hooks("admin_tools_mailerrors_view");

	



	$query = $db->simple_select("mailerrors", "*", "eid='".intval($mybb->input['eid'])."'");
$log = $db->fetch_array($query);


	$query = $db->simple_select("mailerrors", "*", "eid='".intval($mybb->input['eid'])."'");
$log = $db->fetch_array($query);


Zeile 99Zeile 99
		$table->construct_cell($log['smtpcode']);
$table->construct_row();
}

		$table->construct_cell($log['smtpcode']);
$table->construct_row();
}

	



	if($log['smtperror'])
{
$table->construct_cell($lang->smtp_server_response);

	if($log['smtperror'])
{
$table->construct_cell($lang->smtp_server_response);

Zeile 142Zeile 142
if(!$mybb->input['action'])
{
$plugins->run_hooks("admin_tools_mailerrors_start");

if(!$mybb->input['action'])
{
$plugins->run_hooks("admin_tools_mailerrors_start");

	



	$per_page = 20;

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

	$per_page = 20;

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

Zeile 157Zeile 157
	}

$additional_criteria = array();

	}

$additional_criteria = array();





	$page->output_header($lang->system_email_log);

	$page->output_header($lang->system_email_log);

	



	$sub_tabs['mailerrors'] = array(
'title' => $lang->system_email_log,
'link' => "index.php?module=tools-mailerrors",
'description' => $lang->system_email_log_desc
);

	$sub_tabs['mailerrors'] = array(
'title' => $lang->system_email_log,
'link' => "index.php?module=tools-mailerrors",
'description' => $lang->system_email_log_desc
);

	
$page->output_nav_tabs($sub_tabs, 'mailerrors');


$page->output_nav_tabs($sub_tabs, 'mailerrors');


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

// Begin criteria filtering
if($mybb->input['subject'])
{


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

// Begin criteria filtering
if($mybb->input['subject'])
{

		$additional_sql_criteria .= " AND subject LIKE '%".$db->escape_string($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_criteria[] = "subject='".htmlspecialchars_uni($mybb->input['subject'])."'";
$form->generate_hidden_field("subject", $mybb->input['subject']);

	}


	}


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

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

		$additional_sql_criteria .= " AND fromaddress LIKE '%".$db->escape_string($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'])
{

		$additional_criteria[] = "fromaddress='".urlencode($mybb->input['fromaddress'])."'";
$form->generate_hidden_field("fromaddress", $mybb->input['fromaddress']);
}

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

		$additional_sql_criteria .= " AND toaddress LIKE '%".$db->escape_string($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'])
{

		$additional_criteria[] = "toaddress='".urlencode($mybb->input['toaddress'])."'";
$form->generate_hidden_field("toaddress", $mybb->input['toaddress']);
}

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

		$additional_sql_criteria .= " AND error LIKE '%".$db->escape_string($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_criteria[] = "error='".urlencode($mybb->input['error'])."'";
$form->generate_hidden_field("error", $mybb->input['error']);

	}


	}


	if($additional_criteria)
{
$additional_criteria = "&".implode("&", $additional_criteria);

	if($additional_criteria)
{
$additional_criteria = "&".implode("&", $additional_criteria);

Zeile 233Zeile 233
		$table->construct_cell($log['dateline'], array("class" => "align_center"));
$table->construct_row();
}

		$table->construct_cell($log['dateline'], array("class" => "align_center"));
$table->construct_row();
}

	



	if($table->num_rows() == 0)
{
$table->construct_cell($lang->no_logs, array("colspan" => 5));
$table->construct_row();

	if($table->num_rows() == 0)
{
$table->construct_cell($lang->no_logs, array("colspan" => 5));
$table->construct_row();

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

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

	}
else
{

	}
else
{

Zeile 249Zeile 249
	}

$form->end();

	}

$form->end();

	



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

echo "<br />".draw_admin_pagination($mybb->input['page'], $per_page, $total_rows, "index.php?module=tools-mailerrors&amp;page={page}{$additional_criteria}");

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

echo "<br />".draw_admin_pagination($mybb->input['page'], $per_page, $total_rows, "index.php?module=tools-mailerrors&amp;page={page}{$additional_criteria}");

	



	$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->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->end();
$buttons = array();


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