Vergleich modcp.php - 1.6.10 - 1.6.18

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 19Zeile 19
$templatelist .= ",modcp_no_announcements_global,modcp_announcements_global,modcp_announcements_forum,modcp_announcements,modcp_editprofile_select_option,modcp_editprofile_select,modcp_finduser_noresults";
$templatelist .= ",codebuttons,smilieinsert,modcp_announcements_new,modcp_modqueue_empty,forumjump_bit,forumjump_special,modcp_warninglogs_warning_revoked,modcp_warninglogs_warning,modcp_ipsearch_result";
$templatelist .= ",modcp_modlogs,modcp_finduser_user,modcp_finduser,usercp_profile_customfield,usercp_profile_profilefields,modcp_ipsearch_noresults,modcp_ipsearch_results,modcp_ipsearch_misc_info";

$templatelist .= ",modcp_no_announcements_global,modcp_announcements_global,modcp_announcements_forum,modcp_announcements,modcp_editprofile_select_option,modcp_editprofile_select,modcp_finduser_noresults";
$templatelist .= ",codebuttons,smilieinsert,modcp_announcements_new,modcp_modqueue_empty,forumjump_bit,forumjump_special,modcp_warninglogs_warning_revoked,modcp_warninglogs_warning,modcp_ipsearch_result";
$templatelist .= ",modcp_modlogs,modcp_finduser_user,modcp_finduser,usercp_profile_customfield,usercp_profile_profilefields,modcp_ipsearch_noresults,modcp_ipsearch_results,modcp_ipsearch_misc_info";

$templatelist .= ",modcp_editprofile,modcp_ipsearch,modcp_banuser_addusername,modcp_banuser,modcp_warninglogs_nologs,modcp_banuser_editusername,modcp_lastattachment,modcp_lastpost,modcp_lastthread";

$templatelist .= ",modcp_editprofile,modcp_ipsearch,modcp_banuser_addusername,modcp_banuser,modcp_warninglogs_nologs,modcp_banuser_editusername,modcp_lastattachment,modcp_lastpost,modcp_lastthread,modcp_nobanned";

$templatelist .= ",modcp_warninglogs,modcp_modlogs_result,modcp_editprofile_signature,forumjump_advanced,smilieinsert_getmore,modcp_announcements_forum_nomod,modcp_announcements_announcement,multipage_prevpage";
$templatelist .= ",multipage_start,multipage_page_current,multipage_page,multipage_end,multipage_nextpage,multipage";


$templatelist .= ",modcp_warninglogs,modcp_modlogs_result,modcp_editprofile_signature,forumjump_advanced,smilieinsert_getmore,modcp_announcements_forum_nomod,modcp_announcements_announcement,multipage_prevpage";
$templatelist .= ",multipage_start,multipage_page_current,multipage_page,multipage_end,multipage_nextpage,multipage";


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 51Zeile 61
	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))
{

		$children = get_child_list($forum['fid']);
if(!empty($children))
{

Zeile 68Zeile 78
else
{
$flist = $tflist = '';

else
{
$flist = $tflist = '';

}


}


// Retrieve a list of unviewable forums
$unviewableforums = get_unviewable_forums();


// Retrieve a list of unviewable forums
$unviewableforums = get_unviewable_forums();


Zeile 95Zeile 105
add_breadcrumb($lang->nav_modcp, "modcp.php");

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

add_breadcrumb($lang->nav_modcp, "modcp.php");

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

{

{

	// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


	// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


Zeile 112Zeile 122
		$rids = "'0','{$rids}'";

$sql = "rid IN ({$rids})";

		$rids = "'0','{$rids}'";

$sql = "rid IN ({$rids})";

	}


	}


	$plugins->run_hooks("modcp_do_reports");

$db->update_query("reportedposts", array('reportstatus' => 1), "{$sql}{$flist}");
$cache->update_reportedposts();

	$plugins->run_hooks("modcp_do_reports");

$db->update_query("reportedposts", array('reportstatus' => 1), "{$sql}{$flist}");
$cache->update_reportedposts();

	



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

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

	



	redirect("modcp.php?action=reports&page={$page}", $lang->redirect_reportsmarked);
}


	redirect("modcp.php?action=reports&page={$page}", $lang->redirect_reportsmarked);
}


Zeile 131Zeile 141
	if(!$mybb->settings['threadsperpage'])
{
$mybb->settings['threadsperpage'] = 20;

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

	}

	}


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

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']."'");
$result = $db->fetch_field($query, "count");
if(($result % $perpage) == 0)


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)

		{
$page = $result / $perpage;
}

		{
$page = $result / $perpage;
}

Zeile 163Zeile 173
	$pages = ceil($pages);

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

	$pages = ceil($pages);

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

	{

	{

		$page = $pages;
}

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

		$page = $pages;
}

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

	{
$page = 1;

	{
$page = 1;

	}

if($page && $page > 0)

	}

if($page && $page > 0)

Zeile 194Zeile 204
	{
$forums[$forum['fid']] = $forum['name'];
}

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

	$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."users up ON (p.uid=up.uid)
WHERE r.reportstatus='0'
ORDER BY r.dateline DESC

		LEFT JOIN ".TABLE_PREFIX."users up ON (p.uid=up.uid)
WHERE r.reportstatus='0'
ORDER BY r.dateline DESC

Zeile 222Zeile 232
			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['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");


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


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

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")
{
$page = intval($mybb->input['page']);

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

	}

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

	}

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

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

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


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


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

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

$query = $db->query("

	}

$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
FROM ".TABLE_PREFIX."reportedposts r
LEFT JOIN ".TABLE_PREFIX."posts p ON (r.pid=p.pid)

		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)

Zeile 329Zeile 352
		while($report = $db->fetch_array($query))
{
$trow = alt_trow();

		while($report = $db->fetch_array($query))
{
$trow = alt_trow();

			
$report['threadlink'] = get_thread_link($report['tid']);


$report['threadlink'] = get_thread_link($report['tid']);


$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 344Zeile 373
			{
$trow = "trow_shaded";
}

			{
$trow = "trow_shaded";
}

			



			// No subject? Set it to N/A
if($report['threadsubject'] == '')
{
$report['threadsubject'] = $lang->na;

			// No subject? Set it to N/A
if($report['threadsubject'] == '')
{
$report['threadsubject'] = $lang->na;

			}

			}

			else
{
// Only parse bad words and sanitize subject if there is one...
$report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));
}

			else
{
// Only parse bad words and sanitize subject if there is one...
$report['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));
}

			



			$report['threadsubject'] = "<a href=\"".get_thread_link($report['tid'])."\" target=\"_blank\">{$report['threadsubject']}</a>";

eval("\$allreports .= \"".$templates->get("modcp_reports_allreport")."\";");

			$report['threadsubject'] = "<a href=\"".get_thread_link($report['tid'])."\" target=\"_blank\">{$report['threadsubject']}</a>";

eval("\$allreports .= \"".$templates->get("modcp_reports_allreport")."\";");

Zeile 412Zeile 441
	{
$order = "desc";
}

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

		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}

		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}

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

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

	}

	}


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


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

