本文整理汇总了PHP中vmCommonHTML::selectList方法的典型用法代码示例。如果您正苦于以下问题:PHP vmCommonHTML::selectList方法的具体用法?PHP vmCommonHTML::selectList怎么用?PHP vmCommonHTML::selectList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vmCommonHTML
的用法示例。
在下文中一共展示了vmCommonHTML::selectList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
if (!isset($VM_MODULES_FORCE_HTTPS)) {
$VM_MODULES_FORCE_HTTPS = array('account', 'checkout');
}
if (!isset($VM_CHECKOUT_MODULES)) {
$VM_CHECKOUT_MODULES = array('CHECK_OUT_GET_SHIPPING_ADDR' => array('order' => 1, 'enabled' => 1), 'CHECK_OUT_GET_SHIPPING_METHOD' => array('order' => 2, 'enabled' => 1), 'CHECK_OUT_GET_PAYMENT_METHOD' => array('order' => 3, 'enabled' => 1), 'CHECK_OUT_GET_FINAL_CONFIRMATION' => array('order' => 4, 'enabled' => 1));
}
$option = empty($option) ? vmGet($_REQUEST, 'option', 'com_virtuemart') : $option;
// Compose the Access DropDown List, for the first time used for setting Price Acess
$fieldname = 'group_id';
if ($_VERSION->PRODUCT == 'Joomla!' && $_VERSION->RELEASE >= 1.5) {
$fieldname = 'id';
}
$db->query('SELECT `' . $fieldname . '` FROM #__core_acl_aro_groups WHERE name=\'' . VM_PRICE_ACCESS_LEVEL . '\'');
$db->next_record();
$gtree = $acl->get_group_children_tree(null, 'USERS', false);
$access_group_list = vmCommonHTML::selectList($gtree, 'conf_VM_PRICE_ACCESS_LEVEL', 'size="4"', 'value', 'text', $db->f($fieldname), true);
$title = ' <img src="' . VM_THEMEURL . 'images/administration/header/icon-48-config.png" align="middle" border="0" alt="' . $VM_LANG->_('PHPSHOP_CONFIG') . '" /> ';
$title .= $VM_LANG->_('PHPSHOP_CONFIG');
//First create the object and let it print a form heading
$formObj =& new formFactory($title);
//Then Start the form
$formObj->startForm();
$ps_html->writableIndicator($mosConfig_absolute_path . '/administrator/components/com_virtuemart/virtuemart.cfg.php');
$tabs = new vmTabPanel(1, 1, "vmconfiguration");
$tabs->startPane("content-pane");
$tabs->startTab($VM_LANG->_('PHPSHOP_ADMIN_CFG_GLOBAL'), "global-page");
?>
<br />
<table class="adminlist"><tr><td>
<fieldset style="width:48%;float:left;">
示例2: array
$ex_groups = array();
}
} else {
$ex_groups = array();
}
$gtree = $acl->get_group_children_tree(null, 'USERS', false);
// remove users 'above' me
$i = 0;
while ($i < count($gtree)) {
if (in_array($gtree[$i]->value, $ex_groups)) {
array_splice($gtree, $i, 1);
} else {
$i++;
}
}
$lists['gid'] = vmCommonHTML::selectList($gtree, 'gid', 'size="10"', 'value', 'text', $row->gid, true);
}
}
// build the html select list
$lists['block'] = vmCommonHTML::yesnoRadioList('block', 'class="inputbox" size="1"', 'value', 'text', $row->block);
// build the html select list
$lists['sendEmail'] = vmCommonHTML::yesnoRadioList('sendEmail', 'class="inputbox" size="1"', 'value', 'text', $row->sendEmail);
$canBlockUser = $acl->acl_check('administration', 'edit', 'users', $my->usertype, 'user properties', 'block_user');
$canEmailEvents = $acl->acl_check('workflow', 'email_events', 'users', $acl->get_group_name($row->gid, 'ARO'));
// Get the user parameters
if (vmIsJoomla('1.5')) {
require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_users' . DS . 'users.class.php';
$user =& JUser::getInstance($user_id);
$params = $user->getParameters(true);
} elseif (file_exists($mosConfig_absolute_path . '/administrator/components/com_users/users.class.php')) {
require_once $mosConfig_absolute_path . '/administrator/components/com_users/users.class.php';
示例3: listUserFields
//.........这里部分代码省略.........
echo '<input type="checkbox" name="' . $field->name . '" id="' . $field->name . '_field" value="1" ' . ($db->sf($field->name) ? 'checked="checked"' : '') . '/>';
break;
case 'age_verification':
$year = vmRequest::getInt('birthday_selector_year', date('Y'));
if ($db->f($field->name)) {
$birthday = $db->f($field->name);
$date_array = explode('-', $birthday);
$year = $date_array[0];
$month = $date_array[1];
$day = $date_array[2];
}
ps_html::list_days('birthday_selector_day', vmRequest::getInt('birthday_selector_day', @$day));
ps_html::list_month('birthday_selector_month', vmRequest::getInt('birthday_selector_month', @$month));
ps_html::list_year('birthday_selector_year', $year, $year - 100, $year);
break;
case 'captcha':
if (file_exists($mosConfig_absolute_path . '/administrator/components/com_securityimages/client.php')) {
include $mosConfig_absolute_path . '/administrator/components/com_securityimages/client.php';
// Note that this package name must be used on the validation side too! If both are not equal, validation will fail
$packageName = 'securityVMRegistrationCheck';
echo insertSecurityImage($packageName);
echo getSecurityImageText($packageName);
} else {
if (file_exists($mosConfig_absolute_path . '/plugins/system/securityimages.php')) {
echo "<script type=\"text/javascript\" src=\"" . JURI::root() . "/components/com_securityimages/js/securityImages.js\"></script>";
echo "<img id='captchaSecurityImages' name='captchaSecurityImages' src=\"" . JURI::root() . "/index.php?option=com_securityimages&task=displayCaptcha\" />";
echo "<a href=\"javascript:askNewSecurityImages('captchaSecurityImages');\">";
echo "<img src=\"" . JURI::root() . "/components/com_securityimages/buttons/reload.gif\" id=\"securityImagesContactCaptchaReload\" name=\"securityImagesContactCaptchaReload\" border=\"0\">";
echo "</a>";
echo "<input type=\"text\" name=\"securityVMRegistrationCheck_try\" />";
}
}
break;
// Begin of a fallthrough
// Begin of a fallthrough
case 'multicheckbox':
case 'select':
case 'multiselect':
case 'radio':
$k = $db->f($field->name);
$dbf->setQuery("SELECT fieldtitle,fieldvalue FROM #__{vm}_userfield_values" . "\n WHERE fieldid = " . $field->fieldid . "\n ORDER BY ordering");
$Values = $dbf->loadObjectList();
$multi = "";
$rowFieldValues['lst_' . $field->name] = '';
if ($field->type == 'multiselect') {
$multi = "multiple='multiple'";
}
if (count($Values) > 0) {
if ($field->type == 'radio') {
$rowFieldValues['lst_' . $field->name] = vmCommonHTML::radioListTable($Values, $field->name, 'class="inputbox" size="1" ', 'fieldvalue', 'fieldtitle', $k, $field->cols, $field->rows, $field->size, $field->required);
} else {
$ks = explode("|*|", $k);
$k = array();
foreach ($ks as $kv) {
$k[]->fieldvalue = $kv;
}
if ($field->type == 'multicheckbox') {
$rowFieldValues['lst_' . $field->name] = vmCommonHTML::checkboxListTable($Values, $field->name . "[]", 'class="inputbox" size="' . $field->size . '" ' . $multi, 'fieldvalue', 'fieldtitle', $k, $field->cols, $field->rows, $field->size, $field->required);
} else {
$rowFieldValues['lst_' . $field->name] = vmCommonHTML::selectList($Values, $field->name . "[]", 'class="inputbox" size="' . $field->size . '" ' . $multi, 'fieldvalue', 'fieldtitle', $k);
}
}
}
// no break! still a fallthrough
echo $rowFieldValues['lst_' . $field->name];
break;
}
break;
}
if ($field->description != '') {
echo vmToolTip($field->description);
}
echo '<br /></div>
<br style="clear:both;" />';
}
if ($delimiter > 0) {
echo "</fieldset>\n";
}
echo '</div>';
if (VM_REGISTRATION_TYPE == 'OPTIONAL_REGISTRATION') {
echo '<script type="text/javascript">
function showFields( show, fields ) {
if( fields ) {
for (i=0; i<fields.length;i++) {
if( show ) {
document.getElementById( fields[i] + \'_div\' ).style.display = \'\';
document.getElementById( fields[i] + \'_input\' ).style.display = \'\';
} else {
document.getElementById( fields[i] + \'_div\' ).style.display = \'none\';
document.getElementById( fields[i] + \'_input\' ).style.display = \'none\';
}
}
}
}
try {
showFields( document.getElementById( \'register_account\').checked, new Array(\'username\', \'password\', \'password2\') );
} catch(e){}
</script>';
}
}