本文整理汇总了PHP中rex_select::addArrayOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP rex_select::addArrayOptions方法的具体用法?PHP rex_select::addArrayOptions怎么用?PHP rex_select::addArrayOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rex_select
的用法示例。
在下文中一共展示了rex_select::addArrayOptions方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sort
$sqlmodule = new rex_sql();
$sqlmodule->setQuery('select * from ' . $REX['TABLE_PREFIX'] . 'module order by name');
for ($i = 0; $i < $sqlmodule->getRows(); $i++) {
$sel_module->addOption($sqlmodule->getValue('name'), $sqlmodule->getValue('id'));
$sqlmodule->next();
}
// extrarechte - von den addons übergeben
$sel_extra = new rex_select();
$sel_extra->setMultiple(1);
$sel_extra->setStyle('class=rex-perm-fselect');
$sel_extra->setSize(10);
$sel_extra->setName('userperm_extra[]');
$sel_extra->setId('userperm_extra');
if (isset($REX['EXTRAPERM'])) {
sort($REX['EXTRAPERM']);
$sel_extra->addArrayOptions($REX['EXTRAPERM'], false);
}
// --------------------------------- Title
rex_title($I18N->msg('title_user'), '');
// --------------------------------- FUNCTIONS
if (isset($FUNC_UPDATE) && $FUNC_UPDATE != '' || (isset($FUNC_APPLY) and $FUNC_APPLY != '')) {
$loginReset = rex_request('logintriesreset', 'int');
$userstatus = rex_request('userstatus', 'int');
$updateuser = new rex_sql();
$updateuser->setTable($REX['TABLE_PREFIX'] . 'user');
$updateuser->setWhere('user_id=' . $user_id);
$updateuser->setValue('name', $username);
$updateuser->addGlobalUpdateFields();
if ($REX['PSWFUNC'] != '' && $userpsw != $sql->getValue($REX['TABLE_PREFIX'] . 'user.psw')) {
$userpsw = call_user_func($REX['PSWFUNC'], $userpsw);
}
示例2: stripslashes
$REX['SERVER'] = stripslashes($neu_SERVER);
$REX['SERVERNAME'] = stripslashes($neu_SERVERNAME);
}
}
}
$sel_template = new rex_select();
$sel_template->setStyle('class="rex-form-select"');
$sel_template->setName('neu_defaulttemplateid');
$sel_template->setId('rex-form-default-template-id');
$sel_template->setSize(1);
$sel_template->setSelected($REX['DEFAULT_TEMPLATE_ID']);
$templates = OOCategory::getTemplates(0);
if (empty($templates)) {
$sel_template->addOption($I18N->msg('option_no_template'), 0);
} else {
$sel_template->addArrayOptions($templates);
}
$sel_lang = new rex_select();
$sel_lang->setStyle('class="rex-form-select"');
$sel_lang->setName('neu_lang');
$sel_lang->setId('rex-form-lang');
$sel_lang->setSize(1);
$sel_lang->setSelected($REX['LANG']);
foreach ($REX['LOCALES'] as $l) {
$sel_lang->addOption($l, $l);
}
$sel_mod_rewrite = new rex_select();
$sel_mod_rewrite->setSize(1);
$sel_mod_rewrite->setStyle('class="rex-form-select"');
$sel_mod_rewrite->setName('neu_modrewrite');
$sel_mod_rewrite->setId('rex-form-mod-rewrite');