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


PHP osc_get_all_get_params函数代码示例

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


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

示例1: initialize

 function initialize()
 {
     global $osC_Database, $osC_Language, $osC_Product, $osC_Customer;
     $this->_title_link = osc_href_link(FILENAME_ACCOUNT, 'notifications', 'SSL');
     if (isset($osC_Product) && is_a($osC_Product, 'osC_Product')) {
         if ($osC_Customer->isLoggedOn()) {
             $Qcheck = $osC_Database->query('select global_product_notifications from :table_customers where customers_id = :customers_id');
             $Qcheck->bindTable(':table_customers', TABLE_CUSTOMERS);
             $Qcheck->bindInt(':customers_id', $osC_Customer->getID());
             $Qcheck->execute();
             if ($Qcheck->valueInt('global_product_notifications') === 0) {
                 $Qcheck = $osC_Database->query('select products_id from :table_products_notifications where products_id = :products_id and customers_id = :customers_id limit 1');
                 $Qcheck->bindTable(':table_products_notifications', TABLE_PRODUCTS_NOTIFICATIONS);
                 $Qcheck->bindInt(':products_id', $osC_Product->getID());
                 $Qcheck->bindInt(':customers_id', $osC_Customer->getID());
                 $Qcheck->execute();
                 if ($Qcheck->numberOfRows() > 0) {
                     $this->_content = '<div style="float: left; width: 55px;">' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array('action')) . '&action=notify_remove', 'AUTO'), osc_image(DIR_WS_IMAGES . 'box_products_notifications_remove.gif', sprintf($osC_Language->get('box_product_notifications_remove'), $osC_Product->getTitle()))) . '</div>' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array('action')) . '&action=notify_remove', 'AUTO'), sprintf($osC_Language->get('box_product_notifications_remove'), $osC_Product->getTitle()));
                 } else {
                     $this->_content = '<div style="float: left; width: 55px;">' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array('action')) . '&action=notify_add', 'AUTO'), osc_image(DIR_WS_IMAGES . 'box_products_notifications.gif', sprintf($osC_Language->get('box_product_notifications_add'), $osC_Product->getTitle()))) . '</div>' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array('action')) . '&action=notify_add', 'AUTO'), sprintf($osC_Language->get('box_product_notifications_add'), $osC_Product->getTitle()));
                 }
                 $this->_content .= '<div style="clear: both;"></div>';
             }
         } else {
             $this->_content = '<div style="float: left; width: 55px;">' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array('action')) . '&action=notify_add', 'AUTO'), osc_image(DIR_WS_IMAGES . 'box_products_notifications.gif', sprintf($osC_Language->get('box_product_notifications_add'), $osC_Product->getTitle()))) . '</div>' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array('action')) . '&action=notify_add', 'AUTO'), sprintf($osC_Language->get('box_product_notifications_add'), $osC_Product->getTitle())) . '<div style="clear: both;"></div>';
         }
     }
 }
开发者ID:4DvAnCeBoY,项目名称:tomatocart-shoppingcart,代码行数:28,代码来源:product_notifications.php

示例2: execute

 function execute()
 {
     global $osC_Database, $osC_Session, $osC_NavigationHistory, $osC_Customer;
     if (!$osC_Customer->isLoggedOn()) {
         $osC_NavigationHistory->setSnapshot();
         osc_redirect(osc_href_link(FILENAME_ACCOUNT, 'login', 'SSL'));
         return false;
     }
     $id = false;
     foreach ($_GET as $key => $value) {
         if ((ereg('^[0-9]+(#?([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*)*$', $key) || ereg('^[a-zA-Z0-9 -_]*$', $key)) && $key != $osC_Session->getName()) {
             $id = $key;
         }
         break;
     }
     if ($id !== false && osC_Product::checkEntry($id)) {
         $osC_Product = new osC_Product($id);
         $Qcheck = $osC_Database->query('select products_id from :table_products_notifications where customers_id = :customers_id and products_id = :products_id limit 1');
         $Qcheck->bindTable(':table_products_notifications', TABLE_PRODUCTS_NOTIFICATIONS);
         $Qcheck->bindInt(':customers_id', $osC_Customer->getID());
         $Qcheck->bindInt(':products_id', $osC_Product->getID());
         $Qcheck->execute();
         if ($Qcheck->numberOfRows() > 0) {
             $Qn = $osC_Database->query('delete from :table_products_notifications where customers_id = :customers_id and products_id = :products_id');
             $Qn->bindTable(':table_products_notifications', TABLE_PRODUCTS_NOTIFICATIONS);
             $Qn->bindInt(':customers_id', $osC_Customer->getID());
             $Qn->bindInt(':products_id', $osC_Product->getID());
             $Qn->execute();
         }
     }
     osc_redirect(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array('action'))));
 }
