Vergleich usercp.php - 1.8.27 - 1.8.33

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 51Zeile 51

usercp_menu();



usercp_menu();


$server_http_referer = htmlentities($_SERVER['HTTP_REFERER']);

if(my_strpos($server_http_referer, $mybb->settings['bburl'].'/') !== 0)

$server_http_referer = '';
if(isset($_SERVER['HTTP_REFERER']))


{

{

	if(my_strpos($server_http_referer, '/') === 0)



	$server_http_referer = htmlentities($_SERVER['HTTP_REFERER']);

if(my_strpos($server_http_referer, $mybb->settings['bburl'].'/') !== 0)

	{

	{

		$server_http_referer = my_substr($server_http_referer, 1);






		if(my_strpos($server_http_referer, '/') === 0)
{
$server_http_referer = my_substr($server_http_referer, 1);
}
$url_segments = explode('/', $server_http_referer);
$server_http_referer = $mybb->settings['bburl'].'/'.end($url_segments);

	}

	}

	$url_segments = explode('/', $server_http_referer);
$server_http_referer = $mybb->settings['bburl'].'/'.end($url_segments);

 
}

$plugins->run_hooks("usercp_start");

}

$plugins->run_hooks("usercp_start");

Zeile 77Zeile 81
	$userhandler->set_data($data);

if(!$userhandler->verify_signature())

	$userhandler->set_data($data);

if(!$userhandler->verify_signature())

	{

	{

		$error = inline_error($userhandler->get_friendly_errors());
}


		$error = inline_error($userhandler->get_friendly_errors());
}


Zeile 111Zeile 115
	case "changename":
case "do_changename":
add_breadcrumb($lang->nav_changename);

	case "changename":
case "do_changename":
add_breadcrumb($lang->nav_changename);

		break;

		break;

	case "subscriptions":
add_breadcrumb($lang->ucp_nav_subscribed_threads);
break;

	case "subscriptions":
add_breadcrumb($lang->ucp_nav_subscribed_threads);
break;

Zeile 276Zeile 280
	$userhandler->set_data($user);

if(!$userhandler->validate_user())

	$userhandler->set_data($user);

if(!$userhandler->validate_user())

	{

	{

		$errors = $userhandler->get_friendly_errors();
$raw_errors = $userhandler->get_errors();


		$errors = $userhandler->get_friendly_errors();
$raw_errors = $userhandler->get_errors();


Zeile 386Zeile 390
	}

if($errors)

	}

if($errors)

	{

	{

		$user['skype'] = htmlspecialchars_uni($user['skype']);
$user['google'] = htmlspecialchars_uni($user['google']);
}

		$user['skype'] = htmlspecialchars_uni($user['skype']);
$user['google'] = htmlspecialchars_uni($user['google']);
}

Zeile 400Zeile 404
		$contact_fields[$cfield] = '';
$csetting = 'allow'.$cfield.'field';
if($mybb->settings[$csetting] == '')

		$contact_fields[$cfield] = '';
$csetting = 'allow'.$cfield.'field';
if($mybb->settings[$csetting] == '')

		{

		{

			continue;
}


			continue;
}


Zeile 414Zeile 418
		$lang_string = 'contact_field_'.$cfield;
$lang_string = $lang->{$lang_string};
$cfvalue = htmlspecialchars_uni($user[$cfield]);

		$lang_string = 'contact_field_'.$cfield;
$lang_string = $lang->{$lang_string};
$cfvalue = htmlspecialchars_uni($user[$cfield]);





		eval('$contact_fields[$cfield] = "'.$templates->get('usercp_profile_contact_fields_field').'";');
}


		eval('$contact_fields[$cfield] = "'.$templates->get('usercp_profile_contact_fields_field').'";');
}


Zeile 441Zeile 445
			$returndate[1] = $mybb->get_input('awaymonth', MyBB::INPUT_INT);
$returndate[2] = $mybb->get_input('awayyear', MyBB::INPUT_INT);
$user['awayreason'] = htmlspecialchars_uni($mybb->get_input('awayreason'));

			$returndate[1] = $mybb->get_input('awaymonth', MyBB::INPUT_INT);
