Vergleich usercp.php - 1.6.2 - 1.6.5

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: usercp.php 5142 2010-07-29 23:36:56Z RyanGordon $

 * $Id: usercp.php 5616 2011-09-20 13:24:59Z Tomm $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 402Zeile 402
	$query = $db->simple_select("profilefields", "*", "editable=1", array('order_by' => 'disporder'));
while($profilefield = $db->fetch_array($query))
{

	$query = $db->simple_select("profilefields", "*", "editable=1", array('order_by' => 'disporder'));
while($profilefield = $db->fetch_array($query))
{

 
		// Does this field have a minimum post count?
if($profilefield['postnum'] && $profilefield['postnum'] > $user['postnum'])
{
continue;
}


		$profilefield['type'] = htmlspecialchars_uni($profilefield['type']);

		$profilefield['type'] = htmlspecialchars_uni($profilefield['type']);

 
		$profilefield['name'] = htmlspecialchars_uni($profilefield['name']);

		$profilefield['description'] = htmlspecialchars_uni($profilefield['description']);
$thing = explode("\n", $profilefield['type'], "2");
$type = $thing[0];

		$profilefield['description'] = htmlspecialchars_uni($profilefield['description']);
$thing = explode("\n", $profilefield['type'], "2");
$type = $thing[0];

Zeile 432Zeile 439
				foreach($useropts as $key => $val)
{
$val = htmlspecialchars_uni($val);

				foreach($useropts as $key => $val)
{
$val = htmlspecialchars_uni($val);

					$seloptions[$val] = $val;
}
}
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{
$val = trim($val);
$val = str_replace("\n", "\\n", $val);

					$seloptions[$val] = $val;
}
}
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{
$val = trim($val);
$val = str_replace("\n", "\\n", $val);


$sel = "";
if($val == $seloptions[$val])


$sel = "";
if($val == $seloptions[$val])

Zeile 576Zeile 583
		{
$defaulttitle = $mybb->usergroup['usertitle'];
}

		{
$defaulttitle = $mybb->usergroup['usertitle'];
}

		if(empty($user['usertitle']))



if(trim($user['usertitle']) == '')

		{
$lang->current_custom_usertitle = '';

		{
$lang->current_custom_usertitle = '';

		}

		}

		else
{
if($errors)

		else
{
if($errors)

Zeile 594Zeile 602
	{
$customtitle = "";
}

	{
$customtitle = "";
}

	

	

	$plugins->run_hooks("usercp_profile_end");

eval("\$editprofile = \"".$templates->get("usercp_profile")."\";");
output_page($editprofile);

	$plugins->run_hooks("usercp_profile_end");

eval("\$editprofile = \"".$templates->get("usercp_profile")."\";");
output_page($editprofile);

}

}


if($mybb->input['action'] == "do_options" && $mybb->request_method == "post")
{


if($mybb->input['action'] == "do_options" && $mybb->request_method == "post")
{

Zeile 677Zeile 685
	if($errors != '')
{
$user = $mybb->input;

	if($errors != '')
{
$user = $mybb->input;

	}
else

	}
else

	{
$user = $mybb->user;
}

	{
$user = $mybb->user;
}

Zeile 692Zeile 700
			$sel = " selected=\"selected\"";
}
$langoptions .= "<option value=\"$lname\"$sel>".htmlspecialchars_uni($language)."</option>\n";

			$sel = " selected=\"selected\"";
}
$langoptions .= "<option value=\"$lname\"$sel>".htmlspecialchars_uni($language)."</option>\n";

	}


	}


	// Lets work out which options the user has selected and check the boxes
