Vergleich modcp.php - 1.6.13 - 1.6.18

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 40Zeile 40
if($mybb->user['uid'] == 0 || $mybb->usergroup['canmodcp'] != 1)
{
error_no_permission();

if($mybb->user['uid'] == 0 || $mybb->usergroup['canmodcp'] != 1)
{
error_no_permission();

 
}

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

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

}

$errors = '';

}

$errors = '';

Zeile 144Zeile 154
	$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 161Zeile 171
	$postcount = intval($report_count);
$pages = $postcount / $perpage;
$pages = ceil($pages);

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





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

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

Zeile 187Zeile 197
	if($postcount > $perpage)
{
eval("\$reportspages = \"".$templates->get("modcp_reports_multipage")."\";");

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

	}

	}


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


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





	$plugins->run_hooks("modcp_reports_start");

$reports = '';

	$plugins->run_hooks("modcp_reports_start");

$reports = '';

	$query = $db->query("
SELECT r.*, u.username, up.username AS postusername, up.uid AS postuid, t.subject AS threadsubject
FROM ".TABLE_PREFIX."reportedposts r

	$query = $db->query("
SELECT r.*, u.username, up.username AS postusername, up.uid AS postuid, t.subject AS threadsubject
FROM ".TABLE_PREFIX."reportedposts r

		LEFT JOIN ".TABLE_PREFIX."posts p ON (r.pid=p.pid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (p.tid=t.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON (r.uid=u.uid)

		LEFT JOIN ".TABLE_PREFIX."posts p ON (r.pid=p.pid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (p.tid=t.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON (r.uid=u.uid)

Zeile 220Zeile 230
		{
$trow = alt_trow();
if(is_moderator($report['fid']))

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

			{

			{

				$trow = 'trow_shaded';

				$trow = 'trow_shaded';

			}


			}


			$report['postlink'] = get_post_link($report['pid'], $report['tid']);
$report['threadlink'] = get_thread_link($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['posterlink'] = get_profile_link($report['postuid']);

 
			if(!$report['postuid'])
{
$report['posterlink'] = $report['postlink'];
$report['postusername'] = $lang->guest;
}


			$report['reporterlink'] = get_profile_link($report['uid']);

			$report['reporterlink'] = get_profile_link($report['uid']);

 
			if($report['uid'] > 0 && !$report['username'])
{
$report['reporterlink'] = $report['postlink'];
$report['username'] = $lang->na_deleted;
}


			$reportdate = my_date($mybb->settings['dateformat'], $report['dateline']);
$reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);
$report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));

eval("\$reports .= \"".$templates->get("modcp_reports_report")."\";");
}

			$reportdate = my_date($mybb->settings['dateformat'], $report['dateline']);
$reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);
$report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));

eval("\$reports .= \"".$templates->get("modcp_reports_report")."\";");
}

	}

	}


$plugins->run_hooks("modcp_reports_end");



$plugins->run_hooks("modcp_reports_end");


Zeile 253Zeile 276

// Figure out if we need to display multiple pages.
$perpage = $mybb->settings['threadsperpage'];


// Figure out if we need to display multiple pages.
$perpage = $mybb->settings['threadsperpage'];

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

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

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

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

Zeile 278Zeile 301
	$postcount = intval($warnings);
$pages = $postcount / $perpage;
$pages = ceil($pages);

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





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

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

Zeile 297Zeile 320
	{
$start = 0;
$page = 1;

	{
$start = 0;
$page = 1;

	}

	}

	$upper = $start+$perpage;

	$upper = $start+$perpage;





	$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=allreports");
if($postcount > $perpage)
{
eval("\$allreportspages = \"".$templates->get("modcp_reports_multipage")."\";");

	$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=allreports");
if($postcount > $perpage)
{
eval("\$allreportspages = \"".$templates->get("modcp_reports_multipage")."\";");

	}

$plugins->run_hooks("modcp_allreports_start");

	}

$plugins->run_hooks("modcp_allreports_start");


