<?php
/*
	osCommerce, Open Source E-Commerce Solutions 
	http://www.oscommerce.com 
	
	Copyright (c) 2003 osCommerce 
	
	osCommRes, Services Oline 
	http://www.oscommres.com 
	Copyright (c) 2005 osCommRes 
	
	Freeway eCommerce 
	http://www.zac-ware.com/freeway 
	Copyright (c) 2007 ZacWare
	
	Released under the GNU General Public License
*/


// Set flag that this is a parent file
	define( '_FEXEC', 1 );
	

  require('includes/application_top.php');

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGOFF);

  $breadcrumb->add(NAVBAR_TITLE);

  tep_session_unregister('customer_id');
  tep_session_unregister('customer_default_address_id');
  tep_session_unregister('customer_first_name');
  tep_session_unregister('customer_country_id');
  tep_session_unregister('customer_zone_id');
  tep_session_unregister('comments');
	if (tep_session_is_registered("customer_auto_name"))
		tep_session_unregister('customer_auto_name');
//ICW - logout -> unregister GIFT VOUCHER sessions - Thanks Fredrik
  tep_session_unregister('gv_id');
  tep_session_unregister('cc_id');
//ICW - logout -> unregister GIFT VOUCHER sessions  - Thanks Fredrik
  $cart->reset();

  if (isset($HTTP_COOKIE_VARS["osCuser"])) setcookie ("osCuser", "", time() - 60*60*24*30,$cookie_path,$cookie_domain);
  if (isset($HTTP_COOKIE_VARS["osCpass"])) setcookie ("osCpass", "", time() - 60*60*24*30,$cookie_path,$cookie_domain);
  if (isset($HTTP_COOKIE_VARS["fe_typo_user"])) setcookie ("fe_typo_user", "", time() - 60*60*24*30,$cookie_path,$cookie_domain);
  if (isset($HTTP_COOKIE_VARS["be_typo_user"])) setcookie ("be_typo_user", "", time() - 60*60*24*30,$cookie_path,$cookie_domain);
  if (isset($HTTP_COOKIE_VARS["bbsessionhash"])) setcookie ("bbsessionhash", "", time() - 60*60*24*30,$cookie_path,$cookie_domain);
  if (isset($HTTP_COOKIE_VARS["PHPSESSID"])) setcookie ("PHPSESSID", "", time() - 60*60*24*30,$cookie_path,$cookie_domain);
  if (isset($HTTP_COOKIE_VARS["bbuserid"])) setcookie ("bbuserid", "", time() - 60*60*24*30,$cookie_path,$cookie_domain);
  if (isset($HTTP_COOKIE_VARS["bbpassword"])) setcookie ("bbpassword", "", time() - 60*60*24*30,$cookie_path,$cookie_domain);

  session_destroy();
  $content = CONTENT_LOGOFF;

  require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/' . TEMPLATENAME_MAIN_PAGE);

  require(DIR_WS_INCLUDES . 'application_bottom.php');
?>
