Vergleich global.php - 1.6.4 - 1.6.8

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: global.php 5502 2011-07-19 09:20:11Z Tomm $

 * $Id: global.php 5793 2012-04-19 14:27:33Z Tomm $

 */

$working_dir = dirname(__FILE__);

 */

$working_dir = dirname(__FILE__);

Zeile 61Zeile 61
$mybb->post_code = generate_post_check();

// Set and load the language

$mybb->post_code = generate_post_check();

// Set and load the language

if($mybb->input['language'] && $lang->language_exists($mybb->input['language']))

if($mybb->input['language'] && $lang->language_exists($mybb->input['language']) && verify_post_check($mybb->input['my_post_key'], true))

{
$mybb->settings['bblanguage'] = $mybb->input['language'];
// If user is logged in, update their language selection with the new one

{
$mybb->settings['bblanguage'] = $mybb->input['language'];
// If user is logged in, update their language selection with the new one

Zeile 241Zeile 241
}

// Are we linking to a remote theme server?

}

// Are we linking to a remote theme server?

if(substr($theme['imgdir'], 0, 7) == "http://")

if(substr($theme['imgdir'], 0, 7) == "http://" || substr($theme['imgdir'], 0, 8) == "https://")

{
// If a language directory for the current language exists within the theme - we use it
if(!empty($mybb->user['language']))

{
// If a language directory for the current language exists within the theme - we use it
if(!empty($mybb->user['language']))

Zeile 356Zeile 356
// Otherwise, we have a guest
else
{

// Otherwise, we have a guest
else
{

 
	switch($mybb->settings['username_method'])
{
case 0:
$login_username = $lang->login_username;
break;
case 1:
$login_username = $lang->login_username1;
break;
case 2:
$login_username = $lang->login_username2;
break;
default:
$login_username = $lang->login_username;
break;
}

	eval("\$welcomeblock = \"".$templates->get("header_welcomeblock_guest")."\";");
}


	eval("\$welcomeblock = \"".$templates->get("header_welcomeblock_guest")."\";");
}


Zeile 385Zeile 400
	if($total_joinrequests > 0)
{
if($total_joinrequests == 1)

	if($total_joinrequests > 0)
{
if($total_joinrequests == 1)

		{

		{

			$lang->pending_joinrequests = $lang->pending_joinrequest;
}
else

			$lang->pending_joinrequests = $lang->pending_joinrequest;
}
else

Zeile 393Zeile 408
			$lang->pending_joinrequests = $lang->sprintf($lang->pending_joinrequests, $total_joinrequests);
}
eval("\$pending_joinrequests = \"".$templates->get("global_pending_joinrequests")."\";");

			$lang->pending_joinrequests = $lang->sprintf($lang->pending_joinrequests, $total_joinrequests);
}
eval("\$pending_joinrequests = \"".$templates->get("global_pending_joinrequests")."\";");

	}
}

	}
}


