Vergleich usercp.php - 1.01 - 1.18

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 417Zeile 417
	else
{
$away = "no";

	else
{
$away = "no";

		$awaydate = "";

		$awaydate = "0";

		$returndate = "";
$mybb->input['awayreason'] = "";
}

		$returndate = "";
$mybb->input['awayreason'] = "";
}

Zeile 719Zeile 719
{
$plugins->run_hooks("usercp_do_options_start");


{
$plugins->run_hooks("usercp_do_options_start");


	if($mybb->input['showcodebuttons'] != 1)

	if($mybb->input['showcodebuttons'] != '1')

	{
$mybb->input['showcodebuttons'] = 0;
}

	{
$mybb->input['showcodebuttons'] = 0;
}

Zeile 816Zeile 816
	{
$mybb->input['language'] = "";
}

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

 

if($mybb->input['threadmode'] != "threaded")
{
$mybb->input['threadmode'] = "linear";
}

	$updatedoptions = array(
"allownotices" => $mybb->input['allownotices'],
"hideemail" => $mybb->input['hideemail'],

	$updatedoptions = array(
"allownotices" => $mybb->input['allownotices'],
"hideemail" => $mybb->input['hideemail'],

Zeile 846Zeile 851
	if($mybb->settings['userpppoptions'])
{
$updatedoptions['ppp'] = intval($mybb->input['ppp']);

	if($mybb->settings['userpppoptions'])
{
$updatedoptions['ppp'] = intval($mybb->input['ppp']);

	}

	}

	$plugins->run_hooks("usercp_do_options_process");
$db->update_query(TABLE_PREFIX."users", $updatedoptions, "uid='".$mybb->user['uid']."'");

	$plugins->run_hooks("usercp_do_options_process");
$db->update_query(TABLE_PREFIX."users", $updatedoptions, "uid='".$mybb->user['uid']."'");

 
    // If the cookie settings are different, re-set the cookie
if($mybb->input['remember'] != $mybb->user['remember'])
{
$mybb->user['remember'] = $mybb->input['remember'];
// Unset the old one
myunsetcookie("mybbuser");
// Set the new one
if($mybb->input['remember'] == "yes")
{
mysetcookie("mybbuser", $mybb->user['uid']."_".$mybb->user['loginkey']);
}
else
{
mysetcookie("mybbuser", $mybb->user['uid']."_".$mybb->user['loginkey'], -1);
}
}

	$plugins->run_hooks("usercp_do_options_end");
redirect("usercp.php", $lang->redirect_optionsupdated);
}

	$plugins->run_hooks("usercp_do_options_end");
redirect("usercp.php", $lang->redirect_optionsupdated);
}

Zeile 866Zeile 887
	if(!$user['uid'])
{
error($lang->error_invalidpassword);

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

	}

	}

	if($mybb->input['email'] != $mybb->input['email2'])
{
error($lang->error_emailmismatch);

	if($mybb->input['email'] != $mybb->input['email2'])
{
error($lang->error_emailmismatch);

Zeile 895Zeile 916
		error($lang->error_invalidemail);
}
if(function_exists("emailChanged"))

		error($lang->error_invalidemail);
}
if(function_exists("emailChanged"))

	{
emailChanged($mybb->user['uid'], $mybb->input['email']);
}

    {
emailChanged($mybb->user['uid'], $mybb->input['email']);
}





	if(!$mybb->user['usergroup'] == "5")

    if($mybb->user['usergroup'] != "5")

	{
$activationcode = random_str();
$now = time();

	{
$activationcode = random_str();
$now = time();

Zeile 918Zeile 939
		$uid = $mybb->user['uid'];
$lang->emailsubject_changeemail = sprintf($lang->emailsubject_changeemail, $mybb->settings['bbname']);
$lang->email_changeemail = sprintf($lang->email_changeemail, $mybb->user['username'], $mybb->settings['bbname'], $mybb->user['email'], $mybb->input['email'], $mybb->settings['bburl'], $activationcode, $mybb->user['username'], $mybb->user['uid']);

		$uid = $mybb->user['uid'];
$lang->emailsubject_changeemail = sprintf($lang->emailsubject_changeemail, $mybb->settings['bbname']);
$lang->email_changeemail = sprintf($lang->email_changeemail, $mybb->user['username'], $mybb->settings['bbname'], $mybb->user['email'], $mybb->input['email'], $mybb->settings['bburl'], $activationcode, $mybb->user['username'], $mybb->user['uid']);

		mymail($email, $lang->emailsubject_changeemail, $lang->email_changeemail);


		$email = $mybb->input['email'];
mymail($email, $lang->emailsubject_changeemail, $lang->email_changeemail);

		$plugins->run_hooks("usercp_do_email_verify");
error($lang->redirect_changeemail_activation);
}

		$plugins->run_hooks("usercp_do_email_verify");
error($lang->redirect_changeemail_activation);
}

Zeile 1035Zeile 1057
				$favorite['username'] = $favorite['threadusername'];
}
$favorite['subject'] = htmlspecialchars_uni(dobadwords($favorite['subject']));

				$favorite['username'] = $favorite['threadusername'];
}
$favorite['subject'] = htmlspecialchars_uni(dobadwords($favorite['subject']));

			if($favorite['iconpath'])
{
$icon = "<img src=\"$favorite[iconpath]\" alt=\"$favorite[iconname]\">";
}
else
{
$icon = "&nbsp;";
}
if($mybb->user['lastvisit'] == "0")

			if($favorite['iconpath'])
{
$icon = "<img src=\"$favorite[iconpath]\" alt=\"$favorite[iconname]\">";
}
else
{
$icon = "&nbsp;";
}
if($mybb->user['lastvisit'] == "0")

			{
$folder = "new";
}

			{
$folder = "new";
}

