Vergleich usercp.php - 1.4.11 - 1.4.12

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: usercp.php 4666 2009-12-28 23:03:01Z RyanGordon $

 * $Id: usercp.php 4864 2010-04-10 09:13:19Z RyanGordon $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 299Zeile 299
			$bdaydaysel .= "<option value=\"$i\">$i</option>\n";
}
}

			$bdaydaysel .= "<option value=\"$i\">$i</option>\n";
}
}

	$bdaymonthsel[$bday[1]] = "selected";

	$bdaymonthsel[$bday[1]] = 'selected="selected"';


$bdayprivacysel = '';
if($user['birthdayprivacy'] == 'all' || !$user['birthdayprivacy'])


$bdayprivacysel = '';
if($user['birthdayprivacy'] == 'all' || !$user['birthdayprivacy'])

Zeile 1508Zeile 1508
		}
$readforums[$forum['fid']] = $forum['lastread'];
}

		}
$readforums[$forum['fid']] = $forum['lastread'];
}

 
	
require_once MYBB_ROOT."inc/functions_forumlist.php";

	
$fpermissions = forum_permissions();
$query = $db->query("

	
$fpermissions = forum_permissions();
$query = $db->query("

		SELECT fs.*, f.*, t.subject AS lastpostsubject

		SELECT fs.*, f.*, t.subject AS lastpostsubject, fr.dateline AS lastread

		FROM ".TABLE_PREFIX."forumsubscriptions fs
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid = fs.fid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid = f.lastposttid)

		FROM ".TABLE_PREFIX."forumsubscriptions fs
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid = fs.fid)
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid = f.lastposttid)

 
		LEFT JOIN ".TABLE_PREFIX."forumsread fr ON (fr.fid=f.fid AND fr.uid='{$mybb->user['uid']}')

		WHERE f.type='f' AND fs.uid='".$mybb->user['uid']."'
ORDER BY f.name ASC
");

		WHERE f.type='f' AND fs.uid='".$mybb->user['uid']."'
ORDER BY f.name ASC
");

Zeile 1524Zeile 1527
		$forum_url = get_forum_link($forum['fid']);
$forumpermissions = $fpermissions[$forum['fid']];
if($forumpermissions['canview'] != 0)

		$forum_url = get_forum_link($forum['fid']);
$forumpermissions = $fpermissions[$forum['fid']];
if($forumpermissions['canview'] != 0)

		{
if(($forum['lastpost'] > $mybb->user['lastvisit'] || $readforums[$forum['fid']] > $mybb->user['lastvisit']) && $forum['lastpost'] != 0)
{
$folder = "on";
}
else
{
$folder = "off";
}

		{
$lightbulb = get_forum_lightbulb(array('open' => $forum['open'], 'lastread' => $forum['lastread']), array('lastpost' => $forum['lastpost']));
$folder = $lightbulb['folder'];







			if($forum['lastpost'] == 0 || $forum['lastposter'] == "")
{
$lastpost = "<div align=\"center\">$lang->never</div>";

			if($forum['lastpost'] == 0 || $forum['lastposter'] == "")
{
$lastpost = "<div align=\"center\">$lang->never</div>";

Zeile 1564Zeile 1561
	if(!$forums)
{
eval("\$forums = \"".$templates->get("usercp_forumsubscriptions_none")."\";");

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

	}

	}

	$plugins->run_hooks("usercp_forumsubscriptions_end");
eval("\$forumsubscriptions = \"".$templates->get("usercp_forumsubscriptions")."\";");
output_page($forumsubscriptions);

	$plugins->run_hooks("usercp_forumsubscriptions_end");
eval("\$forumsubscriptions = \"".$templates->get("usercp_forumsubscriptions")."\";");
output_page($forumsubscriptions);

Zeile 1642Zeile 1639
		$sigsmilies = $lang->off;
}
if($mybb->settings['sigmycode'] == 1)

		$sigsmilies = $lang->off;
}
if($mybb->settings['sigmycode'] == 1)

	{

	{

		$sigmycode = $lang->on;
}
else

		$sigmycode = $lang->on;
}
else

Zeile 1689Zeile 1686
	$avatar_error = "";

if($mybb->input['remove']) // remove avatar

	$avatar_error = "";

if($mybb->input['remove']) // remove avatar

	{

	{

		$updated_avatar = array(
"avatar" => "",
"avatardimensions" => "",

		$updated_avatar = array(
"avatar" => "",
"avatardimensions" => "",

Zeile 1703Zeile 1700
		if(empty($mybb->input['avatar']))
{
$avatar_error = $lang->error_noavatar;

		if(empty($mybb->input['avatar']))
{
$avatar_error = $lang->error_noavatar;

		}


		}


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


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


Zeile 1720Zeile 1717
			}

if(file_exists($avatarpath))

			}

if(file_exists($avatarpath))

			{

			{

				$dimensions = @getimagesize($avatarpath);

$updated_avatar = array(

				$dimensions = @getimagesize($avatarpath);

$updated_avatar = array(

Zeile 1736Zeile 1733
	elseif($_FILES['avatarupload']['name']) // upload avatar
{
if($mybb->usergroup['canuploadavatars'] == 0)

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

		{

		{

			error_no_permission();
}
$avatar = upload_avatar();

			error_no_permission();
}
$avatar = upload_avatar();

Zeile 1768Zeile 1765
		if(!$file)
{
$avatar_error = $lang->error_invalidavatarurl;

		if(!$file)
{
$avatar_error = $lang->error_invalidavatarurl;

		}

		}

		else
{

		else
{

			$tmp_name = $mybb->settings['avataruploadpath']."/remote_".md5(uniqid(rand(), true));

			$tmp_name = $mybb->settings['avataruploadpath']."/remote_".md5(random_str());

			$fp = @fopen($tmp_name, "wb");
if(!$fp)
{

			$fp = @fopen($tmp_name, "wb");
if(!$fp)
{

Zeile 1784Zeile 1781
				list($width, $height, $type) = @getimagesize($tmp_name);
@unlink($tmp_name);
if(!$type)

				list($width, $height, $type) = @getimagesize($tmp_name);
@unlink($tmp_name);
if(!$type)

				{

				{

					$avatar_error = $lang->error_invalidavatarurl;

					$avatar_error = $lang->error_invalidavatarurl;

				}
}

				}
}

		}

if(empty($avatar_error))

		}

if(empty($avatar_error))

Zeile 1799Zeile 1796
				{
$lang->error_avatartoobig = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight);
$avatar_error = $lang->error_avatartoobig;

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

				}
}

				}
}

		}

if(empty($avatar_error))

		}

if(empty($avatar_error))

Zeile 1816Zeile 1813
			);
$db->update_query("users", $updated_avatar, "uid='".$mybb->user['uid']."'");
remove_avatars($mybb->user['uid']);

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

		}

		}

	}

