Vergleich usercp.php - 1.2.5 - 1.2.11

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 3Zeile 3
 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

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

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

 *

 *

 * $Id: usercp.php 2725 2007-02-07 20:50:17Z CraKteR $

 * $Id: usercp.php 3478 2007-11-15 04:11:36Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 333Zeile 333
		}
else
{

		}
else
{



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

			if($mybb->user['away'] == "yes")
{
$awaydate = my_date($mybb->settings['dateformat'], $mybb->user['awaydate']);

			if($mybb->user['away'] == "yes")
{
$awaydate = my_date($mybb->settings['dateformat'], $mybb->user['awaydate']);

Zeile 732Zeile 732
	}

if($user['remember'] == "yes")

	}

if($user['remember'] == "yes")

	{

	{

		$remembercheck = "checked=\"checked\"";
}
else

		$remembercheck = "checked=\"checked\"";
}
else

Zeile 1110Zeile 1110
		LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid)
WHERE f.type='f' AND f.uid='".$mybb->user['uid']."'
ORDER BY t.lastpost DESC

		LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid)
WHERE f.type='f' AND f.uid='".$mybb->user['uid']."'
ORDER BY t.lastpost DESC

 
		LIMIT {$start}, {$perpage}

	");
while($favorite = $db->fetch_array($query))
{

	");
while($favorite = $db->fetch_array($query))
{

Zeile 1330Zeile 1331
					$lastpost_subject = my_substr($lastpost_subject, 0, 25) . "...";
}
eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost")."\";");

					$lastpost_subject = my_substr($lastpost_subject, 0, 25) . "...";
}
eval("\$lastpost = \"".$templates->get("forumbit_depth2_forum_lastpost")."\";");

			}
}

			}
}

		$posts = my_number_format($forum['posts']);
$threads = my_number_format($forum['threads']);
if($mybb->settings['showdescriptions'] == "no")

		$posts = my_number_format($forum['posts']);
$threads = my_number_format($forum['threads']);
if($mybb->settings['showdescriptions'] == "no")

Zeile 1341Zeile 1342
		eval("\$forums .= \"".$templates->get("usercp_forumsubscriptions_forum")."\";");
}
if(!$forums)

		eval("\$forums .= \"".$templates->get("usercp_forumsubscriptions_forum")."\";");
}
if(!$forums)

	{

	{

		eval("\$forums = \"".$templates->get("usercp_forumsubscriptions_none")."\";");
}
$plugins->run_hooks("usercp_forumsubscriptions_end");

		eval("\$forums = \"".$templates->get("usercp_forumsubscriptions_none")."\";");
}
$plugins->run_hooks("usercp_forumsubscriptions_end");

Zeile 1356Zeile 1357
	{
$update_signature = array(
"includesig" => "yes"

	{
$update_signature = array(
"includesig" => "yes"

		);

		);

		$db->update_query(TABLE_PREFIX."posts", $update_signature, "uid='".$mybb->user['uid']."'");
}
elseif($mybb->input['updateposts'] == "disable")

		$db->update_query(TABLE_PREFIX."posts", $update_signature, "uid='".$mybb->user['uid']."'");
}
elseif($mybb->input['updateposts'] == "disable")

Zeile 1406Zeile 1407
	if($mybb->settings['sigsmilies'] == "yes")
{
$sigsmilies = $lang->on;

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

	}

	}

	else
{
$sigsmilies = $lang->off;

	else
{
$sigsmilies = $lang->off;

Zeile 1481Zeile 1482
					"avatartype" => "gallery" 
);
$db->update_query(TABLE_PREFIX."users", $updated_avatar, "uid='".$mybb->user['uid']."'");

					"avatartype" => "gallery" 
);
$db->update_query(TABLE_PREFIX."users", $updated_avatar, "uid='".$mybb->user['uid']."'");

			} 

			} 

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

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

	} 

	}

	elseif($_FILES['avatarupload']['name']) // upload avatar 
{
if($mybb->usergroup['canuploadavatars'] == "no")

	elseif($_FILES['avatarupload']['name']) // upload avatar 
{
if($mybb->usergroup['canuploadavatars'] == "no")

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

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

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

 




		if(!$type) 
{



		// Copy the avatar to the local server (work around remote URL access disabled for getimagesize)
$file = fetch_remote_file($mybb->input['avatarurl']);
if(!$file)
{

			$avatar_error = $lang->error_invalidavatarurl;

			$avatar_error = $lang->error_invalidavatarurl;

 
		}
else
{
$tmp_name = $mybb->settings['avataruploadpath']."/remote_".md5(uniqid(rand(), true));
$fp = @fopen($tmp_name, "wb");
if(!$fp)
{
$avatar_error = $lang->error_invalidavatarurl;
}
else
{
fwrite($fp, $file);
fclose($fp);
list($width, $height, $type) = @getimagesize($tmp_name);
@unlink($tmp_name);
if(!$type)
{
$avatar_error = $lang->error_invalidavatarurl;
}
}

		}

if(empty($avatar_error))

		}

if(empty($avatar_error))

Zeile 1532Zeile 1554
					$lang->error_avatartoobig = sprintf($lang->error_avatartoobig, $maxwidth, $maxheight); 
$avatar_error = $lang->error_avatartoobig;
}

					$lang->error_avatartoobig = sprintf($lang->error_avatartoobig, $maxwidth, $maxheight); 
$avatar_error = $lang->error_avatartoobig;
}

			}

			}

		}

