Vergleich modcp.php - 1.4.3 - 1.4.12

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: modcp.php 4184 2008-09-10 04:40:17Z Tikitiki $

 * $Id: modcp.php 4729 2010-01-23 08:21:16Z Huji $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 20Zeile 20
$templatelist .= ",codebuttons,smilieinsert,modcp_announcements_new,modcp_modqueue_empty,forumjump_bit,forumjump_special";
$templatelist .= ",modcp_modlogs,modcp_finduser_user,modcp_finduser,usercp_profile_customfield,usercp_profile_profilefields";
$templatelist .= ",modcp_editprofile,modcp_ipsearch,modcp_banuser_addusername,modcp_banuser,modcp_warninglogs_nologs";

$templatelist .= ",codebuttons,smilieinsert,modcp_announcements_new,modcp_modqueue_empty,forumjump_bit,forumjump_special";
$templatelist .= ",modcp_modlogs,modcp_finduser_user,modcp_finduser,usercp_profile_customfield,usercp_profile_profilefields";
$templatelist .= ",modcp_editprofile,modcp_ipsearch,modcp_banuser_addusername,modcp_banuser,modcp_warninglogs_nologs";

$templatelist .= ",modcp_warninglogs";

$templatelist .= ",modcp_warninglogs,modcp_modlogs_result";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_user.php";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_user.php";

Zeile 50Zeile 50
	while($forum = $db->fetch_array($query))
{
$flist .= ",'{$forum['fid']}'";

	while($forum = $db->fetch_array($query))
{
$flist .= ",'{$forum['fid']}'";

 
		
$children = get_child_list($forum['fid']);
if(!empty($children))
{
$flist .= ",'".implode("','", $children)."'";
}

		$moderated_forums[] = $forum['fid'];
}
if($flist)

		$moderated_forums[] = $forum['fid'];
}
if($flist)

Zeile 112Zeile 118
	$report_count = $db->fetch_field($query, "count");

$mybb->input['rid'] = intval($mybb->input['rid']);

	$report_count = $db->fetch_field($query, "count");

$mybb->input['rid'] = intval($mybb->input['rid']);


