本文整理汇总了PHP中select::set_id方法的典型用法代码示例。如果您正苦于以下问题:PHP select::set_id方法的具体用法?PHP select::set_id怎么用?PHP select::set_id使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类select
的用法示例。
在下文中一共展示了select::set_id方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: select
$selected = 'selected="selected"';
} else {
$selected = '';
}
}
$cssSelectFile .= '<option value="' . $cssFileName . '" ' . $selected . '>' . $cssFileName . '</option>' . "\n";
}
} else {
$errorMsg .= '<p class="warning"><strong>Es sind keine CSS Files vorhanden.</strong></p>';
}
// Build the Medienpool Dirs as Select List
////////////////////////////////////////////////////////////////////////////////
$cats_sel = new select();
$cats_sel->set_style('class="form-select"');
$cats_sel->set_size(1);
$cats_sel->set_id("dirCreate");
$cats_sel->set_name("dirCreate");
$cats_sel->add_option($I18N->msg('pool_kats_no'), "0");
$mediacat_ids = array();
$rootCat = 0;
if ($rootCats = OOMediaCategory::getRootCategories()) {
foreach ($rootCats as $rootCat) {
add_mediacat_options_wperm($cats_sel, $rootCat, $mediacat_ids);
}
}
if (!isset($rex_file_category)) {
$rex_file_category = '';
}
$cats_sel->set_selected($rex_file_category);
$selectOut = $cats_sel->out();
if (isset($_POST['send']) and $_POST['send'] != 1) {
示例2: while
while (list($key, $val) = each($REX[CLANG])) {
if ($key == $clang) {
$add .= "{$val} | ";
} else {
$add .= "<a href=index.php?page=simple_shop&clang={$key}" . $langswitchadd . " >{$val}</a> | ";
}
}
$add .= "</b></td></tr></table>";
echo $add;
}
// -----------------------> Suche der Artikel über die Kategorien
$sel_cat = new select();
$sel_cat->set_style("width:100%;");
$sel_cat->set_size(1);
$sel_cat->set_name("articlesearch");
$sel_cat->set_id("articlesearch");
$sel_cat->set_selected($articlesearch);
// $STYLE= "onchange='document.forms[0].submit();'";
$sel_cat->set_selectextra('onchange="document.forms[0].submit();"');
$sel_cat->add_option($I18N_SIMPLE_SHOP->msg("please_choose_a_cat"), "100000000000000000");
$cat_ids = array();
if ($rootCats = OOCategory::getRootCategories()) {
foreach ($rootCats as $rootCat) {
add_cat_options($sel_cat, $rootCat, $cat_ids);
}
}
echo "\n <table class=rex border=0 cellpadding=5 cellspacing=1 width=770>\n <tr>\n <th class=icon> </th>\n <th colspan=2 align=left>" . $I18N_SIMPLE_SHOP->msg("product_overview") . "</th>\n </tr>\n <tr>\n <form action='index.php' method='post' name=catsearch>\n <input type='hidden' name='page' value='" . $mypage . "' />\n <input type='hidden' name='clang' value='" . $clang . "' />\n \n <td class=grey> </td>\n <td class=grey width=280>\n " . $sel_cat->out() . "\n </td>\n <td class=grey>\n <table border=0 cellspacing=0 cellpadding=0>\n <td>\n <input type=submit name='cs' value='" . $I18N_SIMPLE_SHOP->msg("show") . "' />\n </td></form><form action='index.php' method='post' name=catsearch>\n <input type='hidden' name='clang' value='" . $clang . "' />\n <input type='hidden' name='page' value='" . $mypage . "' />\n <input type='hidden' name='articlesearch' value='' />\n <td>\n <input type=submit name='cs' value='" . $I18N_SIMPLE_SHOP->msg("show_all") . "' />\n </td></form><form action='index.php' method='post' name=catsearch>\n <input type='hidden' name='clang' value='" . $clang . "' />\n <input type='hidden' name='page' value='" . $mypage . "' />\n <input type='hidden' name='articlesearch' value='0' />\n <td>\n <input type=submit name='cs' value='" . $I18N_SIMPLE_SHOP->msg("show_wo_cat") . "' />\n </td></form>\n </table>\n </td>\n </tr>\n </table>";
$STYLE = "";
if ($function == "edit_article") {
// ---------------> Artikel wird editiert oder angelegt
$sel_cat = new select();
示例3: sql
$sel_module->set_name("userperm_module[]");
$sel_module->set_id("userperm_module");
$sqlmodule = new sql();
$sqlmodule->setQuery("select * from " . $REX['TABLE_PREFIX'] . "modultyp order by name");
for ($i = 0; $i < $sqlmodule->getRows(); $i++) {
$name = $sqlmodule->getValue("name");
$sel_module->add_option($name, $sqlmodule->getValue("id"));
$sqlmodule->next();
}
// extrarechte - von den addons übergeben
$sel_extra = new select();
$sel_extra->multiple(1);
$sel_extra->set_style("width:250px; height: 150px;");
$sel_extra->set_size(10);
$sel_extra->set_name("userperm_extra[]");
$sel_extra->set_id("userperm_extra");
if (isset($REX['EXTRAPERM'])) {
for ($i = 0; $i < count($REX['EXTRAPERM']); $i++) {
if ($i == 0) {
reset($REX['EXTRAPERM']);
}
$sel_extra->add_option(current($REX['EXTRAPERM']), current($REX['EXTRAPERM']));
next($REX['EXTRAPERM']);
}
}
// --------------------------------- Title
rex_title($I18N->msg("title_user"), "");
// --------------------------------- FUNCTIONS
if (isset($FUNC_UPDATE) && $FUNC_UPDATE != '' || (isset($FUNC_APPLY) and $FUNC_APPLY != '')) {
$updateuser = new sql();
$updateuser->setTable($REX['TABLE_PREFIX'] . "user");