Vergleich modcp.php - 1.8.15 - 1.8.26

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
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'),
"signature" => $mybb->get_input('signature'),

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

Zeile 2616Zeile 2616

// 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 2665
		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 2688Zeile 2688
					$string = $option['action']."_error";
$errors[] = $lang->$string;
}

					$string = $option['action']."_error";
$errors[] = $lang->$string;
}


if(!is_array($errors))

				else


				{
$suspend_length = fetch_time_length((int)$mybb->input[$option['time']], $mybb->input[$option['period']]);


				{
$suspend_length = fetch_time_length((int)$mybb->input[$option['time']], $mybb->input[$option['period']]);


Zeile 2731Zeile 2730
			$errors[] = $lang->suspendmoderate_error;
}


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


		if(is_array($errors))

		if(is_array($errors) && !empty($errors))

		{
$mybb->input['action'] = "editprofile";
}

		{
$mybb->input['action'] = "editprofile";
}

Zeile 2775Zeile 2774
		error_no_permission();
}


		error_no_permission();
}


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

















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

	{
$user['website'] = '';
}

Zeile 2783Zeile 2798
	if($user['icq'] != "0")
{
$user['icq'] = (int)$user['icq'];

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

	}


	}


	if(!$errors)
{
$mybb->input = array_merge($user, $mybb->input);

	if(!$errors)
{
$mybb->input = array_merge($user, $mybb->input);

Zeile 2800Zeile 2815
		list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = $birthday;
}
else

		list($mybb->input['birthday_day'], $mybb->input['birthday_month'], $mybb->input['birthday_year']) = $birthday;
}
else

	{

	{

		$errors = inline_error($errors);
}


		$errors = inline_error($errors);
}


	// Sanitize all input
foreach(array('usertitle', 'website', 'icq', 'aim', 'yahoo', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $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'])

	// Sanitize all input
foreach(array('usertitle', 'website', 'icq', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field)







	{

	{

		$user['displaygroup'] = $user['usergroup'];

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

	}


	}


	$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 2836Zeile 2843
				break;
}
}

				break;
}
}

	}


	}


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

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

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

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

	}

	}


$bdaydaysel = $selected = '';
for($day = 1; $day <= 31; ++$day)


$bdaydaysel = $selected = '';
for($day = 1; $day <= 31; ++$day)

	{

	{

		if($mybb->input['birthday_day'] == $day)
{
$selected = "selected=\"selected\"";

		if($mybb->input['birthday_day'] == $day)
{
$selected = "selected=\"selected\"";

Zeile 2871Zeile 2878
	{
$awaycheck = array('', '');
if($errors)

	{
$awaycheck = array('', '');
if($errors)

		{

		{

			if($user['away'] == 1)
{
$awaycheck[1] = "checked=\"checked\"";

			if($user['away'] == 1)
{
$awaycheck[1] = "checked=\"checked\"";

Zeile 2925Zeile 2932
		if(isset($returndate[1]))
{
$returndatemonthsel[$returndate[1]] = " selected=\"selected\"";

		if(isset($returndate[1]))
{
$returndatemonthsel[$returndate[1]] = " selected=\"selected\"";

		}


		}


		if(!isset($returndate[2]))
{
$returndate[2] = '';

		if(!isset($returndate[2]))
{
$returndate[2] = '';

Zeile 2975Zeile 2982
				$userfield = $user_fields[$field];
}
if($type == "multiselect")

				$userfield = $user_fields[$field];
}
if($type == "multiselect")

			{
if($errors)
{
$useropts = $userfield;
}
else
{

			{
if($errors)
{
$useropts = $userfield;
}
else
{

					$useropts = explode("\n", $userfield);
}
if(is_array($useropts))
{
foreach($useropts as $key => $val)

					$useropts = explode("\n", $userfield);
}
if(is_array($useropts))
{
foreach($useropts as $key => $val)

					{

					{

						$seloptions[$val] = $val;
}
}

						$seloptions[$val] = $val;
}
}

Zeile 3001Zeile 3008

$sel = "";
if(isset($seloptions[$val]) && $val == $seloptions[$val])


$sel = "";
if(isset($seloptions[$val]) && $val == $seloptions[$val])

						{
$sel = " selected=\"selected\"";
}

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

						{
$sel = " selected=\"selected\"";
}

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

						$profilefield['length'] = 3;
}


						$profilefield['length'] = 3;
}


Zeile 3034Zeile 3041
					}
if(!$profilefield['length'])
{

					}
if(!$profilefield['length'])
{

						$profilefield['length'] = 1;
}

						$profilefield['length'] = 1;
}


eval("\$code = \"".$templates->get("usercp_profile_profilefields_select")."\";");


eval("\$code = \"".$templates->get("usercp_profile_profilefields_select")."\";");

				}
}

				}
}

			elseif($type == "radio")
{
$expoptions = explode("\n", $options);

			elseif($type == "radio")
{
$expoptions = explode("\n", $options);

Zeile 3062Zeile 3069
				if($errors)
{
$useropts = $userfield;

				if($errors)
{
$useropts = $userfield;

				}

				}

				else
{
$useropts = explode("\n", $userfield);

				else
{
$useropts = explode("\n", $userfield);

Zeile 3115Zeile 3122
				eval("\$customfields .= \"".$templates->get("usercp_profile_customfield")."\";");
}
$altbg = alt_trow();

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

		}

		}

	}
if($customfields)
{

	}
if($customfields)
{

Zeile 3199Zeile 3206

$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 3220Zeile 3228
			}

switch($option['option'])

			}

switch($option['option'])

			{

			{

				case "suspendsignature":
eval("\$suspendsignature_info = \"".$templates->get("modcp_editprofile_suspensions_info")."\";");
break;

				case "suspendsignature":
eval("\$suspendsignature_info = \"".$templates->get("modcp_editprofile_suspensions_info")."\";");
break;

Zeile 3230Zeile 3238
				case "suspendposting":
eval("\$suspendposting_info = \"".$templates->get("modcp_editprofile_suspensions_info")."\";");
break;

				case "suspendposting":
eval("\$suspendposting_info = \"".$templates->get("modcp_editprofile_suspensions_info")."\";");
break;

			}

			}

		}

// Generate the boxes for this option

		}

// Generate the boxes for this option

Zeile 3246Zeile 3254
			{
$selected = '';
}

			{
$selected = '';
}





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


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


Zeile 3263Zeile 3271
				eval("\$suspost_options = \"".$templates->get("modcp_editprofile_select")."\";");
break;
}

				eval("\$suspost_options = \"".$templates->get("modcp_editprofile_select")."\";");
