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


PHP OSCOM::getDefaultSiteApplication方法代码示例

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


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

示例1: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_Service = Registry::get('Service');
     $OSCOM_Breadcrumb = Registry::get('Breadcrumb');
     $application->setPageTitle(sprintf(OSCOM::getDef('index_heading'), STORE_NAME));
     $application->setPageContent('product_listing.php');
     if (is_numeric($_GET['Manufacturers'])) {
         Registry::set('Manufacturer', new Manufacturer($_GET['Manufacturers']));
         $OSCOM_Manufacturer = Registry::get('Manufacturer');
         $application->setPageTitle($OSCOM_Manufacturer->getTitle());
         // HPDL        $application->setPageImage('manufacturers/' . $OSCOM_Manufacturer->getImage());
         if ($OSCOM_Service->isStarted('Breadcrumb')) {
             $OSCOM_Breadcrumb->add($OSCOM_Manufacturer->getTitle(), OSCOM::getLink());
         }
         Registry::set('Products', new Products());
         $OSCOM_Products = Registry::get('Products');
         $OSCOM_Products->setManufacturer($OSCOM_Manufacturer->getID());
         if (isset($_GET['filter']) && is_numeric($_GET['filter']) && $_GET['filter'] > 0) {
             $OSCOM_Products->setCategory($_GET['filter']);
         }
         if (isset($_GET['sort']) && !empty($_GET['sort'])) {
             if (strpos($_GET['sort'], '|d') !== false) {
                 $OSCOM_Products->setSortBy(substr($_GET['sort'], 0, -2), '-');
             } else {
                 $OSCOM_Products->setSortBy($_GET['sort']);
             }
         }
     } else {
         osc_redirect(OSCOM::getLink(OSCOM::getDefaultSite(), OSCOM::getDefaultSiteApplication()));
     }
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:31,代码来源:Manufacturers.php

