Zeile 13 | Zeile 13 |
---|
{ $working_dir = '.'; }
|
{ $working_dir = '.'; }
|
| $shutdown_queries = $shutdown_functions = array();
|
// Load main MyBB core file which begins all of the magic require_once $working_dir.'/inc/init.php';
|
// Load main MyBB core file which begins all of the magic require_once $working_dir.'/inc/init.php';
|
$shutdown_queries = $shutdown_functions = array();
| |
// Read the usergroups cache as well as the moderators cache $groupscache = $cache->read('usergroups');
| // Read the usergroups cache as well as the moderators cache $groupscache = $cache->read('usergroups');
|
Zeile 27 | Zeile 27 |
---|
{ $cache->update_usergroups(); $groupscache = $cache->read('usergroups');
|
{ $cache->update_usergroups(); $groupscache = $cache->read('usergroups');
|
}
if(!defined('THIS_SCRIPT')) { define('THIS_SCRIPT', '');
| |
}
$current_page = my_strtolower(basename(THIS_SCRIPT));
|
}
$current_page = my_strtolower(basename(THIS_SCRIPT));
|
|
|
// Send page headers - don't send no-cache headers for attachment.php if($current_page != 'attachment.php') {
| // Send page headers - don't send no-cache headers for attachment.php if($current_page != 'attachment.php') {
|
Zeile 84 | Zeile 79 |
---|
else if(!$mybb->user['uid'] && !empty($mybb->cookies['mybblang']) && $lang->language_exists($mybb->cookies['mybblang'])) { $mybb->settings['bblanguage'] = $mybb->cookies['mybblang'];
|
else if(!$mybb->user['uid'] && !empty($mybb->cookies['mybblang']) && $lang->language_exists($mybb->cookies['mybblang'])) { $mybb->settings['bblanguage'] = $mybb->cookies['mybblang'];
|
}
| }
|
else if(!isset($mybb->settings['bblanguage']))
|
else if(!isset($mybb->settings['bblanguage']))
|
{
| {
|
$mybb->settings['bblanguage'] = 'english';
|
$mybb->settings['bblanguage'] = 'english';
|
}
| }
|
// Load language $lang->set_language($mybb->settings['bblanguage']); $lang->load('global'); $lang->load('messages');
|
// Load language $lang->set_language($mybb->settings['bblanguage']); $lang->load('global'); $lang->load('messages');
|
| // Wipe lockout cookie if enough time has passed if($mybb->cookies['lockoutexpiry'] && $mybb->cookies['lockoutexpiry'] < TIME_NOW) { my_unsetcookie('lockoutexpiry'); }
|
// Run global_start plugin hook now that the basics are set up $plugins->run_hooks('global_start');
| // Run global_start plugin hook now that the basics are set up $plugins->run_hooks('global_start');
|
Zeile 277 | Zeile 278 |
---|
// No theme was found - we attempt to load the master or any other theme if(!isset($theme['tid']) || isset($theme['tid']) && !$theme['tid'])
|
// No theme was found - we attempt to load the master or any other theme if(!isset($theme['tid']) || isset($theme['tid']) && !$theme['tid'])
|
{
| {
|
// Missing theme was from a forum, run a query to set any forums using the theme to the default if($load_from_forum == 1)
|
// Missing theme was from a forum, run a query to set any forums using the theme to the default if($load_from_forum == 1)
|
{
| {
|
$db->update_query('forums', array('style' => 0), "style = '{$style['style']}'");
|
$db->update_query('forums', array('style' => 0), "style = '{$style['style']}'");
|
}
| }
|
// Missing theme was from a user, run a query to set any users using the theme to the default else if($load_from_user == 1) {
| // Missing theme was from a user, run a query to set any users using the theme to the default else if($load_from_user == 1) {
|
Zeile 294 | Zeile 295 |
---|
$theme = $db->fetch_array($query); } $theme = @array_merge($theme, my_unserialize($theme['properties']));
|
$theme = $db->fetch_array($query); } $theme = @array_merge($theme, my_unserialize($theme['properties']));
|
|
|
// Fetch all necessary stylesheets $stylesheets = ''; $theme['stylesheets'] = my_unserialize($theme['stylesheets']);
| // Fetch all necessary stylesheets $stylesheets = ''; $theme['stylesheets'] = my_unserialize($theme['stylesheets']);
|
Zeile 327 | Zeile 328 |
---|
{ continue; }
|
{ continue; }
|
if(strpos($page_stylesheet, 'css.php') !== false) { $stylesheet_url = $mybb->settings['bburl'] . '/' . $page_stylesheet; }
| if(strpos($page_stylesheet, 'css.php') !== false) { $stylesheet_url = $mybb->settings['bburl'] . '/' . $page_stylesheet; }
|
else
|
else
|
{
| {
|
$stylesheet_url = $mybb->get_asset_url($page_stylesheet);
|
$stylesheet_url = $mybb->get_asset_url($page_stylesheet);
|
}
| }
|
if($mybb->settings['minifycss']) {
| if($mybb->settings['minifycss']) {
|
Zeile 343 | Zeile 344 |
---|
}
if(strpos($page_stylesheet, 'css.php') !== false)
|
}
if(strpos($page_stylesheet, 'css.php') !== false)
|
{
| {
|
// We need some modification to get it working with the displayorder $query_string = parse_url($stylesheet_url, PHP_URL_QUERY); $id = (int) my_substr($query_string, 11); $query = $db->simple_select("themestylesheets", "name", "sid={$id}"); $real_name = $db->fetch_field($query, "name"); $theme_stylesheets[$real_name] = "<link type=\"text/css\" rel=\"stylesheet\" href=\"{$stylesheet_url}\" />\n";
|
// We need some modification to get it working with the displayorder $query_string = parse_url($stylesheet_url, PHP_URL_QUERY); $id = (int) my_substr($query_string, 11); $query = $db->simple_select("themestylesheets", "name", "sid={$id}"); $real_name = $db->fetch_field($query, "name"); $theme_stylesheets[$real_name] = "<link type=\"text/css\" rel=\"stylesheet\" href=\"{$stylesheet_url}\" />\n";
|
}
| }
|
else { $theme_stylesheets[basename($page_stylesheet)] = "<link type=\"text/css\" rel=\"stylesheet\" href=\"{$stylesheet_url}\" />\n";
| else { $theme_stylesheets[basename($page_stylesheet)] = "<link type=\"text/css\" rel=\"stylesheet\" href=\"{$stylesheet_url}\" />\n";
|
Zeile 358 | Zeile 359 |
---|
$already_loaded[$page_stylesheet] = 1; }
|
$already_loaded[$page_stylesheet] = 1; }
|
} }
| } }
|
} unset($actions);
|
} unset($actions);
|
|
|
if(!empty($theme_stylesheets) && is_array($theme['disporder'])) { foreach($theme['disporder'] as $style_name => $order)
| if(!empty($theme_stylesheets) && is_array($theme['disporder'])) { foreach($theme['disporder'] as $style_name => $order)
|
Zeile 376 | Zeile 377 |
---|
// Are we linking to a remote theme server? if(my_validate_url($theme['imgdir']))
|
// Are we linking to a remote theme server? if(my_validate_url($theme['imgdir']))
|
{
| {
|
// 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 408 | Zeile 409 |
---|
if(!@is_dir($img_directory)) { $theme['imgdir'] = 'images';
|
if(!@is_dir($img_directory)) { $theme['imgdir'] = 'images';
|
}
| }
|
// If a language directory for the current language exists within the theme - we use it if(!empty($mybb->user['language']) && is_dir($img_directory.'/'.$mybb->user['language']))
| // If a language directory for the current language exists within the theme - we use it if(!empty($mybb->user['language']) && is_dir($img_directory.'/'.$mybb->user['language']))
|
Zeile 435 | Zeile 436 |
---|
// Theme logo - is it a relative URL to the forum root? Append bburl if(!preg_match("#^(\.\.?(/|$)|([a-z0-9]+)://)#i", $theme['logo']) && substr($theme['logo'], 0, 1) != '/')
|
// Theme logo - is it a relative URL to the forum root? Append bburl if(!preg_match("#^(\.\.?(/|$)|([a-z0-9]+)://)#i", $theme['logo']) && substr($theme['logo'], 0, 1) != '/')
|
{
| {
|
$theme['logo'] = $mybb->get_asset_url($theme['logo']);
|
$theme['logo'] = $mybb->get_asset_url($theme['logo']);
|
}
| }
|
// Load Main Templates and Cached Templates if(isset($templatelist)) { $templatelist .= ',';
|
// Load Main Templates and Cached Templates if(isset($templatelist)) { $templatelist .= ',';
|
}
| }
|
else { $templatelist = '';
|
else { $templatelist = '';
|
}
$templatelist .= "headerinclude,header,footer,gobutton,htmldoctype,header_welcomeblock_member,header_welcomeblock_guest,header_welcomeblock_member_moderator,header_welcomeblock_member_admin,footer_languageselect_option"; $templatelist .= ",global_pending_joinrequests,global_awaiting_activation,nav,nav_sep,nav_bit,nav_sep_active,nav_bit_active,footer_languageselect,footer_themeselect,header_menu_calendar,global_unreadreports,smilie"; $templatelist .= ",global_boardclosed_warning,global_bannedwarning,error_inline,error_nopermission_loggedin,error_nopermission,header_quicksearch,header_menu_search,header_menu_portal,header_menu_memberlist,redirect"; $templatelist .= ",video_dailymotion_embed,video_facebook_embed,video_liveleak_embed,video_metacafe_embed,video_myspacetv_embed,video_veoh_embed,video_vimeo_embed,video_yahoo_embed,video_youtube_embed,global_dst_detection"; $templatelist .= ",smilieinsert_row,smilieinsert_row_empty,smilieinsert,smilieinsert_getmore,smilieinsert_smilie,global_board_offline_modal,footer_themeselector,task_image,usercp_themeselector_option,debug_summary"; $templatelist .= ",mycode_code,mycode_email,mycode_img,mycode_php,mycode_quote_post,mycode_size_int,mycode_url,global_no_permission_modal,global_boardclosed_reason,nav_dropdown,footer_contactus,global_pm_alert,error"; $templates->cache($db->escape_string($templatelist));
| }
$templatelist .= "headerinclude,header,footer,gobutton,htmldoctype,header_welcomeblock_member,header_welcomeblock_member_user,header_welcomeblock_member_moderator,header_welcomeblock_member_admin,error"; $templatelist .= ",global_pending_joinrequests,global_awaiting_activation,nav,nav_sep,nav_bit,nav_sep_active,nav_bit_active,footer_languageselect,footer_themeselect,global_unreadreports,footer_contactus"; $templatelist .= ",global_boardclosed_warning,global_bannedwarning,error_inline,error_inline_item,error_nopermission_loggedin,error_nopermission,global_pm_alert,header_menu_search,header_menu_portal,redirect,footer_languageselect_option"; $templatelist .= ",video_dailymotion_embed,video_facebook_embed,video_liveleak_embed,video_metacafe_embed,video_myspacetv_embed,video_mixer_embed,video_vimeo_embed,video_yahoo_embed,video_youtube_embed,debug_summary"; $templatelist .= ",smilieinsert_row,smilieinsert_row_empty,smilieinsert,smilieinsert_getmore,smilieinsert_smilie,global_board_offline_modal,footer_themeselector,task_image,usercp_themeselector_option,php_warnings"; $templatelist .= ",mycode_code,mycode_email,mycode_img,mycode_php,mycode_quote_post,mycode_size_int,mycode_url,global_no_permission_modal,global_boardclosed_reason,nav_dropdown,global_remote_avatar_notice"; $templatelist .= ",header_welcomeblock_member_pms,header_welcomeblock_member_search,header_welcomeblock_guest,header_welcomeblock_guest_login_modal,header_welcomeblock_guest_login_modal_lockout"; $templatelist .= ",header_menu_calendar,header_menu_memberlist,global_dst_detection,header_quicksearch,smilie"; $templates->cache($db->escape_string($templatelist));
|
// Set the current date and time now $datenow = my_date($mybb->settings['dateformat'], TIME_NOW, '', false);
| // Set the current date and time now $datenow = my_date($mybb->settings['dateformat'], TIME_NOW, '', false);
|
Zeile 468 | Zeile 471 |
---|
$lastvisit = my_date('relative', $mybb->user['lastvisit'], '', 2); } // Otherwise, they've never visited before
|
$lastvisit = my_date('relative', $mybb->user['lastvisit'], '', 2); } // Otherwise, they've never visited before
|
else {
| else {
|
$lastvisit = $lang->lastvisit_never;
|
$lastvisit = $lang->lastvisit_never;
|
}
$plugins->run_hooks('global_intermediate');
| }
$plugins->run_hooks('global_intermediate');
|
// If the board is closed and we have a usergroup allowed to view the board when closed, then show board closed warning $bbclosedwarning = ''; if($mybb->settings['boardclosed'] == 1 && $mybb->usergroup['canviewboardclosed'] == 1) { eval('$bbclosedwarning = "'.$templates->get('global_boardclosed_warning').'";');
|
// If the board is closed and we have a usergroup allowed to view the board when closed, then show board closed warning $bbclosedwarning = ''; if($mybb->settings['boardclosed'] == 1 && $mybb->usergroup['canviewboardclosed'] == 1) { eval('$bbclosedwarning = "'.$templates->get('global_boardclosed_warning').'";');
|
}
// Prepare the main templates for use $admincplink = $modcplink = '';
| }
// Prepare the main templates for use $admincplink = $modcplink = $usercplink = '';
|
// Load appropriate welcome block for the current logged in user if($mybb->user['uid'] != 0)
| // Load appropriate welcome block for the current logged in user if($mybb->user['uid'] != 0)
|
Zeile 496 | Zeile 499 |
---|
}
if($mybb->usergroup['canmodcp'] == 1)
|
}
if($mybb->usergroup['canmodcp'] == 1)
|
{
| {
|
eval('$modcplink = "'.$templates->get('header_welcomeblock_member_moderator').'";');
|
eval('$modcplink = "'.$templates->get('header_welcomeblock_member_moderator').'";');
|
}
| }
if($mybb->usergroup['canusercp'] == 1) { eval('$usercplink = "'.$templates->get('header_welcomeblock_member_user').'";'); }
|
// Format the welcome back message $lang->welcome_back = $lang->sprintf($lang->welcome_back, build_profile_link(htmlspecialchars_uni($mybb->user['username']), $mybb->user['uid']), $lastvisit);
|
// Format the welcome back message $lang->welcome_back = $lang->sprintf($lang->welcome_back, build_profile_link(htmlspecialchars_uni($mybb->user['username']), $mybb->user['uid']), $lastvisit);
|
| $searchlink = ''; if($mybb->usergroup['cansearch'] == 1) { eval('$searchlink = "'.$templates->get('header_welcomeblock_member_search').'";'); }
|
// Tell the user their PM usage
|
// Tell the user their PM usage
|
$lang->welcome_pms_usage = $lang->sprintf($lang->welcome_pms_usage, my_number_format($mybb->user['pms_unread']), my_number_format($mybb->user['pms_total']));
| $pmslink = ''; if($mybb->settings['enablepms'] != 0 && $mybb->usergroup['canusepms'] == 1) { $lang->welcome_pms_usage = $lang->sprintf($lang->welcome_pms_usage, my_number_format($mybb->user['pms_unread']), my_number_format($mybb->user['pms_total']));
eval('$pmslink = "'.$templates->get('header_welcomeblock_member_pms').'";'); }
|
eval('$welcomeblock = "'.$templates->get('header_welcomeblock_member').'";'); } // Otherwise, we have a guest else { switch($mybb->settings['username_method'])
|
eval('$welcomeblock = "'.$templates->get('header_welcomeblock_member').'";'); } // Otherwise, we have a guest else { switch($mybb->settings['username_method'])
|
{
| {
|
case 0:
|
case 0:
|
$login_username = $lang->login_username;
| $login_username = $lang->login_username;
|
break; case 1: $login_username = $lang->login_username1; break; case 2: $login_username = $lang->login_username2;
|
break; case 1: $login_username = $lang->login_username1; break; case 2: $login_username = $lang->login_username2;
|
break;
| break;
|
default: $login_username = $lang->login_username; break; }
|
default: $login_username = $lang->login_username; break; }
|
| if($mybb->cookies['lockoutexpiry']) { $secsleft = (int)($mybb->cookies['lockoutexpiry'] - TIME_NOW); $hoursleft = floor($secsleft / 3600); $minsleft = floor(($secsleft / 60) % 60); $secsleft = floor($secsleft % 60);
$lang->failed_login_wait = $lang->sprintf($lang->failed_login_wait, $hoursleft, $minsleft, $secsleft);
eval('$loginform = "'.$templates->get('header_welcomeblock_guest_login_modal_lockout').'";'); } else { eval('$loginform = "'.$templates->get('header_welcomeblock_guest_login_modal').'";'); }
|
eval('$welcomeblock = "'.$templates->get('header_welcomeblock_guest').'";'); }
| eval('$welcomeblock = "'.$templates->get('header_welcomeblock_guest').'";'); }
|
Zeile 557 | Zeile 595 |
---|
if($mybb->user['uid'] != 0 && is_array($groupleaders) && array_key_exists($mybb->user['uid'], $groupleaders)) { $groupleader = $groupleaders[$mybb->user['uid']];
|
if($mybb->user['uid'] != 0 && is_array($groupleaders) && array_key_exists($mybb->user['uid'], $groupleaders)) { $groupleader = $groupleaders[$mybb->user['uid']];
|
| $showjoinnotice = false;
|
$gids = "'0'"; foreach($groupleader as $user)
| $gids = "'0'"; foreach($groupleader as $user)
|
Zeile 567 | Zeile 606 |
---|
}
$user['gid'] = (int)$user['gid'];
|
}
$user['gid'] = (int)$user['gid'];
|
$gids .= ",'{$user['gid']}'"; }
| |
|
|
$query = $db->simple_select('joinrequests', 'COUNT(uid) as total', "gid IN ({$gids}) AND invite='0'"); $total_joinrequests = $db->fetch_field($query, 'total');
if($total_joinrequests > 0)
| if(!empty($groupscache[$user['gid']]['joinable']) && $groupscache[$user['gid']]['joinable'] == 1) { $showjoinnotice = true; $gids .= ",'{$user['gid']}'"; } }
if($showjoinnotice)
|
{
|
{
|
if($total_joinrequests == 1)
| $query = $db->simple_select('joinrequests', 'COUNT(uid) as total', "gid IN ({$gids}) AND invite='0'"); $total_joinrequests = $db->fetch_field($query, 'total');
if($total_joinrequests > 0)
|
{
|
{
|
$lang->pending_joinrequests = $lang->pending_joinrequest; } else { $total_joinrequests = my_number_format($total_joinrequests); $lang->pending_joinrequests = $lang->sprintf($lang->pending_joinrequests, $total_joinrequests); }
| if($total_joinrequests == 1) { $lang->pending_joinrequests = $lang->pending_joinrequest; } else { $total_joinrequests = my_number_format($total_joinrequests); $lang->pending_joinrequests = $lang->sprintf($lang->pending_joinrequests, $total_joinrequests); }
|
|
|
eval('$pending_joinrequests = "'.$templates->get('global_pending_joinrequests').'";');
| eval('$pending_joinrequests = "'.$templates->get('global_pending_joinrequests').'";'); }
|
} }
| } }
|
Zeile 598 | Zeile 645 |
---|
{ // First we check if the user's a super admin: if yes, we don't care about permissions $can_access_moderationqueue = true;
|
{ // First we check if the user's a super admin: if yes, we don't care about permissions $can_access_moderationqueue = true;
|
$is_super_admin = is_super_admin($recipient['uid']);
| $is_super_admin = is_super_admin($mybb->user['uid']);
|
if(!$is_super_admin) { // Include admin functions
| if(!$is_super_admin) { // Include admin functions
|
Zeile 618 | Zeile 665 |
---|
$permissions = forum_admin_permissions(); if(array_key_exists('moderation_queue', $permissions['permissions']) && $adminperms['forum']['moderation_queue'] != 1)
|
$permissions = forum_admin_permissions(); if(array_key_exists('moderation_queue', $permissions['permissions']) && $adminperms['forum']['moderation_queue'] != 1)
|
{
| {
|
$can_access_moderationqueue = false; } }
| $can_access_moderationqueue = false; } }
|
Zeile 646 | Zeile 693 |
---|
{ $unread = 0; $query = $db->simple_select('reportedcontent', 'id3', "reportstatus='0' AND (type = 'post' OR type = '')");
|
{ $unread = 0; $query = $db->simple_select('reportedcontent', 'id3', "reportstatus='0' AND (type = 'post' OR type = '')");
|
|
|
while($fid = $db->fetch_field($query, 'id3')) { if(is_moderator($fid, "canmanagereportedposts"))
| while($fid = $db->fetch_field($query, 'id3')) { if(is_moderator($fid, "canmanagereportedposts"))
|
Zeile 687 | Zeile 734 |
---|
// 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);
|
|
|
if($ban['uid']) { // Format their ban lift date and reason appropriately
| if($ban['uid']) { // Format their ban lift date and reason appropriately
|
Zeile 696 | Zeile 743 |
---|
if($ban['lifted'] > 0) {
|
if($ban['lifted'] > 0) {
|
$banlift = my_date($mybb->settings['dateformat'], $ban['lifted']) . $lang->comma . my_date($mybb->settings['timeformat'], $ban['lifted']);
| $banlift = my_date('normal', $ban['lifted']);
|
} }
| } }
|
Zeile 721 | Zeile 768 |
---|
if(isset($mybb->user['pmnotice']) && $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->get_input('action') != "read")) { if(!isset($parser))
|
if(isset($mybb->user['pmnotice']) && $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->get_input('action') != "read")) { if(!isset($parser))
|
{
| {
|
require_once MYBB_ROOT.'inc/class_parser.php'; $parser = new postParser; }
| require_once MYBB_ROOT.'inc/class_parser.php'; $parser = new postParser; }
|
Zeile 752 | Zeile 799 |
---|
if($mybb->user['pms_unread'] == 1) { $privatemessage_text = $lang->sprintf($lang->newpm_notice_one, $user_text, $mybb->settings['bburl'], $pm['pmid'], htmlspecialchars_uni($pm['subject']));
|
if($mybb->user['pms_unread'] == 1) { $privatemessage_text = $lang->sprintf($lang->newpm_notice_one, $user_text, $mybb->settings['bburl'], $pm['pmid'], htmlspecialchars_uni($pm['subject']));
|
} else {
| } else {
|
$privatemessage_text = $lang->sprintf($lang->newpm_notice_multiple, $mybb->user['pms_unread'], $user_text, $mybb->settings['bburl'], $pm['pmid'], htmlspecialchars_uni($pm['subject'])); } eval('$pm_notice = "'.$templates->get('global_pm_alert').'";');
|
$privatemessage_text = $lang->sprintf($lang->newpm_notice_multiple, $mybb->user['pms_unread'], $user_text, $mybb->settings['bburl'], $pm['pmid'], htmlspecialchars_uni($pm['subject'])); } eval('$pm_notice = "'.$templates->get('global_pm_alert').'";');
|
| }
$remote_avatar_notice = ''; if(($mybb->user['avatartype'] === 'remote' || $mybb->user['avatartype'] === 'gravatar') && !$mybb->settings['allowremoteavatars']) { eval('$remote_avatar_notice = "'.$templates->get('global_remote_avatar_notice').'";');
|
}
if($mybb->settings['awactialert'] == 1 && $mybb->usergroup['cancp'] == 1)
| }
if($mybb->settings['awactialert'] == 1 && $mybb->usergroup['cancp'] == 1)
|
Zeile 786 | Zeile 839 |
---|
else { $awaitingusers = my_number_format($awaitingusers);
|
else { $awaitingusers = my_number_format($awaitingusers);
|
}
| }
|
if($awaitingusers > 0) { if($awaitingusers == 1)
|
if($awaitingusers > 0) { if($awaitingusers == 1)
|
{
| {
|
$awaiting_message = $lang->awaiting_message_single;
|
$awaiting_message = $lang->awaiting_message_single;
|
}
| }
|
else
|
else
|
{
| {
|
$awaiting_message = $lang->sprintf($lang->awaiting_message_plural, $awaitingusers);
|
$awaiting_message = $lang->sprintf($lang->awaiting_message_plural, $awaitingusers);
|
}
| }
|
if($admincplink) { $awaiting_message .= $lang->sprintf($lang->awaiting_message_link, $mybb->settings['bburl'], $admin_dir); }
|
if($admincplink) { $awaiting_message .= $lang->sprintf($lang->awaiting_message_link, $mybb->settings['bburl'], $admin_dir); }
|
|
|
eval('$awaitingusers = "'.$templates->get('global_awaiting_activation').'";');
|
eval('$awaitingusers = "'.$templates->get('global_awaiting_activation').'";');
|
}
| }
|
else { $awaitingusers = ''; } }
|
else { $awaitingusers = ''; } }
|
|
|
// 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 819 | Zeile 872 |
---|
eval('$header = "'.$templates->get('header').'";');
$copy_year = my_date('Y', TIME_NOW);
|
eval('$header = "'.$templates->get('header').'";');
$copy_year = my_date('Y', TIME_NOW);
|
|
|
// Are we showing version numbers in the footer? $mybbversion = ''; if($mybb->settings['showvernum'] == 1)
| // Are we showing version numbers in the footer? $mybbversion = ''; if($mybb->settings['showvernum'] == 1)
|
Zeile 838 | Zeile 891 |
---|
if($task_cache['nextrun'] <= TIME_NOW) { eval("\$task_image = \"".$templates->get("task_image")."\";");
|
if($task_cache['nextrun'] <= TIME_NOW) { eval("\$task_image = \"".$templates->get("task_image")."\";");
|
| }
// Post code $post_code_string = ''; if($mybb->user['uid']) { $post_code_string = '&my_post_key='.$mybb->post_code;
|
}
// Are we showing the quick language selection box?
| }
// Are we showing the quick language selection box?
|
Zeile 864 | Zeile 924 |
---|
eval('$lang_options .= "'.$templates->get('footer_languageselect_option').'";'); }
|
eval('$lang_options .= "'.$templates->get('footer_languageselect_option').'";'); }
|
|
|
$lang_redirect_url = get_current_location(true, 'language'); eval('$lang_select = "'.$templates->get('footer_languageselect').'";');
|
$lang_redirect_url = get_current_location(true, 'language'); eval('$lang_select = "'.$templates->get('footer_languageselect').'";');
|
}
| }
|
}
|
}
|
|
|
// Are we showing the quick theme selection box? $theme_select = $theme_options = ''; if($mybb->settings['showthemeselect'] != 0)
| // Are we showing the quick theme selection box? $theme_select = $theme_options = ''; if($mybb->settings['showthemeselect'] != 0)
|
Zeile 880 | Zeile 940 |
---|
{ $theme_redirect_url = get_current_location(true, 'theme'); eval('$theme_select = "'.$templates->get('footer_themeselect').'";');
|
{ $theme_redirect_url = get_current_location(true, 'theme'); eval('$theme_select = "'.$templates->get('footer_themeselect').'";');
|
}
| }
|
}
// If we use the contact form, show 'Contact Us' link when appropriate
| }
// If we use the contact form, show 'Contact Us' link when appropriate
|
Zeile 899 | Zeile 959 |
---|
$auto_dst_detection = ''; if($mybb->user['uid'] > 0 && $mybb->user['dstcorrection'] == 2) {
|
$auto_dst_detection = ''; if($mybb->user['uid'] > 0 && $mybb->user['dstcorrection'] == 2) {
|
$timezone = $mybb->user['timezone'] + $mybb->user['dst'];
| $timezone = (float)$mybb->user['timezone'] + $mybb->user['dst'];
|
eval('$auto_dst_detection = "'.$templates->get('global_dst_detection').'";'); }
| eval('$auto_dst_detection = "'.$templates->get('global_dst_detection').'";'); }
|
Zeile 934 | Zeile 994 |
---|
'logout', ), 'captcha.php',
|
'logout', ), 'captcha.php',
|
| 'contact.php',
|
);
// If the board is closed, the user is not an administrator and they're not trying to login, show the board closed message
| );
// If the board is closed, the user is not an administrator and they're not trying to login, show the board closed message
|
Zeile 946 | Zeile 1007 |
---|
}
eval('$reason = "'.$templates->get('global_boardclosed_reason').'";');
|
}
eval('$reason = "'.$templates->get('global_boardclosed_reason').'";');
|
$lang->error_boardclosed .= $reason;
if(!$mybb->get_input('modal')) { error($lang->error_boardclosed); }
| $lang->error_boardclosed .= $reason;
if(!$mybb->get_input('modal')) { error($lang->error_boardclosed); }
|
else { $output = '';
| else { $output = '';
|
Zeile 976 | Zeile 1037 |
---|
'resetpassword', ), 'captcha.php',
|
'resetpassword', ), 'captcha.php',
|
| 'contact.php',
|
);
// If the board forces user to login/register, and the user is a guest, show the force login message
| );
// If the board forces user to login/register, and the user is a guest, show the force login message
|
Zeile 984 | Zeile 1046 |
---|
// Show error error_no_permission(); exit;
|
// Show error error_no_permission(); exit;
|
}
| }
|
// Load Limiting if($mybb->usergroup['cancp'] != 1 && $mybb->settings['load'] > 0 && ($load = get_server_load()) && $load != $lang->unknown && $load > $mybb->settings['load']) {
| // Load Limiting if($mybb->usergroup['cancp'] != 1 && $mybb->settings['load'] > 0 && ($load = get_server_load()) && $load != $lang->unknown && $load > $mybb->settings['load']) {
|
Zeile 999 | Zeile 1061 |
---|
if(isset($mybb->input['referrername'])) { $condition = "username = '".$db->escape_string($mybb->get_input('referrername'))."'";
|
if(isset($mybb->input['referrername'])) { $condition = "username = '".$db->escape_string($mybb->get_input('referrername'))."'";
|
} else
| } else
|
{ $condition = "uid = '".$mybb->get_input('referrer', MyBB::INPUT_INT)."'"; }
| { $condition = "uid = '".$mybb->get_input('referrer', MyBB::INPUT_INT)."'"; }
|
Zeile 1077 | Zeile 1139 |
---|
$colcookie = $mybb->cookies['collapsed']; }
|
$colcookie = $mybb->cookies['collapsed']; }
|
// set up collapsable items (to automatically show them us expanded) $collapsed = array('boardstats' => '', 'boardstats_e' => '', 'quickreply' => '', 'quickreply_e' => ''); $collapsedimg = $collapsed;
| $collapse = $collapsed = $collapsedimg = array();
|
if($colcookie) {
|
if($colcookie) {
|
$col = explode("|", $colcookie); if(!is_array($col)) { $col[0] = $colcookie; // only one item } unset($collapsed); foreach($col as $key => $val)
| // Preserve and don't unset $collapse, will be needed globally throughout many pages $collapse = explode("|", $colcookie); foreach($collapse as $val)
|
{ $ex = $val."_e"; $co = $val."_c";
| { $ex = $val."_e"; $co = $val."_c";
|