Released under the GNU General Public License ---------------------------------------------------------------------------------------*/ include 'includes/application_top.php'; // create template elements $vamTemplate = new vamTemplate(); // include boxes require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php'; $breadcrumb->add(NAVBAR_TITLE_LOGOFF); //delete Guests from Database if ($_SESSION['account_type'] == 1 && DELETE_GUEST_ACCOUNT == 'true') { vam_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . $_SESSION['customer_id'] . "'"); vam_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $_SESSION['customer_id'] . "'"); vam_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $_SESSION['customer_id'] . "'"); } vam_session_destroy(); unset($_SESSION['customer_id']); unset($_SESSION['customer_default_address_id']); unset($_SESSION['customer_first_name']); unset($_SESSION['customer_last_name']); unset($_SESSION['customer_email_address']); unset($_SESSION['customer_country_id']); unset($_SESSION['customer_zone_id']); unset($_SESSION['comments']); unset($_SESSION['user_info']); unset($_SESSION['customers_status']); unset($_SESSION['selected_box']); unset($_SESSION['navigation']); unset($_SESSION['shipping']); unset($_SESSION['payment']); unset($_SESSION['ccard']);
function vam_session_recreate() { if (PHP_VERSION >= 4.1) { $session_backup = $_SESSION; unset($_COOKIE[vam_session_name()]); vam_session_destroy(); if (STORE_SESSIONS == 'mysql') { session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc'); } vam_session_start(); $_SESSION = $session_backup; unset($session_backup); } }