Zeile 6 | Zeile 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 5736 2011-12-29 19:56:07Z ralgith $
|
*/
$working_dir = dirname(__FILE__);
| */
$working_dir = dirname(__FILE__);
|
Zeile 61 | Zeile 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 241 | Zeile 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 356 | Zeile 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 385 | Zeile 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 393 | Zeile 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 409 | Zeile 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 432 | Zeile 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);
| // Fetch details on their ban $query = $db->simple_select("banned", "*", "uid='{$mybb->user['uid']}'", array('limit' => 1)); $ban = $db->fetch_array($query);
|
Zeile 509 | Zeile 524 |
---|
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 546 | Zeile 561 |
---|
else { $lang_options .= "<option value=\"{$key}\"> {$language}</option>\n";
|
else { $lang_options .= "<option value=\"{$key}\"> {$language}</option>\n";
|
} }
| } }
|
$lang_redirect_url = get_current_location(true, 'language');
| $lang_redirect_url = get_current_location(true, 'language');
|
Zeile 657 | Zeile 672 |
---|
// 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));
|
} }
| } }
|