Vergleich modcp.php - 1.8.0 - 1.8.2

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 1132Zeile 1132
		{
$errors[] = $lang->error_invalid_end_date;
}

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

		



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

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

		}
}


		}
}


	if($mybb->get_input('allowhtml', 1) == 1)
{
$allowhtml = 1;

	if($mybb->get_input('allowhtml', 1) == 1)
{
$allowhtml = 1;

	}
else

	}
else

	{
$allowhtml = 0;
}

	{
$allowhtml = 0;
}

Zeile 1154Zeile 1154
	else
{
$allowmycode = 0;

	else
{
$allowmycode = 0;

	}

	}

	if($mybb->get_input('allowsmilies', 1) == 1)
{
$allowsmilies = 1;
}
else

	if($mybb->get_input('allowsmilies', 1) == 1)
{
$allowsmilies = 1;
}
else

	{

	{

		$allowsmilies = 0;
}


		$allowsmilies = 0;
}


Zeile 1177Zeile 1177
		{
$insert_announcement = array(
'fid' => $announcement_fid,

		{
$insert_announcement = array(
'fid' => $announcement_fid,

				'uid' => $mybb->user['uid'],
'subject' => $db->escape_string($mybb->input['title']),
'message' => $db->escape_string($mybb->input['message']),
'startdate' => $startdate,
'enddate' => $enddate,
'allowhtml' => $allowhtml,
'allowmycode' => $allowmycode,
'allowsmilies' => $allowsmilies
);

				'uid' => $mybb->user['uid'],
'subject' => $db->escape_string($mybb->input['title']),
'message' => $db->escape_string($mybb->input['message']),
'startdate' => $startdate,
'enddate' => $enddate,
'allowhtml' => $allowhtml,
'allowmycode' => $allowmycode,
'allowsmilies' => $allowsmilies
);

			$aid = $db->insert_query("announcements", $insert_announcement);

log_moderator_action(array("aid" => $aid, "subject" => $db->escape_string($mybb->input['title'])), $lang->announcement_added);

			$aid = $db->insert_query("announcements", $insert_announcement);

log_moderator_action(array("aid" => $aid, "subject" => $db->escape_string($mybb->input['title'])), $lang->announcement_added);

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

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

		}
}


		}
}


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

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

Zeile 1307Zeile 1307

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


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





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


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


Zeile 1319Zeile 1319
	else
{
$html_sel['no'] = ' checked="checked"';

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

	}


	}


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

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

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

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

	}
else

	}
else

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

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

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

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

	{

	{

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

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

	}

	}

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

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

	}

	}


// MyCode editor
$codebuttons = build_mycode_inserter();


// MyCode editor
$codebuttons = build_mycode_inserter();

Zeile 1366Zeile 1366
			'allowsmilies' => (int)$mybb->input['allowsmilies'],
'dateline' => TIME_NOW,
'userusername' => $mybb->user['username'],

			'allowsmilies' => (int)$mybb->input['allowsmilies'],
'dateline' => TIME_NOW,
'userusername' => $mybb->user['username'],

		);


		);


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

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

		}


		}


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

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

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

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

	}

	}

	else
{
$preview = '';
}

	else
{
$preview = '';
}





	$plugins->run_hooks("modcp_new_announcement");

	$plugins->run_hooks("modcp_new_announcement");





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

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

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

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

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

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

	{
error_no_permission();
}


	{
error_no_permission();
}


	// Get the announcement
$aid = $mybb->get_input('aid', 1);
$query = $db->simple_select("announcements", "*", "aid='{$aid}'");

	// Get the announcement
$aid = $mybb->get_input('aid', 1);
$query = $db->simple_select("announcements", "*", "aid='{$aid}'");