Zeile 1265Zeile 1287
	if($mybb->settings['sigimgcode'] == "yes")
{
$sigimgcode = $lang->on;

	if($mybb->settings['sigimgcode'] == "yes")
{
$sigimgcode = $lang->on;

	}
else
{

	}
else
{

		$sigimgcode = $lang->off;
}
$lang->edit_sig_note2 = sprintf($lang->edit_sig_note2, $sigsmilies, $sigmycode, $sigimgcode, $sightml, $mybb->settings['siglength']);

		$sigimgcode = $lang->off;
}
$lang->edit_sig_note2 = sprintf($lang->edit_sig_note2, $sigsmilies, $sigmycode, $sigimgcode, $sightml, $mybb->settings['siglength']);

 
	$sig = htmlspecialchars_uni($sig);

	eval("\$editsig = \"".$templates->get("usercp_editsig")."\";");
$plugins->run_hooks("usercp_endsig_end");
outputpage($editsig);

	eval("\$editsig = \"".$templates->get("usercp_editsig")."\";");
$plugins->run_hooks("usercp_endsig_end");
outputpage($editsig);

Zeile 1306Zeile 1329
	$gallerylist['default'] = $lang->default_gallery;
$avatardir = @opendir($mybb->settings['avatardir']);
while($dir = @readdir($avatardir))

	$gallerylist['default'] = $lang->default_gallery;
