Vergleich modcp.php - 1.8.7 - 1.8.14

  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,modcp_banuser_bangroups_hidden";
$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,modcp_banuser_bangroups";
$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";

$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_no_announcements_global,modcp_announcements_global,modcp_announcements_forum,modcp_announcements,modcp_editprofile_select_option,modcp_editprofile_select,modcp_finduser_noresults, modcp_nav_forums_posts";

$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_no_announcements_global,modcp_announcements_global,modcp_announcements_forum,modcp_announcements,modcp_editprofile_select_option,modcp_editprofile_select,modcp_finduser_noresults, modcp_nav_forums_posts";

$templatelist .= ",codebuttons,smilieinsert,modcp_announcements_new,modcp_modqueue_empty,forumjump_bit,forumjump_special,modcp_warninglogs_warning_revoked,modcp_warninglogs_warning,modcp_ipsearch_result,modcp_nav_modqueue,modcp_banuser_liftlist";

$templatelist .= ",codebuttons,modcp_announcements_new,modcp_modqueue_empty,forumjump_bit,forumjump_special,modcp_warninglogs_warning_revoked,modcp_warninglogs_warning,modcp_ipsearch_result,modcp_nav_modqueue,modcp_banuser_liftlist";

$templatelist .= ",modcp_modlogs,modcp_finduser_user,modcp_finduser,usercp_profile_customfield,usercp_profile_profilefields,modcp_ipsearch_noresults,modcp_ipsearch_results,modcp_ipsearch_misc_info,modcp_nav_announcements,modcp_modqueue_post_link";
$templatelist .= ",modcp_editprofile,modcp_ipsearch,modcp_banuser_addusername,modcp_banuser,modcp_warninglogs_nologs,modcp_banuser_editusername,modcp_lastattachment,modcp_lastpost,modcp_lastthread,modcp_nobanned,modcp_modqueue_thread_link";

$templatelist .= ",modcp_modlogs,modcp_finduser_user,modcp_finduser,usercp_profile_customfield,usercp_profile_profilefields,modcp_ipsearch_noresults,modcp_ipsearch_results,modcp_ipsearch_misc_info,modcp_nav_announcements,modcp_modqueue_post_link";
$templatelist .= ",modcp_editprofile,modcp_ipsearch,modcp_banuser_addusername,modcp_banuser,modcp_warninglogs_nologs,modcp_banuser_editusername,modcp_lastattachment,modcp_lastpost,modcp_lastthread,modcp_nobanned,modcp_modqueue_thread_link";

$templatelist .= ",modcp_warninglogs,modcp_modlogs_result,modcp_editprofile_signature,forumjump_advanced,smilieinsert_getmore,smilieinsert_smilie,smilieinsert_smilie_empty,modcp_announcements_forum_nomod,modcp_announcements_announcement";
$templatelist .= ",multipage,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start,modcp_editprofile_away,modcp_awaitingattachments,modcp_modqueue_attachment_link,modcp_latestfivemodactions,modcp_nav_banning";
$templatelist .= ",postbit_groupimage,postbit_userstar,postbit_online,postbit_offline,postbit_away,postbit_avatar,postbit_find,postbit_pm,postbit_email,postbit_www,postbit_author_user,announcement_edit,announcement_quickdelete,postbit,preview,postmodcp_nav_announcements,modcp_nav_reportcenter,modcp_nav_modlogs";
$templatelist .= ",modcp_awaitingmoderation_none,modcp_banning_edit,modcp_banuser_bangroups_group,modcp_banuser_lift,modcp_modlogs_result_announcement,modcp_modlogs_result_forum,modcp_modlogs_result_post,modcp_modlogs_result_thread,modcp_modlogs_user";

$templatelist .= ",modcp_warninglogs,modcp_modlogs_result,modcp_editprofile_signature,forumjump_advanced,modcp_announcements_forum_nomod,modcp_announcements_announcement,usercp_profile_away,modcp_modlogs_user,modcp_editprofile_away";
$templatelist .= ",multipage,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,multipage_start,modcp_awaitingattachments,modcp_modqueue_attachment_link";
$templatelist .= ",postbit_groupimage,postbit_userstar,postbit_online,postbit_offline,postbit_away,postbit_avatar,postbit_find,postbit_pm,postbit_email,postbit_www,postbit_author_user,announcement_edit,announcement_quickdelete";
$templatelist .= ",modcp_awaitingmoderation_none,modcp_banning_edit,modcp_banuser_bangroups_group,modcp_banuser_lift,modcp_modlogs_result_announcement,modcp_modlogs_result_forum,modcp_modlogs_result_post,modcp_modlogs_result_thread";

$templatelist .= ",modcp_nav_warninglogs,modcp_nav_ipsearch,modcp_nav_users,modcp_announcements_day,modcp_announcements_month_start,modcp_announcements_month_end,modcp_announcements_announcement_expired,modcp_announcements_announcement_active";

$templatelist .= ",modcp_nav_warninglogs,modcp_nav_ipsearch,modcp_nav_users,modcp_announcements_day,modcp_announcements_month_start,modcp_announcements_month_end,modcp_announcements_announcement_expired,modcp_announcements_announcement_active";

$templatelist .= ",modcp_modqueue_link_forum,modcp_modqueue_link_thread,usercp_profile_day,usercp_profile_away,modcp_ipsearch_result_regip,modcp_ipsearch_result_lastip,modcp_ipsearch_result_post,modcp_ipsearch_results_information,usercp_profile_profilefields_text";
$templatelist .= ",usercp_profile_profilefields_select_option,usercp_profile_profilefields_multiselect,usercp_profile_profilefields_select,usercp_profile_profilefields_textarea,usercp_profile_profilefields_radio,usercp_profile_profilefields_checkbox";


