include DIR_WS_CLASSES . 'sessions.php'; } // define how the session functions will be used require DIR_WS_FUNCTIONS . 'sessions.php'; // set the session name and save path smn_session_name('osCMallAdmin'); smn_session_save_path(SESSION_WRITE_DIRECTORY); // set the session cookie parameters if (function_exists('session_set_cookie_params')) { session_set_cookie_params(0, DIR_WS_ADMIN); } elseif (function_exists('ini_set')) { ini_set('session.cookie_lifetime', '0'); ini_set('session.cookie_path', DIR_WS_ADMIN); } // lets start our session smn_session_start(); if (PHP_VERSION >= 4.3 && function_exists('ini_get') && ini_get('register_globals') == false) { extract($_SESSION, EXTR_OVERWRITE + EXTR_REFS); } if ($_GET['ID'] && !$store_id) { if (!smn_session_is_registered('store_id')) { smn_session_register('store_id'); } $store_id = intval($_GET['ID']); } if (!smn_session_is_registered('store_name')) { smn_session_register('store_name'); } $store_name = $store->get_store_name(); if (!smn_session_is_registered('store_group_type')) { smn_session_register('store_group_type');
function smn_session_recreate() { if (PHP_VERSION >= 4.1) { $session_backup = $_SESSION; unset($_COOKIE[smn_session_name()]); smn_session_destroy(); if (STORE_SESSIONS == 'mysql') { session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc'); } smn_session_start(); $_SESSION = $session_backup; unset($session_backup); } }