Vergleich modcp.php - 1.6.5 - 1.6.7

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: modcp.php 5585 2011-09-13 13:14:41Z Tomm $

 * $Id: modcp.php 5761 2012-03-22 15:22:01Z Tomm $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 67Zeile 67
else
{
$flist = $tflist = '';

else
{
$flist = $tflist = '';

 
}

// Retrieve a list of unviewable forums
$unviewableforums = get_unviewable_forums();

if($unviewableforums && !is_super_admin($mybb->user['uid']))
{
$flist .= " AND fid NOT IN ({$unviewableforums})";
$tflist .= " AND t.fid NOT IN ({$unviewableforums})";

}

// Fetch the Mod CP menu
eval("\$modcp_nav = \"".$templates->get("modcp_nav")."\";");


}

// Fetch the Mod CP menu
eval("\$modcp_nav = \"".$templates->get("modcp_nav")."\";");


$plugins->run_hooks("modcp_start");


$plugins->run_hooks("modcp_start");


// Make navigation
add_breadcrumb($lang->nav_modcp, "modcp.php");


// Make navigation
add_breadcrumb($lang->nav_modcp, "modcp.php");


Zeile 87Zeile 96
		error($lang->error_noselected_reports);
}


		error($lang->error_noselected_reports);
}


	$mybb->input['reports'] = array_map("intval", $mybb->input['reports']);
$rids = implode($mybb->input['reports'], "','");
$rids = "'0','{$rids}'";







	$sql = '1=1';
if(!$mybb->input['allbox'])
{
$mybb->input['reports'] = array_map("intval", $mybb->input['reports']);
$rids = implode($mybb->input['reports'], "','");
$rids = "'0','{$rids}'";

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


$plugins->run_hooks("modcp_do_reports");



$plugins->run_hooks("modcp_do_reports");


	$db->update_query("reportedposts", array('reportstatus' => 1), "rid IN ({$rids}){$flist}");

	$db->update_query("reportedposts", array('reportstatus' => 1), "{$sql}{$flist}");

	$cache->update_reportedposts();

$page = intval($mybb->input['page']);

	$cache->update_reportedposts();

$page = intval($mybb->input['page']);

Zeile 446Zeile 461
	while($logitem = $db->fetch_array($query))
{
$information = '';

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

		$logitem['action'] = $logitem['action'];

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

		$log_date = my_date($mybb->settings['dateformat'], $logitem['dateline']);
$log_time = my_date($mybb->settings['timeformat'], $logitem['dateline']);
$trow = alt_trow();

		$log_date = my_date($mybb->settings['dateformat'], $logitem['dateline']);
$log_time = my_date($mybb->settings['timeformat'], $logitem['dateline']);
$trow = alt_trow();

Zeile 545Zeile 560
{
$aid = intval($mybb->input['aid']);
$query = $db->simple_select("announcements", "aid, subject, fid", "aid='{$aid}'");

{
$aid = intval($mybb->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']);


if(!$announcement['aid'])
{
error($lang->error_invalid_announcement);
}


if(!$announcement['aid'])
{
error($lang->error_invalid_announcement);
}

 


	if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])))

	if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])))

	{
error_no_permission();

	{
error_no_permission();

	}

$plugins->run_hooks("modcp_delete_announcement");

	}

$plugins->run_hooks("modcp_delete_announcement");

Zeile 563Zeile 581
}

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

}

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

{
verify_post_check($mybb->input['my_post_key']);

$announcement_fid = intval($mybb->input['fid']);
if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid)))
{
error_no_permission();
}

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

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

if(!trim($mybb->input['fid']))
{
$errors[] = $lang->error_missing_forum;
}

$startdate = @explode(" ", $mybb->input['starttime_time']);
$startdate = @explode(":", $startdate[0]);
$enddate = @explode(" ", $mybb->input['endtime_time']);
$enddate = @explode(":", $enddate[0]);

if(stristr($mybb->input['starttime_time'], "pm"))
{
$startdate[0] = 12+$startdate[0];
if($startdate[0] >= 24)
{
$startdate[0] = "00";
}
}

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

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

$startdate = gmmktime(intval($startdate[0]), intval($startdate[1]), 0, (int)$mybb->input['starttime_month'], intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year']));

if($startdate < 0 || $startdate == false)
{
$errors[] = $lang->error_invalid_start_date;
}

if($mybb->input['endtime_type'] == "2")
{
$enddate = '0';
}
else
{
if(!in_array($mybb->input['endtime_month'], $months))
{
$mybb->input['endtime_month'] = 1;
}

{
verify_post_check($mybb->input['my_post_key']);

$announcement_fid = intval($mybb->input['fid']);
if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid)))
{
error_no_permission();
}

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

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

