Vergleich admin/index.php - 1.4.0 - 1.4.8

  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 4048 2008-07-26 03:27:58Z Tikitiki $

 * $Id: index.php 4339 2009-04-04 18:26:37Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 43Zeile 43
// Load global language phrases
$lang->load("global");


// Load global language phrases
$lang->load("global");


header("Content-type: text/html; charset={$lang->settings['charset']}");






if(function_exists('mb_internal_encoding') && !empty($lang->settings['charset']))
{
@mb_internal_encoding($lang->settings['charset']);
}

header("Content-type: text/html; charset={$lang->settings['charset']}");


$time = TIME_NOW;
$errors = null;


$time = TIME_NOW;
$errors = null;





if(is_dir(MYBB_ROOT."install") && !file_exists(MYBB_ROOT."install/lock"))
{
$mybb->trigger_generic_error("install_directory");

if(is_dir(MYBB_ROOT."install") && !file_exists(MYBB_ROOT."install/lock"))
{
$mybb->trigger_generic_error("install_directory");

}

}


$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 63Zeile 81
if($mybb->input['action'] == "logout")
{
// Delete session from the database

if($mybb->input['action'] == "logout")
{
// Delete session from the database

	$db->delete_query("adminsessions", "sid='".$db->escape_string($mybb->input['adminsid'])."'");

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

	my_setcookie("adminsid", "");
$logged_out = true;
}

	my_setcookie("adminsid", "");
$logged_out = true;
}

Zeile 95Zeile 113
		$db->insert_query("adminsessions", $admin_session);
my_setcookie("adminsid", $sid);
$post_verify = false;

		$db->insert_query("adminsessions", $admin_session);
my_setcookie("adminsid", $sid);
$post_verify = false;

 
		
$mybb->request_method = "get";

	}
else
{

	}
else
{

Zeile 165Zeile 185
					if(!$valid_ip)
{
$login_message = $lang->error_invalid_ip;

					if(!$valid_ip)
{
$login_message = $lang->error_invalid_ip;

 
						unset($mybb->user);

					}
}
}

					}
}
}

Zeile 173Zeile 194
}

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

}

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

{

{

	$mybbgroups = 1;
}
else
{
$mybbgroups = $mybb->user['usergroup'].",".$mybb->user['additionalgroups'];

	$mybbgroups = 1;
}
else
{
$mybbgroups = $mybb->user['usergroup'].",".$mybb->user['additionalgroups'];

}

}

$mybb->usergroup = usergroup_permissions($mybbgroups);

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

$mybb->usergroup = usergroup_permissions($mybbgroups);

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 195Zeile 218
	if(!empty($admin_options['cpstyle']) && file_exists(MYBB_ADMIN_DIR."/styles/{$admin_options['cpstyle']}/main.css"))
{
$cp_style = $admin_options['cpstyle'];

	if(!empty($admin_options['cpstyle']) && file_exists(MYBB_ADMIN_DIR."/styles/{$admin_options['cpstyle']}/main.css"))
{
$cp_style = $admin_options['cpstyle'];

	}


	}


	// Update the session information in the DB
if($admin_session['sid'])

	// Update the session information in the DB
if($admin_session['sid'])

	{
$db->update_query("adminsessions", array('lastactive' => TIME_NOW, 'ip' => $db->escape_string($session->ipaddress)), "sid='".$db->escape_string($admin_session['sid'])."'");
}


	{
$db->update_query("adminsessions", array('lastactive' => TIME_NOW, 'ip' => $db->escape_string(get_ip())), "sid='".$db->escape_string($admin_session['sid'])."'");
}


	// 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