if($mybb->input['rid'])
{
$query = $db->simple_select("reportedposts", "COUNT(rid) AS count", "rid <= '".$mybb->input['rid']."'");


if($mybb->input['rid'])
{
$query = $db->simple_select("reportedposts", "COUNT(rid) AS count", "rid <= '".$mybb->input['rid']."'");

		$result = $db->fetch_field($query, "count");
if(($result % $perpage) == 0)
{

		$result = $db->fetch_field($query, "count");
if(($result % $perpage) == 0)
{

Zeile 130Zeile 136
	$pages = $postcount / $perpage;
$pages = ceil($pages);


	$pages = $postcount / $perpage;
$pages = ceil($pages);










	if($mybb->input['page'] == "last")
{
$page = $pages;

	if($mybb->input['page'] == "last")
{
$page = $pages;

Zeile 140Zeile 145

if($page > $pages || $page <= 0)
{


if($page > $pages || $page <= 0)
{

		$page = 1;
}

if($page && $page > 0)
{
$start = ($page-1) * $perpage;
}
else
{
$start = 0;

		$page = 1;
}

if($page && $page > 0)
{
$start = ($page-1) * $perpage;
}
else
{
$start = 0;

		$page = 1;
}
$upper = $start+$perpage;

$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=reports");
if($postcount > $perpage)

		$page = 1;
}
$upper = $start+$perpage;

$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=reports");
if($postcount > $perpage)

	{

	{

		eval("\$reportspages = \"".$templates->get("modcp_reports_multipage")."\";");
}


		eval("\$reportspages = \"".$templates->get("modcp_reports_multipage")."\";");
}


Zeile 184Zeile 189
		if(is_moderator($report['fid']))
{
$trow = 'trow_shaded';

		if(is_moderator($report['fid']))
{
$trow = 'trow_shaded';

		}
$report['postlink'] = get_post_link($report['pid'], $report['tid']);

		}
$report['postlink'] = get_post_link($report['pid'], $report['tid']);

		$report['threadlink'] = get_thread_link($report['tid']);
$report['posterlink'] = get_profile_link($report['postuid']);
$report['reporterlink'] = get_profile_link($report['uid']);

		$report['threadlink'] = get_thread_link($report['tid']);
$report['posterlink'] = get_profile_link($report['postuid']);
$report['reporterlink'] = get_profile_link($report['uid']);

Zeile 197Zeile 202
	if(!$reports)
{
eval("\$reports = \"".$templates->get("modcp_reports_noreports")."\";");

	if(!$reports)
{
eval("\$reports = \"".$templates->get("modcp_reports_noreports")."\";");

	}


	}


	$plugins->run_hooks("modcp_reports");

eval("\$reportedposts = \"".$templates->get("modcp_reports")."\";");

	$plugins->run_hooks("modcp_reports");

eval("\$reportedposts = \"".$templates->get("modcp_reports")."\";");

Zeile 219Zeile 224
	if($mybb->input['page'] != "last")
{
$page = intval($mybb->input['page']);

	if($mybb->input['page'] != "last")
{
$page = intval($mybb->input['page']);

	}

	}


$query = $db->simple_select("reportedposts", "COUNT(rid) AS count");
$warnings = $db->fetch_field($query, "count");


$query = $db->simple_select("reportedposts", "COUNT(rid) AS count");
$warnings = $db->fetch_field($query, "count");

Zeile 323Zeile 328
	if(!$allreports)
{
eval("\$allreports = \"".$templates->get("modcp_reports_allnoreports")."\";");

	if(!$allreports)
{
eval("\$allreports = \"".$templates->get("modcp_reports_allnoreports")."\";");

	}

$plugins->run_hooks("modcp_reports");


	}

$plugins->run_hooks("modcp_reports");


	eval("\$allreportedposts = \"".$templates->get("modcp_reports_allreports")."\";");
output_page($allreportedposts);
}

	eval("\$allreportedposts = \"".$templates->get("modcp_reports_allreports")."\";");
output_page($allreportedposts);
}

Zeile 336Zeile 341
	add_breadcrumb($lang->mcp_nav_modlogs, "modcp.php?action=modlogs");

$perpage = intval($mybb->input['perpage']);

	add_breadcrumb($lang->mcp_nav_modlogs, "modcp.php?action=modlogs");

$perpage = intval($mybb->input['perpage']);

	if(!$perpage || $pagepage <= 0)

	if(!$perpage || $perpage <= 0)

	{
$perpage = $mybb->settings['threadsperpage'];
}

	{
$perpage = $mybb->settings['threadsperpage'];
}

Zeile 387Zeile 392

// Figure out if we need to display multiple pages.
if($mybb->input['page'] != "last")


// Figure out if we need to display multiple pages.
if($mybb->input['page'] != "last")

	{

	{

		$page = intval($mybb->input['page']);

		$page = intval($mybb->input['page']);

	}


	}


	$postcount = intval($rescount);
$pages = $postcount / $perpage;
$pages = ceil($pages);

	$postcount = intval($rescount);
$pages = $postcount / $perpage;
$pages = ceil($pages);





	if($mybb->input['page'] == "last")
{
$page = $pages;

	if($mybb->input['page'] == "last")
{
$page = $pages;

	}

	}


if($page > $pages || $page <= 0)


if($page > $pages || $page <= 0)

	{
$page = 1;

	{
$page = 1;

	}

if($page)

	}

if($page)

	{

	{

		$start = ($page-1) * $perpage;
}
else

		$start = ($page-1) * $perpage;
}
else

	{

	{

		$start = 0;
$page = 1;
}

		$start = 0;
$page = 1;
}

Zeile 419Zeile 424
	if($postcount > $perpage)
{
eval("\$resultspages = \"".$templates->get("modcp_modlogs_multipage")."\";");

	if($postcount > $perpage)
{
eval("\$resultspages = \"".$templates->get("modcp_modlogs_multipage")."\";");

	}

	}

	$query = $db->query("
SELECT l.*, u.username, u.usergroup, u.displaygroup, t.subject AS tsubject, f.name AS fname, p.subject AS psubject
FROM ".TABLE_PREFIX."moderatorlog l

	$query = $db->query("
SELECT l.*, u.username, u.usergroup, u.displaygroup, t.subject AS tsubject, f.name AS fname, p.subject AS psubject
FROM ".TABLE_PREFIX."moderatorlog l

Zeile 442Zeile 447
		if($logitem['tsubject'])
{
$information = "<strong>{$lang->thread}</strong> <a href=\"".get_thread_link($logitem['tid'])."\" target=\"_blank\">".htmlspecialchars_uni($logitem['tsubject'])."</a><br />";

		if($logitem['tsubject'])
{
$information = "<strong>{$lang->thread}</strong> <a href=\"".get_thread_link($logitem['tid'])."\" target=\"_blank\">".htmlspecialchars_uni($logitem['tsubject'])."</a><br />";

		}

		}

		if($logitem['fname'])
{
$information .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($logitem['fid'])."\" target=\"_blank\">{$logitem['fname']}</a><br />";

		if($logitem['fname'])
{
$information .= "<strong>{$lang->forum}</strong> <a href=\"".get_forum_link($logitem['fid'])."\" target=\"_blank\">{$logitem['fname']}</a><br />";

		}

		}

		if($logitem['psubject'])
{
$information .= "<strong>{$lang->post}</strong> <a href=\"".get_post_link($logitem['pid'])."#pid{$logitem['pid']}\">".htmlspecialchars_uni($logitem['psubject'])."</a>";

		if($logitem['psubject'])
{
$information .= "<strong>{$lang->post}</strong> <a href=\"".get_post_link($logitem['pid'])."#pid{$logitem['pid']}\">".htmlspecialchars_uni($logitem['psubject'])."</a>";

		}


		}


		eval("\$results .= \"".$templates->get("modcp_modlogs_result")."\";");
}


		eval("\$results .= \"".$templates->get("modcp_modlogs_result")."\";");
}


Zeile 475Zeile 480
		if(!$user['username'])
{
$user['username'] = $lang->na_deleted;

		if(!$user['username'])
{
$user['username'] = $lang->na_deleted;

		}

		}

		
$selected = '';
if($mybb->input['uid'] == $user['uid'])

		
$selected = '';
if($mybb->input['uid'] == $user['uid'])

Zeile 483Zeile 488
			$selected = " selected=\"selected\"";
}
$user_options .= "<option value=\"{$user['uid']}\"{$selected}>".htmlspecialchars_uni($user['username'])."</option>\n";

			$selected = " selected=\"selected\"";
}
$user_options .= "<option value=\"{$user['uid']}\"{$selected}>".htmlspecialchars_uni($user['username'])."</option>\n";

	}

	}





	$forum_select = build_forum_jump("", $mybb->input['fid'], 1, '', 0, '', "fid");

	$forum_select = build_forum_jump("", $mybb->input['fid'], 1, '', 0, true, '', "fid");