$templatelist .= ",modcp_modqueue_link_forum,modcp_modqueue_link_thread,usercp_profile_day,modcp_ipsearch_result_regip,modcp_ipsearch_result_lastip,modcp_ipsearch_result_post,modcp_ipsearch_results_information,usercp_profile_profilefields_text";
$templatelist .= ",usercp_profile_profilefields_select_option,usercp_profile_profilefields_multiselect,usercp_profile_profilefields_select,usercp_profile_profilefields_textarea,usercp_profile_profilefields_radio,postbit";
$templatelist .= ",modcp_banning_remaining,postmodcp_nav_announcements,modcp_nav_reportcenter,modcp_nav_modlogs,modcp_latestfivemodactions,modcp_banuser_bangroups_hidden,modcp_banuser_bangroups,usercp_profile_profilefields_checkbox";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_user.php";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_user.php";

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





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

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

	}

$plugins->run_hooks("modcp_do_reports");


	}

$plugins->run_hooks("modcp_do_reports");


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

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


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

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





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

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

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


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


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

	}


	}


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

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

Zeile 322Zeile 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 338Zeile 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;
$pages = $postcount / $perpage;
$pages = ceil($pages);

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

if($page && $page > 0)


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

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

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

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

if($page && $page > 0)

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

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

Zeile 369Zeile 402
	{
$start = 0;
$page = 1;

	{
$start = 0;
$page = 1;

	}


	}


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

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

	}


	}


	$plugins->run_hooks("modcp_reports_start");

