Vergleich usercp.php - 1.03 - 1.16

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
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 854Zeile 854
	}
$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 900Zeile 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 923Zeile 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 953Zeile 970
		error($lang->error_invalidnewpassword);
}
if($mybb->input['password'] != $mybb->input['password2'])

		error($lang->error_invalidnewpassword);
}
if($mybb->input['password'] != $mybb->input['password2'])

	{

	{

		error($lang->error_passwordmismatch);
}
$plugins->run_hooks("usercp_do_password_process");

		error($lang->error_passwordmismatch);
}
$plugins->run_hooks("usercp_do_password_process");

Zeile 966Zeile 983
elseif($mybb->input['action'] == "changename")
{
$plugins->run_hooks("usercp_changename_start");

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

	if($mybb->usergroup['canchangename'] != "yes")
{

	if($mybb->usergroup['canchangename'] != "yes")
{

		nopermission();
}
eval("\$changename = \"".$templates->get("usercp_changename")."\";");

		nopermission();
}
eval("\$changename = \"".$templates->get("usercp_changename")."\";");

Zeile 978Zeile 995
{
$plugins->run_hooks("usercp_do_changename_start");
if($mybb->usergroup['canchangename'] != "yes")

{
$plugins->run_hooks("usercp_do_changename_start");
if($mybb->usergroup['canchangename'] != "yes")

	{

	{

		nopermission();
}
if(!trim($mybb->input['username']) || eregi("<|>|&", $mybb->input['username']))

		nopermission();
}
if(!trim($mybb->input['username']) || eregi("<|>|&", $mybb->input['username']))

Zeile 1003Zeile 1020
	$plugins->run_hooks("usercp_favorites_start");
// Do Multi Pages
$query = $db->query("SELECT COUNT(f.tid) AS threads FROM ".TABLE_PREFIX."favorites f WHERE f.type='f' AND f.uid='".$mybb->user['uid']."'");

	$plugins->run_hooks("usercp_favorites_start");
// Do Multi Pages
$query = $db->query("SELECT COUNT(f.tid) AS threads FROM ".TABLE_PREFIX."favorites f WHERE f.type='f' AND f.uid='".$mybb->user['uid']."'");

	$threadcount = $db->result($query, 0);

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

	$threadcount = $db->result($query, 0);

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

	$page = intval($mybb->input['page']);
if($page)
{

	$page = intval($mybb->input['page']);
if($page)
{

Zeile 1276Zeile 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 1313Zeile 1331
	while($dir = @readdir($avatardir))
{
if(is_dir($mybb->settings['avatardir']."/$dir") && substr($dir, 0, 1) != ".")

	while($dir = @readdir($avatardir))
{
if(is_dir($mybb->settings['avatardir']."/$dir") && substr($dir, 0, 1) != ".")

		{

		{

			$gallerylist[$dir] = str_replace("_", " ", $dir);
}
}

			$gallerylist[$dir] = str_replace("_", " ", $dir);
}
}

Zeile 1350Zeile 1368
			if(is_file($avatarpath) && preg_match("#\.(jpg|jpeg|gif|bmp|png)$#i", $avatar))
{
$avatars[] = $avatar;

			if(is_file($avatarpath) && preg_match("#\.(jpg|jpeg|gif|bmp|png)$#i", $avatar))
{
$avatars[] = $avatar;

			}

			}

		}
@closedir($opendir);


		}
@closedir($opendir);


Zeile 1376Zeile 1394
				}
$count++;
eval("\$avatarlist .= \"".$templates->get("usercp_avatar_gallery_avatar")."\";");

				}
$count++;
eval("\$avatarlist .= \"".$templates->get("usercp_avatar_gallery_avatar")."\";");

			}

			}

			if($count != 0)
{
for($i=$count;$i<=5;$i++)

			if($count != 0)
{
for($i=$count;$i<=5;$i++)

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

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

		}

		}

		else
{
eval("\$avatarlist = \"".$templates->get("usercp_avatar_gallery_noavatars")."\";");

		else
{
eval("\$avatarlist = \"".$templates->get("usercp_avatar_gallery_noavatars")."\";");

		}

		}

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

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

