Vergleich modcp.php - 1.8.22 - 1.8.27

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 56Zeile 56
$flist_queue_attach = $wflist_reports = $tflist_reports = $flist_reports = $tflist_modlog = $flist_modlog = $errors = '';
// SQL for fetching items only related to forums this user moderates
$moderated_forums = array();

$flist_queue_attach = $wflist_reports = $tflist_reports = $flist_reports = $tflist_modlog = $flist_modlog = $errors = '';
// SQL for fetching items only related to forums this user moderates
$moderated_forums = array();

 
$numannouncements = $nummodqueuethreads = $nummodqueueposts = $nummodqueueattach = $numreportedposts = $nummodlogs = 0;

if($mybb->usergroup['issupermod'] != 1)
{
$query = $db->simple_select("moderators", "*", "(id='{$mybb->user['uid']}' AND isgroup = '0') OR (id IN ({$mybb->usergroup['all_usergroups']}) AND isgroup = '1')");

if($mybb->usergroup['issupermod'] != 1)
{
$query = $db->simple_select("moderators", "*", "(id='{$mybb->user['uid']}' AND isgroup = '0') OR (id IN ({$mybb->usergroup['all_usergroups']}) AND isgroup = '1')");


$numannouncements = $nummodqueuethreads = $nummodqueueposts = $nummodqueueattach = $numreportedposts = $nummodlogs = 0;

 
	while($forum = $db->fetch_array($query))
{

	while($forum = $db->fetch_array($query))
{

		// For Announcements
if($forum['canmanageannouncements'] == 1)
{
++$numannouncements;
}














		$moderated_forums[] = $forum['fid'];
$children = get_child_list($forum['fid']);
if(is_array($children))
{
$moderated_forums = array_merge($moderated_forums, $children);
}
}
$moderated_forums = array_unique($moderated_forums);

$numannouncements = $nummodqueuethreads = $nummodqueueposts = $nummodqueueattach = $numreportedposts = $nummodlogs = 0;
foreach($moderated_forums as $moderated_forum)
{
// For Announcements
if(is_moderator($moderated_forum, 'canmanageannouncements'))
{
++$numannouncements;
}


		// For the Mod Queues

		// For the Mod Queues

		if($forum['canapproveunapprovethreads'] == 1)

		if(is_moderator($moderated_forum, 'canapproveunapprovethreads'))

		{

		{

			$flist_queue_threads .= ",'{$forum['fid']}'";

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

			$flist_queue_threads .= ",'{$moderated_forum}'";







			++$nummodqueuethreads;
}


			++$nummodqueuethreads;
}


		if($forum['canapproveunapproveposts'] == 1)
{
$flist_queue_posts .= ",'{$forum['fid']}'";

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

if($forum['canapproveunapproveattachs'] == 1)

		if(is_moderator($moderated_forum, 'canapproveunapproveposts'))
{
$flist_queue_posts .= ",'{$moderated_forum}'";
++$nummodqueueposts;
}

if(is_moderator($moderated_forum, 'canapproveunapproveattachs'))







		{

		{

			$flist_queue_attach .= ",'{$forum['fid']}'";

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

			$flist_queue_attach .= ",'{$moderated_forum}'";







			++$nummodqueueattach;
}

// For Reported posts

			++$nummodqueueattach;
}

// For Reported posts

		if($forum['canmanagereportedposts'] == 1)

		if(is_moderator($moderated_forum, 'canmanagereportedposts'))

		{

		{

			$flist_reports .= ",'{$forum['fid']}'";

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

			$flist_reports .= ",'{$moderated_forum}'";







			++$numreportedposts;
}

// For the Mod Log

			++$numreportedposts;
}

// For the Mod Log

		if($forum['canviewmodlog'] == 1)

		if(is_moderator($moderated_forum, 'canviewmodlog'))

		{

		{

			$flist_modlog .= ",'{$forum['fid']}'";

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

			$flist_modlog .= ",'{$moderated_forum}'";







			++$nummodlogs;

			++$nummodlogs;

		}

$flist .= ",'{$forum['fid']}'";

		}







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

		$flist .= ",'{$moderated_forum}'";






	}
if($flist_queue_threads)
{

	}
if($flist_queue_threads)
{

Zeile 237Zeile 211
if(($nummodlogs > 0 || $mybb->usergroup['issupermod'] == 1) && $mybb->usergroup['canviewmodlogs'] == 1)
{
eval("\$nav_modlogs = \"".$templates->get("modcp_nav_modlogs")."\";");

if(($nummodlogs > 0 || $mybb->usergroup['issupermod'] == 1) && $mybb->usergroup['canviewmodlogs'] == 1)
{
eval("\$nav_modlogs = \"".$templates->get("modcp_nav_modlogs")."\";");

}

}


if($mybb->usergroup['caneditprofiles'] == 1)
{


if($mybb->usergroup['caneditprofiles'] == 1)
{

Zeile 263Zeile 237

if(!empty($nav_announcements) || !empty($nav_modqueue) || !empty($nav_reportcenter) || !empty($nav_modlogs))
{


if(!empty($nav_announcements) || !empty($nav_modqueue) || !empty($nav_reportcenter) || !empty($nav_modlogs))
{

	$expaltext = (in_array("modcpforums", $collapse)) ? "[+]" : "[-]";

	$expaltext = (in_array("modcpforums", $collapse)) ? $lang->expcol_expand : $lang->expcol_collapse;

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

if(!empty($nav_editprofile) || !empty($nav_banning) || !empty($nav_warninglogs) || !empty($nav_ipsearch))
{

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

if(!empty($nav_editprofile) || !empty($nav_banning) || !empty($nav_warninglogs) || !empty($nav_ipsearch))
{

	$expaltext = (in_array("modcpusers", $collapse)) ? "[+]" : "[-]";

	$expaltext = (in_array("modcpusers", $collapse)) ? $lang->expcol_expand : $lang->expcol_collapse;

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


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


Zeile 374Zeile 348
	{
$query = $db->simple_select('reportedcontent', 'id3', "reportstatus='0' AND (type = 'post' OR type = '')");


	{
$query = $db->simple_select('reportedcontent', 'id3', "reportstatus='0' AND (type = 'post' OR type = '')");


		$report_count = 0;
while($fid = $db->fetch_field($query, 'id3'))
{
if(is_moderator($fid, "canmanagereportedposts"))
{
++$report_count;
}
}
unset($fid);
}

$page = $mybb->get_input('page', MyBB::INPUT_INT);

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


		$report_count = 0;
while($fid = $db->fetch_field($query, 'id3'))
{
if(is_moderator($fid, "canmanagereportedposts"))
{
++$report_count;
}
}
unset($fid);
}

$page = $mybb->get_input('page', MyBB::INPUT_INT);

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


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

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

	{

	{

		$page = 1;
}

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

		$page = 1;
}

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

	}
else

	}
else

	{
$start = 0;
$page = 1;

	{
$start = 0;
$page = 1;

Zeile 416Zeile 390
	$plugins->run_hooks("modcp_reports_start");

// Reports

	$plugins->run_hooks("modcp_reports_start");

// Reports

	$reports = '';



	$reports = $selectall = '';
$inlinecount = 0;


	$query = $db->query("
SELECT r.*, u.username, rr.title
FROM ".TABLE_PREFIX."reportedcontent r

	$query = $db->query("
SELECT r.*, u.username, rr.title
FROM ".TABLE_PREFIX."reportedcontent r

Zeile 428Zeile 404
	");

if(!$db->num_rows($query))

	");

if(!$db->num_rows($query))

	{

	{

		// No unread reports
eval("\$reports = \"".$templates->get("modcp_reports_noreports")."\";");
}

		// No unread reports
eval("\$reports = \"".$templates->get("modcp_reports_noreports")."\";");
}

Zeile 465Zeile 441
			{
// This (should) be a post
$postcache[$report['id']] = $report['id'];

			{
// This (should) be a post
$postcache[$report['id']] = $report['id'];

			}

			}


// Lastpost info - is it missing (pre-1.8)?
$lastposter = $report['uid'];


// Lastpost info - is it missing (pre-1.8)?
$lastposter = $report['uid'];

Zeile 532Zeile 508

$plugins->run_hooks('modcp_reports_intermediate');



$plugins->run_hooks('modcp_reports_intermediate');


		$inlinecount = 0;

 
		// Now that we have all of the information needed, display the reports
foreach($reportcache as $report)
{

		// Now that we have all of the information needed, display the reports
foreach($reportcache as $report)
{

Zeile 616Zeile 591

$inlinecheck = '';
if(isset($mybb->cookies['inlinereports']) && my_strpos($mybb->cookies['inlinereports'], "|{$report['rid']}|") !== false)


$inlinecheck = '';
if(isset($mybb->cookies['inlinereports']) && my_strpos($mybb->cookies['inlinereports'], "|{$report['rid']}|") !== false)

			{

			{

				$inlinecheck = " checked=\"checked\"";
++$inlinecount;
}

				$inlinecheck = " checked=\"checked\"";
++$inlinecount;
}





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

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

		}
}

$plugins->run_hooks("modcp_reports_end");

		}
}

$plugins->run_hooks("modcp_reports_end");


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


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

Zeile 635Zeile 610
if($mybb->input['action'] == "allreports")
{
if($mybb->usergroup['canmanagereportedcontent'] == 0)

if($mybb->input['action'] == "allreports")
{
if($mybb->usergroup['canmanagereportedcontent'] == 0)

	{

	{

		error_no_permission();
}


		error_no_permission();
}


Zeile 672Zeile 647
			{
++$report_count;
}

			{
++$report_count;
}

		}

		}

		unset($fid);
}


		unset($fid);
}


Zeile 691Zeile 666
		}
}
$postcount = (int)$report_count;

		}
}
$postcount = (int)$report_count;

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

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

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

if($page)
{

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

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

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

if($page)
{

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

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

	}

	}

	$upper = $start+$perpage;

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

	$upper = $start+$perpage;

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

Zeile 741Zeile 716

$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 749Zeile 724
		while($report = $db->fetch_array($query))
{
$trow = alt_trow();

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





			if($report['type'] == 'post')
{
$post = get_post_link($report['id'])."#pid{$report['id']}";

			if($report['type'] == 'post')
{
$post = get_post_link($report['id'])."#pid{$report['id']}";

Zeile 764Zeile 739
			{
$user = build_profile_link(htmlspecialchars_uni($report['profileusername']), $report['id']);
$report_data['content'] = $lang->sprintf($lang->report_info_profile, $user);

			{
$user = build_profile_link(htmlspecialchars_uni($report['profileusername']), $report['id']);
$report_data['content'] = $lang->sprintf($lang->report_info_profile, $user);

			}

			}

			else if($report['type'] == 'reputation')
{
$user = build_profile_link(htmlspecialchars_uni($report['repusername']), $report['id2']);

			else if($report['type'] == 'reputation')
{
$user = build_profile_link(htmlspecialchars_uni($report['repusername']), $report['id2']);

Zeile 774Zeile 749

// Report reason and comment
if($report['reasonid'] > 0)


// Report reason and comment
if($report['reasonid'] > 0)

			{

			{

				$reason = htmlspecialchars_uni($lang->parse($report['title']));

if(empty($report['reason']))

				$reason = htmlspecialchars_uni($lang->parse($report['title']));

if(empty($report['reason']))

Zeile 819Zeile 794
	if($mybb->usergroup['canviewmodlogs'] == 0)
{
error_no_permission();

	if($mybb->usergroup['canviewmodlogs'] == 0)
{
error_no_permission();

	}


	}


	if($nummodlogs == 0 && $mybb->usergroup['issupermod'] != 1)
{
error($lang->you_cannot_view_mod_logs);

	if($nummodlogs == 0 && $mybb->usergroup['issupermod'] != 1)
{
error($lang->you_cannot_view_mod_logs);

Zeile 838Zeile 813

// Searching for entries by a particular user
if($mybb->get_input('uid', MyBB::INPUT_INT))


// Searching for entries by a particular user
if($mybb->get_input('uid', MyBB::INPUT_INT))

	{

	{

		$where .= " AND l.uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";
}


		$where .= " AND l.uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";
}


Zeile 986Zeile 961

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


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

		{

		{

			$data = my_unserialize($logitem['data']);
if(!empty($data['uid']))
{

			$data = my_unserialize($logitem['data']);
if(!empty($data['uid']))
{

Zeile 999Zeile 974
				$data['announcement'] = get_announcement_link($data['aid']);
eval("\$information .= \"".$templates->get("modcp_modlogs_result_announcement")."\";");
}

				$data['announcement'] = get_announcement_link($data['aid']);
eval("\$information .= \"".$templates->get("modcp_modlogs_result_announcement")."\";");
}

		}

$plugins->run_hooks("modcp_modlogs_result");


		}

$plugins->run_hooks("modcp_modlogs_result");


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

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

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

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

	}

	}


$plugins->run_hooks("modcp_modlogs_filter");



$plugins->run_hooks("modcp_modlogs_filter");


Zeile 1041Zeile 1016

$user['username'] = htmlspecialchars_uni($user['username']);
eval("\$user_options .= \"".$templates->get("modcp_modlogs_user")."\";");


$user['username'] = htmlspecialchars_uni($user['username']);
eval("\$user_options .= \"".$templates->get("modcp_modlogs_user")."\";");

	}


	}


	$forum_select = build_forum_jump("", $mybb->get_input('fid', MyBB::INPUT_INT), 1, '', 0, true, '', "fid");

	$forum_select = build_forum_jump("", $mybb->get_input('fid', MyBB::INPUT_INT), 1, '', 0, true, '', "fid");





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

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





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

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

{
verify_post_check($mybb->get_input('my_post_key'));

if($mybb->usergroup['canmanageannounce'] == 0)
{
error_no_permission();
}

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

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

$plugins->run_hooks("modcp_do_delete_announcement");

{
verify_post_check($mybb->get_input('my_post_key'));

if($mybb->usergroup['canmanageannounce'] == 0)
{
error_no_permission();
}

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

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

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


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

}


}


if($mybb->input['action'] == "delete_announcement")
{
if($mybb->usergroup['canmanageannounce'] == 0)

if($mybb->input['action'] == "delete_announcement")
{
if($mybb->usergroup['canmanageannounce'] == 0)

Zeile 1088Zeile 1063
	}

$aid = $mybb->get_input('aid');

	}

$aid = $mybb->get_input('aid');

	$query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");


	$query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");


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

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





	if(!$announcement)
{
error($lang->error_invalid_announcement);

	if(!$announcement)
{
error($lang->error_invalid_announcement);

	}


	}


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

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

Zeile 1114Zeile 1089
	verify_post_check($mybb->get_input('my_post_key'));

if($mybb->usergroup['canmanageannounce'] == 0)

	verify_post_check($mybb->get_input('my_post_key'));

if($mybb->usergroup['canmanageannounce'] == 0)

	{
error_no_permission();
}

	{
error_no_permission();
}


$announcement_fid = $mybb->get_input('fid', MyBB::INPUT_INT);
if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid, "canmanageannouncements")) || ($unviewableforums && in_array($announcement_fid, $unviewableforums)))


$announcement_fid = $mybb->get_input('fid', MyBB::INPUT_INT);
if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid, "canmanageannouncements")) || ($unviewableforums && in_array($announcement_fid, $unviewableforums)))

Zeile 1133Zeile 1108
	}

$mybb->input['message'] = $mybb->get_input('message');

	}

$mybb->input['message'] = $mybb->get_input('message');

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

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

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


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


Zeile 1171Zeile 1146
	$mybb->input['starttime_month'] = $mybb->get_input('starttime_month');
$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'] = $mybb->get_input('starttime_month');
$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'] = '01';
}

		$mybb->input['starttime_month'] = '01';
}





	$localized_time_offset = (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;

$startdate = gmmktime((int)$startdate[0], (int)$startdate[1], 0, $mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) - $localized_time_offset;
if(!checkdate($mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) || $startdate < 0 || $startdate == false)
{
$errors[] = $lang->error_invalid_start_date;

	$localized_time_offset = (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;

$startdate = gmmktime((int)$startdate[0], (int)$startdate[1], 0, $mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) - $localized_time_offset;
if(!checkdate($mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) || $startdate < 0 || $startdate == false)
{
$errors[] = $lang->error_invalid_start_date;

	}

	}


if($mybb->get_input('endtime_type', MyBB::INPUT_INT) == 2)
{


if($mybb->get_input('endtime_type', MyBB::INPUT_INT) == 2)
{

Zeile 1199Zeile 1174
		if(!checkdate($mybb->get_input('endtime_month', MyBB::INPUT_INT), $mybb->get_input('endtime_day', MyBB::INPUT_INT), $mybb->get_input('endtime_year', MyBB::INPUT_INT)) || $enddate < 0 || $enddate == false)
{
$errors[] = $lang->error_invalid_end_date;

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

		}

		}


if($enddate <= $startdate)
{


if($enddate <= $startdate)
{

Zeile 1208Zeile 1183
	}

if($mybb->settings['announcementshtml'] && $mybb->get_input('allowhtml', MyBB::INPUT_INT) == 1)

	}

if($mybb->settings['announcementshtml'] && $mybb->get_input('allowhtml', MyBB::INPUT_INT) == 1)

	{

	{

		$allowhtml = 1;

		$allowhtml = 1;

	}

	}

	else

	else

	{

	{

		$allowhtml = 0;
}
if($mybb->get_input('allowmycode', MyBB::INPUT_INT) == 1)
{
$allowmycode = 1;

		$allowhtml = 0;
}
if($mybb->get_input('allowmycode', MyBB::INPUT_INT) == 1)
{
$allowmycode = 1;

	}
else
{

	}
else
{

		$allowmycode = 0;

		$allowmycode = 0;

	}

	}

	if($mybb->get_input('allowsmilies', MyBB::INPUT_INT) == 1)
{
$allowsmilies = 1;

	if($mybb->get_input('allowsmilies', MyBB::INPUT_INT) == 1)
{
$allowsmilies = 1;

	}
else

	}
else

	{
$allowsmilies = 0;
}

	{
$allowsmilies = 0;
}

Zeile 1255Zeile 1230
				'allowsmilies' => $allowsmilies
);
$aid = $db->insert_query("announcements", $insert_announcement);

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





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

$plugins->run_hooks("modcp_do_new_announcement_end");

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

$plugins->run_hooks("modcp_do_new_announcement_end");

Zeile 1273Zeile 1248
if($mybb->input['action'] == "new_announcement")
{
if($mybb->usergroup['canmanageannounce'] == 0)

if($mybb->input['action'] == "new_announcement")
{
if($mybb->usergroup['canmanageannounce'] == 0)

	{
error_no_permission();
}


	{
error_no_permission();
}


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

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

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


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


	$announcement_fid = $mybb->get_input('fid', MyBB::INPUT_INT);

	$announcement_fid = $mybb->get_input('fid', MyBB::INPUT_INT);





	if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid, "canmanageannouncements")) || ($unviewableforums && in_array($announcement_fid, $unviewableforums)))

	if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid, "canmanageannouncements")) || ($unviewableforums && in_array($announcement_fid, $unviewableforums)))

	{
error_no_permission();
}

