Vergleich admin/modules/tools/maillogs.php - 1.8.2 - 1.8.24

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 43Zeile 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 56Zeile 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);

if(!$log['mid'])
{
exit;

	$log = $db->fetch_array($query);

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']);

	$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']);

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

	if($mybb->settings['mail_logging'] == 1)
{
$log['message'] = $lang->na;

	if($mybb->settings['mail_logging'] == 1)
{
$log['message'] = $lang->na;

Zeile 92Zeile 92

$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'])));

Zeile 108Zeile 108

$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->user_email_log_viewer);

?>
</div>

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

?>
</div>

</div>

</div>

	<?php
}

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

	<?php
}

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)
{
$mybb->settings['threadsperpage'] = 20;

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

Zeile 133Zeile 136

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;

		$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 168Zeile 177
		}
}


		}
}


	$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']);

Zeile 186Zeile 194
	}

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 196Zeile 204
	}
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 208Zeile 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'])
{
$additional_sql_criteria .= " AND l.fromemail LIKE '%{$fromemail}%'";
$additional_criteria[] = "fromemail=".urlencode($mybb->input['fromemail']);
$from_filter = $mybb->input['fromemail'];

	if($mybb->input['fromemail'])
{
$additional_sql_criteria .= " AND l.fromemail LIKE '%{$fromemail}%'";
$additional_criteria[] = "fromemail=".urlencode($mybb->input['fromemail']);
$from_filter = $mybb->input['fromemail'];

	}

	}


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


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

Zeile 232Zeile 239
		$to_filter = $user['username'];

if(!$user['uid'])

		$to_filter = $user['username'];

if(!$user['uid'])

		{

		{

			flash_message($lang->error_invalid_user, 'error');
admin_redirect("index.php?module=tools-maillogs");
}

			flash_message($lang->error_invalid_user, 'error');
admin_redirect("index.php?module=tools-maillogs");
}

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

$table = new Table;

	$form = new Form("index.php?module=tools-maillogs&amp;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 291Zeile 298
	{
$table->construct_cell($form->generate_check_box("log[{$log['mid']}]", $log['mid'], ''), array("width" => 1));
$log['subject'] = htmlspecialchars_uni($log['subject']);

	{
$table->construct_cell($form->generate_check_box("log[{$log['mid']}]", $log['mid'], ''), array("width" => 1));
$log['subject'] = htmlspecialchars_uni($log['subject']);

		$log['dateline'] = date($mybb->settings['dateformat'], $log['dateline']).", ".date($mybb->settings['timeformat'], $log['dateline']);

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


if($log['type'] == 2)
{


if($log['type'] == 2)
{

Zeile 307Zeile 314
			$table->construct_cell("<img src=\"styles/{$page->style}/images/icons/maillogs_thread.png\" title=\"{$lang->sent_using_send_thread_feature}\" 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><br /><small>{$lang->thread} {$thread_link}</small>");


			$table->construct_cell("<img src=\"styles/{$page->style}/images/icons/maillogs_thread.png\" title=\"{$lang->sent_using_send_thread_feature}\" 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><br /><small>{$lang->thread} {$thread_link}</small>");


			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)
{
$log['fromemail'] = htmlspecialchars_uni($log['fromemail']);
$table->construct_cell("{$find_from}<div>{$log['fromemail']}</div>");
}
else
{
$table->construct_cell("{$find_from}<div><a href=\"../".get_profile_link($log['fromuid'])."\">{$log['from_username']}</a></div>");
}


			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)
{
$log['fromemail'] = htmlspecialchars_uni($log['fromemail']);
$table->construct_cell("{$find_from}<div>{$log['fromemail']}</div>");
}
else
{
$table->construct_cell("{$find_from}<div><a href=\"../".get_profile_link($log['fromuid'])."\">{$log['from_username']}</a></div>");
}


			$log['toemail'] = htmlspecialchars_uni($log['toemail']);
$table->construct_cell($log['toemail']);
}

			$log['toemail'] = htmlspecialchars_uni($log['toemail']);
$table->construct_cell($log['toemail']);
}

Zeile 342Zeile 349
			if(!$log['from_username'] && $log['fromuid'] > 0)
{
$table->construct_cell("{$find_from}<div>{$lang->deleted_user}</div>");

			if(!$log['from_username'] && $log['fromuid'] > 0)
{
$table->construct_cell("{$find_from}<div>{$lang->deleted_user}</div>");

			}

			}

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

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

			}

			}

			else
{
$table->construct_cell("{$find_from}<div><a href=\"../".get_profile_link($log['fromuid'])."\">{$log['from_username']}</a></div>");

			else
{
$table->construct_cell("{$find_from}<div><a href=\"../".get_profile_link($log['fromuid'])."\">{$log['from_username']}</a></div>");

Zeile 369Zeile 376
			$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)

			$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)

				$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 393Zeile 400

$table->construct_cell($log['dateline'], array("class" => "align_center"));
$table->construct_cell(my_inet_ntop($db->unescape_binary($log['ipaddress'])), array("class" => "align_center"));


$table->construct_cell($log['dateline'], array("class" => "align_center"));
$table->construct_cell(my_inet_ntop($db->unescape_binary($log['ipaddress'])), array("class" => "align_center"));

		$table->construct_row();
}


		$table->construct_row();
}


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

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

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

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

	}
else
{

	}
else
{

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


Zeile 432Zeile 436
	{
$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 441Zeile 445
	{
$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 450Zeile 454

$page->output_footer();
}


$page->output_footer();
}

?>