当前位置: 首页>>代码示例>>PHP>>正文


PHP currencies::is_set方法代码示例

本文整理汇总了PHP中currencies::is_set方法的典型用法代码示例。如果您正苦于以下问题:PHP currencies::is_set方法的具体用法?PHP currencies::is_set怎么用?PHP currencies::is_set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在currencies的用法示例。


在下文中一共展示了currencies::is_set方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setlocale

    if (isset($_GET['language']) && !empty($_GET['language'])) {
        $lng->set_language($_GET['language']);
    } else {
        $lng->get_browser_language();
    }
    $_SESSION['language'] = $lng->language['directory'];
    $_SESSION['languages_id'] = $lng->language['id'];
}
// include the language translations
$_system_locale_numeric = setlocale(LC_NUMERIC, 0);
require 'includes/languages/' . basename($_SESSION['language']) . '.php';
setlocale(LC_NUMERIC, $_system_locale_numeric);
// Prevent LC_ALL from setting LC_NUMERIC to a locale with 1,0 float/decimal values instead of 1.0 (see bug #634)
// currency
if (!isset($_SESSION['currency']) || isset($_GET['currency']) || USE_DEFAULT_LANGUAGE_CURRENCY == 'true' && LANGUAGE_CURRENCY != $_SESSION['currency']) {
    if (isset($_GET['currency']) && $currencies->is_set($_GET['currency'])) {
        $_SESSION['currency'] = $_GET['currency'];
    } else {
        $_SESSION['currency'] = USE_DEFAULT_LANGUAGE_CURRENCY == 'true' && $currencies->is_set(LANGUAGE_CURRENCY) ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
    }
}
// navigation history
if (!isset($_SESSION['navigation']) || !is_object($_SESSION['navigation']) || get_class($_SESSION['navigation']) != 'navigationHistory') {
    $_SESSION['navigation'] = new navigationHistory();
}
$_SESSION['navigation']->add_current_page();
// action recorder
require 'includes/classes/action_recorder.php';
// initialize the message stack for output messages
require 'includes/classes/alertbox.php';
require 'includes/classes/message_stack.php';
开发者ID:Akofelaz,项目名称:oscommerce2,代码行数:31,代码来源:application_top.php

示例2: navigationHistory

    if (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) {
        $lng->set_language($HTTP_GET_VARS['language']);
    } else {
        $lng->get_browser_language();
    }
    $language = $lng->language['directory'];
    $languages_id = $lng->language['id'];
}
// include the language translations
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'])) {
开发者ID:grum1965,项目名称:Plaster-Ceiling-Roses,代码行数:31,代码来源:application_top.php

示例3: navigationHistory

    if (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) {
        $lng->set_language($HTTP_GET_VARS['language']);
    } else {
        $lng->get_browser_language();
    }
    $language = $lng->language['directory'];
    $languages_id = $lng->language['id'];
}
// include the language translations
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' ? LANGUAGE_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();
开发者ID:validoc,项目名称:Pikmas,代码行数:31,代码来源:application_top.php

示例4: init