if(!trim($mybb->input['fid']))
{
$errors[] = $lang->error_missing_forum;
}

$startdate = @explode(" ", $mybb->input['starttime_time']);
$startdate = @explode(":", $startdate[0]);
$enddate = @explode(" ", $mybb->input['endtime_time']);
$enddate = @explode(":", $enddate[0]);

if(stristr($mybb->input['starttime_time'], "pm"))
{
$startdate[0] = 12+$startdate[0];
if($startdate[0] >= 24)
{
$startdate[0] = "00";
}
}

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

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

$startdate = gmmktime(intval($startdate[0]), intval($startdate[1]), 0, (int)$mybb->input['starttime_month'], intval($mybb->input['starttime_day']), intval($mybb->input['starttime_year']));

if($startdate < 0 || $startdate == false)
{
$errors[] = $lang->error_invalid_start_date;
}

if($mybb->input['endtime_type'] == "2")
{
$enddate = '0';
}
else
{
if(!in_array($mybb->input['endtime_month'], $months))
{
$mybb->input['endtime_month'] = 1;
}

		$enddate = gmmktime(intval($enddate[0]), intval($enddate[1]), 0, (int)$mybb->input['endtime_month'], intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year']));
if($enddate < 0 || $enddate == false)
{

		$enddate = gmmktime(intval($enddate[0]), intval($enddate[1]), 0, (int)$mybb->input['endtime_month'], intval($mybb->input['endtime_day']), intval($mybb->input['endtime_year']));
if($enddate < 0 || $enddate == false)
{

Zeile 661Zeile 679
		);

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

		);

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

		

		

		$plugins->run_hooks("modcp_do_new_announcement_end");

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

		$plugins->run_hooks("modcp_do_new_announcement_end");

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

	}

	}

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

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

Zeile 676Zeile 694
if($mybb->input['action'] == "new_announcement")
{
add_breadcrumb($lang->mcp_nav_announcements, "modcp.php?action=announcements");

if($mybb->input['action'] == "new_announcement")
{
add_breadcrumb($lang->mcp_nav_announcements, "modcp.php?action=announcements");

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


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


	$announcement_fid = intval($mybb->input['fid']);

if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid)))

	$announcement_fid = intval($mybb->input['fid']);

if(($mybb->usergroup['issupermod'] != 1 && $announcement_fid == -1) || ($announcement_fid != -1 && !is_moderator($announcement_fid)))

Zeile 812Zeile 830
	}

if($mybb->input['endtime_type'] == 2 || !isset($mybb->input['endtime_type']))

	}

if($mybb->input['endtime_type'] == 2 || !isset($mybb->input['endtime_type']))

	{

	{

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

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

Zeile 903Zeile 921
	}

if($mybb->input['endtime_type'] == "2")

	}

if($mybb->input['endtime_type'] == "2")

	{
$enddate = '0';
}
else

	{
$enddate = '0';
}
else

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

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

Zeile 971Zeile 989
	if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])))
{
error_no_permission();

	if(($mybb->usergroup['issupermod'] != 1 && $announcement['fid'] == -1) || ($announcement['fid'] != -1 && !is_moderator($announcement['fid'])))
{
error_no_permission();

 
	}

if(!$announcement['startdate'])
{
// No start date? Make it now.
$announcement['startdate'] = TIME_NOW;
}

$makeshift_end = false;
if(!$announcement['enddate'])
{
$makeshift_end = true;
$makeshift_time = TIME_NOW;
if($announcement['startdate'])
{
$makeshift_time = $announcement['startdate'];
}

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

	}

// Deal with inline errors

	}

// Deal with inline errors

Zeile 1107Zeile 1145
		$smilies_sel['no'] = ' checked="checked"';
}


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


	if(($errored && $mybb->input['endtime_type'] == 2) || (!$errored && intval($announcement['enddate']) == 0))

	if(($errored && $mybb->input['endtime_type'] == 2) || (!$errored && intval($announcement['enddate']) == 0) || $makeshift_end == true)

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

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

