Vergleich member.php - 1.6.0 - 1.6.4

  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 5126 2010-07-27 07:48:04Z RyanGordon $

 * $Id: member.php 5465 2011-05-16 20:11:06Z jammerx2 $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 793Zeile 793
	{
error($lang->error_activated_by_admin);
}

	{
error($lang->error_activated_by_admin);
}







	if($mybb->user['uid'] && $mybb->user['usergroup'] != 5)
{
error($lang->error_alreadyactivated);
}


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

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

Zeile 1029Zeile 1033
			else if($mybb->input['quick_login'] == 1 && $mybb->input['quick_password'] && $mybb->input['quick_username'])
{
$errors[] = $lang->error_regimagerequired;

			else if($mybb->input['quick_login'] == 1 && $mybb->input['quick_password'] && $mybb->input['quick_username'])
{
$errors[] = $lang->error_regimagerequired;

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


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


		$do_captcha = true;

		$do_captcha = true;

	}

	}

	
if(!empty($errors))
{

	
if(!empty($errors))
{

Zeile 1051Zeile 1055
		if($user['coppauser'])
{
error($lang->error_awaitingcoppa);

		if($user['coppauser'])
{
error($lang->error_awaitingcoppa);

		}


		}


		my_setcookie('loginattempts', 1);
$db->delete_query("sessions", "ip='".$db->escape_string($session->ipaddress)."' AND sid != '".$session->sid."'");
$newsession = array(
"uid" => $user['uid'],
);
$db->update_query("sessions", $newsession, "sid='".$session->sid."'");

		my_setcookie('loginattempts', 1);
$db->delete_query("sessions", "ip='".$db->escape_string($session->ipaddress)."' AND sid != '".$session->sid."'");
$newsession = array(
"uid" => $user['uid'],
);
$db->update_query("sessions", $newsession, "sid='".$session->sid."'");

		

		

		$db->update_query("users", array("loginattempts" => 1), "uid='{$user['uid']}'");

if($mybb->input['remember'] != "yes")
{
$remember = -1;

		$db->update_query("users", array("loginattempts" => 1), "uid='{$user['uid']}'");

if($mybb->input['remember'] != "yes")
{
$remember = -1;

		}
else

		}
else

		{
$remember = null;
}
my_setcookie("mybbuser", $user['uid']."_".$user['loginkey'], $remember, true);
my_setcookie("sid", $session->sid, -1, true);

		{
$remember = null;
}
my_setcookie("mybbuser", $user['uid']."_".$user['loginkey'], $remember, true);
my_setcookie("sid", $session->sid, -1, true);

		

		

		$plugins->run_hooks("member_do_login_end");

if($mybb->input['url'] != "" && my_strpos(basename($mybb->input['url']), 'member.php') === false)

		$plugins->run_hooks("member_do_login_end");

if($mybb->input['url'] != "" && my_strpos(basename($mybb->input['url']), 'member.php') === false)

Zeile 1081Zeile 1085
			{
$mybb->input['url'] = str_replace('&processed=1', '', $mybb->input['url']);
}

			{
$mybb->input['url'] = str_replace('&processed=1', '', $mybb->input['url']);
}

			

			

			$mybb->input['url'] = str_replace('&', '&', $mybb->input['url']);

// Redirect to the URL if it is not member.php

			$mybb->input['url'] = str_replace('&', '&', $mybb->input['url']);

// Redirect to the URL if it is not member.php

Zeile 1096Zeile 1100
	{
$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");
}

Zeile 1117Zeile 1121
	login_attempt_check();

// Redirect to the page where the user came from, but not if that was the login page.

	login_attempt_check();

// Redirect to the page where the user came from, but not if that was the login page.

	if($mybb->input['url'] && !preg_match("/action=login/i", $mybb->input['url']))
{
$redirect_url = htmlentities($mybb->input['url']);
}
elseif($_SERVER['HTTP_REFERER'])

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





	{
$redirect_url = htmlentities($_SERVER['HTTP_REFERER']);
}

	{
$redirect_url = htmlentities($_SERVER['HTTP_REFERER']);
}

		





	else
{
$redirect_url = '';
}


	$captcha = "";
// Show captcha image for guests if enabled
if($mybb->settings['captchaimage'] == 1 && function_exists("imagepng") && $do_captcha == true)

	$captcha = "";
// Show captcha image for guests if enabled
if($mybb->settings['captchaimage'] == 1 && function_exists("imagepng") && $do_captcha == true)

Zeile 1160Zeile 1164
if($mybb->input['action'] == "logout")
{
$plugins->run_hooks("member_logout_start");

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





	if(!$mybb->user['uid'])
{
redirect("index.php", $lang->redirect_alreadyloggedout);

	if(!$mybb->user['uid'])
{
redirect("index.php", $lang->redirect_alreadyloggedout);

	}


	}


	// Check session ID if we have one
if($mybb->input['sid'] && $mybb->input['sid'] != $session->sid)

	// Check session ID if we have one
if($mybb->input['sid'] && $mybb->input['sid'] != $session->sid)

	{
error($lang->error_notloggedout);

	{
error($lang->error_notloggedout);

	}
// Otherwise, check logoutkey
else if(!$mybb->input['sid'] && $mybb->input['logoutkey'] != $mybb->user['logoutkey'])
{
error($lang->error_notloggedout);

	}
// Otherwise, check logoutkey
else if(!$mybb->input['sid'] && $mybb->input['logoutkey'] != $mybb->user['logoutkey'])
{
error($lang->error_notloggedout);

	}


	}


	my_unsetcookie("mybbuser");
my_unsetcookie("sid");
if($mybb->user['uid'])

	my_unsetcookie("mybbuser");
my_unsetcookie("sid");
if($mybb->user['uid'])

Zeile 1206Zeile 1210
		if($mybb->input['tid'])
{
$query = $db->simple_select("posts", "uid", "tid='".intval($mybb->input['tid'])."' AND visible = 1", array('order_by' => 'dateline', 'order_dir' => 'DESC', 'limit' => '1'));

		if($mybb->input['tid'])
{
$query = $db->simple_select("posts", "uid", "tid='".intval($mybb->input['tid'])."' AND visible = 1", array('order_by' => 'dateline', 'order_dir' => 'DESC', 'limit' => '1'));

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

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

			$uid = $post['uid'];
}
elseif($mybb->input['fid'])

			$uid = $post['uid'];
}
elseif($mybb->input['fid'])

Zeile 1236Zeile 1240
			$query = $db->simple_select("posts", "uid", "tid='$tid' AND visible = 1", array('order_by' => 'dateline', 'order_dir' => 'DESC', 'limit' => '1'));
$post = $db->fetch_array($query);
$uid = $post['uid'];

			$query = $db->simple_select("posts", "uid", "tid='$tid' AND visible = 1", array('order_by' => 'dateline', 'order_dir' => 'DESC', 'limit' => '1'));
$post = $db->fetch_array($query);
$uid = $post['uid'];

		}

		}

	}
