Vergleich usercp.php - 1.00 - 1.16

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html
*

 * $Id$

 * $Id: usercp.php 924 2005-12-05 12:25:54Z chris $

 */
define("KILL_GLOBALS", 1);


 */
define("KILL_GLOBALS", 1);


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 1056Zeile 1078
				}
}
if($favorite['replies'] >= $mybb->settings['hottopic'])

				}
}
if($favorite['replies'] >= $mybb->settings['hottopic'])

			{
$folder .= "hot";
}

			{
$folder .= "hot";
}

			if($favorite['closed'] == "yes")
{
$folder .= "lock";

			if($favorite['closed'] == "yes")
{
$folder .= "lock";

Zeile 1067Zeile 1089
			$favorite['replies'] = mynumberformat($favorite['replies']);
$favorite['views'] = mynumberformat($favorite['views']);
eval("\$threads .= \"".$templates->get("usercp_favorites_thread")."\";");

			$favorite['replies'] = mynumberformat($favorite['replies']);
$favorite['views'] = mynumberformat($favorite['views']);
eval("\$threads .= \"".$templates->get("usercp_favorites_thread")."\";");

			$folder = "";
}
}
if(!$threads)
{
eval("\$threads = \"".$templates->get("usercp_favorites_none")."\";");

			$folder = "";
}
}
if(!$threads)
{
eval("\$threads = \"".$templates->get("usercp_favorites_none")."\";");

	}
eval("\$favorites = \"".$templates->get("usercp_favorites")."\";");
$plugins->run_hooks("usercp_favorites_end");

	}
eval("\$favorites = \"".$templates->get("usercp_favorites")."\";");
$plugins->run_hooks("usercp_favorites_end");

Zeile 1100Zeile 1122
	$lower = $start+1;
$upper = $end;
if($upper > $threadcount)

	$lower = $start+1;
$upper = $end;
if($upper > $threadcount)

	{

	{

		$upper = $threadcount;
}
$multipage = multipage($threadcount, $perpage, $page, "usercp.php?action=subscriptions");

		$upper = $threadcount;
}
$multipage = multipage($threadcount, $perpage, $page, "usercp.php?action=subscriptions");

Zeile 1156Zeile 1178
		}
}
if(!$threads)

		}
}
if(!$threads)

	{

	{

		eval("\$threads = \"".$templates->get("usercp_subscriptions_none")."\";");
}
eval("\$subscriptions = \"".$templates->get("usercp_subscriptions")."\";");

		eval("\$threads = \"".$templates->get("usercp_subscriptions_none")."\";");
}
eval("\$subscriptions = \"".$templates->get("usercp_subscriptions")."\";");

Zeile 1271Zeile 1293
		$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 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("\$avatarlist = \"".$templates->get("usercp_avatar_gallery_noavatars")."\";");
}

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