rewrote php session variables

This commit is contained in:
SJ
2013-11-18 19:24:33 +01:00
parent 0809b5a514
commit 881a2380e0
39 changed files with 302 additions and 609 deletions

View File

@ -26,7 +26,7 @@
<body id="loginpage">
<?php if(!isset($_SESSION['username'])){ ?>
<?php if(!Registry::get('username')) { ?>
<div id="logincontainer" class="container">
<div id="logo-lg"><img src="<?php print SITE_URL; ?><?php print SITE_LOGO_LG; ?>" alt="Archive Logo Image" title="Login" /></div>

View File

@ -42,7 +42,7 @@
<div class="controls">
<select name="domain" id="domain">
<?php asort($domains); foreach ($domains as $domain) { ?>
<option value="<?php if(is_array($domain)){ print $domain['mapped']; } else { print $domain; } ?>"<?php if( (isset($post) && $domain == $post['domain']) || (!isset($post) && isset($_SESSION['last_domain']) && $domain == $_SESSION['last_domain']) ){ ?> selected="selected"<?php } ?>><?php if(is_array($domain)){ print $domain['mapped']; } else { print $domain; } ?></option>
<option value="<?php if(is_array($domain)){ print $domain['mapped']; } else { print $domain; } ?>"<?php if( (isset($post) && $domain == $post['domain']) || (!isset($post) && $domain == $last_domain) ){ ?> selected="selected"<?php } ?>><?php if(is_array($domain)){ print $domain['mapped']; } else { print $domain; } ?></option>
<?php } ?>
</select>
<?php if ( isset($errors['domain']) ) { ?><span class="help-inline"><?php print $errors['domain']; ?></span><?php } ?>

View File

@ -66,7 +66,7 @@
<div class="controls">
<select name="theme">
<?php foreach(Registry::get('themes') as $t) { ?>
<option value="<?php print $t; ?>"<?php if(isset($_SESSION['theme']) && $_SESSION['theme'] == $t) { ?> selected="selected"<?php } ?>><?php print $t; ?></option>
<option value="<?php print $t; ?>"<?php if($theme == $t) { ?> selected="selected"<?php } ?>><?php print $t; ?></option>
<?php } ?>
</select>
</div>
@ -77,7 +77,7 @@
<select name="lang">
<option value=""><?php print $text_use_browser_settings; ?></option>
<?php foreach(Registry::get('langs') as $t) { ?>
<option value="<?php print $t; ?>"<?php if(isset($_SESSION['lang']) && $_SESSION['lang'] == $t) { ?> selected="selected"<?php } ?>><?php print $t; ?></option>
<option value="<?php print $t; ?>"<?php if($lang == $t) { ?> selected="selected"<?php } ?>><?php print $t; ?></option>
<?php } ?>
</select>
</div>

View File

@ -30,7 +30,7 @@
<body class="loginpage">
<?php if(!isset($_SESSION['username'])){ ?>
<?php if(!Registry::get('username')) { ?>
<div id="logincontainer" class="container">
<div id="logo-lg"><img src="<?php print SITE_URL; ?><?php print SITE_LOGO_LG; ?>" alt="Archive Logo Image" title="<?php print $text_login; ?>" /></div>

View File

@ -26,7 +26,7 @@
<div class="domaincell">
<select name="domain" class="span5">
<?php asort($domains); foreach ($domains as $domain) { ?>
<option value="<?php if(is_array($domain)){ print $domain['mapped']; } else { print $domain; } ?>"<?php if( (isset($post) && $domain == $post['domain']) || (!isset($post) && isset($_SESSION['last_domain']) && $domain == $_SESSION['last_domain']) ){ ?> selected="selected"<?php } ?>><?php if(is_array($domain)){ print $domain['mapped']; } else { print $domain; } ?></option>
<option value="<?php if(is_array($domain)){ print $domain['mapped']; } else { print $domain; } ?>"<?php if( (isset($post) && $domain == $post['domain']) || (!isset($post) && $domain == $last_domain) ){ ?> selected="selected"<?php } ?>><?php if(is_array($domain)){ print $domain['mapped']; } else { print $domain; } ?></option>
<?php } ?>
</select>
</div>

View File

@ -73,7 +73,7 @@
<div class="tcell">
<select name="theme">
<?php foreach(Registry::get('themes') as $t) { ?>
<option value="<?php print $t; ?>"<?php if(isset($_SESSION['theme']) && $_SESSION['theme'] == $t) { ?> selected="selected"<?php } ?>><?php print $t; ?></option>
<option value="<?php print $t; ?>"<?php if($theme == $t) { ?> selected="selected"<?php } ?>><?php print $t; ?></option>
<?php } ?>
</select>
</div>
@ -85,7 +85,7 @@
<select name="lang">
<option value=""><?php print $text_use_browser_settings; ?></option>
<?php foreach(Registry::get('langs') as $t) { ?>
<option value="<?php print $t; ?>"<?php if(isset($_SESSION['lang']) && $_SESSION['lang'] == $t) { ?> selected="selected"<?php } ?>><?php print $t; ?></option>
<option value="<?php print $t; ?>"<?php if($lang == $t) { ?> selected="selected"<?php } ?>><?php print $t; ?></option>
<?php } ?>
</select>
</div>