// Reports
$reports = '';
$query = $db->query("

	$plugins->run_hooks("modcp_reports_start");

// Reports
$reports = '';
$query = $db->query("

		SELECT r.*, u.username

		SELECT r.*, u.username, rr.title

		FROM ".TABLE_PREFIX."reportedcontent r
LEFT JOIN ".TABLE_PREFIX."users u ON (r.uid = u.uid)

		FROM ".TABLE_PREFIX."reportedcontent r
LEFT JOIN ".TABLE_PREFIX."users u ON (r.uid = u.uid)

 
		LEFT JOIN ".TABLE_PREFIX."reportreasons rr ON (r.reasonid = rr.rid)

		WHERE r.reportstatus = '0'{$tflist_reports}
ORDER BY r.reports DESC
LIMIT {$start}, {$perpage}

		WHERE r.reportstatus = '0'{$tflist_reports}
ORDER BY r.reports DESC
LIMIT {$start}, {$perpage}

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

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

			{

			{

				// Profile UID is in ID
if(!isset($usercache[$report['id']]))
{

				// Profile UID is in ID
if(!isset($usercache[$report['id']]))
{

Zeile 429Zeile 463
			{
// This (should) be a post
$postcache[$report['id']] = $report['id'];

			{
// This (should) be a post
$postcache[$report['id']] = $report['id'];

			}


			}


			// Lastpost info - is it missing (pre-1.8)?
$lastposter = $report['uid'];
if(!$report['lastreport'])
{
// Last reporter is our first reporter
$report['lastreport'] = $report['dateline'];

			// Lastpost info - is it missing (pre-1.8)?
$lastposter = $report['uid'];
if(!$report['lastreport'])
{
// Last reporter is our first reporter
$report['lastreport'] = $report['dateline'];

			}


			}


			if($report['reporters'])
{
$reporters = my_unserialize($report['reporters']);

			if($report['reporters'])
{
$reporters = my_unserialize($report['reporters']);

Zeile 488Zeile 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)
{
$trow = alt_trow();

if(!$report['type'])

		// Now that we have all of the information needed, display the reports
foreach($reportcache as $report)
{
$trow = alt_trow();

if(!$report['type'])

			{

			{

				// Assume a post
$report['type'] = 'post';
}

// Report Information
$report_data = array();

				// Assume a post
$report['type'] = 'post';
}

// Report Information
$report_data = array();





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

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

					$user = build_profile_link($postcache[$report['id']]['username'], $postcache[$report['id']]['uid']);

					$user = build_profile_link(htmlspecialchars_uni($postcache[$report['id']]['username']), $postcache[$report['id']]['uid']);

					$report_data['content'] = $lang->sprintf($lang->report_info_post, $post, $user);

					$report_data['content'] = $lang->sprintf($lang->report_info_post, $post, $user);





					$thread_link = get_thread_link($postcache[$report['id']]['tid']);

					$thread_link = get_thread_link($postcache[$report['id']]['tid']);

					$thread_subject = htmlspecialchars_uni($postcache[$report['id']]['subject']);

					$thread_subject = htmlspecialchars_uni($parser->parse_badwords($postcache[$report['id']]['subject']));

					$report_data['content'] .= $lang->sprintf($lang->report_info_post_thread, $thread_link, $thread_subject);

break;
case 'profile':

					$report_data['content'] .= $lang->sprintf($lang->report_info_post_thread, $thread_link, $thread_subject);

break;
case 'profile':

					$user = build_profile_link($usercache[$report['id']]['username'], $usercache[$report['id']]['uid']);

					$user = build_profile_link(htmlspecialchars_uni($usercache[$report['id']]['username']), $usercache[$report['id']]['uid']);

					$report_data['content'] = $lang->sprintf($lang->report_info_profile, $user);

					$report_data['content'] = $lang->sprintf($lang->report_info_profile, $user);

					break;

					break;

				case 'reputation':
$reputation_link = "reputation.php?uid={$usercache[$report['id3']]['uid']}#rid{$report['id']}";

				case 'reputation':
$reputation_link = "reputation.php?uid={$usercache[$report['id3']]['uid']}#rid{$report['id']}";

					$bad_user = build_profile_link($usercache[$report['id2']]['username'], $usercache[$report['id2']]['uid']);

					$bad_user = build_profile_link(htmlspecialchars_uni($usercache[$report['id2']]['username']), $usercache[$report['id2']]['uid']);

					$report_data['content'] = $lang->sprintf($lang->report_info_reputation, $reputation_link, $bad_user);


					$report_data['content'] = $lang->sprintf($lang->report_info_reputation, $reputation_link, $bad_user);


					$good_user = build_profile_link($usercache[$report['id3']]['username'], $usercache[$report['id3']]['uid']);

					$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_data['content'] .= $lang->sprintf($lang->report_info_rep_profile, $good_user);
break;
}


			// Report reason and comment
$report_data['comment'] = $lang->na;
$report_string = "report_reason_{$report['reason']}";

if(isset($lang->$report_string))
{
$report_data['comment'] = $lang->$report_string;
}
else if(!empty($report['reason']))
{
$report_data['comment'] = htmlspecialchars_uni($report['reason']);
}









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

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


			$report_reports = 1;
if($report['reports'])
{

			$report_reports = 1;
if($report['reports'])
{

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

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

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

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

				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 635Zeile 689
		}
}
$postcount = (int)$report_count;

		}
}
$postcount = (int)$report_count;

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

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

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

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

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

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


if($page)
{


if($page)
{

Zeile 662Zeile 716
	$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=allreports");
$allreportspages = '';
if($postcount > $perpage)

	$multipage = multipage($postcount, $perpage, $page, "modcp.php?action=allreports");
$allreportspages = '';
if($postcount > $perpage)

	{

	{

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

$plugins->run_hooks("modcp_allreports_start");

$query = $db->query("

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

$plugins->run_hooks("modcp_allreports_start");

$query = $db->query("

		SELECT r.*, u.username, p.username AS postusername, up.uid AS postuid, t.subject AS threadsubject, prrep.username AS repusername, pr.username AS profileusername

		SELECT r.*, u.username, p.username AS postusername, up.uid AS postuid, t.subject AS threadsubject, prrep.username AS repusername, pr.username AS profileusername, rr.title

		FROM ".TABLE_PREFIX."reportedcontent r
LEFT JOIN ".TABLE_PREFIX."posts p ON (r.id=p.pid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (p.tid=t.tid)

		FROM ".TABLE_PREFIX."reportedcontent r
LEFT JOIN ".TABLE_PREFIX."posts p ON (r.id=p.pid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (p.tid=t.tid)

Zeile 677Zeile 731
		LEFT JOIN ".TABLE_PREFIX."users up ON (p.uid=up.uid)
LEFT JOIN ".TABLE_PREFIX."users pr ON (pr.uid=r.id)
LEFT JOIN ".TABLE_PREFIX."users prrep ON (prrep.uid=r.id2)

		LEFT JOIN ".TABLE_PREFIX."users up ON (p.uid=up.uid)
LEFT JOIN ".TABLE_PREFIX."users pr ON (pr.uid=r.id)
LEFT JOIN ".TABLE_PREFIX."users prrep ON (prrep.uid=r.id2)

 
		LEFT JOIN ".TABLE_PREFIX."reportreasons rr ON (r.reasonid = rr.rid)

		{$wflist_reports}
ORDER BY r.dateline DESC
LIMIT {$start}, {$perpage}

		{$wflist_reports}
ORDER BY r.dateline DESC
LIMIT {$start}, {$perpage}

Zeile 696Zeile 751
			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']}";

				$user = build_profile_link($report['postusername'], $report['postuid']);

				$user = build_profile_link(htmlspecialchars_uni($report['postusername']), $report['postuid']);

				$report_data['content'] = $lang->sprintf($lang->report_info_post, $post, $user);

$thread_link = get_thread_link($report['id2']);

				$report_data['content'] = $lang->sprintf($lang->report_info_post, $post, $user);

$thread_link = get_thread_link($report['id2']);

				$thread_subject = htmlspecialchars_uni($report['threadsubject']);

				$thread_subject = htmlspecialchars_uni($parser->parse_badwords($report['threadsubject']));

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

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

				$user = build_profile_link($report['profileusername'], $report['id']);

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

				$report_data['content'] = $lang->sprintf($lang->report_info_profile, $user);
}
else if($report['type'] == 'reputation')
{

				$user = build_profile_link($report['repusername'], $report['id2']);

				$user = build_profile_link(htmlspecialchars_uni($report['repusername']), $report['id2']);

				$reputation_link = "reputation.php?uid={$report['id3']}#rid{$report['id']}";
$report_data['content'] = $lang->sprintf($lang->report_info_reputation, $reputation_link, $user);
}

// Report reason and comment

				$reputation_link = "reputation.php?uid={$report['id3']}#rid{$report['id']}";
$report_data['content'] = $lang->sprintf($lang->report_info_reputation, $reputation_link, $user);
}

// Report reason and comment

			$report_data['comment'] = $lang->na;
$report_string = "report_reason_{$report['reason']}";

















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

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


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


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

Zeile 725Zeile 796
				$report['username'] = $lang->na_deleted;
$report['reporterlink'] = $post;
}

				$report['username'] = $lang->na_deleted;
$report['reporterlink'] = $post;
}


if(isset($lang->$report_string))
{
$report_data['comment'] = $lang->$report_string;
}
else if(!empty($report['reason']))
{
$report_data['comment'] = htmlspecialchars_uni($report['reason']);
}

			$report['username'] = htmlspecialchars_uni($report['username']);










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

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

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

	$plugins->run_hooks("modcp_allreports_end");

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

Zeile 793Zeile 856
			break;
case "forum":
$sortby = "f.name";

			break;
case "forum":
$sortby = "f.name";

			break;

			break;

		case "thread":
$sortby = "t.subject";
break;

		case "thread":
$sortby = "t.subject";
break;

Zeile 807Zeile 870
	}

$plugins->run_hooks("modcp_modlogs_start");

	}

$plugins->run_hooks("modcp_modlogs_start");





	$query = $db->query("
SELECT COUNT(l.dateline) AS count
FROM ".TABLE_PREFIX."moderatorlog l

	$query = $db->query("
SELECT COUNT(l.dateline) AS count
FROM ".TABLE_PREFIX."moderatorlog l

Zeile 821Zeile 884
	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);

	}

	}


$postcount = (int)$rescount;
$pages = $postcount / $perpage;


$postcount = (int)$rescount;
$pages = $postcount / $perpage;

Zeile 833Zeile 896
	}

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 851Zeile 914
	foreach(array('uid', 'fid') as $field)
{
$mybb->input[$field] = $mybb->get_input($field, MyBB::INPUT_INT);

	foreach(array('uid', 'fid') as $field)
{
$mybb->input[$field] = $mybb->get_input($field, MyBB::INPUT_INT);

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

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

		}
}


		}
}


Zeile 870Zeile 933
	if($postcount > $perpage)
{
eval("\$resultspages = \"".$templates->get("modcp_modlogs_multipage")."\";");

	if($postcount > $perpage)
{
eval("\$resultspages = \"".$templates->get("modcp_modlogs_multipage")."\";");

	}

	}

	$query = $db->query("
SELECT l.*, u.username, u.usergroup, u.displaygroup, t.subject AS tsubject, f.name AS fname, p.subject AS psubject
FROM ".TABLE_PREFIX."moderatorlog l

	$query = $db->query("
SELECT l.*, u.username, u.usergroup, u.displaygroup, t.subject AS tsubject, f.name AS fname, p.subject AS psubject
FROM ".TABLE_PREFIX."moderatorlog l

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

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

			$logitem['tsubject'] = htmlspecialchars_uni($logitem['tsubject']);

			$logitem['tsubject'] = htmlspecialchars_uni($parser->parse_badwords($logitem['tsubject']));

			$logitem['thread'] = get_thread_link($logitem['tid']);
eval("\$information .= \"".$templates->get("modcp_modlogs_result_thread")."\";");
}

			$logitem['thread'] = get_thread_link($logitem['tid']);
eval("\$information .= \"".$templates->get("modcp_modlogs_result_thread")."\";");
}

Zeile 906Zeile 977
		}
if($logitem['psubject'])
{

		}
if($logitem['psubject'])
{

			$logitem['psubject'] = htmlspecialchars_uni($logitem['psubject']);

			$logitem['psubject'] = htmlspecialchars_uni($parser->parse_badwords($logitem['psubject']));

			$logitem['post'] = get_post_link($logitem['pid']);
eval("\$information .= \"".$templates->get("modcp_modlogs_result_post")."\";");

			$logitem['post'] = get_post_link($logitem['pid']);
eval("\$information .= \"".$templates->get("modcp_modlogs_result_post")."\";");

		}

		}


// Edited a user or managed announcement?
if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject'])


// Edited a user or managed announcement?
if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject'])

Zeile 917Zeile 988
			$data = my_unserialize($logitem['data']);
if(!empty($data['uid']))
{

			$data = my_unserialize($logitem['data']);
if(!empty($data['uid']))
{

 
				$data['username'] = htmlspecialchars_uni($data['username']);

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

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

				$data['subject'] = htmlspecialchars_uni($data['subject']);

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

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

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

 

$plugins->run_hooks("modcp_modlogs_result");


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


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

Zeile 933Zeile 1007
	if(!$results)
{
eval("\$results = \"".$templates->get("modcp_modlogs_noresults")."\";");

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

	}

$plugins->run_hooks("modcp_modlogs_filter");

	}

$plugins->run_hooks("modcp_modlogs_filter");


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


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

Zeile 978Zeile 1052
	verify_post_check($mybb->get_input('my_post_key'));

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

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

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

	{

	{

		error_no_permission();
}


		error_no_permission();
}


Zeile 1002Zeile 1076
	$cache->update_forumsdisplay();

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

	$cache->update_forumsdisplay();

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

}


}


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

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

Zeile 1015Zeile 1089
	$query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");

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

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

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

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

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


if(!$announcement)
{


if(!$announcement)
{

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


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


	$startdate = gmmktime((int)$startdate[0], (int)$startdate[1], 0, $mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT));



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

$startdate = gmmktime((int)$startdate[0], (int)$startdate[1], 0, $mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) - $localized_time_offset;

	if(!checkdate($mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) || $startdate < 0 || $startdate == false)
{
$errors[] = $lang->error_invalid_start_date;

	if(!checkdate($mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) || $startdate < 0 || $startdate == false)
{
$errors[] = $lang->error_invalid_start_date;

Zeile 1117Zeile 1193
		{
$mybb->input['endtime_month'] = '01';
}

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

		$enddate = gmmktime((int)$enddate[0], (int)$enddate[1], 0, $mybb->get_input('endtime_month', MyBB::INPUT_INT), $mybb->get_input('endtime_day', MyBB::INPUT_INT), $mybb->get_input('endtime_year', MyBB::INPUT_INT));

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

		if(!checkdate($mybb->get_input('endtime_month', MyBB::INPUT_INT), $mybb->get_input('endtime_day', MyBB::INPUT_INT), $mybb->get_input('endtime_year', MyBB::INPUT_INT)) || $enddate < 0 || $enddate == false)
{
$errors[] = $lang->error_invalid_end_date;

		if(!checkdate($mybb->get_input('endtime_month', MyBB::INPUT_INT), $mybb->get_input('endtime_day', MyBB::INPUT_INT), $mybb->get_input('endtime_year', MyBB::INPUT_INT)) || $enddate < 0 || $enddate == false)
{
$errors[] = $lang->error_invalid_end_date;

Zeile 1129Zeile 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 1178Zeile 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 1239Zeile 1315
	}
else
{

	}
else
{

		// Note: dates are in GMT timezone
$starttime_time = gmdate("g:i a", TIME_NOW);
$endtime_time = gmdate("g:i a", TIME_NOW);
$startday = $endday = gmdate("j", TIME_NOW);
$startmonth = $endmonth = gmdate("m", TIME_NOW);
$startdateyear = gmdate("Y", TIME_NOW);


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

$starttime_time = gmdate($mybb->settings['timeformat'], $localized_time);
$endtime_time = gmdate($mybb->settings['timeformat'], $localized_time);
$startday = $endday = gmdate("j", $localized_time);
$startmonth = $endmonth = gmdate("m", $localized_time);
$startdateyear = gmdate("Y", $localized_time);


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


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

			'allowhtml' => 1,

			'allowhtml' => 0,

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

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

Zeile 1302Zeile 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 1351Zeile 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 1427Zeile 1514
	// Basic error checking
$mybb->input['title'] = $mybb->get_input('title');
if(!trim($mybb->input['title']))

	// Basic error checking
$mybb->input['title'] = $mybb->get_input('title');
if(!trim($mybb->input['title']))

	{

	{

		$errors[] = $lang->error_missing_title;

		$errors[] = $lang->error_missing_title;

	}


	}


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

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

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

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

		}

		}

	}

if(stristr($mybb->input['endtime_time'], "pm"))

	}

if(stristr($mybb->input['endtime_time'], "pm"))

Zeile 1459Zeile 1546
		if($enddate[0] >= 24)
{
$enddate[0] = "00";

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

		}
}

		}
}


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


	$startdate = gmmktime((int)$startdate[0], (int)$startdate[1], 0, $mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT));



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