$query = $db->query("
SELECT r.*, u.username, up.username AS postusername, up.uid AS postuid, t.subject AS threadsubject


$query = $db->query("
SELECT r.*, u.username, up.username AS postusername, up.uid AS postuid, t.subject AS threadsubject

Zeile 321Zeile 344

$allreports = '';
if(!$db->num_rows($query))


$allreports = '';
if(!$db->num_rows($query))

	{

	{

		eval("\$allreports = \"".$templates->get("modcp_reports_allnoreports")."\";");
}
else

		eval("\$allreports = \"".$templates->get("modcp_reports_allnoreports")."\";");
}
else

Zeile 335Zeile 358
			$report['posterlink'] = get_profile_link($report['postuid']);
$report['postlink'] = get_post_link($report['pid'], $report['tid']);
$report['postusername'] = build_profile_link($report['postusername'], $report['postuid']);

			$report['posterlink'] = get_profile_link($report['postuid']);
$report['postlink'] = get_post_link($report['pid'], $report['tid']);
$report['postusername'] = build_profile_link($report['postusername'], $report['postuid']);

 


			$report['reporterlink'] = get_profile_link($report['uid']);

			$report['reporterlink'] = get_profile_link($report['uid']);

 
			if($report['uid'] > 0 && !$report['username'])
{
$report['reporterlink'] = $report['postlink'];
$report['username'] = $lang->na_deleted;
}


$reportdate = my_date($mybb->settings['dateformat'], $report['dateline']);
$reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);


$reportdate = my_date($mybb->settings['dateformat'], $report['dateline']);
$reporttime = my_date($mybb->settings['timeformat'], $report['dateline']);

Zeile 411Zeile 440
	if($order != "asc")
{
$order = "desc";

	if($order != "asc")
{
$order = "desc";

	}


	}


	$plugins->run_hooks("modcp_modlogs_start");

$query = $db->query("
SELECT COUNT(l.dateline) AS count

	$plugins->run_hooks("modcp_modlogs_start");

$query = $db->query("
SELECT COUNT(l.dateline) AS count

		FROM ".TABLE_PREFIX."moderatorlog l
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=l.tid)

		FROM ".TABLE_PREFIX."moderatorlog l
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=l.tid)

		WHERE 1=1 {$where}{$tflist}
");
$rescount = $db->fetch_field($query, "count");

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

		WHERE 1=1 {$where}{$tflist}
");
$rescount = $db->fetch_field($query, "count");

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

	{

	{

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


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


Zeile 452Zeile 481
	{
$start = 0;
$page = 1;

	{
$start = 0;
$page = 1;

	}

	}


$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=modlogs&amp;perpage=$perpage&amp;uid={$mybb->input['uid']}&amp;fid={$mybb->input['fid']}&amp;sortby={$mybb->input['sortby']}&amp;order={$mybb->input['order']}");
if($postcount > $perpage)


$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=modlogs&amp;perpage=$perpage&amp;uid={$mybb->input['uid']}&amp;fid={$mybb->input['fid']}&amp;sortby={$mybb->input['sortby']}&amp;order={$mybb->input['order']}");
if($postcount > $perpage)

Zeile 460Zeile 489
		eval("\$resultspages = \"".$templates->get("modcp_modlogs_multipage")."\";");
}
$query = $db->query("

		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

		SELECT l.*, u.username, u.usergroup, u.displaygroup, t.subject AS tsubject, f.name AS fname

		FROM ".TABLE_PREFIX."moderatorlog l
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=l.tid)
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=l.fid)

		FROM ".TABLE_PREFIX."moderatorlog l
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=l.tid)
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=l.fid)

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

 
		WHERE 1=1 {$where}{$tflist}

		WHERE 1=1 {$where}{$tflist}

		ORDER BY {$sortby} {$order}

		ORDER BY {$sortby} {$order}

		LIMIT {$start}, {$perpage}
");
while($logitem = $db->fetch_array($query))

		LIMIT {$start}, {$perpage}
");
while($logitem = $db->fetch_array($query))

Zeile 480Zeile 508
		$username = format_name($logitem['username'], $logitem['usergroup'], $logitem['displaygroup']);
