Ejemplo n.º 1
0
        smn_session_register('SESSION_USER_AGENT');
    }
    if ($SESSION_USER_AGENT != $http_user_agent) {
        smn_session_destroy();
        smn_redirect(smn_href_link(FILENAME_LOGIN));
    }
}
// verify the IP address if the feature is enabled
if (SESSION_CHECK_IP_ADDRESS == 'True') {
    $ip_address = smn_get_ip_address();
    if (!smn_session_is_registered('SESSION_IP_ADDRESS')) {
        $SESSION_IP_ADDRESS = $ip_address;
        smn_session_register('SESSION_IP_ADDRESS');
    }
    if ($SESSION_IP_ADDRESS != $ip_address) {
        smn_session_destroy();
        smn_redirect(smn_href_link(FILENAME_LOGIN));
    }
}
// create the shopping cart & fix the cart if necesary
if (smn_session_is_registered('cart') && is_object($cart)) {
} else {
    smn_session_register('cart');
    $cart = new shoppingCart();
}
// include currencies class and create an instance
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
// set the language
define('PROJECT_VERSION', 'oscMall ver 4.1');
define('TITLE', MALL_NAME . ' : ' . $store_name);
Ejemplo n.º 2
0
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);
    }
}