$startdate = gmmktime((int)$startdate[0], (int)$startdate[1], 0, $mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) - $localized_time_offset;

	if(!checkdate($mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) || $startdate < 0 || $startdate == false)
{
$errors[] = $lang->error_invalid_start_date;

	if(!checkdate($mybb->get_input('starttime_month', MyBB::INPUT_INT), $mybb->get_input('starttime_day', MyBB::INPUT_INT), $mybb->get_input('starttime_year', MyBB::INPUT_INT)) || $startdate < 0 || $startdate == false)
{
$errors[] = $lang->error_invalid_start_date;

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

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

		}
$enddate = gmmktime((int)$enddate[0], (int)$enddate[1], 0, $mybb->get_input('endtime_month', MyBB::INPUT_INT), $mybb->get_input('endtime_day', MyBB::INPUT_INT), $mybb->get_input('endtime_year', MyBB::INPUT_INT));

		}
$enddate = gmmktime((int)$enddate[0], (int)$enddate[1], 0, $mybb->get_input('endtime_month', MyBB::INPUT_INT), $mybb->get_input('endtime_day', MyBB::INPUT_INT), $mybb->get_input('endtime_year', MyBB::INPUT_INT)) - $localized_time_offset;

		if(!checkdate($mybb->get_input('endtime_month', MyBB::INPUT_INT), $mybb->get_input('endtime_day', MyBB::INPUT_INT), $mybb->get_input('endtime_year', MyBB::INPUT_INT)) || $enddate < 0 || $enddate == false)
{
$errors[] = $lang->error_invalid_end_date;

		if(!checkdate($mybb->get_input('endtime_month', MyBB::INPUT_INT), $mybb->get_input('endtime_day', MyBB::INPUT_INT), $mybb->get_input('endtime_year', MyBB::INPUT_INT)) || $enddate < 0 || $enddate == false)
{
$errors[] = $lang->error_invalid_end_date;

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

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

		}

		}

	}


	}


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

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

	{
$allowhtml = 1;

	{
$allowhtml = 1;

	}

	}

	else
{
$allowhtml = 0;

	else
{
$allowhtml = 0;

	}

	}

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

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

	}

	}

	else
{
$allowmycode = 0;

	else
{
$allowmycode = 0;

	}

	}

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

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

	}

	}

	else
{
$allowsmilies = 0;

	else
{
$allowsmilies = 0;

Zeile 1529Zeile 1618
	if(!$errors)
{
if(isset($mybb->input['preview']))

	if(!$errors)
{
if(isset($mybb->input['preview']))

		{

		{

			$preview = array();
$mybb->input['action'] = 'edit_announcement';
}

			$preview = array();
$mybb->input['action'] = 'edit_announcement';
}

Zeile 1547Zeile 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 1641Zeile 1730
	}
else
{

	}
else
{

		// Note: dates are in GMT timezone
$starttime_time = gmdate('g:i a', $announcement['startdate']);
$endtime_time = gmdate('g:i a', $announcement['enddate']);

		$localized_time_startdate = $announcement['startdate'] + (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
$localized_time_enddate = $announcement['enddate'] + (float)$mybb->user['timezone']*3600 + $mybb->user['dst']*3600;






		$startday = gmdate('j', $announcement['startdate']);
$endday = gmdate('j', $announcement['enddate']);

		$starttime_time = gmdate($mybb->settings['timeformat'], $localized_time_startdate);
$endtime_time = gmdate($mybb->settings['timeformat'], $localized_time_enddate);





		$startmonth = gmdate('m', $announcement['startdate']);
$endmonth = gmdate('m', $announcement['enddate']);

		$startday = gmdate('j', $localized_time_startdate);
$endday = gmdate('j', $localized_time_enddate);





		$startdateyear = gmdate('Y', $announcement['startdate']);
$enddateyear = gmdate('Y', $announcement['enddate']);




		$startmonth = gmdate('m', $localized_time_startdate);
$endmonth = gmdate('m', $localized_time_enddate);

$startdateyear = gmdate('Y', $localized_time_startdate);
$enddateyear = gmdate('Y', $localized_time_enddate);


$errored = false;
}


$errored = false;
}

Zeile 1665Zeile 1756
		{
$selected = " selected=\"selected\"";
eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";");

		{
$selected = " selected=\"selected\"";
eval("\$startdateday .= \"".$templates->get("modcp_announcements_day")."\";");

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

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


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


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

			eval("\$enddateday .= \"".$templates->get("modcp_announcements_day")."\";");
}
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")."\";");

		}
}

		}
}


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


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

	{

	{

		$startmonthsel[$month] = '';
$endmonthsel[$month] = '';
}

		$startmonthsel[$month] = '';
$endmonthsel[$month] = '';
}

