Vergleich global.php - 1.8.13 - 1.8.19

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


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


Zeile 27Zeile 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 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 145Zeile 146
			my_setcookie('mybbtheme', $user['style']);
}
}

			my_setcookie('mybbtheme', $user['style']);
}
}

}

}

// 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
if(isset($mybb->user['style']) && (int)$mybb->user['style'] != 0)
{

// This user has a custom theme set in their profile
if(isset($mybb->user['style']) && (int)$mybb->user['style'] != 0)
{

Zeile 182Zeile 183
	if(isset($mybb->input['pid']) && THIS_SCRIPT != "polls.php")
{
$query = $db->simple_select("posts", "fid", "pid = '{$mybb->input['pid']}'", array("limit" => 1));

	if(isset($mybb->input['pid']) && THIS_SCRIPT != "polls.php")
{
$query = $db->simple_select("posts", "fid", "pid = '{$mybb->input['pid']}'", array("limit" => 1));

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

if($fid)
{

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

if($fid)
{

			$style = $forum_cache[$fid];
$load_from_forum = 1;
}

			$style = $forum_cache[$fid];
$load_from_forum = 1;
}

Zeile 219Zeile 220
	{
$style = $forum_cache[$mybb->input['fid']];
$load_from_forum = 1;

	{
$style = $forum_cache[$mybb->input['fid']];
$load_from_forum = 1;

	}

	}

}
unset($valid);


}
unset($valid);


Zeile 252Zeile 253
		if($load_from_user == 1)
{
$db->update_query('users', array('style' => 0), "style='{$mybb->user['style']}' AND uid='{$mybb->user['uid']}'");

		if($load_from_user == 1)
{
$db->update_query('users', array('style' => 0), "style='{$mybb->user['style']}' AND uid='{$mybb->user['uid']}'");

		}


		}


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

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

Zeile 287Zeile 288
	else if($load_from_user == 1)
{
$db->update_query('users', array('style' => 0), "style = '{$mybb->user['style']}'");

	else if($load_from_user == 1)
{
$db->update_query('users', array('style' => 0), "style = '{$mybb->user['style']}'");

	}

	}


// Attempt to load the master or any other theme if the master is not available
$query = $db->simple_select('themes', 'name, tid, properties, stylesheets', '', array('order_by' => 'tid', 'limit' => 1));


// Attempt to load the master or any other theme if the master is not available
$query = $db->simple_select('themes', 'name, tid, properties, stylesheets', '', array('order_by' => 'tid', 'limit' => 1));

Zeile 338Zeile 339
				}

if($mybb->settings['minifycss'])

				}

if($mybb->settings['minifycss'])

				{

				{

					$stylesheet_url = str_replace('.css', '.min.css', $stylesheet_url);
}

if(strpos($page_stylesheet, 'css.php') !== false)

					$stylesheet_url = str_replace('.css', '.min.css', $stylesheet_url);
}

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

					// 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);

Zeile 355Zeile 356
				{
$theme_stylesheets[basename($page_stylesheet)] = "<link type=\"text/css\" rel=\"stylesheet\" href=\"{$stylesheet_url}\" />\n";
}

				{
$theme_stylesheets[basename($page_stylesheet)] = "<link type=\"text/css\" rel=\"stylesheet\" href=\"{$stylesheet_url}\" />\n";
}





				$already_loaded[$page_stylesheet] = 1;
}

				$already_loaded[$page_stylesheet] = 1;
}

		}
}
}

		}
}
}

unset($actions);

if(!empty($theme_stylesheets) && is_array($theme['disporder']))

unset($actions);

if(!empty($theme_stylesheets) && is_array($theme['disporder']))

Zeile 370Zeile 371
		if(!empty($theme_stylesheets[$style_name]))
{
$stylesheets .= $theme_stylesheets[$style_name];

		if(!empty($theme_stylesheets[$style_name]))
{
$stylesheets .= $theme_stylesheets[$style_name];

		}
}
}

		}
}
}


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


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

	{

	{

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

		else
{
$theme['imglangdir'] = $theme['imgdir'];
}

		else
{
$theme['imglangdir'] = $theme['imgdir'];
}

	}

	}

}
else
{

}
else
{

Zeile 406Zeile 407
	}

if(!@is_dir($img_directory))

	}

if(!@is_dir($img_directory))

	{

	{

		$theme['imgdir'] = 'images';
}


		$theme['imgdir'] = 'images';
}


