Vergleich modcp.php - 1.8.10 - 1.8.37

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 11Zeile 11
define("IN_MYBB", 1);
define('THIS_SCRIPT', 'modcp.php');


define("IN_MYBB", 1);
define('THIS_SCRIPT', 'modcp.php');


$templatelist = "modcp_reports,modcp_reports_report,modcp_reports_multipage,modcp_reports_allreport,modcp_reports_allreports,modcp_modlogs_multipage,modcp_announcements_delete,modcp_announcements_edit,modcp_awaitingmoderation";

$templatelist = "modcp_reports,modcp_reports_report,modcp_reports_selectall,modcp_reports_multipage,modcp_reports_allreport,modcp_reports_allreports,modcp_modlogs_multipage,modcp_announcements_delete,modcp_announcements_edit,modcp_awaitingmoderation";

$templatelist .= ",modcp_reports_allnoreports,modcp_reports_noreports,modcp_banning,modcp_banning_ban,modcp_announcements_announcement_global,modcp_no_announcements_forum,modcp_modqueue_threads_thread,modcp_awaitingthreads,preview";
$templatelist .= ",modcp_banning_nobanned,modcp_modqueue_threads_empty,modcp_modqueue_masscontrols,modcp_modqueue_threads,modcp_modqueue_posts_post,modcp_modqueue_posts_empty,modcp_awaitingposts,modcp_nav_editprofile,modcp_nav_banning";
$templatelist .= ",modcp_nav,modcp_modlogs_noresults,modcp_modlogs_nologs,modcp,modcp_modqueue_posts,modcp_modqueue_attachments_attachment,modcp_modqueue_attachments_empty,modcp_modqueue_attachments,modcp_editprofile_suspensions_info";

$templatelist .= ",modcp_reports_allnoreports,modcp_reports_noreports,modcp_banning,modcp_banning_ban,modcp_announcements_announcement_global,modcp_no_announcements_forum,modcp_modqueue_threads_thread,modcp_awaitingthreads,preview";
$templatelist .= ",modcp_banning_nobanned,modcp_modqueue_threads_empty,modcp_modqueue_masscontrols,modcp_modqueue_threads,modcp_modqueue_posts_post,modcp_modqueue_posts_empty,modcp_awaitingposts,modcp_nav_editprofile,modcp_nav_banning";
$templatelist .= ",modcp_nav,modcp_modlogs_noresults,modcp_modlogs_nologs,modcp,modcp_modqueue_posts,modcp_modqueue_attachments_attachment,modcp_modqueue_attachments_empty,modcp_modqueue_attachments,modcp_editprofile_suspensions_info";

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

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

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

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

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



	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 232Zeile 206
if(($numreportedposts > 0 || $mybb->usergroup['issupermod'] == 1) && $mybb->usergroup['canmanagereportedcontent'] == 1)
{
eval("\$nav_reportcenter = \"".$templates->get("modcp_nav_reportcenter")."\";");

if(($numreportedposts > 0 || $mybb->usergroup['issupermod'] == 1) && $mybb->usergroup['canmanagereportedcontent'] == 1)
{
eval("\$nav_reportcenter = \"".$templates->get("modcp_nav_reportcenter")."\";");

}


}


if(($nummodlogs > 0 || $mybb->usergroup['issupermod'] == 1) && $mybb->usergroup['canviewmodlogs'] == 1)

if(($nummodlogs > 0 || $mybb->usergroup['issupermod'] == 1) && $mybb->usergroup['canviewmodlogs'] == 1)

{

{

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

if($mybb->usergroup['caneditprofiles'] == 1)
{
eval("\$nav_editprofile = \"".$templates->get("modcp_nav_editprofile")."\";");

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

if($mybb->usergroup['caneditprofiles'] == 1)
{
eval("\$nav_editprofile = \"".$templates->get("modcp_nav_editprofile")."\";");

}


}


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

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

{

{

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

if($mybb->usergroup['canviewwarnlogs'] == 1)
{
eval("\$nav_warninglogs = \"".$templates->get("modcp_nav_warninglogs")."\";");

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

if($mybb->usergroup['canviewwarnlogs'] == 1)
{
eval("\$nav_warninglogs = \"".$templates->get("modcp_nav_warninglogs")."\";");

}

}


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


if($mybb->usergroup['canuseipsearch'] == 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)) ? $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)) ? $lang->expcol_expand : $lang->expcol_collapse;

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

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

}


}


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

$plugins->run_hooks("modcp_start");

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

$plugins->run_hooks("modcp_start");

Zeile 285Zeile 261
	verify_post_check($mybb->get_input('my_post_key'));

$mybb->input['reports'] = $mybb->get_input('reports', MyBB::INPUT_ARRAY);

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

$mybb->input['reports'] = $mybb->get_input('reports', MyBB::INPUT_ARRAY);

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

	if(empty($mybb->input['reports']) && empty($mybb->cookies['inlinereports']))

	{
error($lang->error_noselected_reports);

	{
error($lang->error_noselected_reports);

	}

$sql = '1=1';
if(empty($mybb->input['allbox']))






























	}

$message = $lang->redirect_reportsmarked;

if(isset($mybb->cookies['inlinereports']))
{
if($mybb->cookies['inlinereports'] == '|ALL|') {
$message = $lang->redirect_allreportsmarked;
$sql = "1=1";
if(isset($mybb->cookies['inlinereports_removed']))
{
$inlinereportremovedlist = explode("|", $mybb->cookies['inlinereports_removed']);
$reports = array_map("intval", $inlinereportremovedlist);
$rids = implode("','", $reports);
$sql = "rid NOT IN ('0','{$rids}')";
}
}
else
{
$inlinereportlist = explode("|", $mybb->cookies['inlinereports']);
$reports = array_map("intval", $inlinereportlist);

if(!count($reports))
{
error($lang->error_noselected_reports);
}

$rids = implode("','", $reports);

$sql = "rid IN ('0','{$rids}')";
}
}
else

	{
$mybb->input['reports'] = array_map("intval", $mybb->input['reports']);
$rids = implode("','", $mybb->input['reports']);

	{
$mybb->input['reports'] = array_map("intval", $mybb->input['reports']);
$rids = implode("','", $mybb->input['reports']);





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

$plugins->run_hooks("modcp_do_reports");

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

$plugins->run_hooks("modcp_do_reports");





	$db->update_query("reportedcontent", array('reportstatus' => 1), "{$sql}{$flist_reports}");
$cache->update_reportedcontent();

	$db->update_query("reportedcontent", array('reportstatus' => 1), "{$sql}{$flist_reports}");
$cache->update_reportedcontent();







my_unsetcookie('inlinereports');
my_unsetcookie('inlinereports_removed');


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

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


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


redirect("modcp.php?action=reports&page={$page}", $message);

}

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

}

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