Zeile 440Zeile 469
	}

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

	}

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

	{

	{

		$page = 1;
}


		$page = 1;
}


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}
LIMIT {$start}, {$perpage}
");
while($logitem = $db->fetch_array($query))
{

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

		$information = '';
$logitem['action'] = htmlspecialchars_uni($logitem['action']);
$log_date = my_date($mybb->settings['dateformat'], $logitem['dateline']);

		$information = '';
$logitem['action'] = htmlspecialchars_uni($logitem['action']);
$log_date = my_date($mybb->settings['dateformat'], $logitem['dateline']);

Zeile 481Zeile 509
		$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\">{$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'])
{
$information = $lang->sprintf($lang->edited_user_info, htmlspecialchars_uni($data['username']), get_profile_link($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']));

 
			}
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")."\";");
}

	
$plugins->run_hooks("modcp_modlogs_filter");


$plugins->run_hooks("modcp_modlogs_filter");


// Fetch filter options
$sortbysel[$mybb->input['sortby']] = "selected=\"selected\"";


// Fetch filter options
$sortbysel[$mybb->input['sortby']] = "selected=\"selected\"";

Zeile 528Zeile 556
		{
$user['username'] = $lang->na_deleted;
}

		{
$user['username'] = $lang->na_deleted;
}

		



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

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

		{

		{

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

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

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

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

}


}


if($mybb->input['action'] == "do_delete_announcement")
{
verify_post_check($mybb->input['my_post_key']);


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


	$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();
}


	$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 575Zeile 604

$announcement = $db->fetch_array($query);
$announcement['subject'] = htmlspecialchars_uni($announcement['subject']);


$announcement = $db->fetch_array($query);
$announcement['subject'] = htmlspecialchars_uni($announcement['subject']);


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(!$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();
}


	$plugins->run_hooks("modcp_delete_announcement");

eval("\$announcements = \"".$templates->get("modcp_announcements_delete")."\";");

	$plugins->run_hooks("modcp_delete_announcement");

eval("\$announcements = \"".$templates->get("modcp_announcements_delete")."\";");

Zeile 598Zeile 627

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


$announcement_fid = intval($mybb->input['fid']);
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(!trim($mybb->input['title']))
{
$errors[] = $lang->error_missing_title;

		error_no_permission();
}

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

	}


	}


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

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

	}


	}


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

	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 634Zeile 663
	if(stristr($mybb->input['endtime_time'], "pm"))
{
$enddate[0] = 12+$enddate[0];

	if(stristr($mybb->input['endtime_time'], "pm"))
{
$enddate[0] = 12+$enddate[0];

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

$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');

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

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

	if(!in_array($mybb->input['starttime_month'], $months))
{
$mybb->input['starttime_month'] = 1;

Zeile 653Zeile 682
	}

if($mybb->input['endtime_type'] == "2")

	}

if($mybb->input['endtime_type'] == "2")

	{

	{

		$enddate = '0';
}
else

		$enddate = '0';
}
else

Zeile 666Zeile 695
		if(!checkdate(intval($mybb->input['endtime_month']), intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year'])) || $enddate < 0 || $enddate == false)
{
$errors[] = $lang->error_invalid_end_date;

		if(!checkdate(intval($mybb->input['endtime_month']), intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year'])) || $enddate < 0 || $enddate == false)
{
$errors[] = $lang->error_invalid_end_date;

		}

		}

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

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

	
$plugins->run_hooks("modcp_do_new_announcement_start");


$plugins->run_hooks("modcp_do_new_announcement_start");


if(!$errors)
{


if(!$errors)
{

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

		



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

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

	}

	}

	else
{
$mybb->input['action'] = 'new_announcement';

	else
{
$mybb->input['action'] = 'new_announcement';

Zeile 713Zeile 743
	{
error_no_permission();
}

	{
error_no_permission();
}





	// Deal with inline errors
if(is_array($errors))
{
$errors = inline_error($errors);

	// Deal with inline errors
if(is_array($errors))
{
$errors = inline_error($errors);

		



		// Set $announcement to input stuff
$announcement['subject'] = $mybb->input['title'];
$announcement['message'] = $mybb->input['message'];
$announcement['allowhtml'] = $mybb->input['allowhtml'];
$announcement['allowmycode'] = $mybb->input['allowmycode'];
$announcement['allowsmilies'] = $mybb->input['allowsmilies'];

		// Set $announcement to input stuff
$announcement['subject'] = $mybb->input['title'];
$announcement['message'] = $mybb->input['message'];
$announcement['allowhtml'] = $mybb->input['allowhtml'];
$announcement['allowmycode'] = $mybb->input['allowmycode'];
$announcement['allowsmilies'] = $mybb->input['allowsmilies'];

		
$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');


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

		if(!in_array($mybb->input['starttime_month'], $months))
{
$mybb->input['starttime_month'] = 1;

		}


		}


		if(!in_array($mybb->input['endtime_month'], $months))
{
$mybb->input['endtime_month'] = 1;
}

		if(!in_array($mybb->input['endtime_month'], $months))
{
$mybb->input['endtime_month'] = 1;
}

		



		$startmonth = $mybb->input['starttime_month'];
$startdateyear = htmlspecialchars_uni($mybb->input['starttime_year']);
$startday = intval($mybb->input['starttime_day']);

		$startmonth = $mybb->input['starttime_month'];
$startdateyear = htmlspecialchars_uni($mybb->input['starttime_year']);
$startday = intval($mybb->input['starttime_day']);

Zeile 852Zeile 882
	// MyCode editor
$codebuttons = build_mycode_inserter();
$smilieinserter = build_clickable_smilies();

	// MyCode editor
$codebuttons = build_mycode_inserter();
$smilieinserter = build_clickable_smilies();

	



	$plugins->run_hooks("modcp_new_announcement");

eval("\$announcements = \"".$templates->get("modcp_announcements_new")."\";");
output_page($announcements);
}

	$plugins->run_hooks("modcp_new_announcement");

eval("\$announcements = \"".$templates->get("modcp_announcements_new")."\";");
output_page($announcements);
}





if($mybb->input['action'] == "do_edit_announcement")
{
verify_post_check($mybb->input['my_post_key']);

if($mybb->input['action'] == "do_edit_announcement")
{
verify_post_check($mybb->input['my_post_key']);

Zeile 878Zeile 908
	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();

	}

	}


// Basic error checking
if(!trim($mybb->input['title']))
{
$errors[] = $lang->error_missing_title;


// Basic error checking
if(!trim($mybb->input['title']))
{
$errors[] = $lang->error_missing_title;

	}

	}


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


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

Zeile 895Zeile 925
	{
$errors[] = $lang->error_missing_forum;
}

	{
$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 911Zeile 941
	}

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] = "00";

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

		}
}

$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');

		}
}

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

	if(!in_array($mybb->input['starttime_month'], $months))
{
$mybb->input['starttime_month'] = 1;

Zeile 932Zeile 962
	}

if($mybb->input['endtime_type'] == "2")

	}

if($mybb->input['endtime_type'] == "2")

	{

	{

		$enddate = '0';
}
else

		$enddate = '0';
}
else

	{		

	{

		if(!in_array($mybb->input['endtime_month'], $months))
{
$mybb->input['endtime_month'] = 1;

		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(!checkdate(intval($mybb->input['endtime_month']), intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year'])) || $enddate < 0 || $enddate == false)
{

		$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(!checkdate(intval($mybb->input['endtime_month']), intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year'])) || $enddate < 0 || $enddate == false)
{

Zeile 951Zeile 981
			$errors[] = $lang->error_end_before_start;
}
}

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

	



	$plugins->run_hooks("modcp_do_edit_announcement_start");

// Proceed to update if no errors

	$plugins->run_hooks("modcp_do_edit_announcement_start");

// Proceed to update if no errors

Zeile 967Zeile 997
			'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']),
);





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

		



		$cache->update_forumsdisplay();
redirect("modcp.php?action=announcements", $lang->redirect_edit_announcement);
}
else

		$cache->update_forumsdisplay();
redirect("modcp.php?action=announcements", $lang->redirect_edit_announcement);
}
else

	{

	{

		$mybb->input['action'] = 'edit_announcement';
}
}

		$mybb->input['action'] = 'edit_announcement';
}
}

Zeile 1020Zeile 1052

// No end date? Make it a year from now.
$announcement['enddate'] = $makeshift_time + (60 * 60 * 24 * 366);


// No end date? Make it a year from now.
$announcement['enddate'] = $makeshift_time + (60 * 60 * 24 * 366);

	}


	}


	// Deal with inline errors
