Vergleich admin/modules/tools/maillogs.php - 1.8.16 - 1.8.19

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 119Zeile 119

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


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

 
	$query = $db->simple_select("maillogs l", "COUNT(l.mid) as logs", "1=1 {$additional_sql_criteria}");
$total_rows = $db->fetch_field($query, "logs");


	if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1)

	if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1)

	{

	{

		$mybb->settings['threadsperpage'] = 20;

		$mybb->settings['threadsperpage'] = 20;

	}

	}

		
$per_page = $mybb->settings['threadsperpage'];


		
$per_page = $mybb->settings['threadsperpage'];


Zeile 135Zeile 138
	{
$mybb->input['page'] = $mybb->get_input('page', MyBB::INPUT_INT);
$start = ($mybb->input['page']*$per_page)-$per_page;

	{
$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)
{
$mybb->input['page'] = 1;
$start = 0;
}

	}
else
{

	}
else
{

Zeile 192Zeile 201

$additional_sql_criteria .= " AND l.fromuid = '{$fromuid}'";
$additional_criteria[] = "fromuid={$fromuid}";


$additional_sql_criteria .= " AND l.fromuid = '{$fromuid}'";
$additional_criteria[] = "fromuid={$fromuid}";

	}

	}

	else if($mybb->input['fromname'])
{
$user = get_user_by_username($mybb->input['fromname'], array('fields' => 'uid, username'));
$from_filter = $user['username'];

	else if($mybb->input['fromname'])
{
$user = get_user_by_username($mybb->input['fromname'], array('fields' => 'uid, username'));
$from_filter = $user['username'];





		if(!$user['uid'])
{
flash_message($lang->error_invalid_user, 'error');

		if(!$user['uid'])
{
flash_message($lang->error_invalid_user, 'error');

Zeile 206Zeile 215

$additional_sql_criteria .= "AND l.fromuid = '{$user['uid']}'";
$additional_criteria[] = "fromuid={$user['uid']}";


$additional_sql_criteria .= "AND l.fromuid = '{$user['uid']}'";
$additional_criteria[] = "fromuid={$user['uid']}";

	}

	}


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


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

Zeile 219Zeile 228
	{
$query = $db->simple_select("users", "uid, username", "uid = '{$touid}'");
$user = $db->fetch_array($query);

	{
$query = $db->simple_select("users", "uid, username", "uid = '{$touid}'");
$user = $db->fetch_array($query);

		$to_filter = $user['username'];

		$to_filter = $user['username'];


$additional_sql_criteria .= " AND l.touid = '{$touid}'";
$additional_criteria[] = "touid={$touid}";


$additional_sql_criteria .= " AND l.touid = '{$touid}'";
$additional_criteria[] = "touid={$touid}";

Zeile 228Zeile 237
	{
$user = get_user_by_username($toname, array('fields' => 'username'));
$to_filter = $user['username'];

	{
$user = get_user_by_username($toname, array('fields' => 'username'));
$to_filter = $user['username'];





		if(!$user['uid'])
{
flash_message($lang->error_invalid_user, 'error');

		if(!$user['uid'])
{
flash_message($lang->error_invalid_user, 'error');

Zeile 330Zeile 339
		elseif($log['type'] == 1)
{
$table->construct_cell("<img src=\"styles/{$page->style}/images/icons/maillogs_user.png\" title=\"{$lang->email_sent_to_user}\" alt=\"\" />", array("width" => 1));

		elseif($log['type'] == 1)
{
$table->construct_cell("<img src=\"styles/{$page->style}/images/icons/maillogs_user.png\" title=\"{$lang->email_sent_to_user}\" alt=\"\" />", array("width" => 1));

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

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

if(!$log['from_username'] && $log['fromuid'] > 0)
{

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

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

if(!$log['from_username'] && $log['fromuid'] > 0)
{

				$table->construct_cell("{$find_from}<div>{$lang->deleted_user}</div>");
}
elseif($log['fromuid'] == 0)

				$table->construct_cell("{$find_from}<div>{$lang->deleted_user}</div>");
}
elseif($log['fromuid'] == 0)

Zeile 409Zeile 418
	}

$form->end();

	}

$form->end();


$query = $db->simple_select("maillogs l", "COUNT(l.mid) 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-maillogs&amp;page={page}{$additional_criteria}");



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