Vergleich global.php - 1.4.1 - 1.4.9

  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: global.php 4098 2008-08-10 03:18:01Z chris $

 * $Id: global.php 4369 2009-05-11 08:48:32Z Tomm $

 */

 */

 
 
$working_dir = dirname(__FILE__);
if(!$working_dir)
{
$working_dir = '.';
}


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


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

require_once "./inc/init.php";

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


$shutdown_queries = array();



$shutdown_queries = array();


Zeile 120Zeile 126
if(in_array($current_page, $valid))
{
// If we're accessing a post, fetch the forum theme for it and if we're overriding it

if(in_array($current_page, $valid))
{
// If we're accessing a post, fetch the forum theme for it and if we're overriding it

	if(isset($mybb->input['pid']))

	if($mybb->input['pid'])

	{
$query = $db->query("
SELECT f.style, f.overridestyle, p.*

	{
$query = $db->query("
SELECT f.style, f.overridestyle, p.*

Zeile 135Zeile 141
	}

// We have a thread id and a forum id, we can easily fetch the theme for this forum

	}

// We have a thread id and a forum id, we can easily fetch the theme for this forum

	else if(isset($mybb->input['tid']))

	else if($mybb->input['tid'])

	{
$query = $db->query("
SELECT f.style, f.overridestyle, t.*

	{
$query = $db->query("
SELECT f.style, f.overridestyle, t.*

Zeile 149Zeile 155
	}

// We have a forum id - simply load the theme from it

	}

// We have a forum id - simply load the theme from it

	else if(isset($mybb->input['fid']))

	else if($mybb->input['fid'])

	{
cache_forums();
$style = $forum_cache[intval($mybb->input['fid'])];

	{
cache_forums();
$style = $forum_cache[intval($mybb->input['fid'])];

Zeile 160Zeile 166

// From all of the above, a theme was found
if(isset($style['style']) && $style['style'] > 0)


// From all of the above, a theme was found
if(isset($style['style']) && $style['style'] > 0)

{

{

	// This theme is forced upon the user, overriding their selection
if($style['overridestyle'] == 1 || !isset($mybb->user['style']))
{

	// This theme is forced upon the user, overriding their selection
if($style['overridestyle'] == 1 || !isset($mybb->user['style']))
{

Zeile 259Zeile 265
if(!preg_match("#^(\.\.?(/|$)|([a-z0-9]+)://)#i", $theme['logo']) && $theme['logo']{0} != "/")
{
$theme['logo'] = $mybb->settings['bburl']."/".$theme['logo'];

if(!preg_match("#^(\.\.?(/|$)|([a-z0-9]+)://)#i", $theme['logo']) && $theme['logo']{0} != "/")
{
$theme['logo'] = $mybb->settings['bburl']."/".$theme['logo'];

}


}


// Load Main Templates and Cached Templates
if(isset($templatelist))
{

// Load Main Templates and Cached Templates
if(isset($templatelist))
{

Zeile 279Zeile 285
if(isset($mybb->user['lastvisit']))
{
$lastvisit = my_date($mybb->settings['dateformat'], $mybb->user['lastvisit']) . ', ' . my_date($mybb->settings['timeformat'], $mybb->user['lastvisit']);

if(isset($mybb->user['lastvisit']))
{
$lastvisit = my_date($mybb->settings['dateformat'], $mybb->user['lastvisit']) . ', ' . my_date($mybb->settings['timeformat'], $mybb->user['lastvisit']);

}

}


// Otherwise, they've never visited before
else
{
$lastvisit = $lang->lastvisit_never;


// Otherwise, they've never visited before
else
{
$lastvisit = $lang->lastvisit_never;

}

}


// If the board is closed and we have an Administrator, show board closed warning
$bbclosedwarning = '';


// If the board is closed and we have an Administrator, show board closed warning
$bbclosedwarning = '';

Zeile 309Zeile 315
	if($mybb->usergroup['canmodcp'] == 1)
{
eval("\$modcplink = \"".$templates->get("header_welcomeblock_member_moderator")."\";");

	if($mybb->usergroup['canmodcp'] == 1)
{
eval("\$modcplink = \"".$templates->get("header_welcomeblock_member_moderator")."\";");

	}

	}

	
// Format the welcome back message
$lang->welcome_back = $lang->sprintf($lang->welcome_back, $mybb->user['username'], $lastvisit);

	
// Format the welcome back message
$lang->welcome_back = $lang->sprintf($lang->welcome_back, $mybb->user['username'], $lastvisit);

Zeile 407Zeile 413
	if($pm['fromuid'] == 0)
{
$pm['fromusername'] = 'MyBB Engine';

	if($pm['fromuid'] == 0)
{
$pm['fromusername'] = 'MyBB Engine';

 
		$user_text = $pm['fromusername'];

	}

	}

	





	else
{
$user_text = build_profile_link($pm['fromusername'], $pm['fromuid']);
}


	if($mybb->user['pms_unread'] == 1)
{

	if($mybb->user['pms_unread'] == 1)
{

		$privatemessage_text = $lang->sprintf($lang->newpm_notice_one, get_profile_link($pm['fromuid']), $pm['fromusername'], $pm['pmid'], $pm['subject']);

		$privatemessage_text = $lang->sprintf($lang->newpm_notice_one, $user_text, $pm['pmid'], htmlspecialchars_uni($pm['subject']));

	}
else
{

	}
else
{

		$privatemessage_text = $lang->sprintf($lang->newpm_notice_multiple, $mybb->user['pms_unread'], get_profile_link($pm['fromuid']), $pm['fromusername'], $pm['pmid'], $pm['subject']);

		$privatemessage_text = $lang->sprintf($lang->newpm_notice_multiple, $mybb->user['pms_unread'], $user_text, $pm['pmid'], htmlspecialchars_uni($pm['subject']));

	}
eval("\$pm_notice = \"".$templates->get("global_pm_alert")."\";");
}

	}
eval("\$pm_notice = \"".$templates->get("global_pm_alert")."\";");
}

Zeile 499Zeile 510
// Check banned ip addresses
if(is_banned_ip($session->ipaddress, true))
{

// Check banned ip addresses
if(is_banned_ip($session->ipaddress, true))
{

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








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

	error($lang->error_banned);
}


	error($lang->error_banned);
}