require DIR_WS_LANGUAGES . $language . '.php';
// currency
if (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || USE_DEFAULT_LANGUAGE_CURRENCY == 'true' && LANGUAGE_CURRENCY != $currency) {
    if (!tep_session_is_registered('currency')) {
        tep_session_register('currency');
    }
    if (isset($HTTP_GET_VARS['currency']) && $currencies->is_set($HTTP_GET_VARS['currency'])) {
        $currency = $HTTP_GET_VARS['currency'];
    } else {
        $currency = USE_DEFAULT_LANGUAGE_CURRENCY == 'true' && $currencies->is_set(LANGUAGE_CURRENCY) ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
    }
}
// navigation history
if (!tep_session_is_registered('navigation') || !is_object($navigation)) {
    tep_session_register('navigation');
    $navigation = new navigationHistory();
}
$navigation->add_current_page();
// action recorder
include 'includes/classes/action_recorder.php';
// Shopping cart actions
if (isset($HTTP_GET_VARS['action'])) {
    // redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled
    if ($session_started == false) {
        tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
    }
    if (DISPLAY_CART == 'true') {
        $goto = FILENAME_SHOPPING_CART;
        $parameters = array('action', 'cPath', 'products_id', 'pid');
    } else {
        $goto = basename($PHP_SELF);
Пример #2
0
    if ($SESSION_IP_ADDRESS != $ip_address) {
        tep_session_destroy();
        tep_redirect(get_admin_link(PAGE_LOGIN));
    }
}
// END sesctions	----------------
// navigation history
if (tep_session_is_registered('navigation')) {
    if (PHP_VERSION < 4) {
        $broken_navigation = $navigation;
        $navigation = new navigationHistory();
        $navigation->unserialize($broken_navigation);
    }
} else {
    tep_session_register('navigation');
    $navigation = new navigationHistory();
}
$navigation->add_current_page();
// init Smarty Object
$smarty = new Smarty();
$smarty->assign('_CURRENT_ADMIN_PAGE_LINK', _CURRENT_ADMIN_PAGE_LINK);
$smarty->assign('_TEMPLATE_SOURCE_DIR', _ADMIN_ROOT . 'templates/');
// BOF Language setting -------------
// language changes checking
if (isset($_GET['lang'])) {
    $_SESSION['language_code'] = $_GET['lang'];
    $sql_lang = "SELECT language_id, language_code, language_directory FROM " . _TABLE_LANGUAGES . " WHERE language_code='" . $_SESSION['language_code'] . "' and lang_status='actived'";
    $lang_query = db_query($sql_lang);
    if (db_num_rows($lang_query) > 0) {
        // language avaible
        $lang_info = db_fetch_array($lang_query);
Пример #3
0
 /**
  * セッションIDがパラメータとしてわたってきていない場合は
  * セッション付きURLでリロード
  */
 function initSession()
 {
     global $session_started;
     if ($this->isMobile() && !isset($_POST[zen_session_name()]) && !isset($_GET[zen_session_name()])) {
         require_once DIR_WS_CLASSES . 'navigation_history.php';
         $navigation = new navigationHistory();
         $navigation->add_current_page();
         $navigation->set_snapshot();
         $snapshot_parameter_array = $navigation->snapshot['get'];
         $self_href = zen_href_link($navigation->snapshot['page'], zen_array_to_string($snapshot_parameter_array), $navigation->snapshot['mode']);
         //$self_href .= "&" . zen_session_name() . '=' . zen_session_id();
         zen_redirect($self_href);
     }
     return true;
 }
Пример #4
0
    if (isset($HTTP_GET_VARS['currency'])) {
        if (!($currency = tep_currency_exists($HTTP_GET_VARS['currency']))) {
            $currency = USE_DEFAULT_LANGUAGE_CURRENCY == 'true' ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
        }
    } else {
        $currency = USE_DEFAULT_LANGUAGE_CURRENCY == 'true' ? LANGUAGE_CURRENCY : $HTTP_GET_VARS['currency'];
    }
}
if (!in_array($currency, $available_currencies)) {
    $currency = DEFAULT_CURRENCY;
}
// navigation history
if (tep_session_is_registered('navigation')) {
    if (PHP_VERSION < 4) {
        $broken_navigation = $navigation;
        $navigation = new navigationHistory();
        $navigation->unserialize($broken_navigation);
    }
} else {
    tep_session_register('navigation');
    $navigation = new navigationHistory();
}
if (is_object($navigation)) {
    $navigation->add_current_page();
}
// include the who's online functions
//  require(DIR_WS_FUNCTIONS . 'whos_online.php');
//  tep_update_whos_online();
// include the password crypto functions
require DIR_WS_FUNCTIONS . 'password_funcs.php';
// include validation functions (right now only email address)
Пример #5
0
}
// currency
if (!tep_session_is_registered('currency') || isset($_GET['currency']) || USE_DEFAULT_LANGUAGE_CURRENCY == 'true' && LANGUAGE_CURRENCY != $currency) {
    if (!tep_session_is_registered('currency')) {
        tep_session_register('currency');
    }
    if (isset($_GET['currency']) && $currencies->is_set($_GET['currency'])) {
        $currency = $_GET['currency'];
    } else {
        $currency = USE_DEFAULT_LANGUAGE_CURRENCY == 'true' ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
    }
}
// navigation history
if (!tep_session_is_registered('navigation') || !is_object($navigation)) {
    tep_session_register('navigation');
    $navigation = new navigationHistory();
}
//eof navigation history
//Customer
if (isset($customer_id) && $customer_id > 0) {
    $Customer = new Customer((int) $customer_id);
} else {
    $Customer = new Customer(null);
}
// Shopping cart actions
if (isset($_GET['action'])) {
    // redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled
    if ($session_started == false) {
        tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
    }
    if (DISPLAY_CART == 'true') {