Vergleich global.php - 1.8.20 - 1.8.28

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 91Zeile 91
$lang->load('messages');

// Wipe lockout cookie if enough time has passed

$lang->load('messages');

// Wipe lockout cookie if enough time has passed

if($mybb->cookies['lockoutexpiry'] && $mybb->cookies['lockoutexpiry'] < TIME_NOW)

if(isset($mybb->cookies['lockoutexpiry']) && $mybb->cookies['lockoutexpiry'] < TIME_NOW)

{
my_unsetcookie('lockoutexpiry');
}

{
my_unsetcookie('lockoutexpiry');
}

Zeile 183Zeile 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)

		if($db->num_rows($query) > 0 && $fid = $db->fetch_field($query, 'fid'))

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

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

Zeile 195Zeile 194
	else if(isset($mybb->input['tid']))
{
$query = $db->simple_select('threads', 'fid', "tid = '{$mybb->input['tid']}'", array('limit' => 1));

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

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

 




		if($fid)

		if($db->num_rows($query) > 0 && $fid = $db->fetch_field($query, 'fid'))

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

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

Zeile 206Zeile 204
	// 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));
$fid = $db->fetch_field($query, 'fid');

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






		if($fid)

		if($db->num_rows($query) > 0 && $fid = $db->fetch_field($query, 'fid'))

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

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

Zeile 336Zeile 333
				else
{
$stylesheet_url = $mybb->get_asset_url($page_stylesheet);

				else
{
$stylesheet_url = $mybb->get_asset_url($page_stylesheet);

 
					if (file_exists(MYBB_ROOT.$page_stylesheet))
{
$stylesheet_url .= "?t=".filemtime(MYBB_ROOT.$page_stylesheet);
}

				}

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

				}

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

Zeile 389Zeile 390
	$sheet = $mybb->settings['bburl'] . '/css.php?' . http_build_query(array(
'stylesheet' => $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";
}


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


Zeile 398Zeile 399
{
// 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']))

	{
$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 442Zeile 443
			$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'];
}
}

Zeile 454Zeile 455

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


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

{

{

	$templatelist .= ',';

	$templatelist .= ',';

}
else
{

}
else
{

	$templatelist = '';
}


	$templatelist = '';
}


Zeile 473Zeile 474
$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 .= ",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";
$templatelist .= ",header_welcomeblock_member_pms,header_welcomeblock_member_search,header_welcomeblock_guest,header_welcomeblock_guest_login_modal,header_welcomeblock_guest_login_modal_lockout";

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


$templatelist .= ",header_menu_calendar,header_menu_memberlist,global_dst_detection,header_quicksearch,smilie,modal,modal_button";
$templates->cache($db->escape_string($templatelist));


Zeile 517Zeile 518
	}

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)

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

	{

	{

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

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







	$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 565Zeile 571
			break;
}


			break;
}


	if($mybb->cookies['lockoutexpiry'])

	if(!empty($mybb->cookies['lockoutexpiry']))

	{
$secsleft = (int)($mybb->cookies['lockoutexpiry'] - TIME_NOW);
$hoursleft = floor($secsleft / 3600);

	{
$secsleft = (int)($mybb->cookies['lockoutexpiry'] - TIME_NOW);
$hoursleft = floor($secsleft / 3600);

Zeile 625Zeile 631

$user['gid'] = (int)$user['gid'];



$user['gid'] = (int)$user['gid'];


		if(!empty($groupscache[$user['gid']]['joinable']) && $groupscache[$user['gid']]['joinable'] == 1)

		if(!empty($groupscache[$user['gid']]['type']) && $groupscache[$user['gid']]['type'] == 4)

		{
$showjoinnotice = true;
$gids .= ",'{$user['gid']}'";

		{
$showjoinnotice = true;
$gids .= ",'{$user['gid']}'";

Zeile 645Zeile 651
			}
else
{

			}
else
{

				$total_joinrequests = my_number_format($total_joinrequests);
$lang->pending_joinrequests = $lang->sprintf($lang->pending_joinrequests, $total_joinrequests);

				$lang->pending_joinrequests = $lang->sprintf($lang->pending_joinrequests, my_number_format($total_joinrequests));


			}

eval('$pending_joinrequests = "'.$templates->get('global_pending_joinrequests').'";');

			}

eval('$pending_joinrequests = "'.$templates->get('global_pending_joinrequests').'";');

Zeile 656Zeile 661

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


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

 
$can_access_moderationqueue = false;


// This user is a moderator, super moderator or administrator


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

if($mybb->usergroup['cancp'] == 1 || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagereportedcontent'] == 1))

{
// Only worth checking if we are here because we have ACP permissions and the other condition fails
if($mybb->usergroup['cancp'] == 1 && !($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagereportedcontent'] == 1))

{
// Only worth checking if we are here because we have ACP permissions and the other condition fails
if($mybb->usergroup['cancp'] == 1 && !($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagereportedcontent'] == 1))

Zeile 667Zeile 673
		$can_access_moderationqueue = true;
$is_super_admin = is_super_admin($mybb->user['uid']);
if(!$is_super_admin)

		$can_access_moderationqueue = true;
$is_super_admin = is_super_admin($mybb->user['uid']);
if(!$is_super_admin)

		{

		{

			// Include admin functions
if(!file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php"))
{

			// Include admin functions
if(!file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php"))
{

Zeile 692Zeile 698
		}
}
else

		}
}
else

	{
$can_access_moderationqueue = false;
}

	{
$can_access_moderationqueue = false;
}


if($can_access_moderationqueue || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagereportedcontent'] == 1))
{


if($can_access_moderationqueue || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagereportedcontent'] == 1))
{

Zeile 708Zeile 714
			if($mybb->usergroup['cancp'] || $mybb->usergroup['issupermod'])
{
$unread = (int)$reported['unread'];

			if($mybb->usergroup['cancp'] || $mybb->usergroup['issupermod'])
{
$unread = (int)$reported['unread'];

			}

			}

			else
{
$unread = 0;

			else
{
$unread = 0;

Zeile 720Zeile 726
					{
++$unread;
}

					{
++$unread;
}

				}
}

				}
}


if($unread > 0)
{
if($unread == 1)
{
$lang->unread_reports = $lang->unread_report;


if($unread > 0)
{
if($unread == 1)
{
$lang->unread_reports = $lang->unread_report;

				}

				}

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

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

				



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

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

			}
}

			}
}

	}
}


	}
}


// Get awaiting moderation queue stats
if($can_access_moderationqueue || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagemodqueue'] == 1))




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

{
$unapproved_posts = $unapproved_threads = 0;
$query = $db->simple_select("posts", "replyto", "visible = 0");

Zeile 751Zeile 760
			$unapproved_threads++;
} else {
$unapproved_posts++;

			$unapproved_threads++;
} else {
$unapproved_posts++;

		}

		}

	}

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

	}

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

Zeile 778Zeile 787
}

if(!empty($moderation_queue))

}

if(!empty($moderation_queue))

{

{

	$moderation_queue_last = array_pop($moderation_queue);
if(empty($moderation_queue))
{
$moderation_queue = $moderation_queue_last;

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

	else
{
$moderation_queue = implode($lang->comma, $moderation_queue).' '.$lang->and.' '.$moderation_queue_last;

Zeile 804Zeile 813
$bannedwarning = '';
if($mybb->usergroup['isbannedgroup'] == 1)
{

$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
if(!empty($mybb->user['banned']))




	{

	{

		// Format their ban lift date and reason appropriately
$banlift = $lang->banned_lifted_never;
$reason = htmlspecialchars_uni($ban['reason']);

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

		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


	{

	{

		$reason = $lang->unknown;






		$banlift = $lang->unknown;
}

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

	}

	}


if(empty($banlift))

	else


	{

	{

		$banlift = $lang->unknown;

		$reason = $lang->unknown;

	}

// Display a nice warning to the user

	}

// Display a nice warning to the user

Zeile 881Zeile 890
}

$remote_avatar_notice = '';

}

$remote_avatar_notice = '';

if(($mybb->user['avatartype'] === 'remote' || $mybb->user['avatartype'] === 'gravatar') && !$mybb->settings['allowremoteavatars'])

if(isset($mybb->user['avatartype']) && ($mybb->user['avatartype'] === 'remote' || $mybb->user['avatartype'] === 'gravatar') && !$mybb->settings['allowremoteavatars'])

{
eval('$remote_avatar_notice = "'.$templates->get('global_remote_avatar_notice').'";');
}


{
eval('$remote_avatar_notice = "'.$templates->get('global_remote_avatar_notice').'";');
}


 
$awaitingusers = '';

if($mybb->settings['awactialert'] == 1 && $mybb->usergroup['cancp'] == 1)
{
$awaitingusers = $cache->read('awaitingactivation');

if($mybb->settings['awactialert'] == 1 && $mybb->usergroup['cancp'] == 1)
{
$awaitingusers = $cache->read('awaitingactivation');

Zeile 941Zeile 951
$jsTemplates = array();
foreach (array('modal', 'modal_button') as $template) {
eval('$jsTemplates["'.$template.'"] = "'.$templates->get($template, 1, 0).'";');

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

	$jsTemplates[$template] = str_replace("\n", "\\\n", addslashes($jsTemplates[$template]));

	$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 1006Zeile 1016

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

	$theme_options = build_theme_select("theme", $mybb->user['style'], 0, '', false, true);










	if(isset($mybb->user['style']))
{
$selected = $mybb->user['style'];
}
else
{
$selected = -1;
}

$theme_options = build_theme_select("theme", $selected, 0, '', false, true);


if(!empty($theme_options))
{


if(!empty($theme_options))
{

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


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


	if($referrer['uid'])

	if(!empty($referrer) && $referrer['uid'])

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

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

Zeile 1207Zeile 1226
// If they are, redirect them to change it
if($mybb->user['uid'] && is_banned_email($mybb->user['email']) && $mybb->settings['emailkeep'] != 1)
{

// If they are, redirect them to change it
if($mybb->user['uid'] && is_banned_email($mybb->user['email']) && $mybb->settings['emailkeep'] != 1)
{

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




	if(
!(THIS_SCRIPT == 'usercp.php' && in_array($mybb->get_input('action'), array('email', 'do_email'))) &&
!(THIS_SCRIPT == 'member.php' && $mybb->get_input('action') == 'activate')
)

	{
redirect('usercp.php?action=email');
}

	{
redirect('usercp.php?action=email');
}

Zeile 1218Zeile 1240
}

// work out which items the user has collapsed

}

// work out which items the user has collapsed

$colcookie = '';


$collapse = $collapsed = $collapsedimg = $collapsedthead = array();


if(!empty($mybb->cookies['collapsed']))

if(!empty($mybb->cookies['collapsed']))

{

{

	$colcookie = $mybb->cookies['collapsed'];

	$colcookie = $mybb->cookies['collapsed'];

}

$collapse = $collapsed = $collapsedimg = array();

 




if($colcookie)
{

 
	// Preserve and don't unset $collapse, will be needed globally throughout many pages
$collapse = explode("|", $colcookie);
foreach($collapse as $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";
$collapsed[$co] = "display: show;";
$collapsed[$ex] = "display: none;";

		$collapsed[$val."_e"] = "display: none;";




		$collapsedimg[$val] = "_collapsed";
$collapsedthead[$val] = " thead_collapsed";
}

		$collapsedimg[$val] = "_collapsed";
$collapsedthead[$val] = " thead_collapsed";
}