$avatardir = @opendir($mybb->settings['avatardir']);
while($dir = @readdir($avatardir))

	{

	{

		if(is_dir($mybb->settings['avatardir']."/$dir") && substr($dir, 0, 1) != ".")
{
$gallerylist[$dir] = str_replace("_", " ", $dir);

		if(is_dir($mybb->settings['avatardir']."/$dir") && substr($dir, 0, 1) != ".")
{
$gallerylist[$dir] = str_replace("_", " ", $dir);

Zeile 1328Zeile 1351
	}

// Check to see if we're in a gallery or not

	}

// Check to see if we're in a gallery or not

	if($mybb->input['gallery'])

	if($activegallery)

	{

	{

		$gallery = $mybb->input['gallery'];

		$gallery = str_replace("..", "", $mybb->input['gallery']);

		$lang->avatars_in_gallery = sprintf($lang->avatars_in_gallery, $friendlyname);
// Get a listing of avatars in this gallery
$avatardir = $mybb->settings['avatardir'];

		$lang->avatars_in_gallery = sprintf($lang->avatars_in_gallery, $friendlyname);
// Get a listing of avatars in this gallery
$avatardir = $mybb->settings['avatardir'];

Zeile 1350Zeile 1373
		@closedir($opendir);

if(is_array($avatars))

		@closedir($opendir);

if(is_array($avatars))

		{

		{

			natcasesort($avatars);
reset($avatars);
$count = 0;

			natcasesort($avatars);
reset($avatars);
$count = 0;

Zeile 1378Zeile 1401
				{
eval("\$avatarlist .= \"".$templates->get("usercp_avatar_gallery_blankblock")."\";");
}

				{
eval("\$avatarlist .= \"".$templates->get("usercp_avatar_gallery_blankblock")."\";");
}

			}
}
else
{

			}
}
else
{

			eval("\$avatarlist = \"".$templates->get("usercp_avatar_gallery_noavatars")."\";");
}
eval("\$gallery = \"".$templates->get("usercp_avatar_gallery")."\";");

			eval("\$avatarlist = \"".$templates->get("usercp_avatar_gallery_noavatars")."\";");
}
eval("\$gallery = \"".$templates->get("usercp_avatar_gallery")."\";");

Zeile 1409Zeile 1432
		{
eval("\$currentavatar = \"".$templates->get("usercp_avatar_current")."\";");
$colspan = 1;

		{
eval("\$currentavatar = \"".$templates->get("usercp_avatar_current")."\";");
$colspan = 1;

		}

		}

		else

		else

		{

		{

			$colspan = 2;

			$colspan = 2;

		}

		}

		if($mybb->settings['maxavatardims'] != "")

		if($mybb->settings['maxavatardims'] != "")

		{

		{

			list($maxwidth, $maxheight) = explode("x", $mybb->settings['maxavatardims']);
$lang->avatar_note .= "<br />".sprintf($lang->avatar_note_dimensions, $maxwidth, $maxheight);
}

			list($maxwidth, $maxheight) = explode("x", $mybb->settings['maxavatardims']);
$lang->avatar_note .= "<br />".sprintf($lang->avatar_note_dimensions, $maxwidth, $maxheight);
}

Zeile 1423Zeile 1446
		{
$maxsize = getfriendlysize($mybb->settings['avatarsize']*1024);
$lang->avatar_note .= "<br />".sprintf($lang->avatar_note_size, $maxsize);

		{
$maxsize = getfriendlysize($mybb->settings['avatarsize']*1024);
$lang->avatar_note .= "<br />".sprintf($lang->avatar_note_size, $maxsize);

		}

		}

		eval("\$avatar = \"".$templates->get("usercp_avatar")."\";");
$plugins->run_hooks("usercp_avatar_end");
outputpage($avatar);

		eval("\$avatar = \"".$templates->get("usercp_avatar")."\";");
$plugins->run_hooks("usercp_avatar_end");
outputpage($avatar);

Zeile 1437Zeile 1460
	if($mybb->input['removeavatar'])
{
$db->query("UPDATE ".TABLE_PREFIX."users SET avatar='', avatartype='' WHERE uid='".$mybb->user['uid']."'");

	if($mybb->input['removeavatar'])
{
$db->query("UPDATE ".TABLE_PREFIX."users SET avatar='', avatartype='' WHERE uid='".$mybb->user['uid']."'");

		remove_avatars($mybb->user['uid']);

		remove_avatars($mybb->user['uid']);

	}
elseif($mybb->input['gallery']) // Gallery avatar
{

	}
elseif($mybb->input['gallery']) // Gallery avatar
{

Zeile 1465Zeile 1488
		if($avatar['error'])
{
error($avatar['error']);

		if($avatar['error'])
{
error($avatar['error']);

		}

		}

		$db->query("UPDATE ".TABLE_PREFIX."users SET avatar='".$avatar['avatar']."', avatartype='upload' WHERE uid='".$mybb->user['uid']."'");
}
else

		$db->query("UPDATE ".TABLE_PREFIX."users SET avatar='".$avatar['avatar']."', avatartype='upload' WHERE uid='".$mybb->user['uid']."'");
}
else

Zeile 1473Zeile 1496
		$mybb->input['avatarurl'] = preg_replace("#script:#i", "", $mybb->input['avatarurl']);
$mybb->input['avatarurl'] = htmlspecialchars($mybb->input['avatarurl']);
$ext = getextention($mybb->input['avatarurl']);

		$mybb->input['avatarurl'] = preg_replace("#script:#i", "", $mybb->input['avatarurl']);
$mybb->input['avatarurl'] = htmlspecialchars($mybb->input['avatarurl']);
$ext = getextention($mybb->input['avatarurl']);

		if(preg_match("#gif|jpg|jpeg|jpe|bmp|png#i", $ext) && $mybb->settings['maxavatardims'] != "")








		list($width, $height, $type) = @getimagesize($mybb->input['avatarurl']);

if(!$type)
{
error($lang->error_invalidavatarurl);
}

if($width && $height && $mybb->settings['maxavatardims'] != "")

		{

		{

			list($width, $height) = @getimagesize($mybb->input['avatarurl']);

 
			list($maxwidth, $maxheight) = explode("x", $mybb->settings['maxavatardims']);
if(($maxwidth && $width > $maxwidth) || ($maxheight && $height > $maxheight))
{

			list($maxwidth, $maxheight) = explode("x", $mybb->settings['maxavatardims']);
if(($maxwidth && $width > $maxwidth) || ($maxheight && $height > $maxheight))
{

Zeile 1492Zeile 1521
elseif($mybb->input['action'] == "notepad")
{
$plugins->run_hooks("usercp_notepad_start");

elseif($mybb->input['action'] == "notepad")
{
$plugins->run_hooks("usercp_notepad_start");

 
	$mybbuser['notepad'] = htmlspecialchars($mybbuser['notepad']);

	eval("\$notepad = \"".$templates->get("usercp_notepad")."\";");
$plugins->run_hooks("usercp_notepad_end");
outputpage($notepad);

	eval("\$notepad = \"".$templates->get("usercp_notepad")."\";");
$plugins->run_hooks("usercp_notepad_end");
outputpage($notepad);

}

}

elseif($mybb->input['action'] == "do_notepad")
{
$plugins->run_hooks("usercp_do_notepad_start");

elseif($mybb->input['action'] == "do_notepad")
{
$plugins->run_hooks("usercp_do_notepad_start");

Zeile 1716Zeile 1746
	// Joining a group
if($mybb->input['joingroup'])
{

	// Joining a group
if($mybb->input['joingroup'])
{

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

		$query = $db->query("SELECT * FROM ".TABLE_PREFIX."usergroups WHERE gid='".intval($mybb->input['joingroup'])."'");
$usergroup = $db->fetch_array($query);


		$query = $db->query("SELECT * FROM ".TABLE_PREFIX."usergroups WHERE gid='".intval($mybb->input['joingroup'])."'");
$usergroup = $db->fetch_array($query);


		if($usergroup['type'] != 4 && $usergroup['type'] != 3)

		if(($usergroup['type'] != 4 && $usergroup['type'] != 3) || !$usergroup['gid'])

		{
error($lang->cannot_join_group);
}

		{
error($lang->cannot_join_group);
}