Zeile 423Zeile 424
			$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

		else

		else

		{
$theme['imglangdir'] = $theme['imgdir'];
}
}

		{
$theme['imglangdir'] = $theme['imgdir'];
}
}





	$theme['imgdir'] = $mybb->get_asset_url($theme['imgdir']);
$theme['imglangdir'] = $mybb->get_asset_url($theme['imglangdir']);

	$theme['imgdir'] = $mybb->get_asset_url($theme['imgdir']);
$theme['imglangdir'] = $mybb->get_asset_url($theme['imglangdir']);

}

}


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

}


}


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

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

Zeile 451Zeile 452

$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 .= ",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 .= ",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 .= ",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

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

// Set the current date and time now

Zeile 469Zeile 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 the board is closed and we have a usergroup allowed to view the board when closed, then show board closed warning
$bbclosedwarning = '';

Zeile 485Zeile 487

// Prepare the main templates for use
$admincplink = $modcplink = $usercplink = '';


// Prepare the main templates for use
$admincplink = $modcplink = $usercplink = '';





// Load appropriate welcome block for the current logged in user
if($mybb->user['uid'] != 0)
{
// 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)

// Load appropriate welcome block for the current logged in user
if($mybb->user['uid'] != 0)
{
// 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)

	if($mybb->usergroup['canusercp'] == 1)

	{

	{

		eval('$usercplink = "'.$templates->get('header_welcomeblock_member_user').'";');
}


		eval('$usercplink = "'.$templates->get('header_welcomeblock_member_user').'";');
}


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

	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)

	// Tell the user their PM usage
$pmslink = '';
if($mybb->settings['enablepms'] != 0 && $mybb->usergroup['canusepms'] == 1)

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


Zeile 576Zeile 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 586Zeile 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 979Zeile 1007
	}

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

	}

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

	$lang->error_boardclosed .= $reason;

	$lang->error_boardclosed .= $reason;


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


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

Zeile 1029Zeile 1057

// If there is a valid referrer in the URL, cookie it
if(!$mybb->user['uid'] && $mybb->settings['usereferrals'] == 1 && (isset($mybb->input['referrer']) || isset($mybb->input['referrername'])))


// If there is a valid referrer in the URL, cookie it
if(!$mybb->user['uid'] && $mybb->settings['usereferrals'] == 1 && (isset($mybb->input['referrer']) || isset($mybb->input['referrername'])))

{

{

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

Zeile 1037Zeile 1065
	else
{
$condition = "uid = '".$mybb->get_input('referrer', MyBB::INPUT_INT)."'";

	else
{
$condition = "uid = '".$mybb->get_input('referrer', MyBB::INPUT_INT)."'";

	}


	}


	$query = $db->simple_select('users', 'uid', $condition, array('limit' => 1));
$referrer = $db->fetch_array($query);

if($referrer['uid'])
{
my_setcookie('mybb[referrer]', $referrer['uid']);

	$query = $db->simple_select('users', 'uid', $condition, array('limit' => 1));
$referrer = $db->fetch_array($query);

if($referrer['uid'])
{
my_setcookie('mybb[referrer]', $referrer['uid']);

	}
}

	}
}


$output = '';
$notallowed = false;


$output = '';
$notallowed = false;

Zeile 1080Zeile 1108
		if(!$mybb->get_input('modal'))
{
error_no_permission();

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

		}

		}

		else
{
eval('$output = "'.$templates->get('global_no_permission_modal', 1, 0).'";');

		else
{
eval('$output = "'.$templates->get('global_no_permission_modal', 1, 0).'";');

Zeile 1097Zeile 1125
	if(THIS_SCRIPT != 'usercp.php' || THIS_SCRIPT == 'usercp.php' && $mybb->get_input('action') != 'email' && $mybb->get_input('action') != 'do_email')
{
redirect('usercp.php?action=email');

	if(THIS_SCRIPT != 'usercp.php' || THIS_SCRIPT == 'usercp.php' && $mybb->get_input('action') != 'email' && $mybb->get_input('action') != 'do_email')
{
redirect('usercp.php?action=email');

	}

	}

	else if($mybb->request_method != 'post')

	else if($mybb->request_method != 'post')

	{

	{

		$banned_email_error = inline_error(array($lang->banned_email_warning));

		$banned_email_error = inline_error(array($lang->banned_email_warning));

	}
}


	}
}


// work out which items the user has collapsed
$colcookie = '';
if(!empty($mybb->cookies['collapsed']))

// work out which items the user has collapsed
$colcookie = '';
if(!empty($mybb->cookies['collapsed']))

{

{

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