// Deal with inline errors
if(!empty($errors) || isset($preview))
{
if(!empty($errors))
{
$errors = inline_error($errors);
}
else
{
$errors = '';
}

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

	{
error_no_permission();
}

// Deal with inline errors
if(!empty($errors) || isset($preview))
{
if(!empty($errors))
{
$errors = inline_error($errors);
}
else
{
$errors = '';
}

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


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


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

Zeile 1314Zeile 1289
		$enddateyear = htmlspecialchars_uni($mybb->input['endtime_year']);
$endday = $mybb->get_input('endtime_day', MyBB::INPUT_INT);
$endtime_time = htmlspecialchars_uni($mybb->input['endtime_time']);

		$enddateyear = htmlspecialchars_uni($mybb->input['endtime_year']);
$endday = $mybb->get_input('endtime_day', MyBB::INPUT_INT);
$endtime_time = htmlspecialchars_uni($mybb->input['endtime_time']);

	}

	}

	else
{
$localized_time = TIME_NOW + (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;

	else
{
$localized_time = TIME_NOW + (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;

Zeile 1334Zeile 1309
			);

$enddateyear = $startdateyear+1;

			);

$enddateyear = $startdateyear+1;

	}

// Generate form elements
$startdateday = $enddateday = '';
for($day = 1; $day <= 31; ++$day)
{
if($startday == $day)
{
$selected = " selected=\"selected\"";
eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";");
}
else
{
$selected = '';
eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";");
}

