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


PHP Core\ApplicationAbstract类代码示例

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


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

示例1: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_ShoppingCart = Registry::get('ShoppingCart');
     $OSCOM_Service = Registry::get('Service');
     $OSCOM_Breadcrumb = Registry::get('Breadcrumb');
     $OSCOM_Template = Registry::get('Template');
     $OSCOM_Customer = Registry::get('Customer');
     global $osC_oiAddress;
     // HPDL
     $application->setPageTitle(OSCOM::getDef('shipping_method_heading'));
     $application->setPageContent('shipping.php');
     if ($OSCOM_Service->isStarted('Breadcrumb')) {
         $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_checkout_shipping'), OSCOM::getLink(null, null, 'Shipping', 'SSL'));
     }
     // load shipping address page if no default address exists
     if (!$OSCOM_ShoppingCart->hasShippingAddress()) {
         $application->setPageTitle(OSCOM::getDef('shipping_address_heading'));
         $application->setPageContent('shipping_address.php');
         $OSCOM_Template->addJavascriptFilename(OSCOM::getPublicSiteLink('javascript/checkout_shipping_address.js'));
         $OSCOM_Template->addJavascriptPhpFilename(OSCOM::BASE_DIRECTORY . 'Core/Site/Shop/assets/form_check.js.php');
         if (!$OSCOM_Customer->isLoggedOn()) {
             $osC_oiAddress = new ObjectInfo($OSCOM_ShoppingCart->getShippingAddress());
         }
     } else {
         $OSCOM_Template->addJavascriptFilename(OSCOM::getPublicSiteLink('javascript/checkout_shipping.js'));
         // load all enabled shipping modules
         Registry::set('Shipping', new ShippingClass(), true);
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:29,代码来源:Shipping.php

示例2: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_ShoppingCart = Registry::get('ShoppingCart');
     $OSCOM_Service = Registry::get('Service');
     $OSCOM_Breadcrumb = Registry::get('Breadcrumb');
     $OSCOM_Template = Registry::get('Template');
     global $osC_oiAddress;
     // HPDL
     $application->setPageTitle(OSCOM::getDef('payment_method_heading'));
     $application->setPageContent('billing.php');
     if ($OSCOM_Service->isStarted('Breadcrumb')) {
         $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_checkout_payment'), OSCOM::getLink(null, null, 'Billing', 'SSL'));
     }
     // load billing address page if no default address exists
     if (!$OSCOM_ShoppingCart->hasBillingAddress()) {
         $application->setPageTitle(OSCOM::getDef('payment_address_heading'));
         $application->setPageContent('billing_address.php');
         $OSCOM_Template->addJavascriptFilename(OSCOM::getPublicSiteLink('javascript/checkout_payment_address.js'));
         $OSCOM_Template->addJavascriptPhpFilename(OSCOM::BASE_DIRECTORY . 'Core/Site/Shop/assets/form_check.js.php');
         if (!$OSCOM_Customer->isLoggedOn()) {
             $osC_oiAddress = new ObjectInfo($OSCOM_ShoppingCart->getBillingAddress());
         }
     } else {
         $OSCOM_Template->addJavascriptFilename(OSCOM::getPublicSiteLink('javascript/checkout_payment.js'));
         // load all enabled payment modules
         $OSCOM_Payment = Registry::get('Payment');
         $OSCOM_Payment->loadAll();
         $OSCOM_Template->addJavascriptBlock($OSCOM_Payment->getJavascriptBlocks());
     }
     // HPDL
     //      if (isset($_GET['payment_error']) && is_object(${$_GET['payment_error']}) && ($error = ${$_GET['payment_error']}->get_error())) {
     //        $OSCOM_MessageStack->add('CheckoutBilling', $error['error'], 'error');
     //      }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:34,代码来源:Billing.php

示例3: execute

 public static function execute(ApplicationAbstract $application) {
   if ( isset($_GET['id']) && is_numeric($_GET['id']) ) {
     $application->setPageContent('edit.php');
   } else {
     $application->setPageContent('new.php');
   }
 }
开发者ID:haraldpdl,项目名称:oscommerce,代码行数:7,代码来源:Save.php

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

示例5: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_Customer = Registry::get('Customer');
     $OSCOM_NavigationHistory = Registry::get('NavigationHistory');
     $OSCOM_Language = Registry::get('Language');
     $OSCOM_Service = Registry::get('Service');
     $OSCOM_Breadcrumb = Registry::get('Breadcrumb');
     if ($OSCOM_Customer->isLoggedOn() === false) {
         $OSCOM_NavigationHistory->setSnapshot();
         osc_redirect(OSCOM::getLink(null, null, 'LogIn', 'SSL'));
     }
     $application->setPageTitle(OSCOM::getDef('orders_heading'));
     $application->setPageContent('orders.php');
     $OSCOM_Language->load('order');
     if ($OSCOM_Service->isStarted('Breadcrumb')) {
         $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_my_orders'), OSCOM::getLink(null, null, 'Orders', 'SSL'));
         if (is_numeric($_GET['Orders'])) {
             $OSCOM_Breadcrumb->add(sprintf(OSCOM::getDef('breadcrumb_order_information'), $_GET['Orders']), OSCOM::getLink(null, null, 'Orders=' . $_GET['Orders'], 'SSL'));
         }
     }
     if (is_numeric($_GET['Orders'])) {
         if (Order::getCustomerID($_GET['Orders']) !== $OSCOM_Customer->getID()) {
             osc_redirect(OSCOM::getLink(null, null, null, 'SSL'));
         }
         $application->setPageTitle(sprintf(OSCOM::getDef('order_information_heading'), $_GET['Orders']));
         $application->setPageContent('orders_info.php');
     }
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:28,代码来源:Orders.php

示例6: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_Customer = Registry::get('Customer');
     $OSCOM_NavigationHistory = Registry::get('NavigationHistory');
     $OSCOM_MessageStack = Registry::get('MessageStack');
     $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();
         osc_redirect(OSCOM::getLink(null, 'Account', 'LogIn', 'SSL'));
     }
     $requested_product = null;
     $product_check = false;
     if (count($_GET) > 3) {
         $requested_product = basename(key(array_slice($_GET, 3, 1, true)));
         if ($requested_product == 'Write') {
             unset($requested_product);
             if (count($_GET) > 4) {
                 $requested_product = basename(key(array_slice($_GET, 4, 1, true)));
             }
         }
     }
     if (isset($requested_product)) {
         if (Product::checkEntry($requested_product)) {
             $product_check = true;
         }
     }
     if ($product_check === false) {
         $application->setPageContent('not_found.php');
         return false;
     }
     Registry::set('Product', new Product($requested_product));
     $OSCOM_Product = Registry::get('Product');
     if (empty($_POST['from_name'])) {
         $OSCOM_MessageStack->add('TellAFriend', OSCOM::getDef('error_tell_a_friend_customers_name_empty'));
     }
     if (!osc_validate_email_address($_POST['from_email_address'])) {
         $OSCOM_MessageStack->add('TellAFriend', OSCOM::getDef('error_tell_a_friend_invalid_customers_email_address'));
     }
     if (empty($_POST['to_name'])) {
         $OSCOM_MessageStack->add('TellAFriend', OSCOM::getDef('error_tell_a_friend_friends_name_empty'));
     }
     if (!osc_validate_email_address($_POST['to_email_address'])) {
         $OSCOM_MessageStack->add('TellAFriend', OSCOM::getDef('error_tell_a_friend_invalid_friends_email_address'));
     }
     if ($OSCOM_MessageStack->size('TellAFriend') < 1) {
         $email_subject = sprintf(OSCOM::getDef('email_tell_a_friend_subject'), osc_sanitize_string($_POST['from_name']), STORE_NAME);
         $email_body = sprintf(OSCOM::getDef('email_tell_a_friend_intro'), osc_sanitize_string($_POST['to_name']), osc_sanitize_string($_POST['from_name']), $OSCOM_Product->getTitle(), STORE_NAME) . "\n\n";
         if (!empty($_POST['message'])) {
             $email_body .= osc_sanitize_string($_POST['message']) . "\n\n";
         }
         $email_body .= sprintf(OSCOM::getDef('email_tell_a_friend_link'), OSCOM::getLink(null, null, $OSCOM_Product->getKeyword(), 'NONSSL', false)) . "\n\n" . sprintf(OSCOM::getDef('email_tell_a_friend_signature'), STORE_NAME . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n");
         osc_email(osc_sanitize_string($_POST['to_name']), osc_sanitize_string($_POST['to_email_address']), $email_subject, $email_body, osc_sanitize_string($_POST['from_name']), osc_sanitize_string($_POST['from_email_address']));
         $OSCOM_MessageStack->add('header', sprintf(OSCOM::getDef('success_tell_a_friend_email_sent'), $OSCOM_Product->getTitle(), osc_output_string_protected($_POST['to_name'])), 'success');
         osc_redirect(OSCOM::getLink(null, null, $OSCOM_Product->getKeyword()));
     }
     $application->setPageTitle($OSCOM_Product->getTitle());
     $application->setPageContent('tell_a_friend.php');
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:59,代码来源:Process.php

示例7: execute

 public static function execute(ApplicationAbstract $application)
 {
     $data = array('name' => $_POST['categories_name'], 'image' => isset($_POST['cImageSelected']) ? $_POST['cImageSelected'] : null, 'parent_id' => $_POST['parent_id']);
     if (Categories::save(isset($_GET['id']) && is_numeric($_GET['id']) ? $_GET['id'] : null, $data)) {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
     } else {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
     }
     OSCOM::redirect(OSCOM::getLink(null, null, 'cid=' . $application->getCurrentCategoryID()));
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:10,代码来源:Process.php

示例8: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_Service = Registry::get('Service');
     $OSCOM_Breadcrumb = Registry::get('Breadcrumb');
     $application->setPageTitle(OSCOM::getDef('info_shipping_heading'));
     $application->setPageContent('shipping.php');
     if ($OSCOM_Service->isStarted('Breadcrumb')) {
         $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_shipping'), OSCOM::getLink(null, null, 'Shipping'));
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:10,代码来源:Shipping.php

示例9: execute

 public static function execute(ApplicationAbstract $application)
 {
     if (!isset($_GET['log']) || empty($_GET['log'])) {
         OSCOM::redirect(OSCOM::getLink());
     }
     if (!CoreUpdate::logExists($_GET['log'])) {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_log_file_does_not_exist'), 'error');
         OSCOM::redirect(OSCOM::getLink());
     }
     $application->setPageContent('view_log.php');
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:11,代码来源:ViewLog.php

示例10: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_Template = Registry::get('Template');
     $OSCOM_Service = Registry::get('Service');
     $OSCOM_Breadcrumb = Registry::get('Breadcrumb');
     $application->setPageTitle(OSCOM::getDef('password_forgotten_heading'));
     $application->setPageContent('password_forgotten.php');
     $OSCOM_Template->addJavascriptPhpFilename(OSCOM::BASE_DIRECTORY . 'Core/Site/Shop/assets/form_check.js.php');
     if ($OSCOM_Service->isStarted('Breadcrumb')) {
         $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_password_forgotten'), OSCOM::getLink(null, null, 'PasswordForgotten', 'SSL'));
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:12,代码来源:PasswordForgotten.php

示例11: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_Service = Registry::get('Service');
     $OSCOM_Breadcrumb = Registry::get('Breadcrumb');
     $OSCOM_ShoppingCart = Registry::get('ShoppingCart');
     $OSCOM_Customer = Registry::get('Customer');
     $application->setPageTitle(OSCOM::getDef('sign_out_heading'));
     $application->setPageContent('logoff.php');
     if ($OSCOM_Service->isStarted('Breadcrumb')) {
         $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_sign_out'));
     }
     $OSCOM_Customer->reset();
     $OSCOM_ShoppingCart->reset();
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:14,代码来源:LogOff.php

示例12: 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();
     $application->setPageTitle(OSCOM::getDef('search_heading'));
     $application->setPageContent('help.php');
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:14,代码来源:Help.php

示例13: execute

 public static function execute(ApplicationAbstract $application)
 {
     if (!isset($_GET['v']) || !CoreUpdate::packageExists($_GET['v'])) {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_select_version_to_view'), 'error');
         OSCOM::redirect(OSCOM::getLink());
     }
     if (CoreUpdate::localPackageExists() && CoreUpdate::getPackageInfo('version_to') != $_GET['v']) {
         CoreUpdate::deletePackage();
     }
     if (!CoreUpdate::localPackageExists() && !CoreUpdate::downloadPackage($_GET['v'])) {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_local_update_package_does_not_exist'), 'error');
         OSCOM::redirect(OSCOM::getLink());
     }
     $application->setPageContent('package_contents.php');
     $application->setPageTitle(sprintf(OSCOM::getDef('action_heading_apply'), CoreUpdate::getPackageInfo('version_from'), CoreUpdate::getPackageInfo('version_to')));
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:16,代码来源:Apply.php

示例14: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_Session = Registry::get('Session');
     $OSCOM_Service = Registry::get('Service');
     $OSCOM_Breadcrumb = Registry::get('Breadcrumb');
     // redirect the customer to a friendly cookies-must-be-enabled page if cookies
     // are disabled (or the session has not started)
     if ($OSCOM_Session->hasStarted() === false) {
         osc_redirect(OSCOM::getLink(null, 'Info', 'Cookies'));
     }
     $application->setPageTitle(OSCOM::getDef('sign_in_heading'));
     $application->setPageContent('login.php');
     if ($OSCOM_Service->isStarted('Breadcrumb')) {
         $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_sign_in'), OSCOM::getLink(null, null, 'LogIn', 'SSL'));
     }
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:16,代码来源:LogIn.php

示例15: 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 ($OSCOM_Customer->isLoggedOn() === false) {
         $OSCOM_NavigationHistory->setSnapshot();
         OSCOM::redirect(OSCOM::getLink(null, null, 'LogIn', 'SSL'));
     }
     $application->setPageTitle(OSCOM::getDef('newsletters_heading'));
     $application->setPageContent('newsletters.php');
     if ($OSCOM_Service->isStarted('Breadcrumb')) {
         $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_newsletters'), OSCOM::getLink(null, null, 'Newsletters', 'SSL'));
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:16,代码来源:Newsletters.php


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