Vergleich modcp.php - 1.8.12 - 1.8.24

  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 58Zeile 58
$moderated_forums = array();
if($mybb->usergroup['issupermod'] != 1)
{

$moderated_forums = array();
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')");

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


$numannouncements = $nummodqueuethreads = $nummodqueueposts = $nummodqueueattach = $numreportedposts = $nummodlogs = 0;
while($forum = $db->fetch_array($query))

Zeile 263Zeile 263

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)) ? "[+]" : "[-]";

	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)) ? "[+]" : "[-]";

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


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


Zeile 285Zeile 287
	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}')";
}

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





	$plugins->run_hooks("modcp_do_reports");

	$plugins->run_hooks("modcp_do_reports");





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

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

	$cache->update_reportedcontent();

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

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




	$cache->update_reportedcontent();

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

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

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


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


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

	}


	}


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

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

Zeile 323Zeile 357

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





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

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

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


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


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

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

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


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

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

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


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

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

Zeile 377Zeile 411
	{
$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=reports");
eval("\$reportspages = \"".$templates->get("modcp_reports_multipage")."\";");

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

	}

$plugins->run_hooks("modcp_reports_start");

	}

$plugins->run_hooks("modcp_reports_start");


// Reports
$reports = '';


// Reports
$reports = '';