Zeile 1694Zeile 1785
	$endmonthsel[$endmonth] = "selected=\"selected\"";

$startdatemonth = $enddatemonth = '';

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

$startdatemonth = $enddatemonth = '';





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


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


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



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 1751Zeile 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 1841Zeile 1942
					eval("\$icon = \"".$templates->get("modcp_announcements_announcement_active")."\";");
}


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


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

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


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


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

Zeile 2098Zeile 2199
			{
if($thread['threadusername'] != "")
{

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

 
					$thread['threadusername'] = htmlspecialchars_uni($thread['threadusername']);

					$profile_link = $thread['threadusername'];
}
else

					$profile_link = $thread['threadusername'];
}
else

Zeile 2107Zeile 2209
			}
else
{

			}
else
{

 
				$thread['username'] = htmlspecialchars_uni($thread['username']);

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


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


Zeile 2219Zeile 2322
			{
if($post['postusername'] != "")
{

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

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

					$profile_link = $post['postusername'];
}
else

					$profile_link = $post['postusername'];
}
else

Zeile 2228Zeile 2332
			}
else
{

			}
else
{

 
				$post['username'] = htmlspecialchars_uni($post['username']);

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


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


Zeile 2341Zeile 2446

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



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


			$attachment['postsubject'] = htmlspecialchars_uni($attachment['postsubject']);

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

			$attachment['filename'] = htmlspecialchars_uni($attachment['filename']);

			$attachment['filename'] = htmlspecialchars_uni($attachment['filename']);

			$attachment['threadsubject'] = htmlspecialchars_uni($attachment['threadsubject']);

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

			$attachment['filesize'] = get_friendly_size($attachment['filesize']);

$link = get_post_link($attachment['pid'], $attachment['tid']) . "#pid{$attachment['pid']}";
$thread_link = get_thread_link($attachment['tid']);

			$attachment['filesize'] = get_friendly_size($attachment['filesize']);

$link = get_post_link($attachment['pid'], $attachment['tid']) . "#pid{$attachment['pid']}";
$thread_link = get_thread_link($attachment['tid']);

 
			$attachment['username'] = htmlspecialchars_uni($attachment['username']);

			$profile_link = build_profile_link($attachment['username'], $attachment['uid']);

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

			$profile_link = build_profile_link($attachment['username'], $attachment['uid']);

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

Zeile 2669Zeile 2775
		error_no_permission();
}


		error_no_permission();
}


	if($user['website'] == "" || $user['website'] == "http://")

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

	{

	{

		$user['website'] = "http://";

		$user['website'] = '';

	}

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

	}

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

