Vergleich modcp.php - 1.8.14 - 1.8.21

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 58Zeile 58
$moderated_forums = array();
if($mybb->usergroup['issupermod'] != 1)
{

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

	$query = $db->simple_select("moderators", "*", "(id='{$mybb->user['uid']}' AND isgroup = '0') OR (id='{$mybb->user['usergroup']}' AND isgroup = '1')");

	$query = $db->simple_select("moderators", "*", "(id='{$mybb->user['uid']}' AND isgroup = '0') OR (id IN ({$mybb->usergroup['all_usergroups']}) AND isgroup = '1')");


$numannouncements = $nummodqueuethreads = $nummodqueueposts = $nummodqueueattach = $numreportedposts = $nummodlogs = 0;
while($forum = $db->fetch_array($query))


$numannouncements = $nummodqueuethreads = $nummodqueueposts = $nummodqueueattach = $numreportedposts = $nummodlogs = 0;
while($forum = $db->fetch_array($query))

Zeile 263Zeile 263

if(!empty($nav_announcements) || !empty($nav_modqueue) || !empty($nav_reportcenter) || !empty($nav_modlogs))
{


if(!empty($nav_announcements) || !empty($nav_modqueue) || !empty($nav_reportcenter) || !empty($nav_modlogs))
{

 
	$expaltext = (in_array("modcpforums", $collapse)) ? "[+]" : "[-]";

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

if(!empty($nav_editprofile) || !empty($nav_banning) || !empty($nav_warninglogs) || !empty($nav_ipsearch))
{

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

if(!empty($nav_editprofile) || !empty($nav_banning) || !empty($nav_warninglogs) || !empty($nav_ipsearch))
{

 
	$expaltext = (in_array("modcpusers", $collapse)) ? "[+]" : "[-]";

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


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


Zeile 2585Zeile 2587
		"profile_fields_editable" => true,
"website" => $mybb->get_input('website'),
"icq" => $mybb->get_input('icq'),

		"profile_fields_editable" => true,
"website" => $mybb->get_input('website'),
"icq" => $mybb->get_input('icq'),

		"aim" => $mybb->get_input('aim'),

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

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

Zeile 2616Zeile 2617

// Set the data of the user in the datahandler.
$userhandler->set_data($updated_user);


// Set the data of the user in the datahandler.
$userhandler->set_data($updated_user);

	$errors = '';

	$errors = array();


// Validate the user and get any errors that might have occurred.
if(!$userhandler->validate_user())


// Validate the user and get any errors that might have occurred.
if(!$userhandler->validate_user())

Zeile 2665Zeile 2666
		require_once MYBB_ROOT."inc/functions_warnings.php";
foreach($moderator_options as $option)
{

		require_once MYBB_ROOT."inc/functions_warnings.php";
foreach($moderator_options as $option)
{

			$mybb->input[$option['time']] = $mybb->get_input($option['time'], MyBB::INPUT_INT);

			${$option['time']} = $mybb->get_input($option['time'], MyBB::INPUT_INT);

			$mybb->input[$option['period']] = $mybb->get_input($option['period']);
if(empty($mybb->input[$option['action']]))
{

			$mybb->input[$option['period']] = $mybb->get_input($option['period']);
if(empty($mybb->input[$option['action']]))
{

Zeile 2765Zeile 2766

$user = get_user($mybb->get_input('uid', MyBB::INPUT_INT));
if(!$user)


$user = get_user($mybb->get_input('uid', MyBB::INPUT_INT));
if(!$user)

	{

	{

		error($lang->error_nomember);
}


		error($lang->error_nomember);
}


Zeile 2773Zeile 2774
	if(!modcp_can_manage_user($user['uid']))
{
error_no_permission();

	if(!modcp_can_manage_user($user['uid']))
{
error_no_permission();

 
	}

$userperms = user_permissions($user['uid']);

// Set display group
$displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");

if(!$user['displaygroup'])
{
$user['displaygroup'] = $user['usergroup'];
}

$display_group = usergroup_displaygroup($user['displaygroup']);
if(is_array($display_group))
{
$userperms = array_merge($userperms, $display_group);

	}

if(!my_validate_url($user['website']))
{
$user['website'] = '';

	}

if(!my_validate_url($user['website']))
{
$user['website'] = '';

	}

	}


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


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

	{

	{

		$user['icq'] = (int)$user['icq'];
}


		$user['icq'] = (int)$user['icq'];
}


Zeile 2790Zeile 2807
		$mybb->input = array_merge($user, $mybb->input);
$birthday = explode('-', $user['birthday']);
if(!isset($birthday[1]))

		$mybb->input = array_merge($user, $mybb->input);
$birthday = explode('-', $user['birthday']);
if(!isset($birthday[1]))

		{

		{

			$birthday[1] = '';

			$birthday[1] = '';

		}

		}

		if(!isset($birthday[2]))
{
$birthday[2] = '';
}
list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = $birthday;

		if(!isset($birthday[2]))
{
$birthday[2] = '';
}
list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = $birthday;

	}

	}

	else
{
$errors = inline_error($errors);

	else
{
$errors = inline_error($errors);

	}


	}


	// Sanitize all input

	// Sanitize all input

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

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

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


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


	// Custom user title, check to see if we have a default group title
if(!$user['displaygroup'])
{
$user['displaygroup'] = $user['usergroup'];
}

$displaygroupfields = array('usertitle');
$display_group = usergroup_displaygroup($user['displaygroup']);

if(!empty($display_group['usertitle']))

	// Custom user title
if(!empty($userperms['usertitle']))









	{

	{

		$defaulttitle = htmlspecialchars_uni($display_group['usertitle']);

		$defaulttitle = htmlspecialchars_uni($userperms['usertitle']);

	}
else
{

	}
else
{

Zeile 3033Zeile 3042
						eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}
if(!$profilefield['length'])

						eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}
if(!$profilefield['length'])

					{

					{

						$profilefield['length'] = 1;
}


						$profilefield['length'] = 1;
}


Zeile 3109Zeile 3118
			if($profilefield['required'] == 1)
{
eval("\$requiredfields .= \"".$templates->get("usercp_profile_customfield")."\";");

			if($profilefield['required'] == 1)
{
eval("\$requiredfields .= \"".$templates->get("usercp_profile_customfield")."\";");

			}
else

			}
else

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

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

Zeile 3118Zeile 3127
		}
}
if($customfields)

		}
}
if($customfields)

	{

	{

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

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

Zeile 3134Zeile 3143
	{
$checked = 1;
$checked_item = "checked=\"checked\"";

	{
$checked = 1;
$checked_item = "checked=\"checked\"";

	}
else
{

	}
else
{

		$checked = 0;
$checked_item = '';
}

		$checked = 0;
$checked_item = '';
}

Zeile 3187Zeile 3196
			"length" => "suspensiontime",
"select_option" => "suspost"
)

			"length" => "suspensiontime",
"select_option" => "suspost"
)

	);

	);


$periods = array(
"hours" => $lang->expire_hours,


$periods = array(
"hours" => $lang->expire_hours,

Zeile 3199Zeile 3208

$suspendsignature_info = $moderateposts_info = $suspendposting_info = '';
$action_options = $modpost_options = $suspost_options = '';


$suspendsignature_info = $moderateposts_info = $suspendposting_info = '';
$action_options = $modpost_options = $suspost_options = '';

 
	$modopts = array();

	foreach($moderator_options as $option)
{

	foreach($moderator_options as $option)
{

		$mybb->input[$option['time']] = $mybb->get_input($option['time'], MyBB::INPUT_INT);

		${$option['time']} = $mybb->get_input($option['time'], MyBB::INPUT_INT);

		// Display the suspension info, if this user has this option suspended
if($user[$option['option']])
{

		// Display the suspension info, if this user has this option suspended
if($user[$option['option']])
{

Zeile 3239Zeile 3249
		{
$string = $option['select_option']."_period";
if($mybb->get_input($string) == $key)

		{
$string = $option['select_option']."_period";
if($mybb->get_input($string) == $key)

			{

			{

				$selected = "selected=\"selected\"";

				$selected = "selected=\"selected\"";

			}

			}

			else
{
$selected = '';
}

eval("\$selection_options .= \"".$templates->get("modcp_editprofile_select_option")."\";");

			else
{
$selected = '';
}

eval("\$selection_options .= \"".$templates->get("modcp_editprofile_select_option")."\";");

		}


		}


		$select_name = $option['select_option']."_period";
switch($option['option'])
{
case "suspendsignature":
eval("\$action_options = \"".$templates->get("modcp_editprofile_select")."\";");

		$select_name = $option['select_option']."_period";
switch($option['option'])
{
case "suspendsignature":
eval("\$action_options = \"".$templates->get("modcp_editprofile_select")."\";");

				break;

				break;

			case "moderateposts":
eval("\$modpost_options = \"".$templates->get("modcp_editprofile_select")."\";");

			case "moderateposts":
eval("\$modpost_options = \"".$templates->get("modcp_editprofile_select")."\";");

				break;

				break;

			case "suspendposting":
eval("\$suspost_options = \"".$templates->get("modcp_editprofile_select")."\";");

			case "suspendposting":
eval("\$suspost_options = \"".$templates->get("modcp_editprofile_select")."\";");

				break;
}
}

eval("\$suspend_signature = \"".$templates->get("modcp_editprofile_signature")."\";");

				break;
}
}

eval("\$suspend_signature = \"".$templates->get("modcp_editprofile_signature")."\";");


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

if(!isset($newtitle))
{
$newtitle = '';


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

if(!isset($newtitle))
{
$newtitle = '';

	}

$plugins->run_hooks("modcp_editprofile_end");









	}

$birthday_year = $mybb->input['birthday_year'];
$user_website = $mybb->input['website'];
$user_icq = $mybb->input['icq'];
$user_skype = $mybb->input['skype'];
$user_google = $mybb->input['google'];
$user_yahoo = $mybb->input['yahoo'];

$plugins->run_hooks("modcp_editprofile_end");


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

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

Zeile 3291Zeile 3308

$perpage = $mybb->get_input('perpage', MyBB::INPUT_INT);
if(!$perpage || $perpage <= 0)


$perpage = $mybb->get_input('perpage', MyBB::INPUT_INT);
if(!$perpage || $perpage <= 0)

	{

	{

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

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





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

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

Zeile 3316Zeile 3333
	{
case "lastvisit":
$sortby = "lastvisit";

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

			break;

			break;

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

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

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

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

	}

$plugins->run_hooks("modcp_finduser_end");



	}

$plugins->run_hooks("modcp_finduser_end");

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

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

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





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

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

Zeile 3432Zeile 3450
	}

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

	}

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





	// Filter options
$where_sql = '';
$mybb->input['filter'] = $mybb->get_input('filter', MyBB::INPUT_ARRAY);

	// Filter options
$where_sql = '';
$mybb->input['filter'] = $mybb->get_input('filter', MyBB::INPUT_ARRAY);

Zeile 3443Zeile 3461

$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

	}
else

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

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

	}

	}

	if(!empty($mybb->input['filter']['uid']))
{
$search['uid'] = (int)$mybb->input['filter']['uid'];

	if(!empty($mybb->input['filter']['uid']))
{
$search['uid'] = (int)$mybb->input['filter']['uid'];

Zeile 3459Zeile 3477
		}
}
else

		}
}
else

	{

	{

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

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

Zeile 3468Zeile 3486

$mybb->input['filter']['mod_uid'] = (int)$mod_user['uid'];
$mybb->input['filter']['mod_username'] = htmlspecialchars_uni($mybb->input['filter']['mod_username']);


$mybb->input['filter']['mod_uid'] = (int)$mod_user['uid'];
$mybb->input['filter']['mod_username'] = htmlspecialchars_uni($mybb->input['filter']['mod_username']);

	}
else
{

	}
else
{

		$mybb->input['filter']['mod_username'] = '';
}
if(!empty($mybb->input['filter']['mod_uid']))

		$mybb->input['filter']['mod_username'] = '';
}
if(!empty($mybb->input['filter']['mod_uid']))