{

{

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

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

	{

	{

		error_no_permission();
}

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

		error_no_permission();
}

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

	}

	}


$lang->load('report');
add_breadcrumb($lang->mcp_nav_report_center, "modcp.php?action=reports");


$lang->load('report');
add_breadcrumb($lang->mcp_nav_report_center, "modcp.php?action=reports");

Zeile 328Zeile 336
	if(!$perpage)
{
$perpage = 20;

	if(!$perpage)
{
$perpage = 20;

	}

	}


// Multipage
if($mybb->usergroup['cancp'] || $mybb->usergroup['issupermod'])


// Multipage
if($mybb->usergroup['cancp'] || $mybb->usergroup['issupermod'])

	{

	{

		$query = $db->simple_select("reportedcontent", "COUNT(rid) AS count", "reportstatus ='0'");
$report_count = $db->fetch_field($query, "count");

		$query = $db->simple_select("reportedcontent", "COUNT(rid) AS count", "reportstatus ='0'");
$report_count = $db->fetch_field($query, "count");

	}
else
{

	}
else
{

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

$report_count = 0;

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

$report_count = 0;

Zeile 382Zeile 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 490Zeile 500
				$postcache[$post['pid']] = $post;
}
}

				$postcache[$post['pid']] = $post;
}
}

 

$lang->page_selected = $lang->sprintf($lang->page_selected, count($reportcache));
$lang->select_all = $lang->sprintf($lang->select_all, (int)$report_count);
$lang->all_selected = $lang->sprintf($lang->all_selected, (int)$report_count);
eval("\$selectall = \"".$templates->get("modcp_reports_selectall")."\";");


$plugins->run_hooks('modcp_reports_intermediate');



$plugins->run_hooks('modcp_reports_intermediate');


Zeile 567Zeile 582
				}
elseif($usercache[$report['lastreporter']] > 0)
{

				}
elseif($usercache[$report['lastreporter']] > 0)
{

					$lastreport_user = $lang->na_deleted;

					$lastreport_user = htmlspecialchars_uni($lang->na_deleted);

				}

$lastreport_date = my_date('relative', $report['lastreport']);
$report_data['lastreporter'] = $lang->sprintf($lang->report_info_lastreporter, $lastreport_date, $lastreport_user);

				}

$lastreport_date = my_date('relative', $report['lastreport']);
$report_data['lastreporter'] = $lang->sprintf($lang->report_info_lastreporter, $lastreport_date, $lastreport_user);

 
			}

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

			}

$plugins->run_hooks("modcp_reports_report");

			}

$plugins->run_hooks("modcp_reports_report");

Zeile 676Zeile 698
	}

$plugins->run_hooks("modcp_allreports_start");

	}

$plugins->run_hooks("modcp_allreports_start");





	$query = $db->query("
SELECT r.*, u.username, p.username AS postusername, up.uid AS postuid, t.subject AS threadsubject, prrep.username AS repusername, pr.username AS profileusername, rr.title
FROM ".TABLE_PREFIX."reportedcontent r

	$query = $db->query("
SELECT r.*, u.username, p.username AS postusername, up.uid AS postuid, t.subject AS threadsubject, prrep.username AS repusername, pr.username AS profileusername, rr.title
FROM ".TABLE_PREFIX."reportedcontent r

Zeile 785Zeile 807
	if(!$perpage || $perpage <= 0)
{
$perpage = $mybb->settings['threadsperpage'];

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

	}

$where = '';

	}

$where = '';


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

Zeile 907Zeile 929
		$logitem['action'] = htmlspecialchars_uni($logitem['action']);
$log_date = my_date('relative', $logitem['dateline']);
$trow = alt_trow();

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

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








		if($logitem['username'])
{
$logitem['username'] = htmlspecialchars_uni($logitem['username']);
$username = format_name($logitem['username'], $logitem['usergroup'], $logitem['displaygroup']);
$logitem['profilelink'] = build_profile_link($username, $logitem['uid']);
}
else
{
$username = $logitem['profilelink'] = $logitem['username'] = htmlspecialchars_uni($lang->na_deleted);
}

		$logitem['ipaddress'] = my_inet_ntop($db->unescape_binary($logitem['ipaddress']));

if($logitem['tsubject'])

		$logitem['ipaddress'] = my_inet_ntop($db->unescape_binary($logitem['ipaddress']));

if($logitem['tsubject'])

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

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

			}

			}

			if(!empty($data['aid']))
{
$data['subject'] = htmlspecialchars_uni($parser->parse_badwords($data['subject']));

			if(!empty($data['aid']))
{
$data['subject'] = htmlspecialchars_uni($parser->parse_badwords($data['subject']));

Zeile 946Zeile 975
				eval("\$information .= \"".$templates->get("modcp_modlogs_result_announcement")."\";");
}
}

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

 

$plugins->run_hooks("modcp_modlogs_result");


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


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

Zeile 953Zeile 984
	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 = array('username' => '', 'forum' => '', 'thread' => '', 'dateline' => '');


// Fetch filter options
$sortbysel = array('username' => '', 'forum' => '', 'thread' => '', 'dateline' => '');

Zeile 973Zeile 1004
	{
// Deleted Users
if(!$user['username'])

	{
// Deleted Users
if(!$user['username'])

		{

		{

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


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


Zeile 988Zeile 1019
	}

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

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

	{
error_no_permission();
}

Zeile 1121Zeile 1152

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



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

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

Zeile 1151Zeile 1182
		}
}


		}
}


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

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

	{
$allowhtml = 1;
}

	{
$allowhtml = 1;
}

Zeile 1200Zeile 1231
			);
$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);

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


$plugins->run_hooks("modcp_do_new_announcement_end");



$plugins->run_hooks("modcp_do_new_announcement_end");


Zeile 1272Zeile 1303
		$announcement = array(
'subject' => '',
'message' => '',

		$announcement = array(
'subject' => '',
'message' => '',

			'allowhtml' => 1,

			'allowhtml' => 0,

			'allowmycode' => 1,
'allowsmilies' => 1
);

			'allowmycode' => 1,
'allowsmilies' => 1
);

Zeile 1325Zeile 1356
	$message = htmlspecialchars_uni($announcement['message']);

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

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

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

	if($announcement['allowhtml'])
{
$html_sel['yes'] = ' checked="checked"';
}
else
{
$html_sel['no'] = ' checked="checked"';
}













