cleaned up tabbing and sessions in index

This commit is contained in:
xisi 2014-01-24 15:07:00 -05:00
parent c192cbb0bd
commit 4e18ff318b

View File

@ -36,15 +36,14 @@ $master_template = 'master.tpl';
// Start a session // Start a session
session_set_cookie_params(time()+$config['cookie']['duration'], $config['cookie']['path'], $config['cookie']['domain'], $config['cookie']['secure'], $config['cookie']['httponly']); session_set_cookie_params(time()+$config['cookie']['duration'], $config['cookie']['path'], $config['cookie']['domain'], $config['cookie']['secure'], $config['cookie']['httponly']);
if (!@session_start()) { $session_start = @session_start();
$user->logoutUser(); if (!$session_start) {
if (!@session_regenerate_id(true)) { session_destroy();
$user->logoutUser(); session_regenerate_id(true);
} session_start();
if(!@setcookie(session_name(), session_id(), time()+$config['cookie']['duration'], $config['cookie']['path'], $config['cookie']['domain'], $config['cookie']['secure'], $config['cookie']['httponly'])) {
@setcookie(session_name(),session_id(), time()-$config['cookie']['duration'], $config['cookie']['path'], $config['cookie']['domain'], $config['cookie']['secure'], $config['cookie']['httponly']);
}
} }
@setcookie(session_name(), session_id(), time()+$config['cookie']['duration'], $config['cookie']['path'], $config['cookie']['domain'], $config['cookie']['secure'], $config['cookie']['httponly']);
// Load Classes, they name defines the $ variable used // Load Classes, they name defines the $ variable used
// We include all needed files here, even though our templates could load them themself // We include all needed files here, even though our templates could load them themself
require_once(INCLUDE_DIR . '/autoloader.inc.php'); require_once(INCLUDE_DIR . '/autoloader.inc.php');
@ -118,4 +117,5 @@ if (!@$supress_master) $smarty->display($master_template, $smarty_cache_key);
// Unset any temporary values here // Unset any temporary values here
unset($_SESSION['POPUP']); unset($_SESSION['POPUP']);
?> ?>