else
{

	}
else
{

Zeile 1251Zeile 1255
	}

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

	}

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

	{
$query = $db->simple_select("users", "*", "uid='$uid'");
$memprofile = $db->fetch_array($query);

	{
$memprofile = get_user($uid);


	}
else
{

	}
else
{

Zeile 1283Zeile 1286
	else
{
$lang->send_pm = '';

	else
{
$lang->send_pm = '';

	}

	}

	$lang->away_note = $lang->sprintf($lang->away_note, $memprofile['username']);
$lang->users_additional_info = $lang->sprintf($lang->users_additional_info, $memprofile['username']);
$lang->users_signature = $lang->sprintf($lang->users_signature, $memprofile['username']);

	$lang->away_note = $lang->sprintf($lang->away_note, $memprofile['username']);
$lang->users_additional_info = $lang->sprintf($lang->users_additional_info, $memprofile['username']);
$lang->users_signature = $lang->sprintf($lang->users_signature, $memprofile['username']);

Zeile 1327Zeile 1330
	foreach($cat_array as $cat)
{
$bgcolors[$cat] = alt_trow();

	foreach($cat_array as $cat)
{
$bgcolors[$cat] = alt_trow();

	}

	}


if($memprofile['website'])
{


if($memprofile['website'])
{

Zeile 1354Zeile 1357
	}

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

	}

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

 

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


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

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

Zeile 1452Zeile 1461
		
if($memprofile['birthdayprivacy'] != 'none')
{

		
if($memprofile['birthdayprivacy'] != 'none')
{

			if($membday[2])

			if($membday[0] && $membday[1] && $membday[2])

			{
$lang->membdayage = $lang->sprintf($lang->membdayage, get_age($memprofile['birthday']));


			{
$lang->membdayage = $lang->sprintf($lang->membdayage, get_age($memprofile['birthday']));


Zeile 1468Zeile 1477
					$membday = date($bdayformat, $membday);
}
$membdayage = $lang->membdayage;

					$membday = date($bdayformat, $membday);
}
$membdayage = $lang->membdayage;

 
			}
elseif($membday[2])
{
$membday = mktime(0, 0, 0, 1, 1, $membday[2]);
$membday = date("Y", $membday);
$membdayage = '';

			}
else
{

			}
else
{

Zeile 1491Zeile 1506
	{
$membday = $lang->not_specified;
$membdayage = '';

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

	}

	}

	
if(!$memprofile['displaygroup'])
{

	
if(!$memprofile['displaygroup'])
{

Zeile 1513Zeile 1528
	unset($usertitle);
unset($stars);
if(trim($memprofile['usertitle']) != '')

	unset($usertitle);
unset($stars);
if(trim($memprofile['usertitle']) != '')

	{

	{

		// User has custom user title
$usertitle = $memprofile['usertitle'];
}

		// User has custom user title
$usertitle = $memprofile['usertitle'];
}

Zeile 1525Zeile 1540
	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))
{

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

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

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

Zeile 1709Zeile 1724
				$customfieldval = htmlspecialchars_uni($userfields[$field]);
}
}

				$customfieldval = htmlspecialchars_uni($userfields[$field]);
}
}

 

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

		eval("\$customfields .= \"".$templates->get("member_profile_customfields_field")."\";");