Zeile 1455Zeile 1455
	$enddate = @explode(":", $enddate[0]);

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

	$enddate = @explode(":", $enddate[0]);

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

	{

	{

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

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

		}
}

		}
}


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


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

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

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

	{

	{

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

$startdate = gmmktime((int)$startdate[0], (int)$startdate[1], 0, (int)$mybb->input['starttime_month'], $mybb->get_input('starttime_day', 1), $mybb->get_input('starttime_year', 1));
if(!checkdate((int)$mybb->input['starttime_month'], (int)$mybb->input['starttime_day'], (int)$mybb->input['starttime_year']) || $startdate < 0 || $startdate == false)

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

$startdate = gmmktime((int)$startdate[0], (int)$startdate[1], 0, (int)$mybb->input['starttime_month'], $mybb->get_input('starttime_day', 1), $mybb->get_input('starttime_year', 1));
if(!checkdate((int)$mybb->input['starttime_month'], (int)$mybb->input['starttime_day'], (int)$mybb->input['starttime_year']) || $startdate < 0 || $startdate == false)

	{

	{

		$errors[] = $lang->error_invalid_start_date;
}


		$errors[] = $lang->error_invalid_start_date;
}


Zeile 1509Zeile 1509
	}

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

	}

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

	{

	{

		$allowhtml = 1;

		$allowhtml = 1;

	}

	}

	else
{
$allowhtml = 0;

	else
{
$allowhtml = 0;

	}
if($mybb->get_input('allowmycode', 1) == 1)
{

	}
if($mybb->get_input('allowmycode', 1) == 1)
{

		$allowmycode = 1;
}
else
{
$allowmycode = 0;

		$allowmycode = 1;
}
else
{
$allowmycode = 0;

	}

	}

	if($mybb->get_input('allowsmilies', 1) == 1)

	if($mybb->get_input('allowsmilies', 1) == 1)

	{

	{

		$allowsmilies = 1;

		$allowsmilies = 1;

	}
else
{

	}
else
{

		$allowsmilies = 0;
}


		$allowsmilies = 0;
}


Zeile 1556Zeile 1556
				'allowsmilies' => $allowsmilies
);
$db->update_query("announcements", $update_announcement, "aid='{$aid}'");

				'allowsmilies' => $allowsmilies
);
$db->update_query("announcements", $update_announcement, "aid='{$aid}'");





			log_moderator_action(array("aid" => $announcement['aid'], "subject" => $db->escape_string($mybb->input['title'])), $lang->announcement_edited);

			log_moderator_action(array("aid" => $announcement['aid'], "subject" => $db->escape_string($mybb->input['title'])), $lang->announcement_edited);





			$plugins->run_hooks("modcp_do_edit_announcement_end");

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

			$plugins->run_hooks("modcp_do_edit_announcement_end");

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

		}
}
else
{

		}
}
else
{

		$mybb->input['action'] = 'edit_announcement';
}
}

		$mybb->input['action'] = 'edit_announcement';
}
}

Zeile 1621Zeile 1621

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


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

	{

	{

		if(!empty($errors))

		if(!empty($errors))

		{

		{

			$errors = inline_error($errors);
}
else

			$errors = inline_error($errors);
}
else

		{

		{

			$errors = '';
}


			$errors = '';
}


Zeile 1646Zeile 1646
		$enddateyear = htmlspecialchars_uni($mybb->input['endtime_year']);
$endday = $mybb->get_input('endtime_day', 1);
$endtime_time = htmlspecialchars_uni($mybb->input['endtime_time']);

		$enddateyear = htmlspecialchars_uni($mybb->input['endtime_year']);
$endday = $mybb->get_input('endtime_day', 1);
$endtime_time = htmlspecialchars_uni($mybb->input['endtime_time']);





		$errored = true;
}
else

		$errored = true;
}
else

