Vergleich modcp.php - 1.8.5 - 1.8.8

  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_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 383Zeile 384
	// Reports
$reports = '';
$query = $db->query("

	// 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 509Zeile 511
			{
case 'post':
$post = get_post_link($report['id'])."#pid{$report['id']}";

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

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

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

$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);
break;
case 'reputation':
$reputation_link = "reputation.php?uid={$usercache[$report['id3']]['uid']}#rid{$report['id']}";

					$report_data['content'] = $lang->sprintf($lang->report_info_profile, $user);
break;
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 reason and comment

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

			if($report['reasonid'] > 0)




			{

			{

				$report_data['comment'] = $lang->$report_string;











				$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 if(!empty($report['reason']))

			else

			{

			{

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

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

			}

$report_reports = 1;

			}

$report_reports = 1;

Zeile 554Zeile 563
			{
if(is_array($usercache[$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)
{

Zeile 635Zeile 644
		}
}
$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;
}

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

	}
$upper = $start+$perpage;


	}
$upper = $start+$perpage;


Zeile 669Zeile 678
	$plugins->run_hooks("modcp_allreports_start");

$query = $db->query("

	$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 686
		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 706
			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 751
				$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 759
			$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 773Zeile 791

// Searching for entries by a particular user
if($mybb->get_input('uid', MyBB::INPUT_INT))


// 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 .= " 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))
{
$where .= " AND t.fid='".$mybb->get_input('fid', MyBB::INPUT_INT)."'";

	// Searching for entries in a specific forum
if($mybb->get_input('fid', MyBB::INPUT_INT))
{
$where .= " AND t.fid='".$mybb->get_input('fid', MyBB::INPUT_INT)."'";

	}

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

	}

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


// Order?
switch($mybb->input['sortby'])


// Order?
switch($mybb->input['sortby'])

Zeile 799Zeile 817
			break;
default:
$sortby = "l.dateline";

			break;
default:
$sortby = "l.dateline";

	}

	}

	$order = $mybb->get_input('order');
if($order != "asc")
{
$order = "desc";
}

	$order = $mybb->get_input('order');
if($order != "asc")
{
$order = "desc";
}





	$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 839
	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;
$pages = ceil($pages);

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

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

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

	}


	}


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

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

	{

	{

		$page = 1;
}

if($page)

		$page = 1;
}

if($page)

	{

	{

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

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

	}

	}

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

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

	}

	}


$page_url = 'modcp.php?action=modlogs&amp;perpage='.$perpage;
foreach(array('uid', 'fid') as $field)


$page_url = 'modcp.php?action=modlogs&amp;perpage='.$perpage;
foreach(array('uid', 'fid') as $field)

Zeile 889Zeile 907
		$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 906Zeile 925
		}
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 917Zeile 936
			$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")."\";");
}

Zeile 971Zeile 991

eval("\$modlogs = \"".$templates->get("modcp_modlogs")."\";");
output_page($modlogs);


eval("\$modlogs = \"".$templates->get("modcp_modlogs")."\";");
output_page($modlogs);

}


}


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

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

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

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

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

if(!$announcement)
{
error($lang->error_invalid_announcement);
}
if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'], "canmanageannouncements")) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
{
error_no_permission();
}


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

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

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

if(!$announcement)
{
error($lang->error_invalid_announcement);
}
if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'], "canmanageannouncements")) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
{
error_no_permission();
}


	$plugins->run_hooks("modcp_do_delete_announcement");

	$plugins->run_hooks("modcp_do_delete_announcement");





	$db->delete_query("announcements", "aid='{$aid}'");
log_moderator_action(array("aid" => $announcement['aid'], "subject" => $announcement['subject']), $lang->announcement_deleted);
$cache->update_forumsdisplay();

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

	$db->delete_query("announcements", "aid='{$aid}'");