if($user['allownotices'] == 1)
{
$allownoticescheck = "checked=\"checked\"";

	// Lets work out which options the user has selected and check the boxes
if($user['allownotices'] == 1)
{
$allownoticescheck = "checked=\"checked\"";

	}

	}

	else
{
$allownoticescheck = "";

	else
{
$allownoticescheck = "";

	}


	}


	if($user['invisible'] == 1)
{
$invisiblecheck = "checked=\"checked\"";

	if($user['invisible'] == 1)
{
$invisiblecheck = "checked=\"checked\"";

Zeile 716Zeile 724
	if($user['hideemail'] == 1)
{
$hideemailcheck = "checked=\"checked\"";

	if($user['hideemail'] == 1)
{
$hideemailcheck = "checked=\"checked\"";

	}
else

	}
else

	{
$hideemailcheck = "";
}

	{
$hideemailcheck = "";
}

Zeile 729Zeile 737
	else if($user['subscriptionmethod'] == 2)
{
$instant_email_subscribe_selected = "selected=\"selected\"";

	else if($user['subscriptionmethod'] == 2)
{
$instant_email_subscribe_selected = "selected=\"selected\"";

	}
else

	}
else


{
$no_subscribe_selected = "selected=\"selected\"";


{
$no_subscribe_selected = "selected=\"selected\"";

	}

	}


if($user['showsigs'] == 1)
{
$showsigscheck = "checked=\"checked\"";


if($user['showsigs'] == 1)
{
$showsigscheck = "checked=\"checked\"";

	}

	}

	else
{
$showsigscheck = "";

	else
{
$showsigscheck = "";

	}

	}


if($user['showavatars'] == 1)
{


if($user['showavatars'] == 1)
{

Zeile 753Zeile 761
	{
$showavatarscheck = "";
}

	{
$showavatarscheck = "";
}


if($user['showquickreply'] == 1)
{
$showquickreplycheck = "checked=\"checked\"";
}
else


if($user['showquickreply'] == 1)
{
$showquickreplycheck = "checked=\"checked\"";
}
else

	{
$showquickreplycheck = "";
}

if($user['receivepms'] == 1)

	{
$showquickreplycheck = "";
}

if($user['receivepms'] == 1)

	{

	{

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

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

Zeile 779Zeile 787
	else
{
$receivefrombuddycheck = "";

	else
{
$receivefrombuddycheck = "";

	}

	}


if($user['pmnotice'] == 1 || $user['pmnotice'] == 2)
{
$pmnoticecheck = " checked=\"checked\"";


if($user['pmnotice'] == 1 || $user['pmnotice'] == 2)
{
$pmnoticecheck = " checked=\"checked\"";

	}

	}

	else
{
$pmnoticecheck = "";

	else
{
$pmnoticecheck = "";

Zeile 793Zeile 801
	if($user['dstcorrection'] == 2)
{
$dst_auto_selected = "selected=\"selected\"";

	if($user['dstcorrection'] == 2)
{
$dst_auto_selected = "selected=\"selected\"";

	}

	}

	else if($user['dstcorrection'] == 1)
{
$dst_enabled_selected = "selected=\"selected\"";

	else if($user['dstcorrection'] == 1)
{
$dst_enabled_selected = "selected=\"selected\"";

	}

	}

	else
{
$dst_disabled_selected = "selected=\"selected\"";

	else
{
$dst_disabled_selected = "selected=\"selected\"";

	}

	}


if($user['showcodebuttons'] == 1)
{
$showcodebuttonscheck = "checked=\"checked\"";


if($user['showcodebuttons'] == 1)
{
$showcodebuttonscheck = "checked=\"checked\"";

	}

	}

	else
{
$showcodebuttonscheck = "";

	else
{
$showcodebuttonscheck = "";

	}

	}


if($user['showredirect'] != 0)
{


if($user['showredirect'] != 0)
{

Zeile 819Zeile 827
	else
{
$showredirectcheck = "";

	else
{
$showredirectcheck = "";

	}

	}


if($user['pmnotify'] != 0)
{


if($user['pmnotify'] != 0)
{

Zeile 828Zeile 836
	else
{
$pmnotifycheck = '';

	else
{
$pmnotifycheck = '';

	}


if($user['threadmode'] != "threaded" && $user['threadmode'] != "linear")
{

	}


if($user['threadmode'] != "threaded" && $user['threadmode'] != "linear")
{

		$user['threadmode'] = ''; // Leave blank to show default
}

if($user['classicpostbit'] != 0)

		$user['threadmode'] = ''; // Leave blank to show default
}

if($user['classicpostbit'] != 0)

	{

	{

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

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

Zeile 856Zeile 864
		else
{
$date_format_options .= "<option value=\"$key\">".my_date($format, TIME_NOW, "", 0)."</option>";

		else
{
$date_format_options .= "<option value=\"$key\">".my_date($format, TIME_NOW, "", 0)."</option>";

		}

		}

	}

$time_format_options = "<option value=\"0\">{$lang->use_default}</option>";

	}

$time_format_options = "<option value=\"0\">{$lang->use_default}</option>";

Zeile 869Zeile 877
		else
{
$time_format_options .= "<option value=\"$key\">".my_date($format, TIME_NOW, "", 0)."</option>";

		else
{
$time_format_options .= "<option value=\"$key\">".my_date($format, TIME_NOW, "", 0)."</option>";

		}
}

		}
}


$tzselect = build_timezone_select("timezoneoffset", $mybb->user['timezone'], true);



$tzselect = build_timezone_select("timezoneoffset", $mybb->user['timezone'], true);


Zeile 1026Zeile 1034

$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
{
// Set up user handler.

	{
$errors[] = $lang->error_invalidpassword;
}
else
{
// Set up user handler.

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


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


Zeile 1046Zeile 1054
		if(!$userhandler->validate_user())
{
$errors = $userhandler->get_friendly_errors();

		if(!$userhandler->validate_user())
{
$errors = $userhandler->get_friendly_errors();

		}

		}

		else
{
$userhandler->update_user();

		else
{
$userhandler->update_user();

Zeile 1060Zeile 1068
			$mybb->input['action'] = "password";
$errors = inline_error($errors);
}

			$mybb->input['action'] = "password";
$errors = inline_error($errors);
}

}


}


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

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

Zeile 1071Zeile 1079
}

if($mybb->input['action'] == "do_changename" && $mybb->request_method == "post")

}

if($mybb->input['action'] == "do_changename" && $mybb->request_method == "post")

{

{

	// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


	// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


Zeile 1346Zeile 1354
			else
{
$icon = "&nbsp;";

			else
{
$icon = "&nbsp;";

			}

			}


// Determine the folder
$folder = '';
$folder_label = '';


// Determine the folder
$folder = '';
$folder_label = '';





			if($thread['doticon'])
{
$folder = "dot_";
$folder_label .= $lang->icon_dot;

			if($thread['doticon'])
{
$folder = "dot_";
$folder_label .= $lang->icon_dot;

			}

			}


$gotounread = '';
$isnew = 0;


$gotounread = '';
$isnew = 0;

Zeile 1384Zeile 1392
			}

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

			}

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

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

			{
if($thread['lastread'])

				{

				{

					if($thread['lastread'])
{
$lastread = $thread['lastread'];
}
else
{
$lastread = 1;
}

					$lastread = $thread['lastread'];
}
else
{
$lastread = 1;




				}
}


				}
}


Zeile 1411Zeile 1416
				}
}


				}
}


			if($thread['lastpost'] > $lastread && $lastread)

			if($lastread && $lastread < $thread['lastpost'])

			{
$folder .= "new";
$folder_label .= $lang->icon_new;

			{
$folder .= "new";
$folder_label .= $lang->icon_new;

Zeile 1500Zeile 1505
	}

if($mybb->user['uid'] == 0)

	}

if($mybb->user['uid'] == 0)

	{
// Build a forum cache.

	{
// Build a forum cache.

		$query = $db->query("
SELECT fid
FROM ".TABLE_PREFIX."forums

		$query = $db->query("
SELECT fid
FROM ".TABLE_PREFIX."forums

Zeile 1651Zeile 1656
	if($mybb->user['suspendsignature'] && ($mybb->user['suspendsigtime'] == 0 || $mybb->user['suspendsigtime'] > 0 && $mybb->user['suspendsigtime'] > TIME_NOW))
{
// User currently has no signature and they're suspended

	if($mybb->user['suspendsignature'] && ($mybb->user['suspendsigtime'] == 0 || $mybb->user['suspendsigtime'] > 0 && $mybb->user['suspendsigtime'] > TIME_NOW))
{
// User currently has no signature and they're suspended

 
		error($lang->sig_suspended);
}

if($mybb->usergroup['canusesig'] != 1)
{
// Usergroup has no permission to use this facility

		error_no_permission();

		error_no_permission();

 
	}
else if($mybb->usergroup['canusesig'] == 1 && $mybb->usergroup['canusesigxposts'] > 0 && $mybb->user['postnum'] < $mybb->usergroup['canusesigxposts'])
{
// Usergroup can use this facility, but only after x posts
error($lang->sprintf($lang->sig_suspended_posts, $mybb->usergroup['canusesigxposts']));

	}

if($sig && $template)

	}

if($sig && $template)

Zeile 1980Zeile 1996
			$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>";
}
elseif($mybb->user['avatartype'] == "remote" || my_strpos(my_strtolower($mybb->user['avatar']), "http://") !== false)

			$avatarmsg = "<br /><strong>".$lang->using_gallery_avatar."</strong>";
}
elseif($mybb->user['avatartype'] == "remote" || my_strpos(my_strtolower($mybb->user['avatar']), "http://") !== false)

Zeile 2135Zeile 2151
			if($mybb->input['manage'] == "ignored")
{
$message = $lang->users_added_to_ignore_list;

			if($mybb->input['manage'] == "ignored")
{
$message = $lang->users_added_to_ignore_list;

			}
else

			}
else

			{
$message = $lang->users_added_to_buddy_list;
}

			{
$message = $lang->users_added_to_buddy_list;
}

Zeile 2213Zeile 2229
	{
$user['ignorelist'] = $db->escape_string($new_list);
$mybb->user['ignorelist'] = $user['ignorelist'];

	{
$user['ignorelist'] = $db->escape_string($new_list);
$mybb->user['ignorelist'] = $user['ignorelist'];

	}
else

	}
else

	{
$user['buddylist'] = $db->escape_string($new_list);
$mybb->user['buddylist'] = $user['buddylist'];

	{
$user['buddylist'] = $db->escape_string($new_list);
$mybb->user['buddylist'] = $user['buddylist'];

Zeile 2293Zeile 2309
	{
$type = "buddy";
$query = $db->simple_select("users", "*", "uid IN ({$mybb->user['buddylist']})", array("order_by" => "username"));

	{
$type = "buddy";
$query = $db->simple_select("users", "*", "uid IN ({$mybb->user['buddylist']})", array("order_by" => "username"));

		while($user = $db->fetch_array($query))
{

		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->usergroup['canviewwolinvis'] == 1) && $user['lastvisit'] != $user['lastactive'])
{

			$profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']);
if($user['lastactive'] > $timecut && ($user['invisible'] == 0 || $mybb->usergroup['canviewwolinvis'] == 1) && $user['lastvisit'] != $user['lastactive'])
{

Zeile 2924Zeile 2940
{
// Get posts per day
$daysreg = (TIME_NOW - $mybb->user['regdate']) / (24*3600);

{
// Get posts per day
$daysreg = (TIME_NOW - $mybb->user['regdate']) / (24*3600);

 

if($daysreg < 1)
{
$daysreg = 1;
}


	$perday = $mybb->user['postnum'] / $daysreg;
$perday = round($perday, 2);
if($perday > $mybb->user['postnum'])

	$perday = $mybb->user['postnum'] / $daysreg;
$perday = round($perday, 2);
if($perday > $mybb->user['postnum'])

Zeile 3147Zeile 3169
				{
$folder = '';
$folder_label = '';

				{
$folder = '';
$folder_label = '';

 
					$gotounread = '';


if($thread['tid'])
{


if($thread['tid'])
{