Zeile 402Zeile 436
	{
$reportedcontent = $cache->read("reportedcontent");
$reportcache = $usercache = $postcache = array();

	{
$reportedcontent = $cache->read("reportedcontent");
$reportcache = $usercache = $postcache = array();





		while($report = $db->fetch_array($query))
{
if($report['type'] == 'profile' || $report['type'] == 'reputation')

		while($report = $db->fetch_array($query))
{
if($report['type'] == 'profile' || $report['type'] == 'reputation')

Zeile 417Zeile 451
				if($report['type'] == 'reputation')
{
if(!isset($usercache[$report['id2']]))

				if($report['type'] == 'reputation')
{
if(!isset($usercache[$report['id2']]))

					{

					{

						$usercache[$report['id2']] = $report['id2'];
}
if(!isset($usercache[$report['id3']]))

						$usercache[$report['id2']] = $report['id2'];
}
if(!isset($usercache[$report['id3']]))

Zeile 490Zeile 524
				$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');


 
		$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 531Zeile 571
					$good_user = build_profile_link(htmlspecialchars_uni($usercache[$report['id3']]['username']), $usercache[$report['id3']]['uid']);
$report_data['content'] .= $lang->sprintf($lang->report_info_rep_profile, $good_user);
break;

					$good_user = build_profile_link(htmlspecialchars_uni($usercache[$report['id3']]['username']), $usercache[$report['id3']]['uid']);
$report_data['content'] .= $lang->sprintf($lang->report_info_rep_profile, $good_user);
break;

			}

// Report reason and comment
if($report['reasonid'] > 0)
{
$reason = htmlspecialchars_uni($lang->parse($report['title']));

if(empty($report['reason']))
{
eval("\$report_data['comment'] = \"".$templates->get("modcp_reports_report_comment")."\";");
}

			}

// Report reason and comment
if($report['reasonid'] > 0)
{
$reason = htmlspecialchars_uni($lang->parse($report['title']));

if(empty($report['reason']))
{
eval("\$report_data['comment'] = \"".$templates->get("modcp_reports_report_comment")."\";");
}

				else
{
$comment = htmlspecialchars_uni($report['reason']);

				else
{
$comment = htmlspecialchars_uni($report['reason']);

Zeile 549Zeile 589
				}
}
else

				}
}
else

			{

			{

				$report_data['comment'] = $lang->na;
}


				$report_data['comment'] = $lang->na;
}


Zeile 557Zeile 597
			if($report['reports'])
{
$report_data['reports'] = my_number_format($report['reports']);

			if($report['reports'])
{
$report_data['reports'] = my_number_format($report['reports']);

			}

			}


if($report['lastreporter'])
{


if($report['lastreporter'])
{

Zeile 567Zeile 607
				}
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 590Zeile 637
	if($mybb->usergroup['canmanagereportedcontent'] == 0)
{
error_no_permission();

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

	}

	}


$lang->load('report');



$lang->load('report');


Zeile 605Zeile 652
	// Figure out if we need to display multiple pages.
$perpage = $mybb->settings['threadsperpage'];
if($mybb->get_input('page') != "last")

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

	{

	{

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


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


Zeile 613Zeile 660
	{
$query = $db->simple_select("reportedcontent", "COUNT(rid) AS count");
$report_count = $db->fetch_field($query, "count");

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

	}

	}

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

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

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

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

	}

	}

	else
{
$start = 0;
$page = 1;
}
$upper = $start+$perpage;

	else
{
$start = 0;
$page = 1;
}
$upper = $start+$perpage;





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

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

	}

$plugins->run_hooks("modcp_allreports_start");

	}

$plugins->run_hooks("modcp_allreports_start");


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


$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

Zeile 691Zeile 738
		ORDER BY r.dateline DESC
LIMIT {$start}, {$perpage}
");

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





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

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

Zeile 714Zeile 761
				$report_data['content'] .= $lang->sprintf($lang->report_info_post_thread, $thread_link, $thread_subject);
}
else if($report['type'] == 'profile')

				$report_data['content'] .= $lang->sprintf($lang->report_info_post_thread, $thread_link, $thread_subject);
}
else if($report['type'] == 'profile')

			{

			{

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

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

Zeile 729Zeile 776
			if($report['reasonid'] > 0)
{
$reason = htmlspecialchars_uni($lang->parse($report['title']));

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





				if(empty($report['reason']))
{
eval("\$report_data['comment'] = \"".$templates->get("modcp_reports_report_comment")."\";");

				if(empty($report['reason']))
{
eval("\$report_data['comment'] = \"".$templates->get("modcp_reports_report_comment")."\";");

Zeile 743Zeile 790
			else
{
$report_data['comment'] = $lang->na;

			else
{
$report_data['comment'] = $lang->na;

			}


			}


			$report['reporterlink'] = get_profile_link($report['uid']);
if(!$report['username'])
{

			$report['reporterlink'] = get_profile_link($report['uid']);
if(!$report['username'])
{

Zeile 759Zeile 806
			$plugins->run_hooks("modcp_allreports_report");
eval("\$allreports .= \"".$templates->get("modcp_reports_allreport")."\";");
}

			$plugins->run_hooks("modcp_allreports_report");
eval("\$allreports .= \"".$templates->get("modcp_reports_allreport")."\";");
}

	}

	}


$plugins->run_hooks("modcp_allreports_end");



$plugins->run_hooks("modcp_allreports_end");


Zeile 790Zeile 837
	$where = '';

// Searching for entries by a particular user

	$where = '';

// Searching for entries by a particular user

	if($mybb->get_input('uid', MyBB::INPUT_INT))
{

	if($mybb->get_input('uid', MyBB::INPUT_INT))
{

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


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


Zeile 799Zeile 846
	if($mybb->get_input('fid', MyBB::INPUT_INT))
{
$where .= " AND t.fid='".$mybb->get_input('fid', MyBB::INPUT_INT)."'";

	if($mybb->get_input('fid', MyBB::INPUT_INT))
{
$where .= " AND t.fid='".$mybb->get_input('fid', MyBB::INPUT_INT)."'";

	}

	}


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



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


Zeile 851Zeile 898
	}

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

	}

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

	{

	{

		$page = 1;
}


		$page = 1;
}


Zeile 863Zeile 910
	{
$start = 0;
$page = 1;

	{
$start = 0;
$page = 1;

	}


	}


	$page_url = 'modcp.php?action=modlogs&amp;perpage='.$perpage;
foreach(array('uid', 'fid') as $field)
{
$mybb->input[$field] = $mybb->get_input($field, MyBB::INPUT_INT);

	$page_url = 'modcp.php?action=modlogs&amp;perpage='.$perpage;
foreach(array('uid', 'fid') as $field)
{
$mybb->input[$field] = $mybb->get_input($field, MyBB::INPUT_INT);

		if(!empty($mybb->input[$field]))
{
$page_url .= "&amp;{$field}=".$mybb->input[$field];

		if(!empty($mybb->input[$field]))
{
$page_url .= "&amp;{$field}=".$mybb->input[$field];

		}
}
foreach(array('sortby', 'order') as $field)
{
$mybb->input[$field] = htmlspecialchars_uni($mybb->get_input($field));
if(!empty($mybb->input[$field]))

		}
}
foreach(array('sortby', 'order') as $field)
{
$mybb->input[$field] = htmlspecialchars_uni($mybb->get_input($field));
if(!empty($mybb->input[$field]))

		{

		{

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

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

Zeile 907Zeile 954
		$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 1027Zeile 1081
}

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

}

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

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


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


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


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


Zeile 1153Zeile 1207
		}
}


		}
}


	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 1202Zeile 1256
			);
