Vergleich member.php - 1.6.5 - 1.6.7

  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: member.php 5616 2011-09-20 13:24:59Z Tomm $

 * $Id: member.php 5753 2012-03-09 14:53:07Z Tomm $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 277Zeile 277
			);
$db->insert_query("awaitingactivation", $activationarray);
$emailsubject = $lang->sprintf($lang->emailsubject_activateaccount, $mybb->settings['bbname']);

			);
$db->insert_query("awaitingactivation", $activationarray);
$emailsubject = $lang->sprintf($lang->emailsubject_activateaccount, $mybb->settings['bbname']);

			$emailmessage = $lang->sprintf($lang->email_activateaccount, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);















			switch($mybb->settings['username_method'])
{
case 0:
$emailmessage = $lang->sprintf($lang->email_activateaccount, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);
break;
case 1:
$emailmessage = $lang->sprintf($lang->email_activateaccount1, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);
break;
case 2:
$emailmessage = $lang->sprintf($lang->email_activateaccount2, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);
break;
default:
$emailmessage = $lang->sprintf($lang->email_activateaccount, $user_info['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user_info['uid'], $activationcode);
break;
}

			my_mail($user_info['email'], $emailsubject, $emailmessage);

$lang->redirect_registered_activation = $lang->sprintf($lang->redirect_registered_activation, $mybb->settings['bbname'], $user_info['username']);

			my_mail($user_info['email'], $emailsubject, $emailmessage);

$lang->redirect_registered_activation = $lang->sprintf($lang->redirect_registered_activation, $mybb->settings['bbname'], $user_info['username']);

Zeile 289Zeile 303
		else if($mybb->settings['regtype'] == "randompass")
{
$emailsubject = $lang->sprintf($lang->emailsubject_randompassword, $mybb->settings['bbname']);

		else if($mybb->settings['regtype'] == "randompass")
{
$emailsubject = $lang->sprintf($lang->emailsubject_randompassword, $mybb->settings['bbname']);

			$emailmessage = $lang->sprintf($lang->email_randompassword, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']);















			switch($mybb->settings['username_method'])
{
case 0:
$emailmessage = $lang->sprintf($lang->email_randompassword, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']);
break;
case 1:
$emailmessage = $lang->sprintf($lang->email_randompassword1, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']);
break;
case 2:
$emailmessage = $lang->sprintf($lang->email_randompassword2, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']);
break;
default:
$emailmessage = $lang->sprintf($lang->email_randompassword, $user['username'], $mybb->settings['bbname'], $user_info['username'], $user_info['password']);
break;
}

			my_mail($user_info['email'], $emailsubject, $emailmessage);

$plugins->run_hooks("member_do_register_end");

			my_mail($user_info['email'], $emailsubject, $emailmessage);

$plugins->run_hooks("member_do_register_end");

Zeile 749Zeile 777

if($mybb->input['username'])
{


if($mybb->input['username'])
{

		$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'", array('limit' => 1));















		switch($mybb->settings['username'])
{
case 0:
$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'", array('limit' => 1));
break;
case 1:
$query = $db->simple_select("users", "*", "LOWER(email)='".$db->escape_string(my_strtolower($mybb->input['username']))."'", array('limit' => 1));
break;
case 2:
$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."' OR LOWER(email)='".$db->escape_string(my_strtolower($mybb->input['username']))."'", array('limit' => 1));
break;
default:
$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'", array('limit' => 1));
break;
}

		$user = $db->fetch_array($query);
if(!$user['username'])
{

		$user = $db->fetch_array($query);
if(!$user['username'])
{

			error($lang->error_invalidpworusername);















			switch($mybb->settings['username_method'])
{
case 0:
error($lang->error_invalidpworusername);
break;
case 1:
error($lang->error_invalidpworusername1);
break;
case 2:
error($lang->error_invalidpworusername2);
break;
default:
error($lang->error_invalidpworusername);
break;
}

		}
$uid = $user['uid'];
}

		}
$uid = $user['uid'];
}

Zeile 779Zeile 835
		if($user['usergroup'] == 5 && $activation['type'] != "e")
{
$db->update_query("users", array("usergroup" => 2), "uid='".$user['uid']."'");

		if($user['usergroup'] == 5 && $activation['type'] != "e")
{
$db->update_query("users", array("usergroup" => 2), "uid='".$user['uid']."'");

		}

		}

		if($activation['type'] == "e")
{
$newemail = array(

		if($activation['type'] == "e")
{
$newemail = array(

Zeile 822Zeile 878
	eval("\$activate = \"".$templates->get("member_resendactivation")."\";");
output_page($activate);
}

	eval("\$activate = \"".$templates->get("member_resendactivation")."\";");
output_page($activate);
}





if($mybb->input['action'] == "do_resendactivation" && $mybb->request_method == "post")
{
$plugins->run_hooks("member_do_resendactivation_start");

if($mybb->input['action'] == "do_resendactivation" && $mybb->request_method == "post")
{
$plugins->run_hooks("member_do_resendactivation_start");

Zeile 866Zeile 922
				$email = $user['email'];
$activationcode = $user['code'];
$emailsubject = $lang->sprintf($lang->emailsubject_activateaccount, $mybb->settings['bbname']);

				$email = $user['email'];
$activationcode = $user['code'];
$emailsubject = $lang->sprintf($lang->emailsubject_activateaccount, $mybb->settings['bbname']);

				$emailmessage = $lang->sprintf($lang->email_activateaccount, $user['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user['uid'], $activationcode);















				switch($mybb->settings['username_method'])
{
case 0:
$emailmessage = $lang->sprintf($lang->email_activateaccount, $user['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user['uid'], $activationcode);
break;
case 1:
$emailmessage = $lang->sprintf($lang->email_activateaccount1, $user['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user['uid'], $activationcode);
break;
case 2:
$emailmessage = $lang->sprintf($lang->email_activateaccount2, $user['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user['uid'], $activationcode);
break;
default:
$emailmessage = $lang->sprintf($lang->email_activateaccount, $user['username'], $mybb->settings['bbname'], $mybb->settings['bburl'], $user['uid'], $activationcode);
break;
}

				my_mail($email, $emailsubject, $emailmessage);
}
}

				my_mail($email, $emailsubject, $emailmessage);
}
}

Zeile 914Zeile 984
			$email = $user['email'];
$activationcode = $user['activationcode'];
$emailsubject = $lang->sprintf($lang->emailsubject_lostpw, $mybb->settings['bbname']);

			$email = $user['email'];
$activationcode = $user['activationcode'];
$emailsubject = $lang->sprintf($lang->emailsubject_lostpw, $mybb->settings['bbname']);

			$emailmessage = $lang->sprintf($lang->email_lostpw, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode);















			switch($mybb->settings['username_method'])
{
case 0:
$emailmessage = $lang->sprintf($lang->email_lostpw, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode);
break;
case 1:
$emailmessage = $lang->sprintf($lang->email_lostpw1, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode);
break;
case 2:
$emailmessage = $lang->sprintf($lang->email_lostpw2, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode);
break;
default:
$emailmessage = $lang->sprintf($lang->email_lostpw, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode);
break;
}

			my_mail($email, $emailsubject, $emailmessage);
}
}

			my_mail($email, $emailsubject, $emailmessage);
}
}

Zeile 929Zeile 1013

if($mybb->input['username'])
{


if($mybb->input['username'])
{

		$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'");















		switch($mybb->settings['username_method'])
{
case 0:
$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'");
break;
case 1:
$query = $db->simple_select("users", "*", "LOWER(email)='".$db->escape_string(my_strtolower($mybb->input['username']))."'");
break;
case 2:
$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."' OR LOWER(email)='".$db->escape_string(my_strtolower($mybb->input['username']))."'");
break;
default:
$query = $db->simple_select("users", "*", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'");
break;
}

		$user = $db->fetch_array($query);
if(!$user['uid'])
{

		$user = $db->fetch_array($query);
if(!$user['uid'])
{

			error($lang->error_invalidpworusername);















			switch($mybb->settings['username_method'])
{
case 0:
error($lang->error_invalidpworusername);
break;
case 1:
error($lang->error_invalidpworusername1);
break;
case 2:
error($lang->error_invalidpworusername2);
break;
default:
error($lang->error_invalidpworusername);
break;
}

		}
}
else

		}
}
else

Zeile 942Zeile 1054
		$user = $db->fetch_array($query);
}
if($mybb->input['code'] && $user['uid'])

		$user = $db->fetch_array($query);
}
if($mybb->input['code'] && $user['uid'])

	{

	{

		$query = $db->simple_select("awaitingactivation", "*", "uid='".$user['uid']."' AND type='p'");
$activation = $db->fetch_array($query);
$now = TIME_NOW;

		$query = $db->simple_select("awaitingactivation", "*", "uid='".$user['uid']."' AND type='p'");
$activation = $db->fetch_array($query);
$now = TIME_NOW;

Zeile 979Zeile 1091
	else
{
$plugins->run_hooks("member_resetpassword_form");

	else
{
$plugins->run_hooks("member_resetpassword_form");

 
		
switch($mybb->settings['username_method'])
{
case 0:
$lang_username = $lang->username;
break;
case 1:
$lang_username = $lang->username1;
break;
case 2:
$lang_username = $lang->username2;
break;
default:
$lang_username = $lang->username;
break;
}


eval("\$activate = \"".$templates->get("member_resetpassword")."\";");
output_page($activate);


eval("\$activate = \"".$templates->get("member_resetpassword")."\";");
output_page($activate);

Zeile 1007Zeile 1135
	if(!username_exists($mybb->input['username']))
{
my_setcookie('loginattempts', $logins + 1);

	if(!username_exists($mybb->input['username']))
{
my_setcookie('loginattempts', $logins + 1);

		error($lang->error_invalidpworusername.$login_text);















		switch($mybb->settings['username_method'])
{
case 0:
error($lang->error_invalidpworusername.$login_text);
break;
case 1:
error($lang->error_invalidpworusername1.$login_text);
break;
case 2:
error($lang->error_invalidpworusername2.$login_text);
break;
default:
error($lang->error_invalidpworusername.$login_text);
break;
}

	}


	}


	$query = $db->simple_select("users", "loginattempts", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."'", array('limit' => 1));
$loginattempts = $db->fetch_field($query, "loginattempts");


	$query = $db->simple_select("users", "loginattempts", "LOWER(username)='".$db->escape_string(my_strtolower($mybb->input['username']))."' OR LOWER(email)='".$db->escape_string(my_strtolower($mybb->input['username']))."'", array('limit' => 1));
$loginattempts = $db->fetch_field($query, "loginattempts");


	$errors = array();

$user = validate_password_from_username($mybb->input['username'], $mybb->input['password']);

	$errors = array();

$user = validate_password_from_username($mybb->input['username'], $mybb->input['password']);

Zeile 1020Zeile 1162
	{
my_setcookie('loginattempts', $logins + 1);
$db->update_query("users", array('loginattempts' => 'loginattempts+1'), "LOWER(username) = '".$db->escape_string(my_strtolower($mybb->input['username']))."'", 1, true);

	{
my_setcookie('loginattempts', $logins + 1);
$db->update_query("users", array('loginattempts' => 'loginattempts+1'), "LOWER(username) = '".$db->escape_string(my_strtolower($mybb->input['username']))."'", 1, true);

		
$mybb->input['action'] = "login";

		
$mybb->input['action'] = "login";

		$mybb->input['request_method'] = "get";

		$mybb->input['request_method'] = "get";

		

		

		if($mybb->settings['failedlogincount'] != 0 && $mybb->settings['failedlogintext'] == 1)

		if($mybb->settings['failedlogincount'] != 0 && $mybb->settings['failedlogintext'] == 1)

		{

		{

			$login_text = $lang->sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins);

			$login_text = $lang->sprintf($lang->failed_login_again, $mybb->settings['failedlogincount'] - $logins);

		}

		}

		

		

		$errors[] = $lang->error_invalidpworusername.$login_text;















		switch($mybb->settings['username_method'])
{
case 0:
$errors[] = $lang->error_invalidpworusername.$login_text;
break;
case 1:
$errors[] = $lang->error_invalidpworusername1.$login_text;
break;
case 2:
$errors[] = $lang->error_invalidpworusername2.$login_text;
break;
default:
$errors[] = $lang->error_invalidpworusername.$login_text;
break;
}

	}
else
{

	}
else
{

Zeile 1122Zeile 1278
		else
{
redirect("index.php", $lang->redirect_loggedin);

		else
{
redirect("index.php", $lang->redirect_loggedin);

		}
}
else
{

		}
}
else
{

		$mybb->input['action'] = "login";
$mybb->input['request_method'] = "get";

		$mybb->input['action'] = "login";
$mybb->input['request_method'] = "get";

	}


	}


	$plugins->run_hooks("member_do_login_end");
}

	$plugins->run_hooks("member_do_login_end");
}





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

$member_loggedin_notice = "";
if($mybb->user['uid'] != 0)

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

$member_loggedin_notice = "";
if($mybb->user['uid'] != 0)

	{

	{

		$lang->already_logged_in = $lang->sprintf($lang->already_logged_in, build_profile_link($mybb->user['username'], $mybb->user['uid']));
eval("\$member_loggedin_notice = \"".$templates->get("member_loggedin_notice")."\";");
}

		$lang->already_logged_in = $lang->sprintf($lang->already_logged_in, build_profile_link($mybb->user['username'], $mybb->user['uid']));
eval("\$member_loggedin_notice = \"".$templates->get("member_loggedin_notice")."\";");
}

Zeile 1152Zeile 1308
	if($_SERVER['HTTP_REFERER'] && strpos($_SERVER['HTTP_REFERER'], "action=login") === false)
{
$redirect_url = htmlentities($_SERVER['HTTP_REFERER']);

	if($_SERVER['HTTP_REFERER'] && strpos($_SERVER['HTTP_REFERER'], "action=login") === false)
{
$redirect_url = htmlentities($_SERVER['HTTP_REFERER']);

	}

	}

	else
{
$redirect_url = '';

	else
{
$redirect_url = '';

	}

	}


$captcha = "";
// Show captcha image for guests if enabled


$captcha = "";
// Show captcha image for guests if enabled

Zeile 1178Zeile 1334
	if($mybb->input['username'] && $mybb->request_method == "post")
{
$username = htmlspecialchars_uni($mybb->input['username']);

	if($mybb->input['username'] && $mybb->request_method == "post")
{
$username = htmlspecialchars_uni($mybb->input['username']);

	}


	}


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

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

	{

	{

		$password = htmlspecialchars_uni($mybb->input['password']);
}

		$password = htmlspecialchars_uni($mybb->input['password']);
}














	
switch($mybb->settings['username_method'])
{
case 1:
$lang->username = $lang->username1;
break;
case 2:
$lang->username = $lang->username2;
break;
default:
break;
}

	eval("\$login = \"".$templates->get("member_login")."\";");
output_page($login);
}

	eval("\$login = \"".$templates->get("member_login")."\";");
output_page($login);
}

Zeile 1230Zeile 1397
	$plugins->run_hooks("member_profile_start");

if($mybb->usergroup['canviewprofiles'] == 0)

	$plugins->run_hooks("member_profile_start");

if($mybb->usergroup['canviewprofiles'] == 0)

	{

	{

		error_no_permission();
}
if($mybb->input['uid'] == "lastposter")

		error_no_permission();
}
if($mybb->input['uid'] == "lastposter")

Zeile 1307Zeile 1474
	$lang->users_forum_info = $lang->sprintf($lang->users_forum_info, $memprofile['username']);
$lang->users_contact_details = $lang->sprintf($lang->users_contact_details, $memprofile['username']);


	$lang->users_forum_info = $lang->sprintf($lang->users_forum_info, $memprofile['username']);
$lang->users_contact_details = $lang->sprintf($lang->users_contact_details, $memprofile['username']);


	if($mybb->settings['enablepms'] != 0 && $memprofile['receivepms'] != 0 && $memperms['canusepms'] != 0 && my_strpos(",".$memprofile['ignorelist'].",", ",".$mybb->user['uid'].",") === false)

	if($mybb->settings['enablepms'] != 0 && (($memprofile['receivepms'] != 0 && $memperms['canusepms'] != 0 && my_strpos(",".$memprofile['ignorelist'].",", ",".$mybb->user['uid'].",") === false) || $mybb->usergroup['canoverridepm'] == 1))

	{
$lang->send_pm = $lang->sprintf($lang->send_pm, $memprofile['username']);
}

	{
$lang->send_pm = $lang->sprintf($lang->send_pm, $memprofile['username']);
}

Zeile 1333Zeile 1500
	else
{
$avatar = '';

	else
{
$avatar = '';

	}

if($memprofile['hideemail'] != 1)
{

	}

if($memprofile['hideemail'] != 1 && (my_strpos(",".$memprofile['ignorelist'].",", ",".$mybb->user['uid'].",") === false || $mybb->usergroup['cansendemailoverride'] != 0))
{

		eval("\$sendemail = \"".$templates->get("member_profile_email")."\";");
}
else

		eval("\$sendemail = \"".$templates->get("member_profile_email")."\";");
}
else

Zeile 1377Zeile 1544
			"allow_mycode" => $mybb->settings['sigmycode'],
"allow_smilies" => $mybb->settings['sigsmilies'],
"allow_imgcode" => $mybb->settings['sigimgcode'],

			"allow_mycode" => $mybb->settings['sigmycode'],
"allow_smilies" => $mybb->settings['sigsmilies'],
"allow_imgcode" => $mybb->settings['sigimgcode'],

			"me_username" => $memprofile['username']


			"me_username" => $memprofile['username'],
"filter_badwords" => 1

		);

$memprofile['signature'] = $parser->parse_message($memprofile['signature'], $sig_parser);

		);

$memprofile['signature'] = $parser->parse_message($memprofile['signature'], $sig_parser);

Zeile 1387Zeile 1555
	$daysreg = (TIME_NOW - $memprofile['regdate']) / (24*3600);

if($daysreg < 1)

	$daysreg = (TIME_NOW - $memprofile['regdate']) / (24*3600);

if($daysreg < 1)

	{

	{

		$daysreg = 1;

		$daysreg = 1;

	}


	}


	$ppd = $memprofile['postnum'] / $daysreg;
$ppd = round($ppd, 2);
if($ppd > $memprofile['postnum'])
{
$ppd = $memprofile['postnum'];

	$ppd = $memprofile['postnum'] / $daysreg;
$ppd = round($ppd, 2);
if($ppd > $memprofile['postnum'])
{
$ppd = $memprofile['postnum'];

	}

	}

	$stats = $cache->read("stats");
$numposts = $stats['numposts'];
if($numposts == 0)
{
$percent = "0";

	$stats = $cache->read("stats");
$numposts = $stats['numposts'];
if($numposts == 0)
{
$percent = "0";

	}

	}

	else
{
$percent = $memprofile['postnum']*100/$numposts;

	else
{
$percent = $memprofile['postnum']*100/$numposts;

Zeile 1412Zeile 1580
	if($percent > 100)
{
$percent = 100;

	if($percent > 100)
{
$percent = 100;

	}


	}


	if(!empty($memprofile['icq']))
{
$memprofile['icq'] = intval($memprofile['icq']);

	if(!empty($memprofile['icq']))
{
$memprofile['icq'] = intval($memprofile['icq']);

Zeile 1464Zeile 1632
				
// Update our status to "not away"
$memprofile['away'] = 0;

				
// Update our status to "not away"
$memprofile['away'] = 0;

			}
}

			}
}

		
// Check if our away status is set to 1, it may have been updated already (see a few lines above)
if ($memprofile['away'] == 1)

		
// Check if our away status is set to 1, it may have been updated already (see a few lines above)
if ($memprofile['away'] == 1)

Zeile 1544Zeile 1712
		else if($memprofile['birthdayprivacy'] == 'none')
{
$membday = $lang->birthdayhidden;

		else if($memprofile['birthdayprivacy'] == 'none')
{
$membday = $lang->birthdayhidden;

			$membdayage = '';
}
}
else

			$membdayage = '';
}
}
else

	{
$membday = $lang->not_specified;
$membdayage = '';

	{
$membday = $lang->not_specified;
$membdayage = '';

Zeile 1585Zeile 1753
	else
{
// No usergroup title so get a default one

	else
{
// No usergroup title so get a default one

		$query = $db->simple_select("usertitles", "*", "", array('order_by' => 'posts', 'order_dir' => 'DESC'));
while($title = $db->fetch_array($query))


		$usertitles = $cache->read('usertitles');

if(is_array($usertitles))

		{

		{

			if($memprofile['postnum'] >= $title['posts'])

			foreach($usertitles as $title)

			{

			{

				$usertitle = $title['title'];
$stars = $title['stars'];
$starimage = $title['starimage'];
break;





				if($memprofile['postnum'] >= $title['posts'])
{
$usertitle = $title['title'];
$stars = $title['stars'];
$starimage = $title['starimage'];

break;
}

			}

			}

		}
}

		}
}

	
if($displaygroup['stars'] || $displaygroup['usertitle'])
{

	
if($displaygroup['stars'] || $displaygroup['usertitle'])
{

Zeile 1605Zeile 1778
	}
elseif(!$stars)
{

	}
elseif(!$stars)
{

		// This is for cases where the user has a title, but the group has no defined number of stars (use number of stars as per default usergroups)
$query = $db->simple_select("usertitles", "*", "", array('order_by' => 'posts', 'order_dir' => 'DESC'));
while($title = $db->fetch_array($query))

		if(!is_array($usertitles))



		{

		{

			if($memprofile['postnum'] >= $title['posts'])







			$usertitles = $cache->read('usertitles');
}

// This is for cases where the user has a title, but the group has no defined number of stars (use number of stars as per default usergroups)
if(is_array($usertitles))
{
foreach($usertitles as $title)

			{

			{

				$stars = $title['stars'];
$starimage = $title['starimage'];
break;




				if($memprofile['postnum'] >= $title['posts'])
{
$stars = $title['stars'];
$starimage = $title['starimage'];
break;
}

			}

			}

		}

		}

	}

if(!empty($displaygroup['image']))
{
if(!empty($mybb->user['language']))

	}

if(!empty($displaygroup['image']))
{
if(!empty($mybb->user['language']))

		{

		{

			$language = $mybb->user['language'];
}
else

			$language = $mybb->user['language'];
}
else

Zeile 1636Zeile 1816
	if(!$starimage)
{
$starimage = $displaygroup['starimage'];

	if(!$starimage)
{
$starimage = $displaygroup['starimage'];

	}


	}


	if($starimage)
{
// Only display stars if we have an image to use...

	if($starimage)
{
// Only display stars if we have an image to use...

Zeile 1713Zeile 1893
		{
eval("\$warn_user = \"".$templates->get("member_profile_warn")."\";");
$warning_link = "warnings.php?uid={$memprofile['uid']}";

		{
eval("\$warn_user = \"".$templates->get("member_profile_warn")."\";");
$warning_link = "warnings.php?uid={$memprofile['uid']}";

		}
else
{

		}
else
{

			$warning_link = "usercp.php";
}
eval("\$warning_level = \"".$templates->get("member_profile_warninglevel")."\";");

			$warning_link = "usercp.php";
}
eval("\$warning_level = \"".$templates->get("member_profile_warninglevel")."\";");

Zeile 1767Zeile 1947
			else
{
$customfieldval = htmlspecialchars_uni($userfields[$field]);

			else
{
$customfieldval = htmlspecialchars_uni($userfields[$field]);

			}

			}

		}

$customfield['name'] = htmlspecialchars_uni($customfield['name']);
eval("\$customfields .= \"".$templates->get("member_profile_customfields_field")."\";");
$bgcolor = alt_trow();

		}

$customfield['name'] = htmlspecialchars_uni($customfield['name']);
eval("\$customfields .= \"".$templates->get("member_profile_customfields_field")."\";");
$bgcolor = alt_trow();

	}

	}

	if($customfields)
{
eval("\$profilefields = \"".$templates->get("member_profile_customfields")."\";");

	if($customfields)
{
eval("\$profilefields = \"".$templates->get("member_profile_customfields")."\";");

Zeile 1784Zeile 1964
	if($memprofile['timeonline'] > 0)
{
$timeonline = nice_time($memprofile['timeonline']);

	if($memprofile['timeonline'] > 0)
{
$timeonline = nice_time($memprofile['timeonline']);

	}
else
{

	}
else
{

		$timeonline = $lang->none_registered;
}

if($mybb->usergroup['cancp'] == 1 && $mybb->config['hide_admin_links'] != 1)
{
eval("\$adminoptions = \"".$templates->get("member_profile_adminoptions")."\";");

		$timeonline = $lang->none_registered;
}

if($mybb->usergroup['cancp'] == 1 && $mybb->config['hide_admin_links'] != 1)
{
eval("\$adminoptions = \"".$templates->get("member_profile_adminoptions")."\";");

	}
else
{

	}
else
{

		$adminoptions = '';
}


		$adminoptions = '';
}


Zeile 1804Zeile 1984
		$memprofile['usernotes'] = nl2br(htmlspecialchars_uni($memprofile['usernotes']));

if(!empty($memprofile['usernotes']))

		$memprofile['usernotes'] = nl2br(htmlspecialchars_uni($memprofile['usernotes']));

if(!empty($memprofile['usernotes']))

		{

		{

			if(strlen($memprofile['usernotes']) > 100)
{
$memprofile['usernotes'] = my_substr($memprofile['usernotes'], 0, 100).'...';

			if(strlen($memprofile['usernotes']) > 100)
{
$memprofile['usernotes'] = my_substr($memprofile['usernotes'], 0, 100).'...';

Zeile 1816Zeile 1996
		}

eval("\$modoptions = \"".$templates->get("member_profile_modoptions")."\";");

		}

eval("\$modoptions = \"".$templates->get("member_profile_modoptions")."\";");

	}
else
{
$modoptions = '';
}

	}
else
{
$modoptions = '';
}

	
$buddy_options = '';


	
$buddy_options = '';


Zeile 1830Zeile 2010
		if(in_array($mybb->input['uid'], $buddy_list))
{
$buddy_options = "<br /><a href=\"./usercp.php?action=do_editlists&amp;delete={$mybb->input['uid']}&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/remove_buddy.gif\" alt=\"{$lang->remove_from_buddy_list}\" /> {$lang->remove_from_buddy_list}</a>";

		if(in_array($mybb->input['uid'], $buddy_list))
{
$buddy_options = "<br /><a href=\"./usercp.php?action=do_editlists&amp;delete={$mybb->input['uid']}&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/remove_buddy.gif\" alt=\"{$lang->remove_from_buddy_list}\" /> {$lang->remove_from_buddy_list}</a>";

		}

		}

		else
{
$buddy_options = "<br /><a href=\"./usercp.php?action=do_editlists&amp;add_username=".urlencode($memprofile['username'])."&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/add_buddy.gif\" alt=\"{$lang->add_to_buddy_list}\" /> {$lang->add_to_buddy_list}</a>";

		else
{
$buddy_options = "<br /><a href=\"./usercp.php?action=do_editlists&amp;add_username=".urlencode($memprofile['username'])."&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/add_buddy.gif\" alt=\"{$lang->add_to_buddy_list}\" /> {$lang->add_to_buddy_list}</a>";

Zeile 1844Zeile 2024
		else
{
$buddy_options .= "<br /><a href=\"./usercp.php?action=do_editlists&amp;manage=ignored&amp;add_username=".urlencode($memprofile['username'])."&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/add_ignore.gif\" alt=\"{$lang->add_to_ignore_list}\" /> {$lang->add_to_ignore_list}</a>";

		else
{
$buddy_options .= "<br /><a href=\"./usercp.php?action=do_editlists&amp;manage=ignored&amp;add_username=".urlencode($memprofile['username'])."&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/add_ignore.gif\" alt=\"{$lang->add_to_ignore_list}\" /> {$lang->add_to_ignore_list}</a>";

		}
}


		}
}


	$plugins->run_hooks("member_profile_end");

eval("\$profile = \"".$templates->get("member_profile")."\";");

	$plugins->run_hooks("member_profile_end");

eval("\$profile = \"".$templates->get("member_profile")."\";");

Zeile 1872Zeile 2052
		$query = $db->simple_select("maillogs", "COUNT(*) AS sent_count", "fromuid='{$mybb->user['uid']}' AND dateline >= '".(TIME_NOW - (60*60*24))."'");
$sent_count = $db->fetch_field($query, "sent_count");
if($sent_count >= $mybb->usergroup['maxemails'])

		$query = $db->simple_select("maillogs", "COUNT(*) AS sent_count", "fromuid='{$mybb->user['uid']}' AND dateline >= '".(TIME_NOW - (60*60*24))."'");
$sent_count = $db->fetch_field($query, "sent_count");
if($sent_count >= $mybb->usergroup['maxemails'])

		{

		{

			$lang->error_max_emails_day = $lang->sprintf($lang->error_max_emails_day, $mybb->usergroup['maxemails']);
error($lang->error_max_emails_day);
}

			$lang->error_max_emails_day = $lang->sprintf($lang->error_max_emails_day, $mybb->usergroup['maxemails']);
error($lang->error_max_emails_day);
}

Zeile 1948Zeile 2128

// Guests or those without permission can't email other users
if($mybb->usergroup['cansendemail'] == 0 || !$mybb->user['uid'])


// Guests or those without permission can't email other users
if($mybb->usergroup['cansendemail'] == 0 || !$mybb->user['uid'])

	{
error_no_permission();
}

	{
error_no_permission();
}

	
// Check group limits
if($mybb->usergroup['maxemails'] > 0)

	
// Check group limits
if($mybb->usergroup['maxemails'] > 0)

	{

	{

		$query = $db->simple_select("maillogs", "COUNT(*) AS sent_count", "fromuid='{$mybb->user['uid']}' AND dateline >= '".(TIME_NOW - (60*60*24))."'");
$sent_count = $db->fetch_field($query, "sent_count");
if($sent_count > $mybb->usergroup['maxemails'])

		$query = $db->simple_select("maillogs", "COUNT(*) AS sent_count", "fromuid='{$mybb->user['uid']}' AND dateline >= '".(TIME_NOW - (60*60*24))."'");
$sent_count = $db->fetch_field($query, "sent_count");
if($sent_count > $mybb->usergroup['maxemails'])

Zeile 1963Zeile 2143
			error($lang->error_max_emails_day);
}
}

			error($lang->error_max_emails_day);
}
}

	
$query = $db->simple_select("users", "uid, username, email, hideemail", "uid='".intval($mybb->input['uid'])."'");

	
$query = $db->simple_select("users", "uid, username, email, hideemail, ignorelist", "uid='".intval($mybb->input['uid'])."'");

	$to_user = $db->fetch_array($query);

$lang->email_user = $lang->sprintf($lang->email_user, $to_user['username']);

if(!$to_user['uid'])

	$to_user = $db->fetch_array($query);

$lang->email_user = $lang->sprintf($lang->email_user, $to_user['username']);

if(!$to_user['uid'])

	{

	{

		error($lang->error_invaliduser);
}

if($to_user['hideemail'] != 0)
{
error($lang->error_hideemail);

		error($lang->error_invaliduser);
}

if($to_user['hideemail'] != 0)
{
error($lang->error_hideemail);

 
	}

if($to_user['ignorelist'] && (my_strpos(",".$to_user['ignorelist'].",", ",".$mybb->user['uid'].",") !== false && $mybb->usergroup['cansendemailoverride'] != 1))
{
error_no_permission();

	}

if(count($errors) > 0)

	}

if(count($errors) > 0)