Zeile 1151Zeile 1189
			{
$trow = alt_trow();
if($announcement['startdate'] > TIME_NOW || ($announcement['enddate'] < TIME_NOW && $announcement['enddate'] != 0))

			{
$trow = alt_trow();
if($announcement['startdate'] > TIME_NOW || ($announcement['enddate'] < TIME_NOW && $announcement['enddate'] != 0))

				{

				{

					$icon = "<img src=\"images/minioff.gif\" alt=\"({$lang->expired})\" title=\"{$lang->expired_announcement}\"  style=\"vertical-align: middle;\" /> ";
}
else

					$icon = "<img src=\"images/minioff.gif\" alt=\"({$lang->expired})\" title=\"{$lang->expired_announcement}\"  style=\"vertical-align: middle;\" /> ";
}
else

Zeile 1251Zeile 1289
			}
}
if(is_array($posts_to_approve))

			}
}
if(is_array($posts_to_approve))

		{
$moderation->approve_posts($posts_to_approve);
}

		{
$moderation->approve_posts($posts_to_approve);
}

		log_moderator_action(array('pids' => $posts_to_approve), $lang->multi_approve_posts);

$plugins->run_hooks("modcp_do_modqueue_end");

		log_moderator_action(array('pids' => $posts_to_approve), $lang->multi_approve_posts);

$plugins->run_hooks("modcp_do_modqueue_end");

Zeile 1273Zeile 1311
		{
$action = $mybb->input['attachments'][$attachment['aid']];
if($action == "approve")

		{
$action = $mybb->input['attachments'][$attachment['aid']];
if($action == "approve")

			{

			{

				$db->update_query("attachments", array("visible" => 1), "aid='{$attachment['aid']}'");
}
else if($action == "delete")

				$db->update_query("attachments", array("visible" => 1), "aid='{$attachment['aid']}'");
}
else if($action == "delete")

Zeile 1305Zeile 1343

$perpage = $mybb->settings['threadsperpage'];
$pages = $unapproved_threads / $perpage;


$perpage = $mybb->settings['threadsperpage'];
$pages = $unapproved_threads / $perpage;

		$pages = ceil($pages);

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

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

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

		$pages = ceil($pages);

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

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

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

			$page = 1;
}


			$page = 1;
}


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

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

		}

		}