$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 1274Zeile 1328
		$announcement = array(
'subject' => '',
'message' => '',

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

			'allowhtml' => 1,

			'allowhtml' => 0,

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

$enddateyear = $startdateyear+1;

			'allowmycode' => 1,
'allowsmilies' => 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")."\";");

	}

// 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\"";

		}

if($endday == $day)
{
$selected = " selected=\"selected\"";

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

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

		else
{
$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 = $endmonthsel = array();
foreach(array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12') as $month)
{

Zeile 1327Zeile 1381
	$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"';
}












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
{

	else
{

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

		$allow_html = '';

	}

if($announcement['allowmycode'])

	}

if($announcement['allowmycode'])

Zeile 1349Zeile 1413
	{
$smilies_sel['yes'] = ' checked="checked"';
}

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

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

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


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


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

Zeile 1376Zeile 1440
			'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 1460Zeile 1524
	if(!trim($mybb->input['message']))
{
$errors[] = $lang->error_missing_message;

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

	}

	}


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


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

Zeile 1525Zeile 1589
		}
}


		}
}


	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 1574Zeile 1638
			);
$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 1624Zeile 1688

$makeshift_end = false;
if(!$announcement['enddate'])


$makeshift_end = false;
if(!$announcement['enddate'])

	{

	{

		$makeshift_end = true;
$makeshift_time = TIME_NOW;
if($announcement['startdate'])

		$makeshift_end = true;
$makeshift_time = TIME_NOW;
if($announcement['startdate'])

Zeile 1731Zeile 1795
	$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'])



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 1780Zeile 1854
			'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 2513Zeile 2587
		"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 2544Zeile 2616

// 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 2593Zeile 2665
		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 2606Zeile 2678

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


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

			}


			}


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

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

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

						{
// Permanent ban on action
$extra_user_updates[$option['update_length']] = 0;

						}

						}

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

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

Zeile 2640Zeile 2711
						// New suspension for this user... bad user!
$extra_user_updates[$option['update_field']] = 1;
if($suspend_length == "-1")

						// New suspension for this user... bad user!
$extra_user_updates[$option['update_field']] = 1;
if($suspend_length == "-1")

						{

						{

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

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

Zeile 2649Zeile 2720
						}
}
}

						}
}
}

			}
}


			}
}


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

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

		{

		{

			$errors[] = $lang->suspendmoderate_error;

			$errors[] = $lang->suspendmoderate_error;

		}

if(is_array($errors))
{

		}

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

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

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

Zeile 2672Zeile 2743
			if(!empty($extra_user_updates))
{
$db->update_query("users", $extra_user_updates, "uid='{$user['uid']}'");

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

$plugins->run_hooks("modcp_do_editprofile_end");

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

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

$plugins->run_hooks("modcp_do_editprofile_end");

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

	}

	}

}

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

}

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

	{
error_no_permission();
}

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


	{
error_no_permission();
}

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


	$user = get_user($mybb->get_input('uid', MyBB::INPUT_INT));