Zeile 3482Zeile 3500
			$mod_user = get_user($mybb->input['search']['uid']);
$mybb->input['search']['mod_username'] = htmlspecialchars_uni($mod_user['username']);
}

			$mod_user = get_user($mybb->input['search']['uid']);
$mybb->input['search']['mod_username'] = htmlspecialchars_uni($mod_user['username']);
}

	}

	}

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

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

Zeile 3492Zeile 3510
		$search['reason'] = $db->escape_string_like($mybb->input['filter']['reason']);
$where_sql .= " AND (w.notes LIKE '%{$search['reason']}%' OR t.title LIKE '%{$search['reason']}%' OR w.title LIKE '%{$search['reason']}%')";
$mybb->input['filter']['reason'] = htmlspecialchars_uni($mybb->input['filter']['reason']);

		$search['reason'] = $db->escape_string_like($mybb->input['filter']['reason']);
$where_sql .= " AND (w.notes LIKE '%{$search['reason']}%' OR t.title LIKE '%{$search['reason']}%' OR w.title LIKE '%{$search['reason']}%')";
$mybb->input['filter']['reason'] = htmlspecialchars_uni($mybb->input['filter']['reason']);

	}
else

	}
else

	{
$mybb->input['filter']['reason'] = '';
}

	{
$mybb->input['filter']['reason'] = '';
}