开发者ID:4DvAnCeBoY,项目名称:tomatocart-shoppingcart,代码行数:32,代码来源:notify_remove.php

示例3: initialize

 public function initialize()
 {
     $OSCOM_Product = Registry::exists('Product') ? Registry::get('Product') : null;
     $OSCOM_Customer = Registry::get('Customer');
     $OSCOM_Database = Registry::get('Database');
     $OSCOM_Language = Registry::get('Language');
     $this->_title_link = OSCOM::getLink(null, 'Account', 'Notifications', 'SSL');
     if (isset($OSCOM_Product) && $OSCOM_Product instanceof \osCommerce\OM\Site\Shop\Product && $OSCOM_Product->isValid()) {
         if ($OSCOM_Customer->isLoggedOn()) {
             $Qcheck = $OSCOM_Database->query('select global_product_notifications from :table_customers where customers_id = :customers_id');
             $Qcheck->bindInt(':customers_id', $OSCOM_Customer->getID());
             $Qcheck->execute();
             if ($Qcheck->valueInt('global_product_notifications') === 0) {
                 $Qcheck = $OSCOM_Database->query('select products_id from :table_products_notifications where products_id = :products_id and customers_id = :customers_id limit 1');
                 $Qcheck->bindInt(':products_id', $OSCOM_Product->getID());
                 $Qcheck->bindInt(':customers_id', $OSCOM_Customer->getID());
                 $Qcheck->execute();
                 if ($Qcheck->numberOfRows() > 0) {
                     $this->_content = '<div style="float: left; width: 55px;">' . osc_link_object(OSCOM::getLink(null, null, osc_get_all_get_params(array('action')) . '&action=notify_remove', 'AUTO'), osc_image(DIR_WS_IMAGES . 'box_products_notifications_remove.gif', sprintf(OSCOM::getDef('box_product_notifications_remove'), $OSCOM_Product->getTitle()))) . '</div>' . osc_link_object(OSCOM::getLink(null, null, osc_get_all_get_params(array('action')) . '&action=notify_remove', 'AUTO'), sprintf(OSCOM::getDef('box_product_notifications_remove'), $OSCOM_Product->getTitle()));
                 } else {
                     $this->_content = '<div style="float: left; width: 55px;">' . osc_link_object(OSCOM::getLink(null, null, osc_get_all_get_params(array('action')) . '&action=notify_add', 'AUTO'), osc_image(DIR_WS_IMAGES . 'box_products_notifications.gif', sprintf(OSCOM::getDef('box_product_notifications_add'), $OSCOM_Product->getTitle()))) . '</div>' . osc_link_object(OSCOM::getLink(null, null, osc_get_all_get_params(array('action')) . '&action=notify_add', 'AUTO'), sprintf(OSCOM::getDef('box_product_notifications_add'), $OSCOM_Product->getTitle()));
                 }
                 $this->_content .= '<div style="clear: both;"></div>';
             }
         }
     }
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:27,代码来源:Controller.php

示例4: initialize

 function initialize()
 {
     global $osC_Language, $osC_Template, $toC_Compare_Products;
     if ($toC_Compare_Products->hasContents()) {
         $osC_Template->addStyleSheet('ext/multibox/multibox.css');
         $osC_Template->addJavascriptFilename('ext/multibox/Overlay.js');
         $osC_Template->addJavascriptFilename('ext/multibox/MultiBox.js');
         $this->_content = '<ul>';
         foreach ($toC_Compare_Products->getProducts() as $products_id) {
             $osC_Product = new osC_Product($products_id);
             $this->_content .= '<li>' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $products_id . '&' . osc_get_all_get_params(array('action')) . '&action=compare_products_remove'), osc_draw_image_button('button_delete_icon.png', $osC_Language->get('button_delete')), 'style="float: right; margin: 0 3px 1px 3px"') . osc_link_object(osc_href_link(FILENAME_PRODUCTS, $products_id), $osC_Product->getTitle()) . '</li>';
         }
         $this->_content .= '</ul>';
         $this->_content .= '<p>' . '<span style="float: right">' . osc_link_object(osc_href_link(FILENAME_JSON, 'module=products&action=compare_products'), osc_draw_image_button('small_compare_now.png', $osC_Language->get('button_compare_now')), 'class="multibox" rel="width:800,height:400,ajax:true"') . '</span>' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array('action')) . '&action=compare_products_clear'), osc_draw_image_button('small_clear.png', $osC_Language->get('button_clear'))) . '&nbsp;&nbsp;' . '</p>';
         $js .= '<script type="text/javascript">
               window.addEvent("domready",function() {
                 var overlay = new Overlay(); 
                 var box = new MultiBox(\'multibox\', { 
                     overlay: overlay
                 });
               });
             </script>';
         $this->_content .= "\n" . $js;
     }
 }
