本文整理汇总了PHP中osCommerce\OM\Core\HTML::hiddenField方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML::hiddenField方法的具体用法?PHP HTML::hiddenField怎么用?PHP HTML::hiddenField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osCommerce\OM\Core\HTML
的用法示例。
在下文中一共展示了HTML::hiddenField方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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>';
}
示例2: in
<p><?php
echo OSCOM::getDef('introduction_batch_delete_languages');
?>
</p>
<?php
$check_default_flag = false;
$Qlanguages = $OSCOM_PDO->query('select languages_id, name, code from :table_languages where languages_id in ("' . implode('", "', array_unique(array_filter(array_slice($_POST['batch'], 0, MAX_DISPLAY_SEARCH_RESULTS), 'is_numeric'))) . '") order by name');
$Qlanguages->execute();
$names_string = '';
while ($Qlanguages->fetch()) {
if ($Qlanguages->value('code') == DEFAULT_LANGUAGE) {
$check_default_flag = true;
}
$names_string .= HTML::hiddenField('batch[]', $Qlanguages->valueInt('languages_id')) . '<b>' . $Qlanguages->value('name') . ' (' . $Qlanguages->value('code') . ')</b>, ';
}
if (!empty($names_string)) {
$names_string = substr($names_string, 0, -2);
}
echo '<p>' . $names_string . '</p>';
if ($check_default_flag === false) {
echo '<p>' . HTML::button(array('priority' => 'primary', 'icon' => 'trash', 'title' => OSCOM::getDef('button_delete'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))) . '</p>';
} else {
echo '<p><b>' . OSCOM::getDef('introduction_delete_language_invalid') . '</b></p>';
echo '<p>' . HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'primary', 'icon' => 'triangle-1-w', 'title' => OSCOM::getDef('button_back'))) . '</p>';
}
?>
</form>
</div>
示例3:
while ($Qcfg->fetch()) {
if (strlen($Qcfg->value('set_function')) > 0) {
$value_field = Configuration::callUserFunc($Qcfg->value('set_function'), $Qcfg->value('configuration_value'), $Qcfg->value('configuration_key'));
} else {
$value_field = HTML::inputField('configuration[' . $Qcfg->value('configuration_key') . ']', $Qcfg->value('configuration_value'));
}
?>
<p><label for="configuration[<?php
echo $Qcfg->valueProtected('configuration_key');
?>
]"><?php
echo $Qcfg->valueProtected('configuration_title');
?>
</label><?php
echo $value_field . HTML::hiddenField('batch[]', $Qcfg->valueInt('configuration_id'));
?>
</p>
<p><?php
echo $Qcfg->value('configuration_description');
?>
</p>
<?php
}
?>
</fieldset>
<p><?php
示例4:
<?php
if ($OSCOM_Shipping->numberOfQuotes() > 1 || count($quotes['methods']) > 1) {
?>
<td><?php
echo $OSCOM_Currencies->displayPrice($methods['cost'], $quotes['tax_class_id']);
?>
</td>
<td align="right"><?php
echo HTML::radioField('shipping_mod_sel', $quotes['id'] . '_' . $methods['id'], $OSCOM_ShoppingCart->getShippingMethod('id'));
?>
</td>
<?php
} else {
?>
<td align="right" colspan="2"><?php
echo $OSCOM_Currencies->displayPrice($methods['cost'], $quotes['tax_class_id']) . HTML::hiddenField('shipping_mod_sel', $quotes['id'] . '_' . $methods['id']);
?>
</td>
<?php
}
?>
<td width="10"> </td>
</tr>
<?php
$radio_buttons++;
}
}
?>
</table></td>
</tr>
<?php
示例5: ObjectInfo
</h3>
<form name="lDefineBatch" class="dataForm" action="<?php
echo OSCOM::getLink(null, null, 'BatchSaveDefinitions&Process&id=' . $_GET['id'] . '&group=' . $_GET['group']);
?>
" method="post">
<p><?php
echo OSCOM::getDef('introduction_edit_language_definitions');
?>
</p>
<fieldset>
<?php
foreach ($_POST['batch'] as $id) {
$OSCOM_ObjectInfo = new ObjectInfo(Languages::getDefinition($id));
echo '<p><label for="def[' . $OSCOM_ObjectInfo->getProtected('definition_key') . ']">' . $OSCOM_ObjectInfo->getProtected('definition_key') . '</label>' . HTML::textareaField('def[' . $OSCOM_ObjectInfo->get('definition_key') . ']', $OSCOM_ObjectInfo->get('definition_value')) . HTML::hiddenField('batch[]', $OSCOM_ObjectInfo->getInt('id')) . '</p>';
}
?>
</fieldset>
<p><?php
echo HTML::button(array('priority' => 'primary', 'icon' => 'check', 'title' => OSCOM::getDef('button_save'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(null, null, 'id=' . $_GET['id'] . '&group=' . $_GET['group']), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>
</p>
</form>
</div>
示例6: 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') . ' ';
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';
示例7: 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;
}
示例8: in
<?php
/**
* osCommerce Online Merchant
*
* @copyright Copyright (c) 2011 osCommerce; http://www.oscommerce.com
* @license BSD License; http://www.oscommerce.com/bsdlicense.txt
*/
use osCommerce\OM\Core\HTML;
use osCommerce\OM\Core\OSCOM;
$Qcountries = $OSCOM_PDO->query('select countries_id, countries_name from :table_countries where countries_id in ("' . implode('", "', array_unique(array_filter(array_slice($_POST['batch'], 0, MAX_DISPLAY_SEARCH_RESULTS), 'is_numeric'))) . '") order by countries_name');
$Qcountries->execute();
$names_string = '';
while ($Qcountries->fetch()) {
$names_string .= HTML::hiddenField('batch[]', $Qcountries->valueInt('countries_id')) . '<b>' . $Qcountries->valueProtected('countries_name') . '</b>, ';
}
if (!empty($names_string)) {
$names_string = substr($names_string, 0, -2);
}
?>
<h1><?php
echo $OSCOM_Template->getIcon(32) . HTML::link(OSCOM::getLink(), $OSCOM_Template->getPageTitle());
?>
</h1>
<?php
if ($OSCOM_MessageStack->exists()) {
echo $OSCOM_MessageStack->get();
}
?>
示例9: prepareDB
</table>
<p align="right"><?php
echo HTML::button(array('priority' => 'primary', 'icon' => 'triangle-1-e', 'title' => OSCOM::getDef('button_continue'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(null, OSCOM::getDefaultSiteApplication()), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>
</p>
<?php
foreach ($_POST as $key => $value) {
if ($key != 'x' && $key != 'y') {
if (is_array($value)) {
for ($i = 0, $n = count($value); $i < $n; $i++) {
echo HTML::hiddenField($key . '[]', $value[$i]);
}
} else {
echo HTML::hiddenField($key, $value);
}
}
}
?>
</form>
</div>
</div>
<script type="text/javascript">
$("#installForm").submit(function(e) {
if ( formSuccess == false ) {
e.preventDefault();
prepareDB();
示例10:
?>
</h1>
<?php
if ($OSCOM_MessageStack->exists('Search')) {
echo $OSCOM_MessageStack->get('Search');
}
?>
<form name="search" action="<?php
echo OSCOM::getLink(null, null, null, 'NONSSL', false);
?>
" method="get" onsubmit="return check_form(this);">
<?php
echo HTML::hiddenField('Search', null);
?>
<div class="moduleBox">
<h6><?php
echo OSCOM::getDef('search_criteria_title');
?>
</h6>
<div class="content">
<?php
echo HTML::inputField('Q', null, 'style="width: 99%;"');
?>
</div>
</div>
示例11: on
echo HTML::icon('trash.png') . ' ' . OSCOM::getDef('action_heading_batch_delete_zone_entries');
?>
</h3>
<form name="zDeleteBatch" class="dataForm" action="<?php
echo OSCOM::getLink(null, null, 'BatchDeleteEntries&Process&id=' . $_GET['id']);
?>
" method="post">
<p><?php
echo OSCOM::getDef('introduction_batch_delete_zone_entries');
?>
</p>
<?php
$Qentries = $OSCOM_PDO->query('select z2gz.association_id, z2gz.zone_country_id, c.countries_name, z2gz.zone_id, z.zone_name from :table_zones_to_geo_zones z2gz left join :table_countries c on (z2gz.zone_country_id = c.countries_id) left join :table_zones z on (z2gz.zone_id = z.zone_id) where z2gz.association_id in ("' . implode('", "', array_unique(array_filter(array_slice($_POST['batch'], 0, MAX_DISPLAY_SEARCH_RESULTS), 'is_numeric'))) . '") order by c.countries_name, z.zone_name');
$Qentries->execute();
$names_string = '';
while ($Qentries->fetch()) {
$names_string .= HTML::hiddenField('batch[]', $Qentries->valueInt('association_id')) . '<b>' . ($Qentries->valueInt('zone_country_id') > 0 ? $Qentries->value('countries_name') : OSCOM::getDef('all_countries')) . ': ' . ($Qentries->valueInt('zone_id') > 0 ? $Qentries->value('zone_name') : OSCOM::getDef('all_zones')) . '</b>, ';
}
if (!empty($names_string)) {
$names_string = substr($names_string, 0, -2) . HTML::hiddenField('subaction', 'confirm');
}
echo '<p>' . $names_string . '</p>';
echo '<p>' . HTML::button(array('priority' => 'primary', 'icon' => 'trash', 'title' => OSCOM::getDef('button_delete'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(null, null, 'id=' . $_GET['id']), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))) . '</p>';
?>
</form>
</div>
示例12:
<?php
}
}
if (isset($_SESSION['comments']) && !empty($_SESSION['comments'])) {
?>
<div class="moduleBox">
<h6><?php
echo '<b>' . OSCOM::getDef('order_comments_title') . '</b> ' . HTML::link(OSCOM::getLink(null, 'Checkout', 'Payment', 'SSL'), '<span class="orderEdit">' . OSCOM::getDef('order_text_edit_title') . '</span>');
?>
</h6>
<div class="content">
<?php
echo nl2br(HTML::outputProtected($_SESSION['comments'])) . HTML::hiddenField('comments', $_SESSION['comments']);
?>
</div>
</div>
<?php
}
?>
<div class="submitFormButtons" style="text-align: right;">
<?php
if ($OSCOM_ShoppingCart->hasBillingMethod() && $OSCOM_PaymentModule->hasGateway()) {
$form_action_url = $OSCOM_PaymentModule->getGatewayURL();
} else {
$form_action_url = OSCOM::getLink(null, null, 'Process', 'SSL');
示例13:
if ($OSCOM_ObjectInfo->get('code') != DEFAULT_CURRENCY) {
?>
<p><label for="default"><?php
echo OSCOM::getDef('field_set_default');
?>
</label><?php
echo HTML::checkboxField('default');
?>
</p>
<?php
}
?>
</fieldset>
<p>
<?php
if ($OSCOM_ObjectInfo->get('code') == DEFAULT_CURRENCY) {
echo HTML::hiddenField('is_default', 'true');
}
echo HTML::button(array('priority' => 'primary', 'icon' => 'check', 'title' => OSCOM::getDef('button_save'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>
</p>
</form>
</div>
示例14: foreach
<p><label for="products_model"><?php echo OSCOM::getDef('field_model'); ?></label><?php echo HTML::inputField('products_model', (!$new_product ? $OSCOM_ObjectInfo->get('products_model') : null)); ?></p>
<p><label for="products_quantity"><?php echo OSCOM::getDef('field_quantity'); ?></label><?php echo HTML::inputField('products_quantity', (!$new_product ? $OSCOM_ObjectInfo->get('products_quantity') : null)); ?></p>
<p><label for="products_weight"><?php echo OSCOM::getDef('field_weight'); ?></label><?php echo HTML::inputField('products_weight', (!$new_product ? $OSCOM_ObjectInfo->get('products_weight') : null)) . HTML::selectMenu('products_weight_class', $OSCOM_Application->getWeightClassesList(), (!$new_product ? $OSCOM_ObjectInfo->get('products_weight_class') : SHIPPING_WEIGHT_UNIT)); ?></p>
<?php
}
?>
</fieldset>
</td>
</tr>
</table>
<?php
if ( !$new_product && ($OSCOM_ObjectInfo->getInt('has_children') === 1) ) {
echo HTML::hiddenField('products_tax_class_id', 0) . HTML::hiddenField('products_price', 0) . HTML::hiddenField('products_model') . HTML::hiddenField('products_quantity', 0), HTML::hiddenField('products_weight', 0), HTML::hiddenField('products_weight_class', 0);
}
?>
<h4><?php echo OSCOM::getDef('subsection_attributes'); ?></h4>
<fieldset>
<?php
$installed = ProductAttributes::getInstalled();
foreach ( $installed['entries'] as $pa ) {
$pamo = 'osCommerce\\OM\\Core\\Site\\Admin\\Module\\ProductAttribute\\' . $pa['code'];
$pam = new $pamo();
echo '<p><label for="pa_' . $pa['code'] . '">' . $pa['title'] . '</label>' . $pam->getInputField(!$new_product && isset($attributes[$pa['id']]) ? $attributes[$pa['id']] : null) . '</p>';
示例15: ObjectInfo
echo OSCOM::getLink(null, null, 'BatchDeleteDefinitions&Process&id=' . $_GET['id'] . '&group=' . $_GET['group']);
?>
" method="post">
<p><?php
echo OSCOM::getDef('introduction_batch_delete_language_definitions');
?>
</p>
<fieldset>
<?php
$names_string = '';
foreach ($_POST['batch'] as $id) {
$OSCOM_ObjectInfo = new ObjectInfo(Languages::getDefinition($id));
$names_string .= HTML::hiddenField('batch[]', $OSCOM_ObjectInfo->getInt('id')) . '<b>' . $OSCOM_ObjectInfo->getProtected('definition_key') . '</b><br />';
}
if (!empty($names_string)) {
$names_string = substr($names_string, 0, -6);
}
echo '<p>' . $names_string . '</p>';
?>
</fieldset>
<p><?php
echo HTML::button(array('priority' => 'primary', 'icon' => 'trash', 'title' => OSCOM::getDef('button_delete'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(null, null, 'id=' . $_GET['id'] . '&group=' . $_GET['group']), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>
</p>
</form>