if($mybb->settings['announcementshtml'])
{
if($announcement['allowhtml'])
{
$html_sel['yes'] = ' checked="checked"';
}
else
{
$html_sel['no'] = ' checked="checked"';
}

eval("\$allow_html = \"".$templates->get("modcp_announcements_allowhtml")."\";");
}
else
{
$allow_html = '';
}


	if($announcement['allowmycode'])
{
$mycode_sel['yes'] = ' checked="checked"';

	if($announcement['allowmycode'])
{
$mycode_sel['yes'] = ' checked="checked"';

	}
else
{

	}
else
{

		$mycode_sel['no'] = ' checked="checked"';
}


		$mycode_sel['no'] = ' checked="checked"';
}


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

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

	{

	{

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


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


Zeile 1371Zeile 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->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',
'stars' => 'groupstars',
'starimage' => 'groupstarimage',
'image' => 'groupimage',

			'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',
'stars' => 'groupstars',
'starimage' => 'groupstarimage',
'image' => 'groupimage',

			'namestyle' => 'namestyle',
'usereputationsystem' => 'usereputationsystem'
);

			'namestyle' => 'namestyle',
'usereputationsystem' => 'usereputationsystem'
);

Zeile 1403Zeile 1444
		{
$announcementarray[$key] = $groupscache[$announcementarray['usergroup']][$field];
}

		{
$announcementarray[$key] = $groupscache[$announcementarray['usergroup']][$field];
}





		require_once MYBB_ROOT."inc/functions_post.php";
$postbit = build_postbit($announcementarray, 3);
eval("\$preview = \"".$templates->get("previewpost")."\";");

		require_once MYBB_ROOT."inc/functions_post.php";
$postbit = build_postbit($announcementarray, 3);
eval("\$preview = \"".$templates->get("previewpost")."\";");

Zeile 1411Zeile 1452
	else
{
$preview = '';

	else
{
$preview = '';

	}

	}


$plugins->run_hooks("modcp_new_announcement");



$plugins->run_hooks("modcp_new_announcement");


Zeile 1424Zeile 1465
	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();
}


	// Get the announcement
$aid = $mybb->get_input('aid', MyBB::INPUT_INT);
$query = $db->simple_select("announcements", "*", "aid='{$aid}'");

	// Get the announcement
$aid = $mybb->get_input('aid', MyBB::INPUT_INT);
$query = $db->simple_select("announcements", "*", "aid='{$aid}'");

Zeile 1435Zeile 1476

// Check that it exists
if(!$announcement)


// Check that it exists
if(!$announcement)

	{

	{

		error($lang->error_invalid_announcement);
}


		error($lang->error_invalid_announcement);
}


Zeile 1443Zeile 1484
	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();

	}

	}


$errors = array();



$errors = array();


Zeile 1456Zeile 1497

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


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

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


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


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

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

Zeile 1471Zeile 1512
	{
$startdate[0] = 12+$startdate[0];
if($startdate[0] >= 24)

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

		{

		{

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

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

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


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


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

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


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

Zeile 1511Zeile 1552
		if(!in_array($mybb->input['endtime_month'], $months))
{
$mybb->input['endtime_month'] = '01';

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

		}

		}

		$enddate = gmmktime((int)$enddate[0], (int)$enddate[1], 0, $mybb->get_input('endtime_month', MyBB::INPUT_INT), $mybb->get_input('endtime_day', MyBB::INPUT_INT), $mybb->get_input('endtime_year', MyBB::INPUT_INT)) - $localized_time_offset;
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)

		$enddate = gmmktime((int)$enddate[0], (int)$enddate[1], 0, $mybb->get_input('endtime_month', MyBB::INPUT_INT), $mybb->get_input('endtime_day', MyBB::INPUT_INT), $mybb->get_input('endtime_year', MyBB::INPUT_INT)) - $localized_time_offset;
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;

			$errors[] = $lang->error_invalid_end_date;

		}

		}

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

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

		}
}

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

		}
}

if($mybb->settings['announcementshtml'] && $mybb->get_input('allowhtml', MyBB::INPUT_INT) == 1)
{
$allowhtml = 1;
}
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;
}
if($mybb->get_input('allowsmilies', MyBB::INPUT_INT) == 1)
{
$allowsmilies = 1;

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

	}
else
{

	}
else
{

		$allowsmilies = 0;
}

		$allowsmilies = 0;
}





	$plugins->run_hooks("modcp_do_edit_announcement_start");

// Proceed to update if no errors
if(!$errors)

	$plugins->run_hooks("modcp_do_edit_announcement_start");

// Proceed to update if no errors
if(!$errors)

	{

	{

		if(isset($mybb->input['preview']))
{
$preview = array();

		if(isset($mybb->input['preview']))
{
$preview = array();

Zeile 1572Zeile 1613
			);
$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);

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


$plugins->run_hooks("modcp_do_edit_announcement_end");



$plugins->run_hooks("modcp_do_edit_announcement_end");


Zeile 1587Zeile 1628
}

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

}

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

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

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

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

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


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

Zeile 1724Zeile 1765

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


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

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





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

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

	if($announcement['allowhtml'])



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

	{

	{

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










		if($announcement['allowhtml'])
{
$html_sel['yes'] = ' checked="checked"';
}
else
{
$html_sel['no'] = ' checked="checked"';
}

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

	}
else
{

	}
else
{

		$html_sel['no'] = ' checked="checked"';

		$allow_html = '';

	}

if($announcement['allowmycode'])

	}

if($announcement['allowmycode'])

Zeile 1778Zeile 1829
			'uid' => $mybb->user['uid'],
'subject' => $mybb->input['title'],
'message' => $mybb->input['message'],

			'uid' => $mybb->user['uid'],
'subject' => $mybb->input['title'],
'message' => $mybb->input['message'],

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

			'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,

			'allowmycode' => $mybb->get_input('allowmycode', MyBB::INPUT_INT),
'allowsmilies' => $mybb->get_input('allowsmilies', MyBB::INPUT_INT),
'dateline' => TIME_NOW,

Zeile 1857Zeile 1908
		{
// Get the global announcements
foreach($global_announcements as $aid => $announcement)

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

			{
$trow = alt_trow();
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")."\";");

				}

				}

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

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

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

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





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

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

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

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