log_moderator_action(array("aid" => $announcement['aid'], "subject" => $announcement['subject']), $lang->announcement_deleted);
$cache->update_forumsdisplay();

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

}


}


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

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

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


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


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

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





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

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

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

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


if(!$announcement)


if(!$announcement)

	{

	{

		error($lang->error_invalid_announcement);
}

		error($lang->error_invalid_announcement);
}


if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'], "canmanageannouncements")) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
{
error_no_permission();
}


if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'], "canmanageannouncements")) || ($unviewableforums && in_array($announcement['fid'], $unviewableforums)))
{
error_no_permission();
}


$plugins->run_hooks("modcp_delete_announcement");


$plugins->run_hooks("modcp_delete_announcement");





	eval("\$announcements = \"".$templates->get("modcp_announcements_delete")."\";");
output_page($announcements);
}

	eval("\$announcements = \"".$templates->get("modcp_announcements_delete")."\";");
output_page($announcements);
}





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

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

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

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

$announcement_fid = $mybb->get_input('fid', MyBB::INPUT_INT);
if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid, "canmanageannouncements")) || ($unviewableforums && in_array($announcement_fid, $unviewableforums)))
{
error_no_permission();
}

$errors = array();

$mybb->input['title'] = $mybb->get_input('title');
if(!trim($mybb->input['title']))
{
$errors[] = $lang->error_missing_title;
}

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


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

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

$announcement_fid = $mybb->get_input('fid', MyBB::INPUT_INT);
if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid, "canmanageannouncements")) || ($unviewableforums && in_array($announcement_fid, $unviewableforums)))
{
error_no_permission();
}

$errors = array();

$mybb->input['title'] = $mybb->get_input('title');
if(!trim($mybb->input['title']))
{
$errors[] = $lang->error_missing_title;
}

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


	if(!$announcement_fid)
{
$errors[] = $lang->error_missing_forum;

	if(!$announcement_fid)
{
$errors[] = $lang->error_missing_forum;

Zeile 1099Zeile 1119
		$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 = $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 1139
		{
$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($enddate <= $startdate)

		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($enddate <= $startdate)

		{
$errors[] = $lang->error_end_before_start;
}
}

		{
$errors[] = $lang->error_end_before_start;
}
}


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


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

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

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

		{

		{

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

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

Zeile 1189Zeile 1211
	else
{
$mybb->input['action'] = 'new_announcement';

	else
{
$mybb->input['action'] = 'new_announcement';

	}
}


	}
}


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

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

	{
error_no_permission();
}


	{
error_no_permission();
}


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


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


Zeile 1239Zeile 1261
	}
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 + $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", TIME_NOW + $localized_time);
$startmonth = $endmonth = gmdate("m", $localized_time);
$startdateyear = gmdate("Y", $localized_time);


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


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

Zeile 1260Zeile 1283
	// Generate form elements
$startdateday = $enddateday = '';
for($day = 1; $day <= 31; ++$day)

	// Generate form elements
