Vergleich modcp.php - 1.8.12 - 1.8.15

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

Zeile 303Zeile 332

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


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

 

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


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



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


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

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

}

}





if($mybb->input['action'] == "reports")
{
if($mybb->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 355

$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 339Zeile 371
	else
{
$query = $db->simple_select('reportedcontent', 'id3', "reportstatus='0' AND (type = 'post' OR type = '')");

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


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

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

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

	{
$page = 1;
}


	{
$page = 1;
}


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

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

Zeile 392Zeile 424
		ORDER BY r.reports DESC
LIMIT {$start}, {$perpage}
");

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





	if(!$db->num_rows($query))
{
// No unread reports

	if(!$db->num_rows($query))
{
// No unread reports

Zeile 414Zeile 446
				}

// Reputation comment? The offender is the ID2

				}

// Reputation comment? The offender is the ID2

				if($report['type'] == 'reputation')

				if($report['type'] == 'reputation')

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

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

Zeile 490Zeile 522
				$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 569
					$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)
{

			}

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

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

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

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

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

Zeile 549Zeile 587
				}
}
else

				}
}
else

			{

			{

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


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


Zeile 557Zeile 595
			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(is_array($usercache[$report['lastreporter']]))


if($report['lastreporter'])
{
if(is_array($usercache[$report['lastreporter']]))

				{

				{

					$lastreport_user = build_profile_link(htmlspecialchars_uni($usercache[$report['lastreporter']]['username']), $report['lastreporter']);
}
elseif($usercache[$report['lastreporter']] > 0)
{

					$lastreport_user = build_profile_link(htmlspecialchars_uni($usercache[$report['lastreporter']]['username']), $report['lastreporter']);
}
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 777Zeile 822
	if($nummodlogs == 0 && $mybb->usergroup['issupermod'] != 1)
{
error($lang->you_cannot_view_mod_logs);

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

	}

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

	}

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


$perpage = $mybb->get_input('perpage', MyBB::INPUT_INT);
if(!$perpage || $perpage <= 0)
{
$perpage = $mybb->settings['threadsperpage'];
}


$perpage = $mybb->get_input('perpage', MyBB::INPUT_INT);
if(!$perpage || $perpage <= 0)
{
$perpage = $mybb->settings['threadsperpage'];
}





	$where = '';

// Searching for entries by a particular user
if($mybb->get_input('uid', MyBB::INPUT_INT))
{
$where .= " AND l.uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";

	$where = '';

// Searching for entries by a particular user
if($mybb->get_input('uid', MyBB::INPUT_INT))
{
$where .= " AND l.uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'";

	}


	}


	// Searching for entries in a specific forum
if($mybb->get_input('fid', MyBB::INPUT_INT))
{

	// Searching for entries in a specific forum
if($mybb->get_input('fid', MyBB::INPUT_INT))
{

Zeile 825Zeile 870
	}

$plugins->run_hooks("modcp_modlogs_start");

	}

$plugins->run_hooks("modcp_modlogs_start");


$query = $db->query("


$query = $db->query("

		SELECT COUNT(l.dateline) AS count
FROM ".TABLE_PREFIX."moderatorlog l
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid)

		SELECT COUNT(l.dateline) AS count
FROM ".TABLE_PREFIX."moderatorlog l
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=l.uid)

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

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

	}

	}

	else
{
$start = 0;

	else
{
$start = 0;

Zeile 907Zeile 952
		$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 1153Zeile 1205
		}
}


		}
}


	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 1254
			);
$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 1326
		$announcement = array(
'subject' => '',
'message' => '',

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

			'allowhtml' => 1,

			'allowhtml' => 0,

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

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

Zeile 1327Zeile 1379
	$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 1376Zeile 1438
			'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 1436Zeile 1498
	$announcement = $db->fetch_array($query);

// Check that it exists

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

// Check that it exists

	if(!$announcement)
{

	if(!$announcement)
{

		error($lang->error_invalid_announcement);
}


		error($lang->error_invalid_announcement);
}


Zeile 1525Zeile 1587
		}
}


		}
}


	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 1544Zeile 1606
	if($mybb->get_input('allowsmilies', MyBB::INPUT_INT) == 1)
{
$allowsmilies = 1;

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

	}
