| 1 | <?php
|
|---|
| 2 | /* -----------------------------------------------------------------------------------------
|
|---|
| 3 | $Id: logoff.php 3072 2012-06-18 15:01:13Z hhacker $
|
|---|
| 4 |
|
|---|
| 5 | modified eCommerce Shopsoftware
|
|---|
| 6 | http://www.modified-shop.org
|
|---|
| 7 |
|
|---|
| 8 | Copyright (c) 2009 - 2013 [www.modified-shop.org]
|
|---|
| 9 | -----------------------------------------------------------------------------------------
|
|---|
| 10 | based on:
|
|---|
| 11 | (c) 2000-2001 The Exchange Project (earlier name of osCommerce)
|
|---|
| 12 | (c) 2002-2003 osCommerce(logoff.php,v 1.12 2003/02/13); www.oscommerce.com
|
|---|
| 13 | (c) 2003 nextcommerce (logoff.php,v 1.16 2003/08/17); www.nextcommerce.org
|
|---|
| 14 | (c) 2006 XT-Commerce (logoff.php 1071 2005-07-22)
|
|---|
| 15 |
|
|---|
| 16 | Released under the GNU General Public License
|
|---|
| 17 | -----------------------------------------------------------------------------------------
|
|---|
| 18 | Third Party contribution:
|
|---|
| 19 |
|
|---|
| 20 | Credit Class/Gift Vouchers/Discount Coupons (Version 5.10)
|
|---|
| 21 | http://www.oscommerce.com/community/contributions,282
|
|---|
| 22 | Copyright (c) Strider | Strider@oscworks.com
|
|---|
| 23 | Copyright (c Nick Stanko of UkiDev.com, nick@ukidev.com
|
|---|
| 24 | Copyright (c) Andre ambidex@gmx.net
|
|---|
| 25 | Copyright (c) 2001,2002 Ian C Wilson http://www.phesis.org
|
|---|
| 26 |
|
|---|
| 27 | Released under the GNU General Public License
|
|---|
| 28 | ---------------------------------------------------------------------------------------*/
|
|---|
| 29 |
|
|---|
| 30 | include ('includes/application_top.php');
|
|---|
| 31 |
|
|---|
| 32 | // create smarty elements
|
|---|
| 33 | $smarty = new Smarty;
|
|---|
| 34 |
|
|---|
| 35 | if ($messageStack->size('logoff') > 0) {
|
|---|
| 36 | $smarty->assign('info_message', $messageStack->output('logoff'));
|
|---|
| 37 | }
|
|---|
| 38 |
|
|---|
| 39 | if ($_SESSION['account_type'] == '1' && DELETE_GUEST_ACCOUNT == 'true') {
|
|---|
| 40 | xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS." WHERE customers_id = '".(int)$_SESSION['customer_id']."'");
|
|---|
| 41 | xtc_db_query("DELETE FROM ".TABLE_ADDRESS_BOOK." WHERE customers_id = '".(int)$_SESSION['customer_id']."'");
|
|---|
| 42 | xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS_INFO." WHERE customers_info_id = '".(int)$_SESSION['customer_id']."'");
|
|---|
| 43 | xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS_IP." WHERE customers_id = '".(int)$_SESSION['customer_id']."'");
|
|---|
| 44 | }
|
|---|
| 45 |
|
|---|
| 46 | xtc_session_destroy();
|
|---|
| 47 |
|
|---|
| 48 | unset ($_SESSION['customer_id']);
|
|---|
| 49 | unset ($_SESSION['customer_default_address_id']);
|
|---|
| 50 | unset ($_SESSION['customer_first_name']);
|
|---|
| 51 | unset ($_SESSION['customer_country_id']);
|
|---|
| 52 | unset ($_SESSION['customer_zone_id']);
|
|---|
| 53 | unset ($_SESSION['comments']);
|
|---|
| 54 | unset ($_SESSION['user_info']);
|
|---|
| 55 | unset ($_SESSION['customers_status']);
|
|---|
| 56 | unset ($_SESSION['selected_box']);
|
|---|
| 57 | unset ($_SESSION['navigation']);
|
|---|
| 58 | unset ($_SESSION['shipping']);
|
|---|
| 59 | unset ($_SESSION['payment']);
|
|---|
| 60 | unset ($_SESSION['ccard']);
|
|---|
| 61 | unset ($_SESSION['gv_id']);
|
|---|
| 62 | unset ($_SESSION['cc_id']);
|
|---|
| 63 |
|
|---|
| 64 | $_SESSION['cart']->reset();
|
|---|
| 65 |
|
|---|
| 66 | // write customers status guest in session again
|
|---|
| 67 | //require (DIR_WS_INCLUDES.'write_customers_status.php'); // webald - included already in application_top.php
|
|---|
| 68 | write_customers_status_in_session(); // webald
|
|---|
| 69 |
|
|---|
| 70 | // include boxes
|
|---|
| 71 | require (DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/source/boxes.php');
|
|---|
| 72 |
|
|---|
| 73 | $breadcrumb->add(NAVBAR_TITLE_LOGOFF);
|
|---|
| 74 |
|
|---|
| 75 | require (DIR_WS_INCLUDES.'header.php');
|
|---|
| 76 |
|
|---|
| 77 | $smarty->assign('BUTTON_CONTINUE', '<a href="'.xtc_href_link(FILENAME_DEFAULT).'">'.xtc_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE).'</a>');
|
|---|
| 78 | $smarty->assign('language', $_SESSION['language']);
|
|---|
| 79 | $main_content = $smarty->fetch(CURRENT_TEMPLATE.'/module/logoff.html');
|
|---|
| 80 | $smarty->assign('main_content', $main_content);
|
|---|
| 81 | $smarty->caching = 0;
|
|---|
| 82 | if (!defined('RM'))
|
|---|
| 83 | $smarty->load_filter('output', 'note');
|
|---|
| 84 | $smarty->display(CURRENT_TEMPLATE.'/index.html');
|
|---|
| 85 | include ('includes/application_bottom.php');
|
|---|
| 86 | ?>
|
|---|