$startdateday = $enddateday = '';
for($day = 1; $day <= 31; ++$day)

	{

	{

		if($startday == $day)

		if($startday == $day)

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

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

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

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

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

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

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

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

		else
{
$selected = '';

		else
{
$selected = '';

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

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





	$startdatemonth = $enddatemonth = '';

	$startdatemonth = $enddatemonth = '';





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

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

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

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





	$html_sel = $mycode_sel = $smilies_sel = array('yes' => '', 'no' => '');
if($announcement['allowhtml'])
{

	$html_sel = $mycode_sel = $smilies_sel = array('yes' => '', 'no' => '');
if($announcement['allowhtml'])
{

Zeile 1316Zeile 1339
		$mycode_sel['yes'] = ' checked="checked"';
}
else

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

	{

	{

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

if($announcement['allowsmilies'])
{
$smilies_sel['yes'] = ' checked="checked"';

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

if($announcement['allowsmilies'])
{
$smilies_sel['yes'] = ' checked="checked"';

	}

	}

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

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

Zeile 1450Zeile 1473
		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 1460Zeile 1483
		{
$enddate[0] = "00";
}

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

Zeile 1469Zeile 1492
		$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 = TIME_NOW + $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 1487Zeile 1512
		{
$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 1574Zeile 1599
	add_breadcrumb($lang->edit_announcement, "modcp.php?action=edit_announcements&amp;aid={$aid}");

// Get announcement

	add_breadcrumb($lang->edit_announcement, "modcp.php?action=edit_announcements&amp;aid={$aid}");

// Get announcement

	if(!isset($announcement))

	if(!isset($announcement) || $mybb->request_method != 'post')

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

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

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

if(!$announcement)

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

if(!$announcement)

	{
error($lang->error_invalid_announcement);
}

	{
error($lang->error_invalid_announcement);
}

Zeile 1607Zeile 1632

// No end date? Make it a year from now.
$announcement['enddate'] = $makeshift_time + (60 * 60 * 24 * 366);


// No end date? Make it a year from now.
$announcement['enddate'] = $makeshift_time + (60 * 60 * 24 * 366);

	}

	}


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


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

Zeile 1615Zeile 1640
		if(!empty($errors))
{
$errors = inline_error($errors);

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

		}

		}

		else
{
$errors = '';

		else
{
$errors = '';

Zeile 1638Zeile 1663
		$endtime_time = htmlspecialchars_uni($mybb->input['endtime_time']);

$errored = true;

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

$errored = true;

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

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

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

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




	}
else
{
$localized_time_startdate = $announcement['startdate'] + $mybb->user['timezone']*3600 + $mybb->user['dst']*3600;
$localized_time_enddate = $announcement['enddate'] + $mybb->user['timezone']*3600 + $mybb->user['dst']*3600;

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

$startday = gmdate('j', $localized_time_startdate);
$endday = gmdate('j', $localized_time_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 1666Zeile 1693
			$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)
{


if($endday == $day)
{

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

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

	}
else
{

	}
else
{

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

if($announcement['allowsmilies'])
{
$smilies_sel['yes'] = ' checked="checked"';

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

if($announcement['allowsmilies'])
{
$smilies_sel['yes'] = ' checked="checked"';

	}
else

	}
else

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

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

Zeile 1756Zeile 1783
			'allowsmilies' => $mybb->get_input('allowsmilies', MyBB::INPUT_INT),
'dateline' => TIME_NOW,
'userusername' => $mybb->user['username'],

			'allowsmilies' => $mybb->get_input('allowsmilies', MyBB::INPUT_INT),
'dateline' => TIME_NOW,
'userusername' => $mybb->user['username'],

		);

		);


$array = $mybb->user;
foreach($array as $key => $element)


$array = $mybb->user;
foreach($array as $key => $element)

Zeile 1779Zeile 1806
		foreach($data_key as $field => $key)
{
$announcementarray[$key] = $groupscache[$announcementarray['usergroup']][$field];

		foreach($data_key as $field => $key)
{
$announcementarray[$key] = $groupscache[$announcementarray['usergroup']][$field];

		}


		}


		require_once MYBB_ROOT."inc/functions_post.php";
$postbit = build_postbit($announcementarray, 3);
eval("\$preview = \"".$templates->get("previewpost")."\";");

		require_once MYBB_ROOT."inc/functions_post.php";
$postbit = build_postbit($announcementarray, 3);
eval("\$preview = \"".$templates->get("previewpost")."\";");

Zeile 1788Zeile 1815
	else
{
$preview = '';

	else
{
$preview = '';

	}

	}


$plugins->run_hooks("modcp_edit_announcement");



$plugins->run_hooks("modcp_edit_announcement");


Zeile 1804Zeile 1831
	}

if($numannouncements == 0 && $mybb->usergroup['issupermod'] != 1)

	}

if($numannouncements == 0 && $mybb->usergroup['issupermod'] != 1)

	{

	{

		error($lang->you_cannot_manage_announcements);
}


		error($lang->you_cannot_manage_announcements);
}


Zeile 1841Zeile 1868
					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")."\";");

			}

			}

		}
else
{

		}
else
{

Zeile 1867Zeile 1894
	eval("\$announcements = \"".$templates->get("modcp_announcements")."\";");
output_page($announcements);
}

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





if($mybb->input['action'] == "do_modqueue")
{
require_once MYBB_ROOT."inc/class_moderation.php";

if($mybb->input['action'] == "do_modqueue")
{
require_once MYBB_ROOT."inc/class_moderation.php";

Zeile 1906Zeile 1933
			else if($action == "delete")
{
$threads_to_delete[] = $thread['tid'];

			else if($action == "delete")
{
$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)

		{
if($mybb->settings['soft_delete'] == 1)

			{
$moderation->soft_delete_threads($threads_to_delete);
log_moderator_action(array('tids' => $threads_to_delete), $lang->multi_soft_delete_threads);

			{
$moderation->soft_delete_threads($threads_to_delete);
log_moderator_action(array('tids' => $threads_to_delete), $lang->multi_soft_delete_threads);

Zeile 1971Zeile 1998
			{
$moderation->soft_delete_posts($posts_to_delete);
log_moderator_action(array('pids' => $posts_to_delete), $lang->multi_soft_delete_posts);

			{
$moderation->soft_delete_posts($posts_to_delete);
log_moderator_action(array('pids' => $posts_to_delete), $lang->multi_soft_delete_posts);

			}

			}

			else
{
log_moderator_action(array('pids' => $posts_to_delete), $lang->multi_delete_posts);

			else
{
log_moderator_action(array('pids' => $posts_to_delete), $lang->multi_delete_posts);

			}
}

$plugins->run_hooks("modcp_do_modqueue_end");


			}
}

$plugins->run_hooks("modcp_do_modqueue_end");


		redirect("modcp.php?action=modqueue&type=posts", $lang->redirect_postsmoderated);
}
else if(!empty($mybb->input['attachments']))

		redirect("modcp.php?action=modqueue&type=posts", $lang->redirect_postsmoderated);
}
else if(!empty($mybb->input['attachments']))

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

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

			{

			{

				continue;
}
$action = $mybb->input['attachments'][$attachment['aid']];

				continue;
}
$action = $mybb->input['attachments'][$attachment['aid']];

Zeile 2034Zeile 2061
	if($mybb->input['type'] == "threads" || !$mybb->input['type'] && ($nummodqueuethreads > 0 || $mybb->usergroup['issupermod'] == 1))
{
if($nummodqueuethreads == 0 && $mybb->usergroup['issupermod'] != 1)

	if($mybb->input['type'] == "threads" || !$mybb->input['type'] && ($nummodqueuethreads > 0 || $mybb->usergroup['issupermod'] == 1))
{
if($nummodqueuethreads == 0 && $mybb->usergroup['issupermod'] != 1)

		{

		{

			error($lang->you_cannot_moderate_threads);
}

			error($lang->you_cannot_moderate_threads);
}





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

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

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

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





		// Figure out if we need to display multiple pages.
if($mybb->get_input('page') != "last")
{

		// Figure out if we need to display multiple pages.
if($mybb->get_input('page') != "last")
{

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

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

		}

		}

		else
{
$start = 0;

		else
{
$start = 0;

Zeile 2074Zeile 2101
		}

$multipage = multipage($unapproved_threads, $perpage, $page, "modcp.php?action=modqueue&type=threads");

		}

$multipage = multipage($unapproved_threads, $perpage, $page, "modcp.php?action=modqueue&type=threads");





		$query = $db->query("
SELECT t.tid, t.dateline, t.fid, t.subject, t.username AS threadusername, p.message AS postmessage, u.username AS username, t.uid
FROM ".TABLE_PREFIX."threads t

		$query = $db->query("
SELECT t.tid, t.dateline, t.fid, t.subject, t.username AS threadusername, p.message AS postmessage, u.username AS username, t.uid
FROM ".TABLE_PREFIX."threads t

Zeile 2097Zeile 2124
			if($thread['username'] == "")
{
if($thread['threadusername'] != "")

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

				{


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

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

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

Zeile 2107Zeile 2135
			}
else
{

			}
else
{

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

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

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

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

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

$plugins->run_hooks("modcp_modqueue_threads_end");

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

$plugins->run_hooks("modcp_modqueue_threads_end");

Zeile 2137Zeile 2166
				$navsep = " | ";
eval("\$attachment_link = \"".$templates->get("modcp_modqueue_attachment_link")."\";");
}

				$navsep = " | ";
eval("\$attachment_link = \"".$templates->get("modcp_modqueue_attachment_link")."\";");
}





			eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";");
eval("\$threadqueue = \"".$templates->get("modcp_modqueue_threads")."\";");
output_page($threadqueue);

			eval("\$mass_controls = \"".$templates->get("modcp_modqueue_masscontrols")."\";");
eval("\$threadqueue = \"".$templates->get("modcp_modqueue_threads")."\";");
output_page($threadqueue);

Zeile 2161Zeile 2190
			WHERE p.visible='0' {$tflist_queue_posts} AND t.firstpost != p.pid
");
$unapproved_posts = $db->fetch_field($query, "unapprovedposts");

			WHERE p.visible='0' {$tflist_queue_posts} AND t.firstpost != p.pid
");
$unapproved_posts = $db->fetch_field($query, "unapprovedposts");





		// Figure out if we need to display multiple pages.
if($mybb->get_input('page') != "last")
{

		// Figure out if we need to display multiple pages.
if($mybb->get_input('page') != "last")
{

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

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

		}


		}


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

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

		{

		{

			$page = 1;
}

if($page)

			$page = 1;
}

if($page)

		{

		{

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

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

Zeile 2208Zeile 2237
		{
$altbg = alt_trow();
$post['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($post['threadsubject']));

		{
$altbg = alt_trow();
$post['threadsubject'] = htmlspecialchars_uni($parser->parse_badwords($post['threadsubject']));

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

			$post['threadlink'] = get_thread_link($post['tid']);
$post['postlink'] = get_post_link($post['pid'], $post['tid']);
$forum_link = get_forum_link($post['fid']);

			$post['threadlink'] = get_thread_link($post['tid']);
$post['postlink'] = get_post_link($post['pid'], $post['tid']);
$forum_link = get_forum_link($post['fid']);

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

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

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

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

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

				{
$profile_link = $lang->guest;
}
}

				{
$profile_link = $lang->guest;
}
}

			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 2239Zeile 2271
		if(!$posts && $mybb->input['type'] == "posts")
{
eval("\$posts = \"".$templates->get("modcp_modqueue_posts_empty")."\";");

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

		}


		}


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

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





			$plugins->run_hooks("modcp_modqueue_posts_end");

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

			$plugins->run_hooks("modcp_modqueue_posts_end");

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

			{

			{

				$navsep = " | ";
eval("\$thread_link = \"".$templates->get("modcp_modqueue_thread_link")."\";");
}

				$navsep = " | ";
eval("\$thread_link = \"".$templates->get("modcp_modqueue_thread_link")."\";");
}

Zeile 2264Zeile 2296
			output_page($postqueue);
}
}

			output_page($postqueue);
}
}





	if($mybb->input['type'] == "attachments" || (!$mybb->input['type'] && !$postqueue && !$threadqueue && $mybb->settings['enableattachments'] == 1 && ($nummodqueueattach > 0 || $mybb->usergroup['issupermod'] == 1)))
{
if($mybb->settings['enableattachments'] == 0)

	if($mybb->input['type'] == "attachments" || (!$mybb->input['type'] && !$postqueue && !$threadqueue && $mybb->settings['enableattachments'] == 1 && ($nummodqueueattach > 0 || $mybb->usergroup['issupermod'] == 1)))
{
if($mybb->settings['enableattachments'] == 0)

Zeile 2288Zeile 2320

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


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

		{

		{

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


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


Zeile 2302Zeile 2334
		}

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

		}

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

		{
$page = 1;
}

		{
$page = 1;
}


if($page)
{


if($page)
{

Zeile 2340Zeile 2372

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

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

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

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

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

		{

		{

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


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


Zeile 2607Zeile 2640
						if($suspend_length == "-1")
{
$extra_user_updates[$option['update_length']] = 0;

						if($suspend_length == "-1")
{
$extra_user_updates[$option['update_length']] = 0;

						}

						}

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

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

Zeile 2668Zeile 2701
		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 3014Zeile 3047
		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']);


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

	$codebuttons = build_mycode_inserter("signature");

// Do we mark the suspend signature box?

	$codebuttons = build_mycode_inserter("signature");

// Do we mark the suspend signature box?

Zeile 3277Zeile 3312
	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 3290Zeile 3326
				// We have had at least some active time, hide it instead
$lastdate = $lang->lastvisit_hidden;
}

				// We have had at least some active time, hide it instead
$lastdate = $lang->lastvisit_hidden;
}

		}

		}

		else
{
$lastdate = my_date('relative', $user['lastvisit']);
}

		else
{
$lastdate = my_date('relative', $user['lastvisit']);
}





		$usergroup = htmlspecialchars_uni($usergroups_cache[$user['usergroup']]['title']);
eval("\$users .= \"".$templates->get("modcp_finduser_user")."\";");
}

		$usergroup = htmlspecialchars_uni($usergroups_cache[$user['usergroup']]['title']);
eval("\$users .= \"".$templates->get("modcp_finduser_user")."\";");
}

Zeile 3313Zeile 3349
}

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

}

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

{

{

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

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

	}


	}


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

// Filter options

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

// Filter options

Zeile 3331Zeile 3367

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


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

	}

	}

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

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

	}
