Vergleich modcp.php - 1.8.12 - 1.8.19

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

Zeile 303Zeile 334

$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 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 339Zeile 373
	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);


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


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)

			}

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

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


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


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 596Zeile 643

add_breadcrumb($lang->report_center, "modcp.php?action=reports");
add_breadcrumb($lang->all_reports, "modcp.php?action=allreports");


add_breadcrumb($lang->report_center, "modcp.php?action=reports");
add_breadcrumb($lang->all_reports, "modcp.php?action=allreports");





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

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

Zeile 610Zeile 657
	}

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

	}

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

	{

	{

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

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





		$report_count = 0;
while($fid = $db->fetch_field($query, 'id3'))
{

		$report_count = 0;
while($fid = $db->fetch_field($query, 'id3'))
{

Zeile 653Zeile 700
	}

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

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





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

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

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

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

			}

			}

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

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

Zeile 755Zeile 802

$report_data['reports'] = my_number_format($report['reports']);
$report_data['time'] = my_date('relative', $report['dateline']);


$report_data['reports'] = my_number_format($report['reports']);
$report_data['time'] = my_date('relative', $report['dateline']);





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


	eval("\$allreportedcontent = \"".$templates->get("modcp_reports_allreports")."\";");
output_page($allreportedcontent);
}

	eval("\$allreportedcontent = \"".$templates->get("modcp_reports_allreports")."\";");
output_page($allreportedcontent);
}

Zeile 770Zeile 817
if($mybb->input['action'] == "modlogs")
{
if($mybb->usergroup['canviewmodlogs'] == 0)

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

	{

	{

		error_no_permission();
}

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

		error_no_permission();
}

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

$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 905
	if($page)
{
$start = ($page-1) * $perpage;

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

	}

	}

	else
{
$start = 0;

	else
{
$start = 0;

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

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

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



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 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 1436Zeile 1500
	$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 1475Zeile 1539
		if($startdate[0] >= 24)
{
$startdate[0] = "00";

		if($startdate[0] >= 24)
{
$startdate[0] = "00";

		}
}


		}
}


	if(stristr($mybb->input['endtime_time'], "pm"))
{
$enddate[0] = 12+$enddate[0];

	if(stristr($mybb->input['endtime_time'], "pm"))
{
$enddate[0] = 12+$enddate[0];

Zeile 1490Zeile 1554
	$mybb->input['starttime_month'] = $mybb->get_input('starttime_month');
$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
if(!in_array($mybb->input['starttime_month'], $months))

	$mybb->input['starttime_month'] = $mybb->get_input('starttime_month');
$months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
if(!in_array($mybb->input['starttime_month'], $months))

	{

	{

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


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


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 1538Zeile 1602
		$allowmycode = 1;
}
else

		$allowmycode = 1;
}
else

	{

	{

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

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

	}

	}

	else
{
$allowsmilies = 0;

	else
{
$allowsmilies = 0;

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


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

	}

	}

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


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


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'])
{
$html_sel['yes'] = ' checked="checked"';
}
else
{
$html_sel['no'] = ' checked="checked"';
}

if($announcement['allowmycode'])
{












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"';
}
else
{
$mycode_sel['no'] = ' checked="checked"';

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

	}

	}


if($announcement['allowsmilies'])
{


if($announcement['allowsmilies'])
{

Zeile 1760Zeile 1834

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


$end_type_sel = array('infinite' => '', 'finite' => '');
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

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

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 1791Zeile 1865
		foreach($array as $key => $element)
{
$announcementarray[$key] = $element;

		foreach($array as $key => $element)
{
$announcementarray[$key] = $element;

		}


		}


		// Gather usergroup data from the cache
// Field => Array Key
$data_key = array(

		// Gather usergroup data from the cache
// Field => Array Key
$data_key = array(

Zeile 1822Zeile 1896
	$plugins->run_hooks("modcp_edit_announcement");

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

	$plugins->run_hooks("modcp_edit_announcement");

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

	output_page($announcements);

	output_page($announcements);

}

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

}

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

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

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

	}


	}


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

// Fetch announcements into their proper arrays

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

// Fetch announcements into their proper arrays

Zeile 1850Zeile 1924
			continue;
}
$announcements[$announcement['fid']][$announcement['aid']] = $announcement;

			continue;
}
$announcements[$announcement['fid']][$announcement['aid']] = $announcement;

	}


	}


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

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

Zeile 1881Zeile 1955
			eval("\$announcements_global = \"".$templates->get("modcp_no_announcements_global")."\";");
}
eval("\$announcements_global = \"".$templates->get("modcp_announcements_global")."\";");

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

	}


	}


	$announcements_forum = '';
fetch_forum_announcements();

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

	$announcements_forum = '';
fetch_forum_announcements();

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

	}


	}


	$plugins->run_hooks("modcp_announcements");

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

	$plugins->run_hooks("modcp_announcements");

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

