Vergleich modcp.php - 1.8.17 - 1.8.38

  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 180Zeile 154
$unviewablefids1 = $unviewablefids2 = array();

if($unviewableforums)

$unviewablefids1 = $unviewablefids2 = array();

if($unviewableforums)

{

{

	$flist .= " AND fid NOT IN ({$unviewableforums})";
$tflist .= " AND t.fid NOT IN ({$unviewableforums})";


	$flist .= " AND fid NOT IN ({$unviewableforums})";
$tflist .= " AND t.fid NOT IN ({$unviewableforums})";


Zeile 257Zeile 231
if($mybb->usergroup['canuseipsearch'] == 1)
{
eval("\$nav_ipsearch = \"".$templates->get("modcp_nav_ipsearch")."\";");

if($mybb->usergroup['canuseipsearch'] == 1)
{
eval("\$nav_ipsearch = \"".$templates->get("modcp_nav_ipsearch")."\";");

}


}


$plugins->run_hooks("modcp_nav");

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

$plugins->run_hooks("modcp_nav");

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 337Zeile 311

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


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


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

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 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 1283Zeile 1258
	$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)))

	{
error_no_permission();
}

// Deal with inline errors
if(!empty($errors) || isset($preview))
{

	{
error_no_permission();
}

// Deal with inline errors
if(!empty($errors) || isset($preview))
{

		if(!empty($errors))
{
$errors = inline_error($errors);

		if(!empty($errors))
{
$errors = inline_error($errors);

		}
else
{

		}
else
{

			$errors = '';
}


			$errors = '';
}


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)

	}

// 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[$month] = '';
$endmonthsel[$month] = '';

Zeile 1383Zeile 1358
	$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'])

	{

	{

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

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

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

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

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

Zeile 1582Zeile 1557
		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;

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

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

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

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

	{
$allowhtml = 1;
}

	{
$allowhtml = 1;
}

Zeile 1887Zeile 1862
		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")."\";");

	}
else

	}
else

	{
$preview = '';
}

	{
$preview = '';
}

Zeile 1935Zeile 1910
			foreach($global_announcements as $aid => $announcement)
{
$trow = alt_trow();

			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 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;
}
$action = $mybb->input['threads'][$thread['tid']];

				continue;
}
$action = $mybb->input['threads'][$thread['tid']];

Zeile 2053Zeile 2028
			if($action == "approve")
{
$posts_to_approve[] = $post['pid'];

			if($action == "approve")
{
$posts_to_approve[] = $post['pid'];

			}

			}

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

			else if($action == "delete" && $mybb->settings['soft_delete'] != 1)
{
$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);

		}

		}

		if(!empty($posts_to_delete))
{
if($mybb->settings['soft_delete'] == 1)
{
$moderation->soft_delete_posts($posts_to_delete);
log_moderator_action(array('pids' => $posts_to_delete), $lang->multi_soft_delete_posts);

		if(!empty($posts_to_delete))
{
if($mybb->settings['soft_delete'] == 1)
{
$moderation->soft_delete_posts($posts_to_delete);
log_moderator_action(array('pids' => $posts_to_delete), $lang->multi_soft_delete_posts);

			}

			}

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

		$plugins->run_hooks("modcp_do_modqueue_end");

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

Zeile 2089Zeile 2064
	{
$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 2098Zeile 2073
		while($attachment = $db->fetch_array($query))
{
if(!isset($mybb->input['attachments'][$attachment['aid']]))

		while($attachment = $db->fetch_array($query))
{
if(!isset($mybb->input['attachments'][$attachment['aid']]))

			{

			{

				continue;
}
$action = $mybb->input['attachments'][$attachment['aid']];
if($action == "approve")
{
$db->update_query("attachments", array("visible" => 1), "aid='{$attachment['aid']}'");

				continue;
}
$action = $mybb->input['attachments'][$attachment['aid']];
if($action == "approve")
{
$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"));
}

			}
}


			}
}


Zeile 2305Zeile 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 2505Zeile 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)
{

Zeile 2520Zeile 2503

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


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

	{

	{

		error_no_permission();
}


		error_no_permission();
}


Zeile 2535Zeile 2518
			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 2547
			"date" => $awaydate,
"returndate" => $returndate,
"awayreason" => $mybb->get_input('awayreason')

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

		);

		);

	}
else
{

	}
