Vergleich usercp.php - 1.4.0 - 1.4.15

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 1Zeile 1
<?php
/**
* MyBB 1.4

<?php
/**
* MyBB 1.4

 * Copyright � 2008 MyBB Group, All Rights Reserved

 * Copyright � 2008 MyBB Group, All Rights Reserved

 *
* 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 4038 2008-07-25 08:50:26Z dennis $

 * $Id: usercp.php 5379 2011-02-21 11:06:42Z Tomm $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

 
define('THIS_SCRIPT', 'usercp.php');


$templatelist = "usercp,usercp_home,usercp_nav,usercp_profile,error_nopermission,buddy_online,buddy_offline,usercp_changename,usercp_nav_changename";
$templatelist .= ",usercp_usergroups_memberof_usergroup,usercp_usergroups_memberof,usercp_usergroups_joinable_usergroup,usercp_usergroups_joinable,usercp_usergroups";


$templatelist = "usercp,usercp_home,usercp_nav,usercp_profile,error_nopermission,buddy_online,buddy_offline,usercp_changename,usercp_nav_changename";
$templatelist .= ",usercp_usergroups_memberof_usergroup,usercp_usergroups_memberof,usercp_usergroups_joinable_usergroup,usercp_usergroups_joinable,usercp_usergroups";

Zeile 72Zeile 73
	}
else if($mybb->settings['siglength'] > 0)
{

	}
else if($mybb->settings['siglength'] > 0)
{

		if($mybb->settings['sigcountmycode'] == 1)

		if($mybb->settings['sigcountmycode'] == 0)

		{
$parsed_sig = $parser->text_parse_message($mybb->input['signature']);
}

		{
$parsed_sig = $parser->text_parse_message($mybb->input['signature']);
}

Zeile 172Zeile 173
		$awaydate = TIME_NOW;
if($mybb->input['awayday'])
{

		$awaydate = TIME_NOW;
if($mybb->input['awayday'])
{

 
			// If the user has indicated that they will return on a specific day, but not month or year, assume it is current month and year

			if(!$mybb->input['awaymonth'])
{
$mybb->input['awaymonth'] = my_date('n', $awaydate);
}

			if(!$mybb->input['awaymonth'])
{
$mybb->input['awaymonth'] = my_date('n', $awaydate);
}



 
			if(!$mybb->input['awayyear'])
{
$mybb->input['awayyear'] = my_date('Y', $awaydate);
}

			if(!$mybb->input['awayyear'])
{
$mybb->input['awayyear'] = my_date('Y', $awaydate);
}

 
			
$return_month = intval(substr($mybb->input['awaymonth'], 0, 2));
$return_day = intval(substr($mybb->input['awayday'], 0, 2));
$return_year = min(intval($mybb->input['awayyear']), 9999);





			$returntimestamp = gmmktime(0, 0, 0, $mybb->input['awaymonth'], $mybb->input['awayday'], $mybb->input['awayyear']);


			// Check if return date is after the away date.
$returntimestamp = gmmktime(0, 0, 0, $return_month, $return_day, $return_year);

			$awaytimestamp = gmmktime(0, 0, 0, my_date('n', $awaydate), my_date('j', $awaydate), my_date('Y', $awaydate));

			$awaytimestamp = gmmktime(0, 0, 0, my_date('n', $awaydate), my_date('j', $awaydate), my_date('Y', $awaydate));

			if ($returntimestamp < $awaytimestamp && $mybb->input['awayyear'] < my_date("Y"))

			if($return_year < my_date('Y', $awaydate) || ($returntimestamp < $awaytimestamp && $return_year == my_date('Y', $awaydate)))

			{
error($lang->error_usercp_return_date_past);
}

			{
error($lang->error_usercp_return_date_past);
}

			$returndate = intval($mybb->input['awayday'])."-".intval($mybb->input['awaymonth'])."-".intval($mybb->input['awayyear']);


			
$returndate = "{$return_day}-{$return_month}-{$return_year}";

		}
else
{

		}
else
{

Zeile 292Zeile 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 319Zeile 326
		$user['website'] = "http://";
}
else

		$user['website'] = "http://";
}
else

	{

	{

		$user['website'] = htmlspecialchars_uni($user['website']);
}


		$user['website'] = htmlspecialchars_uni($user['website']);
}


Zeile 332Zeile 339
		$user['icq'] = "";
}
if($errors)

		$user['icq'] = "";
}
if($errors)

	{

	{

		$user['msn'] = htmlspecialchars_uni($user['msn']);
$user['aim'] = htmlspecialchars_uni($user['aim']);
$user['yahoo'] = htmlspecialchars_uni($user['yahoo']);

		$user['msn'] = htmlspecialchars_uni($user['msn']);
$user['aim'] = htmlspecialchars_uni($user['aim']);
$user['yahoo'] = htmlspecialchars_uni($user['yahoo']);

Zeile 354Zeile 361
			$returndate[1] = $mybb->input['awaymonth'];
$returndate[2] = intval($mybb->input['awayyear']);
$user['awayreason'] = htmlspecialchars_uni($mybb->input['awayreason']);

			$returndate[1] = $mybb->input['awaymonth'];
$returndate[2] = intval($mybb->input['awayyear']);
$user['awayreason'] = htmlspecialchars_uni($mybb->input['awayreason']);

		}

		}

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

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

Zeile 458Zeile 465
					$val = trim($val);
$val = str_replace("\n", "\\n", $val);
$sel = "";

					$val = trim($val);
$val = str_replace("\n", "\\n", $val);
$sel = "";

					if($val == $userfield)
{
$sel = " selected=\"selected\"";

					if($val == $userfield)
{
$sel = " selected=\"selected\"";

					}
$select .= "<option value=\"$val\"$sel>$val</option>";

					}
$select .= "<option value=\"$val\"$sel>$val</option>";

				}

				}

				if(!$profilefield['length'])
{
$profilefield['length'] = 1;
}
$code = "<select name=\"profile_fields[$field]\" size=\"{$profilefield['length']}\">$select</select>";

				if(!$profilefield['length'])
{
$profilefield['length'] = 1;
}
$code = "<select name=\"profile_fields[$field]\" size=\"{$profilefield['length']}\">$select</select>";

			}

			}

		}
elseif($type == "radio")

		}
elseif($type == "radio")

		{
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{

		{
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{

					$checked = "";
if($val == $userfield)
{
$checked = " checked=\"checked\"";
}
$code .= "<input type=\"radio\" class=\"radio\" name=\"profile_fields[$field]\" value=\"$val\"$checked /> <span class=\"smalltext\">$val</span><br />";

					$checked = "";
if($val == $userfield)
{
$checked = " checked=\"checked\"";
}
$code .= "<input type=\"radio\" class=\"radio\" name=\"profile_fields[$field]\" value=\"$val\"$checked /> <span class=\"smalltext\">$val</span><br />";

				}
}

				}
}

		}
elseif($type == "checkbox")
{
if($errors)
{
$useropts = $userfield;

		}
elseif($type == "checkbox")
{
if($errors)
{
$useropts = $userfield;

			}
else
{

			}
else
{

				$useropts = explode("\n", $userfield);
}
if(is_array($useropts))
{
foreach($useropts as $key => $val)

				$useropts = explode("\n", $userfield);
}
if(is_array($useropts))
{
foreach($useropts as $key => $val)

				{
$seloptions[$val] = $val;

				{
$seloptions[$val] = $val;

				}
}
$expoptions = explode("\n", $options);

				}
}
$expoptions = explode("\n", $options);

Zeile 516Zeile 523
					}
$code .= "<input type=\"checkbox\" class=\"checkbox\" name=\"profile_fields[$field][]\" value=\"$val\"$checked /> <span class=\"smalltext\">$val</span><br />";
}

					}
$code .= "<input type=\"checkbox\" class=\"checkbox\" name=\"profile_fields[$field][]\" value=\"$val\"$checked /> <span class=\"smalltext\">$val</span><br />";
}

			}
}

			}
}

		elseif($type == "textarea")

		elseif($type == "textarea")

		{
$value = htmlspecialchars_uni($userfield);

		{
$value = htmlspecialchars_uni($userfield);

			$code = "<textarea name=\"profile_fields[$field]\" rows=\"6\" cols=\"30\" style=\"width: 95%\">$value</textarea>";
}
else
{
$value = htmlspecialchars_uni($userfield);

			$code = "<textarea name=\"profile_fields[$field]\" rows=\"6\" cols=\"30\" style=\"width: 95%\">$value</textarea>";
}
else
{
$value = htmlspecialchars_uni($userfield);

			$code = "<input type=\"text\" name=\"profile_fields[$field]\" class=\"textbox\" size=\"{$profilefield['length']}\" maxlength=\"{$profilefield['maxlength']}\" value=\"$value\" />";






			$maxlength = "";
if($profilefield['maxlength'] > 0)
{
$maxlength = " maxlength=\"{$profilefield['maxlength']}\"";
}
$code = "<input type=\"text\" name=\"profile_fields[$field]\" class=\"textbox\" size=\"{$profilefield['length']}\"{$maxlength} value=\"$value\" />";

		}
if($profilefield['required'] == 1)
{

		}
if($profilefield['required'] == 1)
{

Zeile 1020Zeile 1032
	$plugins->run_hooks("usercp_do_password_start");
if(validate_password_from_uid($mybb->user['uid'], $mybb->input['oldpassword']) == false)
{

	$plugins->run_hooks("usercp_do_password_start");
if(validate_password_from_uid($mybb->user['uid'], $mybb->input['oldpassword']) == false)
{

		$errors[] = $lang->error_invalidpassword;
}
else
{

		$errors[] = $lang->error_invalidpassword;
}
else
{

		// Set up user handler.
require_once "inc/datahandlers/user.php";
$userhandler = new UserDataHandler("update");

		// Set up user handler.
require_once "inc/datahandlers/user.php";
$userhandler = new UserDataHandler("update");

Zeile 1128Zeile 1140
	verify_post_check($mybb->input['my_post_key']);

$plugins->run_hooks("usercp_do_subscriptions_start");

	verify_post_check($mybb->input['my_post_key']);

$plugins->run_hooks("usercp_do_subscriptions_start");





	if(!is_array($mybb->input['check']))
{
error($lang->no_subscriptions_selected);
}

// Clean input - only accept integers thanks!

	if(!is_array($mybb->input['check']))
{
error($lang->no_subscriptions_selected);
}

// Clean input - only accept integers thanks!

	array_walk($mybb->input['check'], 'intval');

	$mybb->input['check'] = array_map('intval', $mybb->input['check']);

	$tids = implode(",", $mybb->input['check']);

// Deleting these subscriptions?

	$tids = implode(",", $mybb->input['check']);

// Deleting these subscriptions?

Zeile 1235Zeile 1247
	if(is_array($subscriptions))
{
$tids = implode(",", array_keys($subscriptions));

	if(is_array($subscriptions))
{
$tids = implode(",", array_keys($subscriptions));

 
		
if($mybb->user['uid'] == 0)
{
// Build a forum cache.
$query = $db->query("
SELECT fid
FROM ".TABLE_PREFIX."forums
WHERE active != 0
ORDER BY pid, disporder
");

$forumsread = unserialize($mybb->cookies['mybb']['forumread']);
}
else
{
// Build a forum cache.
$query = $db->query("
SELECT f.fid, fr.dateline AS lastread
FROM ".TABLE_PREFIX."forums f
LEFT JOIN ".TABLE_PREFIX."forumsread fr ON (fr.fid=f.fid AND fr.uid='{$mybb->user['uid']}')
WHERE f.active != 0
ORDER BY pid, disporder
");
}
while($forum = $db->fetch_array($query))
{
if($mybb->user['uid'] == 0)
{
if($forumsread[$forum['fid']])
{
$forum['lastread'] = $forumsread[$forum['fid']];
}
}
$readforums[$forum['fid']] = $forum['lastread'];
}


// Check participation by the current user in any of these threads - for 'dot' folder icons
if($mybb->settings['dotfolders'] != 0)


// Check participation by the current user in any of these threads - for 'dot' folder icons
if($mybb->settings['dotfolders'] != 0)

Zeile 1256Zeile 1303
			}
}


			}
}





		$icon_cache = $cache->read("posticons");


		// Now we can build our subscription list
foreach($subscriptions as $thread)
{

		// Now we can build our subscription list
foreach($subscriptions as $thread)
{

Zeile 1299Zeile 1347
			$donenew = 0;
$lastread = 0;


			$donenew = 0;
$lastread = 0;


			$forumread = my_get_array_cookie("forumread", $thread['fid']);
if($mybb->user['lastvisit'] > $forumread)
{
$forumread = $mybb->user['lastvisit'];
}

if($mybb->settings['threadreadcut'] > 0 && $thread['lastpost'] > $forumread)
{
$cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
}











			if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'])
{
$forum_read = $readforums[$thread['fid']];

$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
if($forum_read == 0 || $forum_read < $read_cutoff)
{
$forum_read = $read_cutoff;
}
}
else
{
$forum_read = $forumsread[$thread['fid']];
}

if($mybb->settings['threadreadcut'] > 0 && $thread['lastpost'] > $forum_read)
{
$cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
}


			if($thread['lastpost'] > $cutoff)
{
if($thread['lastpost'] > $cutoff)
{
if($thread['lastread'])
{

			if($thread['lastpost'] > $cutoff)
{
if($thread['lastpost'] > $cutoff)
{
if($thread['lastread'])
{

							$lastread = $thread['lastread'];

						$lastread = $thread['lastread'];

					}
else
{

					}
else
{

							$lastread = 1;

						$lastread = 1;

					}
}
}

					}
}
}

Zeile 1328Zeile 1385
			if(!$lastread)
{
$readcookie = $threadread = my_get_array_cookie("threadread", $thread['tid']);

			if(!$lastread)
{
$readcookie = $threadread = my_get_array_cookie("threadread", $thread['tid']);

				if($readcookie > $forumread)

				if($readcookie > $forum_read)

				{
$lastread = $readcookie;
}
else
{

				{
$lastread = $readcookie;
}
else
{

					$lastread = $forumread;

					$lastread = $forum_read;

				}
}


				}
}


Zeile 1360Zeile 1417
			}

if($thread['closed'] == 1)

			}

if($thread['closed'] == 1)

			{

			{

				$folder .= "lock";
$folder_label .= $lang->icon_lock;
}

				$folder .= "lock";
$folder_label .= $lang->icon_lock;
}

Zeile 1411Zeile 1468
if($mybb->input['action'] == "forumsubscriptions")
{
$plugins->run_hooks("usercp_forumsubscriptions_start");

if($mybb->input['action'] == "forumsubscriptions")
{
$plugins->run_hooks("usercp_forumsubscriptions_start");

	$query = $db->query("
SELECT *
FROM ".TABLE_PREFIX."forumpermissions
WHERE gid='".$mybb->user['usergroup']."'
");

	$query = $db->simple_select("forumpermissions", "*", "gid='".$db->escape_string($mybb->user['usergroup'])."'");





	while($permissions = $db->fetch_array($query))

	while($permissions = $db->fetch_array($query))

	{

	{

		$permissioncache[$permissions['gid']][$permissions['fid']] = $permissions;
}

		$permissioncache[$permissions['gid']][$permissions['fid']] = $permissions;
}

 
	
if($mybb->user['uid'] == 0)
{
// Build a forum cache.
$query = $db->query("
SELECT fid
FROM ".TABLE_PREFIX."forums
WHERE active != 0
ORDER BY pid, disporder
");

$forumsread = unserialize($mybb->cookies['mybb']['forumread']);
}
else
{
// Build a forum cache.
$query = $db->query("
SELECT f.fid, fr.dateline AS lastread
FROM ".TABLE_PREFIX."forums f
LEFT JOIN ".TABLE_PREFIX."forumsread fr ON (fr.fid=f.fid AND fr.uid='{$mybb->user['uid']}')
WHERE f.active != 0
ORDER BY pid, disporder
");
}
while($forum = $db->fetch_array($query))
{
if($mybb->user['uid'] == 0)
{
if($forumsread[$forum['fid']])
{
$forum['lastread'] = $forumsread[$forum['fid']];
}
}
$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 1436Zeile 1528
		$forumpermissions = $fpermissions[$forum['fid']];
if($forumpermissions['canview'] != 0)
{

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

			if(($forum['lastpost'] > $mybb->user['lastvisit'] || $mybbforumread[$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 1527Zeile 1613
	else if($error)
{
$sig = $mybb->input['signature'];

	else if($error)
{
$sig = $mybb->input['signature'];

 
		$template = false;

	}

if($sig && $template)

	}

if($sig && $template)

Zeile 1614Zeile 1701
		{
$avatar_error = $lang->error_noavatar;
}

		{
$avatar_error = $lang->error_noavatar;
}






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


		if(empty($avatar_error))
{
if($mybb->input['gallery'] == "default")

		if(empty($avatar_error))
{
if($mybb->input['gallery'] == "default")

			{

			{

				$avatarpath = $db->escape_string($mybb->settings['avatardir']."/".$mybb->input['avatar']);
}
else

				$avatarpath = $db->escape_string($mybb->settings['avatardir']."/".$mybb->input['avatar']);
}
else

			{

			{

				$avatarpath = $db->escape_string($mybb->settings['avatardir']."/".$mybb->input['gallery']."/".$mybb->input['avatar']);
}


				$avatarpath = $db->escape_string($mybb->settings['avatardir']."/".$mybb->input['gallery']."/".$mybb->input['avatar']);
}


Zeile 1643Zeile 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();
if($avatar['error'])

			error_no_permission();
}
$avatar = upload_avatar();
if($avatar['error'])

		{

		{

			$avatar_error = $avatar['error'];
}
else

			$avatar_error = $avatar['error'];
}
else

Zeile 1678Zeile 1768
		}
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 1701Zeile 1791
		{
if($width && $height && $mybb->settings['maxavatardims'] != "")
{

		{
if($width && $height && $mybb->settings['maxavatardims'] != "")
{

				list($maxwidth, $maxheight) = explode("x", $mybb->settings['maxavatardims']);

				list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims']));

				if(($maxwidth && $width > $maxwidth) || ($maxheight && $height > $maxheight))
{
$lang->error_avatartoobig = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight);

				if(($maxwidth && $width > $maxwidth) || ($maxheight && $height > $maxheight))
{
$lang->error_avatartoobig = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight);

Zeile 1749Zeile 1839
		if(is_dir($mybb->settings['avatardir']."/$dir") && substr($dir, 0, 1) != ".")
{
$gallerylist[$dir] = str_replace("_", " ", $dir);

		if(is_dir($mybb->settings['avatardir']."/$dir") && substr($dir, 0, 1) != ".")
{
$gallerylist[$dir] = str_replace("_", " ", $dir);

		}

		}

	}
@closedir($avatardir);
natcasesort($gallerylist);

	}
@closedir($avatardir);
natcasesort($gallerylist);

Zeile 1761Zeile 1851
		{
$activegallery = $friendlyname;
$selected = "selected=\"selected\"";

		{
$activegallery = $friendlyname;
$selected = "selected=\"selected\"";

		}

		}

		$galleries .= "<option value=\"$dir\" $selected>$friendlyname</option>\n";
$selected = "";
}

		$galleries .= "<option value=\"$dir\" $selected>$friendlyname</option>\n";
$selected = "";
}

Zeile 1782Zeile 1872
		{
$avatarpath = $avatardir."/".$avatar;
if(is_file($avatarpath) && preg_match("#\.(jpg|jpeg|gif|bmp|png)$#i", $avatar))

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

			{

			{

				$avatars[] = $avatar;
}
}

				$avatars[] = $avatar;
}
}

Zeile 1860Zeile 1950
		}
if($mybb->settings['maxavatardims'] != "")
{

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

			list($maxwidth, $maxheight) = explode("x", $mybb->settings['maxavatardims']);

			list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims']));

			$lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_dimensions, $maxwidth, $maxheight);
}
if($mybb->settings['avatarsize'])

			$lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_dimensions, $maxwidth, $maxheight);
}
if($mybb->settings['avatarsize'])

Zeile 1883Zeile 1973
	}
}
if($mybb->input['action'] == "notepad")

	}
}
if($mybb->input['action'] == "notepad")

{

{

	$plugins->run_hooks("usercp_notepad_start");
$mybb->user['notepad'] = htmlspecialchars_uni($mybb->user['notepad']);
eval("\$notepad = \"".$templates->get("usercp_notepad")."\";");

	$plugins->run_hooks("usercp_notepad_start");
$mybb->user['notepad'] = htmlspecialchars_uni($mybb->user['notepad']);
eval("\$notepad = \"".$templates->get("usercp_notepad")."\";");

Zeile 2146Zeile 2236
		while($user = $db->fetch_array($query))
{
$profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']);

		while($user = $db->fetch_array($query))
{
$profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']);

			if($user['lastactive'] > $timecut && ($user['invisible'] == 0 || $mybb->user['usergroup'] == 4) && $user['lastvisit'] != $user['lastactive'])

			if($user['lastactive'] > $timecut && ($user['invisible'] == 0 || $mybb->usergroup['canviewwolinvis'] == 1) && $user['lastvisit'] != $user['lastactive'])

			{
$status = "online";
}

			{
$status = "online";
}

Zeile 2174Zeile 2264
		while($user = $db->fetch_array($query))
{
$profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']);

		while($user = $db->fetch_array($query))
{
$profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']);

			if($user['lastactive'] > $timecut && ($user['invisible'] == 0 || $mybb->user['usergroup'] == 4) && $user['lastvisit'] != $user['lastactive'])

			if($user['lastactive'] > $timecut && ($user['invisible'] == 0 || $mybb->usergroup['canviewwolinvis'] == 1) && $user['lastvisit'] != $user['lastactive'])

			{
$status = "online";
}

			{
$status = "online";
}

Zeile 2433Zeile 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 2445Zeile 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']."'

				WHERE l.uid='".$mybb->user['uid']."'

				GROUP BY l.gid

				GROUP BY g.gid, g.title, g.type, l.canmanagerequests, l.canmanagemembers

			");
break;
default:

			");
break;
default:

Zeile 2456Zeile 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
");

Zeile 2521Zeile 2610
			}
else
{

			}
else
{

				$leavelink = "<div style=\"text-align: center;\"><a href=\"usercp.php?action=usergroups&leavegroup=".$usergroup['gid']."&amp;my_post_key={$mybb->post_code}\">".$lang->usergroup_leave."</a></div>";

				$leavelink = "<div style=\"text-align: center;\"><a href=\"usercp.php?action=usergroups&amp;leavegroup=".$usergroup['gid']."&amp;my_post_key={$mybb->post_code}\">".$lang->usergroup_leave."</a></div>";

			}
if($usergroup['description'])
{

			}
if($usergroup['description'])
{

Zeile 2730Zeile 2819
	{
error($lang->no_attachments_selected);
}

	{
error($lang->no_attachments_selected);
}

	$aids = $db->escape_string(implode(",", $mybb->input['attachments']));

	$aids = implode(',', array_map('intval', $mybb->input['attachments']));

	$query = $db->simple_select("attachments", "*", "aid IN ($aids) AND uid='".$mybb->user['uid']."'");
while($attachment = $db->fetch_array($query))
{

	$query = $db->simple_select("attachments", "*", "aid IN ($aids) AND uid='".$mybb->user['uid']."'");
while($attachment = $db->fetch_array($query))
{