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


PHP OSCOM::getSiteApplication方法代码示例

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


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

示例1: execute

 public static function execute()
 {
     $OSCOM_Language = Registry::get('Language');
     $module_files = array();
     $DLapps = new DirectoryListing(OSCOM::BASE_DIRECTORY . 'Core/Site/' . OSCOM::getSite() . '/Application');
     $DLapps->setIncludeFiles(false);
     foreach ($DLapps->getFiles() as $file) {
         if (!in_array($file['name'], call_user_func(array('osCommerce\\OM\\Core\\Site\\' . OSCOM::getSite() . '\\Controller', 'getGuestApplications'))) && file_exists($DLapps->getDirectory() . '/' . $file['name'] . '/Controller.php')) {
             $module_files[] = $file['name'];
         }
     }
     $modules = array();
     foreach ($module_files as $module) {
         $application_class = 'osCommerce\\OM\\Core\\Site\\' . OSCOM::getSite() . '\\Application\\' . $module . '\\Controller';
         if (class_exists($application_class)) {
             if ($module == OSCOM::getSiteApplication()) {
                 $OSCOM_Application = Registry::get('Application');
             } else {
                 Registry::get('Language')->loadIniFile($module . '.php');
                 $OSCOM_Application = new $application_class(false);
             }
             $modules[Access::getGroupTitle($OSCOM_Application->getGroup())][] = array('id' => $module, 'text' => $OSCOM_Application->getTitle(), 'icon' => $OSCOM_Application->getIcon());
         }
     }
     ksort($modules);
     return $modules;
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:27,代码来源:getAccessModules.php

示例2: initialize

 public static function initialize()
 {
     Registry::set('MessageStack', new MessageStack());
     Registry::set('Cache', new Cache());
     Registry::set('PDO', PDO::initialize());
     foreach (OSCOM::callDB('Shop\\GetConfiguration', null, 'Site') as $param) {
         define($param['cfgKey'], $param['cfgValue']);
     }
     Registry::set('Session', Session::load('adminSid'));
     Registry::get('Session')->start();
     Registry::get('MessageStack')->loadFromSession();
     Registry::set('Language', new Language());
     if (!self::hasAccess(OSCOM::getSiteApplication())) {
         Registry::get('MessageStack')->add('header', 'No access.', 'error');
         OSCOM::redirect(OSCOM::getLink(null, OSCOM::getDefaultSiteApplication()));
     }
     $application = 'osCommerce\\OM\\Core\\Site\\Admin\\Application\\' . OSCOM::getSiteApplication() . '\\Controller';
     Registry::set('Application', new $application());
     Registry::set('Template', new Template());
     Registry::get('Template')->setApplication(Registry::get('Application'));
     // HPDL move following checks elsewhere
     // check if a default currency is set
     if (!defined('DEFAULT_CURRENCY')) {
         Registry::get('MessageStack')->add('header', OSCOM::getDef('ms_error_no_default_currency'), 'error');
     }
     // check if a default language is set
     if (!defined('DEFAULT_LANGUAGE')) {
         Registry::get('MessageStack')->add('header', ERROR_NO_DEFAULT_LANGUAGE_DEFINED, 'error');
     }
     if (function_exists('ini_get') && (bool) ini_get('file_uploads') == false) {
         Registry::get('MessageStack')->add('header', OSCOM::getDef('ms_warning_uploads_disabled'), 'warning');
     }
     // check if Work directories are writable
     $work_dirs = array();
     foreach (array('Cache', 'CoreUpdate', 'Database', 'Logs', 'Session', 'Temp') as $w) {
         if (!is_writable(OSCOM::BASE_DIRECTORY . 'Work/' . $w)) {
             $work_dirs[] = $w;
         }
     }
     if (!empty($work_dirs)) {
         Registry::get('MessageStack')->add('header', sprintf(OSCOM::getDef('ms_error_work_directories_not_writable'), OSCOM::BASE_DIRECTORY . 'Work/', implode(', ', $work_dirs)), 'error');
     }
     if (!OSCOM::configExists('time_zone', 'OSCOM')) {
         Registry::get('MessageStack')->add('header', OSCOM::getDef('ms_warning_time_zone_not_defined'), 'warning');
     }
     if (!OSCOM::configExists('dir_fs_public', 'OSCOM') || !file_exists(OSCOM::getConfig('dir_fs_public', 'OSCOM'))) {
         Registry::get('MessageStack')->add('header', OSCOM::getDef('ms_warning_dir_fs_public_not_defined'), 'warning');
     }
     // check if the upload directory exists
     if (is_dir(OSCOM::getConfig('dir_fs_public', 'OSCOM') . 'upload')) {
         if (!is_writeable(OSCOM::getConfig('dir_fs_public', 'OSCOM') . 'upload')) {
             Registry::get('MessageStack')->add('header', sprintf(OSCOM::getDef('ms_error_upload_directory_not_writable'), OSCOM::getConfig('dir_fs_public', 'OSCOM') . 'upload'), 'error');
         }
     } else {
         Registry::get('MessageStack')->add('header', sprintf(OSCOM::getDef('ms_error_upload_directory_non_existant'), OSCOM::getConfig('dir_fs_public', 'OSCOM') . 'upload'), 'error');
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:57,代码来源:Controller.php

示例3: __construct

 public function __construct()
 {
     $this->initialize();
     if (isset($_GET['action']) && !empty($_GET['action'])) {
         $action = HTML::sanitize(basename($_GET['action']));
         if (class_exists('osCommerce\\OM\\Core\\Site\\' . OSCOM::getSite() . '\\Application\\' . OSCOM::getSiteApplication() . '\\Action\\' . $action)) {
             call_user_func(array('osCommerce\\OM\\Core\\Site\\' . OSCOM::getSite() . '\\Application\\' . OSCOM::getSiteApplication() . '\\Action\\' . $action, 'execute'), $this);
         }
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:10,代码来源:ApplicationAbstract.php

示例4: array

 function __construct($group)
 {
     $OSCOM_Cache = Registry::get('Cache');
     $OSCOM_Template = Registry::get('Template');
     $OSCOM_PDO = Registry::get('PDO');
     $this->_group = $group;
     if ($OSCOM_Cache->read('templates_' . $this->_group . '_layout-' . $OSCOM_Template->getCode() . '-' . OSCOM::getSiteApplication() . '-' . $OSCOM_Template->getPageContentsFilename())) {
         $data = $OSCOM_Cache->getCache();
     } else {
         $data = array();
         $Qspecific = $OSCOM_PDO->prepare('select b2p.boxes_group, b.code from :table_templates_boxes_to_pages b2p, :table_templates_boxes b, :table_templates t where b2p.templates_id = :templates_id and b2p.page_specific = 1 and b2p.content_page in ("*", "' . OSCOM::getSiteApplication() . '/*", "' . OSCOM::getSiteApplication() . '/' . substr($OSCOM_Template->getPageContentsFilename(), 0, strrpos($OSCOM_Template->getPageContentsFilename(), '.')) . '") and b2p.templates_boxes_id = b.id and b.modules_group = :modules_group and b2p.templates_id = t.id order by b2p.boxes_group, b2p.sort_order');
         $Qspecific->bindInt(':templates_id', $OSCOM_Template->getID());
         $Qspecific->bindValue(':modules_group', $this->_group);
         $Qspecific->execute();
         $result = $Qspecific->fetchAll();
         if (count($result) > 0) {
             foreach ($result as $r) {
                 $data[$r['boxes_group']][] = $r['code'];
             }
         } else {
             $_data = array();
             $Qmodules = $OSCOM_PDO->prepare('select b2p.boxes_group, b2p.content_page, b.code from :table_templates_boxes_to_pages b2p, :table_templates_boxes b, :table_templates t where b2p.templates_id = :templates_id and b2p.content_page in ("*", "' . OSCOM::getSiteApplication() . '/*", "' . OSCOM::getSiteApplication() . '/' . substr($OSCOM_Template->getPageContentsFilename(), 0, strrpos($OSCOM_Template->getPageContentsFilename(), '.')) . '") and b2p.templates_boxes_id = b.id and b.modules_group = :modules_group and b2p.templates_id = t.id order by b2p.boxes_group, b2p.sort_order');
             $Qmodules->bindInt(':templates_id', $OSCOM_Template->getID());
             $Qmodules->bindValue(':modules_group', $this->_group);
             $Qmodules->execute();
             while ($Qmodules->fetch()) {
                 $_data[$Qmodules->value('boxes_group')][] = array('code' => $Qmodules->value('code'), 'page' => $Qmodules->value('content_page'));
             }
             foreach ($_data as $groups => $modules) {
                 $clean = array();
                 foreach ($modules as $module) {
                     if (isset($clean[$module['code']])) {
                         if (substr_count($module['page'], '/') > substr_count($clean[$module['code']]['page'], '/')) {
                             unset($clean[$module['code']]);
                         }
                     }
                     $clean[$module['code']] = $module;
                 }
                 $_data[$groups] = $clean;
             }
             foreach ($_data as $groups => $modules) {
                 foreach ($modules as $module) {
                     $data[$groups][] = $module['code'];
                 }
             }
         }
         $OSCOM_Cache->write($data);
     }
     $this->_modules = $data;
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:50,代码来源:Modules.php

示例5: loadIniFile

 public function loadIniFile($filename = null, $comment = '#', $language_code = null)
 {
     if (is_null($language_code)) {
         $language_code = $this->_code;
     }
     if ($this->_languages[$language_code]['parent_id'] > 0) {
         $this->loadIniFile($filename, $comment, $this->getCodeFromID($this->_languages[$language_code]['parent_id']));
     }
     if (is_null($filename)) {
         if (file_exists(OSCOM::BASE_DIRECTORY . 'Custom/Site/' . OSCOM::getSite() . '/languages/' . $language_code . '.php')) {
             $contents = file(OSCOM::BASE_DIRECTORY . 'Custom/Site/' . OSCOM::getSite() . '/languages/' . $language_code . '.php');
         } elseif (file_exists(OSCOM::BASE_DIRECTORY . 'Core/Site/' . OSCOM::getSite() . '/languages/' . $language_code . '.php')) {
             $contents = file(OSCOM::BASE_DIRECTORY . 'Core/Site/' . OSCOM::getSite() . '/languages/' . $language_code . '.php');
         } else {
             return array();
         }
     } else {
         if (substr(realpath(OSCOM::BASE_DIRECTORY . 'Custom/Site/' . OSCOM::getSite() . '/languages/' . $language_code . '/' . $filename), 0, strlen(realpath(OSCOM::BASE_DIRECTORY . 'Custom/Site/' . OSCOM::getSiteApplication() . '/languages/' . $language_code))) != realpath(OSCOM::BASE_DIRECTORY . 'Custom/Site/' . OSCOM::getSiteApplication() . '/languages/' . $language_code)) {
             return array();
         }
         if (substr(realpath(OSCOM::BASE_DIRECTORY . 'Core/Site/' . OSCOM::getSite() . '/languages/' . $language_code . '/' . $filename), 0, strlen(realpath(OSCOM::BASE_DIRECTORY . 'Core/Site/' . OSCOM::getSiteApplication() . '/languages/' . $language_code))) != realpath(OSCOM::BASE_DIRECTORY . 'Core/Site/' . OSCOM::getSiteApplication() . '/languages/' . $language_code)) {
             return array();
         }
         if (file_exists(OSCOM::BASE_DIRECTORY . 'Custom/Site/' . OSCOM::getSite() . '/languages/' . $language_code . '/' . $filename)) {
             $contents = file(OSCOM::BASE_DIRECTORY . 'Custom/Site/' . OSCOM::getSite() . '/languages/' . $language_code . '/' . $filename);
         } elseif (file_exists(OSCOM::BASE_DIRECTORY . 'Core/Site/' . OSCOM::getSite() . '/languages/' . $language_code . '/' . $filename)) {
             $contents = file(OSCOM::BASE_DIRECTORY . 'Core/Site/' . OSCOM::getSite() . '/languages/' . $language_code . '/' . $filename);
         } else {
             return array();
         }
     }
     $ini_array = array();
     foreach ($contents as $line) {
         $line = trim($line);
         $firstchar = substr($line, 0, 1);
         if (!empty($line) && $firstchar != $comment) {
             $delimiter = strpos($line, '=');
             if ($delimiter !== false && substr_count(substr($line, 0, $delimiter), ' ') == 1) {
                 $key = trim(substr($line, 0, $delimiter));
                 $value = trim(substr($line, $delimiter + 1));
                 $ini_array[$key] = $value;
             } elseif (isset($key)) {
                 $ini_array[$key] .= "\n" . trim($line);
             }
         }
     }
     unset($contents);
     $this->_definitions = array_merge($this->_definitions, $ini_array);
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:49,代码来源:Language.php

示例6: start

 public static function start()
 {
     Registry::set('Language', new LanguageClass());
     $OSCOM_Language = Registry::get('Language');
     if (isset($_GET['language']) && !empty($_GET['language'])) {
         $OSCOM_Language->set($_GET['language']);
     }
     $OSCOM_Language->load('general');
     $OSCOM_Language->load('modules-boxes');
     $OSCOM_Language->load('modules-content');
     $OSCOM_Language->load(OSCOM::getSiteApplication());
     header('Content-Type: text/html; charset=' . $OSCOM_Language->getCharacterSet());
     osc_setlocale(LC_TIME, explode(',', $OSCOM_Language->getLocale()));
     return true;
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:15,代码来源:Language.php

示例7: initialize

 protected function initialize()
 {
     $OSCOM_Language = Registry::get('Language');
     $OSCOM_Session = Registry::get('Session');
     $OSCOM_Template = Registry::get('Template');
     $OSCOM_Service = Registry::get('Service');
     $OSCOM_Breadcrumb = Registry::get('Breadcrumb');
     $OSCOM_Language->load('products');
     $requested_product = null;
     $product_check = false;
     if (count($_GET) > 1) {
         $requested_product = basename(key(array_slice($_GET, 1, 1, true)));
         if ($requested_product == OSCOM::getSiteApplication()) {
             unset($requested_product);
             if (count($_GET) > 2) {
                 $requested_product = basename(key(array_slice($_GET, 2, 1, true)));
             }
         }
     }
     if (isset($requested_product)) {
         if (!self::siteApplicationActionExists($requested_product)) {
             if (Product::checkEntry($requested_product)) {
                 $product_check = true;
                 Registry::set('Product', new Product($requested_product));
                 $OSCOM_Product = Registry::get('Product');
                 $OSCOM_Product->incrementCounter();
                 $OSCOM_Template->addPageTags('keywords', $OSCOM_Product->getTitle());
                 $OSCOM_Template->addPageTags('keywords', $OSCOM_Product->getModel());
                 if ($OSCOM_Product->hasTags()) {
                     $OSCOM_Template->addPageTags('keywords', $OSCOM_Product->getTags());
                 }
                 $OSCOM_Template->addJavascriptFilename(OSCOM::getPublicSiteLink('javascript/products/info.js'));
                 // HPDL            osC_Services_category_path::process($osC_Product->getCategoryID());
                 if ($OSCOM_Service->isStarted('Breadcrumb')) {
                     $OSCOM_Breadcrumb->add($OSCOM_Product->getTitle(), OSCOM::getLink(null, null, $OSCOM_Product->getKeyword()));
                 }
                 $this->_page_title = $OSCOM_Product->getTitle();
             }
         }
     }
     if ($product_check === false) {
         $this->_page_title = OSCOM::getDef('product_not_found_heading');
         $this->_page_contents = 'not_found.php';
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:45,代码来源:Controller.php

示例8: initialize

 public static function initialize()
 {
     define('OSCOM_BOOTSTRAP_FILE', 'index.php');
     define('HTTP_SERVER', '');
     define('HTTP_COOKIE_PATH', '');
     define('HTTP_COOKIE_DOMAIN', '');
     define('DIR_WS_HTTP_CATALOG', '');
     define('DIR_WS_IMAGES', '');
     define('DB_SERVER_PERSISTENT_CONNECTIONS', false);
     define('DIR_FS_WORK', OSCOM::BASE_DIRECTORY . 'work/');
     Registry::set('Language', new Language());
     Registry::set('osC_Language', Registry::get('Language'));
     // HPDL to remove
     $application = 'osCommerce\\OM\\Core\\Site\\Setup\\Application\\' . OSCOM::getSiteApplication() . '\\Controller';
     Registry::set('Application', new $application());
     Registry::set('Template', new Template());
     Registry::get('Template')->setApplication(Registry::get('Application'));
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:18,代码来源:Controller.php

示例9: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_Template = Registry::get('Template');
     $OSCOM_NavigationHistory = Registry::get('NavigationHistory');
     // HPDL
     $OSCOM_Template->setHasHeader(false);
     $OSCOM_Template->setHasFooter(false);
     $OSCOM_Template->setHasBoxModules(false);
     $OSCOM_Template->setHasContentModules(false);
     $OSCOM_Template->setShowDebugMessages(false);
     $OSCOM_NavigationHistory->removeCurrentPage();
     $requested_product = null;
     $product_check = false;
     if (count($_GET) > 2) {
         $requested_product = basename(key(array_slice($_GET, 2, 1, true)));
         if ($requested_product == OSCOM::getSiteApplication()) {
             unset($requested_product);
             if (count($_GET) > 3) {
                 $requested_product = basename(key(array_slice($_GET, 3, 1, true)));
             }
         }
     }
     if (isset($requested_product)) {
         if (!$application->siteApplicationActionExists($requested_product)) {
             if (Product::checkEntry($requested_product)) {
                 $product_check = true;
                 Registry::set('Product', new Product($requested_product));
                 $OSCOM_Product = Registry::get('Product');
                 $OSCOM_Template->addPageTags('keywords', $OSCOM_Product->getTitle());
                 $OSCOM_Template->addPageTags('keywords', $OSCOM_Product->getModel());
                 if ($OSCOM_Product->hasTags()) {
                     $OSCOM_Template->addPageTags('keywords', $OSCOM_Product->getTags());
                 }
                 $application->setPageTitle($OSCOM_Product->getTitle());
                 $application->setPageContent('images.php');
             }
         }
     }
     if ($product_check === false) {
         $application->setPageTitle(OSCOM::getDef('product_not_found_heading'));
         $application->setPageContent('not_found.php');
     }
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:43,代码来源:Images.php

示例10: initialize

 public static function initialize()
 {
     OSCOM::loadConfig();
     if (strlen(DB_SERVER) < 1) {
         osc_redirect(OSCOM::getLink('Setup'));
     }
     Registry::set('MessageStack', new MessageStack());
     Registry::set('Cache', new Cache());
     Registry::set('Database', Database::initialize());
     $Qcfg = Registry::get('Database')->query('select configuration_key as cfgKey, configuration_value as cfgValue from :table_configuration');
     $Qcfg->setCache('configuration');
     $Qcfg->execute();
     while ($Qcfg->next()) {
         define($Qcfg->value('cfgKey'), $Qcfg->value('cfgValue'));
     }
     $Qcfg->freeResult();
     Registry::set('Session', Session::load('adminSid'));
     Registry::get('Session')->start();
     Registry::get('MessageStack')->loadFromSession();
     Registry::set('Language', new Language());
     if (!self::hasAccess(OSCOM::getSiteApplication())) {
         Registry::get('MessageStack')->add('header', 'No access.', 'error');
         osc_redirect_admin(OSCOM::getLink(null, 'Index'));
     }
     $application = 'osCommerce\\OM\\Core\\Site\\Admin\\Application\\' . OSCOM::getSiteApplication() . '\\Controller';
     Registry::set('Application', new $application());
     Registry::set('Template', new Template());
     Registry::get('Template')->setApplication(Registry::get('Application'));
     // HPDL move following checks elsewhere
     // check if a default currency is set
     if (!defined('DEFAULT_CURRENCY')) {
         Registry::get('MessageStack')->add('header', OSCOM::getDef('ms_error_no_default_currency'), 'error');
     }
     // check if a default language is set
     if (!defined('DEFAULT_LANGUAGE')) {
         Registry::get('MessageStack')->add('header', ERROR_NO_DEFAULT_LANGUAGE_DEFINED, 'error');
     }
     if (function_exists('ini_get') && (bool) ini_get('file_uploads') == false) {
         Registry::get('MessageStack')->add('header', OSCOM::getDef('ms_warning_uploads_disabled'), 'warning');
     }
 }
开发者ID:hakankarar,项目名称:oscommerce,代码行数:41,代码来源:Controller.php

示例11: __construct

 public function __construct()
 {
     $DLlang = new DirectoryListing(OSCOM::BASE_DIRECTORY . 'Core/Site/Shop/Languages');
     $DLlang->setIncludeDirectories(false);
     $DLlang->setCheckExtension('xml');
     foreach ($DLlang->getFiles() as $file) {
         $lang = XML::toArray(simplexml_load_file(OSCOM::BASE_DIRECTORY . 'Core/Site/Shop/Languages/' . $file['name']));
         if (!isset($lang['language'])) {
             // create root element (simpleXML does not use root element)
             $lang = array('language' => $lang);
         }
         $this->_languages[$lang['language']['data']['code']] = array('id' => 1, 'code' => $lang['language']['data']['code'], 'name' => $lang['language']['data']['title'], 'locale' => $lang['language']['data']['locale'], 'charset' => $lang['language']['data']['character_set'], 'date_format_short' => $lang['language']['data']['date_format_short'], 'date_format_long' => $lang['language']['data']['date_format_long'], 'time_format' => $lang['language']['data']['time_format'], 'text_direction' => $lang['language']['data']['text_direction'], 'parent_id' => 0);
     }
     unset($lang);
     $language = isset($_GET['language']) && !empty($_GET['language']) ? $_GET['language'] : '';
     $this->set($language);
     header('Content-Type: text/html; charset=' . $this->getCharacterSet());
     setlocale(LC_TIME, explode(',', $this->getLocale()));
     $this->loadIniFile();
     $this->loadIniFile(OSCOM::getSiteApplication() . '.php');
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:21,代码来源:Language.php

示例12: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_Service = Registry::get('Service');
     $OSCOM_Breadcrumb = Registry::get('Breadcrumb');
     if ($OSCOM_Service->isStarted('Reviews') === false) {
         osc_redirect(OSCOM::getLink(null, OSCOM::getDefaultSiteApplication()));
     }
     $application->setPageTitle(OSCOM::getDef('reviews_heading'));
     $application->setPageContent('reviews.php');
     if ($OSCOM_Service->isStarted('Breadcrumb')) {
         $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_reviews'), OSCOM::getLink(null, null, 'Reviews'));
     }
     $requested_product = null;
     $product_check = false;
     if (count($_GET) > 2) {
         $requested_product = basename(key(array_slice($_GET, 2, 1, true)));
         if ($requested_product == OSCOM::getSiteApplication()) {
             unset($requested_product);
             if (count($_GET) > 3) {
                 $requested_product = basename(key(array_slice($_GET, 3, 1, true)));
             }
         }
     }
     if (isset($requested_product)) {
         if (Product::checkEntry($requested_product)) {
             $product_check = true;
             Registry::set('Product', new Product($requested_product));
             $OSCOM_Product = Registry::get('Product');
             $application->setPageTitle($OSCOM_Product->getTitle());
             $application->setPageContent('reviews_product.php');
             if ($OSCOM_Service->isStarted('Breadcrumb')) {
                 $OSCOM_Breadcrumb->add($OSCOM_Product->getTitle(), OSCOM::getLink(null, null, 'Reviews&' . $OSCOM_Product->getKeyword()));
             }
         }
         if ($product_check === false) {
             $application->setPageContent('not_found.php');
         }
     }
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:39,代码来源:Reviews.php

示例13: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_Customer = Registry::get('Customer');
     $OSCOM_NavigationHistory = Registry::get('NavigationHistory');
     $OSCOM_Service = Registry::get('Service');
     $OSCOM_Breadcrumb = Registry::get('Breadcrumb');
     if (ALLOW_GUEST_TO_TELL_A_FRIEND == '-1' && $OSCOM_Customer->isLoggedOn() === false) {
         $OSCOM_NavigationHistory->setSnapshot();
         OSCOM::redirect(OSCOM::getLink(null, 'Account', 'LogIn', 'SSL'));
     }
     $requested_product = null;
     $product_check = false;
     if (count($_GET) > 2) {
         $requested_product = basename(key(array_slice($_GET, 2, 1, true)));
         if ($requested_product == OSCOM::getSiteApplication()) {
             unset($requested_product);
             if (count($_GET) > 3) {
                 $requested_product = basename(key(array_slice($_GET, 3, 1, true)));
             }
         }
     }
     if (isset($requested_product)) {
         if (Product::checkEntry($requested_product)) {
             $product_check = true;
             Registry::set('Product', new Product($requested_product));
             $OSCOM_Product = Registry::get('Product');
             $application->setPageTitle($OSCOM_Product->getTitle());
             $application->setPageContent('tell_a_friend.php');
             if ($OSCOM_Service->isStarted('Breadcrumb')) {
                 $OSCOM_Breadcrumb->add($OSCOM_Product->getTitle(), OSCOM::getLink(null, null, $OSCOM_Product->getKeyword()));
                 $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_tell_a_friend'), OSCOM::getLink(null, null, 'TellAFriend&' . $OSCOM_Product->getKeyword()));
             }
         }
         if ($product_check === false) {
             $application->setPageContent('not_found.php');
         }
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:38,代码来源:TellAFriend.php

示例14: get

 public function get($group = null)
 {
     if (empty($group)) {
         $group = OSCOM::getSiteApplication();
     }
     $result = false;
     if ($this->exists($group)) {
         $data = array();
         foreach ($this->_data[$group] as $message) {
             $data['messageStack' . ucfirst($message['type'])][] = $message['text'];
         }
         $result = '';
         foreach ($data as $type => $messages) {
             $result .= '<div class="' . HTML::outputProtected($type) . '" onmouseover="$(this).find(\'span:first\').show();" onmouseout="$(this).find(\'span:first\').hide();"><span style="float: right; display: none;"><a href="#" onclick="$(this).parent().parent().slideFadeToggle();">' . HTML::icon('minimize.png', 'Hide') . '</a></span>';
             foreach ($messages as $message) {
                 $result .= '<p>' . HTML::outputProtected($message) . '</p>';
             }
             $result .= '</div>';
         }
         unset($this->_data[$group]);
     }
     return $result;
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:23,代码来源:MessageStack.php

示例15: updateShortcutNotifications

                wkn[key].n.show();
              }
            }
          } else {
            $('#shortcut-' + key + ' .notBubble').hide();
          }
        }
      });

      $.cookie('wkn', $.toJSON(wkn));
    });
  }

  $(document).ready(function() {
    updateShortcutNotifications(typeof resetShortcutNotification != 'undefined' ? '<?php 
    echo OSCOM::getSiteApplication();
    ?>
' : null);

    setInterval('updateShortcutNotifications()', 10000);
  });

  if (window.external.msIsSiteMode()) {

<?php 
    if (Access::hasShortcut()) {
        echo '    window.external.msSiteModeClearJumplist();' . "\n" . '    window.external.msSiteModeCreateJumplist("Shortcuts");' . "\n";
        foreach (Access::getShortcuts() as $shortcut) {
            echo '    window.external.msSiteModeAddJumpListItem("' . $shortcut['title'] . '", "' . OSCOM::getLink(null, $shortcut['module']) . '", "", "self");' . "\n";
        }
        echo '    window.external.msSiteModeShowJumplist();' . "\n";
开发者ID:kdexter,项目名称:oscommerce,代码行数:31,代码来源:header.php


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