Vergleich admin/global.php - 1.2.0 - 1.2.12

  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 2175 2006-08-31 04:27:16Z Tikitiki $

 * $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 73Zeile 75

if($user['uid'])
{


if($user['uid'])
{

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


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

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

			"sid" => md5(uniqid(microtime())),

			"sid" => $sid,

			"uid" => $user['uid'],
"loginkey" => $user['loginkey'],
"ip" => $db->escape_string(get_ip()),

			"uid" => $user['uid'],
"loginkey" => $user['loginkey'],
"ip" => $db->escape_string(get_ip()),

Zeile 83Zeile 87
			"lastactive" => time()
);
$db->insert_query(TABLE_PREFIX."adminsessions", $admin_session);

			"lastactive" => time()
);
$db->insert_query(TABLE_PREFIX."adminsessions", $admin_session);

 
		$url = "index.php?adminsid=$sid";
if($mybb->input['goto'])
{
$url .= "&goto=".urlencode($mybb->input['goto']);
}
header("Location: $url");

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

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

Zeile 114Zeile 124
			// Fetch the user from the admin session
$query = $db->simple_select(TABLE_PREFIX."users", "*", "uid='{$admin_session['uid']}'");
$user = $db->fetch_array($query);

			// Fetch the user from the admin session
$query = $db->simple_select(TABLE_PREFIX."users", "*", "uid='{$admin_session['uid']}'");
$user = $db->fetch_array($query);





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

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

Zeile 157Zeile 167
				}
}
}

				}
}
}

	}

	}

}

$mybbgroups = $user['usergroup'].",".$user['additionalgroups'];

}

$mybbgroups = $user['usergroup'].",".$user['additionalgroups'];

Zeile 221Zeile 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