if($mybb->input['action'] == "do_modqueue")
{
require_once MYBB_ROOT."inc/class_moderation.php";

if($mybb->input['action'] == "do_modqueue")
{
require_once MYBB_ROOT."inc/class_moderation.php";

Zeile 1929Zeile 1980
			if($action == "approve")
{
$threads_to_approve[] = $thread['tid'];

			if($action == "approve")
{
$threads_to_approve[] = $thread['tid'];

			}
else if($action == "delete")

			}
else if($action == "delete")

			{
$threads_to_delete[] = $thread['tid'];
}

			{
$threads_to_delete[] = $thread['tid'];
}

Zeile 1939Zeile 1990
		{
$moderation->approve_threads($threads_to_approve);
log_moderator_action(array('tids' => $threads_to_approve), $lang->multi_approve_threads);

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

		}

		}

		if(!empty($threads_to_delete))
{
if($mybb->settings['soft_delete'] == 1)

		if(!empty($threads_to_delete))
{
if($mybb->settings['soft_delete'] == 1)

			{

			{

				$moderation->soft_delete_threads($threads_to_delete);
log_moderator_action(array('tids' => $threads_to_delete), $lang->multi_soft_delete_threads);

				$moderation->soft_delete_threads($threads_to_delete);
log_moderator_action(array('tids' => $threads_to_delete), $lang->multi_soft_delete_threads);

			}
else
{

			}
else
{

				foreach($threads_to_delete as $tid)
{
$moderation->delete_thread($tid);

				foreach($threads_to_delete as $tid)
{
$moderation->delete_thread($tid);

Zeile 1975Zeile 2026
			}
$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)

Zeile 2002Zeile 2053
			else
{
log_moderator_action(array('pids' => $posts_to_delete), $lang->multi_delete_posts);

			else
{
log_moderator_action(array('pids' => $posts_to_delete), $lang->multi_delete_posts);

			}

			}

		}

		}





		$plugins->run_hooks("modcp_do_modqueue_end");

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

		$plugins->run_hooks("modcp_do_modqueue_end");

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

	{

	{

		$attachments = array_map("intval", array_keys($mybb->input['attachments']));
$query = $db->query("

		$attachments = array_map("intval", array_keys($mybb->input['attachments']));
$query = $db->query("

			SELECT a.pid, a.aid

			SELECT a.pid, a.aid, t.tid

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

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

Zeile 2027Zeile 2078
			}
$action = $mybb->input['attachments'][$attachment['aid']];
if($action == "approve")

			}
$action = $mybb->input['attachments'][$attachment['aid']];
if($action == "approve")

			{

			{

				$db->update_query("attachments", array("visible" => 1), "aid='{$attachment['aid']}'");

				$db->update_query("attachments", array("visible" => 1), "aid='{$attachment['aid']}'");

			}





				if(isset($attachment['tid']))
{
update_thread_counters((int)$attachment['tid'], array("attachmentcount" => "+1"));
}
}

			else if($action == "delete")
{
remove_attachment($attachment['pid'], '', $attachment['aid']);

			else if($action == "delete")
{
remove_attachment($attachment['pid'], '', $attachment['aid']);

 
				if(isset($attachment['tid']))
{
update_thread_counters((int)$attachment['tid'], array("attachmentcount" => "-1"));
}

			}

			}

		}


		}


		$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 2052Zeile 2111
	}

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

	}

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

	{

	{

		error($lang->you_cannot_use_mod_queue);
}


		error($lang->you_cannot_use_mod_queue);
}


Zeile 2069Zeile 2128

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


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


// Figure out if we need to display multiple pages.
if($mybb->get_input('page') != "last")
{
$page = $mybb->get_input('page', MyBB::INPUT_INT);
}


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


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

Zeile 2083Zeile 2142
		if($mybb->get_input('page') == "last")
{
$page = $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 2120Zeile 2179
			$forum_link = get_forum_link($thread['fid']);
$forum_name = $forum_cache[$thread['fid']]['name'];
$threaddate = my_date('relative', $thread['dateline']);

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





			if($thread['username'] == "")
{
if($thread['threadusername'] != "")

			if($thread['username'] == "")
{
if($thread['threadusername'] != "")

Zeile 2138Zeile 2197
				$thread['username'] = htmlspecialchars_uni($thread['username']);
$profile_link = build_profile_link($thread['username'], $thread['uid']);
}

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





			$thread['postmessage'] = nl2br(htmlspecialchars_uni($thread['postmessage']));
eval("\$forum = \"".$templates->get("modcp_modqueue_link_forum")."\";");
eval("\$threads .= \"".$templates->get("modcp_modqueue_threads_thread")."\";");
}

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

			$thread['postmessage'] = nl2br(htmlspecialchars_uni($thread['postmessage']));
eval("\$forum = \"".$templates->get("modcp_modqueue_link_forum")."\";");
eval("\$threads .= \"".$templates->get("modcp_modqueue_threads_thread")."\";");
}

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

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

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

		}

if($threads)

		}

if($threads)

Zeile 2199Zeile 2258

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

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

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

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

		}

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

		}

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

Zeile 2229Zeile 2288
			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 = '';

			LIMIT {$start}, {$perpage}
");
$posts = '';