if(!empty($mybb->input['filter']['uid']))

	}
if(!empty($mybb->input['filter']['uid']))

	{
$search['uid'] = (int)$mybb->input['filter']['uid'];
$where_sql .= " AND w.uid='{$search['uid']}'";

	{
$search['uid'] = (int)$mybb->input['filter']['uid'];
$where_sql .= " AND w.uid='{$search['uid']}'";

Zeile 3349Zeile 3385
	else
{
$mybb->input['filter']['uid'] = '';

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

	}

	}

	if(!empty($mybb->input['filter']['mod_username']))
{
$mod_user = get_user_by_username($mybb->input['filter']['mod_username']);

	if(!empty($mybb->input['filter']['mod_username']))
{
$mod_user = get_user_by_username($mybb->input['filter']['mod_username']);

Zeile 3483Zeile 3519
	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']);
$issued_date = my_date($mybb->settings['dateformat'], $row['dateline']).' '.my_date($mybb->settings['timeformat'], $row['dateline']);

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

Zeile 3530Zeile 3568
if($mybb->input['action'] == "ipsearch")
{
if($mybb->usergroup['canuseipsearch'] == 0)

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

	{

	{

		error_no_permission();
}

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

		error_no_permission();
}

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





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

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

Zeile 3556Zeile 3594
			if($ip_range)
{
if(!is_array($ip_range))

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

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






































































				{
$post_ip_sql = "p.ipaddress=".$db->escape_binary($ip_range);
}
else
{
$post_ip_sql = "p.ipaddress BETWEEN ".$db->escape_binary($ip_range[0])." AND ".$db->escape_binary($ip_range[1]);
}
}

$plugins->run_hooks("modcp_ipsearch_posts_start");

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

$unviewable_forums = get_unviewable_forums(true);

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

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

// Check group permissions if we can't view threads not started by us
$onlyusfids = array();
$group_permissions = forum_permissions();
foreach($group_permissions as $fid => $forumpermissions)
{
if(isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] == 1)
{
$onlyusfids[] = $fid;
}
}

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

// Moderators can view unapproved/deleted posts
if($mybb->usergroup['issupermod'] != 1)
{
$unapprove_forums = array();
$deleted_forums = array();
$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['canviewdeleted'] == 1)
{
$deleted_forums[] = $moderator['fid'];
}
}

if(!empty($unapprove_forums))
{
$visible_sql .= " OR (p.visible = 0 AND p.fid IN(".implode(',', $unapprove_forums).")) OR (t.visible = 0 AND t.fid IN(".implode(',', $unapprove_forums)."))";
}
if(!empty($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
{

					$post_ip_sql = "ipaddress BETWEEN ".$db->escape_binary($ip_range[0])." AND ".$db->escape_binary($ip_range[1]);


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

				}

				}

			}

 




			$plugins->run_hooks("modcp_ipsearch_posts_start");

if($post_ip_sql)
{
$query = $db->simple_select('posts', 'COUNT(pid) AS count', "$post_ip_sql AND visible >= -1");


				$query = $db->query("
SELECT COUNT(p.pid) AS count
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid = p.tid)
WHERE {$post_ip_sql}{$where_sql}{$visible_sql}
");

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

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

Zeile 3658Zeile 3766
		{
$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;

				$profile_link = build_profile_link($ipaddress['username'], $ipaddress['uid']);
$trow = alt_trow();
$ip = false;

Zeile 3711Zeile 3820
		if(isset($mybb->input['search_posts']) && $post_results && (!isset($mybb->input['search_users']) || (isset($mybb->input['search_users']) && $post_limit > 0)))
{
$ipaddresses = $tids = $uids = array();

		if(isset($mybb->input['search_posts']) && $post_results && (!isset($mybb->input['search_users']) || (isset($mybb->input['search_users']) && $post_limit > 0)))
{
$ipaddresses = $tids = $uids = array();

			
$query = $db->simple_select('posts', 'username AS postusername, uid, subject, pid, tid, ipaddress', "$post_ip_sql AND visible >= -1",
array('order_by' => 'dateline', 'order_dir' => 'DESC', 'limit_start' => $post_start, 'limit' => $post_limit));

 




 
			$query = $db->query("
SELECT p.username AS postusername, p.uid, p.subject, p.pid, p.tid, p.ipaddress
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid = p.tid)
WHERE {$post_ip_sql}{$where_sql}{$visible_sql}
ORDER BY p.dateline desc
LIMIT {$post_start}, {$post_limit}
");

			while($ipaddress = $db->fetch_array($query))
{
$tids[$ipaddress['tid']] = $ipaddress['pid'];

			while($ipaddress = $db->fetch_array($query))
{
$tids[$ipaddress['tid']] = $ipaddress['pid'];

Zeile 3735Zeile 3849
				while($user = $db->fetch_array($query))
{
$ipaddresses[$uids[$user['uid']]]['username'] = $user['username'];

				while($user = $db->fetch_array($query))
{
$ipaddresses[$uids[$user['uid']]]['username'] = $user['username'];

				}

				}

				unset($uids);

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

				unset($uids);

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 3749Zeile 3867
					}

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

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





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

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

		}

		}


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


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

		}

		}


if($ipaddressvalue)
{


if($ipaddressvalue)
{

Zeile 3774Zeile 3892

$ipaddress = $ipaddress_url = $misc_info_link = '';
if(!strstr($mybb->input['ipaddress'], "*") && !strstr($mybb->input['ipaddress'], "/"))


$ipaddress = $ipaddress_url = $misc_info_link = '';
if(!strstr($mybb->input['ipaddress'], "*") && !strstr($mybb->input['ipaddress'], "/"))

		{

		{

			$ipaddress = htmlspecialchars_uni($mybb->input['ipaddress']);
$ipaddress_url = urlencode($mybb->input['ipaddress']);
eval("\$misc_info_link = \"".$templates->get("modcp_ipsearch_results_information")."\";");
}

eval("\$ipsearch_results = \"".$templates->get("modcp_ipsearch_results")."\";");

			$ipaddress = htmlspecialchars_uni($mybb->input['ipaddress']);
$ipaddress_url = urlencode($mybb->input['ipaddress']);
eval("\$misc_info_link = \"".$templates->get("modcp_ipsearch_results_information")."\";");
}

eval("\$ipsearch_results = \"".$templates->get("modcp_ipsearch_results")."\";");

	}


	}


	// Fetch filter options
if(!$mybb->input['ipaddress'])
{

	// Fetch filter options
if(!$mybb->input['ipaddress'])
{

Zeile 3795Zeile 3913
		$postsearchselect = "checked=\"checked\"";
}
if(isset($mybb->input['search_users']))

		$postsearchselect = "checked=\"checked\"";
}
if(isset($mybb->input['search_users']))

	{

	{

		$usersearchselect = "checked=\"checked\"";

		$usersearchselect = "checked=\"checked\"";

	}

$plugins->run_hooks("modcp_ipsearch_end");

	}

$plugins->run_hooks("modcp_ipsearch_end");


eval("\$ipsearch = \"".$templates->get("modcp_ipsearch")."\";");
output_page($ipsearch);


eval("\$ipsearch = \"".$templates->get("modcp_ipsearch")."\";");
output_page($ipsearch);

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

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

	{
error_no_permission();
}


	{
error_no_permission();
}


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

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

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

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

		{

		{

			$ip_record = @geoip_record_by_name($mybb->input['ipaddress']);
if($ip_record)
{

			$ip_record = @geoip_record_by_name($mybb->input['ipaddress']);
if($ip_record)
{

Zeile 3848Zeile 3966
	echo($iplookup);
exit;
}

	echo($iplookup);
exit;
}





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

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

	{

	{

		error_no_permission();
}


		error_no_permission();
}


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

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

	}

	}


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


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

	}


	}


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


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


Zeile 3878Zeile 3996
	$pages = ceil($pages);

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

	$pages = ceil($pages);

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

	{

	{

		$page = $pages;

		$page = $pages;

	}

	}


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
{
$start = 0;

	else
{
$start = 0;

Zeile 3899Zeile 4017
	$upper = $start+$perpage;

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

	$upper = $start+$perpage;

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





	$plugins->run_hooks("modcp_banning_start");

$query = $db->query("

	$plugins->run_hooks("modcp_banning_start");

$query = $db->query("

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

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

		}

		}





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

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


$trow = alt_trow();



$trow = alt_trow();


Zeile 3932Zeile 4051
		{
$banned['reason'] = htmlspecialchars_uni($parser->parse_badwords($banned['reason']));
}

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

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

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

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

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

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

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

Zeile 3949Zeile 4068

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






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

			}
else if($remaining < 86400)
{

			}
else if($remaining < 86400)
{

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

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

Zeile 4216Zeile 4345
	$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 4240Zeile 4369
		$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 4261Zeile 4390
		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 4301Zeile 4431
				$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 4326Zeile 4456
			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 4376Zeile 4506

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 4416Zeile 4546
				");
$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 4453Zeile 4584
				");
$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 4484Zeile 4616
				$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 4539Zeile 4672
			$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 4556Zeile 4690
			}
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 4571Zeile 4705
				}
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")."\";");
}

Zeile 4611Zeile 4745
	$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 4620Zeile 4755
			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 4644Zeile 4779
			$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")."\";");