Zeile 1397Zeile 1415
	else
{
if($mybb->user['avatartype'] == "upload" || stristr($mybb->user['avatar'], $mybb->settings['avataruploadpath']))

	else
{
if($mybb->user['avatartype'] == "upload" || stristr($mybb->user['avatar'], $mybb->settings['avataruploadpath']))

		{

		{

			$avatarmsg = "<br /><strong>".$lang->already_uploaded_avatar."</strong>";
}
elseif($mybb->user['avatartype'] == "gallery" || stristr($mybb->user['avatar'], $mybb->settings['avatardir']))

			$avatarmsg = "<br /><strong>".$lang->already_uploaded_avatar."</strong>";
}
elseif($mybb->user['avatartype'] == "gallery" || stristr($mybb->user['avatar'], $mybb->settings['avatardir']))

		{

		{

			$avatarmsg = "<br /><strong>".$lang->using_gallery_avatar."</strong>";

			$avatarmsg = "<br /><strong>".$lang->using_gallery_avatar."</strong>";

		}

		}

		elseif($mybb->user['avatartype'] == "remote" || strstr(strtolower($mybb->user['avatar']), "http://") !== false)
{
$avatarmsg = "<br /><strong>".$lang->using_remote_avatar."</strong>";

		elseif($mybb->user['avatartype'] == "remote" || strstr(strtolower($mybb->user['avatar']), "http://") !== false)
{
$avatarmsg = "<br /><strong>".$lang->using_remote_avatar."</strong>";

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

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

		}
else
{

		}
else
{

			$colspan = 2;
}
if($mybb->settings['maxavatardims'] != "")

			$colspan = 2;
}
if($mybb->settings['maxavatardims'] != "")

Zeile 1432Zeile 1450
		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);

	}

	}


}
elseif($mybb->input['action'] == "do_avatar")


}
elseif($mybb->input['action'] == "do_avatar")

Zeile 1447Zeile 1465
	elseif($mybb->input['gallery']) // Gallery avatar
{
if($mybb->input['gallery'] == "default")

	elseif($mybb->input['gallery']) // Gallery avatar
{
if($mybb->input['gallery'] == "default")

		{

		{

			$avatarpath = addslashes($mybb->settings['avatardir']."/".$mybb->input['avatar']);

			$avatarpath = addslashes($mybb->settings['avatardir']."/".$mybb->input['avatar']);

		}

		}

		else
{
$avatarpath = addslashes($mybb->settings['avatardir']."/".$mybb->input['gallery']."/".$mybb->input['avatar']);
}
if(file_exists($avatarpath))

		else
{
$avatarpath = addslashes($mybb->settings['avatardir']."/".$mybb->input['gallery']."/".$mybb->input['avatar']);
}
if(file_exists($avatarpath))

		{

		{

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

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

Zeile 1470Zeile 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 1478Zeile 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 1623Zeile 1647
		eval("\$drafts = \"".$templates->get("usercp_drafts_none")."\";");
}
else

		eval("\$drafts = \"".$templates->get("usercp_drafts_none")."\";");
}
else

	{

	{

		eval("\$draftsubmit = \"".$templates->get("usercp_drafts_submit")."\";");
}
eval("\$draftlist = \"".$templates->get("usercp_drafts")."\";");

		eval("\$draftsubmit = \"".$templates->get("usercp_drafts_submit")."\";");
}
eval("\$draftlist = \"".$templates->get("usercp_drafts")."\";");

Zeile 1649Zeile 1673
		elseif($val == "thread")
{
$tidin[] .= "'".intval($id)."'";

		elseif($val == "thread")
{
$tidin[] .= "'".intval($id)."'";

		}

		}

	}
if($tidin)
{

	}
if($tidin)
{

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