if($threads)
{


if($threads)
{

Zeile 1374Zeile 1412
	if($mybb->input['type'] == "posts" || (!$mybb->input['type'] && !$threadqueue))
{
$forum_cache = $cache->read("forums");

	if($mybb->input['type'] == "posts" || (!$mybb->input['type'] && !$threadqueue))
{
$forum_cache = $cache->read("forums");


$query = $db->query("


$query = $db->query("

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

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

Zeile 1531Zeile 1569
			$link = get_post_link($attachment['pid'], $attachment['tid']) . "#pid{$attachment['pid']}";
$thread_link = get_thread_link($attachment['tid']);
$profile_link = build_profile_link($attachment['username'], $attachment['uid']);

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





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


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


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

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

		{

		{

			$extra_user_updates = array(
"avatar" => "",
"avatardimensions" => "",

			$extra_user_updates = array(
"avatar" => "",
"avatardimensions" => "",

Zeile 1739Zeile 1777
		if(is_array($errors))
{
$mybb->input['action'] = "editprofile";

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

		}

		}

		else
{
$plugins->run_hooks("modcp_do_editprofile_update");

		else
{
$plugins->run_hooks("modcp_do_editprofile_update");

Zeile 1764Zeile 1802
	if(!$user['uid'])
{
error($lang->invalid_user);

	if(!$user['uid'])
{
error($lang->invalid_user);

	}

	}


// Check if the current user has permission to edit this user
if(!modcp_can_manage_user($user['uid']))
{
error_no_permission();


// Check if the current user has permission to edit this user
if(!modcp_can_manage_user($user['uid']))
{
error_no_permission();

	}

	}


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


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

Zeile 1790Zeile 1828
	{
$mybb->input = array_merge($user, $mybb->input);
list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = explode("-", $user['birthday']);

	{
$mybb->input = array_merge($user, $mybb->input);
list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = explode("-", $user['birthday']);

	}
else
{

	}
else
{

		$errors = inline_error($errors);
}


		$errors = inline_error($errors);
}


Zeile 2156Zeile 2194
if($mybb->input['action'] == "finduser")
{
add_breadcrumb($lang->mcp_nav_users, "modcp.php?action=finduser");

if($mybb->input['action'] == "finduser")
{
add_breadcrumb($lang->mcp_nav_users, "modcp.php?action=finduser");

	

	

	$perpage = intval($mybb->input['perpage']);
if(!$perpage || $perpage <= 0)
{

	$perpage = intval($mybb->input['perpage']);
if(!$perpage || $perpage <= 0)
{

Zeile 2259Zeile 2297
	}

$plugins->run_hooks("modcp_finduser_end");

	}

$plugins->run_hooks("modcp_finduser_end");





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

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

Zeile 2414Zeile 2452
		if($row['expires'] > 0)
{
$expire_date = my_date($mybb->settings['dateformat'], $row['expires']).' '.my_date($mybb->settings['timeformat'], $row['expires']);

		if($row['expires'] > 0)
{
$expire_date = my_date($mybb->settings['dateformat'], $row['expires']).' '.my_date($mybb->settings['timeformat'], $row['expires']);

		}

		}

		else
{
$expire_date = $lang->never;

		else
{
$expire_date = $lang->never;

Zeile 2426Zeile 2464
		}
$title = htmlspecialchars_uni($title);
if($row['points'] >= 0)

		}
$title = htmlspecialchars_uni($title);
if($row['points'] >= 0)

		{

		{

			$points = '+'.$row['points'];
}

			$points = '+'.$row['points'];
}





		eval("\$warning_list .= \"".$templates->get("modcp_warninglogs_warning")."\";");

		eval("\$warning_list .= \"".$templates->get("modcp_warninglogs_warning")."\";");

	}


	}


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

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

Zeile 2451Zeile 2489
	if($mybb->input['ipaddress'])
{
if(!is_array($groupscache))

	if($mybb->input['ipaddress'])
{
if(!is_array($groupscache))

		{

		{

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


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


Zeile 2464Zeile 2502
			if(strpos($mybb->input['ipaddress'], ":") !== false)
{
$post_ip_sql = "ipaddress LIKE '".$db->escape_string(str_replace("*", "%", $mybb->input['ipaddress']))."'";

			if(strpos($mybb->input['ipaddress'], ":") !== false)
{
$post_ip_sql = "ipaddress LIKE '".$db->escape_string(str_replace("*", "%", $mybb->input['ipaddress']))."'";

			}
else
{

			}
else
{

				$ip_range = fetch_longipv4_range($mybb->input['ipaddress']);
if(!is_array($ip_range))
{

				$ip_range = fetch_longipv4_range($mybb->input['ipaddress']);
if(!is_array($ip_range))
{

Zeile 2570Zeile 2608
				WHERE {$user_ip_sql}
ORDER BY regdate DESC
LIMIT {$start}, {$perpage}

				WHERE {$user_ip_sql}
ORDER BY regdate DESC
LIMIT {$start}, {$perpage}

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

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

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

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

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

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

	{

	{

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


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


Zeile 2728Zeile 2766
		if($ipaddress_host_name == $mybb->input['ipaddress'])
{
$ipaddress_host_name = $lang->na;

		if($ipaddress_host_name == $mybb->input['ipaddress'])
{
$ipaddress_host_name = $lang->na;

		}
}

		}
}

	
$plugins->run_hooks("modcp_iplookup_end");


	
$plugins->run_hooks("modcp_iplookup_end");


Zeile 2742Zeile 2780
	add_breadcrumb($lang->mcp_nav_banning, "modcp.php?action=banning");

if(!$mybb->settings['threadsperpage'])

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

if(!$mybb->settings['threadsperpage'])

	{

	{

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


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


Zeile 2751Zeile 2789
	if($mybb->input['page'] != "last")
{
$page = intval($mybb->input['page']);

	if($mybb->input['page'] != "last")
{
$page = intval($mybb->input['page']);

	}

	}


$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 2761Zeile 2799
	$pages = ceil($pages);

if($mybb->input['page'] == "last")

	$pages = ceil($pages);

if($mybb->input['page'] == "last")

	{

	{

		$page = $pages;
}


		$page = $pages;
}


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


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


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

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

Zeile 2808Zeile 2846
		if($mybb->user['uid'] == $banned['admin'] || !$banned['adminuser'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1)
{
$edit_link = "<br /><span class=\"smalltext\"><a href=\"modcp.php?action=banuser&amp;uid={$banned['uid']}\">{$lang->edit_ban}</a> | <a href=\"modcp.php?action=liftban&amp;uid={$banned['uid']}&amp;my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></span>";

		if($mybb->user['uid'] == $banned['admin'] || !$banned['adminuser'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1)
{
$edit_link = "<br /><span class=\"smalltext\"><a href=\"modcp.php?action=banuser&amp;uid={$banned['uid']}\">{$lang->edit_ban}</a> | <a href=\"modcp.php?action=liftban&amp;uid={$banned['uid']}&amp;my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></span>";

		}

		}


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



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


Zeile 2887Zeile 2925
	}

$plugins->run_hooks("modcp_liftban_start");

	}

$plugins->run_hooks("modcp_liftban_start");

 

$query = $db->simple_select("users", "username", "uid = '{$ban['uid']}'");
$username = $db->fetch_field($query, "username");


$updated_group = array(
'usergroup' => $ban['oldgroup'],


$updated_group = array(
'usergroup' => $ban['oldgroup'],

Zeile 2898Zeile 2939

$cache->update_banned();
$cache->update_moderators();


$cache->update_banned();
$cache->update_moderators();

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

	
$plugins->run_hooks("modcp_liftban_end");


	
$plugins->run_hooks("modcp_liftban_end");


Zeile 2935Zeile 2977
	else
{
// Get the users info from their Username

	else
{
// Get the users info from their Username

		$query = $db->simple_select("users", "uid, usergroup, additionalgroups, displaygroup", "username = '".$db->escape_string($mybb->input['username'])."'", array('limit' => 1));

		$query = $db->simple_select("users", "uid, username, usergroup, additionalgroups, displaygroup", "username = '".$db->escape_string($mybb->input['username'])."'", array('limit' => 1));

		$user = $db->fetch_array($query);
if(!$user['uid'])
{

		$user = $db->fetch_array($query);
if(!$user['uid'])
{

Zeile 3032Zeile 3074
		$db->update_query('users', $update_array, "uid = {$user['uid']}");

$cache->update_banned();

		$db->update_query('users', $update_array, "uid = {$user['uid']}");

$cache->update_banned();

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

		
$plugins->run_hooks("modcp_do_banuser_end");


		
$plugins->run_hooks("modcp_do_banuser_end");


Zeile 3269Zeile 3312
	else
{
$latest_thread = "<span style=\"text-align: center;\">{$lang->lastpost_never}</span>";

	else
{
$latest_thread = "<span style=\"text-align: center;\">{$lang->lastpost_never}</span>";

 
	}

$where = '';
if($tflist)
{
$where = "WHERE (t.fid <> 0 {$tflist}) OR (!l.fid)";

	}

$query = $db->query("

	}

$query = $db->query("

Zeile 3278Zeile 3327
		LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=l.tid)
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=l.fid)
LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=l.pid)

		LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=l.tid)
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=l.fid)
LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=l.pid)

 
		{$where}

		ORDER BY l.dateline DESC
LIMIT 5
");

		ORDER BY l.dateline DESC
LIMIT 5
");

 


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

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

		$logitem['action'] = $logitem['action'];

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

		$log_date = my_date($mybb->settings['dateformat'], $logitem['dateline']);
$log_time = my_date($mybb->settings['timeformat'], $logitem['dateline']);
$trow = alt_trow();

		$log_date = my_date($mybb->settings['dateformat'], $logitem['dateline']);
$log_time = my_date($mybb->settings['timeformat'], $logitem['dateline']);
$trow = alt_trow();

Zeile 3305Zeile 3356
		
// Edited a user?
if(!$logitem['tsubject'] || !$logitem['fname'] || !$logitem['psubject'])

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

		{

		{

			$data = unserialize($logitem['data']);
if($data['uid'])
{

			$data = unserialize($logitem['data']);
if($data['uid'])
{

Zeile 3339Zeile 3390
		// Only show the edit & lift links if current user created ban, or is super mod/admin
$edit_link = '';
if($mybb->user['uid'] == $banned['admin'] || !$banned['adminuser'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1)

		// Only show the edit & lift links if current user created ban, or is super mod/admin
$edit_link = '';
if($mybb->user['uid'] == $banned['admin'] || !$banned['adminuser'] || $mybb->usergroup['issupermod'] == 1 || $mybb->usergroup['cancp'] == 1)

		{

		{

			$edit_link = "<br /><span class=\"smalltext\"><a href=\"modcp.php?action=banuser&amp;uid={$banned['uid']}\">{$lang->edit_ban}</a> | <a href=\"modcp.php?action=liftban&amp;uid={$banned['uid']}&amp;my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></span>";
}


			$edit_link = "<br /><span class=\"smalltext\"><a href=\"modcp.php?action=banuser&amp;uid={$banned['uid']}\">{$lang->edit_ban}</a> | <a href=\"modcp.php?action=liftban&amp;uid={$banned['uid']}&amp;my_post_key={$mybb->post_code}\">{$lang->lift_ban}</a></span>";
}


Zeile 3373Zeile 3424
				$timeremaining = "<span style=\"color: red;\">({$lang->ban_ending_imminently})</span>";
}
else if($remaining < 3600)

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

			{

			{

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

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

Zeile 3406Zeile 3457
	eval("\$modcp = \"".$templates->get("modcp")."\";");
output_page($modcp);
}

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



 
?>

?>