Zeile 1672Zeile 1672
	for($day = 1; $day <= 31; ++$day)
{
if($startday == $day)

	for($day = 1; $day <= 31; ++$day)
{
if($startday == $day)

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

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

		else
{
$selected = '';

		else
{
$selected = '';

Zeile 1696Zeile 1696

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


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

	{

	{

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

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





	$startdatemonth = $enddatemonth = '';

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

	$startdatemonth = $enddatemonth = '';

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

Zeile 1715Zeile 1715
	if($announcement['allowhtml'])
{
$html_sel['yes'] = ' checked="checked"';

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

	}
else

	}
else

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

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

Zeile 1728Zeile 1728
	else
{
$mycode_sel['no'] = ' checked="checked"';

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

	}


	}


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

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

Zeile 1837Zeile 1837
	if($mybb->usergroup['issupermod'] == 1)
{
if($global_announcements && $mybb->usergroup['issupermod'] == 1)

	if($mybb->usergroup['issupermod'] == 1)
{
if($global_announcements && $mybb->usergroup['issupermod'] == 1)

		{

		{

			// Get the global announcements
foreach($global_announcements as $aid => $announcement)
{

			// Get the global announcements
foreach($global_announcements as $aid => $announcement)
{

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

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

	{

	{

		$posts = array_map("intval", array_keys($mybb->input['posts']));
// Fetch posts
$posts_to_approve = $posts_to_delete = array();

		$posts = array_map("intval", array_keys($mybb->input['posts']));
// Fetch posts
$posts_to_approve = $posts_to_delete = array();

Zeile 1966Zeile 1966
				$moderation->delete_post($post['pid']);
}
else if($action == "delete")

				$moderation->delete_post($post['pid']);
}
else if($action == "delete")

			{

			{

				$posts_to_delete[] = $post['pid'];
}
}

				$posts_to_delete[] = $post['pid'];
}
}

Zeile 1999Zeile 1999
			SELECT a.pid, a.aid
FROM ".TABLE_PREFIX."attachments a
LEFT JOIN ".TABLE_PREFIX."posts p ON (a.pid=p.pid)

			SELECT a.pid, a.aid
FROM ".TABLE_PREFIX."attachments a
LEFT JOIN ".TABLE_PREFIX."posts p ON (a.pid=p.pid)

			LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)

			LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)

			WHERE aid IN (".implode(",", $attachments)."){$tflist_queue_attach}
");
while($attachment = $db->fetch_array($query))

			WHERE aid IN (".implode(",", $attachments)."){$tflist_queue_attach}
");
while($attachment = $db->fetch_array($query))

Zeile 2741Zeile 2741
	}

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

	}

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

	



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

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

Zeile 4165Zeile 4165
		if($existing_ban)
{
$update_array = array(

		if($existing_ban)
{
$update_array = array(

				'gid' => $mybb->get_input('usergroup', 1),
'admin' => (int)$user['uid'],
'dateline' => TIME_NOW,
'bantime' => $db->escape_string($mybb->get_input('liftafter')),
'lifted' => $db->escape_string($lifted),

				'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT),
'dateline' => TIME_NOW,
'bantime' => $db->escape_string($mybb->get_input('liftafter')),
'lifted' => $db->escape_string($lifted),


				'reason' => $db->escape_string($banreason)
);


				'reason' => $db->escape_string($banreason)
);


Zeile 4274Zeile 4273
			$lang->ban_user = $lang->edit_ban; // Swap over lang variables
eval("\$banuser_username = \"".$templates->get("modcp_banuser_editusername")."\";");
}

			$lang->ban_user = $lang->edit_ban; // Swap over lang variables
eval("\$banuser_username = \"".$templates->get("modcp_banuser_editusername")."\";");
}

 
	}

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

	}

// New ban!
if(!$banuser_username)

	}

// New ban!
if(!$banuser_username)

	{

	{

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

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

		{

		{

			$username = htmlspecialchars_uni($mybb->get_input('username'));
}
eval("\$banuser_username = \"".$templates->get("modcp_banuser_addusername")."\";");

			$username = htmlspecialchars_uni($mybb->get_input('username'));
}
eval("\$banuser_username = \"".$templates->get("modcp_banuser_addusername")."\";");

Zeile 4311Zeile 4316
		if(isset($banned['bantime']) && $banned['bantime'] == $time)
{
$selected = " selected=\"selected\"";

		if(isset($banned['bantime']) && $banned['bantime'] == $time)
{
$selected = " selected=\"selected\"";

		}


		}


		$thattime = '';

		$thattime = '';

		if($time != '---' && !isset($banned['dateline']))

		if($time != '---')

		{

		{

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







			$dateline = TIME_NOW;
if(isset($banned['dateline']))
{
$dateline = $banned['dateline'];
}

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

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


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


Zeile 4324Zeile 4335
	}

$bangroup_option = $bangroups = '';

	}

$bangroup_option = $bangroups = '';

	$numgroups = 0;

	$numgroups = $banned_group = 0;

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

foreach($groupscache as $key => $group)

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

foreach($groupscache as $key => $group)

Zeile 4335Zeile 4346
			if(isset($banned['gid']) && $banned['gid'] == $group['gid'])
{
$selected = " selected=\"selected\"";

			if(isset($banned['gid']) && $banned['gid'] == $group['gid'])
{
$selected = " selected=\"selected\"";

			}


			}


			$group['title'] = htmlspecialchars_uni($group['title']);
eval("\$bangroup_option .= \"".$templates->get("modcp_banuser_bangroups_group")."\";");

			$group['title'] = htmlspecialchars_uni($group['title']);
eval("\$bangroup_option .= \"".$templates->get("modcp_banuser_bangroups_group")."\";");

 
			$banned_group = $group['gid'];

			++$numgroups;
}

			++$numgroups;
}

	}