else

	}
else

	{
$allowsmilies = 0;
}

	{
$allowsmilies = 0;
}

Zeile 1574Zeile 1636
			);
$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 1704Zeile 1766
		if($endday == $day)
{
$selected = " selected=\"selected\"";

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

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

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

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

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

Zeile 1721Zeile 1783
	}
$startmonthsel[$startmonth] = "selected=\"selected\"";
$endmonthsel[$endmonth] = "selected=\"selected\"";

	}
$startmonthsel[$startmonth] = "selected=\"selected\"";
$endmonthsel[$endmonth] = "selected=\"selected\"";





	$startdatemonth = $enddatemonth = '';

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

	$startdatemonth = $enddatemonth = '';

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

Zeile 1731Zeile 1793
	$message = htmlspecialchars_uni($announcement['message']);

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

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

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

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












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

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

	}

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

	}

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

	}
else

	}
else

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

if($announcement['allowsmilies'])

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

if($announcement['allowsmilies'])

	{

	{

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

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

Zeile 1762Zeile 1834
	if(($errored && $mybb->get_input('endtime_type', MyBB::INPUT_INT) == 2) || (!$errored && (int)$announcement['enddate'] == 0) || $makeshift_end == true)
{
$end_type_sel['infinite'] = ' checked="checked"';

	if(($errored && $mybb->get_input('endtime_type', MyBB::INPUT_INT) == 2) || (!$errored && (int)$announcement['enddate'] == 0) || $makeshift_end == true)
{
$end_type_sel['infinite'] = ' checked="checked"';

	}
else

	}
else

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

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

Zeile 1780Zeile 1852
			'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 2004Zeile 2076
			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");

			}
}

$plugins->run_hooks("modcp_do_modqueue_end");


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


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

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

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

		}

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


		}

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


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


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


Zeile 2187Zeile 2259

$query = $db->query("
SELECT COUNT(pid) AS unapprovedposts


$query = $db->query("
SELECT COUNT(pid) AS unapprovedposts

			FROM  ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
WHERE p.visible='0' {$tflist_queue_posts} 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_queue_posts} AND t.firstpost != p.pid

		");
$unapproved_posts = $db->fetch_field($query, "unapprovedposts");


		");
$unapproved_posts = $db->fetch_field($query, "unapprovedposts");


Zeile 2197Zeile 2269
		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);

		}


		}


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

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

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

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

		{

		{

			$page = $pages;
}


			$page = $pages;
}


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


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


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

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

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

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

				{

				{

					$post['postusername'] = htmlspecialchars_uni($post['postusername']);
$profile_link = $post['postusername'];
}

					$post['postusername'] = htmlspecialchars_uni($post['postusername']);
$profile_link = $post['postusername'];
}

Zeile 2262Zeile 2334
			{
$post['username'] = htmlspecialchars_uni($post['username']);
$profile_link = build_profile_link($post['username'], $post['uid']);

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

			}


			}


			eval("\$thread = \"".$templates->get("modcp_modqueue_link_thread")."\";");
eval("\$forum = \"".$templates->get("modcp_modqueue_link_forum")."\";");
$post['message'] = nl2br(htmlspecialchars_uni($post['message']));

			eval("\$thread = \"".$templates->get("modcp_modqueue_link_thread")."\";");
eval("\$forum = \"".$templates->get("modcp_modqueue_link_forum")."\";");
$post['message'] = nl2br(htmlspecialchars_uni($post['message']));

Zeile 2271Zeile 2343
		}

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

		}

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

		{

		{

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

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





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

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





			$plugins->run_hooks("modcp_modqueue_posts_end");

			$plugins->run_hooks("modcp_modqueue_posts_end");





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

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

			}


			}


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

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