示例2: start

 public static function start()
 {
     Registry::set('Breadcrumb', new BreadcrumbClass());
     $OSCOM_Breadcrumb = Registry::get('Breadcrumb');
     $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_top'), OSCOM::getLink(OSCOM::getDefaultSite(), OSCOM::getDefaultSiteApplication()));
     $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_shop'), OSCOM::getLink('Shop', 'Index'));
     return true;
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:8,代码来源:Breadcrumb.php

示例3: 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

示例4: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_NavigationHistory = Registry::get('NavigationHistory');
     $OSCOM_MessageStack = Registry::get('MessageStack');
     if (!empty($_POST['email_address']) && !empty($_POST['password']) && Account::logIn($_POST['email_address'], $_POST['password'])) {
         $OSCOM_NavigationHistory->removeCurrentPage();
         if ($OSCOM_NavigationHistory->hasSnapshot()) {
             $OSCOM_NavigationHistory->redirectToSnapshot();
         } else {
             osc_redirect(OSCOM::getLink(null, OSCOM::getDefaultSiteApplication(), null, 'AUTO'));
         }
     }
     $OSCOM_MessageStack->add('LogIn', OSCOM::getDef('error_login_no_match'));
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:14,代码来源:Process.php

示例5: execute

 public static function execute(ApplicationAbstract $application)
 {
     $data = array('username' => $_POST['user_name'], 'password' => $_POST['user_password']);
     if (Login::isValidCredentials($data)) {
         $admin = Login::getAdmin($data['username']);
         $_SESSION[OSCOM::getSite()]['id'] = (int) $admin['id'];
         $_SESSION[OSCOM::getSite()]['username'] = $admin['user_name'];
         $_SESSION[OSCOM::getSite()]['access'] = Access::getUserLevels($admin['id']);
         $to_application = OSCOM::getDefaultSiteApplication();
         if (isset($_SESSION[OSCOM::getSite()]['redirect_origin'])) {
             $to_application = $_SESSION[OSCOM::getSite()]['redirect_origin'];
             unset($_SESSION[OSCOM::getSite()]['redirect_origin']);
         }
         osc_redirect_admin(OSCOM::getLink(null, $to_application));
     } else {
         Registry::get('MessageStack')->add('header', OSCOM::getDef('ms_error_login_invalid'), 'error');
     }
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:18,代码来源:Process.php

示例6: execute

 public static function execute(ApplicationAbstract $application)
 {
     if (!empty($_POST['user_name']) && !empty($_POST['user_password'])) {
         $Qadmin = Registry::get('Database')->query('select id, user_name, user_password from :table_administrators where user_name = :user_name limit 1');
         $Qadmin->bindValue(':user_name', $_POST['user_name']);
         $Qadmin->execute();
         if ($Qadmin->numberOfRows() === 1) {
             if (osc_validate_password($_POST['user_password'], $Qadmin->value('user_password'))) {
                 $_SESSION[OSCOM::getSite()]['id'] = $Qadmin->valueInt('id');
                 $_SESSION[OSCOM::getSite()]['username'] = $Qadmin->value('user_name');
                 $_SESSION[OSCOM::getSite()]['access'] = Access::getUserLevels($Qadmin->valueInt('id'));
                 $to_application = OSCOM::getDefaultSiteApplication();
                 if (isset($_SESSION[OSCOM::getSite()]['redirect_origin'])) {
                     $to_application = $_SESSION[OSCOM::getSite()]['redirect_origin'];
                     unset($_SESSION[OSCOM::getSite()]['redirect_origin']);
                 }
                 osc_redirect_admin(OSCOM::getLink(null, $to_application));
             }
         }
     }
     Registry::get('MessageStack')->add('header', OSCOM::getDef('ms_error_login_invalid'), 'error');
 }
开发者ID:hakankarar,项目名称:oscommerce,代码行数:22,代码来源:Process.php

示例7: 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

示例8: initialize

 public static function initialize()
 {
     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());
     Registry::set('PDO', DatabasePDO::initialize());
     foreach (OSCOM::callDB('Admin\\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');
         osc_redirect_admin(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');
     }
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:37,代码来源:Controller.php

示例9: osc_link_object

/*
  osCommerce Online Merchant $osCommerce-SIG$
  Copyright (c) 2010 osCommerce (http://www.oscommerce.com)

  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.
*/
use osCommerce\OM\Core\OSCOM;
use osCommerce\OM\Core\Access;
?>

<div id="adminMenu">
  <ul class="apps">
    <li class="shortcuts"><?php 
echo osc_link_object(OSCOM::getLink(null, OSCOM::getDefaultSiteApplication()), osc_image(OSCOM::getPublicSiteLink('images/oscommerce_icon.png'), null, 16, 16));
?>
</li>

<?php 
if (isset($_SESSION[OSCOM::getSite()]['id'])) {
    echo '  <li><a href="#"><span class="ui-icon ui-icon-triangle-1-s" style="float: right;"></span>Applications</a>' . '    <ul>';
    foreach (Access::getLevels() as $group => $links) {
        $application = current($links);
        echo '      <li><a href="' . OSCOM::getLink(null, $application['module']) . '"><span class="ui-icon ui-icon-triangle-1-e" style="float: right;"></span>' . Access::getGroupTitle($group) . '</a>' . '        <ul>';
        foreach ($links as $link) {
            echo '          <li><a href="' . OSCOM::getLink(null, $link['module']) . '">' . $OSCOM_Template->getIcon(16, $link['icon']) . '&nbsp;' . $link['title'] . '</a></li>';
        }
        echo '        </ul>' . '      </li>';
    }
    echo '    </ul>' . '  </li>';
开发者ID:kdexter,项目名称:oscommerce,代码行数:31,代码来源:header.php

示例10: osc_draw_checkbox_field

</td>
      </tr>
      <tr>
        <td class="inputField"><?php 
echo osc_draw_checkbox_field('DB_INSERT_SAMPLE_DATA', 'true', true) . '&nbsp;' . OSCOM::getDef('param_database_import_sample_data');
?>
</td>
        <td class="inputDescription"><?php 
echo OSCOM::getDef('param_database_import_sample_data_description');
?>
</td>
      </tr>
    </table>

    <p align="right"><?php 
echo osc_draw_button(array('priority' => 'primary', 'icon' => 'triangle-1-e', 'title' => OSCOM::getDef('button_continue'))) . ' ' . osc_draw_button(array('href' => OSCOM::getLink(null, OSCOM::getDefaultSiteApplication()), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>
</p>

<?php 
foreach ($_POST as $key => $value) {
    if ($key != 'x' && $key != 'y') {
        if (is_array($value)) {
            for ($i = 0, $n = sizeof($value); $i < $n; $i++) {
                echo osc_draw_hidden_field($key . '[]', $value[$i]);
            }
        } else {
            echo osc_draw_hidden_field($key, $value);
        }
    }
}
开发者ID:kdexter,项目名称:oscommerce,代码行数:31,代码来源:step_2.php

示例11:

    <link rel="stylesheet" type="text/css" href="<?php 
echo OSCOM::getPublicSiteLink('templates/default/stylesheets/general.css');
?>
" />

  </head>

  <body>

    <div id="pageHeader">
      <div>
        <div style="float: right; padding-top: 40px; padding-right: 15px; color: #000000; font-weight: bold;"><a href="http://www.oscommerce.com" target="_blank">osCommerce Website</a> &nbsp;|&nbsp; <a href="http://www.oscommerce.com/support" target="_blank">Support</a></div>

        <a href="<?php 
echo OSCOM::getLink(null, OSCOM::getDefaultSiteApplication());
?>
"><img src="<?php 
echo OSCOM::getPublicSiteLink('images/oscommerce.png');
?>
" border="0" alt="" title="osCommerce Online Merchant v3.0" style="margin: 10px 10px 0px 10px;" /></a>
      </div>
    </div>

    <div id="pageContent">
      <?php 
require $OSCOM_Template->getPageContentsFile();
?>
    </div>

    <div id="pageFooter">
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:30,代码来源:default.php

示例12: sprintf

<?php

/**
 * osCommerce Online Merchant
 * 
 * @copyright Copyright (c) 2011 osCommerce; http://www.oscommerce.com
 * @license BSD License; http://www.oscommerce.com/bsdlicense.txt
 */
use osCommerce\OM\Core\HTML;
use osCommerce\OM\Core\OSCOM;
if ($OSCOM_NavigationHistory->hasSnapshot()) {
    $origin_href = $OSCOM_NavigationHistory->getSnapshotURL();
    $OSCOM_NavigationHistory->resetSnapshot();
} else {
    $origin_href = OSCOM::getLink(null, OSCOM::getDefaultSiteApplication());
}
?>

<h1><?php 
echo $OSCOM_Template->getPageTitle();
?>
</h1>

<div>
  <div style="padding-top: 30px;">
    <p><?php 
echo sprintf(OSCOM::getDef('success_account_created'), OSCOM::getLink(null, 'Info', 'Contact'));
?>
</p>
  </div>
</div>
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:31,代码来源:create_success.php

示例13: osc_image

?>

<?php 
echo osc_image(DIR_WS_IMAGES . $OSCOM_Template->getPageImage(), $OSCOM_Template->getPageTitle(), HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT, 'id="pageIcon"');
?>

<h1><?php 
echo $OSCOM_Template->getPageTitle();
?>
</h1>

<div>
  <div style="float: left;"><?php 
echo osc_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', $OSCOM_Template->getPageTitle());
?>
</div>

  <div style="padding-top: 30px;">
    <p><?php 
echo OSCOM::getDef('sign_out_text');
?>
</p>
  </div>
</div>

<div class="submitFormButtons" style="text-align: right;">
  <?php 
echo osc_link_object(OSCOM::getLink(null, OSCOM::getDefaultSiteApplication()), osc_draw_image_button('button_continue.gif', OSCOM::getDef('button_continue')));
?>
</div>
开发者ID:kdexter,项目名称:oscommerce,代码行数:30,代码来源:logoff.php

示例14:

<?php

/**
 * osCommerce Online Merchant
 * 
 * @copyright Copyright (c) 2011 osCommerce; http://www.oscommerce.com
 * @license BSD License; http://www.oscommerce.com/bsdlicense.txt
 */
use osCommerce\OM\Core\HTML;
use osCommerce\OM\Core\OSCOM;
?>

<h1><?php 
echo $OSCOM_Template->getPageTitle();
?>
</h1>

<p><?php 
echo OSCOM::getDef('product_not_found');
?>
</p>

<div class="submitFormButtons" style="text-align: right;">
  <?php 
echo HTML::button(array('href' => OSCOM::getLink(null, OSCOM::getDefaultSiteApplication()), 'icon' => 'triangle-1-e', 'title' => OSCOM::getDef('button_continue')));
?>
</div>
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:27,代码来源:not_found.php

示例15: prepareDB

      </tr>
      <tr>
        <td class="inputField"><?php echo OSCOM::getDef('param_database_port') . '<br />' . HTML::inputField('DB_SERVER_PORT', null, 'class="text"'); ?></td>
        <td class="inputDescription"><?php echo OSCOM::getDef('param_database_port_description'); ?></td>
      </tr>
      <tr>
        <td class="inputField"><?php echo OSCOM::getDef('param_database_type') . '<br />' . HTML::selectMenu('DB_DATABASE_CLASS', $db_table_types); ?></td>
        <td class="inputDescription"><?php echo OSCOM::getDef('param_database_type_description'); ?></td>
      </tr>
      <tr>
        <td class="inputField"><?php echo OSCOM::getDef('param_database_prefix') . '<br />' . HTML::inputField('DB_TABLE_PREFIX', 'osc_', 'class="text"'); ?></td>
        <td class="inputDescription"><?php echo OSCOM::getDef('param_database_prefix_description'); ?></td>
      </tr>
    </table>

    <p align="right"><?php echo HTML::button(array('priority' => 'primary', 'icon' => 'triangle-1-e', 'title' => OSCOM::getDef('button_continue'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(null, OSCOM::getDefaultSiteApplication()), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>

    </form>
  </div>
</div>

<script type="text/javascript">
  $("#installForm").submit(function(e) {
    if ( formSuccess == false ) {
      e.preventDefault();

      prepareDB();
    }
  });
</script>
开发者ID:haraldpdl,项目名称:oscommerce,代码行数:30,代码来源:step_1.php


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