$returndate[2] = $mybb->get_input('awayyear', MyBB::INPUT_INT);
$user['awayreason'] = htmlspecialchars_uni($mybb->get_input('awayreason'));

		}

		}

		else
{
$user['awayreason'] = htmlspecialchars_uni($user['awayreason']);

		else
{
$user['awayreason'] = htmlspecialchars_uni($user['awayreason']);

Zeile 455Zeile 459
			{
$awaynotice = $lang->away_notice;
$awaycheck[0] = "checked=\"checked\"";

			{
$awaynotice = $lang->away_notice;
$awaycheck[0] = "checked=\"checked\"";

			}

			}

			$returndate = explode("-", $mybb->user['returndate']);
if(!isset($returndate[1]))
{
$returndate[1] = 0;
}
if(!isset($returndate[2]))

			$returndate = explode("-", $mybb->user['returndate']);
if(!isset($returndate[1]))
{
$returndate[1] = 0;
}
if(!isset($returndate[2]))

			{

			{

				$returndate[2] = '';
}
}

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

				$returndate[2] = '';
}
}

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

		{

		{

			if($returndate[0] == $day)
{
$selected = "selected=\"selected\"";

			if($returndate[0] == $day)
{
$selected = "selected=\"selected\"";

Zeile 497Zeile 501
	$requiredfields = $customfields = '';
$mybb->input['profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);


	$requiredfields = $customfields = '';
$mybb->input['profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);


	$pfcache = $cache->read('profilefields');


	$pfcache = $cache->read('profilefields');


	if(is_array($pfcache))
{
foreach($pfcache as $profilefield)

	if(is_array($pfcache))
{
foreach($pfcache as $profilefield)

Zeile 508Zeile 512
				continue;
}


				continue;
}


 
			$userfield = $code = $select = $val = $options = $expoptions = $useropts = '';
$seloptions = array();

			$profilefield['type'] = htmlspecialchars_uni($profilefield['type']);
$profilefield['name'] = htmlspecialchars_uni($profilefield['name']);
$profilefield['description'] = htmlspecialchars_uni($profilefield['description']);

			$profilefield['type'] = htmlspecialchars_uni($profilefield['type']);
$profilefield['name'] = htmlspecialchars_uni($profilefield['name']);
$profilefield['description'] = htmlspecialchars_uni($profilefield['description']);

Zeile 522Zeile 528
				$options = array();
}
$field = "fid{$profilefield['fid']}";

				$options = array();
}
$field = "fid{$profilefield['fid']}";

			$select = '';

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

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

Zeile 536Zeile 541
				$userfield = $user[$field];
}
if($type == "multiselect")

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

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

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

				}
if(is_array($useropts))

				}
if(is_array($useropts))

				{

				{

					foreach($useropts as $key => $val)

					foreach($useropts as $key => $val)

					{

					{

						$val = htmlspecialchars_uni($val);

						$val = htmlspecialchars_uni($val);

						$seloptions[$val] = $val;
}
}
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{
$val = trim($val);
$val = str_replace("\n", "\\n", $val);

$sel = "";
if(isset($seloptions[$val]) && $val == $seloptions[$val])
{
$sel = " selected=\"selected\"";
}


						$seloptions[$val] = $val;
}
}
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{
$val = trim($val);
$val = str_replace("\n", "\\n", $val);

$sel = "";
if(isset($seloptions[$val]) && $val == $seloptions[$val])
{
$sel = " selected=\"selected\"";
}


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

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

Zeile 587Zeile 592
						$val = trim($val);
$val = str_replace("\n", "\\n", $val);
$sel = "";

						$val = trim($val);
$val = str_replace("\n", "\\n", $val);
$sel = "";

						if($val == htmlspecialchars_uni($userfield))
{

						if($val == htmlspecialchars_uni($userfield))
{

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


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


Zeile 634Zeile 639
				if(is_array($useropts))
{
foreach($useropts as $key => $val)

				if(is_array($useropts))
{
foreach($useropts as $key => $val)

					{

					{

						$seloptions[$val] = $val;

						$seloptions[$val] = $val;

					}
}

					}
}

				$expoptions = explode("\n", $options);
if(is_array($expoptions))
{

				$expoptions = explode("\n", $options);
if(is_array($expoptions))
{

Zeile 657Zeile 662
			{
$value = htmlspecialchars_uni($userfield);
eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";");

			{
$value = htmlspecialchars_uni($userfield);
eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";");

			}

			}

			else
{
$value = htmlspecialchars_uni($userfield);

			else
{
$value = htmlspecialchars_uni($userfield);

Zeile 666Zeile 671
				{
$maxlength = " maxlength=\"{$profilefield['maxlength']}\"";
}

				{
$maxlength = " maxlength=\"{$profilefield['maxlength']}\"";
}





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

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

			}

			}


if($profilefield['required'] == 1)


if($profilefield['required'] == 1)

			{

			{

				eval("\$requiredfields .= \"".$templates->get("usercp_profile_customfield")."\";");
}
else

				eval("\$requiredfields .= \"".$templates->get("usercp_profile_customfield")."\";");
}
else

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

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

			$code = "";
$select = "";
$val = "";
$options = "";
$expoptions = "";
$useropts = "";
$seloptions = array();

 
		}
}
if($customfields)

		}
}
if($customfields)

Zeile 1820Zeile 1818
			}