if(!$user)

	$user = get_user($mybb->get_input('uid', MyBB::INPUT_INT));
if(!$user)

	{

	{

		error($lang->error_nomember);
}


		error($lang->error_nomember);
}


Zeile 2701Zeile 2772
	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")


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

	{

	{

		$user['icq'] = (int)$user['icq'];
}


		$user['icq'] = (int)$user['icq'];
}


Zeile 2718Zeile 2805
		$mybb->input = array_merge($user, $mybb->input);
$birthday = explode('-', $user['birthday']);
if(!isset($birthday[1]))

		$mybb->input = array_merge($user, $mybb->input);
$birthday = explode('-', $user['birthday']);
if(!isset($birthday[1]))

		{

		{

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

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

		}

		}

		list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = $birthday;

		list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = $birthday;

	}
else
{

	}
else
{

		$errors = inline_error($errors);

		$errors = inline_error($errors);

	}

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

	}

// Sanitize all input
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 2762Zeile 2841
			{
$defaulttitle = $title['title'];
break;

			{
$defaulttitle = $title['title'];
break;

			}
}
}

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


			}
}
}

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


	if(empty($user['usertitle']))
{
$lang->current_custom_usertitle = '';

	if(empty($user['usertitle']))
{
$lang->current_custom_usertitle = '';

	}

	}


$bdaydaysel = $selected = '';
for($day = 1; $day <= 31; ++$day)


$bdaydaysel = $selected = '';
for($day = 1; $day <= 31; ++$day)

	{

	{

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

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

		}

		}

		else
{
$selected = '';
}

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

		else
{
$selected = '';
}

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

	}


	}


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

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

Zeile 2799Zeile 2878
	{
$awaycheck = array('', '');
if($errors)

	{
$awaycheck = array('', '');
if($errors)

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

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

			$returndate = array();
$returndate[0] = $mybb->get_input('awayday');
$returndate[1] = $mybb->get_input('awaymonth');

			$returndate = array();
$returndate[0] = $mybb->get_input('awayday');
$returndate[1] = $mybb->get_input('awaymonth');

Zeile 2901Zeile 2980
			else
{
$userfield = $user_fields[$field];

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

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

$sel = "";
if(isset($seloptions[$val]) && $val == $seloptions[$val])
{
$sel = " selected=\"selected\"";
}


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

$sel = "";
if(isset($seloptions[$val]) && $val == $seloptions[$val])
{
$sel = " selected=\"selected\"";
}


						eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}
if(!$profilefield['length'])

						eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}
if(!$profilefield['length'])

Zeile 2944Zeile 3023
				}
}
elseif($type == "select")

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

			{
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)

			{
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)

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

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

Zeile 2956Zeile 3035
						if($val == $userfield)
{
$sel = " selected=\"selected\"";

						if($val == $userfield)
{
$sel = " selected=\"selected\"";

						}

						}


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


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

					}

					}

					if(!$profilefield['length'])

					if(!$profilefield['length'])

					{
$profilefield['length'] = 1;
}

					{
$profilefield['length'] = 1;
}


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


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

Zeile 2990Zeile 3069
				if($errors)
{
$useropts = $userfield;

				if($errors)
{
$useropts = $userfield;

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

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

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

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

Zeile 3018Zeile 3097
				}
}
elseif($type == "textarea")

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

			{

			{

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

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

Zeile 3032Zeile 3111
				}

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

				}

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

			}


			}


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

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

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

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





	$user['username'] = htmlspecialchars_uni($user['username']);
$lang->edit_profile = $lang->sprintf($lang->edit_profile, $user['username']);
$profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']);