//.........这里部分代码省略.........
         $spider_flag = false;
         if (!empty($user_agent)) {
             foreach (file(OSCOM::BASE_DIR . 'spiders.txt') as $spider) {
                 if (!empty($spider)) {
                     if (strpos($user_agent, $spider) !== false) {
                         $spider_flag = true;
                         break;
                     }
                 }
             }
         }
         if ($spider_flag === false) {
             tep_session_start();
         }
     } else {
         tep_session_start();
     }
     $this->ignored_actions[] = session_name();
     // initialize a session token
     if (!isset($_SESSION['sessiontoken'])) {
         $_SESSION['sessiontoken'] = md5(tep_rand() . tep_rand() . tep_rand() . tep_rand());
     }
     // set SID once, even if empty
     $SID = defined('SID') ? SID : '';
     // verify the ssl_session_id if the feature is enabled
     if ($request_type == 'SSL' && SESSION_CHECK_SSL_SESSION_ID == 'True' && ENABLE_SSL == true && session_status() === PHP_SESSION_ACTIVE) {
         if (!isset($_SESSION['SSL_SESSION_ID'])) {
             $_SESSION['SESSION_SSL_ID'] = $_SERVER['SSL_SESSION_ID'];
         }
         if ($_SESSION['SESSION_SSL_ID'] != $_SERVER['SSL_SESSION_ID']) {
             tep_session_destroy();
             OSCOM::redirect('ssl_check.php');
         }
     }
     // verify the browser user agent if the feature is enabled
     if (SESSION_CHECK_USER_AGENT == 'True') {
         if (!isset($_SESSION['SESSION_USER_AGENT'])) {
             $_SESSION['SESSION_USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];
         }
         if ($_SESSION['SESSION_USER_AGENT'] != $_SERVER['HTTP_USER_AGENT']) {
             tep_session_destroy();
             OSCOM::redirect('index.php', 'Account&LogIn');
         }
     }
     // verify the IP address if the feature is enabled
     if (SESSION_CHECK_IP_ADDRESS == 'True') {
         if (!isset($_SESSION['SESSION_IP_ADDRESS'])) {
             $_SESSION['SESSION_IP_ADDRESS'] = tep_get_ip_address();
         }
         if ($_SESSION['SESSION_IP_ADDRESS'] != tep_get_ip_address()) {
             tep_session_destroy();
             OSCOM::redirect('index.php', 'Account&LogIn');
         }
     }
     // create the shopping cart
     if (!isset($_SESSION['cart']) || !is_object($_SESSION['cart']) || get_class($_SESSION['cart']) != 'shoppingCart') {
         $_SESSION['cart'] = new \shoppingCart();
     }
     // include currencies class and create an instance
     $currencies = new \currencies();
     // set the language
     if (!isset($_SESSION['language']) || isset($_GET['language'])) {
         $lng = new \language();
         if (isset($_GET['language']) && !empty($_GET['language'])) {
             $lng->set_language($_GET['language']);
         } else {
             $lng->get_browser_language();
         }
         $_SESSION['language'] = $lng->language['directory'];
         $_SESSION['languages_id'] = $lng->language['id'];
     }
     // include the language translations
     $system_locale_numeric = setlocale(LC_NUMERIC, 0);
     include OSCOM::BASE_DIR . 'languages/' . $_SESSION['language'] . '.php';
     setlocale(LC_NUMERIC, $system_locale_numeric);
     // Prevent LC_ALL from setting LC_NUMERIC to a locale with 1,0 float/decimal values instead of 1.0 (see bug #634)
     // currency
     if (!isset($_SESSION['currency']) || isset($_GET['currency']) || USE_DEFAULT_LANGUAGE_CURRENCY == 'true' && LANGUAGE_CURRENCY != $_SESSION['currency']) {
         if (isset($_GET['currency']) && $currencies->is_set($_GET['currency'])) {
             $_SESSION['currency'] = $_GET['currency'];
         } else {
             $_SESSION['currency'] = USE_DEFAULT_LANGUAGE_CURRENCY == 'true' && $currencies->is_set(LANGUAGE_CURRENCY) ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
         }
     }
     // navigation history
     if (!isset($_SESSION['navigation']) || !is_object($_SESSION['navigation']) || get_class($_SESSION['navigation']) != 'navigationHistory') {
         $_SESSION['navigation'] = new \navigationHistory();
     }
     $_SESSION['navigation']->add_current_page();
     $messageStack = new \messageStack();
     tep_update_whos_online();
     tep_activate_banners();
     tep_expire_banners();
     tep_expire_specials();
     $oscTemplate = new \oscTemplate();
     $breadcrumb = new \breadcrumb();
     $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);
     $breadcrumb->add(HEADER_TITLE_CATALOG, OSCOM::link('index.php'));
     Registry::set('Hooks', new Hooks());
 }
开发者ID:tiansiyuan,项目名称:oscommerce2,代码行数:101,代码来源:Shop.php