$unreadreports = '';
// This user is a moderator, super moderator or administrator
if($mybb->usergroup['cancp'] == 1 || $mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'])


$unreadreports = '';
// This user is a moderator, super moderator or administrator
if($mybb->usergroup['cancp'] == 1 || $mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'])

{

{

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


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


Zeile 409Zeile 424
		if($reported['unread'] == 1)
{
$lang->unread_reports = $lang->unread_report;

		if($reported['unread'] == 1)
{
$lang->unread_reports = $lang->unread_report;

		}

		}

		else
{
$lang->unread_reports = $lang->sprintf($lang->unread_reports, $reported['unread']);

		else
{
$lang->unread_reports = $lang->sprintf($lang->unread_reports, $reported['unread']);

Zeile 432Zeile 447
// Is this user apart of a banned group?
$bannedwarning = '';
if($mybb->usergroup['isbannedgroup'] == 1)

// Is this user apart of a banned group?
$bannedwarning = '';
if($mybb->usergroup['isbannedgroup'] == 1)

{

{

	// Fetch details on their ban
$query = $db->simple_select("banned", "*", "uid='{$mybb->user['uid']}'", array('limit' => 1));
$ban = $db->fetch_array($query);
if($ban['uid'])

	// Fetch details on their ban
$query = $db->simple_select("banned", "*", "uid='{$mybb->user['uid']}'", array('limit' => 1));
$ban = $db->fetch_array($query);
if($ban['uid'])

	{

	{

		// Format their ban lift date and reason appropriately
if($ban['lifted'] > 0)
{

		// Format their ban lift date and reason appropriately
if($ban['lifted'] > 0)
{

Zeile 466Zeile 481
// Check if this user has a new private message.
if($mybb->user['pmnotice'] == 2 && $mybb->user['pms_unread'] > 0 && $mybb->settings['enablepms'] != 0 && $mybb->usergroup['canusepms'] != 0 && $mybb->usergroup['canview'] != 0 && ($current_page != "private.php" || $mybb->input['action'] != "read"))
{

// Check if this user has a new private message.
if($mybb->user['pmnotice'] == 2 && $mybb->user['pms_unread'] > 0 && $mybb->settings['enablepms'] != 0 && $mybb->usergroup['canusepms'] != 0 && $mybb->usergroup['canview'] != 0 && ($current_page != "private.php" || $mybb->input['action'] != "read"))
{

 
	if(!$parser)
{
require_once MYBB_ROOT.'inc/class_parser.php';
$parser = new postParser;
}


	$query = $db->query("
SELECT pm.subject, pm.pmid, fu.username AS fromusername, fu.uid AS fromuid
FROM ".TABLE_PREFIX."privatemessages pm

	$query = $db->query("
SELECT pm.subject, pm.pmid, fu.username AS fromusername, fu.uid AS fromuid
FROM ".TABLE_PREFIX."privatemessages pm

Zeile 474Zeile 495
		ORDER BY pm.dateline DESC
LIMIT 1
");

		ORDER BY pm.dateline DESC
LIMIT 1
");

 


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

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

 
	$pm['subject'] = $parser->parse_badwords($pm['subject']);

	
if($pm['fromuid'] == 0)
{
$pm['fromusername'] = $lang->mybb_engine;
$user_text = $pm['fromusername'];

	
if($pm['fromuid'] == 0)
{
$pm['fromusername'] = $lang->mybb_engine;
$user_text = $pm['fromusername'];

	}
else
{

	}
else
{

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

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

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

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

	{

	{

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

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

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

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





// Set up some of the default templates
eval("\$headerinclude = \"".$templates->get("headerinclude")."\";");
eval("\$gobutton = \"".$templates->get("gobutton")."\";");

// Set up some of the default templates
eval("\$headerinclude = \"".$templates->get("headerinclude")."\";");
eval("\$gobutton = \"".$templates->get("gobutton")."\";");

Zeile 509Zeile 532
if($mybb->settings['showvernum'] == 1)
{
$mybbversion = ' '.$mybb->version;

if($mybb->settings['showvernum'] == 1)
{
$mybbversion = ' '.$mybb->version;

}

}

else
{
$mybbversion = '';

else
{
$mybbversion = '';

}

}


// Check to see if we have any tasks to run
$task_cache = $cache->read("tasks");
if(!$task_cache['nextrun'])


// Check to see if we have any tasks to run
$task_cache = $cache->read("tasks");
if(!$task_cache['nextrun'])

{

{

	$task_cache['nextrun'] = TIME_NOW;
}
if($task_cache['nextrun'] <= TIME_NOW)

	$task_cache['nextrun'] = TIME_NOW;
}
if($task_cache['nextrun'] <= TIME_NOW)

{

{

	$task_image = "<img src=\"{$mybb->settings['bburl']}/task.php\" border=\"0\" width=\"1\" height=\"1\" alt=\"\" />";
}
else

	$task_image = "<img src=\"{$mybb->settings['bburl']}/task.php\" border=\"0\" width=\"1\" height=\"1\" alt=\"\" />";
}
else

Zeile 546Zeile 569
		else
{
$lang_options .= "<option value=\"{$key}\">&nbsp;&nbsp;&nbsp;{$language}</option>\n";

		else
{
$lang_options .= "<option value=\"{$key}\">&nbsp;&nbsp;&nbsp;{$language}</option>\n";

		}
}

		}
}

	
$lang_redirect_url = get_current_location(true, 'language');


	
$lang_redirect_url = get_current_location(true, 'language');


Zeile 657Zeile 680

// Find out if this user of ours is using a banned email address.
// If they are, redirect them to change it


// Find out if this user of ours is using a banned email address.
// If they are, redirect them to change it

if($mybb->settings['emailkeep'] && $mybb->user['uid'])

if($mybb->user['uid'] && is_banned_email($mybb->user['email']) && $mybb->settings['emailkeep'] != 1)

{

{

	if(is_banned_email($mybb->user['email']))

	if(THIS_SCRIPT != "usercp.php" || THIS_SCRIPT == "usercp.php" && $mybb->input['action'] != "email" && $mybb->input['action'] != "do_email")

	{

	{

		if(THIS_SCRIPT != "usercp.php" || THIS_SCRIPT == "usercp.php" && $mybb->input['action'] != "email" && $mybb->input['action'] != "do_email")
{
redirect("usercp.php?action=email");
}
else if($mybb->request_method != "post")
{
$banned_email_error = inline_error(array($lang->banned_email_warning));
}

		redirect("usercp.php?action=email");
}
else if($mybb->request_method != "post")
{
$banned_email_error = inline_error(array($lang->banned_email_warning));




	}
}


	}
}