$user['signature'] = htmlspecialchars_uni($user['signature']);
$codebuttons = build_mycode_inserter("signature");

	$user['username'] = htmlspecialchars_uni($user['username']);
$lang->edit_profile = $lang->sprintf($lang->edit_profile, $user['username']);
$profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']);

$user['signature'] = htmlspecialchars_uni($user['signature']);
$codebuttons = build_mycode_inserter("signature");





	// Do we mark the suspend signature box?
if($user['suspendsignature'] || ($mybb->get_input('suspendsignature', MyBB::INPUT_INT) && !empty($errors)))
{

	// Do we mark the suspend signature box?
if($user['suspendsignature'] || ($mybb->get_input('suspendsignature', MyBB::INPUT_INT) && !empty($errors)))
{

Zeile 3127Zeile 3206

$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 3194Zeile 3274
	}

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

	}

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 3306Zeile 3394

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



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


	$plugins->run_hooks("modcp_finduser_start");


	$plugins->run_hooks("modcp_finduser_start");


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

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

Zeile 3346Zeile 3434

$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 3369Zeile 3458

$mybb->input['filter']['uid'] = (int)$search_user['uid'];
$mybb->input['filter']['username'] = htmlspecialchars_uni($mybb->input['filter']['username']);


$mybb->input['filter']['uid'] = (int)$search_user['uid'];
$mybb->input['filter']['username'] = htmlspecialchars_uni($mybb->input['filter']['username']);

	}

	}

	else
{
$mybb->input['filter']['username'] = '';

	else
{
$mybb->input['filter']['username'] = '';

Zeile 3486Zeile 3575
		$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 3527Zeile 3622
		$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 3536Zeile 3631
		}
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
{

		}
else
{

Zeile 3557Zeile 3652
	}

if(!$warning_list)

	}

if(!$warning_list)

	{

	{

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

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

	{
error_no_permission();
}





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

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

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

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

Zeile 3596Zeile 3695
			if($ip_range)
{
if(!is_array($ip_range))

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

				{

				{

					$post_ip_sql = "p.ipaddress=".$db->escape_binary($ip_range);

					$post_ip_sql = "p.ipaddress=".$db->escape_binary($ip_range);

				}

				}

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





			if($post_ip_sql)
{
$where_sql = '';

$unviewable_forums = get_unviewable_forums(true);

			if($post_ip_sql)
{
$where_sql = '';

$unviewable_forums = get_unviewable_forums(true);





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

if($inactiveforums)

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

if($inactiveforums)

				{

				{

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


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


Zeile 3627Zeile 3726
				$onlyusfids = array();
$group_permissions = forum_permissions();
foreach($group_permissions as $fid => $forumpermissions)

				$onlyusfids = array();
$group_permissions = forum_permissions();
foreach($group_permissions as $fid => $forumpermissions)

				{

				{

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

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

Zeile 3635Zeile 3734
				}

if(!empty($onlyusfids))

				}

if(!empty($onlyusfids))

				{

				{

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


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


Zeile 3657Zeile 3756
						{
$deleted_forums[] = $moderator['fid'];
}

						{
$deleted_forums[] = $moderator['fid'];
}

					}


					}


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

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

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

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

			}

			}

		}

// Searching user IP addresses

		}

// Searching user IP addresses

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

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

			}

			}


$plugins->run_hooks("modcp_ipsearch_users_start");



$plugins->run_hooks("modcp_ipsearch_users_start");


Zeile 3712Zeile 3811
		$total_results = $post_results+$user_results;

if(!$total_results)

		$total_results = $post_results+$user_results;

if(!$total_results)

		{

		{

			$total_results = 1;
}


			$total_results = 1;
}


Zeile 3727Zeile 3826
		if($mybb->get_input('page') != "last")
{
$page = $mybb->get_input('page', MyBB::INPUT_INT);

		if($mybb->get_input('page') != "last")
{
$page = $mybb->get_input('page', MyBB::INPUT_INT);

		}


		}


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

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

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

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

		}


		}


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