eval("\$modlogs = \"".$templates->get("modcp_modlogs")."\";");
output_page($modlogs);


eval("\$modlogs = \"".$templates->get("modcp_modlogs")."\";");
output_page($modlogs);

Zeile 548Zeile 553
	}

if(!trim($mybb->input['message']))

	}

if(!trim($mybb->input['message']))

	{

	{

		$errors[] = $lang->error_missing_message;
}

if(!trim($mybb->input['fid']))
{
$errors[] = $lang->error_missing_forum;

		$errors[] = $lang->error_missing_message;
}

if(!trim($mybb->input['fid']))
{
$errors[] = $lang->error_missing_forum;

	}


	}


	$startdate = @explode(" ", $mybb->input['starttime_time']);
$startdate = @explode(":", $startdate[0]);
$enddate = @explode(" ", $mybb->input['endtime_time']);

	$startdate = @explode(" ", $mybb->input['starttime_time']);
$startdate = @explode(":", $startdate[0]);
$enddate = @explode(" ", $mybb->input['endtime_time']);

Zeile 568Zeile 573
		if($startdate[0] >= 24)
{
$startdate[0] = "00";

		if($startdate[0] >= 24)
{
$startdate[0] = "00";

		}

		}

	}

if(stristr($mybb->input['endtime_time'], "pm"))

	}