else
{

Zeile 2579Zeile 2562
	// 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 2587Zeile 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'),

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

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

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

	);


	);


	$updated_user['birthday'] = array(
"day" => $mybb->get_input('birthday_day', MyBB::INPUT_INT),
"month" => $mybb->get_input('birthday_month', MyBB::INPUT_INT),

	$updated_user['birthday'] = array(
"day" => $mybb->get_input('birthday_day', MyBB::INPUT_INT),
"month" => $mybb->get_input('birthday_month', MyBB::INPUT_INT),

Zeile 2602Zeile 2584
	);

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

	);

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

	{

	{

		$updated_user['usertitle'] = $mybb->get_input('usertitle');

		$updated_user['usertitle'] = $mybb->get_input('usertitle');

	}

	}

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

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

	}


	}


	if(!empty($mybb->input['remove_avatar']))
{
$updated_user['avatarurl'] = '';

	if(!empty($mybb->input['remove_avatar']))
{
$updated_user['avatarurl'] = '';

Zeile 2617Zeile 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())
{
$errors = $userhandler->get_friendly_errors();
$mybb->input['action'] = "editprofile";


// Validate the user and get any errors that might have occurred.
if(!$userhandler->validate_user())
{
$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 2637Zeile 2619
			);
remove_avatars($user['uid']);
}

			);
remove_avatars($user['uid']);
}





		// Moderator "Options" (suspend signature, suspend/moderate posting)
$moderator_options = array(
1 => array(

		// Moderator "Options" (suspend signature, suspend/moderate posting)
$moderator_options = array(
1 => array(

Zeile 2679Zeile 2661

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


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

			}

else
{

			}

else
{

				if($mybb->input[$option['time']] == 0 && $mybb->input[$option['period']] != "never" && $user[$option['update_field']] != 1)
{
// User has selected a type of ban, but not entered a valid time frame
$string = $option['action']."_error";
$errors[] = $lang->$string;
}

				if($mybb->input[$option['time']] == 0 && $mybb->input[$option['period']] != "never" && $user[$option['update_field']] != 1)
{
// User has selected a type of ban, but not entered a valid time frame
$string = $option['action']."_error";
$errors[] = $lang->$string;
}


if(!is_array($errors))

				else


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

if($user[$option['update_field']] == 1 && ($mybb->input[$option['time']] || $mybb->input[$option['period']] == "never"))
{
// We already have a suspension, but entered a new time

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

if($user[$option['update_field']] == 1 && ($mybb->input[$option['time']] || $mybb->input[$option['period']] == "never"))
{
// We already have a suspension, but entered a new time

						if($suspend_length == "-1")
{

						if($suspend_length == "-1")
{

							// Permanent ban on action
$extra_user_updates[$option['update_length']] = 0;
}
elseif($suspend_length && $suspend_length != "-1")
{
// Temporary ban on action

							// Permanent ban on action
$extra_user_updates[$option['update_length']] = 0;
}
elseif($suspend_length && $suspend_length != "-1")
{
// Temporary ban on action

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

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

						}
}
elseif(!$user[$option['update_field']])

						}
}
elseif(!$user[$option['update_field']])

Zeile 2727Zeile 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 2743Zeile 2724
			// 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 2822Zeile 2803
	}

// Sanitize all input

	}

// Sanitize all input

	foreach(array('usertitle', 'website', 'icq', '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));
}

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

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

				$defaulttitle = $title['title'];

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

				break;
}
}

				break;
}
}

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

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

		}
else
{

		}
else
{

			$selected = '';
}

			$selected = '';
}





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

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

	}


	}


	$bdaymonthsel = array();
foreach(range(1, 12) as $month)
{
$bdaymonthsel[$month] = '';
}
$bdaymonthsel[$mybb->input['birthday_month']] = 'selected="selected"';

	$bdaymonthsel = array();
foreach(range(1, 12) as $month)
{
$bdaymonthsel[$month] = '';
}
$bdaymonthsel[$mybb->input['birthday_month']] = 'selected="selected"';

 

$awaysection = '';