if($page)

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

if($page)

		{

		{

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

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

		}

		}

		else
{
$start = 0;
$page = 1;

		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 3782Zeile 3881
					{
eval("\$subject = \"".$templates->get("modcp_ipsearch_result_regip")."\";");
$ip = my_inet_ntop($db->unescape_binary($ipaddress['regip']));

					{
eval("\$subject = \"".$templates->get("modcp_ipsearch_result_regip")."\";");
$ip = my_inet_ntop($db->unescape_binary($ipaddress['regip']));

					}

					}

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

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

Zeile 3790Zeile 3889
					}
}
elseif($ipaddress['regip'] == $ip_range)

					}
}
elseif($ipaddress['regip'] == $ip_range)

				{

				{

					eval("\$subject = \"".$templates->get("modcp_ipsearch_result_regip")."\";");
$ip = my_inet_ntop($db->unescape_binary($ipaddress['regip']));
}

					eval("\$subject = \"".$templates->get("modcp_ipsearch_result_regip")."\";");
$ip = my_inet_ntop($db->unescape_binary($ipaddress['regip']));
}

Zeile 3798Zeile 3897
				{
eval("\$subject = \"".$templates->get("modcp_ipsearch_result_lastip")."\";");
$ip = my_inet_ntop($db->unescape_binary($ipaddress['lastip']));

				{
eval("\$subject = \"".$templates->get("modcp_ipsearch_result_lastip")."\";");
$ip = my_inet_ntop($db->unescape_binary($ipaddress['lastip']));

				}

				}

				if($ip)
{
eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";");
$result = true;
}
if($result)

				if($ip)
{
eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";");
$result = true;
}
if($result)

				{

				{

					--$post_limit;
}
}

					--$post_limit;
}
}

Zeile 3928Zeile 4027
if($mybb->input['action'] == "iplookup")
{
if($mybb->usergroup['canuseipsearch'] == 0)

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

	{
error_no_permission();
}

	{
error_no_permission();
}


$mybb->input['ipaddress'] = $mybb->get_input('ipaddress');
$lang->ipaddress_misc_info = $lang->sprintf($lang->ipaddress_misc_info, htmlspecialchars_uni($mybb->input['ipaddress']));


$mybb->input['ipaddress'] = $mybb->get_input('ipaddress');
$lang->ipaddress_misc_info = $lang->sprintf($lang->ipaddress_misc_info, htmlspecialchars_uni($mybb->input['ipaddress']));

Zeile 3938Zeile 4037
	$ipaddress_host_name = $lang->na;
$modcp_ipsearch_misc_info = '';
if(!strstr($mybb->input['ipaddress'], "*"))

	$ipaddress_host_name = $lang->na;
$modcp_ipsearch_misc_info = '';
if(!strstr($mybb->input['ipaddress'], "*"))

	{

	{

		// Return GeoIP information if it is available to us
if(function_exists('geoip_record_by_name'))
{

		// Return GeoIP information if it is available to us
if(function_exists('geoip_record_by_name'))
{

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

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

		}

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


		}

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


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

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

	}


	}


	$plugins->run_hooks("modcp_iplookup_end");

eval("\$iplookup = \"".$templates->get('modcp_ipsearch_misc_info', 1, 0)."\";");

	$plugins->run_hooks("modcp_iplookup_end");

eval("\$iplookup = \"".$templates->get('modcp_ipsearch_misc_info', 1, 0)."\";");

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


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

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

Zeile 3992Zeile 4091

$query = $db->simple_select("banned", "COUNT(uid) AS count");
$banned_count = $db->fetch_field($query, "count");


$query = $db->simple_select("banned", "COUNT(uid) AS count");
$banned_count = $db->fetch_field($query, "count");





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

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

Zeile 4003Zeile 4102
	}

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

	}

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

	{
$page = 1;
}


	{
$page = 1;
}


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

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