if($numgroups > 1)
{





	}

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

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

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

	}

	}





	if(!empty($user['uid']))

	if(!empty($banned['uid']))

	{
eval("\$lift_link = \"".$templates->get("modcp_banuser_lift")."\";");

	{
eval("\$lift_link = \"".$templates->get("modcp_banuser_lift")."\";");

		$uid = $user['uid'];

		$uid = $banned['uid'];

	}
else
{

	}
else
{

Zeile 4386Zeile 4402

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 4500Zeile 4516
				if(my_strlen($thread['subject']) > 25)
{
$post['subject'] = my_substr($thread['subject'], 0, 25)."...";

				if(my_strlen($thread['subject']) > 25)
{
$post['subject'] = my_substr($thread['subject'], 0, 25)."...";

				}

				}

				$thread['subject'] = htmlspecialchars_uni($thread['subject']);
$thread['fullsubject'] = htmlspecialchars_uni($thread['fullsubject']);
$unapproved_threads = my_number_format($unapproved_threads);

				$thread['subject'] = htmlspecialchars_uni($thread['subject']);
$thread['fullsubject'] = htmlspecialchars_uni($thread['fullsubject']);
$unapproved_threads = my_number_format($unapproved_threads);

Zeile 4513Zeile 4529
			}

eval("\$awaitingthreads = \"".$templates->get("modcp_awaitingthreads")."\";");

			}

eval("\$awaitingthreads = \"".$templates->get("modcp_awaitingthreads")."\";");

		}


		}


		if(!empty($awaitingattachments) || !empty($awaitingposts) || !empty($awaitingthreads))
{
eval("\$awaitingmoderation = \"".$templates->get("modcp_awaitingmoderation")."\";");

		if(!empty($awaitingattachments) || !empty($awaitingposts) || !empty($awaitingthreads))
{
eval("\$awaitingmoderation = \"".$templates->get("modcp_awaitingmoderation")."\";");

Zeile 4541Zeile 4557
			ORDER BY l.dateline DESC
LIMIT 5
");

			ORDER BY l.dateline DESC
LIMIT 5
");





		$modlogresults = '';
while($logitem = $db->fetch_array($query))
{

		$modlogresults = '';
while($logitem = $db->fetch_array($query))
{

Zeile 4554Zeile 4570
			$logitem['ipaddress'] = my_inet_ntop($db->unescape_binary($logitem['ipaddress']));

if($logitem['tsubject'])

			$logitem['ipaddress'] = my_inet_ntop($db->unescape_binary($logitem['ipaddress']));

if($logitem['tsubject'])

			{

			{

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

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

Zeile 4588Zeile 4604
			}

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

			}

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

		}

		}


if(!$modlogresults)
{


if(!$modlogresults)
{

Zeile 4599Zeile 4615
	}

$query = $db->query("

	}

$query = $db->query("

		SELECT b.*, a.username AS adminuser, u.username, (b.lifted-".TIME_NOW.") AS remaining

		SELECT b.*, a.username AS adminuser, u.username

		FROM ".TABLE_PREFIX."banned b
LEFT JOIN ".TABLE_PREFIX."users u ON (b.uid=u.uid)
LEFT JOIN ".TABLE_PREFIX."users a ON (b.admin=a.uid)
WHERE b.bantime != '---' AND b.bantime != 'perm'

		FROM ".TABLE_PREFIX."banned b
LEFT JOIN ".TABLE_PREFIX."users u ON (b.uid=u.uid)
LEFT JOIN ".TABLE_PREFIX."users a ON (b.admin=a.uid)
WHERE b.bantime != '---' AND b.bantime != 'perm'

		ORDER BY remaining ASC

		ORDER BY lifted ASC

		LIMIT 5
");

		LIMIT 5
");

 

$banned_cache = array();
while($banned = $db->fetch_array($query))
{
$banned['remaining'] = $banned['lifted']-TIME_NOW;
$banned_cache[$banned['remaining'].$banned['uid']] = $banned;

unset($banned);
}


// Get the banned users
$bannedusers = '';


// Get the banned users
$bannedusers = '';

	while($banned = $db->fetch_array($query))

	foreach($banned_cache as $banned)

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


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