break;
}

	}

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


	}

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


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

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

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

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

 

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


$plugins->run_hooks("modcp_editprofile_end");



$plugins->run_hooks("modcp_editprofile_end");


Zeile 3420Zeile 3434

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

Zeile 3501Zeile 3516
	if(!isset($mybb->input['filter']['sortby']))
{
$mybb->input['filter']['sortby'] = '';

	if(!isset($mybb->input['filter']['sortby']))
{
$mybb->input['filter']['sortby'] = '';

	}

	}

	switch($mybb->input['filter']['sortby'])
{
case "username":

	switch($mybb->input['filter']['sortby'])
{
case "username":

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

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

	}


	}


	$plugins->run_hooks("modcp_warninglogs_start");

// Pagination stuff

	$plugins->run_hooks("modcp_warninglogs_start");

// Pagination stuff

Zeile 3551Zeile 3566
	$total_warnings = $db->fetch_field($query, 'count');
$page = $mybb->get_input('page', MyBB::INPUT_INT);
if($page <= 0)

	$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 = 20;
if(isset($mybb->input['filter']['per_page']) && (int)$mybb->input['filter']['per_page'] > 0)

	{

	{

		$per_page = (int)$mybb->input['filter']['per_page'];

		$per_page = (int)$mybb->input['filter']['per_page'];

	}

	}

	$start = ($page-1) * $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 3568Zeile 3589
		{
$value = urlencode($value);
$url .= "&amp;filter[{$field}]={$value}";

		{
$value = urlencode($value);
$url .= "&amp;filter[{$field}]={$value}";

		}

		}

	}
$multipage = multipage($total_warnings, $per_page, $page, $url);


	}
$multipage = multipage($total_warnings, $per_page, $page, $url);


Zeile 3636Zeile 3657
	}

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

Zeile 4217Zeile 4242

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


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

		'additionalgroups' => $ban['oldadditionalgroups'],

		'additionalgroups' => $db->escape_string($ban['oldadditionalgroups']),

		'displaygroup' => $ban['olddisplaygroup']
);
$db->update_query("users", $updated_group, "uid='{$ban['uid']}'");
$db->delete_query("banned", "uid='{$ban['uid']}'");


		'displaygroup' => $ban['olddisplaygroup']
);
$db->update_query("users", $updated_group, "uid='{$ban['uid']}'");
$db->delete_query("banned", "uid='{$ban['uid']}'");


	$cache->update_banned();

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


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


Zeile 4360Zeile 4384
				'uid' => $user['uid'],
'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT),
'oldgroup' => (int)$user['usergroup'],

				'uid' => $user['uid'],
'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT),
'oldgroup' => (int)$user['usergroup'],

				'oldadditionalgroups' => (string)$user['additionalgroups'],

				'oldadditionalgroups' => $db->escape_string($user['additionalgroups']),

				'olddisplaygroup' => (int)$user['displaygroup'],
'admin' => (int)$mybb->user['uid'],
'dateline' => TIME_NOW,

				'olddisplaygroup' => (int)$user['displaygroup'],
'admin' => (int)$mybb->user['uid'],
'dateline' => TIME_NOW,

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

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


$cache->update_banned();

 

// Log edit or add ban
if($existing_ban)


// Log edit or add ban
if($existing_ban)