$logitem['profilelink'] = build_profile_link($username, $logitem['uid']);
if($logitem['tsubject'])

		$username = format_name($logitem['username'], $logitem['usergroup'], $logitem['displaygroup']);
$logitem['profilelink'] = build_profile_link($username, $logitem['uid']);
if($logitem['tsubject'])

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

		{
$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>";

 
		}


		}


		// Edited a user?
if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject'])

		// Edited a user or managed announcement?
if(!$logitem['tsubject'] || !$logitem['fname'])

		{
$data = unserialize($logitem['data']);
if($data['uid'])

		{
$data = unserialize($logitem['data']);
if($data['uid'])

			{

			{

				$information = $lang->sprintf($lang->edited_user_info, htmlspecialchars_uni($data['username']), get_profile_link($data['uid']));
}

				$information = $lang->sprintf($lang->edited_user_info, htmlspecialchars_uni($data['username']), get_profile_link($data['uid']));
}

		}






			if($data['aid'])
{
$information = "<strong>{$lang->announcement}:</strong> <a href=\"".get_announcement_link($data['aid'])."\" target=\"_blank\">".htmlspecialchars_uni($data['subject'])."</a>";
}
}


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

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

	}


	}


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

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

Zeile 527Zeile 555
		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 535Zeile 563
			$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, true, '', "fid");



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


Zeile 544Zeile 572
}

if($mybb->input['action'] == "do_delete_announcement")

}

if($mybb->input['action'] == "do_delete_announcement")

{
verify_post_check($mybb->input['my_post_key']);

$aid = intval($mybb->input['aid']);
$query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");
$announcement = $db->fetch_array($query);

if(!$announcement['aid'])
{
error($lang->error_invalid_announcement);
}

{
verify_post_check($mybb->input['my_post_key']);

$aid = intval($mybb->input['aid']);
$query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");
$announcement = $db->fetch_array($query);

if(!$announcement['aid'])
{
error($lang->error_invalid_announcement);
}

	if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
{
error_no_permission();

	if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
{
error_no_permission();

Zeile 563Zeile 591
	$plugins->run_hooks("modcp_do_delete_announcement");

$db->delete_query("announcements", "aid='{$aid}'");

	$plugins->run_hooks("modcp_do_delete_announcement");

$db->delete_query("announcements", "aid='{$aid}'");

 
	log_moderator_action(array("aid" => $announcement['aid'], "subject" => $announcement['subject']), $lang->announcement_deleted);

	$cache->update_forumsdisplay();

redirect("modcp.php?action=announcements", $lang->redirect_delete_announcement);

	$cache->update_forumsdisplay();

redirect("modcp.php?action=announcements", $lang->redirect_delete_announcement);

Zeile 608Zeile 637
	}

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


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

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

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

		{

		{

			$enddate[0] = "00";
}
}

			$enddate[0] = "00";
}
}

Zeile 688Zeile 717
			'allowmycode' => $db->escape_string($mybb->input['allowmycode']),
'allowsmilies' => $db->escape_string($mybb->input['allowsmilies']),
);

			'allowmycode' => $db->escape_string($mybb->input['allowmycode']),
'allowsmilies' => $db->escape_string($mybb->input['allowsmilies']),
);



 
		$aid = $db->insert_query("announcements", $insert_announcement);

		$aid = $db->insert_query("announcements", $insert_announcement);

 

log_moderator_action(array("aid" => $aid, "subject" => $db->escape_string($mybb->input['title'])), $lang->announcement_added);


$plugins->run_hooks("modcp_do_new_announcement_end");



$plugins->run_hooks("modcp_do_new_announcement_end");


Zeile 969Zeile 999
		);

$db->update_query("announcements", $update_announcement, "aid='{$aid}'");

		);

$db->update_query("announcements", $update_announcement, "aid='{$aid}'");

 

log_moderator_action(array("aid" => $announcement['aid'], "subject" => $db->escape_string($mybb->input['title'])), $lang->announcement_edited);


$plugins->run_hooks("modcp_do_edit_announcement_end");