Zeile 2364Zeile 2423
		while($attachment = $db->fetch_array($query))
{
$altbg = alt_trow();

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





			if(!$attachment['dateuploaded'])
{
$attachment['dateuploaded'] = $attachment['dateline'];

			if(!$attachment['dateuploaded'])
{
$attachment['dateuploaded'] = $attachment['dateline'];

Zeile 2399Zeile 2458
			if($nummodqueuethreads > 0 || $mybb->usergroup['issupermod'] == 1)
{
eval("\$thread_link = \"".$templates->get("modcp_modqueue_thread_link")."\";");

			if($nummodqueuethreads > 0 || $mybb->usergroup['issupermod'] == 1)
{
eval("\$thread_link = \"".$templates->get("modcp_modqueue_thread_link")."\";");

				$navsep = " | ";
}

				$navsep = " | ";
}


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


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

Zeile 2418Zeile 2477
	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");

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

		$plugins->run_hooks("modcp_modqueue_end");

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

Zeile 2429Zeile 2488
if($mybb->input['action'] == "do_editprofile")
{
// Verify incoming POST request

if($mybb->input['action'] == "do_editprofile")
{
// Verify incoming POST request

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


	verify_post_check($mybb->get_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($lang->error_nomember);

	{
error_no_permission();







	}


	}


	// Check if the current user has permission to edit this user
if(!modcp_can_manage_user($user['uid']))
{
error_no_permission();







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

// Check if the current user has permission to edit this user
if(!modcp_can_manage_user($user['uid']))
{
error_no_permission();

	}

$plugins->run_hooks("modcp_do_editprofile_start");

	}

$plugins->run_hooks("modcp_do_editprofile_start");

Zeile 2511Zeile 2570
		"profile_fields_editable" => true,
"website" => $mybb->get_input('website'),
"icq" => $mybb->get_input('icq'),

		"profile_fields_editable" => true,
"website" => $mybb->get_input('website'),
"icq" => $mybb->get_input('icq'),

		"aim" => $mybb->get_input('aim'),
"yahoo" => $mybb->get_input('yahoo'),

 
		"skype" => $mybb->get_input('skype'),
"google" => $mybb->get_input('google'),
"signature" => $mybb->get_input('signature'),

		"skype" => $mybb->get_input('skype'),
"google" => $mybb->get_input('google'),
"signature" => $mybb->get_input('signature'),

Zeile 2542Zeile 2599

// Set the data of the user in the datahandler.
$userhandler->set_data($updated_user);


// Set the data of the user in the datahandler.
$userhandler->set_data($updated_user);

	$errors = '';

	$errors = array();


// Validate the user and get any errors that might have occurred.
if(!$userhandler->validate_user())


// Validate the user and get any errors that might have occurred.
if(!$userhandler->validate_user())

Zeile 2591Zeile 2648
		require_once MYBB_ROOT."inc/functions_warnings.php";
foreach($moderator_options as $option)
{

		require_once MYBB_ROOT."inc/functions_warnings.php";
foreach($moderator_options as $option)
{

			$mybb->input[$option['time']] = $mybb->get_input($option['time'], MyBB::INPUT_INT);

			${$option['time']} = $mybb->get_input($option['time'], MyBB::INPUT_INT);

			$mybb->input[$option['period']] = $mybb->get_input($option['period']);
if(empty($mybb->input[$option['action']]))
{

			$mybb->input[$option['period']] = $mybb->get_input($option['period']);
if(empty($mybb->input[$option['action']]))
{

Zeile 2614Zeile 2671
					$string = $option['action']."_error";
$errors[] = $lang->$string;
}

					$string = $option['action']."_error";
$errors[] = $lang->$string;
}


if(!is_array($errors))

				else


				{
$suspend_length = fetch_time_length((int)$mybb->input[$option['time']], $mybb->input[$option['period']]);


				{
$suspend_length = fetch_time_length((int)$mybb->input[$option['time']], $mybb->input[$option['period']]);


Zeile 2652Zeile 2708

// 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;
}


		if(is_array($errors))

		if(is_array($errors) && !empty($errors))

		{
$mybb->input['action'] = "editprofile";
}

		{
$mybb->input['action'] = "editprofile";
}

Zeile 2699Zeile 2755
	if(!modcp_can_manage_user($user['uid']))
{
error_no_permission();

	if(!modcp_can_manage_user($user['uid']))
{
error_no_permission();

 
	}

$userperms = user_permissions($user['uid']);

// Set display group
$displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");

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

$display_group = usergroup_displaygroup($user['displaygroup']);
if(is_array($display_group))
{
$userperms = array_merge($userperms, $display_group);

	}

if(!my_validate_url($user['website']))
{
$user['website'] = '';

	}

if(!my_validate_url($user['website']))
{
$user['website'] = '';

	}


	}


	if($user['icq'] != "0")
{
$user['icq'] = (int)$user['icq'];

	if($user['icq'] != "0")
{
$user['icq'] = (int)$user['icq'];

	}


	}


	if(!$errors)
{
$mybb->input = array_merge($user, $mybb->input);

	if(!$errors)
{
$mybb->input = array_merge($user, $mybb->input);

Zeile 2731Zeile 2803
	}

// Sanitize all input

	}

// Sanitize all input

	foreach(array('usertitle', 'website', 'icq', 'aim', 'yahoo', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field)

	foreach(array('usertitle', 'website', 'icq', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field)

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


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


	// Custom user title, check to see if we have a default group title
if(!$user['displaygroup'])
{
$user['displaygroup'] = $user['usergroup'];
}

$displaygroupfields = array('usertitle');
$display_group = usergroup_displaygroup($user['displaygroup']);

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

	// Custom user title
if(!empty($userperms['usertitle']))









	{

	{

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

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

	}
else
{

	}
else
{

Zeile 2758Zeile 2822
		{
if($title['posts'] <= $user['postnum'])
{

		{
if($title['posts'] <= $user['postnum'])
{

				$defaulttitle = $title['title'];

				$defaulttitle = htmlspecialchars_uni($title['title']);

				break;
}
}

				break;
}
}

Zeile 2792Zeile 2856
		$bdaymonthsel[$month] = '';
}
$bdaymonthsel[$mybb->input['birthday_month']] = 'selected="selected"';

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

 

$awaysection = '';


if($mybb->settings['allowaway'] != 0)
{
$awaycheck = array('', '');
if($errors)


if($mybb->settings['allowaway'] != 0)
{
$awaycheck = array('', '');
if($errors)

		{
if($user['away'] == 1)
{
$awaycheck[1] = "checked=\"checked\"";
}
else

		{
if($user['away'] == 1)
{
$awaycheck[1] = "checked=\"checked\"";
}
else

			{
$awaycheck[0] = "checked=\"checked\"";
}

			{
$awaycheck[0] = "checked=\"checked\"";
}

Zeile 2816Zeile 2882
		{
$user['awayreason'] = htmlspecialchars_uni($user['awayreason']);
if($user['away'] == 1)

		{
$user['awayreason'] = htmlspecialchars_uni($user['awayreason']);
if($user['away'] == 1)

			{

			{

				$awaydate = my_date($mybb->settings['dateformat'], $user['awaydate']);
$awaycheck[1] = "checked=\"checked\"";
$awaynotice = $lang->sprintf($lang->away_notice_away, $awaydate);

				$awaydate = my_date($mybb->settings['dateformat'], $user['awaydate']);
$awaycheck[1] = "checked=\"checked\"";
$awaynotice = $lang->sprintf($lang->away_notice_away, $awaydate);

			}
else
{
$awaynotice = $lang->away_notice;

			}
else
{
$awaynotice = $lang->away_notice;

				$awaycheck[0] = "checked=\"checked\"";
}
$returndate = explode("-", $user['returndate']);

				$awaycheck[0] = "checked=\"checked\"";
}
$returndate = explode("-", $user['returndate']);

Zeile 2841Zeile 2907
			}

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

			}

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

		}


		}


		$returndatemonthsel = array();
foreach(range(1, 12) as $month)

		$returndatemonthsel = array();
foreach(range(1, 12) as $month)

		{

		{

			$returndatemonthsel[$month] = '';
}
if(isset($returndate[1]))
{
$returndatemonthsel[$returndate[1]] = " selected=\"selected\"";

			$returndatemonthsel[$month] = '';
}
if(isset($returndate[1]))
{
$returndatemonthsel[$returndate[1]] = " selected=\"selected\"";

		}


		}


		if(!isset($returndate[2]))
{
$returndate[2] = '';
}

		if(!isset($returndate[2]))
{
$returndate[2] = '';
}





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

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

	}

$plugins->run_hooks("modcp_editprofile_start");

	}

$plugins->run_hooks("modcp_editprofile_start");


// Fetch profile fields


// 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 = '';
$mybb->input['profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);


$requiredfields = '';
$customfields = '';
$mybb->input['profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);





	$pfcache = $cache->read('profilefields');

if(is_array($pfcache))
{
foreach($pfcache as $profilefield)
{

	$pfcache = $cache->read('profilefields');

if(is_array($pfcache))
{
foreach($pfcache as $profilefield)
{

			$userfield = $code = $select = $val = $options = $expoptions = $useropts = $seloptions = '';


			$userfield = $code = $select = $val = $options = $expoptions = $useropts = '';
$seloptions = array();

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

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

Zeile 2889Zeile 2960
			}
$field = "fid{$profilefield['fid']}";
if($errors)

			}
$field = "fid{$profilefield['fid']}";
if($errors)

			{

			{

				if(isset($mybb->input['profile_fields'][$field]))
{
$userfield = $mybb->input['profile_fields'][$field];
}

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

			}

			}

			if($type == "multiselect")
{
if($errors)

			if($type == "multiselect")
{
if($errors)

				{

				{

					$useropts = $userfield;
}
else
{
$useropts = explode("\n", $userfield);

					$useropts = $userfield;
}
else
{
$useropts = explode("\n", $userfield);

				}

				}

				if(is_array($useropts))
{
foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;

				if(is_array($useropts))
{
foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;

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

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

				{
foreach($expoptions as $key => $val)
{

				{
foreach($expoptions as $key => $val)
{

Zeile 2926Zeile 2997

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


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

						{

						{

							$sel = " selected=\"selected\"";
}


							$sel = " selected=\"selected\"";
}


Zeile 2935Zeile 3006
					if(!$profilefield['length'])
{
$profilefield['length'] = 3;

					if(!$profilefield['length'])
{
$profilefield['length'] = 3;

					}

					}


eval("\$code = \"".$templates->get("usercp_profile_profilefields_multiselect")."\";");
}
}
elseif($type == "select")


eval("\$code = \"".$templates->get("usercp_profile_profilefields_multiselect")."\";");
}
}
elseif($type == "select")

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

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

					foreach($expoptions as $key => $val)
{
$val = trim($val);

					foreach($expoptions as $key => $val)
{
$val = trim($val);

Zeile 2971Zeile 3042
				if(is_array($expoptions))
{
foreach($expoptions as $key => $val)

				if(is_array($expoptions))
{
foreach($expoptions as $key => $val)

					{

					{

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

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

Zeile 2979Zeile 3050
						}

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

						}

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

					}
}

					}
}

			}
elseif($type == "checkbox")
{

			}
elseif($type == "checkbox")
{

Zeile 2989Zeile 3060
					$useropts = $userfield;
}
else

					$useropts = $userfield;
}
else

				{

				{

					$useropts = explode("\n", $userfield);

					$useropts = explode("\n", $userfield);

				}

				}

				if(is_array($useropts))
{
foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;

				if(is_array($useropts))
{
foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;

					}
}

					}
}

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

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

Zeile 3015Zeile 3086
				}
}
elseif($type == "textarea")

				}
}
elseif($type == "textarea")

			{
$value = htmlspecialchars_uni($userfield);

			{
$value = htmlspecialchars_uni($userfield);

				eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";");
}
else

				eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";");
}
else

Zeile 3034Zeile 3105
			if($profilefield['required'] == 1)
{
eval("\$requiredfields .= \"".$templates->get("usercp_profile_customfield")."\";");

			if($profilefield['required'] == 1)
{
eval("\$requiredfields .= \"".$templates->get("usercp_profile_customfield")."\";");

			}

			}

			else
{
eval("\$customfields .= \"".$templates->get("usercp_profile_customfield")."\";");

			else
{
eval("\$customfields .= \"".$templates->get("usercp_profile_customfield")."\";");

Zeile 3043Zeile 3114
		}
}
if($customfields)

		}
}
if($customfields)

	{

	{

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


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


Zeile 3124Zeile 3195

$suspendsignature_info = $moderateposts_info = $suspendposting_info = '';
$action_options = $modpost_options = $suspost_options = '';


$suspendsignature_info = $moderateposts_info = $suspendposting_info = '';
$action_options = $modpost_options = $suspost_options = '';

 
	$modopts = array();

	foreach($moderator_options as $option)
{

	foreach($moderator_options as $option)
{

		$mybb->input[$option['time']] = $mybb->get_input($option['time'], MyBB::INPUT_INT);

		${$option['time']} = $mybb->get_input($option['time'], MyBB::INPUT_INT);

		// 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 3186Zeile 3258
				break;
case "suspendposting":
eval("\$suspost_options = \"".$templates->get("modcp_editprofile_select")."\";");

				break;
case "suspendposting":
eval("\$suspost_options = \"".$templates->get("modcp_editprofile_select")."\";");

				break;
}
}

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




				break;
}
}

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

$user['usernotes'] = htmlspecialchars_uni($user['usernotes']);


	if(!isset($newtitle))
{
$newtitle = '';
}

	if(!isset($newtitle))
{
$newtitle = '';
}

 

$birthday_year = $mybb->input['birthday_year'];
$user_website = $mybb->input['website'];
$user_icq = $mybb->input['icq'];
$user_skype = $mybb->input['skype'];
$user_google = $mybb->input['google'];


$plugins->run_hooks("modcp_editprofile_end");



$plugins->run_hooks("modcp_editprofile_end");


Zeile 3343Zeile 3423

$plugins->run_hooks("modcp_finduser_end");



$plugins->run_hooks("modcp_finduser_end");


 
	$username = htmlspecialchars_uni($mybb->get_input('username'));

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

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

Zeile 3481Zeile 3562
	if(isset($mybb->input['filter']['per_page']) && (int)$mybb->input['filter']['per_page'] > 0)
{
$per_page = (int)$mybb->input['filter']['per_page'];

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

	}

	}

	$start = ($page-1) * $per_page;

	$start = ($page-1) * $per_page;

 
	$pages = ceil($total_warnings / $per_page);
if($page > $pages)
{
$start = 0;
$page = 1;
}

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

Zeile 3491Zeile 3578
		{
$value = urlencode($value);
$url .= "&amp;filter[{$field}]={$value}";

		{
$value = urlencode($value);
$url .= "&amp;filter[{$field}]={$value}";

		}

		}

	}
$multipage = multipage($total_warnings, $per_page, $page, $url);


	}
$multipage = multipage($total_warnings, $per_page, $page, $url);


Zeile 3524Zeile 3611
		$row['mod_username'] = htmlspecialchars_uni($row['mod_username']);
$mod_username = format_name($row['mod_username'], $row['mod_usergroup'], $row['mod_displaygroup']);
$mod_username_link = build_profile_link($mod_username, $row['mod_uid']);

		$row['mod_username'] = htmlspecialchars_uni($row['mod_username']);
$mod_username = format_name($row['mod_username'], $row['mod_usergroup'], $row['mod_displaygroup']);
$mod_username_link = build_profile_link($mod_username, $row['mod_uid']);

		$issued_date = my_date($mybb->settings['dateformat'], $row['dateline']).' '.my_date($mybb->settings['timeformat'], $row['dateline']);

		$issued_date = my_date('normal', $row['dateline']);

		$revoked_text = '';
if($row['daterevoked'] > 0)
{

		$revoked_text = '';
if($row['daterevoked'] > 0)
{

Zeile 3533Zeile 3620
		}
if($row['expires'] > 0)
{

		}
if($row['expires'] > 0)
{

			$expire_date = my_date('relative', $row['expires'], '', 2);

			$expire_date = nice_time($row['expires']-TIME_NOW);

		}
else
{
$expire_date = $lang->never;

		}
else
{
$expire_date = $lang->never;

		}

		}

		$title = $row['title'];
if(empty($row['title']))
{

		$title = $row['title'];
if(empty($row['title']))
{

Zeile 3556Zeile 3643
	if(!$warning_list)
{
eval("\$warning_list = \"".$templates->get("modcp_warninglogs_nologs")."\";");

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

	}


	}


	$plugins->run_hooks("modcp_warninglogs_end");

	$plugins->run_hooks("modcp_warninglogs_end");

 

$filter_username = $mybb->input['filter']['username'];
$filter_modusername = $mybb->input['filter']['mod_username'];
$filter_reason = $mybb->input['filter']['reason'];


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


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

Zeile 3573Zeile 3664

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 3590Zeile 3682
		// Searching post IP addresses
if(isset($mybb->input['search_posts']))
{

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

 
			$post_ip_sql = '';

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

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

Zeile 3601Zeile 3694
					$post_ip_sql = "p.ipaddress BETWEEN ".$db->escape_binary($ip_range[0])." AND ".$db->escape_binary($ip_range[1]);
}
}

					$post_ip_sql = "p.ipaddress BETWEEN ".$db->escape_binary($ip_range[0])." AND ".$db->escape_binary($ip_range[1]);
}
}





			$plugins->run_hooks("modcp_ipsearch_posts_start");

if($post_ip_sql)

			$plugins->run_hooks("modcp_ipsearch_posts_start");

if($post_ip_sql)

Zeile 3628Zeile 3721
					if(isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] == 1)
{
$onlyusfids[] = $fid;

					if(isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] == 1)
{
$onlyusfids[] = $fid;

					}
}


					}
}


				if(!empty($onlyusfids))
{
$where_sql .= " AND ((t.fid IN(".implode(',', $onlyusfids).") AND t.uid='{$mybb->user['uid']}') OR t.fid NOT IN(".implode(',', $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)."))";

Zeile 3638Zeile 3731

// Moderators can view unapproved/deleted posts
if($mybb->usergroup['issupermod'] != 1)


// Moderators can view unapproved/deleted posts
if($mybb->usergroup['issupermod'] != 1)

				{

				{

					$unapprove_forums = array();
$deleted_forums = array();
$visible_sql = " AND (p.visible = 1 AND t.visible = 1)";

					$unapprove_forums = array();
$deleted_forums = array();
$visible_sql = " AND (p.visible = 1 AND t.visible = 1)";

Zeile 3664Zeile 3757
					{
$visible_sql .= " OR (p.visible = -1 AND p.fid IN(".implode(',', $deleted_forums).")) OR (t.visible = -1 AND t.fid IN(".implode(',', $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)."))";
}

				}
else

				}
else

				{
// Super moderators (and admins)
$visible_sql = " AND p.visible >= -1";

				{
// Super moderators (and admins)
$visible_sql = " AND p.visible >= -1";

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

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

 
			$user_ip_sql = '';

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

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

Zeile 3701Zeile 3795
			if($user_ip_sql)
{
$query = $db->simple_select('users', 'COUNT(uid) AS count', $user_ip_sql);

			if($user_ip_sql)
{
$query = $db->simple_select('users', 'COUNT(uid) AS count', $user_ip_sql);





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

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





		$total_results = $post_results+$user_results;

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

		$total_results = $post_results+$user_results;

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

		}

		}


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


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

Zeile 3736Zeile 3830

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


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

			$page = 1;
}

if($page)
{

			$page = 1;
}

if($page)
{

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

			$start = ($page-1) * $perpage;
}
else
{
$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 3774Zeile 3868
				$trow = alt_trow();
$ip = false;
if(is_array($ip_range))

				$trow = alt_trow();
$ip = false;
if(is_array($ip_range))

				{

				{

					if(strcmp($ip_range[0], $ipaddress['regip']) <= 0 && strcmp($ip_range[1], $ipaddress['regip']) >= 0)
{
eval("\$subject = \"".$templates->get("modcp_ipsearch_result_regip")."\";");

					if(strcmp($ip_range[0], $ipaddress['regip']) <= 0 && strcmp($ip_range[1], $ipaddress['regip']) >= 0)
{
eval("\$subject = \"".$templates->get("modcp_ipsearch_result_regip")."\";");

Zeile 3802Zeile 3896
					$result = true;
}
if($result)

					$result = true;
}
if($result)

				{

				{

					--$post_limit;
}
}

					--$post_limit;
}
}

Zeile 3825Zeile 3919
				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 3839Zeile 3933
			{
$query = $db->simple_select("threads", "subject, tid", "tid IN(".implode(',', array_keys($tids)).")");
while($thread = $db->fetch_array($query))

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

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

Zeile 3848Zeile 3942
				while($user = $db->fetch_array($query))
{
$ipaddresses[$uids[$user['uid']]]['username'] = $user['username'];

				while($user = $db->fetch_array($query))
{
$ipaddresses[$uids[$user['uid']]]['username'] = $user['username'];

				}

				}

				unset($uids);

foreach($ipaddresses as $ipaddress)
{
$ip = my_inet_ntop($db->unescape_binary($ipaddress['ipaddress']));

				unset($uids);

foreach($ipaddresses as $ipaddress)
{
$ip = my_inet_ntop($db->unescape_binary($ipaddress['ipaddress']));

					if(!$ipaddress['username'])

					if(empty($ipaddress['username']))

					{
$ipaddress['username'] = $ipaddress['postusername']; // Guest username support
}
$ipaddress['username'] = htmlspecialchars_uni($ipaddress['username']);
$trow = alt_trow();

					{
$ipaddress['username'] = $ipaddress['postusername']; // Guest username support
}
$ipaddress['username'] = htmlspecialchars_uni($ipaddress['username']);
$trow = alt_trow();

					if(!$ipaddress['subject'])

					if(empty($ipaddress['subject']))

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

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

Zeile 3878Zeile 3972
		if(!$results)
{
eval("\$results = \"".$templates->get("modcp_ipsearch_noresults")."\";");

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

		}

		}


if($ipaddressvalue)


if($ipaddressvalue)

		{

		{

			$lang->ipsearch_results = $lang->sprintf($lang->ipsearch_results, $ipaddressvalue);
}
else
{
$lang->ipsearch_results = $lang->ipsearch;

			$lang->ipsearch_results = $lang->sprintf($lang->ipsearch_results, $ipaddressvalue);
}
else
{
$lang->ipsearch_results = $lang->ipsearch;

		}

		}


$ipaddress = $ipaddress_url = $misc_info_link = '';
if(!strstr($mybb->input['ipaddress'], "*") && !strstr($mybb->input['ipaddress'], "/"))


$ipaddress = $ipaddress_url = $misc_info_link = '';
if(!strstr($mybb->input['ipaddress'], "*") && !strstr($mybb->input['ipaddress'], "/"))

Zeile 3896Zeile 3990
			$ipaddress_url = urlencode($mybb->input['ipaddress']);
eval("\$misc_info_link = \"".$templates->get("modcp_ipsearch_results_information")."\";");
}

			$ipaddress_url = urlencode($mybb->input['ipaddress']);
eval("\$misc_info_link = \"".$templates->get("modcp_ipsearch_results_information")."\";");
}





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


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


Zeile 3905Zeile 3999
	{
$mybb->input['search_posts'] = 1;
$mybb->input['search_users'] = 1;

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

	}

	}

	$usersearchselect = $postsearchselect = '';
if(isset($mybb->input['search_posts']))
{

	$usersearchselect = $postsearchselect = '';
if(isset($mybb->input['search_posts']))
{

Zeile 3923Zeile 4017
}

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

}

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

{

{

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

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

Zeile 4069Zeile 4163

$banned_class = '';
$ban_remaining = "{$timeremaining} {$lang->ban_remaining}";


$banned_class = '';
$ban_remaining = "{$timeremaining} {$lang->ban_remaining}";





			if($remaining <= 0)
{
$banned_class = "imminent_banned";

			if($remaining <= 0)
{
$banned_class = "imminent_banned";

Zeile 4140Zeile 4234

$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 4166Zeile 4259
	}

// 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 4177Zeile 4271
		");
$user = $db->fetch_array($query);


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


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

		if($user)


		{
$existing_ban = true;
}

		{
$existing_ban = true;
}

Zeile 4189Zeile 4282
			error_no_permission();
}
}

			error_no_permission();
}
}

 

$errors = array();


// Creating a new ban
if(!$existing_ban)


// Creating a new ban
if(!$existing_ban)

Zeile 4197Zeile 4292
		$options = array(
'fields' => array('username', 'usergroup', 'additionalgroups', 'displaygroup')
);

		$options = array(
'fields' => array('username', 'usergroup', 'additionalgroups', 'displaygroup')
);





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


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


		if(!$user['uid'])

		if(!$user)

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

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

	}


	}


	if($user['uid'] == $mybb->user['uid'])
{
$errors[] = $lang->error_cannotbanself;

	if($user['uid'] == $mybb->user['uid'])
{
$errors[] = $lang->error_cannotbanself;

	}

	}


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


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