Zeile 3519Zeile 3537
		default: // "dateline"
$sortby = "w.dateline";
$sortbysel['dateline'] = ' selected="selected"';

		default: // "dateline"
$sortby = "w.dateline";
$sortbysel['dateline'] = ' selected="selected"';

	}

	}

	if(!isset($mybb->input['filter']['order']))

	if(!isset($mybb->input['filter']['order']))

	{

	{

		$mybb->input['filter']['order'] = '';
}
$order = $mybb->input['filter']['order'];
$ordersel = array('asc' => '', 'desc' => '');
if($order != "asc")

		$mybb->input['filter']['order'] = '';
}
$order = $mybb->input['filter']['order'];
$ordersel = array('asc' => '', 'desc' => '');
if($order != "asc")

	{

	{

		$order = "desc";
$ordersel['desc'] = ' selected="selected"';

		$order = "desc";
$ordersel['desc'] = ' selected="selected"';

	}

	}

	else
{
$ordersel['asc'] = ' selected="selected"';

	else
{
$ordersel['asc'] = ' selected="selected"';

Zeile 3543Zeile 3561
		SELECT COUNT(wid) as count
FROM
".TABLE_PREFIX."warnings w

		SELECT COUNT(wid) as count
FROM
".TABLE_PREFIX."warnings w

			LEFT JOIN ".TABLE_PREFIX."warningtypes t ON (w.tid=t.tid)
WHERE 1=1

			LEFT JOIN ".TABLE_PREFIX."warningtypes t ON (w.tid=t.tid)
WHERE 1=1

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

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

	{
$page = 1;
}

	{
$page = 1;
}

	$per_page = 20;
if(isset($mybb->input['filter']['per_page']) && (int)$mybb->input['filter']['per_page'] > 0)
{
$per_page = (int)$mybb->input['filter']['per_page'];
}
$start = ($page-1) * $per_page;

	$per_page = 20;
if(isset($mybb->input['filter']['per_page']) && (int)$mybb->input['filter']['per_page'] > 0)
{
$per_page = (int)$mybb->input['filter']['per_page'];
}
$start = ($page-1) * $per_page;

 
	$pages = ceil($total_warnings / $per_page);
if($page > $pages)
{
$start = 0;
$page = 1;
}

	// Build the base URL for pagination links
$url = 'modcp.php?action=warninglogs';
if(is_array($mybb->input['filter']) && count($mybb->input['filter']))

	// Build the base URL for pagination links
$url = 'modcp.php?action=warninglogs';
if(is_array($mybb->input['filter']) && count($mybb->input['filter']))

Zeile 3636Zeile 3660
	}

$plugins->run_hooks("modcp_warninglogs_end");

	}