Zeile 2845Zeile 2951
	{
foreach($pfcache as $profilefield)
{

	{
foreach($pfcache as $profilefield)
{

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


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

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

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

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


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


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

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


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


Zeile 3158Zeile 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 3173Zeile 3283
if($mybb->input['action'] == "finduser")
{
if($mybb->usergroup['caneditprofiles'] == 0)

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

	{

	{

		error_no_permission();
}


		error_no_permission();
}


Zeile 3203Zeile 3313

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


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

	{

	{

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

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

Zeile 3233Zeile 3343
	if($mybb->get_input('page') != "last")
{
$page = $mybb->get_input('page');

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

	}

	}


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


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





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

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

	{

	{

		$page = $pages;

		$page = $pages;

	}

	}


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


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

	{

	{

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

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

Zeile 3260Zeile 3370
	$page_url = 'modcp.php?action=finduser';
foreach(array('username', 'sortby', 'order') as $field)
{

	$page_url = 'modcp.php?action=finduser';
foreach(array('username', 'sortby', 'order') as $field)
{

		$mybb->input[$field] = urlencode($mybb->get_input($field));

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

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

Zeile 3279Zeile 3388
	while($user = $db->fetch_array($query))
{
$alt_row = alt_trow();

	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']);
$user['postnum'] = my_number_format($user['postnum']);
$regdate = my_date('relative', $user['regdate']);

		$user['username'] = format_name($user['username'], $user['usergroup'], $user['displaygroup']);
$user['postnum'] = my_number_format($user['postnum']);
$regdate = my_date('relative', $user['regdate']);

Zeile 3485Zeile 3595
	while($row = $db->fetch_array($query))
{
$trow = alt_trow();

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

 
		$row['username'] = htmlspecialchars_uni($row['username']);

		$username = format_name($row['username'], $row['usergroup'], $row['displaygroup']);
$username_link = build_profile_link($username, $row['uid']);

		$username = format_name($row['username'], $row['usergroup'], $row['displaygroup']);
$username_link = build_profile_link($username, $row['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']);

		$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 3498Zeile 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 3730Zeile 3842
		{
$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;

 
				$ipaddress['username'] = htmlspecialchars_uni($ipaddress['username']);

				$profile_link = build_profile_link($ipaddress['username'], $ipaddress['uid']);
$trow = alt_trow();
$ip = false;
if(is_array($ip_range))
{
if(strcmp($ip_range[0], $ipaddress['regip']) <= 0 && strcmp($ip_range[1], $ipaddress['regip']) >= 0)

				$profile_link = build_profile_link($ipaddress['username'], $ipaddress['uid']);
$trow = alt_trow();
$ip = false;
if(is_array($ip_range))
{
if(strcmp($ip_range[0], $ipaddress['regip']) <= 0 && strcmp($ip_range[1], $ipaddress['regip']) >= 0)

					{

					{

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

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

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

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

				}

				}

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

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

				}

				}

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

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

				}

				}

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

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

Zeile 3768Zeile 3881
				if($result)
{
--$post_limit;

				if($result)
{
--$post_limit;

				}

				}

			}
}
$post_start = 0;

			}
}
$post_start = 0;

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

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

					if(!$ipaddress['username']) $ipaddress['username'] = $ipaddress['postusername']; // Guest username support





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

					$trow = alt_trow();
if(!$ipaddress['subject'])
{

					$trow = alt_trow();
if(!$ipaddress['subject'])
{

Zeile 3826Zeile 3943
					}

$ipaddress['postlink'] = get_post_link($ipaddress['pid'], $ipaddress['tid']);

					}

$ipaddress['postlink'] = get_post_link($ipaddress['pid'], $ipaddress['tid']);

					$ipaddress['subject'] = htmlspecialchars_uni($ipaddress['subject']);

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

					$ipaddress['profilelink'] = build_profile_link($ipaddress['username'], $ipaddress['uid']);

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

					$ipaddress['profilelink'] = build_profile_link($ipaddress['username'], $ipaddress['uid']);

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

Zeile 3960Zeile 4077
	}

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

	}

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

	{

	{

		$page = 1;
}


		$page = 1;
}


Zeile 3992Zeile 4109
	$bannedusers = '';
while($banned = $db->fetch_array($query))
{

	$bannedusers = '';
while($banned = $db->fetch_array($query))
{

 
		$banned['username'] = htmlspecialchars_uni($banned['username']);

		$profile_link = build_profile_link($banned['username'], $banned['uid']);

// Only show the edit & lift links if current user created ban, or is super mod/admin

		$profile_link = build_profile_link($banned['username'], $banned['uid']);

// Only show the edit & lift links if current user created ban, or is super mod/admin

Zeile 4001Zeile 4119
			eval("\$edit_link = \"".$templates->get("modcp_banning_edit")."\";");
}


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


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

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


$trow = alt_trow();



$trow = alt_trow();


Zeile 4026Zeile 4144

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



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


			if($remaining < 3600)




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

if($remaining <= 0)

			{

			{

				$timeremaining = "<span style=\"color: red;\">({$timeremaining} {$lang->ban_remaining})</span>";
}
else if($remaining < 86400)


				$banned_class = "imminent_banned";
$ban_remaining = $lang->ban_ending_imminently;
}
if($remaining < 3600)

			{

			{

				$timeremaining = "<span style=\"color: maroon;\">({$timeremaining} {$lang->ban_remaining})</span>";
}
else if($remaining < 604800)

				$banned_class = "high_banned";
}
else if($remaining < 86400)

			{

			{

				$timeremaining = "<span style=\"color: green;\">({$timeremaining} {$lang->ban_remaining})</span>";
}





				$banned_class = "moderate_banned";
}
else if($remaining < 604800)
{
$banned_class = "low_banned";
}

			else
{

			else
{

				$timeremaining = "({$timeremaining} {$lang->ban_remaining})";

				$banned_class = "normal_banned";

			}

			}

 

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

		}

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

		}

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

Zeile 4175Zeile 4303
	// 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 4293Zeile 4420
	$mybb->input['uid'] = $mybb->get_input('uid', MyBB::INPUT_INT);
if($mybb->input['uid'])
{

	$mybb->input['uid'] = $mybb->get_input('uid', MyBB::INPUT_INT);
if($mybb->input['uid'])
{

		add_breadcrumb($lang->mcp_nav_ban_user);

		add_breadcrumb($lang->mcp_nav_editing_ban);

	}
else
{

	}
else
{

		add_breadcrumb($lang->mcp_nav_editing_ban);

		add_breadcrumb($lang->mcp_nav_ban_user);

	}

$plugins->run_hooks("modcp_banuser_start");

	}

$plugins->run_hooks("modcp_banuser_start");

Zeile 4317Zeile 4444
		$banned = $db->fetch_array($query);
if($banned['username'])
{

		$banned = $db->fetch_array($query);
if($banned['username'])
{

			$username = htmlspecialchars_uni($banned['username']);

			$username = $banned['username'] = htmlspecialchars_uni($banned['username']);

			$banreason = htmlspecialchars_uni($banned['reason']);
$uid = $mybb->input['uid'];
$user = get_user($banned['uid']);

			$banreason = htmlspecialchars_uni($banned['reason']);
$uid = $mybb->input['uid'];
$user = get_user($banned['uid']);

Zeile 4338Zeile 4465
		if($mybb->input['uid'])
{
$user = get_user($mybb->input['uid']);

		if($mybb->input['uid'])
{
$user = get_user($mybb->input['uid']);

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

			$username = $user['username'];
}
else

			$username = $user['username'];
}
else

Zeile 4378Zeile 4506
				$dateline = $banned['dateline'];
}


				$dateline = $banned['dateline'];
}


			$thatime = my_date("D, jS M Y @ g:ia", ban_date2timestamp($time, $dateline));

			$thatime = my_date("D, jS M Y @ {$mybb->settings['timeformat']}", ban_date2timestamp($time, $dateline));

			$thattime = " ({$thatime})";
}


			$thattime = " ({$thatime})";
}


Zeile 4403Zeile 4531
			eval("\$bangroup_option .= \"".$templates->get("modcp_banuser_bangroups_group")."\";");
$banned_group = $group['gid'];
++$numgroups;

			eval("\$bangroup_option .= \"".$templates->get("modcp_banuser_bangroups_group")."\";");
$banned_group = $group['gid'];
++$numgroups;

		}
}

		}
}