$bgcolor = alt_trow();
}

		eval("\$customfields .= \"".$templates->get("member_profile_customfields_field")."\";");
$bgcolor = alt_trow();
}

Zeile 1722Zeile 1739
	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 1747Zeile 1764
			{
$memprofile['usernotes'] = my_substr($memprofile['usernotes'], 0, 100).'...';
}

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

		}

		}

		else
{
$memprofile['usernotes'] = $lang->no_usernotes;

		else
{
$memprofile['usernotes'] = $lang->no_usernotes;

Zeile 1762Zeile 1779
	
$buddy_options = '';


	
$buddy_options = '';


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

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

	{
$buddy_list = explode(',', $mybb->user['buddylist']);
if(in_array($mybb->input['uid'], $buddy_list))
{

	{
$buddy_list = explode(',', $mybb->user['buddylist']);
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\" /> {$lang->remove_from_buddy_list}</a>";

			$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
{

		}
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\" /> {$lang->add_to_buddy_list}</a>";

			$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>";

		}

		}

		



		$ignore_list = explode(',', $mybb->user['ignorelist']);
if(in_array($mybb->input['uid'], $ignore_list))
{

		$ignore_list = explode(',', $mybb->user['ignorelist']);
if(in_array($mybb->input['uid'], $ignore_list))
{

			$buddy_options .= "<br /><a href=\"./usercp.php?action=do_editlists&amp;manage=ignored&amp;delete={$mybb->input['uid']}&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/remove_ignore.gif\" /> {$lang->remove_from_ignore_list}</a>";

			$buddy_options .= "<br /><a href=\"./usercp.php?action=do_editlists&amp;manage=ignored&amp;delete={$mybb->input['uid']}&amp;my_post_key={$mybb->post_code}\"><img src=\"{$theme['imgdir']}/remove_ignore.gif\" alt=\"{$lang->remove_from_ignore_list}\" /> {$lang->remove_from_ignore_list}</a>";

		}
else
{

		}
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\" /> {$lang->add_to_ignore_list}</a>";

			$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>";

		}
}


		}
}