本文整理汇总了PHP中osCommerce\OM\Core\HTML::selectMenu方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML::selectMenu方法的具体用法?PHP HTML::selectMenu怎么用?PHP HTML::selectMenu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osCommerce\OM\Core\HTML
的用法示例。
在下文中一共展示了HTML::selectMenu方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: osc_cfg_set_countries_pulldown_menu
function osc_cfg_set_countries_pulldown_menu($default, $key = null)
{
$name = !empty($key) ? 'configuration[' . $key . ']' : 'configuration_value';
$countries_array = array();
foreach (Address::getCountries() as $country) {
$countries_array[] = array('id' => $country['id'], 'text' => $country['name']);
}
return HTML::selectMenu($name, $countries_array, $default);
}
示例2: osc_cfg_set_weight_classes_pulldown_menu
function osc_cfg_set_weight_classes_pulldown_menu($default, $key = null)
{
$name = empty($key) ? 'configuration_value' : 'configuration[' . $key . ']';
$weight_class_array = array();
foreach (Weight::getClasses() as $class) {
$weight_class_array[] = array('id' => $class['id'], 'text' => $class['title']);
}
return HTML::selectMenu($name, $weight_class_array, $default);
}
示例3: 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>';
}
示例4: osc_cfg_set_zone_classes_pull_down_menu
function osc_cfg_set_zone_classes_pull_down_menu($default, $key = null)
{
$OSCOM_PDO = Registry::get('PDO');
$name = empty($key) ? 'configuration_value' : 'configuration[' . $key . ']';
$zone_class_array = array(array('id' => '0', 'text' => OSCOM::getDef('parameter_none')));
$Qzones = $OSCOM_PDO->query('select geo_zone_id, geo_zone_name from :table_geo_zones order by geo_zone_name');
$Qzones->execute();
while ($Qzones->fetch()) {
$zone_class_array[] = array('id' => $Qzones->valueInt('geo_zone_id'), 'text' => $Qzones->value('geo_zone_name'));
}
return HTML::selectMenu($name, $zone_class_array, $default);
}
示例5: osc_cfg_set_order_statuses_pull_down_menu
function osc_cfg_set_order_statuses_pull_down_menu($default, $key = null)
{
$OSCOM_PDO = Registry::get('PDO');
$OSCOM_Language = Registry::get('Language');
$name = empty($key) ? 'configuration_value' : 'configuration[' . $key . ']';
$statuses_array = array(array('id' => '0', 'text' => OSCOM::getDef('default_entry')));
$Qstatuses = $OSCOM_PDO->prepare('select orders_status_id, orders_status_name from :table_orders_status where language_id = :language_id order by orders_status_name');
$Qstatuses->bindInt(':language_id', $OSCOM_Language->getID());
$Qstatuses->execute();
while ($Qstatuses->fetch()) {
$statuses_array[] = array('id' => $Qstatuses->valueInt('orders_status_id'), 'text' => $Qstatuses->value('orders_status_name'));
}
return HTML::selectMenu($name, $statuses_array, $default);
}
示例6: getInputField
public function getInputField($value) {
$OSCOM_PDO = Registry::get('PDO');
$array = array(array('id' => '',
'text' => OSCOM::getDef('none')));
$Qm = $OSCOM_PDO->query('select manufacturers_id, manufacturers_name from :table_manufacturers order by manufacturers_name');
while ( $Qm->fetch() ) {
$array[] = array('id' => $Qm->valueInt('manufacturers_id'),
'text' => $Qm->value('manufacturers_name'));
}
return HTML::selectMenu('attributes[' . self::getID() . ']', $array, $value);
}
示例7: getInputField
public function getInputField($value) {
$OSCOM_Language = Registry::get('Language');
$OSCOM_PDO = Registry::get('PDO');
$array = array();
$Qstatus = $OSCOM_PDO->prepare('select id, title from :table_shipping_availability where languages_id = :languages_id order by title');
$Qstatus->bindInt(':languages_id', $OSCOM_Language->getID());
$Qstatus->execute();
while ( $Qstatus->fetch() ) {
$array[] = array('id' => $Qstatus->valueInt('id'),
'text' => $Qstatus->value('title'));
}
return HTML::selectMenu('attributes[' . self::getID() . ']', $array, $value);
}
示例8: array
<form name="lImport" class="dataForm" action="<?php
echo OSCOM::getLink(null, null, 'Import&Process');
?>
" method="post">
<p><?php
echo OSCOM::getDef('introduction_import_language');
?>
</p>
<fieldset>
<p><label for="language_import"><?php
echo OSCOM::getDef('field_language_selection');
?>
</label><?php
echo HTML::selectMenu('language_import', $languages_array);
?>
</p>
<p><label for="import_type"><?php
echo OSCOM::getDef('field_import_type');
?>
</label><br /><?php
echo HTML::radioField('import_type', array(array('id' => 'add', 'text' => OSCOM::getDef('only_add_new_records')), array('id' => 'update', 'text' => OSCOM::getDef('only_update_existing_records')), array('id' => 'replace', 'text' => OSCOM::getDef('replace_all'))), 'add', null, '<br />');
?>
</p>
</fieldset>
<p><?php
echo HTML::button(array('priority' => 'primary', 'icon' => 'triangle-1-se', 'title' => OSCOM::getDef('button_import'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>
</p>
示例9:
<td class="inputDescription"><?php echo OSCOM::getDef('param_database_username_description'); ?></td>
</tr>
<tr>
<td class="inputField"><?php echo OSCOM::getDef('param_database_password') . '<br />' . HTML::inputField('DB_SERVER_PASSWORD', null, 'class="text"'); ?></td>
<td class="inputDescription"><?php echo OSCOM::getDef('param_database_password_description'); ?></td>
</tr>
<tr>
<td class="inputField"><?php echo OSCOM::getDef('param_database_name') . '<br />' . HTML::inputField('DB_DATABASE', null, 'class="text"'); ?></td>
<td class="inputDescription"><?php echo OSCOM::getDef('param_database_name_description'); ?></td>
</tr>
<tr>
<td class="inputField"><?php echo OSCOM::getDef('param_database_port') . '<br />' . HTML::inputField('DB_SERVER_PORT', null, 'class="text"'); ?></td>
<td class="inputDescription"><?php echo OSCOM::getDef('param_database_port_description'); ?></td>
</tr>
<tr>
<td class="inputField"><?php echo OSCOM::getDef('param_database_type') . '<br />' . HTML::selectMenu('DB_DATABASE_CLASS', $db_table_types); ?></td>
<td class="inputDescription"><?php echo OSCOM::getDef('param_database_type_description'); ?></td>
</tr>
<tr>
<td class="inputField"><?php echo OSCOM::getDef('param_database_prefix') . '<br />' . HTML::inputField('DB_TABLE_PREFIX', 'osc_', 'class="text"'); ?></td>
<td class="inputDescription"><?php echo OSCOM::getDef('param_database_prefix_description'); ?></td>
</tr>
</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>
</form>
</div>
</div>
<script type="text/javascript">
示例10: array
" method="post">
<p><?php
echo OSCOM::getDef('introduction_export_language');
?>
</p>
<fieldset>
<p>(<a href="javascript:selectAllFromPullDownMenu('groups');"><u><?php
echo OSCOM::getDef('select_all');
?>
</u></a> | <a href="javascript:resetPullDownMenuSelection('groups');"><u><?php
echo OSCOM::getDef('select_none');
?>
</u></a>)<br /><?php
echo HTML::selectMenu('groups[]', $groups_array, array('account', 'checkout', 'general', 'index', 'info', 'order', 'products', 'search'), 'id="groups" size="10" multiple="multiple"');
?>
</p>
<p><?php
echo HTML::checkboxField('include_data', array(array('id' => '', 'text' => OSCOM::getDef('field_export_with_data'))), true);
?>
</p>
</fieldset>
<p><?php
echo HTML::button(array('priority' => 'primary', 'icon' => 'triangle-1-nw', 'title' => OSCOM::getDef('button_export'))) . ' ' . HTML::button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel')));
?>
</p>
</form>
示例11:
<form name="rEdit" class="dataForm" action="<?php
echo OSCOM::getLink(null, null, 'EntrySave&Process&id=' . $_GET['id'] . '&rID=' . $OSCOM_ObjectInfo->getInt('tax_rates_id'));
?>
" method="post">
<p><?php
echo OSCOM::getDef('introduction_edit_tax_rate');
?>
</p>
<fieldset>
<p><label for="tax_zone_id"><?php
echo OSCOM::getDef('field_tax_rate_zone_group');
?>
</label><?php
echo HTML::selectMenu('tax_zone_id', $zones_array, $OSCOM_ObjectInfo->getInt('geo_zone_id'));
?>
</p>
<p><label for="tax_rate"><?php
echo OSCOM::getDef('field_tax_rate');
?>
</label><?php
echo HTML::inputField('tax_rate', $OSCOM_ObjectInfo->get('tax_rate'));
?>
</p>
<p><label for="tax_description"><?php
echo OSCOM::getDef('field_tax_rate_description');
?>
</label><?php
echo HTML::inputField('tax_description', $OSCOM_ObjectInfo->get('tax_description'));
?>
示例12:
<form name="rNew" class="dataForm" action="<?php
echo OSCOM::getLink(null, null, 'EntrySave&Process&id=' . $_GET['id']);
?>
" method="post">
<p><?php
echo OSCOM::getDef('introduction_new_tax_rate');
?>
</p>
<fieldset>
<p><label for="tax_zone_id"><?php
echo OSCOM::getDef('field_tax_rate_zone_group');
?>
</label><?php
echo HTML::selectMenu('tax_zone_id', $zones_array);
?>
</p>
<p><label for="tax_rate"><?php
echo OSCOM::getDef('field_tax_rate');
?>
</label><?php
echo HTML::inputField('tax_rate');
?>
</p>
<p><label for="tax_description"><?php
echo OSCOM::getDef('field_tax_rate_description');
?>
</label><?php
echo HTML::inputField('tax_description');
?>
示例13: 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';
示例14: timeZoneSelectMenu
/**
* Generate a time zone selection menu
*
* @param $name string The name of the selection field
* @param $default The default value
* @return string
* @since v3.0.1
*/
public static function timeZoneSelectMenu($name, $default = null)
{
if (!isset($default)) {
$default = date_default_timezone_get();
}
$result = array();
foreach (DateTime::getTimeZones() as $zone => $zones_array) {
foreach ($zones_array as $key => $value) {
$result[] = array('id' => $key, 'text' => $value, 'group' => $zone);
}
}
return HTML::selectMenu($name, $result, $default);
}
示例15: array
<td width="70%" valign="top">
<h4><?php echo OSCOM::getDef('subsection_price'); ?></h4>
<fieldset>
<p><label for="variants_price_tax_class"><?php echo OSCOM::getDef('field_tax_class'); ?></label><?php echo HTML::selectMenu('variants_price_tax_class', $OSCOM_Application->getTaxClassesList(), null, 'onchange="updateGross(\'variants_price\');"'); ?></p>
<p><label for="variants_price"><?php echo OSCOM::getDef('field_price_net'); ?></label><?php echo HTML::inputField('variants_price', null, 'onkeyup="updateGross(\'variants_price\')"'); ?></p>
<p><label for="variants_price_gross"><?php echo OSCOM::getDef('field_price_gross'); ?></label><?php echo HTML::inputField('variants_price_gross', null, 'onkeyup="updateNet(\'variants_price\')"'); ?></p>
</fieldset>
<h4><?php echo OSCOM::getDef('subsection_data'); ?></h4>
<fieldset>
<p id="vstatus"><label for="variants_status"><?php echo OSCOM::getDef('field_status'); ?></label><?php echo HTML::radioField('variants_status', array(array('id' => '1', 'text' => OSCOM::getDef('status_enabled')), array('id' => '0', 'text' => OSCOM::getDef('status_disabled')))); ?></p>
<p><label for="variants_model"><?php echo OSCOM::getDef('field_model'); ?></label><?php echo HTML::inputField('variants_model', null); ?></p>
<p><label for="variants_quantity"><?php echo OSCOM::getDef('field_quantity'); ?></label><?php echo HTML::inputField('variants_quantity', null); ?></p>
<p><label for="variants_weight"><?php echo OSCOM::getDef('field_weight'); ?></label><?php echo HTML::inputField('variants_weight', null, 'size="6"'). HTML::selectMenu('variants_weight_class', $OSCOM_Application->getWeightClassesList(), SHIPPING_WEIGHT_UNIT); ?></p>
<p><label for="variants_default"><?php echo OSCOM::getDef('field_default'); ?></label><?php echo HTML::checkboxField('variants_default'); ?></p>
</fieldset>
<script>
$(function() {
$('#vstatus').buttonset();
});
</script>
</td>
</tr>
</table>
<p id="variantSubmitButtonsNew"><?php echo HTML::button(array('type' => 'button', 'params' => 'onclick="processVariantForm();"', 'priority' => 'primary', 'icon' => 'plus', 'title' => OSCOM::getDef('button_add'))) . ' ' . HTML::button(array('type' => 'button', 'params' => 'onclick="closeVariantForm();"', 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
<p id="variantSubmitButtonsEdit"><?php echo HTML::button(array('type' => 'button', 'params' => 'data-vButtonType="henrysBucket"', 'priority' => 'primary', 'icon' => 'arrowrefresh-1-n', 'title' => OSCOM::getDef('button_update'))) . ' ' . HTML::button(array('type' => 'button', 'params' => 'onclick="closeVariantForm();"', 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>