if(empty($avatar_error))

		}

if(empty($avatar_error))

Zeile 1898Zeile 1920
	// Changing our display group
if($mybb->input['displaygroup'])
{

	// Changing our display group
if($mybb->input['displaygroup'])
{

		if(!strstr($ingroups, ",".$mybb->input['displaygroup'].","))

		if(strpos($ingroups, ",".$mybb->input['displaygroup'].",") === false)

		{
error($lang->not_member_of_group);
}

		{
error($lang->not_member_of_group);
}

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

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

		if(!strstr($ingroups, ",".$mybb->input['leavegroup'].","))

		if(strpos($ingroups, ",".$mybb->input['leavegroup'].",") === false)

		{
error($lang->not_member_of_group);
}

		{
error($lang->not_member_of_group);
}

Zeile 1934Zeile 1956
		leave_usergroup($mybb->user['uid'], $mybb->input['leavegroup']);
$plugins->run_hooks("usercp_usergroups_leave_group");
redirect("usercp.php?action=usergroups", $lang->left_group);

		leave_usergroup($mybb->user['uid'], $mybb->input['leavegroup']);
$plugins->run_hooks("usercp_usergroups_leave_group");
redirect("usercp.php?action=usergroups", $lang->left_group);

 
		exit;

	}

// Joining a group

	}

// Joining a group

Zeile 1948Zeile 1971
			error($lang->cannot_join_group);
}


			error($lang->cannot_join_group);
}


		if(strstr($ingroups, ",".intval($mybb->input['joingroup']).",") || $mybb->user['usergroup'] == $mybb->input['joingroup'] || $mybb->user['displaygroup'] == $mybb->input['joingroup'])

		if(strpos($ingroups, ",".intval($mybb->input['joingroup']).",") !== false)

		{
error($lang->already_member_of_group);
}

		{
error($lang->already_member_of_group);
}

Zeile 2213Zeile 2236
	$bandwidth = get_friendly_size($bandwidth);
if($mybb->usergroup['attachquota'])
{

	$bandwidth = get_friendly_size($bandwidth);
if($mybb->usergroup['attachquota'])
{

		$percent = round(($totalusage/($mybb->usergroup['attachquota']*1000))*100)."%";
$attachquota = get_friendly_size($mybb->usergroup['attachquota']*1000);

		$percent = round(($totalusage/($mybb->usergroup['attachquota']*1024))*100)."%";
$attachquota = get_friendly_size($mybb->usergroup['attachquota']*1024);

		$usagenote = sprintf($lang->attachments_usage_quota, $friendlyusage, $attachquota, $percent, $totalattachments);
}
else

		$usagenote = sprintf($lang->attachments_usage_quota, $friendlyusage, $attachquota, $percent, $totalattachments);
}
else

Zeile 2260Zeile 2283
		$perday = $mybb->user['postnum'];
}


		$perday = $mybb->user['postnum'];
}


	$query = $db->simple_select(TABLE_PREFIX."posts", "COUNT(pid) AS posts", "visible > 0");
$posts = $db->fetch_field($query, "posts");

	$stats = $cache->read("stats");
$posts = $stats['numposts'];

	if($posts == 0)
{
$percent = "0";

	if($posts == 0)
{
$percent = "0";

Zeile 2298Zeile 2321
	}
// Make reputations row
$reputations = '';

	}
// Make reputations row
$reputations = '';

	if($mybb->usergroup['usereputationsystem'] == 'yes')

	if($mybb->usergroup['usereputationsystem'] == 'yes' && $mybb->settings['enablereputation'] == 'yes')

	{
$reputation_link = get_reputation($mybb->user['reputation']);
eval("\$reputation = \"".$templates->get("usercp_reputation")."\";");

	{
$reputation_link = get_reputation($mybb->user['reputation']);
eval("\$reputation = \"".$templates->get("usercp_reputation")."\";");