Vergleich admin/index.php - 1.4.2 - 1.4.15

  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: index.php 4163 2008-08-31 16:57:07Z Tikitiki $

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

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 60Zeile 60

$ip_address = get_ip();
unset($user);


$ip_address = get_ip();
unset($user);

 

// Load Admin CP style
if(!$cp_style)
{
if(!empty($mybb->settings['cpstyle']) && file_exists(MYBB_ADMIN_DIR."/styles/".$mybb->settings['cpstyle']."/main.css"))
{
$cp_style = $mybb->settings['cpstyle'];
}
else
{
$cp_style = "default";
}
}


$logged_out = false;
$fail_check = 0;


$logged_out = false;
$fail_check = 0;

Zeile 85Zeile 98
	{
$db->delete_query("adminsessions", "uid='{$mybb->user['uid']}'");


	{
$db->delete_query("adminsessions", "uid='{$mybb->user['uid']}'");


		$sid = md5(uniqid(microtime()));

		$sid = md5(random_str());

		
// Create a new admin session for this user
$admin_session = array(

		
// Create a new admin session for this user
$admin_session = array(

Zeile 102Zeile 115
		$post_verify = false;

$mybb->request_method = "get";

		$post_verify = false;

$mybb->request_method = "get";

	}

	}

	else
{
$fail_check = 1;

	else
{
$fail_check = 1;

Zeile 123Zeile 136

// No matching admin session found - show message on login screen
if(!$admin_session['sid'])


// No matching admin session found - show message on login screen
if(!$admin_session['sid'])

		{

		{

			$login_message = $lang->invalid_admin_session;
}
else

			$login_message = $lang->invalid_admin_session;
}
else

Zeile 136Zeile 149

// Login key has changed - force logout
if(!$mybb->user['uid'] || $mybb->user['loginkey'] != $admin_session['loginkey'])


// Login key has changed - force logout
if(!$mybb->user['uid'] || $mybb->user['loginkey'] != $admin_session['loginkey'])

			{

			{

				unset($mybb->user);
}
else
{
// Admin CP sessions 2 hours old are expired
if($admin_session['lastactive'] < TIME_NOW-7200)

				unset($mybb->user);
}
else
{
// Admin CP sessions 2 hours old are expired
if($admin_session['lastactive'] < TIME_NOW-7200)

				{

				{

					$login_message = $lang->error_admin_session_expired;
$db->delete_query("adminsessions", "sid='".$db->escape_string($mybb->cookies['adminsid'])."'");
unset($mybb->user);

					$login_message = $lang->error_admin_session_expired;
$db->delete_query("adminsessions", "sid='".$db->escape_string($mybb->cookies['adminsid'])."'");
unset($mybb->user);

Zeile 192Zeile 205

if($mybb->usergroup['cancp'] != 1 || !$mybb->user['uid'])
{


if($mybb->usergroup['cancp'] != 1 || !$mybb->user['uid'])
{

 
	$db->delete_query("adminsessions", "uid='".intval($mybb->user['uid'])."'");

	unset($mybb->user);

	unset($mybb->user);

 
	my_setcookie("adminsid", "");

}

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

}

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

Zeile 213Zeile 228

// Fetch administrator permissions
$mybb->admin['permissions'] = get_admin_permissions($mybb->user['uid']);


// Fetch administrator permissions
$mybb->admin['permissions'] = get_admin_permissions($mybb->user['uid']);

}

// Load Admin CP style
if(!$cp_style)
{
if(!empty($mybb->settings['cpstyle']) && file_exists(MYBB_ADMIN_DIR."/styles/".$mybb->settings['cpstyle']."/main.css"))
{
$cp_style = $mybb->settings['cpstyle'];
}
else
{
$cp_style = "default";
}

 
}

// Include the layout generation class overrides for this style

}

// Include the layout generation class overrides for this style

Zeile 272Zeile 274
	}
}


	}
}


 
$rand = my_rand();

if($rand == 2 || $rand == 5)
{
$stamp = TIME_NOW-604800;

if($rand == 2 || $rand == 5)
{
$stamp = TIME_NOW-604800;