Vergleich admin/modules/tools/maillogs.php - 1.6.3 - 1.6.9

  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: maillogs.php 5380 2011-02-21 12:04:43Z Tomm $

 * $Id$

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 132Zeile 132
{
$plugins->run_hooks("admin_tools_maillogs_start");


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


	$per_page = 20;

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





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






	if(!$per_page)
{
$per_page = 20;
}

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

	{
$mybb->input['page'] = intval($mybb->input['page']);
$start = ($mybb->input['page']*$per_page)-$per_page;

	{
$mybb->input['page'] = intval($mybb->input['page']);
$start = ($mybb->input['page']*$per_page)-$per_page;

Zeile 143Zeile 148
	{
$mybb->input['page'] = 1;
$start = 0;

	{
$mybb->input['page'] = 1;
$start = 0;

	}


	}


	$additional_criteria = array();

// Filter form was submitted - play around with the values

	$additional_criteria = array();

// Filter form was submitted - play around with the values

Zeile 155Zeile 160
			$mybb->input['fromname'] = $mybb->input['from_value'];
}
else if($mybb->input['from_type'] == "email")

			$mybb->input['fromname'] = $mybb->input['from_value'];
}
else if($mybb->input['from_type'] == "email")

		{

		{

			$mybb->input['fromemail'] = $mybb->input['from_value'];

			$mybb->input['fromemail'] = $mybb->input['from_value'];

		}

		}


if($mybb->input['to_type'] == "user")


if($mybb->input['to_type'] == "user")

		{

		{

			$mybb->input['toname'] = $mybb->input['to_value'];
}
else if($mybb->input['to_type'] == "email")
{
$mybb->input['toemail'] = $mybb->input['to_value'];

			$mybb->input['toname'] = $mybb->input['to_value'];
}
else if($mybb->input['to_type'] == "email")
{
$mybb->input['toemail'] = $mybb->input['to_value'];

		}
}












		}
}

$touid = intval($mybb->input['touid']);
$toname = $db->escape_string($mybb->input['toname']);
$toemail = $db->escape_string($mybb->input['toemail']);

$fromuid = intval($mybb->input['fromuid']);
$fromname = $db->escape_string($mybb->input['fromname']);
$fromemail = $db->escape_string($mybb->input['fromemail']);

$subject = $db->escape_string($mybb->input['subject']);


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

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

		$additional_sql_criteria .= " AND l.subject LIKE '%".$db->escape_string($mybb->input['subject'])."%'";
$additional_criteria[] = "subject='".htmlspecialchars_uni($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='".intval($mybb->input['fromuid'])."'");
$user = $db->fetch_array($query);
$from_filter = $user['username'];
$additional_sql_criteria .= " AND l.fromuid='".intval($mybb->input['fromuid'])."'";
$additional_criteria[] = "fromuid='".intval($mybb->input['fromuid'])."'";


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

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

	}
else if($mybb->input['fromname'])
{

	}
else if($mybb->input['fromname'])
{

		$query = $db->simple_select("users", "uid, username", "LOWER(username)='".my_strtolower($mybb->input['fromname'])."'");

		$query = $db->simple_select("users", "uid, username", "LOWER(username) = '{$fromname}'");

		$user = $db->fetch_array($query);
$from_filter = $user['username'];

		$user = $db->fetch_array($query);
$from_filter = $user['username'];


if(!$user['uid'])
{
flash_message($lang->error_invalid_user, 'error');
admin_redirect("index.php?module=tools-maillogs");
}
$additional_sql_criteria .= "AND l.fromuid='{$user['uid']}'";
$additional_criteria = "fromuid={$user['uid']}";
}




if(!$user['uid'])
{
flash_message($lang->error_invalid_user, 'error');
admin_redirect("index.php?module=tools-maillogs");
}

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


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

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

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

		$additional_criteria[] = "fromemail=".urlencode($mybb->input['fromemail']);
$from_filter = $mybb->input['fromemail'];
}

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

	{
$query = $db->simple_select("users", "uid, username", "uid='".intval($mybb->input['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='".intval($mybb->input['touid'])."'";
$additional_criteria[] = "touid='".intval($mybb->input['touid'])."'";



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

	}
else if($mybb->input['toname'])
{

	}
else if($mybb->input['toname'])
{

		$query = $db->simple_select("users", "uid, username", "LOWER(username)='".my_strtolower($mybb->input['toname'])."'");

		$query = $db->simple_select("users", "uid, username", "LOWER(username)='".my_strtolower($toname)."'");

		$user = $db->fetch_array($query);
$to_filter = $user['username'];


		$user = $db->fetch_array($query);
$to_filter = $user['username'];


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

 


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

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

		$additional_criteria = "touid='{$user['uid']}'";
}


		$additional_criteria[] = "touid={$user['uid']}";
}


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

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

	{
$additional_sql_criteria .= " AND l.toemail LIKE '%".$db->escape_string($mybb->input['toemail'])."%'";
$additional_criteria[] = "toemail='".urlencode($mybb->input['toemail'])."'";

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

		$to_filter = $mybb->input['toemail'];

		$to_filter = $mybb->input['toemail'];

	}

	}





	if($additional_criteria)
{

	if(!empty($additional_criteria))
{

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

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

 
	}
else
{
$additional_criteria = '';

	}

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

	}

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