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


PHP OSCOM::redirect方法代码示例

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


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

示例1: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_PDO = Registry::get('PDO');
     $OSCOM_MessageStack = Registry::get('MessageStack');
     $Qcheck = $OSCOM_PDO->prepare('select customers_id, customers_firstname, customers_lastname, customers_gender, customers_email_address, customers_password from :table_customers where customers_email_address = :customers_email_address limit 1');
     $Qcheck->bindValue(':customers_email_address', $_POST['email_address']);
     $Qcheck->execute();
     if ($Qcheck->fetch() !== false) {
         $password = Hash::getRandomString(ACCOUNT_PASSWORD);
         if (Account::savePassword($password, $Qcheck->valueInt('customers_id'))) {
             if (ACCOUNT_GENDER > -1) {
                 if ($Qcheck->value('customers_gender') == 'm') {
                     $email_text = sprintf(OSCOM::getDef('email_addressing_gender_male'), $Qcheck->valueProtected('customers_lastname')) . "\n\n";
                 } else {
                     $email_text = sprintf(OSCOM::getDef('email_addressing_gender_female'), $Qcheck->valueProtected('customers_lastname')) . "\n\n";
                 }
             } else {
                 $email_text = sprintf(OSCOM::getDef('email_addressing_gender_unknown'), $Qcheck->valueProtected('customers_firstname') . ' ' . $Qcheck->valueProtected('customers_lastname')) . "\n\n";
             }
             $email_text .= sprintf(OSCOM::getDef('email_password_reminder_body'), OSCOM::getIPAddress(), STORE_NAME, $password, STORE_OWNER_EMAIL_ADDRESS);
             $pEmail = new Mail($Qcheck->valueProtected('customers_firstname') . ' ' . $Qcheck->valueProtected('customers_lastname'), $Qcheck->valueProtected('customers_email_address'), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, sprintf(OSCOM::getDef('email_password_reminder_subject'), STORE_NAME));
             $pEmail->setBodyPlain($email_text);
             $pEmail->send();
             $OSCOM_MessageStack->add('LogIn', OSCOM::getDef('success_password_forgotten_sent'), 'success');
         }
         OSCOM::redirect(OSCOM::getLink(null, null, 'LogIn', 'SSL'));
     } else {
         $OSCOM_MessageStack->add('PasswordForgotten', OSCOM::getDef('error_password_forgotten_no_email_address_found'));
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:30,代码来源:Process.php

示例2: 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 {
         OSCOM::redirect(OSCOM::getLink(OSCOM::getDefaultSite(), OSCOM::getDefaultSiteApplication()));
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:31,代码来源:Manufacturers.php

示例3: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_ShoppingCart = Registry::get('ShoppingCart');
     $OSCOM_PaymentModule = Registry::get('PaymentModule');
     $OSCOM_PaymentModule->process();
     OSCOM::redirect(OSCOM::getLink(null, null, 'Success', 'SSL'));
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:7,代码来源:Process.php

示例4: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_ShoppingCart = Registry::get('ShoppingCart');
     $requested_product = null;
     if (count($_GET) > 2) {
         $requested_product = basename(key(array_slice($_GET, 2, 1, true)));
         if ($requested_product == 'Add') {
             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)) {
             $OSCOM_Product = new Product($requested_product);
             if ($OSCOM_Product->isTypeActionAllowed('AddToShoppingCart')) {
                 if ($OSCOM_Product->hasVariants()) {
                     if (isset($_POST['variants']) && is_array($_POST['variants']) && !empty($_POST['variants'])) {
                         if ($OSCOM_Product->variantExists($_POST['variants'])) {
                             $OSCOM_ShoppingCart->add($OSCOM_Product->getProductVariantID($_POST['variants']));
                         } else {
                             OSCOM::redirect(OSCOM::getLink(null, 'Products', $OSCOM_Product->getKeyword()));
                         }
                     } else {
                         OSCOM::redirect(OSCOM::getLink(null, 'Products', $OSCOM_Product->getKeyword()));
                     }
                 } else {
                     $OSCOM_ShoppingCart->add($OSCOM_Product->getID());
                 }
             }
         }
     }
     OSCOM::redirect(OSCOM::getLink(null, 'Cart'));
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:35,代码来源:Add.php

示例5: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_Shipping = Registry::get('Shipping');
     $OSCOM_ShoppingCart = Registry::get('ShoppingCart');
     if (!empty($_POST['comments'])) {
         $_SESSION['comments'] = HTML::sanitize($_POST['comments']);
     }
     if ($OSCOM_Shipping->hasQuotes()) {
         if (isset($_POST['shipping_mod_sel']) && strpos($_POST['shipping_mod_sel'], '_')) {
             list($module, $method) = explode('_', $_POST['shipping_mod_sel']);
             if (Registry::exists('Shipping_' . $module) && Registry::get('Shipping_' . $module)->isEnabled()) {
                 $quote = $OSCOM_Shipping->getQuote($_POST['shipping_mod_sel']);
                 if (isset($quote['error'])) {
                     $OSCOM_ShoppingCart->resetShippingMethod();
                 } else {
                     $OSCOM_ShoppingCart->setShippingMethod($quote);
                     OSCOM::redirect(OSCOM::getLink(null, null, null, 'SSL'));
                 }
             } else {
                 $OSCOM_ShoppingCart->resetShippingMethod();
             }
         }
     } else {
         $OSCOM_ShoppingCart->resetShippingMethod();
         OSCOM::redirect(OSCOM::getLink(null, null, null, 'SSL'));
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:27,代码来源:Process.php

示例6: execute

 public static function execute(ApplicationAbstract $application)
 {
     $data = HTML::sanitize(basename($_GET['code']));
     if (!Services::exists($data) || Services::get($data, 'uninstallable') !== true) {
         OSCOM::redirect(OSCOM::getLink());
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:7,代码来源:Uninstall.php

示例7: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_MessageStack = Registry::get('MessageStack');
     if (AddressBook::deleteEntry($_GET['Delete'])) {
         $OSCOM_MessageStack->add('AddressBook', OSCOM::getDef('success_address_book_entry_deleted'), 'success');
     }
     OSCOM::redirect(OSCOM::getLink(null, null, 'AddressBook', 'SSL'));
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:8,代码来源:Process.php

示例8: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_ShoppingCart = Registry::get('ShoppingCart');
     if (is_numeric($_GET['Delete'])) {
         $OSCOM_ShoppingCart->remove($_GET['Delete']);
     }
     OSCOM::redirect(OSCOM::getLink(null, 'Cart'));
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:8,代码来源:Delete.php

示例9: onFail

 public static function onFail(Product $OSCOM_Product)
 {
     $OSCOM_NavigationHistory = Registry::get('NavigationHistory');
     if (!isset($_GET['Billing'])) {
         $OSCOM_NavigationHistory->setSnapshot();
         OSCOM::redirect(OSCOM::getLink(null, 'Checkout', 'Billing', 'SSL'));
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:8,代码来源:RequireBilling.php

示例10: execute

 public static function execute(ApplicationAbstract $application)
 {
     if (Languages::deleteGroup($_GET['group'])) {
         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, 'id=' . $_GET['id']));
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:9,代码来源:Process.php

示例11: execute

 public static function execute(ApplicationAbstract $application)
 {
     if (ErrorLog::delete()) {
         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());
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:9,代码来源:Process.php

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

示例13: execute

 public static function execute(ApplicationAbstract $application)
 {
     $data = array('zone_id' => $_POST['tax_zone_id'], 'rate' => $_POST['tax_rate'], 'description' => $_POST['tax_description'], 'priority' => $_POST['tax_priority'], 'rate' => $_POST['tax_rate'], 'tax_class_id' => $_GET['id']);
     if (TaxClasses::saveEntry(isset($_GET['rID']) && is_numeric($_GET['rID']) ? $_GET['rID'] : 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, 'id=' . $_GET['id']));
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:10,代码来源:Process.php

示例14: execute

 public static function execute(ApplicationAbstract $application)
 {
     $data = HTML::sanitize(basename($_GET['code']));
     if (PaymentModules::install($data)) {
         OSCOM::redirect(OSCOM::getLink(null, null, 'Save&code=' . $_GET['code']));
     } else {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
         OSCOM::redirect(OSCOM::getLink());
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:10,代码来源:Process.php

示例15: execute

 public static function execute(ApplicationAbstract $application)
 {
     $data = HTML::sanitize(basename($_GET['code']));
     if (Services::uninstall($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());
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:10,代码来源:Process.php


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