if(is_array($errors))
{
$errors = inline_error($errors);

	// Deal with inline errors
if(is_array($errors))
{
$errors = inline_error($errors);





		// Set $announcement to input stuff
$announcement['subject'] = $mybb->input['title'];
$announcement['message'] = $mybb->input['message'];
$announcement['allowhtml'] = $mybb->input['allowhtml'];
$announcement['allowmycode'] = $mybb->input['allowmycode'];
$announcement['allowsmilies'] = $mybb->input['allowsmilies'];

		// Set $announcement to input stuff
$announcement['subject'] = $mybb->input['title'];
$announcement['message'] = $mybb->input['message'];
$announcement['allowhtml'] = $mybb->input['allowhtml'];
$announcement['allowmycode'] = $mybb->input['allowmycode'];
$announcement['allowsmilies'] = $mybb->input['allowsmilies'];

		
$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');


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

		if(!in_array($mybb->input['starttime_month'], $months))
{
$mybb->input['starttime_month'] = 1;

		}


		}


		if(!in_array($mybb->input['endtime_month'], $months))
{
$mybb->input['endtime_month'] = 1;
}

		if(!in_array($mybb->input['endtime_month'], $months))
{
$mybb->input['endtime_month'] = 1;
}

		



		$startmonth = $mybb->input['starttime_month'];
$startdateyear = htmlspecialchars_uni($mybb->input['starttime_year']);
$startday = intval($mybb->input['starttime_day']);

		$startmonth = $mybb->input['starttime_month'];
$startdateyear = htmlspecialchars_uni($mybb->input['starttime_year']);
$startday = intval($mybb->input['starttime_day']);

Zeile 1168Zeile 1200
	// MyCode editor
$codebuttons = build_mycode_inserter();
$smilieinserter = build_clickable_smilies();

	// MyCode editor
$codebuttons = build_mycode_inserter();
$smilieinserter = build_clickable_smilies();

	



	$plugins->run_hooks("modcp_edit_announcement");

eval("\$announcements = \"".$templates->get("modcp_announcements_edit")."\";");

	$plugins->run_hooks("modcp_edit_announcement");

eval("\$announcements = \"".$templates->get("modcp_announcements_edit")."\";");

Zeile 1232Zeile 1264
	{
eval("\$announcements_forum = \"".$templates->get("modcp_no_announcements_forum")."\";");
}

	{
eval("\$announcements_forum = \"".$templates->get("modcp_no_announcements_forum")."\";");
}

	



	$plugins->run_hooks("modcp_announcements");

	$plugins->run_hooks("modcp_announcements");

	



	eval("\$announcements = \"".$templates->get("modcp_announcements")."\";");
output_page($announcements);

	eval("\$announcements = \"".$templates->get("modcp_announcements")."\";");
output_page($announcements);

}

}


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


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

Zeile 1246Zeile 1278

// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

	
$plugins->run_hooks("modcp_do_modqueue_start");


$plugins->run_hooks("modcp_do_modqueue_start");


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


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

Zeile 1263Zeile 1295
			else if($action == "delete")
{
$threads_to_delete[] = $thread['tid'];

			else if($action == "delete")
{
$threads_to_delete[] = $thread['tid'];

			}

			}

		}
if(!empty($threads_to_approve))
{

		}
if(!empty($threads_to_approve))
{

Zeile 1278Zeile 1310
			}
log_moderator_action(array('tids' => $threads_to_delete), $lang->multi_delete_threads);
}

			}
log_moderator_action(array('tids' => $threads_to_delete), $lang->multi_delete_threads);
}

		



		$plugins->run_hooks("modcp_do_modqueue_end");

		$plugins->run_hooks("modcp_do_modqueue_end");

		



		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 1304Zeile 1336
			$moderation->approve_posts($posts_to_approve);
}
log_moderator_action(array('pids' => $posts_to_approve), $lang->multi_approve_posts);

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

		



		$plugins->run_hooks("modcp_do_modqueue_end");

		$plugins->run_hooks("modcp_do_modqueue_end");

		



		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 1330Zeile 1362
				remove_attachment($attachment['pid'], '', $attachment['aid']);
}
}

				remove_attachment($attachment['pid'], '', $attachment['aid']);
}
}

		



		$plugins->run_hooks("modcp_do_modqueue_end");

		$plugins->run_hooks("modcp_do_modqueue_end");

		



		redirect("modcp.php?action=modqueue&type=attachments", $lang->redirect_attachmentsmoderated);
}
}

		redirect("modcp.php?action=modqueue&type=attachments", $lang->redirect_attachmentsmoderated);
}
}

Zeile 1345Zeile 1377

$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.
if($mybb->input['page'] != "last")
{


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

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

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

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

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





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

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

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

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

		{

		{

			$page = 1;
}


			$page = 1;
}


Zeile 1374Zeile 1406
		{
$start = 0;
$page = 1;

		{
$start = 0;
$page = 1;

		}


		}


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

$query = $db->query("

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

$query = $db->query("

			SELECT t.tid, t.dateline, t.fid, t.subject, p.message AS postmessage, u.username AS username, t.uid

			SELECT t.tid, t.dateline, t.fid, t.subject, t.username AS threadusername, p.message AS postmessage, u.username AS username, t.uid

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

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

Zeile 1396Zeile 1428
			$forum_name = $forum_cache[$thread['fid']]['name'];
$threaddate = my_date($mybb->settings['dateformat'], $thread['dateline']);
$threadtime = my_date($mybb->settings['timeformat'], $thread['dateline']);

			$forum_name = $forum_cache[$thread['fid']]['name'];
$threaddate = my_date($mybb->settings['dateformat'], $thread['dateline']);
$threadtime = my_date($mybb->settings['timeformat'], $thread['dateline']);

			$profile_link = build_profile_link($thread['username'], $thread['uid']);


















if($thread['username'] == "")
{
if($thread['threadusername'] != "")
{
$profile_link = $thread['threadusername'];
}
else
{
$profile_link = $lang->guest;
}
}
else
{
$profile_link = build_profile_link($thread['username'], $thread['uid']);
}


			$thread['postmessage'] = nl2br(htmlspecialchars_uni($thread['postmessage']));
$forum = "<strong>{$lang->meta_forum} <a href=\"{$thread['forumlink']}\">{$forum_name}</a></strong>";
eval("\$threads .= \"".$templates->get("modcp_modqueue_threads_thread")."\";");
}

if(!$threads && $mybb->input['type'] == "threads")

			$thread['postmessage'] = nl2br(htmlspecialchars_uni($thread['postmessage']));
$forum = "<strong>{$lang->meta_forum} <a href=\"{$thread['forumlink']}\">{$forum_name}</a></strong>";
eval("\$threads .= \"".$templates->get("modcp_modqueue_threads_thread")."\";");
}

if(!$threads && $mybb->input['type'] == "threads")

		{

		{

			eval("\$threads = \"".$templates->get("modcp_modqueue_threads_empty")."\";");
}

if($threads)
{
add_breadcrumb($lang->mcp_nav_modqueue_threads, "modcp.php?action=modqueue&amp;type=threads");

			eval("\$threads = \"".$templates->get("modcp_modqueue_threads_empty")."\";");
}

if($threads)
{
add_breadcrumb($lang->mcp_nav_modqueue_threads, "modcp.php?action=modqueue&amp;type=threads");

			



			$plugins->run_hooks("modcp_modqueue_threads_end");

			$plugins->run_hooks("modcp_modqueue_threads_end");

			



			eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";");
eval("\$threadqueue = \"".$templates->get("modcp_modqueue_threads")."\";");
output_page($threadqueue);

			eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";");
eval("\$threadqueue = \"".$templates->get("modcp_modqueue_threads")."\";");
output_page($threadqueue);

		}

		}

		$type = 'threads';
}


		$type = 'threads';
}


