Vergleich global.php - 1.2.2 - 1.2.9

  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 2445 2006-11-27 00:02:54Z CraKteR $

 * $Id: global.php 3112 2007-05-30 05:53:00Z Tikitiki $

 */

// Load main MyBB core file which begins all of the magic

 */

// Load main MyBB core file which begins all of the magic

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

require_once "./inc/init.php";


$shutdown_queries = array();



$shutdown_queries = array();


Zeile 30Zeile 30

// Send page headers
send_page_headers();


// Send page headers
send_page_headers();


// Trigger an error if the installation directory exists
if(is_dir(MYBB_ROOT."install") && !file_exists(MYBB_ROOT."install/lock"))
{
$mybb->trigger_generic_error("install_directory", true);
}

 

// Do not use session system for defined pages


// Do not use session system for defined pages

if((isset($mybb->input['action']) && isset($nosession[$mybb->input['action']])) || (isset($mybb->input['thumbnail']) && strstr($_SERVER["PHP_SELF"], 'attachment.php')))
{

if((@isset($mybb->input['action']) && @isset($nosession[$mybb->input['action']])) || (@isset($mybb->input['thumbnail']) && strstr($_SERVER["PHP_SELF"], 'attachment.php')))
{

	define("NO_ONLINE", 1);
}


	define("NO_ONLINE", 1);
}


Zeile 62Zeile 56
$lang->load("global");
$lang->load("messages");


$lang->load("global");
$lang->load("messages");


if(function_exists('mb_internal_encoding'))

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

{

{

	mb_internal_encoding($lang->settings['charset']);

	@mb_internal_encoding($lang->settings['charset']);

}

// Which thread mode is our user using?
if(!isset($mybb->input['mode']))
{
if(isset($mybb->user['threadmode']))

}

// Which thread mode is our user using?
if(!isset($mybb->input['mode']))
{
if(isset($mybb->user['threadmode']))

	{

	{

		$mybb->input['mode'] = $mybb->user['threadmode'];

		$mybb->input['mode'] = $mybb->user['threadmode'];

	}

	}

	else if($mybb->settings['threadusenetstyle'] == "yes")

	else if($mybb->settings['threadusenetstyle'] == "yes")

	{

	{

		$mybb->input['mode'] = "threaded";

		$mybb->input['mode'] = "threaded";

	}
else
{

	}
else
{

		$mybb->input['mode'] = "linear";
}
}

		$mybb->input['mode'] = "linear";
}
}

Zeile 102Zeile 96
	"moderation.php"	
);


	"moderation.php"	
);


 
// This user has a custom theme set in their profile
if(isset($mybb->user['style']) && intval($mybb->user['style']) != 0)
{
$loadstyle = "tid='".$mybb->user['style']."'";
}

if(in_array(strtolower(basename($_SERVER['PHP_SELF'])), $valid))
{

if(in_array(strtolower(basename($_SERVER['PHP_SELF'])), $valid))
{

	// This user has a custom theme set in their profile
if(isset($mybb->user['style']) && intval($mybb->user['style']) != 0)
{
$loadstyle = "tid='".$mybb->user['style']."'";
}


 
	// If we're accessing a post, fetch the forum theme for it and if we're overriding it
if(isset($mybb->input['pid']))
{

	// If we're accessing a post, fetch the forum theme for it and if we're overriding it
if(isset($mybb->input['pid']))
{

Zeile 122Zeile 115
	else if(isset($mybb->input['tid']))
{
$query = $db->simple_select(TABLE_PREFIX."forums f, ".TABLE_PREFIX."threads t", "f.style, f.overridestyle", "f.fid=t.fid AND t.tid='".intval($mybb->input['tid'])."'");

	else if(isset($mybb->input['tid']))
{
$query = $db->simple_select(TABLE_PREFIX."forums f, ".TABLE_PREFIX."threads t", "f.style, f.overridestyle", "f.fid=t.fid AND t.tid='".intval($mybb->input['tid'])."'");

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

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

		$load_from_forum = 1;
}


		$load_from_forum = 1;
}


Zeile 202Zeile 195
	{
$theme['imglangdir'] = $theme['imgdir'];
}

	{
$theme['imglangdir'] = $theme['imgdir'];
}

 
}

// Theme logo - is it a relative URL to the forum root? Append bburl
if(!preg_match("#^(\/|\.\.|\.|([a-z0-9]+)://)#i", $theme['logo']))
{
$theme['logo'] = $mybb->settings['bburl']."/".$theme['logo'];

}

// Load Main Templates and Cached Templates

}

// Load Main Templates and Cached Templates

Zeile 263Zeile 262

$unreadreports = '';
// This user is a moderator, super moderator or administrator


$unreadreports = '';
// This user is a moderator, super moderator or administrator

if($mybb->usergroup['cancp'] == "yes" || $mybb->usergroup['issupermod'] == "yes" || $mybb->usergroup['gid'] == 6)

if($mybb->usergroup['cancp'] == "yes" || $mybb->usergroup['issupermod'] == "yes" || $mybb->user['usergroup'] == 6)

{
// Read the reported posts cache
$reported = $cache->read("reportedposts");

{
// Read the reported posts cache
$reported = $cache->read("reportedposts");



	

	// 0 or more reported posts currently exist
if($reported['unread'] > 0)
{

	// 0 or more reported posts currently exist
if($reported['unread'] > 0)
{

Zeile 355Zeile 354
$navbits[0]['url'] = $mybb->settings['bburl']."/index.php";

// Check banned ip addresses

$navbits[0]['url'] = $mybb->settings['bburl']."/index.php";

// Check banned ip addresses

$bannedips = explode(",", $mybb->settings['bannedips']);
if(is_array($bannedips))

if(is_banned_ip($session->ipaddress))


{

{

	foreach($bannedips as $key => $bannedip)
{
$bannedip = trim($bannedip);
if($bannedip != '')
{
// This address is banned, show an error and delete the session
if(strstr($session->ipaddress, $bannedip))
{
$db->delete_query(TABLE_PREFIX."sessions", "ip='".$db->escape_string($session->ipaddress)."' OR uid='{$mybb->user['uid']}'");
error($lang->error_banned);
}
}
}

	$db->delete_query(TABLE_PREFIX."sessions", "ip='".$db->escape_string($session->ipaddress)."' OR uid='{$mybb->user['uid']}'");
error($lang->error_banned);












}
// If the board is closed, the user is not an administrator and they're not trying to login, show the board closed message
if($mybb->settings['boardclosed'] == "yes" && $mybb->usergroup['cancp'] != "yes" && !(basename($_SERVER['PHP_SELF']) == "member.php" && ($mybb->input['action'] == "login" || $mybb->input['action'] == "do_login" || $mybb->input['action'] == "logout")))

}
// If the board is closed, the user is not an administrator and they're not trying to login, show the board closed message
if($mybb->settings['boardclosed'] == "yes" && $mybb->usergroup['cancp'] != "yes" && !(basename($_SERVER['PHP_SELF']) == "member.php" && ($mybb->input['action'] == "login" || $mybb->input['action'] == "do_login" || $mybb->input['action'] == "logout")))