$plugins->run_hooks("modcp_do_edit_announcement_end");


Zeile 1653Zeile 1685
	$user = get_user($mybb->input['uid']);
if(!$user['uid'])
{

	$user = get_user($mybb->input['uid']);
if(!$user['uid'])
{

		error($lang->invalid_user);

		error($lang->error_nomember);

	}

// Check if the current user has permission to edit this user

	}

// Check if the current user has permission to edit this user

Zeile 1845Zeile 1877
	$user = get_user($mybb->input['uid']);
if(!$user['uid'])
{

	$user = get_user($mybb->input['uid']);
if(!$user['uid'])
{

		error($lang->invalid_user);

		error($lang->error_nomember);

	}

// Check if the current user has permission to edit this user

	}

// Check if the current user has permission to edit this user

Zeile 1895Zeile 1927

if(!empty($display_group['usertitle']))
{


if(!empty($display_group['usertitle']))
{

		$defaulttitle = $display_group['usertitle'];

		$defaulttitle = htmlspecialchars_uni($display_group['usertitle']);

	}
else
{

	}
else
{

Zeile 1942Zeile 1974
	while($profilefield = $db->fetch_array($query))
{
$profilefield['type'] = htmlspecialchars_uni($profilefield['type']);

	while($profilefield = $db->fetch_array($query))
{
$profilefield['type'] = htmlspecialchars_uni($profilefield['type']);

 
		$profilefield['name'] = htmlspecialchars_uni($profilefield['name']);

		$profilefield['description'] = htmlspecialchars_uni($profilefield['description']);
$thing = explode("\n", $profilefield['type'], "2");
$type = $thing[0];

		$profilefield['description'] = htmlspecialchars_uni($profilefield['description']);
$thing = explode("\n", $profilefield['type'], "2");
$type = $thing[0];

Zeile 2170Zeile 2203
		"weeks" => $lang->expire_weeks,
"months" => $lang->expire_months,
"never" => $lang->expire_permanent

		"weeks" => $lang->expire_weeks,
"months" => $lang->expire_months,
"never" => $lang->expire_permanent

	);


	);


	foreach($moderator_options as $option)
{
$mybb->input[$option['time']] = intval($mybb->input[$option['time']]);

	foreach($moderator_options as $option)
{
$mybb->input[$option['time']] = intval($mybb->input[$option['time']]);

Zeile 2277Zeile 2310
			break;
default:
$sortby = "regdate";

			break;
default:
$sortby = "regdate";

	}

	}

	$order = $mybb->input['order'];
if($order != "asc")
{

	$order = $mybb->input['order'];
if($order != "asc")
{

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

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

	}


	}


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

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

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

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

	{

	{

		$page = $pages;

		$page = $pages;

	}

	}


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


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

	{
$page = 1;
}

	{
$page = 1;
}

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

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

Zeile 2324Zeile 2357
			$mybb->input[$field] = htmlspecialchars_uni($mybb->input[$field]);
}
}

			$mybb->input[$field] = htmlspecialchars_uni($mybb->input[$field]);
}
}





	$multipage = multipage($user_count, $perpage, $page, $page_url);

	$multipage = multipage($user_count, $perpage, $page, $page_url);





	$usergroups_cache = $cache->read("usergroups");

$plugins->run_hooks("modcp_finduser_start");

	$usergroups_cache = $cache->read("usergroups");

$plugins->run_hooks("modcp_finduser_start");





	// Fetch out results
$query = $db->simple_select("users", "*", "1=1 {$where}", array("order_by" => $sortby, "order_dir" => $order, "limit" => $perpage, "limit_start" => $start));
while($user = $db->fetch_array($query))

	// Fetch out results
$query = $db->simple_select("users", "*", "1=1 {$where}", array("order_by" => $sortby, "order_dir" => $order, "limit" => $perpage, "limit_start" => $start));
while($user = $db->fetch_array($query))

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

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

		$usergroup = $usergroups_cache[$user['usergroup']]['title'];

		$usergroup = htmlspecialchars_uni($usergroups_cache[$user['usergroup']]['title']);

		eval("\$users .= \"".$templates->get("modcp_finduser_user")."\";");
}


		eval("\$users .= \"".$templates->get("modcp_finduser_user")."\";");
}