if(stristr($mybb->input['endtime_time'], "pm"))

	{

	{

		$enddate[0] = 12+$enddate[0];
if($enddate[0] >= 24)
{

		$enddate[0] = 12+$enddate[0];
if($enddate[0] >= 24)
{

Zeile 580Zeile 585
		}
}


		}
}


	$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');			
if(!in_array($mybb->input['starttime_month'], $months))
{
$mybb->input['starttime_month'] = 1;
}

$startdate = gmmktime(intval($startdate[0]), intval($startdate[1]), 0, (int)$mybb->input['starttime_month'], intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year']));

if($startdate < 0 || $startdate == false)
{
$errors[] = $lang->error_invalid_start_date;
}

if($mybb->input['endtime_type'] == "2")
{
$enddate = '0';
}
else
{
if(!in_array($mybb->input['endtime_month'], $months))
{
$mybb->input['endtime_month'] = 1;
}
$enddate = gmmktime(intval($enddate[0]), intval($enddate[1]), 0, (int)$mybb->input['endtime_month'], intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year']));
if($enddate < 0 || $enddate == false)

	$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');			
if(!in_array($mybb->input['starttime_month'], $months))
{
$mybb->input['starttime_month'] = 1;
}

$startdate = gmmktime(intval($startdate[0]), intval($startdate[1]), 0, (int)$mybb->input['starttime_month'], intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year']));

if($startdate < 0 || $startdate == false)
{
$errors[] = $lang->error_invalid_start_date;
}

if($mybb->input['endtime_type'] == "2")
{
$enddate = '0';
}
else
{
if(!in_array($mybb->input['endtime_month'], $months))
{
$mybb->input['endtime_month'] = 1;
}
$enddate = gmmktime(intval($enddate[0]), intval($enddate[1]), 0, (int)$mybb->input['endtime_month'], intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year']));
if($enddate < 0 || $enddate == false)

		{
$errors[] = $lang->error_invalid_end_date;
}

		{
$errors[] = $lang->error_invalid_end_date;
}

Zeile 683Zeile 688
	}
else
{

	}
else
{

		// Note: dates are not in user's timezone

		// Note: dates are in GMT timezone

		$starttime_time = gmdate("g:i a", TIME_NOW);
$endtime_time = gmdate("g:i a", TIME_NOW);
$startday = $endday = gmdate("j", TIME_NOW);

		$starttime_time = gmdate("g:i a", TIME_NOW);
$endtime_time = gmdate("g:i a", TIME_NOW);
$startday = $endday = gmdate("j", TIME_NOW);

Zeile 778Zeile 783
	if($mybb->input['endtime_type'] == 2 || !isset($mybb->input['endtime_type']))
{
$end_type_sel['infinite'] = ' checked="checked"';

	if($mybb->input['endtime_type'] == 2 || !isset($mybb->input['endtime_type']))
{
$end_type_sel['infinite'] = ' checked="checked"';

	}
else

	}
else

	{
$end_type_sel['finite'] = ' checked="checked"';
}

	{
$end_type_sel['finite'] = ' checked="checked"';
}

Zeile 882Zeile 887
		elseif($enddate < $startdate)
{
$errors[] = $lang->error_end_before_start;

		elseif($enddate < $startdate)
{
$errors[] = $lang->error_end_before_start;

		}

		}

	}

// Proceed to update if no errors

	}

// Proceed to update if no errors

Zeile 965Zeile 970
	}
else
{

	}
else
{

		// Note: dates are in user's timezone
$starttime_time = my_date('g:i a', $announcement['startdate']);
$endtime_time = my_date('g:i a', $announcement['enddate']);

		// Note: dates are in GMT timezone
$starttime_time = gmdate('g:i a', $announcement['startdate']);
$endtime_time = gmdate('g:i a', $announcement['enddate']);





		$startday = my_date('j', $announcement['startdate']);
$endday = my_date('j', $announcement['enddate']);

		$startday = gmdate('j', $announcement['startdate']);
$endday = gmdate('j', $announcement['enddate']);





		$startmonth = my_date('m', $announcement['startdate']);
$endmonth = my_date('m', $announcement['enddate']);

		$startmonth = gmdate('m', $announcement['startdate']);
$endmonth = gmdate('m', $announcement['enddate']);





		$startdateyear = my_date('Y', $announcement['startdate']);
$enddateyear = my_date('Y', $announcement['enddate']);

		$startdateyear = gmdate('Y', $announcement['startdate']);
$enddateyear = gmdate('Y', $announcement['enddate']);


$errored = false;
}


$errored = false;
}

Zeile 1064Zeile 1069
	}

if(($errored && $mybb->input['endtime_type'] == 2) || (!$errored && intval($announcement['enddate']) == 0))

	}