Zeile 1936Zeile 2010
			{
$threads_to_delete[] = $thread['tid'];
}

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

		}

		}

		if(!empty($threads_to_approve))
{
$moderation->approve_threads($threads_to_approve);
log_moderator_action(array('tids' => $threads_to_approve), $lang->multi_approve_threads);
}
if(!empty($threads_to_delete))

		if(!empty($threads_to_approve))
{
$moderation->approve_threads($threads_to_approve);
log_moderator_action(array('tids' => $threads_to_approve), $lang->multi_approve_threads);
}
if(!empty($threads_to_delete))

		{

		{

			if($mybb->settings['soft_delete'] == 1)
{
$moderation->soft_delete_threads($threads_to_delete);

			if($mybb->settings['soft_delete'] == 1)
{
$moderation->soft_delete_threads($threads_to_delete);

Zeile 2124Zeile 2198
			$threaddate = my_date('relative', $thread['dateline']);

if($thread['username'] == "")

			$threaddate = my_date('relative', $thread['dateline']);

if($thread['username'] == "")

			{

			{

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

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

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

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

		}


		}


		if(!$threads && $mybb->input['type'] == "threads")
{
eval("\$threads = \"".$templates->get("modcp_modqueue_threads_empty")."\";");
}

if($threads)

		if(!$threads && $mybb->input['type'] == "threads")
{
eval("\$threads = \"".$templates->get("modcp_modqueue_threads_empty")."\";");
}

if($threads)

		{

		{

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

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





			$plugins->run_hooks("modcp_modqueue_threads_end");

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

			$plugins->run_hooks("modcp_modqueue_threads_end");

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

			{
$navsep = " | ";

			{
$navsep = " | ";

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


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


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

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

		}

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

$query = $db->query("

		}

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

$query = $db->query("

			SELECT COUNT(pid) AS unapprovedposts
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)

			SELECT COUNT(pid) AS unapprovedposts
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)

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

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





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

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

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

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





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

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

			}

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


			}

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


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

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

Zeile 2388Zeile 2462
		}

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

		}

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

		{

		{

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

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





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

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





			$plugins->run_hooks("modcp_modqueue_attachments_end");

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

			$plugins->run_hooks("modcp_modqueue_attachments_end");

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

				$navsep = " | ";
}

				$navsep = " | ";
}


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


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

Zeile 2425Zeile 2499

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


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

	}
}


	}
}


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

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

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

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

Zeile 2593Zeile 2666
		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 2701Zeile 2774
	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")
{

Zeile 2730Zeile 2819
	else
{
$errors = inline_error($errors);

	else
{
$errors = inline_error($errors);

	}


	}


	// Sanitize all input

	// Sanitize all input

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

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

	}

// 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']))
{
$defaulttitle = htmlspecialchars_uni($display_group['usertitle']);

	}

// Custom user title
if(!empty($userperms['usertitle']))
{
$defaulttitle = htmlspecialchars_uni($userperms['usertitle']);









	}
else
{

	}
else
{

Zeile 2763Zeile 2844
				$defaulttitle = $title['title'];
break;
}

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

		}
}


		}
}


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

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

	$user['usertitle'] = htmlspecialchars_uni($user['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)

Zeile 2779Zeile 2860
		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 2880
	{
$awaycheck = array('', '');
if($errors)

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

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

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

				$awaycheck[1] = "checked=\"checked\"";
}
else

				$awaycheck[1] = "checked=\"checked\"";
}
else

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

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

			}
else
{

			}
else
{

				$awaynotice = $lang->away_notice;
$awaycheck[0] = "checked=\"checked\"";
}

				$awaynotice = $lang->away_notice;
$awaycheck[0] = "checked=\"checked\"";
}

Zeile 2853Zeile 2934
		if(isset($returndate[1]))
{
$returndatemonthsel[$returndate[1]] = " selected=\"selected\"";

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

		}


		}


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

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

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

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

	}

	}


$plugins->run_hooks("modcp_editprofile_start");



$plugins->run_hooks("modcp_editprofile_start");


Zeile 2901Zeile 2982
			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))
{

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

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

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

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

			}

			}

			$altbg = alt_trow();
}
}

			$altbg = alt_trow();
}
}

Zeile 3127Zeile 3208

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

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'];
$user_yahoo = $mybb->input['yahoo'];


$plugins->run_hooks("modcp_editprofile_end");


$plugins->run_hooks("modcp_editprofile_end");





	eval("\$edituser = \"".$templates->get("modcp_editprofile")."\";");
output_page($edituser);
}

	eval("\$edituser = \"".$templates->get("modcp_editprofile")."\";");
output_page($edituser);
}





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

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

	}

	}


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



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