示例5: navigationHistory

    if (isset($_GET['language']) && smn_not_null($_GET['language'])) {
        $lng->set_language($_GET['language']);
    } else {
        $lng->get_browser_language();
    }
    $language = $lng->language['directory'];
    $languages_id = $lng->language['id'];
}
// include the language translations
require DIR_WS_LANGUAGES . $language . '.php';
// currency
if (!smn_session_is_registered('currency') || isset($_GET['currency']) || USE_DEFAULT_LANGUAGE_CURRENCY == 'true' && LANGUAGE_CURRENCY != $currency) {
    if (!smn_session_is_registered('currency')) {
        smn_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 (!smn_session_is_registered('navigation')) {
    smn_session_register('navigation');
    $navigation = new navigationHistory();
}
$navigation->add_current_page();
// 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) {
开发者ID:stanislauslive,项目名称:StanMarket,代码行数:31,代码来源:application_top.php

示例6: init

 protected function init()
 {
     global $PHP_SELF, $currencies, $messageStack, $oscTemplate, $breadcrumb;
     $OSCOM_Cookies = new Cookies();
     Registry::set('Cookies', $OSCOM_Cookies);
     try {
         $OSCOM_Db = Db::initialize();
         Registry::set('Db', $OSCOM_Db);
     } catch (\Exception $e) {
         include OSCOM::getConfig('dir_root') . 'includes/error_documents/maintenance.php';
         exit;
     }
     Registry::set('Hooks', new Hooks());
     // set the application parameters
     $Qcfg = $OSCOM_Db->get('configuration', ['configuration_key as k', 'configuration_value as v']);
     //, null, null, null, 'configuration'); // TODO add cache when supported by admin
     while ($Qcfg->fetch()) {
         define($Qcfg->value('k'), $Qcfg->value('v'));
     }
     // set php_self in the global scope
     $req = parse_url($_SERVER['SCRIPT_NAME']);
     $PHP_SELF = substr($req['path'], strlen(OSCOM::getConfig('http_path', 'Shop')));
     $OSCOM_Session = Session::load();
     Registry::set('Session', $OSCOM_Session);
     // start the session
     $OSCOM_Session->start();
     $this->ignored_actions[] = session_name();
     $OSCOM_Language = new Language();
     //        $OSCOM_Language->setUseCache(true);
     Registry::set('Language', $OSCOM_Language);
     // create the shopping cart
     if (!isset($_SESSION['cart']) || !is_object($_SESSION['cart']) || get_class($_SESSION['cart']) != 'shoppingCart') {
         $_SESSION['cart'] = new \shoppingCart();
     }
     // include currencies class and create an instance
     $currencies = new \currencies();
     // set the language
     if (!isset($_SESSION['language']) || isset($_GET['language'])) {
         if (isset($_GET['language']) && !empty($_GET['language']) && $OSCOM_Language->exists($_GET['language'])) {
             $OSCOM_Language->set($_GET['language']);
         }
         $_SESSION['language'] = $OSCOM_Language->get('code');
     }
     // include the language translations
     $OSCOM_Language->loadDefinitions('main');
     // Prevent LC_ALL from setting LC_NUMERIC to a locale with 1,0 float/decimal values instead of 1.0 (see bug #634)
     $system_locale_numeric = setlocale(LC_NUMERIC, 0);
     setlocale(LC_ALL, explode(';', OSCOM::getDef('system_locale')));
     setlocale(LC_NUMERIC, $system_locale_numeric);
     // currency
     if (!isset($_SESSION['currency']) || isset($_GET['currency']) || USE_DEFAULT_LANGUAGE_CURRENCY == 'true' && OSCOM::getDef('language_currency') != $_SESSION['currency']) {
         if (isset($_GET['currency']) && $currencies->is_set($_GET['currency'])) {
             $_SESSION['currency'] = $_GET['currency'];
         } else {
             $_SESSION['currency'] = USE_DEFAULT_LANGUAGE_CURRENCY == 'true' && $currencies->is_set(OSCOM::getDef('language_currency')) ? OSCOM::getDef('language_currency') : DEFAULT_CURRENCY;
         }
     }
     // navigation history
     if (!isset($_SESSION['navigation']) || !is_object($_SESSION['navigation']) || get_class($_SESSION['navigation']) != 'navigationHistory') {
         $_SESSION['navigation'] = new \navigationHistory();
     }
     $_SESSION['navigation']->add_current_page();
     $messageStack = new \messageStack();
     tep_update_whos_online();
     tep_activate_banners();
     tep_expire_banners();
     tep_expire_specials();
     $oscTemplate = new \oscTemplate();
     $breadcrumb = new \breadcrumb();
     $breadcrumb->add(OSCOM::getDef('header_title_top'), OSCOM::getConfig('http_server', 'Shop'));
     $breadcrumb->add(OSCOM::getDef('header_title_catalog'), OSCOM::link('index.php'));
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:72,代码来源:Shop.php


注:本文中的currencies::is_set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。