$thread['replies'] = my_number_format($thread['replies']);

			}

$thread['replies'] = my_number_format($thread['replies']);

			$thread['views'] = my_number_format($thread['views']);


			$thread['views'] = my_number_format($thread['views']);


			// What kind of notification type do we have here?
switch($thread['notification'])
{

			// What kind of notification type do we have here?
switch($thread['notification'])
{

Zeile 2699Zeile 2697
	if($mybb->settings['allowremoteavatars'] == 1)
{
eval("\$avatar_remote = \"".$templates->get("usercp_avatar_remote")."\";");

	if($mybb->settings['allowremoteavatars'] == 1)
{
eval("\$avatar_remote = \"".$templates->get("usercp_avatar_remote")."\";");

	}


	}


	$removeavatar = '';
if(!empty($mybb->user['avatar']))
{

	$removeavatar = '';
if(!empty($mybb->user['avatar']))
{

Zeile 3580Zeile 3578
	if($mybb->get_input('leavegroup', MyBB::INPUT_INT))
{
// Verify incoming POST request

	if($mybb->get_input('leavegroup', MyBB::INPUT_INT))
{
// Verify incoming POST request

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

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


if(my_strpos($ingroups, ",".$mybb->get_input('leavegroup', MyBB::INPUT_INT).",") === false)
{


if(my_strpos($ingroups, ",".$mybb->get_input('leavegroup', MyBB::INPUT_INT).",") === false)
{

Zeile 4367Zeile 4365
			LIMIT 0, 10
");


			LIMIT 0, 10
");


 
		$subscriptions = array();

		$fpermissions = forum_permissions();

while($subscription = $db->fetch_array($query))
{
$forumpermissions = $fpermissions[$subscription['fid']];


		$fpermissions = forum_permissions();

while($subscription = $db->fetch_array($query))
{
$forumpermissions = $fpermissions[$subscription['fid']];


			if($forumpermissions['canonlyviewownthreads'] == 0 || $subscription['uid'] == $mybb->user['uid'])

			if(!isset($forumpermissions['canonlyviewownthreads']) || $forumpermissions['canonlyviewownthreads'] == 0 || $subscription['uid'] == $mybb->user['uid'])

			{
$subscriptions[$subscription['tid']] = $subscription;
}
}


			{
$subscriptions[$subscription['tid']] = $subscription;
}
}


		if(is_array($subscriptions))

		if($subscriptions)

		{
$tids = implode(",", array_keys($subscriptions));


		{
$tids = implode(",", array_keys($subscriptions));


Zeile 4422Zeile 4421
					$folder_label = '';
$gotounread = '';


					$folder_label = '';
$gotounread = '';


					if($thread['tid'])

					if(!empty($thread['tid']))

					{
$bgcolor = alt_trow();
$thread['subject'] = $parser->parse_badwords($thread['subject']);

					{
$bgcolor = alt_trow();
$thread['subject'] = $parser->parse_badwords($thread['subject']);

Zeile 4679Zeile 4678
				}

// Folder Icons

				}

// Folder Icons

				if($thread['doticon'])

				if(!empty($thread['doticon']))

				{
$folder = "dot_";
$folder_label .= $lang->icon_dot;

				{
$folder = "dot_";
$folder_label .= $lang->icon_dot;