Zeile 1440Zeile 1488

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


$perpage = $mybb->settings['postsperpage'];
$pages = $unapproved_posts / $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
{

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

			$start = 0;
$page = 1;

		}

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

$query = $db->query("
SELECT p.pid, p.subject, p.message, t.subject AS threadsubject, t.tid, u.username, p.uid, t.fid, p.dateline

		}

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

$query = $db->query("
SELECT p.pid, p.subject, p.message, p.username AS postusername, t.subject AS threadsubject, t.tid, u.username, p.uid, t.fid, p.dateline

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

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

Zeile 1483Zeile 1531
			$forum_name = $forum_cache[$post['fid']]['name'];
$postdate = my_date($mybb->settings['dateformat'], $post['dateline']);
$posttime = my_date($mybb->settings['timeformat'], $post['dateline']);

			$forum_name = $forum_cache[$post['fid']]['name'];
$postdate = my_date($mybb->settings['dateformat'], $post['dateline']);
$posttime = my_date($mybb->settings['timeformat'], $post['dateline']);

			$profile_link = build_profile_link($post['username'], $post['uid']);


















if($post['username'] == "")
{
if($post['postusername'] != "")
{
$profile_link = $post['postusername'];
}
else
{
$profile_link = $lang->guest;
}
}
else
{
$profile_link = build_profile_link($post['username'], $post['uid']);
}


			$thread = "<strong>{$lang->meta_thread} <a href=\"{$post['threadlink']}\">{$post['threadsubject']}</a></strong>";
$forum = "<strong>{$lang->meta_forum} <a href=\"{$post['forumlink']}\">{$forum_name}</a></strong><br />";
$post['message'] = nl2br(htmlspecialchars_uni($post['message']));

			$thread = "<strong>{$lang->meta_thread} <a href=\"{$post['threadlink']}\">{$post['threadsubject']}</a></strong>";
$forum = "<strong>{$lang->meta_forum} <a href=\"{$post['forumlink']}\">{$forum_name}</a></strong><br />";
$post['message'] = nl2br(htmlspecialchars_uni($post['message']));

Zeile 1498Zeile 1562
		if($posts)
{
add_breadcrumb($lang->mcp_nav_modqueue_posts, "modcp.php?action=modqueue&amp;type=posts");

		if($posts)
{
add_breadcrumb($lang->mcp_nav_modqueue_posts, "modcp.php?action=modqueue&amp;type=posts");

			



			$plugins->run_hooks("modcp_modqueue_posts_end");

			$plugins->run_hooks("modcp_modqueue_posts_end");

			



			eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";");
eval("\$postqueue = \"".$templates->get("modcp_modqueue_posts")."\";");
output_page($postqueue);

			eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";");
eval("\$postqueue = \"".$templates->get("modcp_modqueue_posts")."\";");
output_page($postqueue);

Zeile 1511Zeile 1575
	{
$query = $db->query("
SELECT COUNT(aid) AS unapprovedattachments

	{
$query = $db->query("
SELECT COUNT(aid) AS unapprovedattachments

			FROM  ".TABLE_PREFIX."attachments a
LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=a.pid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)

			FROM  ".TABLE_PREFIX."attachments a
LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=a.pid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)

			WHERE a.visible='0' {$tflist}
");
$unapproved_attachments = $db->fetch_field($query, "unapprovedattachments");

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

			WHERE a.visible='0' {$tflist}
");
$unapproved_attachments = $db->fetch_field($query, "unapprovedattachments");

// 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 1539Zeile 1603
		}

if($page)

		}

if($page)

		{

		{

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

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

Zeile 1565Zeile 1629
			$altbg = alt_trow();

if(!$attachment['dateuploaded'])

			$altbg = alt_trow();

if(!$attachment['dateuploaded'])

			{

			{

				$attachment['dateuploaded'] = $attachment['dateline'];
}

				$attachment['dateuploaded'] = $attachment['dateline'];
}

			



			$attachdate = my_date($mybb->settings['dateformat'], $attachment['dateuploaded']);
$attachtime = my_date($mybb->settings['timeformat'], $attachment['dateuploaded']);

			$attachdate = my_date($mybb->settings['dateformat'], $attachment['dateuploaded']);
$attachtime = my_date($mybb->settings['timeformat'], $attachment['dateuploaded']);





			$attachment['postsubject'] = htmlspecialchars_uni($attachment['postsubject']);
$attachment['filename'] = htmlspecialchars_uni($attachment['filename']);
$attachment['threadsubject'] = htmlspecialchars_uni($attachment['threadsubject']);
$attachment['filesize'] = get_friendly_size($attachment['filesize']);

			$attachment['postsubject'] = htmlspecialchars_uni($attachment['postsubject']);
$attachment['filename'] = htmlspecialchars_uni($attachment['filename']);
$attachment['threadsubject'] = htmlspecialchars_uni($attachment['threadsubject']);
$attachment['filesize'] = get_friendly_size($attachment['filesize']);





			$link = get_post_link($attachment['pid'], $attachment['tid']) . "#pid{$attachment['pid']}";
$thread_link = get_thread_link($attachment['tid']);
$profile_link = build_profile_link($attachment['username'], $attachment['uid']);

			$link = get_post_link($attachment['pid'], $attachment['tid']) . "#pid{$attachment['pid']}";
$thread_link = get_thread_link($attachment['tid']);
$profile_link = build_profile_link($attachment['username'], $attachment['uid']);





			eval("\$attachments .= \"".$templates->get("modcp_modqueue_attachments_attachment")."\";");
}

if(!$attachments && $mybb->input['type'] == "attachments")

			eval("\$attachments .= \"".$templates->get("modcp_modqueue_attachments_attachment")."\";");
}

if(!$attachments && $mybb->input['type'] == "attachments")

		{

		{

			eval("\$attachments = \"".$templates->get("modcp_modqueue_attachments_empty")."\";");
}

if($attachments)
{
add_breadcrumb($lang->mcp_nav_modqueue_attachments, "modcp.php?action=modqueue&amp;type=attachments");

			eval("\$attachments = \"".$templates->get("modcp_modqueue_attachments_empty")."\";");
}

if($attachments)
{
add_breadcrumb($lang->mcp_nav_modqueue_attachments, "modcp.php?action=modqueue&amp;type=attachments");

			



			$plugins->run_hooks("modcp_modqueue_attachments_end");

			$plugins->run_hooks("modcp_modqueue_attachments_end");

			



			eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";");
eval("\$attachmentqueue = \"".$templates->get("modcp_modqueue_attachments")."\";");
output_page($attachmentqueue);

			eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";");
eval("\$attachmentqueue = \"".$templates->get("modcp_modqueue_attachments")."\";");
output_page($attachmentqueue);

Zeile 1605Zeile 1669
	if(!$threadqueue && !$postqueue && !$attachmentqueue)
{
add_breadcrumb($lang->mcp_nav_modqueue, "modcp.php?action=modqueue");

	if(!$threadqueue && !$postqueue && !$attachmentqueue)
{
add_breadcrumb($lang->mcp_nav_modqueue, "modcp.php?action=modqueue");

		



		$plugins->run_hooks("modcp_modqueue_end");

		$plugins->run_hooks("modcp_modqueue_end");

		



		eval("\$queue = \"".$templates->get("modcp_modqueue_empty")."\";");
output_page($queue);
}

		eval("\$queue = \"".$templates->get("modcp_modqueue_empty")."\";");
output_page($queue);
}

Zeile 1621Zeile 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 1629Zeile 1693
	{
error_no_permission();
}

	{
error_no_permission();
}

	



	$plugins->run_hooks("modcp_do_editprofile_start");

// Set up user handler.

	$plugins->run_hooks("modcp_do_editprofile_start");

// Set up user handler.

Zeile 1729Zeile 1793
					// We're revoking the suspension
$extra_user_updates[$option['update_field']] = 0;
$extra_user_updates[$option['update_length']] = 0;

					// We're revoking the suspension
$extra_user_updates[$option['update_field']] = 0;
$extra_user_updates[$option['update_length']] = 0;

				}

				}