if(($errored && $mybb->input['endtime_type'] == 2) || (!$errored && intval($announcement['enddate']) == 0))

	{

	{

		$end_type_sel['infinite'] = ' checked="checked"';
}
else

		$end_type_sel['infinite'] = ' checked="checked"';
}
else

Zeile 1167Zeile 1172
			}
}
if(is_array($threads_to_approve))

			}
}
if(is_array($threads_to_approve))

		{

		{

			$moderation->approve_threads($threads_to_approve);
}

			$moderation->approve_threads($threads_to_approve);
}

 
		log_moderator_action(array('tids' => $threads_to_approve), $lang->multi_approve_threads);

		redirect("modcp.php?action=modqueue", $lang->redirect_threadsmoderated);
}
else if(is_array($mybb->input['posts']))

		redirect("modcp.php?action=modqueue", $lang->redirect_threadsmoderated);
}
else if(is_array($mybb->input['posts']))

Zeile 1192Zeile 1198
		{
$moderation->approve_posts($posts_to_approve);
}

		{
$moderation->approve_posts($posts_to_approve);
}

 
		log_moderator_action(array('pids' => $posts_to_approve), $lang->multi_approve_posts);

		redirect("modcp.php?action=modqueue&type=posts", $lang->redirect_postsmoderated);
}
else if(is_array($mybb->input['attachments']))

		redirect("modcp.php?action=modqueue&type=posts", $lang->redirect_postsmoderated);
}
else if(is_array($mybb->input['attachments']))

Zeile 1199Zeile 1206
		$query = $db->query("
SELECT a.pid, a.aid
FROM ".TABLE_PREFIX."attachments a

		$query = $db->query("
SELECT a.pid, a.aid
FROM ".TABLE_PREFIX."attachments a

 
			LEFT JOIN ".TABLE_PREFIX."posts p ON (a.pid=p.pid)

			LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)

			LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)

			WHERE aid IN (".implode(",", array_map("intval", array_keys($mybb->input['attachments'])))."){$flist}

			WHERE aid IN (".implode(",", array_map("intval", array_keys($mybb->input['attachments'])))."){$tflist}

		");