Zeile 4219Zeile 4314

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


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

	{

	{

		$errors[] = $lang->error_nobanreason;

		$errors[] = $lang->error_nobanreason;

	}

	}


// Check banned group
$usergroups_cache = $cache->read('usergroups');


// Check banned group
$usergroups_cache = $cache->read('usergroups');

	$usergroup = $usergroups_cache[$mybb->get_input('usergroup', MyBB::INPUT_INT)];
$query = $db->simple_select("usergroups", "gid", "isbannedgroup=1 AND gid='".$mybb->get_input('usergroup', MyBB::INPUT_INT)."'");



	if(isset($usergroups_cache[$mybb->get_input('usergroup', MyBB::INPUT_INT)]))
{
$usergroup = $usergroups_cache[$mybb->get_input('usergroup', MyBB::INPUT_INT)];
}





	if(empty($usergroup['gid']) || empty($usergroup['isbannedgroup']))

	if(!isset($usergroup) || empty($usergroup['isbannedgroup']))

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

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

Zeile 4236Zeile 4333
	// 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 4282Zeile 4379
				'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 4301Zeile 4398
			'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 4366Zeile 4461
			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 4378Zeile 4473
	}

// 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 4447Zeile 4542
		{
$selected = "";
if(isset($banned['gid']) && $banned['gid'] == $group['gid'])

		{
$selected = "";
if(isset($banned['gid']) && $banned['gid'] == $group['gid'])

			{

			{

				$selected = " selected=\"selected\"";
}


				$selected = " selected=\"selected\"";
}


Zeile 4481Zeile 4576
		$lift_link = '';
$uid = 0;
}

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





	$plugins->run_hooks("modcp_banuser_end");

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

	$plugins->run_hooks("modcp_banuser_end");

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

Zeile 4517Zeile 4612
			if($nummodqueueposts > 0 || $mybb->usergroup['issupermod'] == 1)
{
$bgcolor = "trow1";

			if($nummodqueueposts > 0 || $mybb->usergroup['issupermod'] == 1)
{
$bgcolor = "trow1";

			}
else
{

			}
else
{

				$bgcolor = "trow2";
}


				$bgcolor = "trow2";
}


Zeile 4578Zeile 4673
					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 4649Zeile 4744
		$where = '';
if($tflist_modlog)
{

		$where = '';
if($tflist_modlog)
{

			$where = "WHERE (t.fid <> 0 {$tflist_modlog}) OR (!l.fid)";

			$where = "WHERE (t.fid <> 0 {$tflist_modlog}) OR (l.fid <> 0)";

		}

$query = $db->query("

		}

$query = $db->query("

Zeile 4698Zeile 4793
			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']);
eval("\$information .= \"".$templates->get("modcp_modlogs_result_announcement")."\";");
}
}

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

 

$plugins->run_hooks("modcp_modlogs_result");


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


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

Zeile 4815Zeile 4912
		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");