haraldpdl / oscommerce forked from osCommerce/oscommerce

osCommerce Online Merchant v3.x

This URL has Read+Write access

commit  57308c5e88eae1e278cdef471397e20129e5ae66
tree    65f58710726c222ae3657ddf18257fb4bfd0afe3
parent  7c37dfd984dead1abc9b0673341ce7fe5ea4b7b6
oscommerce / account.php
100644 43 lines (29 sloc) 1.174 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/*
$Id$
 
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
 
Copyright (c) 2006 osCommerce
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License v2 (1991)
as published by the Free Software Foundation.
*/
 
  $_SERVER['SCRIPT_FILENAME'] = __FILE__;
 
  require('includes/application_top.php');
 
  if ($osC_Customer->isLoggedOn() === false) {
    if (!empty($_GET)) {
      $first_array = array_slice($_GET, 0, 1);
    }
 
    if (empty($_GET) || (!empty($_GET) && !in_array(osc_sanitize_string(basename(key($first_array))), array('login', 'create', 'password_forgotten')))) {
      $osC_NavigationHistory->setSnapshot();
 
      osc_redirect(osc_href_link(FILENAME_ACCOUNT, 'login', 'SSL'));
    }
  }
 
  $osC_Language->load('account');
 
  if ($osC_Services->isStarted('breadcrumb')) {
    $osC_Breadcrumb->add($osC_Language->get('breadcrumb_my_account'), osc_href_link(FILENAME_ACCOUNT, null, 'SSL'));
  }
 
  $osC_Template = osC_Template::setup('account');
 
  require('templates/' . $osC_Template->getCode() . '.php');
 
  require('includes/application_bottom.php');
?>