开发者ID:Doluci,项目名称:tomatocart,代码行数:25,代码来源:compare_products.php

示例5: initialize

 function initialize()
 {
     global $osC_Language, $request_type;
     $this->_content = '';
     foreach ($osC_Language->getAll() as $value) {
         $this->_content .= ' ' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array('language', 'currency')) . '&language=' . $value['code'], 'AUTO'), $osC_Language->showImage($value['code'])) . ' ';
     }
 }
开发者ID:sajad1441,项目名称:TomatoShop-v1,代码行数:8,代码来源:languages.php

示例6: initialize

 function initialize()
 {
     global $osC_Language, $osC_Template, $toC_Compare_Products;
     if ($toC_Compare_Products->hasContents()) {
         $osC_Template->addStyleSheet('ext/multibox/multibox.css');
         $osC_Template->addJavascriptFilename('ext/multibox/Overlay.js');
         $osC_Template->addJavascriptFilename('ext/multibox/MultiBox.js');
         $this->_content = '<ul>';
         foreach ($toC_Compare_Products->getProducts() as $products_id) {
             $osC_Product = new osC_Product($products_id);
             $cid = $products_id;
             $str_variants = '';
             //if the product have any variants, it means that the $products_id should be a product string such as 1#1:1;2:2
             if ($osC_Product->hasVariants()) {
                 $variants = $osC_Product->getVariants();
                 if (preg_match('/^[0-9]+(#?([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*)+$/', $products_id)) {
                     $products_variant = $variants[$products_id];
                 } else {
                     $products_variant = $osC_Product->getDefaultVariant();
                 }
                 //if the product have any variants, get the group_name:value_name string
                 if (isset($products_variant) && isset($products_variant['groups_name']) && is_array($products_variant['groups_name']) && !empty($products_variant['groups_name'])) {
                     $str_variants .= ' -- ';
                     foreach ($products_variant['groups_name'] as $groups_name => $value_name) {
                         $str_variants .= '<strong>' . $groups_name . ': ' . $value_name . '</strong>;';
                     }
                     //clean the last ';'
                     if (($pos = strrpos($str_variants, ';')) !== false) {
                         $str_variants = substr($str_variants, 0, -1);
                     }
                 }
                 //build the product string that could be used
                 if (strpos($products_id, '#') !== false) {
                     $cid = str_replace('#', '_', $products_id);
                 }
             }
             $this->_content .= '<li>' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), 'cid=' . $cid . '&' . osc_get_all_get_params(array('cid', 'action')) . '&action=compare_products_remove'), osc_draw_image_button('button_delete_icon.png', $osC_Language->get('button_delete')), 'style="float: right; margin: 0 3px 1px 3px"') . osc_link_object(osc_href_link(FILENAME_PRODUCTS, $products_id), $osC_Product->getTitle() . $str_variants) . '</li>';
         }
         $this->_content .= '</ul>';
         $this->_content .= '<p>' . '<span style="float: right">' . osc_link_object(osc_href_link(FILENAME_JSON, 'module=products&action=compare_products'), osc_draw_image_button('small_compare_now.png', $osC_Language->get('button_compare_now')), 'class="multibox" rel="ajax:true"') . '</span>' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array('action')) . '&action=compare_products_clear'), osc_draw_image_button('small_clear.png', $osC_Language->get('button_clear'))) . '&nbsp;&nbsp;' . '</p>';
         $js .= '<script type="text/javascript">
               window.addEvent("domready",function() {
                 
                 var box = new MultiBox(\'multibox\', { 
                     movieWidth: 820,
                     movieHeight: 600
                 });
               });
             </script>';
         $this->_content .= "\n" . $js;
     }
 }