if($endday == $day)
{
$selected = " selected=\"selected\"";
eval("\$enddateday .= \"".$templates->get("modcp_announcements_day")."\";");
}
else
{
$selected = '';
eval("\$enddateday .= \"".$templates->get("modcp_announcements_day")."\";");
}
}

$startmonthsel = $endmonthsel = array();
foreach(array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12') as $month)
{
$startmonthsel[$month] = '';
$endmonthsel[$month] = '';
}
$startmonthsel[$startmonth] = "selected=\"selected\"";
$endmonthsel[$endmonth] = "selected=\"selected\"";

$startdatemonth = $enddatemonth = '';

eval("\$startdatemonth .= \"".$templates->get("modcp_announcements_month_start")."\";");
eval("\$enddatemonth .= \"".$templates->get("modcp_announcements_month_end")."\";");

$title = htmlspecialchars_uni($announcement['subject']);
$message = htmlspecialchars_uni($announcement['message']);


	}

// Generate form elements
$startdateday = $enddateday = '';
for($day = 1; $day <= 31; ++$day)
{
if($startday == $day)
{
$selected = " selected=\"selected\"";
eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";");
}
else
{
$selected = '';
eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";");
}

if($endday == $day)
{
$selected = " selected=\"selected\"";
eval("\$enddateday .= \"".$templates->get("modcp_announcements_day")."\";");
}
else
{
$selected = '';
eval("\$enddateday .= \"".$templates->get("modcp_announcements_day")."\";");
}
}

