當前位置: 首頁>>代碼示例>>PHP>>正文


PHP HTML::hiddenSessionIDField方法代碼示例

本文整理匯總了PHP中osCommerce\OM\Core\HTML::hiddenSessionIDField方法的典型用法代碼示例。如果您正苦於以下問題:PHP HTML::hiddenSessionIDField方法的具體用法?PHP HTML::hiddenSessionIDField怎麽用?PHP HTML::hiddenSessionIDField使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在osCommerce\OM\Core\HTML的用法示例。


在下文中一共展示了HTML::hiddenSessionIDField方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: initialize

 public function initialize()
 {
     $OSCOM_PDO = Registry::get('PDO');
     $Qmanufacturers = $OSCOM_PDO->query('select manufacturers_id as id, manufacturers_name as text from :table_manufacturers order by manufacturers_name');
     $Qmanufacturers->setCache('manufacturers');
     $Qmanufacturers->execute();
     $manufacturers_array = array(array('id' => '', 'text' => OSCOM::getDef('pull_down_default')));
     foreach ($Qmanufacturers->fetchAll() as $m) {
         $manufacturers_array[] = $m;
     }
     $this->_content = '<form name="manufacturers" action="' . OSCOM::getLink() . '" method="get">' . HTML::hiddenField('Index', null) . HTML::selectMenu('Manufacturers', $manufacturers_array, null, 'onchange="this.form.submit();" size="' . BOX_MANUFACTURERS_LIST_SIZE . '" style="width: 100%"') . HTML::hiddenSessionIDField() . '</form>';
 }
開發者ID:digitaldevelopers,項目名稱:oscommerce,代碼行數:12,代碼來源:Controller.php

示例2: getBatchPagesPullDownMenu

    public static function getBatchPagesPullDownMenu($batch_keyword = 'page', $total, $parameters = null) {
      $batch_number = (isset($_GET[$batch_keyword]) && is_numeric($_GET[$batch_keyword]) ? $_GET[$batch_keyword] : 1);
      $number_of_pages = ceil($total / MAX_DISPLAY_SEARCH_RESULTS);

      $pages_array = array();

      for ( $i = 1; $i <= $number_of_pages; $i++ ) {
        $pages_array[] = array('id' => $i,
                               'text' => $i);
      }

      $hidden_parameter = '';

      if ( !empty($parameters) ) {
        $parameters = explode('&', $parameters);

        foreach ( $parameters as $parameter ) {
          $keys = explode('=', $parameter, 2);

          if ( $keys[0] != $batch_keyword ) {
            $hidden_parameter .= HTML::hiddenField($keys[0], (isset($keys[1]) ? $keys[1] : ''));
          }
        }
      }

      $string = '<form action="' . OSCOM::getLink(null, null) . '" action="get">' . $hidden_parameter .
                sprintf(OSCOM::getDef('result_set_current_page'), HTML::selectMenu($batch_keyword, $pages_array, $batch_number, 'onchange="this.form.submit();"'), $number_of_pages) .
                HTML::hiddenSessionIDField() . '</form>';

      return $string;
    }
開發者ID:haraldpdl,項目名稱:oscommerce,代碼行數:31,代碼來源:PDO.php

示例3: array

    if (isset($_GET['Manufacturers']) && !empty($_GET['Manufacturers'])) {
        $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from :table_products p, :table_products_to_categories p2c, :table_categories c, :table_categories_description cd, :table_templates_boxes tb, :table_product_attributes pa where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int) $OSCOM_Language->getID() . "' and tb.code = 'Manufacturers' and tb.id = pa.id and pa.products_id = p.products_id and pa.value = '" . (int) $_GET['Manufacturers'] . "' order by cd.categories_name";
    } else {
        $filterlist_sql = "select distinct m.manufacturers_id as id, m.manufacturers_name as name from :table_products p, :table_products_to_categories p2c, :table_manufacturers m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . $OSCOM_Category->getID() . "' order by m.manufacturers_name";
    }
    $Qfilterlist = $OSCOM_PDO->query($filterlist_sql);
    $Qfilterlist->execute();
    $filter_result = $Qfilterlist->fetchAll();
    if (count($filter_result) > 1) {
        echo '<p><form name="filter" action="' . OSCOM::getLink() . '" method="get">' . $OSCOM_Language->get('filter_show') . '&nbsp;';
        if (isset($_GET['Manufacturers']) && !empty($_GET['Manufacturers'])) {
            echo HTML::hiddenField('Manufacturers', $_GET['Manufacturers']);
            $options = array(array('id' => '', 'text' => OSCOM::getDef('filter_all_categories')));
        } else {
            echo HTML::hiddenField('cPath', $OSCOM_Category->getPath());
            $options = array(array('id' => '', 'text' => OSCOM::getDef('filter_all_manufacturers')));
        }
        if (isset($_GET['sort'])) {
            echo HTML::hiddenField('sort', $_GET['sort']);
        }
        foreach ($filter_result as $f) {
            $options[] = array('id' => $f['id'], 'text' => $f['name']);
        }
        echo HTML::selectMenu('filter', $options, isset($_GET['filter']) ? $_GET['filter'] : null, 'onchange="this.form.submit()"') . HTML::hiddenSessionIDField() . '</form></p>' . "\n";
    }
}
if (isset($_GET['Manufacturers']) && !empty($_GET['Manufacturers'])) {
    $OSCOM_Products->setManufacturer($_GET['Manufacturers']);
}
$products_listing = $OSCOM_Products->execute();
require OSCOM::BASE_DIRECTORY . 'Core/Site/Shop/Application/Products/pages/product_listing.php';
開發者ID:digitaldevelopers,項目名稱:oscommerce,代碼行數:31,代碼來源:product_listing.php

示例4: date

}
echo HTML::selectMenu('manufacturer', $manufacturers_array);
?>

      </li>
      <li><?php 
echo HTML::label(OSCOM::getDef('field_search_price_from'), 'pfrom') . HTML::inputField('pfrom');
?>
</li>
      <li><?php 
echo HTML::label(OSCOM::getDef('field_search_price_to'), 'pto') . HTML::inputField('pto');
?>
</li>
      <li><?php 
echo HTML::label(OSCOM::getDef('field_search_date_from'), 'datefrom_days') . HTML::dateSelectMenu('datefrom', null, false, null, null, date('Y') - $OSCOM_Search->getMinYear(), 0);
?>
</li>
      <li><?php 
echo HTML::label(OSCOM::getDef('field_search_date_to'), 'dateto_days') . HTML::dateSelectMenu('dateto', null, null, null, null, date('Y') - $OSCOM_Search->getMaxYear(), 0);
?>
</li>
    </ol>
  </div>
</div>

<?php 
echo HTML::hiddenSessionIDField();
?>

</form>
開發者ID:digitaldevelopers,項目名稱:oscommerce,代碼行數:30,代碼來源:main.php

示例5: testHiddenSessionIDField

 public function testHiddenSessionIDField()
 {
     $OSCOM_Session = Registry::get('Session');
     if ($OSCOM_Session->hasStarted() && strlen(SID) > 0) {
         $this->assertEquals('<input type="hidden" name="' . $OSCOM_Session->getName() . '" value="' . $OSCOM_Session->getID() . '" />', HTML::hiddenSessionIDField());
     } else {
         $this->assertEquals('', HTML::hiddenSessionIDField());
     }
 }
開發者ID:digitaldevelopers,項目名稱:oscommerce,代碼行數:9,代碼來源:HTMLTest.php


注:本文中的osCommerce\OM\Core\HTML::hiddenSessionIDField方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。