while($attachment = $db->fetch_array($query))
{

		");
while($attachment = $db->fetch_array($query))
{

Zeile 1226Zeile 1234

$query = $db->simple_select("threads", "COUNT(tid) AS unapprovedthreads", "visible=0 {$flist}");
$unapproved_threads = $db->fetch_field($query, "unapprovedthreads");


$query = $db->simple_select("threads", "COUNT(tid) AS unapprovedthreads", "visible=0 {$flist}");
$unapproved_threads = $db->fetch_field($query, "unapprovedthreads");


// Figure out if we need to display multiple pages.


// Figure out if we need to display multiple pages.

		if($mybb->input['page'] != "last")

		if($mybb->input['page'] != "last")

		{

		{

			$page = intval($mybb->input['page']);

			$page = intval($mybb->input['page']);

		}


		}


		$perpage = $mybb->settings['threadsperpage'];
$pages = $unapproved_threads / $perpage;

		$perpage = $mybb->settings['threadsperpage'];
$pages = $unapproved_threads / $perpage;

		$pages = ceil($pages);

if($mybb->input['page'] == "last")
{
$page = $pages;
}

if($page > $pages || $page <= 0)
{
$page = 1;
}

if($page)
{
$start = ($page-1) * $perpage;
}
else
{
$start = 0;
$page = 1;
}


		$pages = ceil($pages);

if($mybb->input['page'] == "last")
{
$page = $pages;
}

if($page > $pages || $page <= 0)
{
$page = 1;
}

if($page)
{
$start = ($page-1) * $perpage;
}
else
{
$start = 0;
$page = 1;
}


		$multipage = multipage($pages, $perpage, $page, "modcp.php?action=modqueue&amp;type=threads");

$query = $db->query("

		$multipage = multipage($pages, $perpage, $page, "modcp.php?action=modqueue&amp;type=threads");

$query = $db->query("

Zeile 1309Zeile 1317
			WHERE p.visible='0' {$tflist} AND t.firstpost != p.pid
");
$unapproved_posts = $db->fetch_field($query, "unapprovedposts");

			WHERE p.visible='0' {$tflist} AND t.firstpost != p.pid
");
$unapproved_posts = $db->fetch_field($query, "unapprovedposts");


// Figure out if we need to display multiple pages.
if($mybb->input['page'] != "last")
{
$page = intval($mybb->input['page']);
}



// Figure out if we need to display multiple pages.
if($mybb->input['page'] != "last")
{
$page = intval($mybb->input['page']);
}


		$perpage = $mybb->settings['postsperpage'];
$pages = $unapproved_posts / $perpage;
$pages = ceil($pages);

		$perpage = $mybb->settings['postsperpage'];
$pages = $unapproved_posts / $perpage;
$pages = ceil($pages);

Zeile 1402Zeile 1410
		$perpage = $mybb->settings['postsperpage'];
$pages = $unapproved_attachments / $perpage;
$pages = ceil($pages);

		$perpage = $mybb->settings['postsperpage'];
$pages = $unapproved_attachments / $perpage;
$pages = ceil($pages);



 

if($mybb->input['page'] == "last")
{


if($mybb->input['page'] == "last")
{

Zeile 1636Zeile 1643
	}
else
{

	}
else
{

 
		if(!$user['displaygroup'])
{
$user['displaygroup'] = $user['usergroup'];
}

$displaygroupfields = array(
"usertitle"
);

		$display_group = usergroup_displaygroup($user['displaygroup']);
$defaulttitle = $display_group['usertitle'];
}

		$display_group = usergroup_displaygroup($user['displaygroup']);
$defaulttitle = $display_group['usertitle'];
}

Zeile 1656Zeile 1671
			$bdaydaysel .= "<option value=\"$i\">$i</option>\n";
}
}

			$bdaydaysel .= "<option value=\"$i\">$i</option>\n";
}
}

	$bdaymonthsel[$mybb->input['birthday_month']] = "selected";

	$bdaymonthsel[$mybb->input['birthday_month']] = 'selected="selected"';



// Fetch profile fields



// Fetch profile fields