Zeile 3221Zeile 3312
		$perpage = $mybb->settings['threadsperpage'];
}
$where = '';

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





	if(isset($mybb->input['username']))
{
switch($db->type)

	if(isset($mybb->input['username']))
{
switch($db->type)

Zeile 3235Zeile 3326
				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'))


// Sort order & direction
switch($mybb->get_input('sortby'))

Zeile 3280Zeile 3371
	}

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 3297Zeile 3388
	foreach(array('username', 'sortby', 'order') as $field)
{
if(!empty($mybb->input[$field]))

	foreach(array('username', 'sortby', 'order') as $field)
{
if(!empty($mybb->input[$field]))

		{

		{

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

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





	$multipage = multipage($user_count, $perpage, $page, $page_url);

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

	$multipage = multipage($user_count, $perpage, $page, $page_url);

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





	$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 = '';
while($user = $db->fetch_array($query))

	$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 = '';
while($user = $db->fetch_array($query))

	{

	{

		$alt_row = alt_trow();
$user['username'] = htmlspecialchars_uni($user['username']);
$user['username'] = format_name($user['username'], $user['usergroup'], $user['displaygroup']);

		$alt_row = alt_trow();
$user['username'] = htmlspecialchars_uni($user['username']);
$user['username'] = format_name($user['username'], $user['usergroup'], $user['displaygroup']);

Zeile 3320Zeile 3411
		$regdate = my_date('relative', $user['regdate']);

if($user['invisible'] == 1 && $mybb->usergroup['canviewwolinvis'] != 1 && $user['uid'] != $mybb->user['uid'])

		$regdate = my_date('relative', $user['regdate']);

if($user['invisible'] == 1 && $mybb->usergroup['canviewwolinvis'] != 1 && $user['uid'] != $mybb->user['uid'])

		{

		{

			$lastdate = $lang->lastvisit_never;

if($user['lastvisit'])

			$lastdate = $lang->lastvisit_never;

if($user['lastvisit'])

Zeile 3342Zeile 3433
	if(!$users)
{
eval("\$users = \"".$templates->get("modcp_finduser_noresults")."\";");

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

	}

	}


$plugins->run_hooks("modcp_finduser_end");



$plugins->run_hooks("modcp_finduser_end");


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

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

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

Zeile 3460Zeile 3552
	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 = "
SELECT COUNT(wid) as count

	// Pagination stuff
$sql = "
SELECT COUNT(wid) as count

Zeile 3477Zeile 3569
	$total_warnings = $db->fetch_field($query, 'count');
$page = $mybb->get_input('page', MyBB::INPUT_INT);
if($page <= 0)

	$total_warnings = $db->fetch_field($query, 'count');
$page = $mybb->get_input('page', MyBB::INPUT_INT);
if($page <= 0)

	{

	{

		$page = 1;
}
$per_page = 20;

		$page = 1;
}
$per_page = 20;

Zeile 3486Zeile 3578
		$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_warning / $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 3625
		$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 3634
		}
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 3562Zeile 3660
	}

$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 3647Zeile 3749
					$visible_sql = " AND (p.visible = 1 AND t.visible = 1)";
$query = $db->simple_select("moderators", "fid, canviewunapprove, canviewdeleted", "(id='{$mybb->user['uid']}' AND isgroup='0') OR (id='{$mybb->user['usergroup']}' AND isgroup='1')");
while($moderator = $db->fetch_array($query))

					$visible_sql = " AND (p.visible = 1 AND t.visible = 1)";
$query = $db->simple_select("moderators", "fid, canviewunapprove, canviewdeleted", "(id='{$mybb->user['uid']}' AND isgroup='0') OR (id='{$mybb->user['usergroup']}' AND isgroup='1')");
while($moderator = $db->fetch_array($query))

					{

					{

						if($moderator['canviewunapprove'] == 1)
{
$unapprove_forums[] = $moderator['fid'];

						if($moderator['canviewunapprove'] == 1)
{
$unapprove_forums[] = $moderator['fid'];

Zeile 3667Zeile 3769
					{
$visible_sql .= " OR (p.visible = -1 AND p.fid IN(".implode(',', $deleted_forums).")) OR (t.visible = -1 AND t.fid IN(".implode(',', $deleted_forums)."))";
}

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

				}
else
{

				}
else
{

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

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

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

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

			}
}


			}
}


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

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

Zeile 3697Zeile 3799
				{
$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");





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

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

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

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

		$total_results = $post_results+$user_results;

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

		}


		}


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

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

Zeile 3738Zeile 3840
		}

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;

		}
else

		}
else

		{
$start = 0;
$page = 1;

		{
$start = 0;
$page = 1;

Zeile 3768Zeile 3870
		{
$query = $db->simple_select('users', 'username, uid, regip, lastip', $user_ip_sql,
array('order_by' => 'regdate', 'order_dir' => 'DESC', 'limit_start' => $start, 'limit' => $perpage));

		{
$query = $db->simple_select('users', 'username, uid, regip, lastip', $user_ip_sql,
array('order_by' => 'regdate', 'order_dir' => 'DESC', 'limit_start' => $start, 'limit' => $perpage));





			while($ipaddress = $db->fetch_array($query))
{
$result = false;

			while($ipaddress = $db->fetch_array($query))
{
$result = false;

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

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

	}

	}

	else
{
$start = 0;

	else
{
$start = 0;

Zeile 4131Zeile 4233
	}

// 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 4256
	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 4286
		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 4333
	// 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 4755
		$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("