Vergleich global.php - 1.8.14 - 1.8.26

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 13Zeile 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');

// If the groups cache doesn't exist, update it and re-read it
if(!is_array($groupscache))

// Read the usergroups cache as well as the moderators cache
$groupscache = $cache->read('usergroups');

// If the groups cache doesn't exist, update it and re-read it
if(!is_array($groupscache))

{

{

	$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 84Zeile 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 114Zeile 115
	// Set up user handler.
require_once MYBB_ROOT.'inc/datahandlers/user.php';
$userhandler = new UserDataHandler('update');

	// Set up user handler.
require_once MYBB_ROOT.'inc/datahandlers/user.php';
$userhandler = new UserDataHandler('update');





	$user = array(
'uid' => $mybb->user['uid'],
'style' => $mybb->get_input('theme', MyBB::INPUT_INT),

	$user = array(
'uid' => $mybb->user['uid'],
'style' => $mybb->get_input('theme', MyBB::INPUT_INT),

Zeile 131Zeile 132

// If user is logged in, update their theme selection with the new one
if($mybb->user['uid'])


// If user is logged in, update their theme selection with the new one
if($mybb->user['uid'])

		{

		{

			if(isset($mybb->cookies['mybbtheme']))
{
my_unsetcookie('mybbtheme');

			if(isset($mybb->cookies['mybbtheme']))
{
my_unsetcookie('mybbtheme');

Zeile 148Zeile 149
}
// Cookied theme!
else if(!$mybb->user['uid'] && !empty($mybb->cookies['mybbtheme']))

}
// Cookied theme!
else if(!$mybb->user['uid'] && !empty($mybb->cookies['mybbtheme']))

{
$mybb->user['style'] = (int)$mybb->cookies['mybbtheme'];

{
$mybb->user['style'] = (int)$mybb->cookies['mybbtheme'];

}

// This user has a custom theme set in their profile

}

// This user has a custom theme set in their profile

Zeile 205Zeile 206
	// If we're accessing poll results, fetch the forum theme for it and if we're overriding it
else if(isset($mybb->input['pid']) && THIS_SCRIPT == "polls.php")
{

	// If we're accessing poll results, fetch the forum theme for it and if we're overriding it
else if(isset($mybb->input['pid']) && THIS_SCRIPT == "polls.php")
{

		$query = $db->simple_select('threads', 'fid', "poll = '{$mybb->input['pid']}'", array('limit' => 1));

		$query = $db->query("SELECT t.fid FROM ".TABLE_PREFIX."polls p INNER JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) WHERE p.pid = '{$mybb->input['pid']}' LIMIT 1");

		$fid = $db->fetch_field($query, 'fid');

if($fid)

		$fid = $db->fetch_field($query, 'fid');

if($fid)

Zeile 349Zeile 350
					$id = (int) my_substr($query_string, 11);
$query = $db->simple_select("themestylesheets", "name", "sid={$id}");
$real_name = $db->fetch_field($query, "name");

					$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";

					$theme_stylesheets[$real_name] = $id;

				}
else
{

				}
else
{

Zeile 362Zeile 363
	}
}
unset($actions);

	}
}
unset($actions);

 

$css_php_script_stylesheets = array();


if(!empty($theme_stylesheets) && is_array($theme['disporder']))
{
foreach($theme['disporder'] as $style_name => $order)
{
if(!empty($theme_stylesheets[$style_name]))


if(!empty($theme_stylesheets) && is_array($theme['disporder']))
{
foreach($theme['disporder'] as $style_name => $order)
{
if(!empty($theme_stylesheets[$style_name]))

		{
$stylesheets .= $theme_stylesheets[$style_name];
}








		{
if(is_int($theme_stylesheets[$style_name]))
{
$css_php_script_stylesheets[] = $theme_stylesheets[$style_name];
}
else
{
$stylesheets .= $theme_stylesheets[$style_name];
}
}

	}

	}

 
}

if(!empty($css_php_script_stylesheets))
{
$sheet = $mybb->settings['bburl'] . '/css.php?' . http_build_query(array(
'stylesheet' => $css_php_script_stylesheets
));

$stylesheets .= "<link type=\"text/css\" rel=\"stylesheet\" href=\"{$sheet}\" />\n";

}

// 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 a language directory for the current language exists within the theme - we use it

	if(!empty($mybb->user['language']))

	if(!empty($mybb->user['language']))

	{
$theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language'];
}
else
{
// Check if a custom language directory exists for this theme

	{
$theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language'];
}
else
{
// Check if a custom language directory exists for this theme

		if(!empty($mybb->settings['bblanguage']))
{
$theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->settings['bblanguage'];

		if(!empty($mybb->settings['bblanguage']))
{
$theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->settings['bblanguage'];

Zeile 412Zeile 431

// 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']))

	{

	{

		$theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language'];
}
else
{
// Check if a custom language directory exists for this theme
if(is_dir($img_directory.'/'.$mybb->settings['bblanguage']))

		$theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language'];
}
else
{
// Check if a custom language directory exists for this theme
if(is_dir($img_directory.'/'.$mybb->settings['bblanguage']))

		{

		{

			$theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->settings['bblanguage'];
}
// Otherwise, the image language directory is the same as the language directory for the theme

			$theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->settings['bblanguage'];
}
// Otherwise, the image language directory is the same as the language directory for the theme

Zeile 451Zeile 470

$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 .= "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_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_veoh_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_menu_calendar,header_menu_memberlist,global_dst_detection,header_quicksearch,smilie";


$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_showteamlink,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,global_modqueue,global_modqueue_notice";
$templatelist .= ",header_welcomeblock_member_buddy,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,modal,modal_button";

$templates->cache($db->escape_string($templatelist));

// Set the current date and time now

$templates->cache($db->escape_string($templatelist));

// Set the current date and time now

Zeile 472Zeile 492
else
{
$lastvisit = $lang->lastvisit_never;

else
{
$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)


// 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').'";');
}


	eval('$bbclosedwarning = "'.$templates->get('global_boardclosed_warning').'";');
}


Zeile 491Zeile 511
{
// User can access the admin cp and we're not hiding admin cp links, fetch it
if($mybb->usergroup['cancp'] == 1 && $mybb->config['hide_admin_links'] != 1)

{
// User can access the admin cp and we're not hiding admin cp links, fetch it
if($mybb->usergroup['cancp'] == 1 && $mybb->config['hide_admin_links'] != 1)

	{

	{

		$admin_dir = $config['admin_dir'];
eval('$admincplink = "'.$templates->get('header_welcomeblock_member_admin').'";');

		$admin_dir = $config['admin_dir'];
eval('$admincplink = "'.$templates->get('header_welcomeblock_member_admin').'";');

	}

	}


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').'";');

	}


	}


	if($mybb->usergroup['canusercp'] == 1)
{
eval('$usercplink = "'.$templates->get('header_welcomeblock_member_user').'";');

	if($mybb->usergroup['canusercp'] == 1)
{
eval('$usercplink = "'.$templates->get('header_welcomeblock_member_user').'";');

Zeile 508Zeile 528

// 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 = '';








$buddylink = $searchlink = $pmslink = '';

if(!empty($mybb->user['buddylist']))
{
eval('$buddylink = "' . $templates->get('header_welcomeblock_member_buddy') . '";');
}


	if($mybb->usergroup['cansearch'] == 1)
{
eval('$searchlink = "'.$templates->get('header_welcomeblock_member_search').'";');
}

// Tell the user their PM usage

	if($mybb->usergroup['cansearch'] == 1)
{
eval('$searchlink = "'.$templates->get('header_welcomeblock_member_search').'";');
}

// Tell the user their PM usage

	$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']));

	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']));

Zeile 544Zeile 569
			$login_username = $lang->login_username;
break;
}

			$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').'";');

}


}


// Display menu links and quick search if user has permission
$menu_search = $menu_memberlist = $menu_portal = $menu_calendar = $quicksearch = '';
if($mybb->usergroup['cansearch'] == 1)

// Display menu links and quick search if user has permission
$menu_search = $menu_memberlist = $menu_portal = $menu_calendar = $quicksearch = '';
if($mybb->usergroup['cansearch'] == 1)

{

{

	eval('$menu_search = "'.$templates->get('header_menu_search').'";');
eval('$quicksearch = "'.$templates->get('header_quicksearch').'";');

	eval('$menu_search = "'.$templates->get('header_menu_search').'";');
eval('$quicksearch = "'.$templates->get('header_quicksearch').'";');

}


}


if($mybb->settings['enablememberlist'] == 1 && $mybb->usergroup['canviewmemberlist'] == 1)
{
eval('$menu_memberlist = "'.$templates->get('header_menu_memberlist').'";');

if($mybb->settings['enablememberlist'] == 1 && $mybb->usergroup['canviewmemberlist'] == 1)
{
eval('$menu_memberlist = "'.$templates->get('header_menu_memberlist').'";');

}


}


if($mybb->settings['enablecalendar'] == 1 && $mybb->usergroup['canviewcalendar'] == 1)
{
eval('$menu_calendar = "'.$templates->get('header_menu_calendar').'";');

if($mybb->settings['enablecalendar'] == 1 && $mybb->usergroup['canviewcalendar'] == 1)
{
eval('$menu_calendar = "'.$templates->get('header_menu_calendar').'";');

}


}


if($mybb->settings['portal'] == 1)

if($mybb->settings['portal'] == 1)

{

{

	eval('$menu_portal = "'.$templates->get('header_menu_portal').'";');
}


	eval('$menu_portal = "'.$templates->get('header_menu_portal').'";');
}


Zeile 576Zeile 618
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)

	{

	{

		if($user['canmanagerequests'] != 1)
{
continue;

		if($user['canmanagerequests'] != 1)
{
continue;

		}


		}


		$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($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);












if(!empty($groupscache[$user['gid']]['type']) && $groupscache[$user['gid']]['type'] == 4)
{
$showjoinnotice = true;
$gids .= ",'{$user['gid']}'";
}
}

if($showjoinnotice)
{
$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($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').'";');

 
	}
}


	}
}


$unreadreports = '';



$modnotice = '';
$moderation_queue = array();


// This user is a moderator, super moderator or administrator
if($mybb->settings['reportmethod'] == "db" && ($mybb->usergroup['cancp'] == 1 || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagereportedcontent'] == 1)))
{

// This user is a moderator, super moderator or administrator
if($mybb->settings['reportmethod'] == "db" && ($mybb->usergroup['cancp'] == 1 || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagereportedcontent'] == 1)))
{

Zeile 685Zeile 738
				{
$lang->unread_reports = $lang->sprintf($lang->unread_reports, my_number_format($unread));
}

				{
$lang->unread_reports = $lang->sprintf($lang->unread_reports, my_number_format($unread));
}


eval('$unreadreports = "'.$templates->get('global_unreadreports').'";');

				
eval('$moderation_queue[] = "'.$templates->get('global_unreadreports', 1, 0).'";');

			}
}
}

			}
}
}

 
}

// Get awaiting moderation queue stats, except if the page is editpost.php,
// because that page can make changes - (un)approving attachments, or deleting
// unapproved attachments - that would invalidate anything generated here.
// Just leave this queue notification blank for editpost.php.
if(!(defined('THIS_SCRIPT') && THIS_SCRIPT == 'editpost.php') && ($can_access_moderationqueue || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagemodqueue'] == 1)))
{
$unapproved_posts = $unapproved_threads = 0;
$query = $db->simple_select("posts", "replyto", "visible = 0");
while($unapproved = $db->fetch_array($query))
{
if($unapproved["replyto"] == 0){
$unapproved_threads++;
} else {
$unapproved_posts++;
}
}

$query = $db->simple_select("attachments", "COUNT(aid) AS unapprovedattachments", "visible=0");
$unapproved_attachments = $db->fetch_field($query, "unapprovedattachments");

$modqueue_types = array('threads', 'posts', 'attachments');

foreach($modqueue_types as $modqueue_type)
{
if(!empty(${'unapproved_'.$modqueue_type}))
{
if(${'unapproved_'.$modqueue_type} == 1)
{
$modqueue_message = $lang->{'unapproved_'.substr($modqueue_type, 0, -1)};
}
else
{
$modqueue_message = $lang->sprintf($lang->{'unapproved_'.$modqueue_type}, my_number_format(${'unapproved_'.$modqueue_type}));
}

eval('$moderation_queue[] = "'.$templates->get('global_modqueue', 1, 0).'";');
}
}
}

if(!empty($moderation_queue))
{
$moderation_queue_last = array_pop($moderation_queue);
if(empty($moderation_queue))
{
$moderation_queue = $moderation_queue_last;
}
else
{
$moderation_queue = implode($lang->comma, $moderation_queue).' '.$lang->and.' '.$moderation_queue_last;
}
$moderation_queue = $lang->sprintf($lang->mod_notice, $moderation_queue);

eval('$modnotice = "'.$templates->get('global_modqueue_notice').'";');

}

// Got a character set?

}

// Got a character set?

Zeile 702Zeile 811
// 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'])
{
// Format their ban lift date and reason appropriately
$banlift = $lang->banned_lifted_never;
$reason = htmlspecialchars_uni($ban['reason']);

if($ban['lifted'] > 0)

{
// Format their ban lift date and reason appropriately
if(!empty($mybb->user['banned']))
{
if(!empty($mybb->user['banlifted']))
{
$banlift = my_date('normal', $mybb->user['banlifted']);
}
else




		{

		{

			$banlift = my_date('normal', $ban['lifted']);

			$banlift = $lang->banned_lifted_never;

		}

		}

	}

if(empty($reason))









	}
else
{
$banlift = $lang->unknown;
}

if(!empty($mybb->user['banreason']))
{
$reason = htmlspecialchars_uni($mybb->user['banreason']);
}
else

	{
$reason = $lang->unknown;

	{
$reason = $lang->unknown;

	}

if(empty($banlift))
{
$banlift = $lang->unknown;

 
	}

// Display a nice warning to the user
eval('$bannedwarning = "'.$templates->get('global_bannedwarning').'";');

	}

// Display a nice warning to the user
eval('$bannedwarning = "'.$templates->get('global_bannedwarning').'";');

}


}


$lang->ajax_loading = str_replace("'", "\\'", $lang->ajax_loading);

// Check if this user has a new private message.

$lang->ajax_loading = str_replace("'", "\\'", $lang->ajax_loading);

// Check if this user has a new private message.

Zeile 798Zeile 907
	if(!empty($awaitingusers['users']))
{
$awaitingusers = (int)$awaitingusers['users'];

	if(!empty($awaitingusers['users']))
{
$awaitingusers = (int)$awaitingusers['users'];

	}
else

	}
else

	{
$awaitingusers = 0;
}

	{
$awaitingusers = 0;
}

Zeile 835Zeile 944
	{
$awaitingusers = '';
}

	{
$awaitingusers = '';
}

 
}

$jsTemplates = array();
foreach (array('modal', 'modal_button') as $template) {
eval('$jsTemplates["'.$template.'"] = "'.$templates->get($template, 1, 0).'";');
$jsTemplates[$template] = str_replace(array("\n","\r"), array("\\\n", ""), addslashes($jsTemplates[$template]));

}

// Set up some of the default templates

}

// Set up some of the default templates

Zeile 842Zeile 957
eval('$gobutton = "'.$templates->get('gobutton').'";');
eval('$htmldoctype = "'.$templates->get('htmldoctype', 1, 0).'";');
eval('$header = "'.$templates->get('header').'";');

eval('$gobutton = "'.$templates->get('gobutton').'";');
eval('$htmldoctype = "'.$templates->get('htmldoctype', 1, 0).'";');
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)

$copy_year = my_date('Y', TIME_NOW);

// Are we showing version numbers in the footer?
$mybbversion = '';
if($mybb->settings['showvernum'] == 1)

{

{

	$mybbversion = ' '.$mybb->version;
}


	$mybbversion = ' '.$mybb->version;
}


Zeile 899Zeile 1014

$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 913Zeile 1028
		$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').'";');
}

 
}

$showteamlink = '';
if($mybb->settings['enableshowteam'] != 0)
{
eval('$showteamlink = "'.$templates->get('footer_showteamlink').'";');

}

// 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 949Zeile 1070
if(is_banned_ip($session->ipaddress, true))
{
if($mybb->user['uid'])

if(is_banned_ip($session->ipaddress, true))
{
if($mybb->user['uid'])

	{

	{

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

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

Zeile 979Zeile 1100
	}

eval('$reason = "'.$templates->get('global_boardclosed_reason').'";');

	}

eval('$reason = "'.$templates->get('global_boardclosed_reason').'";');

	$lang->error_boardclosed .= $reason;

if(!$mybb->get_input('modal'))
{

	$lang->error_boardclosed .= $reason;

if(!$mybb->get_input('modal'))
{

		error($lang->error_boardclosed);
}
else

		error($lang->error_boardclosed);
}
else

Zeile 1066Zeile 1187
			unset($allowable_actions);
}
else if(ALLOWABLE_PAGE !== 1)

			unset($allowable_actions);
}
else if(ALLOWABLE_PAGE !== 1)

		{

		{

			$notallowed = true;
}
}

			$notallowed = true;
}
}

Zeile 1111Zeile 1232
	$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";