if(empty($avatar_error))

	}

if(empty($avatar_error))

Zeile 1895Zeile 1892
				if($mybb->user['avatar'] == $avatarpath)
{
$checked = "checked=\"checked\"";

				if($mybb->user['avatar'] == $avatarpath)
{
$checked = "checked=\"checked\"";

				}

				}

				if($count == 5)
{
$avatarlist .= "</tr>\n<tr>\n";

				if($count == 5)
{
$avatarlist .= "</tr>\n<tr>\n";

Zeile 2526Zeile 2523

// List of groups this user is a leader of
$groupsledlist = '';


// List of groups this user is a leader of
$groupsledlist = '';



 

switch($db->type)
{


switch($db->type)
{

Zeile 2538Zeile 2534
				FROM ".TABLE_PREFIX."groupleaders l
LEFT JOIN ".TABLE_PREFIX."usergroups g ON(g.gid=l.gid)
LEFT JOIN ".TABLE_PREFIX."users u ON(((','|| u.additionalgroups|| ',' LIKE '%,'|| g.gid|| ',%') OR u.usergroup = g.gid))

				FROM ".TABLE_PREFIX."groupleaders l
LEFT JOIN ".TABLE_PREFIX."usergroups g ON(g.gid=l.gid)
LEFT JOIN ".TABLE_PREFIX."users u ON(((','|| u.additionalgroups|| ',' LIKE '%,'|| g.gid|| ',%') OR u.usergroup = g.gid))

				LEFT JOIN ".TABLE_PREFIX."joinrequests j ON(j.gid=g.gid)

				LEFT JOIN ".TABLE_PREFIX."joinrequests j ON(j.gid=g.gid AND j.uid != 0)

				WHERE l.uid='".$mybb->user['uid']."'
GROUP BY g.gid, g.title, g.type, l.canmanagerequests, l.canmanagemembers
");

				WHERE l.uid='".$mybb->user['uid']."'
GROUP BY g.gid, g.title, g.type, l.canmanagerequests, l.canmanagemembers
");

Zeile 2549Zeile 2545
				FROM ".TABLE_PREFIX."groupleaders l
LEFT JOIN ".TABLE_PREFIX."usergroups g ON(g.gid=l.gid)
LEFT JOIN ".TABLE_PREFIX."users u ON(((CONCAT(',', u.additionalgroups, ',') LIKE CONCAT('%,', g.gid, ',%')) OR u.usergroup = g.gid))

				FROM ".TABLE_PREFIX."groupleaders l
LEFT JOIN ".TABLE_PREFIX."usergroups g ON(g.gid=l.gid)
LEFT JOIN ".TABLE_PREFIX."users u ON(((CONCAT(',', u.additionalgroups, ',') LIKE CONCAT('%,', g.gid, ',%')) OR u.usergroup = g.gid))

				LEFT JOIN ".TABLE_PREFIX."joinrequests j ON(j.gid=g.gid)

				LEFT JOIN ".TABLE_PREFIX."joinrequests j ON(j.gid=g.gid AND j.uid != 0)

				WHERE l.uid='".$mybb->user['uid']."'
GROUP BY l.gid
");

				WHERE l.uid='".$mybb->user['uid']."'
GROUP BY l.gid
");