开发者ID:4DvAnCeBoY,项目名称:tomatocart-shoppingcart,代码行数:52,代码来源:compare_products.php

示例7: initialize

 function initialize()
 {
     global $osC_Language, $toC_Compare_Products;
     if ($toC_Compare_Products->hasContents()) {
         $this->_content = '<ul>';
         foreach ($toC_Compare_Products->getProducts() as $products_id) {
             $osC_Product = new osC_Product($products_id);
             $this->_content .= '<li>' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $products_id . '&' . osc_get_all_get_params(array('action')) . '&action=compare_products_remove'), osc_draw_image_button('button_delete_icon.png', $osC_Language->get('button_delete')), 'style="float: right; margin: 0 3px 1px 3px"') . osc_link_object(osc_href_link(FILENAME_PRODUCTS, $products_id), $osC_Product->getTitle()) . '</li>';
         }
         $this->_content .= '</ul>';
         $this->_content .= '<p>' . '<span style="float: right">' . osc_link_object('javascript:popupWindow(\'' . osc_href_link(FILENAME_PRODUCTS, 'compare_products') . '\', \'popupWindow\', \'scrollbars=yes\');', osc_draw_image_button('small_compare_now.png', $osC_Language->get('button_compare_now'))) . '</span>' . osc_link_object(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array('action')) . '&action=compare_products_clear'), osc_draw_image_button('small_clear.png', $osC_Language->get('button_clear'))) . '&nbsp;&nbsp;' . '</p>';
     }
 }
开发者ID:Doluci,项目名称:tomatocart,代码行数:13,代码来源:compare_products.php

示例8: execute

 function execute()
 {
     global $osC_Session, $toC_Compare_Products;
     //the cid must be a numeric or the string as 1#1:1;2:2
     if (isset($_GET['cid'])) {
         if (preg_match('/^[0-9]+(_?([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*)*$/', $_GET['cid']) || preg_match('^[a-zA-Z0-9 -_]*$', $_GET['cid'])) {
             $cid = $_GET['cid'];
             if (strpos($cid, '_') !== false) {
                 $cid = str_replace('_', '#', $cid);
             }
         }
         $toC_Compare_Products->deleteProduct($cid);
         osc_redirect(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array('cid', 'action'))));
     }
 }
开发者ID:sajad1441,项目名称:TomatoShop-v1,代码行数:15,代码来源:compare_products_remove.php

