Vergleich usercp.php - 1.10 - 1.18

  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 1293Zeile 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 1350Zeile 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 1495Zeile 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 1512Zeile 1519
	redirect("usercp.php", $lang->redirect_avatarupdated);
}
elseif($mybb->input['action'] == "notepad")

	redirect("usercp.php", $lang->redirect_avatarupdated);
}
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_start");
$mybbuser['notepad'] = htmlspecialchars($mybbuser['notepad']);
eval("\$notepad = \"".$templates->get("usercp_notepad")."\";");

Zeile 1527Zeile 1534
	redirect("usercp.php", $lang->redirect_notepadupdated);
}
elseif($mybb->input['action'] == "editlists")

	redirect("usercp.php", $lang->redirect_notepadupdated);
}
elseif($mybb->input['action'] == "editlists")

{

{

	$plugins->run_hooks("usercp_editlists_start");
$buddyarray = explode(",", $mybb->user['buddylist']);
if(is_array($buddyarray))

	$plugins->run_hooks("usercp_editlists_start");
$buddyarray = explode(",", $mybb->user['buddylist']);
if(is_array($buddyarray))

Zeile 1539Zeile 1546
		}
$query = $db->query("SELECT username, uid FROM ".TABLE_PREFIX."users WHERE uid IN ($buddysql)");
while($buddy = $db->fetch_array($query))

		}
$query = $db->query("SELECT username, uid FROM ".TABLE_PREFIX."users WHERE uid IN ($buddysql)");
while($buddy = $db->fetch_array($query))

		{

		{

			$uid = $buddy['uid'];
$username = $buddy['username'];
eval("\$buddylist .= \"".$templates->get("usercp_editlists_user")."\";");

			$uid = $buddy['uid'];
$username = $buddy['username'];
eval("\$buddylist .= \"".$templates->get("usercp_editlists_user")."\";");

		}

		}

	}
$ignorearray = explode(",", $mybb->user['ignorelist']);
if(is_array($ignorearray)) {

	}
$ignorearray = explode(",", $mybb->user['ignorelist']);
if(is_array($ignorearray)) {

Zeile 1558Zeile 1565
			$uid = $ignoreuser['uid'];
$username = $ignoreuser['username'];
eval("\$ignorelist .= \"".$templates->get("usercp_editlists_user")."\";");

			$uid = $ignoreuser['uid'];
$username = $ignoreuser['username'];
eval("\$ignorelist .= \"".$templates->get("usercp_editlists_user")."\";");

		}

		}

	}
for($i=1;$i<=2;$i++)
{

	}
for($i=1;$i<=2;$i++)
{

Zeile 1574Zeile 1581
{
$plugins->run_hooks("usercp_do_editlists_start");
while(list($key, $val) = each($mybb->input['listuser']))

{
$plugins->run_hooks("usercp_do_editlists_start");
while(list($key, $val) = each($mybb->input['listuser']))

	{

	{

		if(strtoupper($mybb->user['username']) != strtoupper($val))
{
$val = addslashes($val);

		if(strtoupper($mybb->user['username']) != strtoupper($val))
{
$val = addslashes($val);

Zeile 1589Zeile 1596
		$comma2 = ",";
}
if($mybb->input['list'] == "ignore")

		$comma2 = ",";
}
if($mybb->input['list'] == "ignore")

	{

	{

		$type = "ignorelist";
}
else

		$type = "ignorelist";
}
else

Zeile 1712Zeile 1719
		$plugins->run_hooks("usercp_usergroups_change_displaygroup");
redirect("usercp.php?action=usergroups", $lang->display_group_changed);
exit;

		$plugins->run_hooks("usercp_usergroups_change_displaygroup");
redirect("usercp.php?action=usergroups", $lang->display_group_changed);
exit;

	}

	}


// Leaving a group
if($mybb->input['leavegroup'])


// Leaving a group
if($mybb->input['leavegroup'])

	{

	{

		if(!strstr($ingroups, ",".$mybb->input['leavegroup'].","))
{
error($lang->not_member_of_group);

		if(!strstr($ingroups, ",".$mybb->input['leavegroup'].","))
{
error($lang->not_member_of_group);

		}

		}

		if($mybb->user['usergroup'] == $mybb->input['leavegroup'])
{
error($lang->cannot_leave_primary_group);

		if($mybb->user['usergroup'] == $mybb->input['leavegroup'])
{
error($lang->cannot_leave_primary_group);

		}

		}

		$query = $db->query("SELECT * FROM ".TABLE_PREFIX."usergroups WHERE gid='".intval($mybb->input['leavegroup'])."'");
$usergroup = $db->fetch_array($query);
if($usergroup['type'] != 4 && $usergroup['type'] != 3)

		$query = $db->query("SELECT * FROM ".TABLE_PREFIX."usergroups WHERE gid='".intval($mybb->input['leavegroup'])."'");
$usergroup = $db->fetch_array($query);
if($usergroup['type'] != 4 && $usergroup['type'] != 3)

Zeile 1735Zeile 1742
		$plugins->run_hooks("usercp_usergroups_leave_group");
redirect("usercp.php?action=usergroups", $lang->left_group);
}

		$plugins->run_hooks("usercp_usergroups_leave_group");
redirect("usercp.php?action=usergroups", $lang->left_group);
}





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