Zeile 2583Zeile 2616
				$query = $db->query("
SELECT COUNT(pid) AS count
FROM ".TABLE_PREFIX."posts

				$query = $db->query("
SELECT COUNT(pid) AS count
FROM ".TABLE_PREFIX."posts

					WHERE {$post_ip_sql}

					WHERE {$post_ip_sql} AND visible >= 0

				");

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

				");

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

Zeile 2597Zeile 2630
			if(strpos($mybb->input['ipaddress'], ":") !== false)
{
$user_ip_sql = "regip LIKE '".$db->escape_string(str_replace("*", "%", $mybb->input['ipaddress']))."' OR lastip LIKE '".$db->escape_string(str_replace("*", "%", $mybb->input['ipaddress']))."'";

			if(strpos($mybb->input['ipaddress'], ":") !== false)
{
$user_ip_sql = "regip LIKE '".$db->escape_string(str_replace("*", "%", $mybb->input['ipaddress']))."' OR lastip LIKE '".$db->escape_string(str_replace("*", "%", $mybb->input['ipaddress']))."'";

			}

			}

			else
{
$ip_range = fetch_longipv4_range($mybb->input['ipaddress']);

			else
{
$ip_range = fetch_longipv4_range($mybb->input['ipaddress']);

Zeile 2734Zeile 2767
			$query = $db->query("
SELECT username AS postusername, uid, subject, pid, tid, ipaddress
FROM ".TABLE_PREFIX."posts

			$query = $db->query("
SELECT username AS postusername, uid, subject, pid, tid, ipaddress
FROM ".TABLE_PREFIX."posts

				WHERE {$post_ip_sql}

				WHERE {$post_ip_sql} AND visible >= 0

				ORDER BY dateline DESC
LIMIT {$post_start}, {$post_limit}
");

				ORDER BY dateline DESC
LIMIT {$post_start}, {$post_limit}
");

Zeile 3413Zeile 3446
	}

$query = $db->query("

	}

$query = $db->query("

		SELECT l.*, u.username, u.usergroup, u.displaygroup, t.subject AS tsubject, f.name AS fname, p.subject AS psubject

		SELECT l.*, u.username, u.usergroup, u.displaygroup, t.subject AS tsubject, f.name AS fname

		FROM ".TABLE_PREFIX."moderatorlog l
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=l.tid)
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=l.fid)

		FROM ".TABLE_PREFIX."moderatorlog l
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=l.tid)
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=l.fid)

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

 
		{$where}
ORDER BY l.dateline DESC
LIMIT 5

		{$where}
ORDER BY l.dateline DESC
LIMIT 5

Zeile 3435Zeile 3467
		$logitem['profilelink'] = build_profile_link($username, $logitem['uid']);
if($logitem['tsubject'])
{

		$logitem['profilelink'] = build_profile_link($username, $logitem['uid']);
if($logitem['tsubject'])
{

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

			$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\">".htmlspecialchars_uni($logitem['fname'])."</a><br />";

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

 
		}


		}


		// Edited a user?
if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject'])

		// Edited a user or managed announcement?
if(!$logitem['tsubject'] || !$logitem['fname'])

		{
$data = unserialize($logitem['data']);
if($data['uid'])

		{
$data = unserialize($logitem['data']);
if($data['uid'])

			{

			{

				$information = $lang->sprintf($lang->edited_user_info, htmlspecialchars_uni($data['username']), get_profile_link($data['uid']));

				$information = $lang->sprintf($lang->edited_user_info, htmlspecialchars_uni($data['username']), get_profile_link($data['uid']));

 
			}
if($data['aid'])
{
$information = "<strong>{$lang->announcement}:</strong> <a href=\"".get_announcement_link($data['aid'])."\" target=\"_blank\">".htmlspecialchars_uni($data['subject'])."</a>";

			}
}


			}
}