示例9: execute

 function execute()
 {
     global $osC_Database, $osC_Session, $osC_NavigationHistory, $osC_Customer;
     if (!$osC_Customer->isLoggedOn()) {
         $osC_NavigationHistory->setSnapshot();
         osc_redirect(osc_href_link(FILENAME_ACCOUNT, 'login', 'SSL'));
         return false;
     }
     $notifications = array();
     if (isset($_GET['products']) && !empty($_GET['products'])) {
         $products_array = explode(';', $_GET['products']);
         foreach ($products_array as $product_id) {
             if (is_numeric($product_id) && !in_array($product_id, $notifications)) {
                 $notifications[] = $product_id;
             }
         }
     } else {
         $id = false;
         foreach ($_GET as $key => $value) {
             if ((ereg('^[0-9]+(#?([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*)*$', $key) || ereg('^[a-zA-Z0-9 -_]*$', $key)) && $key != $osC_Session->getName()) {
                 $id = $key;
             }
             break;
         }
         if ($id !== false && osC_Product::checkEntry($id)) {
             $osC_Product = new osC_Product($id);
             $notifications[] = $osC_Product->getID();
         }
     }
     if (!empty($notifications)) {
         foreach ($notifications as $product_id) {
             $Qcheck = $osC_Database->query('select products_id from :table_products_notifications where customers_id = :customers_id and products_id = :products_id limit 1');
             $Qcheck->bindTable(':table_products_notifications', TABLE_PRODUCTS_NOTIFICATIONS);
             $Qcheck->bindInt(':customers_id', $osC_Customer->getID());
             $Qcheck->bindInt(':products_id', $product_id);
             $Qcheck->execute();
             if ($Qcheck->numberOfRows() < 1) {
                 $Qn = $osC_Database->query('insert into :table_products_notifications (products_id, customers_id, date_added) values (:products_id, :customers_id, :date_added)');
                 $Qn->bindTable(':table_products_notifications', TABLE_PRODUCTS_NOTIFICATIONS);
                 $Qn->bindInt(':products_id', $product_id);
                 $Qn->bindInt(':customers_id', $osC_Customer->getID());
                 $Qn->bindRaw(':date_added', 'now()');
                 $Qn->execute();
             }
         }
     }
     osc_redirect(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array('action'))));
 }
开发者ID:sajad1441,项目名称:TomatoShop-v1,代码行数:48,代码来源:notify_add.php

示例10: osC_Search_Search

 function osC_Search_Search()
 {
     global $osC_Services, $osC_Language, $breadcrumb, $osC_Search;
     $this->_page_title = $osC_Language->get('search_heading');
     $osC_Search = new osC_Search();
     if (isset($_GET['keywords'])) {
         $this->_page_title = $osC_Language->get('search_results_heading');
         $this->_page_contents = 'results.php';
         if ($osC_Services->isStarted('breadcrumb')) {
             $breadcrumb->add($osC_Language->get('breadcrumb_search_results'), osc_href_link(FILENAME_SEARCH, osc_get_all_get_params()));
         }
         $this->_process();
     } else {
         $this->addJavascriptPhpFilename('templates/' . $this->getCode() . '/javascript/search/search.php');
     }
 }
开发者ID:sajad1441,项目名称:TomatoShop-v1,代码行数:16,代码来源:search.php

示例11: execute

 function execute()
 {
     global $osC_Session, $toC_Compare_Products;
     $id = false;
     foreach ($_GET as $key => $value) {
         if ((ereg('^[0-9]+(#?([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*)*$', $key) || ereg('^[a-zA-Z0-9 -_]*$', $key)) && $key != $osC_Session->getName()) {
             if (ereg('^[0-9]', $key)) {
                 $id = $key;
             }
         }
     }
     if (isset($id) && is_numeric($id)) {
         $toC_Compare_Products->deleteProduct($id);
     }
     osc_redirect(osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), osc_get_all_get_params(array($id, 'action'))));
 }
开发者ID:Doluci,项目名称:tomatocart,代码行数:16,代码来源:compare_products_remove.php

示例12: execute

 function execute()
 {
     global $osC_Session, $toC_Compare_Products;
     $link = osc_href_link(basename($_SERVER['SCRIPT_FILENAME']), $params = osc_get_all_get_params(array('cid', 'action')));
     //Get the compare products id string
     if (isset($_GET['cid'])) {
         $cid = $_GET['cid'];
         if (strpos($cid, '_') !== false) {
             $cid = str_replace('_', '#', $cid);
         }
         //if the products have any variants, the string should be formated as 1#1:1;2:1
         if (preg_match('/^[0-9]+(#?([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*)*$/', $cid) || preg_match('/^[a-zA-Z0-9 -_]*$/', $cid)) {
             $toC_Compare_Products->addProduct($cid);
             $link = preg_replace('/^products.php?[a-zA-Z0-9 -_]*$/i', 'products.php?' . $cid, $link);
         }
     }
     osc_redirect($link);
 }