// Skip this option if we haven't selected it
continue;


// Skip this option if we haven't selected it
continue;

Zeile 1742Zeile 1806
					// User has selected a type of ban, but not entered a valid time frame
$string = $option['action']."_error";
$errors[] = $lang->$string;

					// User has selected a type of ban, but not entered a valid time frame
$string = $option['action']."_error";
$errors[] = $lang->$string;

				}


				}


				if(!is_array($errors))
{
$suspend_length = fetch_time_length(intval($mybb->input[$option['time']]), $mybb->input[$option['period']]);

if($user[$option['update_field']] == 1 && ($mybb->input[$option['time']] || $mybb->input[$option['period']] == "never"))

				if(!is_array($errors))
{
$suspend_length = fetch_time_length(intval($mybb->input[$option['time']]), $mybb->input[$option['period']]);

if($user[$option['update_field']] == 1 && ($mybb->input[$option['time']] || $mybb->input[$option['period']] == "never"))

					{

					{

						// We already have a suspension, but entered a new time
if($suspend_length == "-1")
{
// Permanent ban on action

						// We already have a suspension, but entered a new time
if($suspend_length == "-1")
{
// Permanent ban on action

							$extra_user_updates[$option['update_length']] = 0;
}

							$extra_user_updates[$option['update_length']] = 0;
}

						elseif($suspend_length && $suspend_length != "-1")
{
// Temporary ban on action

						elseif($suspend_length && $suspend_length != "-1")
{
// Temporary ban on action

Zeile 1765Zeile 1829
					elseif(!$user[$option['update_field']])
{
// New suspension for this user... bad user!

					elseif(!$user[$option['update_field']])
{
// New suspension for this user... bad user!

						$extra_user_updates[$option['update_field']] = 1;				

						$extra_user_updates[$option['update_field']] = 1;

						if($suspend_length == "-1")
{
$extra_user_updates[$option['update_length']] = 0;

						if($suspend_length == "-1")
{
$extra_user_updates[$option['update_length']] = 0;

						}

						}

						else
{
$extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length;

						else
{
$extra_user_updates[$option['update_length']] = TIME_NOW + $suspend_length;

Zeile 1782Zeile 1846
		// Those with javascript turned off will be able to select both - cheeky!
// Check to make sure we're not moderating AND suspending posting
if($extra_user_updates['moderateposts'] && $extra_user_updates['suspendposting'])

		// Those with javascript turned off will be able to select both - cheeky!
// Check to make sure we're not moderating AND suspending posting
if($extra_user_updates['moderateposts'] && $extra_user_updates['suspendposting'])

		{

		{

			$errors[] = $lang->suspendmoderate_error;

			$errors[] = $lang->suspendmoderate_error;

		}

		}


if(is_array($errors))
{


if(is_array($errors))
{

Zeile 1793Zeile 1857
		else
{
$plugins->run_hooks("modcp_do_editprofile_update");

		else
{
$plugins->run_hooks("modcp_do_editprofile_update");

			



			// Continue with the update if there is no errors
$user_info = $userhandler->update_user();
$db->update_query("users", $extra_user_updates, "uid='{$user['uid']}'");
log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->edited_user);

			// Continue with the update if there is no errors
$user_info = $userhandler->update_user();
$db->update_query("users", $extra_user_updates, "uid='{$user['uid']}'");
log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->edited_user);

			



			$plugins->run_hooks("modcp_do_editprofile_end");

			$plugins->run_hooks("modcp_do_editprofile_end");

			



			redirect("modcp.php?action=finduser", $lang->redirect_user_updated);
}
}

			redirect("modcp.php?action=finduser", $lang->redirect_user_updated);
}
}

Zeile 1813Zeile 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 1863Zeile 1927

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


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

		$defaulttitle = $display_group['usertitle'];

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

	}
else
{

	}
else
{

Zeile 1890Zeile 1954
		if($mybb->input['birthday_day'] == $i)
{
$bdaydaysel .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";

		if($mybb->input['birthday_day'] == $i)
{
$bdaydaysel .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";

		}
else

		}
else

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

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

		}

		}

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

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

	



	$plugins->run_hooks("modcp_editprofile_start");

// Fetch profile fields

	$plugins->run_hooks("modcp_editprofile_start");

// Fetch profile fields

Zeile 1910Zeile 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 1925Zeile 1990
			$userfield = $user_fields[$field];
}
if($type == "multiselect")

			$userfield = $user_fields[$field];
}
if($type == "multiselect")

		{
if($errors)
{
$useropts = $userfield;
}
else
{
$useropts = explode("\n", $userfield);
}
if(is_array($useropts))
{
foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;
}
}
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)

		{
if($errors)
{
$useropts = $userfield;
}
else
{
$useropts = explode("\n", $userfield);
}
if(is_array($useropts))
{
foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;
}
}
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)

				{
$val = trim($val);
$val = str_replace("\n", "\\n", $val);

$sel = "";
if($val == $seloptions[$val])

				{
$val = trim($val);
$val = str_replace("\n", "\\n", $val);

$sel = "";
if($val == $seloptions[$val])

					{

					{

						$sel = " selected=\"selected\"";
}
$select .= "<option value=\"$val\"$sel>$val</option>\n";

						$sel = " selected=\"selected\"";
}
$select .= "<option value=\"$val\"$sel>$val</option>\n";

				}
if(!$profilefield['length'])
{

				}
if(!$profilefield['length'])
{

					$profilefield['length'] = 3;
}
$code = "<select name=\"profile_fields[$field][]\" size=\"{$profilefield['length']}\" multiple=\"multiple\">$select</select>";
}
}
elseif($type == "select")

					$profilefield['length'] = 3;
}
$code = "<select name=\"profile_fields[$field][]\" size=\"{$profilefield['length']}\" multiple=\"multiple\">$select</select>";
}
}
elseif($type == "select")

		{

		{

			$expoptions = explode("\n", $options);
if(is_array($expoptions))
{

			$expoptions = explode("\n", $options);
if(is_array($expoptions))
{

Zeile 1995Zeile 2060
				{
$checked = "";
if($val == $userfield)

				{
$checked = "";
if($val == $userfield)

					{
$checked = " checked=\"checked\"";

					{
$checked = " checked=\"checked\"";

					}
$code .= "<input type=\"radio\" class=\"radio\" name=\"profile_fields[$field]\" value=\"$val\"$checked /> <span class=\"smalltext\">$val</span><br />";
}

					}
$code .= "<input type=\"radio\" class=\"radio\" name=\"profile_fields[$field]\" value=\"$val\"$checked /> <span class=\"smalltext\">$val</span><br />";
}

Zeile 2112Zeile 2177
		1 => array(
"action" => "suspendsignature", // The input action for this option
"option" => "suspendsignature", // The field in the database that this option relates to

		1 => array(
"action" => "suspendsignature", // The input action for this option
"option" => "suspendsignature", // The field in the database that this option relates to

 
			"time" => "action_time", // The time we've entered

			"length" => "suspendsigtime", // The length of suspension field in the database
"select_option" => "action" // The name of the select box of this option
),
2 => array(
"action" => "moderateposting",
"option" => "moderateposts",

			"length" => "suspendsigtime", // The length of suspension field in the database
"select_option" => "action" // The name of the select box of this option
),
2 => array(
"action" => "moderateposting",
"option" => "moderateposts",

 
			"time" => "modpost_time",

			"length" => "moderationtime",
"select_option" => "modpost"
),
3 => array(
"action" => "suspendposting",
"option" => "suspendposting",

			"length" => "moderationtime",
"select_option" => "modpost"
),
3 => array(
"action" => "suspendposting",
"option" => "suspendposting",

 
			"time" => "suspost_time",

			"length" => "suspensiontime",
"select_option" => "suspost"
)

			"length" => "suspensiontime",
"select_option" => "suspost"
)

Zeile 2139Zeile 2207

foreach($moderator_options as $option)
{


foreach($moderator_options as $option)
{

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

		// Display the suspension info, if this user has this option suspended
if($user[$option['option']])
{

		// Display the suspension info, if this user has this option suspended
if($user[$option['option']])
{

Zeile 2204Zeile 2273
	}

eval("\$suspend_signature = \"".$templates->get("modcp_editprofile_signature")."\";");

	}

eval("\$suspend_signature = \"".$templates->get("modcp_editprofile_signature")."\";");

	



	$plugins->run_hooks("modcp_editprofile_end");

eval("\$edituser = \"".$templates->get("modcp_editprofile")."\";");

	$plugins->run_hooks("modcp_editprofile_end");

eval("\$edituser = \"".$templates->get("modcp_editprofile")."\";");

Zeile 2214Zeile 2283
if($mybb->input['action'] == "finduser")
{
add_breadcrumb($lang->mcp_nav_users, "modcp.php?action=finduser");

if($mybb->input['action'] == "finduser")
{
add_breadcrumb($lang->mcp_nav_users, "modcp.php?action=finduser");

	



	$perpage = intval($mybb->input['perpage']);
if(!$perpage || $perpage <= 0)
{
$perpage = $mybb->settings['threadsperpage'];
}
$where = '';

	$perpage = intval($mybb->input['perpage']);
if(!$perpage || $perpage <= 0)
{
$perpage = $mybb->settings['threadsperpage'];
}
$where = '';





	if($mybb->input['username'])
{
$where = " AND LOWER(username) LIKE '%".my_strtolower($db->escape_string_like($mybb->input['username']))."%'";

	if($mybb->input['username'])
{
$where = " AND LOWER(username) LIKE '%".my_strtolower($db->escape_string_like($mybb->input['username']))."%'";

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

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

	}


	}


	$query = $db->simple_select("users", "COUNT(uid) AS count", "1=1 {$where}");
$user_count = $db->fetch_field($query, "count");

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

	$query = $db->simple_select("users", "COUNT(uid) AS count", "1=1 {$where}");
$user_count = $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 2266Zeile 2335
	}

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

	}

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

	{

	{

		$page = 1;
}
if($page)

		$page = 1;
}
if($page)

Zeile 2292Zeile 2361
	$multipage = multipage($user_count, $perpage, $page, $page_url);

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

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

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

	



	$plugins->run_hooks("modcp_finduser_start");

// Fetch out results

	$plugins->run_hooks("modcp_finduser_start");

// Fetch out results

Zeile 2306Zeile 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 2315Zeile 2384
	{
eval("\$users = \"".$templates->get("modcp_finduser_noresults")."\";");
}

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

	



	$plugins->run_hooks("modcp_finduser_end");

	$plugins->run_hooks("modcp_finduser_end");





	eval("\$finduser = \"".$templates->get("modcp_finduser")."\";");
output_page($finduser);

	eval("\$finduser = \"".$templates->get("modcp_finduser")."\";");
output_page($finduser);

}


}


if($mybb->input['action'] == "warninglogs")
{
add_breadcrumb($lang->mcp_nav_warninglogs, "modcp.php?action=warninglogs");

if($mybb->input['action'] == "warninglogs")
{
add_breadcrumb($lang->mcp_nav_warninglogs, "modcp.php?action=warninglogs");

Zeile 2364Zeile 2433
	}
if($mybb->input['filter']['reason'])
{

	}
if($mybb->input['filter']['reason'])
{

		$search['reason'] = $db->escape_string($mybb->input['filter']['reason']);

		$search['reason'] = $db->escape_string_like($mybb->input['filter']['reason']);

		$where_sql .= " AND (w.notes LIKE '%{$search['reason']}%' OR t.title LIKE '%{$search['reason']}%' OR w.title LIKE '%{$search['reason']}%')";
$mybb->input['filter']['reason'] = htmlspecialchars_uni($mybb->input['filter']['reason']);
}

		$where_sql .= " AND (w.notes LIKE '%{$search['reason']}%' OR t.title LIKE '%{$search['reason']}%' OR w.title LIKE '%{$search['reason']}%')";
$mybb->input['filter']['reason'] = htmlspecialchars_uni($mybb->input['filter']['reason']);
}

Zeile 2398Zeile 2467
	{
$ordersel['asc'] = ' selected="selected"';
}

	{
$ordersel['asc'] = ' selected="selected"';
}

	



	$plugins->run_hooks("modcp_warninglogs_start");

// Pagination stuff

	$plugins->run_hooks("modcp_warninglogs_start");

// Pagination stuff

Zeile 2416Zeile 2485
	if(isset($mybb->input['page']) && intval($mybb->input['page']) > 0)
{
$page = intval($mybb->input['page']);

	if(isset($mybb->input['page']) && intval($mybb->input['page']) > 0)
{
$page = intval($mybb->input['page']);

	}

	}

	$per_page = 20;
if(isset($mybb->input['filter']['per_page']) && intval($mybb->input['filter']['per_page']) > 0)
{

	$per_page = 20;
if(isset($mybb->input['filter']['per_page']) && intval($mybb->input['filter']['per_page']) > 0)
{

Zeile 2426Zeile 2495
	// Build the base URL for pagination links
$url = 'modcp.php?action=warninglogs';
if(is_array($mybb->input['filter']) && count($mybb->input['filter']))

	// Build the base URL for pagination links
$url = 'modcp.php?action=warninglogs';
if(is_array($mybb->input['filter']) && count($mybb->input['filter']))

	{

	{

		foreach($mybb->input['filter'] as $field => $value)
{
$value = urlencode($value);

		foreach($mybb->input['filter'] as $field => $value)
{
$value = urlencode($value);

Zeile 2495Zeile 2564
	{
eval("\$warning_list = \"".$templates->get("modcp_warninglogs_nologs")."\";");
}

	{
eval("\$warning_list = \"".$templates->get("modcp_warninglogs_nologs")."\";");
}

	



	$plugins->run_hooks("modcp_warninglogs_end");

eval("\$warninglogs = \"".$templates->get("modcp_warninglogs")."\";");

	$plugins->run_hooks("modcp_warninglogs_end");

eval("\$warninglogs = \"".$templates->get("modcp_warninglogs")."\";");

Zeile 2514Zeile 2583
		}

$ipaddressvalue = htmlspecialchars_uni($mybb->input['ipaddress']);

		}

$ipaddressvalue = htmlspecialchars_uni($mybb->input['ipaddress']);





		// Searching post IP addresses
if($mybb->input['search_posts'])
{

		// Searching post IP addresses
if($mybb->input['search_posts'])
{

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

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

				



				if($ip_range)
{
if(!is_array($ip_range))

				if($ip_range)
{
if(!is_array($ip_range))

Zeile 2547Zeile 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 2634Zeile 2703
		{
$start = 0;
$page = 1;

		{
$start = 0;
$page = 1;

		}


		}


		$page_url = "modcp.php?action=ipsearch&amp;perpage={$perpage}";
foreach(array('ipaddress', 'search_users', 'search_posts') as $input)
{

		$page_url = "modcp.php?action=ipsearch&amp;perpage={$perpage}";
foreach(array('ipaddress', 'search_users', 'search_posts') as $input)
{

Zeile 2698Zeile 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 2708Zeile 2777
				$uids[$ipaddress['uid']] = $ipaddress['pid'];
$ipaddresses[$ipaddress['pid']] = $ipaddress;
}

				$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))
{
$ipaddresses[$tids[$thread['tid']]]['threadsubject'] = $thread['subject'];

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

				}

				}

				unset($tids);

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

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

				foreach($ipaddresses as $ipaddress)
{
$ip = $ipaddress['ipaddress'];

Zeile 2753Zeile 2822
		{
$lang->ipsearch_results = $lang->ipsearch;
}

		{
$lang->ipsearch_results = $lang->ipsearch;
}

		



		if(!strstr($mybb->input['ipaddress'], "*") && !strstr($mybb->input['ipaddress'], ":"))
{
$misc_info_link = "<div class=\"float_right\">(<a href=\"modcp.php?action=iplookup&ipaddress=".htmlspecialchars_uni($mybb->input['ipaddress'])."\" onclick=\"MyBB.popupWindow('{$mybb->settings['bburl']}/modcp.php?action=iplookup&ipaddress=".urlencode($mybb->input['ipaddress'])."', 'iplookup', 500, 250); return false;\">{$lang->info_on_ip}</a>)</div>";

		if(!strstr($mybb->input['ipaddress'], "*") && !strstr($mybb->input['ipaddress'], ":"))
{
$misc_info_link = "<div class=\"float_right\">(<a href=\"modcp.php?action=iplookup&ipaddress=".htmlspecialchars_uni($mybb->input['ipaddress'])."\" onclick=\"MyBB.popupWindow('{$mybb->settings['bburl']}/modcp.php?action=iplookup&ipaddress=".urlencode($mybb->input['ipaddress'])."', 'iplookup', 500, 250); return false;\">{$lang->info_on_ip}</a>)</div>";

Zeile 2764Zeile 2833

// Fetch filter options
if(!$mybb->input['ipaddress'])


// Fetch filter options
if(!$mybb->input['ipaddress'])

	{

	{

		$mybb->input['search_posts'] = 1;
$mybb->input['search_users'] = 1;
}
if($mybb->input['search_posts'])

		$mybb->input['search_posts'] = 1;
$mybb->input['search_users'] = 1;
}
if($mybb->input['search_posts'])

	{

	{

		$postsearchselect = "checked=\"checked\"";
}
if($mybb->input['search_users'])
{
$usersearchselect = "checked=\"checked\"";
}

		$postsearchselect = "checked=\"checked\"";
}
if($mybb->input['search_users'])
{
$usersearchselect = "checked=\"checked\"";
}

	



	$plugins->run_hooks("modcp_ipsearch_end");

eval("\$ipsearch = \"".$templates->get("modcp_ipsearch")."\";");

	$plugins->run_hooks("modcp_ipsearch_end");

eval("\$ipsearch = \"".$templates->get("modcp_ipsearch")."\";");

Zeile 2796Zeile 2865
		{
$ip_record = @geoip_record_by_name($mybb->input['ipaddress']);
if($ip_record)

		{
$ip_record = @geoip_record_by_name($mybb->input['ipaddress']);
if($ip_record)

			{
$ipaddress_location = htmlspecialchars_uni($ip_record['country_name']);

			{
$ipaddress_location = htmlspecialchars_uni(utf8_encode($ip_record['country_name']));

				if($ip_record['city'])
{

				if($ip_record['city'])
{

					$ipaddress_location .= $lang->comma.htmlspecialchars_uni($ip_record['city']);

					$ipaddress_location .= $lang->comma.htmlspecialchars_uni(utf8_encode($ip_record['city']));

				}
}

				}
}

		}


		}


		$ipaddress_host_name = htmlspecialchars_uni(@gethostbyaddr($mybb->input['ipaddress']));

		$ipaddress_host_name = htmlspecialchars_uni(@gethostbyaddr($mybb->input['ipaddress']));

		



		// gethostbyaddr returns the same ip on failure
if($ipaddress_host_name == $mybb->input['ipaddress'])
{
$ipaddress_host_name = $lang->na;
}
}

		// gethostbyaddr returns the same ip on failure
if($ipaddress_host_name == $mybb->input['ipaddress'])
{
$ipaddress_host_name = $lang->na;
}
}

	



	$plugins->run_hooks("modcp_iplookup_end");

	$plugins->run_hooks("modcp_iplookup_end");

	



	eval("\$iplookup = \"".$templates->get('modcp_ipsearch_misc_info')."\";");
output_page($iplookup);
}

	eval("\$iplookup = \"".$templates->get('modcp_ipsearch_misc_info')."\";");
output_page($iplookup);
}

Zeile 2869Zeile 2938
	{
eval("\$allbannedpages = \"".$templates->get("modcp_banning_multipage")."\";");
}

	{
eval("\$allbannedpages = \"".$templates->get("modcp_banning_multipage")."\";");
}

	



	$plugins->run_hooks("modcp_banning_start");

$query = $db->query("

	$plugins->run_hooks("modcp_banning_start");

$query = $db->query("

Zeile 2956Zeile 3025
	verify_post_check($mybb->input['my_post_key']);

$query = $db->simple_select("banned", "*", "uid='".intval($mybb->input['uid'])."'");

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

$query = $db->simple_select("banned", "*", "uid='".intval($mybb->input['uid'])."'");

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


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


	if(!$ban['uid'])
{
error($lang->error_invalidban);

	if(!$ban['uid'])
{
error($lang->error_invalidban);

Zeile 2968Zeile 3037
	{
error_no_permission();
}

	{
error_no_permission();
}

	



	$plugins->run_hooks("modcp_liftban_start");

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

	$plugins->run_hooks("modcp_liftban_start");

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

Zeile 2985Zeile 3054
	$cache->update_banned();
$cache->update_moderators();
log_moderator_action(array("uid" => $ban['uid'], "username" => $username), $lang->lifted_ban);

	$cache->update_banned();
$cache->update_moderators();
log_moderator_action(array("uid" => $ban['uid'], "username" => $username), $lang->lifted_ban);

	



	$plugins->run_hooks("modcp_liftban_end");

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

	$plugins->run_hooks("modcp_liftban_end");

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

Zeile 3010Zeile 3079
		if(!$user['uid'])
{
error($lang->error_invalidban);

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

		}


		}


		// Permission to edit this ban?
if($mybb->user['uid'] != $user['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1)
{

		// Permission to edit this ban?
if($mybb->user['uid'] != $user['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1)
{

Zeile 3031Zeile 3100
	}

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

	}

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

	{

	{

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

// Have permissions to ban this user?
if(!modcp_can_manage_user($user['uid']))

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

// Have permissions to ban this user?
if(!modcp_can_manage_user($user['uid']))

	{

	{

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

// Check for an incoming reason
if(!$mybb->input['banreason'])

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

// Check for an incoming reason
if(!$mybb->input['banreason'])

	{

	{

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

// Check banned group
$query = $db->simple_select("usergroups", "gid", "isbannedgroup=1 AND gid='".intval($mybb->input['usergroup'])."'");
if(!$db->fetch_field($query, "gid"))

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

// Check banned group
$query = $db->simple_select("usergroups", "gid", "isbannedgroup=1 AND gid='".intval($mybb->input['usergroup'])."'");
if(!$db->fetch_field($query, "gid"))

	{

	{

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


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


Zeile 3063Zeile 3132
			$errors[] = $lang->error_useralreadybanned;
}
}

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

	



	$plugins->run_hooks("modcp_do_banuser_start");

// Still no errors? Ban the user

	$plugins->run_hooks("modcp_do_banuser_start");

// Still no errors? Ban the user

Zeile 3131Zeile 3200
		{
log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->banned_user);
}

		{
log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->banned_user);
}

		



		$plugins->run_hooks("modcp_do_banuser_end");

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

		$plugins->run_hooks("modcp_do_banuser_end");

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

		{

		{

			redirect("modcp.php?action=banning", $lang->redirect_banuser_updated);
}
else

			redirect("modcp.php?action=banning", $lang->redirect_banuser_updated);
}
else

Zeile 3162Zeile 3231
	{
add_breadcrumb($lang->mcp_nav_editing_ban);
}

	{
add_breadcrumb($lang->mcp_nav_editing_ban);
}

	



	$plugins->run_hooks("modcp_banuser_start");

// If incoming user ID, we are editing a ban

	$plugins->run_hooks("modcp_banuser_start");

// If incoming user ID, we are editing a ban

Zeile 3185Zeile 3254
			eval("\$banuser_username = \"".$templates->get("modcp_banuser_editusername")."\";");
}
}

			eval("\$banuser_username = \"".$templates->get("modcp_banuser_editusername")."\";");
}
}

	



	// New ban!
if(!$banuser_username)
{
if($mybb->input['uid'])

	// New ban!
if(!$banuser_username)
{
if($mybb->input['uid'])

		{

		{

			$user = get_user($mybb->input['uid']);
$username = $user['username'];
}
else

			$user = get_user($mybb->input['uid']);
$username = $user['username'];
}
else

		{

		{

			$username = htmlspecialchars_uni($mybb->input['username']);
}
eval("\$banuser_username = \"".$templates->get("modcp_banuser_addusername")."\";");

			$username = htmlspecialchars_uni($mybb->input['username']);
}
eval("\$banuser_username = \"".$templates->get("modcp_banuser_addusername")."\";");

	}


	}


	// Coming back to this page from an error?
if($errors)
{

	// Coming back to this page from an error?
if($errors)
{

Zeile 3223Zeile 3292
		}
$thatime = my_date("D, jS M Y @ g:ia", ban_date2timestamp($time, $banned['dateline']));
if($time == '---')

		}
$thatime = my_date("D, jS M Y @ g:ia", ban_date2timestamp($time, $banned['dateline']));
if($time == '---')

		{

		{

			$liftlist .= ">{$title}</option>\n";
}
else

			$liftlist .= ">{$title}</option>\n";
}
else

Zeile 3231Zeile 3300
			$liftlist .= ">{$title} ({$thatime})</option>\n";
}
}

			$liftlist .= ">{$title} ({$thatime})</option>\n";
}
}

	



	$bangroups = '';
$query = $db->simple_select("usergroups", "gid, title", "isbannedgroup=1");
while($item = $db->fetch_array($query))

	$bangroups = '';
$query = $db->simple_select("usergroups", "gid, title", "isbannedgroup=1");
while($item = $db->fetch_array($query))

Zeile 3243Zeile 3312
		}
$bangroups .= "<option value=\"{$item['gid']}\"{$selected}>".htmlspecialchars_uni($item['title'])."</option>\n";
}

		}
$bangroups .= "<option value=\"{$item['gid']}\"{$selected}>".htmlspecialchars_uni($item['title'])."</option>\n";
}

	



	$lift_link = "<div class=\"float_right\"><a href=\"modcp.php?action=liftban&amp;uid={$user['uid']}&amp;my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></div>";

	$lift_link = "<div class=\"float_right\"><a href=\"modcp.php?action=liftban&amp;uid={$user['uid']}&amp;my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></div>";

	



	$plugins->run_hooks("modcp_banuser_end");

	$plugins->run_hooks("modcp_banuser_end");

	



	eval("\$banuser = \"".$templates->get("modcp_banuser")."\";");
output_page($banuser);
}

	eval("\$banuser = \"".$templates->get("modcp_banuser")."\";");
output_page($banuser);
}

Zeile 3256Zeile 3325
{
// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

{
// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);

	



	$plugins->run_hooks("modcp_do_modnotes_start");

	$plugins->run_hooks("modcp_do_modnotes_start");

	



	// Update Moderator Notes cache
$update_cache = array(
"modmessage" => $mybb->input['modnotes']
);
$cache->update("modnotes", $update_cache);

	// Update Moderator Notes cache
$update_cache = array(
"modmessage" => $mybb->input['modnotes']
);
$cache->update("modnotes", $update_cache);

	



	$plugins->run_hooks("modcp_do_modnotes_end");

	$plugins->run_hooks("modcp_do_modnotes_end");

	



	redirect("modcp.php", $lang->redirect_modnotes);
}


	redirect("modcp.php", $lang->redirect_modnotes);
}


Zeile 3377Zeile 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 3399Zeile 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'])
{
$information = $lang->sprintf($lang->edited_user_info, htmlspecialchars_uni($data['username']), get_profile_link($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']));

			}





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

		}

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

		}

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

Zeile 3446Zeile 3514
		// Only show the edit & lift links if current user created ban, or is super mod/admin
$edit_link = '';
if($mybb->user['uid'] == $banned['admin'] || !$banned['adminuser'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1)

		// Only show the edit & lift links if current user created ban, or is super mod/admin
$edit_link = '';
if($mybb->user['uid'] == $banned['admin'] || !$banned['adminuser'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1)

		{

		{

			$edit_link = "<br /><span class=\"smalltext\"><a href=\"modcp.php?action=banuser&amp;uid={$banned['uid']}\">{$lang->edit_ban}</a> | <a href=\"modcp.php?action=liftban&amp;uid={$banned['uid']}&amp;my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></span>";
}

$admin_profile = build_profile_link($banned['adminuser'], $banned['admin']);

			$edit_link = "<br /><span class=\"smalltext\"><a href=\"modcp.php?action=banuser&amp;uid={$banned['uid']}\">{$lang->edit_ban}</a> | <a href=\"modcp.php?action=liftban&amp;uid={$banned['uid']}&amp;my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></span>";
}

$admin_profile = build_profile_link($banned['adminuser'], $banned['admin']);





		$trow = alt_trow();

if($banned['reason'])

		$trow = alt_trow();

if($banned['reason'])

Zeile 3461Zeile 3529
		else
{
$banned['reason'] = $lang->na;

		else
{
$banned['reason'] = $lang->na;

		}


		}


		if($banned['lifted'] == 'perm' || $banned['lifted'] == '' || $banned['bantime'] == 'perm' || $banned['bantime'] == '---')
{
$banlength = $lang->permanent;

		if($banned['lifted'] == 'perm' || $banned['lifted'] == '' || $banned['bantime'] == 'perm' || $banned['bantime'] == '---')
{
$banlength = $lang->permanent;

Zeile 3484Zeile 3552
				$timeremaining = "<span style=\"color: red;\">({$timeremaining} {$lang->ban_remaining})</span>";
}
else if($remaining < 86400)

				$timeremaining = "<span style=\"color: red;\">({$timeremaining} {$lang->ban_remaining})</span>";
}
else if($remaining < 86400)

			{

			{

				$timeremaining = "<span style=\"color: maroon;\">({$timeremaining} {$lang->ban_remaining})</span>";
}
else if($remaining < 604800)
{
$timeremaining = "<span style=\"color: green;\">({$timeremaining} {$lang->ban_remaining})</span>";

				$timeremaining = "<span style=\"color: maroon;\">({$timeremaining} {$lang->ban_remaining})</span>";
}
else if($remaining < 604800)
{
$timeremaining = "<span style=\"color: green;\">({$timeremaining} {$lang->ban_remaining})</span>";

			}

			}

			else
{
$timeremaining = "({$timeremaining} {$lang->ban_remaining})";

			else
{
$timeremaining = "({$timeremaining} {$lang->ban_remaining})";

Zeile 3502Zeile 3570

if(!$bannedusers)
{


if(!$bannedusers)
{

		eval("\$bannedusers = \"".$templates->get("modcp_banning_nobanned")."\";");

		eval("\$bannedusers = \"".$templates->get("modcp_nobanned")."\";");

	}

	}





	$modnotes = $cache->read("modnotes");
$modnotes = htmlspecialchars_uni($modnotes['modmessage']);

	$modnotes = $cache->read("modnotes");
$modnotes = htmlspecialchars_uni($modnotes['modmessage']);

	



	$plugins->run_hooks("modcp_end");

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

	$plugins->run_hooks("modcp_end");

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