Zeile 4021Zeile 4120
	$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 4043Zeile 4142
		if($mybb->user['uid'] == $banned['admin'] || !$banned['adminuser'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1)
{
eval("\$edit_link = \"".$templates->get("modcp_banning_edit")."\";");

		if($mybb->user['uid'] == $banned['admin'] || !$banned['adminuser'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1)
{
eval("\$edit_link = \"".$templates->get("modcp_banning_edit")."\";");

		}


		}


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

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





		$trow = alt_trow();

if($banned['reason'])

		$trow = alt_trow();

if($banned['reason'])

		{

		{

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

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

		}
else
{

		}
else
{

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

if($banned['lifted'] == 'perm' || $banned['lifted'] == '' || $banned['bantime'] == 'perm' || $banned['bantime'] == '---')

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

if($banned['lifted'] == 'perm' || $banned['lifted'] == '' || $banned['bantime'] == 'perm' || $banned['bantime'] == '---')

		{

		{

			$banlength = $lang->permanent;
$timeremaining = $lang->na;
}

			$banlength = $lang->permanent;
$timeremaining = $lang->na;
}

Zeile 4067Zeile 4166
		{
$banlength = $bantimes[$banned['bantime']];
$remaining = $banned['lifted']-TIME_NOW;

		{
$banlength = $bantimes[$banned['bantime']];
$remaining = $banned['lifted']-TIME_NOW;





			$timeremaining = nice_time($remaining, array('short' => 1, 'seconds' => false))."";

			$timeremaining = nice_time($remaining, array('short' => 1, 'seconds' => false))."";





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

if($remaining <= 0)

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

if($remaining <= 0)

			{

			{

				$banned_class = "imminent_banned";
$ban_remaining = $lang->ban_ending_imminently;
}

				$banned_class = "imminent_banned";
$ban_remaining = $lang->ban_ending_imminently;
}

Zeile 4097Zeile 4196

eval('$timeremaining = "'.$templates->get('modcp_banning_remaining').'";');
}


eval('$timeremaining = "'.$templates->get('modcp_banning_remaining').'";');
}





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

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

	}


	}


	if(!$bannedusers)
{
eval("\$bannedusers = \"".$templates->get("modcp_banning_nobanned")."\";");
}

	if(!$bannedusers)
{
eval("\$bannedusers = \"".$templates->get("modcp_banning_nobanned")."\";");
}





	$plugins->run_hooks("modcp_banning");

	$plugins->run_hooks("modcp_banning");





	eval("\$bannedpage = \"".$templates->get("modcp_banning")."\";");
output_page($bannedpage);
}

	eval("\$bannedpage = \"".$templates->get("modcp_banning")."\";");
output_page($bannedpage);
}





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

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

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


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


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

$query = $db->simple_select("banned", "*", "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'");

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

$query = $db->simple_select("banned", "*", "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'");

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


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


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

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

Zeile 4132Zeile 4231

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


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

	{

	{

		error_no_permission();
}

		error_no_permission();
}





	$plugins->run_hooks("modcp_liftban_start");

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

	$plugins->run_hooks("modcp_liftban_start");

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





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

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

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


	$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 4164Zeile 4262
	verify_post_check($mybb->get_input('my_post_key'));

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

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

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

	{

	{

		error_no_permission();
}


		error_no_permission();
}


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

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





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

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

		{

		{

			$existing_ban = true;

			$existing_ban = true;

		}


		}


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

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

 

$errors = array();


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


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

Zeile 4229Zeile 4329
	// Check banned group
$usergroups_cache = $cache->read('usergroups');
$usergroup = $usergroups_cache[$mybb->get_input('usergroup', MyBB::INPUT_INT)];

	// 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(empty($usergroup['gid']) || empty($usergroup['isbannedgroup']))
{


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

Zeile 4304Zeile 4403
			'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 4652Zeile 4749
		$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("