$plugins->run_hooks("modcp_warninglogs_end");

 

$filter_username = $mybb->input['filter']['username'];
$filter_modusername = $mybb->input['filter']['mod_username'];
$filter_reason = $mybb->input['filter']['reason'];


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


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





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

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

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

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

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

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

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

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

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

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

Zeile 4060Zeile 4088
	// Figure out if we need to display multiple pages.
$perpage = $mybb->settings['threadsperpage'];
if($mybb->get_input('page') != "last")

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


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


Zeile 4070Zeile 4098
	$postcount = (int)$banned_count;
$pages = $postcount / $perpage;
$pages = ceil($pages);

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





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

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

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

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

	{

	{

		$page = 1;
}


		$page = 1;
}


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

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

	{

	{

		$start = 0;
$page = 1;
}

		$start = 0;
$page = 1;
}

Zeile 4163Zeile 4191
			else if($remaining < 604800)
{
$banned_class = "low_banned";

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

			}

			}

			else
{
$banned_class = "normal_banned";
}

			else
{
$banned_class = "normal_banned";
}





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

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





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

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

	}


	}


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

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

Zeile 4187Zeile 4215
}

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

}

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

{
// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));

{
// Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key'));


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


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

	{
error_no_permission();

	{
error_no_permission();

	}

$query = $db->simple_select("banned", "*", "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'");

	}

$query = $db->simple_select("banned", "*", "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'");

Zeile 4202Zeile 4230
	if(!$ban)
{
error($lang->error_invalidban);

	if(!$ban)
{
error($lang->error_invalidban);

	}

	}


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


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

Zeile 4213Zeile 4241
	$plugins->run_hooks("modcp_liftban_start");

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

	$plugins->run_hooks("modcp_liftban_start");

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

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


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


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

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

Zeile 4231Zeile 4259

redirect("modcp.php?action=banning", $lang->redirect_banlifted);
}


redirect("modcp.php?action=banning", $lang->redirect_banlifted);
}





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

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

Zeile 4240Zeile 4268
	if($mybb->usergroup['canbanusers'] == 0)
{
error_no_permission();

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

	}

	}


// Editing an existing ban
if($mybb->get_input('uid', MyBB::INPUT_INT))


// Editing an existing ban
if($mybb->get_input('uid', MyBB::INPUT_INT))

Zeile 4253Zeile 4281
			WHERE b.uid='{$mybb->input['uid']}'
");
$user = $db->fetch_array($query);

			WHERE b.uid='{$mybb->input['uid']}'
");
$user = $db->fetch_array($query);





		$existing_ban = false;
if($user['uid'])

		$existing_ban = false;
if($user['uid'])

		{

		{

			$existing_ban = true;

			$existing_ban = true;

		}


		}


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

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

 

$errors = array();


// Creating a new ban
if(!$existing_ban)


// Creating a new ban
if(!$existing_ban)

Zeile 4725Zeile 4755
		$where = '';
if($tflist_modlog)
{

		$where = '';
if($tflist_modlog)
{

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

			$where = "WHERE (t.fid <> 0 {$tflist_modlog}) OR (l.fid <> 0)";

		}

$query = $db->query("

		}

$query = $db->query("