Vergleich admin/global.php - 1.2.1 - 1.2.14

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 3Zeile 3
 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html

 *

 *

 * $Id: global.php 2207 2006-09-10 01:46:13Z chris $

 * $Id: global.php 3204 2007-07-11 02:40:42Z chris $

 */

// Lets pretend we're a level higher

 */

// Lets pretend we're a level higher

Zeile 20Zeile 20
	$config['admin_dir'] = "admin";
}


	$config['admin_dir'] = "admin";
}


require_once dirname(dirname(__FILE__))."/inc/init.php";

require_once "../inc/init.php";


define('MYBB_ADMIN_DIR', MYBB_ROOT.$config['admin_dir'].'/');



define('MYBB_ADMIN_DIR', MYBB_ROOT.$config['admin_dir'].'/');


Zeile 49Zeile 49
$mybb->settings['bbname'] = stripslashes($mybb->settings['bbname']);

$time = time();

$mybb->settings['bbname'] = stripslashes($mybb->settings['bbname']);

$time = time();

 

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


if(is_dir(MYBB_ROOT."install") && !file_exists(MYBB_ROOT."install/lock"))
{


if(is_dir(MYBB_ROOT."install") && !file_exists(MYBB_ROOT."install/lock"))
{

Zeile 64Zeile 66
if($mybb->input['do'] == "login")
{
$user = validate_password_from_username($mybb->input['username'], $mybb->input['password']);

if($mybb->input['do'] == "login")
{
$user = validate_password_from_username($mybb->input['username'], $mybb->input['password']);

	if($user['uid'])

	if($user['uid'])

	{
$query = $db->simple_select(TABLE_PREFIX."users", "*", "uid='".$user['uid']."'");
$user = $db->fetch_array($query);

	{
$query = $db->simple_select(TABLE_PREFIX."users", "*", "uid='".$user['uid']."'");
$user = $db->fetch_array($query);

Zeile 72Zeile 74
	$failcheck = 1;

if($user['uid'])

	$failcheck = 1;

if($user['uid'])

	{

	{

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

// Create a new admin session for this user

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

// Create a new admin session for this user

Zeile 94Zeile 96
	}
}
else if($mybb->input['action'] == "logout")

	}
}
else if($mybb->input['action'] == "logout")

{

{

	$lang->invalid_admin = $lang->logged_out_admin;
// Delete session from the database
$db->delete_query(TABLE_PREFIX."adminsessions", "sid='".$db->escape_string($mybb->input['adminsid'])."'");

	$lang->invalid_admin = $lang->logged_out_admin;
// Delete session from the database
$db->delete_query(TABLE_PREFIX."adminsessions", "sid='".$db->escape_string($mybb->input['adminsid'])."'");

Zeile 184Zeile 186
}

if($user['uid'])

}

if($user['uid'])

{

{

	$mybbadmin = $mybb->user = $user;
$query = $db->simple_select(TABLE_PREFIX."usergroups", "*", "gid='{$user['usergroup']}'");
$mybb->usergroup = $db->fetch_array($query);

	$mybbadmin = $mybb->user = $user;
$query = $db->simple_select(TABLE_PREFIX."usergroups", "*", "gid='{$user['usergroup']}'");
$mybb->usergroup = $db->fetch_array($query);

Zeile 229Zeile 231
		if(!empty($_SERVER['QUERY_STRING']))
{
$goto .= '?'.$_SERVER['QUERY_STRING'];

		if(!empty($_SERVER['QUERY_STRING']))
{
$goto .= '?'.$_SERVER['QUERY_STRING'];

			$goto = preg_replace('#(&?|&?|\??)adminsid=([a-zA-Z0-9]{1,32})#i', '', $goto);








			if(strpos($goto, '&') !== false)
{
$goto = preg_replace('#(&?|&?|\??)adminsid=([a-zA-Z0-9]{1,32})(&?|&?)#i', '\\1', $goto);
}
else
{
$goto = preg_replace('#\?adminsid=([a-zA-Z0-9]{1,32})#i', '', $goto);
}

		}
}
else

		}
}
else