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


PHP OSCOM::getAllGET方法代码示例

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


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

示例1: sprintf

    echo HTML::image(OSCOM::getPublicSiteLink('images/stars_' . (int) $r['reviews_rating'] . '.png'), sprintf(OSCOM::getDef('rating_of_5_stars'), (int) $r['reviews_rating'])) . ' ' . sprintf(OSCOM::getDef('reviewed_by'), HTML::outputProtected($r['customers_name'])) . '; ' . DateTime::getLong($r['date_added']);
    ?>
</p>

<p><?php 
    echo nl2br(wordwrap(HTML::outputProtected($r['reviews_text']), 60, '&shy;'));
    ?>
</p>

<?php 
}
?>

<div class="listingPageLinks">
  <span style="float: right;"><?php 
echo PDO::getBatchPageLinks('page', $reviews_listing['total'], OSCOM::getAllGET('page'));
?>
</span>

  <?php 
echo PDO::getBatchTotalPages(OSCOM::getDef('result_set_number_of_reviews'), isset($_GET['page']) ? $_GET['page'] : 1, $reviews_listing['total']);
?>
</div>

<div class="submitFormButtons">
  <span style="float: right;"><?php 
echo HTML::button(array('href' => OSCOM::getLink(null, null, 'Reviews&Write&' . $OSCOM_Product->getKeyword()), 'icon' => 'pencil', 'title' => OSCOM::getDef('button_write_review')));
?>
</span>

  <?php 
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:31,代码来源:reviews_product.php

示例2: 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, OSCOM::getAllGET()));
     }
     $error = false;
     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 {
             $error = true;
             $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 {
             $error = true;
             $OSCOM_MessageStack->add('Search', OSCOM::getDef('error_search_invalid_to_date'));
         }
     }
     if ($OSCOM_Search->hasDateSet()) {
         if ($OSCOM_Search->getDateFrom() > $OSCOM_Search->getDateTo()) {
             $error = true;
             $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 {
             $error = true;
             $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 {
             $error = true;
             $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()) {
         $error = true;
         $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) {
             $error = true;
             $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')) {
         $error = true;
         $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 ($error === false) {
         $OSCOM_Search->execute();
     } else {
         $application->setPageContent('main.php');
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:84,代码来源:Q.php

示例3: getListingSortLink

 /**
  * Create a sort heading with appropriate sort link
  *
  * @param string $key The key used for sorting
  * @param string $heading The heading to use the link on
  * @return string
  * @since v3.0.0
  */
 public static function getListingSortLink($key, $heading)
 {
     $current = false;
     $direction = false;
     if (!isset($_GET['sort'])) {
         $current = 'name';
     } elseif ($_GET['sort'] == $key || $_GET['sort'] == $key . '|d') {
         $current = $key;
     }
     if ($key == $current) {
         if (isset($_GET['sort'])) {
             $direction = $_GET['sort'] == $key ? '+' : '-';
         } else {
             $direction = '+';
         }
     }
     return HTML::link(OSCOM::getLink(null, null, OSCOM::getAllGET(array('page', 'sort')) . '&sort=' . $key . ($direction == '+' ? '|d' : '')), $heading . ($key == $current ? $direction : ''), 'title="' . (isset($_GET['sort']) && $_GET['sort'] == $key ? sprintf(OSCOM::getDef('listing_sort_ascendingly'), $heading) : sprintf(OSCOM::getDef('listing_sort_descendingly'), $heading)) . '" class="productListing-heading"');
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:26,代码来源:Products.php

示例4: isset

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

<div style="overflow: auto;">

<?php 
foreach ($specials_listing['entries'] as $s) {
    echo '<span style="width: 33%; float: left; text-align: center;">';
    if (!empty($s['image'])) {
        echo HTML::link(OSCOM::getLink(null, null, $s['products_keyword']), $OSCOM_Image->show($s['image'], $s['products_name'])) . '<br />';
    }
    echo HTML::link(OSCOM::getLink(null, null, $s['products_keyword']), $s['products_name']) . '<br />' . '<s>' . $OSCOM_Currencies->displayPrice($s['products_price'], $s['products_tax_class_id']) . '</s> <span class="productSpecialPrice">' . $OSCOM_Currencies->displayPrice($s['specials_new_products_price'], $s['products_tax_class_id']) . '</span>' . '</span>' . "\n";
}
?>

</div>

<div class="listingPageLinks">
  <span style="float: right;"><?php 
echo PDO::getBatchPageLinks('page', $specials_listing['total'], OSCOM::getAllGET('page'));
?>
</span>

  <?php 
echo PDO::getBatchTotalPages(OSCOM::getDef('result_set_number_of_products'), isset($_GET['page']) ? $_GET['page'] : 1, $specials_listing['total']);
?>
</div>
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:29,代码来源:specials.php

示例5: isset

    }
} else {
    ?>

  <tr>
    <td><?php 
    echo OSCOM::getDef('no_new_products');
    ?>
</td>
  </tr>
  <tr>
    <td colspan="3">&nbsp;</td>
  </tr>

<?php 
}
?>

</table>

<div class="listingPageLinks">
  <span style="float: right;"><?php 
echo PDO::getBatchPageLinks('page', $products_listing['total'], OSCOM::getAllGET('page'));
?>
</span>

  <?php 
echo PDO::getBatchTotalPages(OSCOM::getDef('result_set_number_of_products'), isset($_GET['page']) ? $_GET['page'] : 1, $products_listing['total']);
?>
</div>
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:30,代码来源:all.php

示例6: sprintf

    ?>

<p><?php 
    echo OSCOM::getDef('number_of_product_reviews') . ' ' . Reviews::getTotal(Products::getProductID($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 HTML::button(array('href' => OSCOM::getLink(null, null, 'Reviews&' . OSCOM::getAllGET()), 'icon' => 'comment', 'title' => OSCOM::getDef('button_reviews')));
}
?>

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


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