if($mybb->settings['allowaway'] != 0)
{


if($mybb->settings['allowaway'] != 0)
{

Zeile 2947Zeile 2930
	$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 2968Zeile 2955
			$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 2979Zeile 2966
					$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 3289Zeile 3276
	$user_icq = $mybb->input['icq'];
$user_skype = $mybb->input['skype'];
$user_google = $mybb->input['google'];

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

	$user_yahoo = $mybb->input['yahoo'];

 

$plugins->run_hooks("modcp_editprofile_end");



$plugins->run_hooks("modcp_editprofile_end");


Zeile 3437Zeile 3423

$plugins->run_hooks("modcp_finduser_end");



$plugins->run_hooks("modcp_finduser_end");


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

	$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 3578Zeile 3564
		$per_page = (int)$mybb->input['filter']['per_page'];
}
$start = ($page-1) * $per_page;

		$per_page = (int)$mybb->input['filter']['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 3607Zeile 3599
		LIMIT {$start}, {$per_page}
";
$query = $db->query($sql);

		LIMIT {$start}, {$per_page}
";
$query = $db->query($sql);







	$warning_list = '';
while($row = $db->fetch_array($query))
{

	$warning_list = '';
while($row = $db->fetch_array($query))
{

Zeile 3638Zeile 3630
		if(empty($row['title']))
{
$title = $row['custom_title'];

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

		}

		}

		$title = htmlspecialchars_uni($title);
if($row['points'] >= 0)
{
$points = '+'.$row['points'];
}

		$title = htmlspecialchars_uni($title);
if($row['points'] >= 0)
{
$points = '+'.$row['points'];
}





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

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

	}


	}


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

	$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 3669Zeile 3661
	{
error_no_permission();
}

	{
error_no_permission();
}





	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 3689Zeile 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 3698Zeile 3692
				else
{
$post_ip_sql = "p.ipaddress BETWEEN ".$db->escape_binary($ip_range[0])." AND ".$db->escape_binary($ip_range[1]);

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



$plugins->run_hooks("modcp_ipsearch_posts_start");


Zeile 3783Zeile 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 3924Zeile 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 3953Zeile 3948
				foreach($ipaddresses as $ipaddress)
{
$ip = my_inet_ntop($db->unescape_binary($ipaddress['ipaddress']));

				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 4066Zeile 4061
}

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

}

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

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

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


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



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


Zeile 4117Zeile 4112
	$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=banning");

$plugins->run_hooks("modcp_banning_start");

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

$plugins->run_hooks("modcp_banning_start");





	$query = $db->query("
SELECT b.*, a.username AS adminuser, u.username
FROM ".TABLE_PREFIX."banned b

	$query = $db->query("
SELECT b.*, a.username AS adminuser, u.username
FROM ".TABLE_PREFIX."banned b

Zeile 4126Zeile 4121
		ORDER BY dateline DESC
LIMIT {$start}, {$perpage}
");

		ORDER BY dateline DESC
LIMIT {$start}, {$perpage}
");





	// Get the banned users
$bannedusers = '';
while($banned = $db->fetch_array($query))

	// Get the banned users
$bannedusers = '';
while($banned = $db->fetch_array($query))

Zeile 4144Zeile 4139
		$admin_profile = build_profile_link(htmlspecialchars_uni($banned['adminuser']), $banned['admin']);

$trow = alt_trow();

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

$trow = alt_trow();





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

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

Zeile 4239Zeile 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 4265Zeile 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 4276Zeile 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 4297Zeile 4291
		// Get the users info from their Username
$options = array(
'fields' => array('username', 'usergroup', 'additionalgroups', 'displaygroup')

		// Get the users info from their Username
$options = array(
'fields' => array('username', 'usergroup', 'additionalgroups', 'displaygroup')

		);

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

if(!$user['uid'])
{
$errors[] = $lang->invalid_username;
}
}


		);

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

if(!$user)
{
$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']))

	{

	{

		$errors[] = $lang->error_cannotbanuser;

		$errors[] = $lang->error_cannotbanuser;

	}

	}


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


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

Zeile 4326Zeile 4320

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




	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 4336Zeile 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 4382Zeile 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 4401Zeile 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 4466Zeile 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 4478Zeile 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 4678Zeile 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 4690Zeile 4685
				if(my_strlen($post['subject']) > 25)
{
$post['subject'] = my_substr($post['subject'], 0, 25)."...";

				if(my_strlen($post['subject']) > 25)
{
$post['subject'] = my_substr($post['subject'], 0, 25)."...";

				}

				}

				$post['subject'] = htmlspecialchars_uni($post['subject']);
$post['fullsubject'] = htmlspecialchars_uni($post['fullsubject']);
$unapproved_posts = my_number_format($unapproved_posts);

				$post['subject'] = htmlspecialchars_uni($post['subject']);
$post['fullsubject'] = htmlspecialchars_uni($post['fullsubject']);
$unapproved_posts = my_number_format($unapproved_posts);

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

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

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