Zeile 1800Zeile 1815
		else
{
$value = htmlspecialchars_uni($userfield);

		else
{
$value = htmlspecialchars_uni($userfield);

			$code = "<input type=\"text\" name=\"profile_fields[$field]\" class=\"textbox\" size=\"{$profilefield['length']}\" maxlength=\"{$profilefield['maxlength']}\" value=\"$value\" />";






			$maxlength = "";
if($profilefield['maxlength'] > 0)
{
$maxlength = " maxlength=\"{$profilefield['maxlength']}\"";
}
$code = "<input type=\"text\" name=\"profile_fields[$field]\" class=\"textbox\" size=\"{$profilefield['length']}\"{$maxlength} value=\"$value\" />";

		}
if($profilefield['required'] == 1)
{

		}
if($profilefield['required'] == 1)
{

Zeile 1835Zeile 1855
if($mybb->input['action'] == "finduser")
{
$perpage = intval($mybb->input['perpage']);

if($mybb->input['action'] == "finduser")
{
$perpage = intval($mybb->input['perpage']);

	if(!$perpage || $pagepage <= 0)

	if(!$perpage || $perpage <= 0)

	{
$perpage = $mybb->settings['threadsperpage'];
}

	{
$perpage = $mybb->settings['threadsperpage'];
}

Zeile 1921Zeile 1941
		$user['postnum'] = my_number_format($user['postnum']);
$regdate = my_date($mybb->settings['dateformat'], $user['regdate']);
$regtime = my_date($mybb->settings['timeformat'], $user['regdate']);

		$user['postnum'] = my_number_format($user['postnum']);
$regdate = my_date($mybb->settings['dateformat'], $user['regdate']);
$regtime = my_date($mybb->settings['timeformat'], $user['regdate']);

		$lastdate = my_date($mybb->settings['dateformat'], $user['lastactive']);
$lasttime = my_date($mybb->settings['timeformat'], $user['lastactive']);

		$lastdate = my_date($mybb->settings['dateformat'], $user['lastvisit']);
$lasttime = my_date($mybb->settings['timeformat'], $user['lastvisit']);

		$usergroup = $usergroups_cache[$user['usergroup']]['title'];
eval("\$users .= \"".$templates->get("modcp_finduser_user")."\";");
}

		$usergroup = $usergroups_cache[$user['usergroup']]['title'];
eval("\$users .= \"".$templates->get("modcp_finduser_user")."\";");
}

Zeile 2186Zeile 2206

// Now we have the result counts, paginate
$perpage = intval($mybb->input['perpage']);


// Now we have the result counts, paginate
$perpage = intval($mybb->input['perpage']);

		if(!$perpage || $pagepage <= 0)

		if(!$perpage || $perpage <= 0)

		{
$perpage = $mybb->settings['threadsperpage'];
}

		{
$perpage = $mybb->settings['threadsperpage'];
}

Zeile 2220Zeile 2240
			$page = 1;
}


			$page = 1;
}


		$page_url = "modcp.php?action=ipsearch&amp;perpage={$perpage}&amp;ipaddress={$mybb->input['ipaddress']}";

		$page_url = "modcp.php?action=ipsearch&amp;perpage={$perpage}";

		foreach(array('ipaddress', 'search_users', 'search_posts') as $input)
{
if(!$mybb->input[$input]) continue;

		foreach(array('ipaddress', 'search_users', 'search_posts') as $input)
{
if(!$mybb->input[$input]) continue;

Zeile 2271Zeile 2291
		if($total_results > $user_results && $post_limit)
{
$post_start = $start-$user_results;

		if($total_results > $user_results && $post_limit)
{
$post_start = $start-$user_results;

			if($post_start < 0) $post_start = 0;




			if($post_start < 0)
{
$post_start = 0;
}

		}
if($mybb->input['search_posts'] && (!$mybb->input['search_users'] || ($mybb->input['search_users'] && $post_limit > 0)))
{

		}
if($mybb->input['search_posts'] && (!$mybb->input['search_users'] || ($mybb->input['search_users'] && $post_limit > 0)))
{

 
			$ipaddresses = $tids = $uids = array();

			$query = $db->query("

			$query = $db->query("

				SELECT p.username AS postusername, p.uid, u.username, p.subject, p.pid, p.tid, p.ipaddress, t.subject AS threadsubject
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON(p.uid=u.uid)

				SELECT username AS postusername, uid, subject, pid, tid, ipaddress
FROM ".TABLE_PREFIX."posts



				WHERE {$post_ip_sql}

				WHERE {$post_ip_sql}

				ORDER BY p.dateline DESC

				ORDER BY dateline DESC

				LIMIT {$post_start}, {$post_limit}
");
while($ipaddress = $db->fetch_array($query))
{

				LIMIT {$post_start}, {$post_limit}
");
while($ipaddress = $db->fetch_array($query))
{

				$ip = $ipaddress['ipaddress'];
if(!$ipaddress['username']) $ipaddress['username'] = $ipaddress['postusername']; // Guest username support
$trow = alt_trow();
if(!$ipaddress['subject'])






				$tids[$ipaddress['tid']] = $ipaddress['pid'];
$uids[$ipaddress['uid']] = $ipaddress['pid'];
$ipaddresses[$ipaddress['pid']] = $ipaddress;
}

if(!empty($ipaddresses))
{
$query = $db->simple_select("threads", "subject, tid", "tid IN(".implode(',', array_keys($tids)).")");
while($thread = $db->fetch_array($query))

				{

				{

					$ipaddress['subject'] = "RE: {$ipaddress['threadsubject']}";






















					$ipaddresses[$tids[$thread['tid']]]['threadsubject'] = $thread['subject'];
}
unset($tids);

$query = $db->simple_select("users", "username, uid", "uid IN(".implode(',', array_keys($uids)).")");
while($user = $db->fetch_array($query))
{
$ipaddresses[$uids[$user['uid']]]['username'] = $user['username'];
}
unset($uids);

foreach($ipaddresses as $ipaddress)
{
$ip = $ipaddress['ipaddress'];
if(!$ipaddress['username']) $ipaddress['username'] = $ipaddress['postusername']; // Guest username support
$trow = alt_trow();
if(!$ipaddress['subject'])
{
$ipaddress['subject'] = "RE: {$ipaddress['threadsubject']}";
}
$subject = "<strong>{$lang->ipresult_post}</strong> <a href=\"".get_post_link($ipaddress['pid'], $ipaddress['tid'])."\">".htmlspecialchars_uni($ipaddress['subject'])."</a> {$lang->by} ".build_profile_link($ipaddress['username'], $ipaddress['uid']);
eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";");

				}

				}

				$subject = "<strong>{$lang->ipresult_post}</strong> <a href=\"".get_post_link($ipaddress['pid'], $ipaddress['tid'])."\">".htmlspecialchars_uni($ipaddress['subject'])."</a> {$lang->by} ".build_profile_link($ipaddress['username'], $ipaddress['uid']);
eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";");

 
			}
}


			}
}


Zeile 2654Zeile 2700
	if($mybb->input['uid'])
{
$query = $db->query("

	if($mybb->input['uid'])
{
$query = $db->query("

			SELECT b.*, u.username

			SELECT b.*, u.username, u.uid

			FROM ".TABLE_PREFIX."banned b
LEFT JOIN ".TABLE_PREFIX."users u ON (b.uid=u.uid)
WHERE b.uid='{$mybb->input['uid']}'

			FROM ".TABLE_PREFIX."banned b
LEFT JOIN ".TABLE_PREFIX."users u ON (b.uid=u.uid)
WHERE b.uid='{$mybb->input['uid']}'

Zeile 2665Zeile 2711
			$username = htmlspecialchars_uni($banned['username']);
$banreason = htmlspecialchars_uni($banned['reason']);
$uid = $mybb->input['uid'];

			$username = htmlspecialchars_uni($banned['username']);
$banreason = htmlspecialchars_uni($banned['reason']);
$uid = $mybb->input['uid'];

 
			$user = get_user($banned['uid']);

			$lang->ban_user = $lang->edit_ban; // Swap over lang variables
eval("\$banuser_username = \"".$templates->get("modcp_banuser_editusername")."\";");
}

			$lang->ban_user = $lang->edit_ban; // Swap over lang variables
eval("\$banuser_username = \"".$templates->get("modcp_banuser_editusername")."\";");
}