Zeile 2309Zeile 2381
		if($nummodqueueattach == 0 && $mybb->usergroup['issupermod'] != 1)
{
error($lang->you_cannot_moderate_attachments);

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

		}


		}


		$query = $db->query("
SELECT COUNT(aid) AS unapprovedattachments
FROM ".TABLE_PREFIX."attachments a

		$query = $db->query("
SELECT COUNT(aid) AS unapprovedattachments
FROM ".TABLE_PREFIX."attachments a

Zeile 2333Zeile 2405
		if($mybb->get_input('page') == "last")
{
$page = $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;
}





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

$query = $db->query("

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

$query = $db->query("

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

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

			}


			}


			$attachdate = my_date('relative', $attachment['dateuploaded']);

$attachment['postsubject'] = htmlspecialchars_uni($parser->parse_badwords($attachment['postsubject']));

			$attachdate = my_date('relative', $attachment['dateuploaded']);

$attachment['postsubject'] = htmlspecialchars_uni($parser->parse_badwords($attachment['postsubject']));

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

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

		);
}
else

		);
}
else

	{
$away = array(
"away" => 0,

	{
$away = array(
"away" => 0,

Zeile 2500Zeile 2572
			"returndate" => '',
"awayreason" => ''
);

			"returndate" => '',
"awayreason" => ''
);

	}

	}


// Set up user handler.
require_once MYBB_ROOT."inc/datahandlers/user.php";


// Set up user handler.
require_once MYBB_ROOT."inc/datahandlers/user.php";

Zeile 2531Zeile 2603
	if(!empty($mybb->input['usertitle']))
{
$updated_user['usertitle'] = $mybb->get_input('usertitle');

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

	}

	}

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

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

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

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

	{

	{

		$updated_user['avatarurl'] = '';
}


		$updated_user['avatarurl'] = '';
}


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

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

	}
else
{

	}
else
{

		// Are we removing an avatar from this user?
if(!empty($mybb->input['remove_avatar']))
{

		// Are we removing an avatar from this user?
if(!empty($mybb->input['remove_avatar']))
{

Zeile 2674Zeile 2746
				$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);





			$plugins->run_hooks("modcp_do_editprofile_end");

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

			$plugins->run_hooks("modcp_do_editprofile_end");

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

Zeile 2685Zeile 2757
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)

Zeile 2704Zeile 2776
	}

if(!my_validate_url($user['website']))

	}

if(!my_validate_url($user['website']))

	{

	{

		$user['website'] = '';

		$user['website'] = '';

	}


	}


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

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

	}


	}


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

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

Zeile 2734Zeile 2806

// 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', 'aim', 'yahoo', '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 2856Zeile 2928
		}

if(!isset($returndate[2]))

		}

if(!isset($returndate[2]))

		{

		{

			$returndate[2] = '';
}


			$returndate[2] = '';
}


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

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





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

if(is_array($pfcache))

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

if(is_array($pfcache))

Zeile 2889Zeile 2961
			if(isset($thing[1]))
{
$options = $thing[1];

			if(isset($thing[1]))
{
$options = $thing[1];

			}

			}

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

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

Zeile 2901Zeile 2973
			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);

			}
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])

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

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

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


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


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

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

					}


					}


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

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

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

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

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

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

Zeile 2977Zeile 3049
					{
$checked = "";
if($val == $userfield)

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

						{

						{

							$checked = " checked=\"checked\"";
}

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

							$checked = " checked=\"checked\"";
}

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

					}
}
}

					}
}
}

			elseif($type == "checkbox")
{
if($errors)

			elseif($type == "checkbox")
{
if($errors)

Zeile 3021Zeile 3093
			{
$value = htmlspecialchars_uni($userfield);
eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";");

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

			}

			}

			else
{
$value = htmlspecialchars_uni($userfield);

			else
{
$value = htmlspecialchars_uni($userfield);

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

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

			}
else

			}
else

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

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

Zeile 3158Zeile 3230
				case "suspendposting":