开发者ID:sajad1441,项目名称:TomatoShop-v1,代码行数:18,代码来源:compare_products_add.php

示例13: osc_link_object

    
      <div id="productImages">
      <?php 
echo osc_link_object('javascript:void(0)', $osC_Image->show($osC_Product->getImage(), $osC_Product->getTitle(), ' large-img="' . $osC_Image->getImageUrl($osC_Product->getImage(), 'large') . '" id="product_image" style="padding:0px;border:0px;"', 'product_info'), 'id="defaultProductImage"');
echo '<div style="clear:both"></div>';
$images = $osC_Product->getImages();
foreach ($images as $image) {
    echo osc_link_object($osC_Image->getImageUrl($image['image'], 'originals'), $osC_Image->show($image['image'], $osC_Product->getTitle(), '', 'mini'), 'rel="milkbox:group_products" product-info-img="' . $osC_Image->getImageUrl($image['image'], 'product_info') . '" large-img="' . $osC_Image->getImageUrl($image['image'], 'large') . '" style="float:left" class="mini"') . "\n";
}
?>
      </div>
    </div>


    <form id="cart_quantity" name="cart_quantity" action="<?php 
echo osc_href_link(FILENAME_PRODUCTS, osc_get_all_get_params(array('action')) . '&action=cart_add');
?>
" method="post">
   
    <table id="productInfo" border="0" cellspacing="0" cellpadding="2" style="float: right; width: 270px">
    
      <tr>
        <td colspan="2" id="productInfoPrice"><?php 
echo $osC_Product->getPriceFormated(true) . '&nbsp;' . (DISPLAY_PRICE_WITH_TAX == '1' ? $osC_Language->get('including_tax') : '');
?>
</td>
      </tr>
      
      <tr>
        <td class="label" width="45%"><?php 
echo $osC_Language->get('field_sku');
开发者ID:Doluci,项目名称:tomatocart,代码行数:30,代码来源:info.php