$startmonthsel = $endmonthsel = array();
foreach(array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12') as $month)
{
$startmonthsel[$month] = '';
$endmonthsel[$month] = '';
}
$startmonthsel[$startmonth] = "selected=\"selected\"";
$endmonthsel[$endmonth] = "selected=\"selected\"";

$startdatemonth = $enddatemonth = '';

eval("\$startdatemonth .= \"".$templates->get("modcp_announcements_month_start")."\";");
eval("\$enddatemonth .= \"".$templates->get("modcp_announcements_month_end")."\";");

$title = htmlspecialchars_uni($announcement['subject']);
$message = htmlspecialchars_uni($announcement['message']);


	$html_sel = $mycode_sel = $smilies_sel = array('yes' => '', 'no' => '');

if($mybb->settings['announcementshtml'])

	$html_sel = $mycode_sel = $smilies_sel = array('yes' => '', 'no' => '');

if($mybb->settings['announcementshtml'])

Zeile 1398Zeile 1373
	else
{
$allow_html = '';

	else
{
$allow_html = '';

	}


	}


	if($announcement['allowmycode'])

	if($announcement['allowmycode'])

	{

	{

		$mycode_sel['yes'] = ' checked="checked"';

		$mycode_sel['yes'] = ' checked="checked"';

	}

	}

	else
{
$mycode_sel['no'] = ' checked="checked"';

	else
{
$mycode_sel['no'] = ' checked="checked"';

	}


	}


	if($announcement['allowsmilies'])

	if($announcement['allowsmilies'])

	{

	{

		$smilies_sel['yes'] = ' checked="checked"';

		$smilies_sel['yes'] = ' checked="checked"';

	}

	}

	else
{
$smilies_sel['no'] = ' checked="checked"';

	else
{
$smilies_sel['no'] = ' checked="checked"';

	}


	}


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

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

Zeile 1437Zeile 1412
		$announcementarray = array(
'aid' => 0,
'fid' => $announcement_fid,

		$announcementarray = array(
'aid' => 0,
'fid' => $announcement_fid,

			'uid' => $mybb->user['uid'],
'subject' => $mybb->input['title'],
'message' => $mybb->input['message'],
'allowhtml' => $mybb->settings['announcementshtml'] && $mybb->get_input('allowhtml', MyBB::INPUT_INT),
'allowmycode' => $mybb->get_input('allowmycode', MyBB::INPUT_INT),
'allowsmilies' => $mybb->get_input('allowsmilies', MyBB::INPUT_INT),
'dateline' => TIME_NOW,
'userusername' => $mybb->user['username'],
);

$array = $mybb->user;
foreach($array as $key => $element)
{
$announcementarray[$key] = $element;
}

// Gather usergroup data from the cache
// Field => Array Key

			'uid' => $mybb->user['uid'],
'subject' => $mybb->input['title'],
'message' => $mybb->input['message'],
'allowhtml' => $mybb->settings['announcementshtml'] && $mybb->get_input('allowhtml', MyBB::INPUT_INT),
'allowmycode' => $mybb->get_input('allowmycode', MyBB::INPUT_INT),
'allowsmilies' => $mybb->get_input('allowsmilies', MyBB::INPUT_INT),
'dateline' => TIME_NOW,
'userusername' => $mybb->user['username'],
);

$array = $mybb->user;
foreach($array as $key => $element)
{
$announcementarray[$key] = $element;
}

// Gather usergroup data from the cache
// Field => Array Key

		$data_key = array(
'title' => 'grouptitle',
'usertitle' => 'groupusertitle',

		$data_key = array(
'title' => 'grouptitle',
'usertitle' => 'groupusertitle',

Zeile 1604Zeile 1579
	else
{
$allowmycode = 0;

	else
{
$allowmycode = 0;

	}

	}

	if($mybb->get_input('allowsmilies', MyBB::INPUT_INT) == 1)

	if($mybb->get_input('allowsmilies', MyBB::INPUT_INT) == 1)

	{

	{

		$allowsmilies = 1;

		$allowsmilies = 1;

	}

	}

	else
{
$allowsmilies = 0;

	else
{
$allowsmilies = 0;

	}

	}


$plugins->run_hooks("modcp_do_edit_announcement_start");



$plugins->run_hooks("modcp_do_edit_announcement_start");


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

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

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

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





			$plugins->run_hooks("modcp_do_edit_announcement_end");

$cache->update_forumsdisplay();

			$plugins->run_hooks("modcp_do_edit_announcement_end");

$cache->update_forumsdisplay();

Zeile 1655Zeile 1630
if($mybb->input['action'] == "edit_announcement")
{
if($mybb->usergroup['canmanageannounce'] == 0)

if($mybb->input['action'] == "edit_announcement")
{
if($mybb->usergroup['canmanageannounce'] == 0)

	{
error_no_permission();
}

	{
error_no_permission();
}


$aid = $mybb->get_input('aid', MyBB::INPUT_INT);


$aid = $mybb->get_input('aid', MyBB::INPUT_INT);





	add_breadcrumb($lang->mcp_nav_announcements, "modcp.php?action=announcements");
add_breadcrumb($lang->edit_announcement, "modcp.php?action=edit_announcements&amp;aid={$aid}");

// Get announcement
if(!isset($announcement) || $mybb->request_method != 'post')

	add_breadcrumb($lang->mcp_nav_announcements, "modcp.php?action=announcements");
add_breadcrumb($lang->edit_announcement, "modcp.php?action=edit_announcements&amp;aid={$aid}");

// Get announcement
if(!isset($announcement) || $mybb->request_method != 'post')

	{

	{

		$query = $db->simple_select("announcements", "*", "aid='{$aid}'");
$announcement = $db->fetch_array($query);

		$query = $db->simple_select("announcements", "*", "aid='{$aid}'");
$announcement = $db->fetch_array($query);

	}


	}


	if(!$announcement)

	if(!$announcement)

	{

	{

		error($lang->error_invalid_announcement);

		error($lang->error_invalid_announcement);

	}

	}

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

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

	{
error_no_permission();
}


	{
error_no_permission();
}


	if(!$announcement['startdate'])
{
// No start date? Make it now.

	if(!$announcement['startdate'])
{
// No start date? Make it now.

Zeile 1902Zeile 1877
if($mybb->input['action'] == "announcements")
{
if($mybb->usergroup['canmanageannounce'] == 0)

if($mybb->input['action'] == "announcements")
{
if($mybb->usergroup['canmanageannounce'] == 0)

	{
error_no_permission();
}


	{
error_no_permission();
}


	if($numannouncements == 0 && $mybb->usergroup['issupermod'] != 1)
{
error($lang->you_cannot_manage_announcements);

	if($numannouncements == 0 && $mybb->usergroup['issupermod'] != 1)
{
error($lang->you_cannot_manage_announcements);

	}

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

	}

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


// Fetch announcements into their proper arrays
$query = $db->simple_select("announcements", "aid, fid, subject, enddate");


// Fetch announcements into their proper arrays
$query = $db->simple_select("announcements", "aid, fid, subject, enddate");

Zeile 1930Zeile 1905
	if($mybb->usergroup['issupermod'] == 1)
{
if($global_announcements && $mybb->usergroup['issupermod'] == 1)

	if($mybb->usergroup['issupermod'] == 1)
{
if($global_announcements && $mybb->usergroup['issupermod'] == 1)

		{

		{

			// Get the global announcements
foreach($global_announcements as $aid => $announcement)
{
$trow = alt_trow();

			// Get the global announcements
foreach($global_announcements as $aid => $announcement)
{
$trow = alt_trow();

				if($announcement['startdate'] > TIME_NOW || ($announcement['enddate'] < TIME_NOW && $announcement['enddate'] != 0))

				if((isset($announcement['startdate']) && $announcement['startdate'] > TIME_NOW) || (isset($announcement['enddate']) && $announcement['enddate'] < TIME_NOW && $announcement['enddate'] != 0))

				{
eval("\$icon = \"".$templates->get("modcp_announcements_announcement_expired")."\";");
}

				{
eval("\$icon = \"".$templates->get("modcp_announcements_announcement_expired")."\";");
}

Zeile 1959Zeile 1934

$announcements_forum = '';
fetch_forum_announcements();


$announcements_forum = '';
fetch_forum_announcements();





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

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

Zeile 1978Zeile 1953

// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


if($mybb->usergroup['canmanagemodqueue'] == 0)
{


if($mybb->usergroup['canmanagemodqueue'] == 0)
{

		error_no_permission();
}

		error_no_permission();
}





	$plugins->run_hooks("modcp_do_modqueue_start");

$mybb->input['threads'] = $mybb->get_input('threads', MyBB::INPUT_ARRAY);
$mybb->input['posts'] = $mybb->get_input('posts', MyBB::INPUT_ARRAY);
$mybb->input['attachments'] = $mybb->get_input('attachments', MyBB::INPUT_ARRAY);
if(!empty($mybb->input['threads']))

	$plugins->run_hooks("modcp_do_modqueue_start");

$mybb->input['threads'] = $mybb->get_input('threads', MyBB::INPUT_ARRAY);
$mybb->input['posts'] = $mybb->get_input('posts', MyBB::INPUT_ARRAY);
$mybb->input['attachments'] = $mybb->get_input('attachments', MyBB::INPUT_ARRAY);
if(!empty($mybb->input['threads']))

	{

	{

		$threads = array_map("intval", array_keys($mybb->input['threads']));
$threads_to_approve = $threads_to_delete = array();
// Fetch threads

		$threads = array_map("intval", array_keys($mybb->input['threads']));
$threads_to_approve = $threads_to_delete = array();
// Fetch threads

Zeile 1998Zeile 1973
		while($thread = $db->fetch_array($query))
{
if(!isset($mybb->input['threads'][$thread['tid']]))

		while($thread = $db->fetch_array($query))
{
if(!isset($mybb->input['threads'][$thread['tid']]))

			{
continue;

			{
continue;

			}
$action = $mybb->input['threads'][$thread['tid']];
if($action == "approve")

			}
$action = $mybb->input['threads'][$thread['tid']];
if($action == "approve")

			{

			{

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

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

			}

			}

		}
if(!empty($threads_to_approve))
{

		}
if(!empty($threads_to_approve))
{

Zeile 2046Zeile 2021
		while($post = $db->fetch_array($query))
{
if(!isset($mybb->input['posts'][$post['pid']]))

		while($post = $db->fetch_array($query))
{
if(!isset($mybb->input['posts'][$post['pid']]))

			{

			{

				continue;

				continue;

			}

			}

			$action = $mybb->input['posts'][$post['pid']];
if($action == "approve")

			$action = $mybb->input['posts'][$post['pid']];
if($action == "approve")

			{

			{

				$posts_to_approve[] = $post['pid'];
}
else if($action == "delete" && $mybb->settings['soft_delete'] != 1)

				$posts_to_approve[] = $post['pid'];
}
else if($action == "delete" && $mybb->settings['soft_delete'] != 1)

			{

			{

				$moderation->delete_post($post['pid']);

				$moderation->delete_post($post['pid']);

			}

			}

			else if($action == "delete")
{
$posts_to_delete[] = $post['pid'];
}
}
if(!empty($posts_to_approve))

			else if($action == "delete")
{
$posts_to_delete[] = $post['pid'];
}
}
if(!empty($posts_to_approve))

		{

		{

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

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

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





		$plugins->run_hooks("modcp_do_modqueue_end");

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

		$plugins->run_hooks("modcp_do_modqueue_end");

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

Zeile 2130Zeile 2105
	if($nummodqueuethreads == 0 && $nummodqueueposts == 0 && $nummodqueueattach == 0 && $mybb->usergroup['issupermod'] != 1)
{
error($lang->you_cannot_use_mod_queue);

	if($nummodqueuethreads == 0 && $nummodqueueposts == 0 && $nummodqueueattach == 0 && $mybb->usergroup['issupermod'] != 1)
{
error($lang->you_cannot_use_mod_queue);

	}

	}


$mybb->input['type'] = $mybb->get_input('type');
$threadqueue = $postqueue = $attachmentqueue = '';


$mybb->input['type'] = $mybb->get_input('type');
$threadqueue = $postqueue = $attachmentqueue = '';

Zeile 2139Zeile 2114
		if($nummodqueuethreads == 0 && $mybb->usergroup['issupermod'] != 1)
{
error($lang->you_cannot_moderate_threads);

		if($nummodqueuethreads == 0 && $mybb->usergroup['issupermod'] != 1)
{
error($lang->you_cannot_moderate_threads);

		}

		}


$forum_cache = $cache->read("forums");


$forum_cache = $cache->read("forums");





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

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

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

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

		{

		{

			$page = $mybb->get_input('page', MyBB::INPUT_INT);
}

			$page = $mybb->get_input('page', MyBB::INPUT_INT);
}





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

if($mybb->get_input('page') == "last")

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

if($mybb->get_input('page') == "last")

		{

		{

			$page = $pages;
}


			$page = $pages;
}


Zeile 2175Zeile 2150
			$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("

Zeile 2203Zeile 2178
				{
$thread['threadusername'] = htmlspecialchars_uni($thread['threadusername']);
$profile_link = $thread['threadusername'];

				{
$thread['threadusername'] = htmlspecialchars_uni($thread['threadusername']);
$profile_link = $thread['threadusername'];

				}
else
{

				}
else
{

					$profile_link = $lang->guest;
}
}

					$profile_link = $lang->guest;
}
}

Zeile 2255Zeile 2230
		if($nummodqueueposts == 0 && $mybb->usergroup['issupermod'] != 1)
{
error($lang->you_cannot_moderate_posts);

		if($nummodqueueposts == 0 && $mybb->usergroup['issupermod'] != 1)
{
error($lang->you_cannot_moderate_posts);

		}


		}


		$forum_cache = $cache->read("forums");

$query = $db->query("

		$forum_cache = $cache->read("forums");

$query = $db->query("

Zeile 2275Zeile 2250

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


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

		$pages = ceil($pages);

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

		$pages = ceil($pages);

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


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


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

		{

		{

			$page = 1;
}

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

			$page = 1;
}

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

		}

		}

		else
{
$start = 0;

		else
{
$start = 0;

Zeile 2305Zeile 2280
			LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
WHERE p.visible='0' {$tflist_queue_posts} AND t.firstpost != p.pid

			LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
WHERE p.visible='0' {$tflist_queue_posts} AND t.firstpost != p.pid

			ORDER BY p.dateline DESC

			ORDER BY p.dateline DESC, p.pid DESC

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

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

		{

		{

			$altbg = alt_trow();
$post['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($post['threadsubject']));
$post['subject'] = htmlspecialchars_uni($parser->parse_badwords($post['subject']));

			$altbg = alt_trow();
$post['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($post['threadsubject']));
$post['subject'] = htmlspecialchars_uni($parser->parse_badwords($post['subject']));

Zeile 2319Zeile 2294
			$forum_link = get_forum_link($post['fid']);
$forum_name = $forum_cache[$post['fid']]['name'];
$postdate = my_date('relative', $post['dateline']);

			$forum_link = get_forum_link($post['fid']);
$forum_name = $forum_cache[$post['fid']]['name'];
$postdate = my_date('relative', $post['dateline']);





			if($post['username'] == "")
{
if($post['postusername'] != "")

			if($post['username'] == "")
{
if($post['postusername'] != "")

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

$plugins->run_hooks("modcp_modqueue_posts_end");

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

$plugins->run_hooks("modcp_modqueue_posts_end");


if($nummodqueuethreads > 0 || $mybb->usergroup['issupermod'] == 1)
{


if($nummodqueuethreads > 0 || $mybb->usergroup['issupermod'] == 1)
{

				$navsep = " | ";
eval("\$thread_link = \"".$templates->get("modcp_modqueue_thread_link")."\";");
}

				$navsep = " | ";
eval("\$thread_link = \"".$templates->get("modcp_modqueue_thread_link")."\";");
}

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

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





	if($mybb->usergroup['caneditprofiles'] == 0)

	if($mybb->usergroup['caneditprofiles'] == 0)

	{

	{

		error_no_permission();
}

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

		error_no_permission();
}

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

	{

	{

		error($lang->error_nomember);
}


		error($lang->error_nomember);
}


Zeile 2535Zeile 2510
			if(!$mybb->get_input('awaymonth', MyBB::INPUT_INT))
{
$mybb->input['awaymonth'] = my_date('n', $awaydate);

			if(!$mybb->get_input('awaymonth', MyBB::INPUT_INT))
{
$mybb->input['awaymonth'] = my_date('n', $awaydate);

			}

			}

			if(!$mybb->get_input('awayyear', MyBB::INPUT_INT))
{
$mybb->input['awayyear'] = my_date('Y', $awaydate);

			if(!$mybb->get_input('awayyear', MyBB::INPUT_INT))
{
$mybb->input['awayyear'] = my_date('Y', $awaydate);

Zeile 2564Zeile 2539
			"date" => $awaydate,
"returndate" => $returndate,
"awayreason" => $mybb->get_input('awayreason')

			"date" => $awaydate,
"returndate" => $returndate,
"awayreason" => $mybb->get_input('awayreason')

		);

		);

	}
else
{

	}
else
{

Zeile 2579Zeile 2554
	// Set up user handler.
require_once MYBB_ROOT."inc/datahandlers/user.php";
$userhandler = new UserDataHandler('update');

	// Set up user handler.
require_once MYBB_ROOT."inc/datahandlers/user.php";
$userhandler = new UserDataHandler('update');





	// Set the data for the new user.
$updated_user = array(
"uid" => $user['uid'],

	// Set the data for the new user.
$updated_user = array(
"uid" => $user['uid'],

Zeile 2601Zeile 2576
	);

if(!empty($mybb->input['usertitle']))

	);

if(!empty($mybb->input['usertitle']))

	{

	{

		$updated_user['usertitle'] = $mybb->get_input('usertitle');
}
else if(!empty($mybb->input['reverttitle']))

		$updated_user['usertitle'] = $mybb->get_input('usertitle');
}
else if(!empty($mybb->input['reverttitle']))

Zeile 2623Zeile 2598
	{
$errors = $userhandler->get_friendly_errors();
$mybb->input['action'] = "editprofile";

	{
$errors = $userhandler->get_friendly_errors();
$mybb->input['action'] = "editprofile";

	}

	}

	else
{
// Are we removing an avatar from this user?

	else
{
// Are we removing an avatar from this user?

Zeile 2725Zeile 2700

// Those with javascript turned off will be able to select both - cheeky!
// Check to make sure we're not moderating AND suspending posting


// Those with javascript turned off will be able to select both - cheeky!
// Check to make sure we're not moderating AND suspending posting

		if(isset($extra_user_updates) && $extra_user_updates['moderateposts'] && $extra_user_updates['suspendposting'])

		if(isset($extra_user_updates) && !empty($extra_user_updates['moderateposts']) && !empty($extra_user_updates['suspendposting']))

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

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

Zeile 2741Zeile 2716
			// Continue with the update if there is no errors
$user_info = $userhandler->update_user();
if(!empty($extra_user_updates))

			// Continue with the update if there is no errors
$user_info = $userhandler->update_user();
if(!empty($extra_user_updates))

			{

			{

				$db->update_query("users", $extra_user_updates, "uid='{$user['uid']}'");
}
log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->edited_user);

				$db->update_query("users", $extra_user_updates, "uid='{$user['uid']}'");
}
log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->edited_user);

Zeile 2858Zeile 2833
		if($mybb->input['birthday_day'] == $day)
{
$selected = "selected=\"selected\"";

		if($mybb->input['birthday_day'] == $day)
{
$selected = "selected=\"selected\"";

		}
else

		}
else

		{
$selected = '';
}

		{
$selected = '';
}

Zeile 2945Zeile 2920
	$plugins->run_hooks("modcp_editprofile_start");

// Fetch profile fields

	$plugins->run_hooks("modcp_editprofile_start");

// Fetch profile fields

 
	$user_fields = array();

	$query = $db->simple_select("userfields", "*", "ufid='{$user['uid']}'");

	$query = $db->simple_select("userfields", "*", "ufid='{$user['uid']}'");

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




	if($db->num_rows($query) > 0)
{
$user_fields = $db->fetch_array($query);
}


$requiredfields = '';
$customfields = '';


$requiredfields = '';
$customfields = '';

Zeile 2966Zeile 2945
			$thing = explode("\n", $profilefield['type'], "2");
$type = $thing[0];
if(isset($thing[1]))

			$thing = explode("\n", $profilefield['type'], "2");
$type = $thing[0];
if(isset($thing[1]))

			{

			{

				$options = $thing[1];
}
$field = "fid{$profilefield['fid']}";

				$options = $thing[1];
}
$field = "fid{$profilefield['fid']}";

Zeile 2977Zeile 2956
					$userfield = $mybb->input['profile_fields'][$field];
}
}

					$userfield = $mybb->input['profile_fields'][$field];
}
}

			else

			elseif(isset($user_fields[$field]))

			{
$userfield = $user_fields[$field];
}

			{
$userfield = $user_fields[$field];
}

Zeile 3675Zeile 3654

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



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


 
	$ipsearch_results = $ipaddressvalue = '';

	$mybb->input['ipaddress'] = $mybb->get_input('ipaddress');
if($mybb->input['ipaddress'])
{

	$mybb->input['ipaddress'] = $mybb->get_input('ipaddress');
if($mybb->input['ipaddress'])
{

Zeile 3707Zeile 3687
			$plugins->run_hooks("modcp_ipsearch_posts_start");

if($post_ip_sql)

			$plugins->run_hooks("modcp_ipsearch_posts_start");

if($post_ip_sql)

			{

			{

				$where_sql = '';

				$where_sql = '';





				$unviewable_forums = get_unviewable_forums(true);

				$unviewable_forums = get_unviewable_forums(true);





				if($unviewable_forums)
{
$where_sql .= " AND p.fid NOT IN ({$unviewable_forums})";

				if($unviewable_forums)
{
$where_sql .= " AND p.fid NOT IN ({$unviewable_forums})";

				}


				}


				if($inactiveforums)
{
$where_sql .= " AND p.fid NOT IN ({$inactiveforums})";

				if($inactiveforums)
{
$where_sql .= " AND p.fid NOT IN ({$inactiveforums})";

Zeile 3734Zeile 3714
				}

if(!empty($onlyusfids))

				}

if(!empty($onlyusfids))

				{

				{

					$where_sql .= " AND ((t.fid IN(".implode(',', $onlyusfids).") AND t.uid='{$mybb->user['uid']}') OR t.fid NOT IN(".implode(',', $onlyusfids)."))";
}


					$where_sql .= " AND ((t.fid IN(".implode(',', $onlyusfids).") AND t.uid='{$mybb->user['uid']}') OR t.fid NOT IN(".implode(',', $onlyusfids)."))";
}


Zeile 3761Zeile 3741
					if(!empty($unapprove_forums))
{
$visible_sql .= " OR (p.visible = 0 AND p.fid IN(".implode(',', $unapprove_forums).")) OR (t.visible = 0 AND t.fid IN(".implode(',', $unapprove_forums)."))";

					if(!empty($unapprove_forums))
{
$visible_sql .= " OR (p.visible = 0 AND p.fid IN(".implode(',', $unapprove_forums).")) OR (t.visible = 0 AND t.fid IN(".implode(',', $unapprove_forums)."))";

					}

					}

					if(!empty($deleted_forums))
{
$visible_sql .= " OR (p.visible = -1 AND p.fid IN(".implode(',', $deleted_forums).")) OR (t.visible = -1 AND t.fid IN(".implode(',', $deleted_forums)."))";

					if(!empty($deleted_forums))
{
$visible_sql .= " OR (p.visible = -1 AND p.fid IN(".implode(',', $deleted_forums).")) OR (t.visible = -1 AND t.fid IN(".implode(',', $deleted_forums)."))";

Zeile 3780Zeile 3760
					WHERE {$post_ip_sql}{$where_sql}{$visible_sql}
");
$post_results = $db->fetch_field($query, "count");

					WHERE {$post_ip_sql}{$where_sql}{$visible_sql}
");
$post_results = $db->fetch_field($query, "count");

			}
}

			}
}


// Searching user IP addresses
if(isset($mybb->input['search_users']))


// Searching user IP addresses
if(isset($mybb->input['search_users']))

Zeile 3791Zeile 3771
				if(!is_array($ip_range))
{
$user_ip_sql = "regip=".$db->escape_binary($ip_range)." OR lastip=".$db->escape_binary($ip_range);

				if(!is_array($ip_range))
{
$user_ip_sql = "regip=".$db->escape_binary($ip_range)." OR lastip=".$db->escape_binary($ip_range);

				}

				}

				else
{
$user_ip_sql = "regip BETWEEN ".$db->escape_binary($ip_range[0])." AND ".$db->escape_binary($ip_range[1])." OR lastip BETWEEN ".$db->escape_binary($ip_range[0])." AND ".$db->escape_binary($ip_range[1]);

				else
{
$user_ip_sql = "regip BETWEEN ".$db->escape_binary($ip_range[0])." AND ".$db->escape_binary($ip_range[1])." OR lastip BETWEEN ".$db->escape_binary($ip_range[0])." AND ".$db->escape_binary($ip_range[1]);

Zeile 3806Zeile 3786

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


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

		}

$total_results = $post_results+$user_results;


		}

$total_results = $post_results+$user_results;


		if(!$total_results)
{
$total_results = 1;

		if(!$total_results)
{
$total_results = 1;

Zeile 3818Zeile 3798
		// Now we have the result counts, paginate
$perpage = $mybb->get_input('perpage', MyBB::INPUT_INT);
if(!$perpage || $perpage <= 0)

		// Now we have the result counts, paginate
$perpage = $mybb->get_input('perpage', MyBB::INPUT_INT);
if(!$perpage || $perpage <= 0)

		{

		{

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


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


Zeile 3837Zeile 3817
		}

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

		}

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

		{

		{

			$page = 1;
}


			$page = 1;
}


Zeile 3855Zeile 3835
		foreach(array('ipaddress', 'search_users', 'search_posts') as $input)
{
if(!empty($mybb->input[$input]))

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

			{

			{

				$page_url .= "&amp;{$input}=".urlencode($mybb->input[$input]);
}
}

				$page_url .= "&amp;{$input}=".urlencode($mybb->input[$input]);
}
}

Zeile 3927Zeile 3907
				FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid = p.tid)
WHERE {$post_ip_sql}{$where_sql}{$visible_sql}

				FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid = p.tid)
WHERE {$post_ip_sql}{$where_sql}{$visible_sql}

				ORDER BY p.dateline desc

				ORDER BY p.dateline DESC, p.pid DESC

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

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

Zeile 4004Zeile 3984

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


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

	{

	{

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

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

Zeile 4151Zeile 4131
		if($banned['reason'])
{
$banned['reason'] = htmlspecialchars_uni($parser->parse_badwords($banned['reason']));

		if($banned['reason'])
{
$banned['reason'] = htmlspecialchars_uni($parser->parse_badwords($banned['reason']));

		}
else
{

		}
else
{

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


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


Zeile 4227Zeile 4207
	if(!$ban)
{
error($lang->error_invalidban);

	if(!$ban)
{
error($lang->error_invalidban);

	}

	}


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


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

Zeile 4242Zeile 4222

$updated_group = array(
'usergroup' => $ban['oldgroup'],


$updated_group = array(
'usergroup' => $ban['oldgroup'],

		'additionalgroups' => $ban['oldadditionalgroups'],

		'additionalgroups' => $db->escape_string($ban['oldadditionalgroups']),

		'displaygroup' => $ban['olddisplaygroup']
);
$db->update_query("users", $updated_group, "uid='{$ban['uid']}'");
$db->delete_query("banned", "uid='{$ban['uid']}'");

		'displaygroup' => $ban['olddisplaygroup']
);
$db->update_query("users", $updated_group, "uid='{$ban['uid']}'");
$db->delete_query("banned", "uid='{$ban['uid']}'");


$cache->update_banned();




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


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


Zeile 4265Zeile 4244
	if($mybb->usergroup['canbanusers'] == 0)
{
error_no_permission();

	if($mybb->usergroup['canbanusers'] == 0)
{
error_no_permission();

	}


	}


	// Editing an existing ban

	// Editing an existing ban

 
	$existing_ban = false;

	if($mybb->get_input('uid', MyBB::INPUT_INT))
{
// Get the users info from their uid

	if($mybb->get_input('uid', MyBB::INPUT_INT))
{
// Get the users info from their uid

Zeile 4279Zeile 4259
		");
$user = $db->fetch_array($query);


		");
$user = $db->fetch_array($query);


		$existing_ban = false;

 
		if($user['uid'])
{
$existing_ban = true;

		if($user['uid'])
{
$existing_ban = true;

Zeile 4305Zeile 4284
		$user = get_user_by_username($mybb->input['username'], $options);

if(!$user['uid'])

		$user = get_user_by_username($mybb->input['username'], $options);

if(!$user['uid'])

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

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

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

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

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


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


Zeile 4339Zeile 4318
	// If this is a new ban, we check the user isn't already part of a banned group
if(!$existing_ban && $user['uid'])
{

	// If this is a new ban, we check the user isn't already part of a banned group
if(!$existing_ban && $user['uid'])
{

		$query = $db->simple_select("banned", "uid", "uid='{$user['uid']}'");
if($db->fetch_field($query, "uid"))

		$query = $db->simple_select("banned", "uid", "uid='{$user['uid']}'", array('limit' => 1));
if($db->num_rows($query) > 0)

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

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

Zeile 4385Zeile 4364
				'uid' => $user['uid'],
'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT),
'oldgroup' => (int)$user['usergroup'],

				'uid' => $user['uid'],
'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT),
'oldgroup' => (int)$user['usergroup'],

				'oldadditionalgroups' => (string)$user['additionalgroups'],

				'oldadditionalgroups' => $db->escape_string($user['additionalgroups']),

				'olddisplaygroup' => (int)$user['displaygroup'],
'admin' => (int)$mybb->user['uid'],
'dateline' => TIME_NOW,

				'olddisplaygroup' => (int)$user['displaygroup'],
'admin' => (int)$mybb->user['uid'],
'dateline' => TIME_NOW,

Zeile 4404Zeile 4383
			'additionalgroups' => '',
);
$db->update_query('users', $update_array, "uid = {$user['uid']}");

			'additionalgroups' => '',
);
$db->update_query('users', $update_array, "uid = {$user['uid']}");


$cache->update_banned();

 

// Log edit or add ban
if($existing_ban)


// Log edit or add ban
if($existing_ban)

Zeile 4469Zeile 4446
			WHERE b.uid='{$mybb->input['uid']}'
");
$banned = $db->fetch_array($query);

			WHERE b.uid='{$mybb->input['uid']}'
");
$banned = $db->fetch_array($query);

		if($banned['username'])

		if(!empty($banned['username']))

		{
$username = $banned['username'] = htmlspecialchars_uni($banned['username']);
$banreason = htmlspecialchars_uni($banned['reason']);

		{
$username = $banned['username'] = htmlspecialchars_uni($banned['username']);
$banreason = htmlspecialchars_uni($banned['reason']);

Zeile 4481Zeile 4458
	}

// Permission to edit this ban?

	}

// Permission to edit this ban?

	if($banned['uid'] && $mybb->user['uid'] != $banned['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1)

	if(!empty($banned) && $banned['uid'] && $mybb->user['uid'] != $banned['admin'] && $mybb->usergroup['issupermod'] != 1 && $mybb->usergroup['cancp'] != 1)

	{
error_no_permission();
}

	{
error_no_permission();
}

Zeile 4543Zeile 4520
	$bangroup_option = $bangroups = '';
$numgroups = $banned_group = 0;
$groupscache = $cache->read("usergroups");

	$bangroup_option = $bangroups = '';
$numgroups = $banned_group = 0;
$groupscache = $cache->read("usergroups");





	foreach($groupscache as $key => $group)
{
if($group['isbannedgroup'])

	foreach($groupscache as $key => $group)
{
if($group['isbannedgroup'])

Zeile 4580Zeile 4557
		$uid = $banned['uid'];
}
else

		$uid = $banned['uid'];
}
else

	{

	{

		$lift_link = '';
$uid = 0;
}

		$lift_link = '';
$uid = 0;
}





	$plugins->run_hooks("modcp_banuser_end");

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

	$plugins->run_hooks("modcp_banuser_end");

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

}

}


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


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

Zeile 4608Zeile 4585

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


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





if(!$mybb->input['action'])
{
$awaitingattachments = $awaitingposts = $awaitingthreads = $awaitingmoderation = '';

if(!$mybb->input['action'])
{
$awaitingattachments = $awaitingposts = $awaitingthreads = $awaitingmoderation = '';

Zeile 4618Zeile 4595
		if($mybb->settings['enableattachments'] == 1 && ($nummodqueueattach > 0 || $mybb->usergroup['issupermod'] == 1))
{
if($nummodqueueposts > 0 || $mybb->usergroup['issupermod'] == 1)

		if($mybb->settings['enableattachments'] == 1 && ($nummodqueueattach > 0 || $mybb->usergroup['issupermod'] == 1))
{
if($nummodqueueposts > 0 || $mybb->usergroup['issupermod'] == 1)

			{

			{

				$bgcolor = "trow1";
}
else

				$bgcolor = "trow1";
}
else

Zeile 4681Zeile 4658
					FROM  ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
WHERE p.visible='0' {$tflist} AND t.firstpost != p.pid

					FROM  ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
WHERE p.visible='0' {$tflist} AND t.firstpost != p.pid

					ORDER BY p.dateline DESC

					ORDER BY p.dateline DESC, p.pid DESC

					LIMIT 1
");
$post = $db->fetch_array($query);

					LIMIT 1
");
$post = $db->fetch_array($query);

Zeile 4769Zeile 4746

$modlogresults = '';
while($logitem = $db->fetch_array($query))


$modlogresults = '';
while($logitem = $db->fetch_array($query))

		{

		{

			$information = '';
$logitem['action'] = htmlspecialchars_uni($logitem['action']);
$log_date = my_date('relative', $logitem['dateline']);

			$information = '';
$logitem['action'] = htmlspecialchars_uni($logitem['action']);
$log_date = my_date('relative', $logitem['dateline']);

Zeile 4801Zeile 4778
			if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject'])
{
$data = my_unserialize($logitem['data']);

			if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject'])
{
$data = my_unserialize($logitem['data']);

				if($data['uid'])

				if(isset($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'])

				if(isset($data['aid']))

				{
$data['subject'] = htmlspecialchars_uni($parser->parse_badwords($data['subject']));
$data['announcement'] = get_announcement_link($data['aid']);

				{
$data['subject'] = htmlspecialchars_uni($parser->parse_badwords($data['subject']));
$data['announcement'] = get_announcement_link($data['aid']);

Zeile 4920Zeile 4897
		eval("\$bannedusers = \"".$templates->get("modcp_nobanned")."\";");
}


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


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





	$modnotes = '';
$modnotes_cache = $cache->read("modnotes");
if($modnotes_cache !== false)
{
$modnotes = htmlspecialchars_uni($modnotes_cache['modmessage']);
}


$plugins->run_hooks("modcp_end");



$plugins->run_hooks("modcp_end");