eval("\$suspendposting_info = \"".$templates->get("modcp_editprofile_suspensions_info")."\";");
break;

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

			}
}

			}
}


// Generate the boxes for this option
$selection_options = '';


// Generate the boxes for this option
$selection_options = '';

Zeile 3167Zeile 3239
		{
$string = $option['select_option']."_period";
if($mybb->get_input($string) == $key)

		{
$string = $option['select_option']."_period";
if($mybb->get_input($string) == $key)

			{

			{

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

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

			}

			}

			else
{
$selected = '';
}

			else
{
$selected = '';
}





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


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


Zeile 3194Zeile 3266
	}

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


if(!isset($newtitle))
{

Zeile 3212Zeile 3286
	{
error_no_permission();
}

	{
error_no_permission();
}





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

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

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

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

	}

	}

	$where = '';

if(isset($mybb->input['username']))

	$where = '';

if(isset($mybb->input['username']))

Zeile 3235Zeile 3309
				break;
}
$where = " AND {$field} LIKE '%".my_strtolower($db->escape_string_like($mybb->get_input('username')))."%'";

				break;
}
$where = " AND {$field} LIKE '%".my_strtolower($db->escape_string_like($mybb->get_input('username')))."%'";

	}

	}


// Sort order & direction
switch($mybb->get_input('sortby'))
{
case "lastvisit":
$sortby = "lastvisit";


// Sort order & direction
switch($mybb->get_input('sortby'))
{
case "lastvisit":
$sortby = "lastvisit";

			break;

			break;

		case "postnum":
$sortby = "postnum";
break;

		case "postnum":
$sortby = "postnum";
break;

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

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

	}

	}

	$ordersel = array('asc' => '', 'desc' => '');
$ordersel[$order] = " selected=\"selected\"";


	$ordersel = array('asc' => '', 'desc' => '');
$ordersel[$order] = " selected=\"selected\"";


Zeile 3273Zeile 3347

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


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





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

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

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

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

	{

	{

		$page = 1;
}
if($page)

		$page = 1;
}
if($page)

Zeile 3460Zeile 3534
	else
{
$ordersel['asc'] = ' selected="selected"';

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

	}

$plugins->run_hooks("modcp_warninglogs_start");

	}

$plugins->run_hooks("modcp_warninglogs_start");


// Pagination stuff
$sql = "


// Pagination stuff
$sql = "

Zeile 3527Zeile 3601
		$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 3610
		}
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 3582Zeile 3656
		if(!is_array($groupscache))
{
$groupscache = $cache->read("usergroups");

		if(!is_array($groupscache))
{
$groupscache = $cache->read("usergroups");

		}

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


		}

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


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

$post_results = $user_results = 0;

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

$post_results = $user_results = 0;

Zeile 3706Zeile 3780
				$query = $db->simple_select('users', 'COUNT(uid) AS count', $user_ip_sql);

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

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

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

			}

			}

		}

$total_results = $post_results+$user_results;

		}

$total_results = $post_results+$user_results;

Zeile 3886Zeile 3960
		if($ipaddressvalue)
{
$lang->ipsearch_results = $lang->sprintf($lang->ipsearch_results, $ipaddressvalue);

		if($ipaddressvalue)
{
$lang->ipsearch_results = $lang->sprintf($lang->ipsearch_results, $ipaddressvalue);

		}
else
{

		}
else
{

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


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


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

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

	}

	}

	else
{
$start = 0;

	else
{
$start = 0;

Zeile 4131Zeile 4205
	}

// Permission to edit this ban?

	}

// Permission to edit this ban?

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

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

	{
error_no_permission();
}

	{
error_no_permission();
}

Zeile 4154Zeile 4228
	log_moderator_action(array("uid" => $ban['uid'], "username" => $username), $lang->lifted_ban);

$plugins->run_hooks("modcp_liftban_end");

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

$plugins->run_hooks("modcp_liftban_end");





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


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


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

		if($user['uid'])
{
$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 4305
	// 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 4652Zeile 4727
		$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("