示例14: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_Service = Registry::get('Service');
     $OSCOM_Breadcrumb = Registry::get('Breadcrumb');
     $OSCOM_Search = Registry::get('Search');
     $OSCOM_MessageStack = Registry::get('MessageStack');
     $application->setPageTitle(OSCOM::getDef('search_results_heading'));
     $application->setPageContent('results.php');
     if ($OSCOM_Service->isStarted('Breadcrumb')) {
         $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_search_results'), OSCOM::getLink(null, null, osc_get_all_get_params()));
     }
     if (isset($_GET['datefrom_days']) && is_numeric($_GET['datefrom_days']) && isset($_GET['datefrom_months']) && is_numeric($_GET['datefrom_months']) && isset($_GET['datefrom_years']) && is_numeric($_GET['datefrom_years'])) {
         if (checkdate($_GET['datefrom_months'], $_GET['datefrom_days'], $_GET['datefrom_years'])) {
             $OSCOM_Search->setDateFrom(mktime(0, 0, 0, $_GET['datefrom_months'], $_GET['datefrom_days'], $_GET['datefrom_years']));
         } else {
             $OSCOM_MessageStack->add('Search', OSCOM::getDef('error_search_invalid_from_date'));
         }
     }
     if (isset($_GET['dateto_days']) && is_numeric($_GET['dateto_days']) && isset($_GET['dateto_months']) && is_numeric($_GET['dateto_months']) && isset($_GET['dateto_years']) && is_numeric($_GET['dateto_years'])) {
         if (checkdate($_GET['dateto_months'], $_GET['dateto_days'], $_GET['dateto_years'])) {
             $OSCOM_Search->setDateTo(mktime(23, 59, 59, $_GET['dateto_months'], $_GET['dateto_days'], $_GET['dateto_years']));
         } else {
             $OSCOM_MessageStack->add('Search', OSCOM::getDef('error_search_invalid_to_date'));
         }
     }
     if ($OSCOM_Search->hasDateSet()) {
         if ($OSCOM_Search->getDateFrom() > $OSCOM_Search->getDateTo()) {
             $OSCOM_MessageStack->add('Search', OSCOM::getDef('error_search_to_date_less_than_from_date'));
         }
     }
     if (isset($_GET['pfrom']) && !empty($_GET['pfrom'])) {
         if (settype($_GET['pfrom'], 'double')) {
             $OSCOM_Search->setPriceFrom($_GET['pfrom']);
         } else {
             $OSCOM_MessageStack->add('Search', OSCOM::getDef('error_search_price_from_not_numeric'));
         }
     }
     if (isset($_GET['pto']) && !empty($_GET['pto'])) {
         if (settype($_GET['pto'], 'double')) {
             $OSCOM_Search->setPriceTo($_GET['pto']);
         } else {
             $OSCOM_MessageStack->add('Search', OSCOM::getDef('error_search_price_to_not_numeric'));
         }
     }
     if ($OSCOM_Search->hasPriceSet('from') && $OSCOM_Search->hasPriceSet('to') && $OSCOM_Search->getPriceFrom() >= $OSCOM_Search->getPriceTo()) {
         $OSCOM_MessageStack->add('Search', OSCOM::getDef('error_search_price_to_less_than_price_from'));
     }
     if (isset($_GET['Q']) && is_string($_GET['Q']) && !empty($_GET['Q'])) {
         $OSCOM_Search->setKeywords(urldecode($_GET['Q']));
         if ($OSCOM_Search->hasKeywords() === false) {
             $OSCOM_MessageStack->add('Search', OSCOM::getDef('error_search_invalid_keywords'));
         }
     }
     if (!$OSCOM_Search->hasKeywords() && !$OSCOM_Search->hasPriceSet('from') && !$OSCOM_Search->hasPriceSet('to') && !$OSCOM_Search->hasDateSet('from') && !$OSCOM_Search->hasDateSet('to')) {
         $OSCOM_MessageStack->add('Search', OSCOM::getDef('error_search_at_least_one_input'));
     }
     if (isset($_GET['category']) && is_numeric($_GET['category']) && $_GET['category'] > 0) {
         $OSCOM_Search->setCategory($_GET['category'], isset($_GET['recursive']) && $_GET['recursive'] == '1' ? true : false);
     }
     if (isset($_GET['manufacturer']) && is_numeric($_GET['manufacturer']) && $_GET['manufacturer'] > 0) {
         $OSCOM_Search->setManufacturer($_GET['manufacturer']);
     }
     if (isset($_GET['sort']) && !empty($_GET['sort'])) {
         if (strpos($_GET['sort'], '|d') !== false) {
             $OSCOM_Search->setSortBy(substr($_GET['sort'], 0, -2), '-');
         } else {
             $OSCOM_Search->setSortBy($_GET['sort']);
         }
     }
     if ($OSCOM_MessageStack->size('Search') > 0) {
         $application->setPageContent('main.php');
     }
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:73,代码来源:Q.php

示例15: sprintf

    ?>

<p><?php 
    echo OSCOM::getDef('number_of_product_reviews') . ' ' . Reviews::getTotal(osc_get_product_id($OSCOM_Product->getID()));
    ?>
</p>

<?php 
}
if ($OSCOM_Product->hasURL()) {
    ?>

<p><?php 
    echo sprintf(OSCOM::getDef('go_to_external_products_webpage'), OSCOM::getLink(null, 'Redirect', 'action=url&goto=' . urlencode($OSCOM_Product->getURL()), 'NONSSL', null, false));
    ?>
</p>

<?php 
}
?>

<div class="submitFormButtons" style="text-align: right;">

<?php 
if ($OSCOM_Service->isStarted('Reviews')) {
    echo osc_link_object(OSCOM::getLink(null, null, 'Reviews&' . osc_get_all_get_params()), osc_draw_image_button('button_reviews.gif', OSCOM::getDef('button_reviews')));
}
?>

</div>
开发者ID:kdexter,项目名称:oscommerce,代码行数:30,代码来源:main.php


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