if($numgroups == 0)
{
error($lang->no_banned_group);
}
elseif($numgroups > 1)


if($numgroups == 0)
{
error($lang->no_banned_group);
}
elseif($numgroups > 1)

	{

	{

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

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

	}

	}

	else
{
eval("\$bangroups = \"".$templates->get("modcp_banuser_bangroups_hidden")."\";");

	else
{
eval("\$bangroups = \"".$templates->get("modcp_banuser_bangroups_hidden")."\";");

	}


	}


	if(!empty($banned['uid']))
{
eval("\$lift_link = \"".$templates->get("modcp_banuser_lift")."\";");

	if(!empty($banned['uid']))
{
eval("\$lift_link = \"".$templates->get("modcp_banuser_lift")."\";");

Zeile 4453Zeile 4581

redirect("modcp.php", $lang->redirect_modnotes);
}


redirect("modcp.php", $lang->redirect_modnotes);
}





if(!$mybb->input['action'])
{
$awaitingattachments = $awaitingposts = $awaitingthreads = $awaitingmoderation = '';

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

if(!$mybb->input['action'])
{
$awaitingattachments = $awaitingposts = $awaitingthreads = $awaitingmoderation = '';

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

	{

	{

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

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

Zeile 4493Zeile 4621
				");
$attachment = $db->fetch_array($query);
$attachment['date'] = my_date('relative', $attachment['dateuploaded']);

				");
$attachment = $db->fetch_array($query);
$attachment['date'] = my_date('relative', $attachment['dateuploaded']);

 
				$attachment['username'] = htmlspecialchars_uni($attachment['username']);

				$attachment['profilelink'] = build_profile_link($attachment['username'], $attachment['uid']);
$attachment['link'] = get_post_link($attachment['pid'], $attachment['tid']);
$attachment['filename'] = htmlspecialchars_uni($attachment['filename']);

				$attachment['profilelink'] = build_profile_link($attachment['username'], $attachment['uid']);
$attachment['link'] = get_post_link($attachment['pid'], $attachment['tid']);
$attachment['filename'] = htmlspecialchars_uni($attachment['filename']);

Zeile 4530Zeile 4659
				");
$post = $db->fetch_array($query);
$post['date'] = my_date('relative', $post['dateline']);

				");
$post = $db->fetch_array($query);
$post['date'] = my_date('relative', $post['dateline']);

 
				$post['username'] = htmlspecialchars_uni($post['username']);

				$post['profilelink'] = build_profile_link($post['username'], $post['uid']);
$post['link'] = get_post_link($post['pid'], $post['tid']);
$post['subject'] = $post['fullsubject'] = $parser->parse_badwords($post['subject']);

				$post['profilelink'] = build_profile_link($post['username'], $post['uid']);
$post['link'] = get_post_link($post['pid'], $post['tid']);
$post['subject'] = $post['fullsubject'] = $parser->parse_badwords($post['subject']);

Zeile 4561Zeile 4691
				$query = $db->simple_select("threads", "tid, subject, uid, username, dateline", "visible='0' {$flist_queue_threads}", array('order_by' =>  'dateline', 'order_dir' => 'DESC', 'limit' => 1));
$thread = $db->fetch_array($query);
$thread['date'] = my_date('relative', $thread['dateline']);

				$query = $db->simple_select("threads", "tid, subject, uid, username, dateline", "visible='0' {$flist_queue_threads}", array('order_by' =>  'dateline', 'order_dir' => 'DESC', 'limit' => 1));
$thread = $db->fetch_array($query);
$thread['date'] = my_date('relative', $thread['dateline']);

 
				$thread['username'] = htmlspecialchars_uni($thread['username']);

				$thread['profilelink'] = build_profile_link($thread['username'], $thread['uid']);
$thread['link'] = get_thread_link($thread['tid']);
$thread['subject'] = $thread['fullsubject'] = $parser->parse_badwords($thread['subject']);

				$thread['profilelink'] = build_profile_link($thread['username'], $thread['uid']);
$thread['link'] = get_thread_link($thread['tid']);
$thread['subject'] = $thread['fullsubject'] = $parser->parse_badwords($thread['subject']);

Zeile 4616Zeile 4747
			$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']);
$logitem['ipaddress'] = my_inet_ntop($db->unescape_binary($logitem['ipaddress']));

if($logitem['tsubject'])
{

			$username = format_name($logitem['username'], $logitem['usergroup'], $logitem['displaygroup']);
$logitem['profilelink'] = build_profile_link($username, $logitem['uid']);
$logitem['ipaddress'] = my_inet_ntop($db->unescape_binary($logitem['ipaddress']));

if($logitem['tsubject'])
{

				$logitem['tsubject'] = htmlspecialchars_uni($logitem['tsubject']);

				$logitem['tsubject'] = htmlspecialchars_uni($parser->parse_badwords($logitem['tsubject']));

				$logitem['thread'] = get_thread_link($logitem['tid']);
eval("\$information .= \"".$templates->get("modcp_modlogs_result_thread")."\";");
}

				$logitem['thread'] = get_thread_link($logitem['tid']);
eval("\$information .= \"".$templates->get("modcp_modlogs_result_thread")."\";");
}

Zeile 4633Zeile 4765
			}
if($logitem['psubject'])
{

			}
if($logitem['psubject'])
{

				$logitem['psubject'] = htmlspecialchars_uni($logitem['psubject']);

				$logitem['psubject'] = htmlspecialchars_uni($parser->parse_badwords($logitem['psubject']));

				$logitem['post'] = get_post_link($logitem['pid']);
eval("\$information .= \"".$templates->get("modcp_modlogs_result_post")."\";");
}

				$logitem['post'] = get_post_link($logitem['pid']);
eval("\$information .= \"".$templates->get("modcp_modlogs_result_post")."\";");
}

Zeile 4648Zeile 4780
				}
if($data['aid'])
{

				}
if($data['aid'])
{

					$data['subject'] = htmlspecialchars_uni($data['subject']);

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

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

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

 

$plugins->run_hooks("modcp_modlogs_result");


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


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

Zeile 4688Zeile 4822
	$bannedusers = '';
foreach($banned_cache as $banned)
{

	$bannedusers = '';
foreach($banned_cache as $banned)
{

 
		$banned['username'] = htmlspecialchars_uni($banned['username']);

		$profile_link = build_profile_link($banned['username'], $banned['uid']);

// Only show the edit & lift links if current user created ban, or is super mod/admin

		$profile_link = build_profile_link($banned['username'], $banned['uid']);

// Only show the edit & lift links if current user created ban, or is super mod/admin

Zeile 4697Zeile 4832
			eval("\$edit_link = \"".$templates->get("modcp_banning_edit")."\";");
}


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


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

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


$trow = alt_trow();



$trow = alt_trow();


Zeile 4721Zeile 4856
			$remaining = $banned['remaining'];

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

			$remaining = $banned['remaining'];

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

 

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


if($remaining <= 0)


if($remaining <= 0)

			{
$timeremaining = "<span style=\"color: red;\">({$lang->ban_ending_imminently})</span>";


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

			}
else if($remaining < 3600)
{

			}
else if($remaining < 3600)
{

				$timeremaining = "<span style=\"color: red;\">({$timeremaining} {$lang->ban_remaining})</span>";
}
else if($remaining < 86400)
{
$timeremaining = "<span style=\"color: maroon;\">({$timeremaining} {$lang->ban_remaining})</span>";

				$banned_class = "high_banned";
}
else if($remaining < 86400)
{
$banned_class = "moderate_banned";

			}
else if($remaining < 604800)

			}
else if($remaining < 604800)

			{
$timeremaining = "<span style=\"color: green;\">({$timeremaining} {$lang->ban_remaining})</span>";
}

			{
$banned_class = "low_banned";
}

			else
{

			else
{

				$timeremaining = "({$timeremaining} {$lang->ban_remaining})";

				$banned_class = "normal_banned";

			}

			}

 

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

		}

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

		}

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