当前位置: 首页>>代码示例>>PHP>>正文


PHP select::multiple方法代码示例

本文整理汇总了PHP中select::multiple方法的典型用法代码示例。如果您正苦于以下问题:PHP select::multiple方法的具体用法?PHP select::multiple怎么用?PHP select::multiple使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在select的用法示例。


在下文中一共展示了select::multiple方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: select

     $sedit = 0;
     $sdelete = 0;
 }
 if (isset($message) and $message != '') {
     echo '<tr class="warning"><td colspan="3">' . $message . '</td></tr>';
 }
 $sel_prepost = new select();
 $sel_prepost->set_name("prepost");
 $sel_prepost->add_option($PREPOST[0], "0");
 $sel_prepost->add_option($PREPOST[1], "1");
 $sel_prepost->set_size(1);
 $sel_prepost->set_style("width:100px;");
 $sel_prepost->set_selected($prepost);
 $sel_status = new select();
 $sel_status->set_name("status[]");
 $sel_status->multiple(1);
 $sel_status->add_option($ASTATUS[0], "1");
 $sel_status->add_option($ASTATUS[1], "2");
 $sel_status->add_option($ASTATUS[2], "4");
 $sel_status->set_size(3);
 $sel_status->set_style("width:100px;");
 if ($sadd == 1) {
     $sel_status->set_selected(1);
 }
 if ($sedit == 1) {
     $sel_status->set_selected(2);
 }
 if ($sdelete == 1) {
     $sel_status->set_selected(4);
 }
 if (!isset($action_id)) {
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:module.action.inc.php

示例2: array

$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>&nbsp;</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>&nbsp;</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();
    $sel_cat->multiple(1);
    $sel_cat->set_style("width:100%;");
    $sel_cat->set_size(20);
    $sel_cat->set_name("article[cat][]");
    $cat_ids = array();
    if ($rootCats = OOCategory::getRootCategories()) {
        foreach ($rootCats as $rootCat) {
            add_cat_options($sel_cat, $rootCat, $cat_ids);
        }
    }
    if ($send == 1) {
        //------------------> Das Formular wurde abgeschickt
        if ($article[name] == "") {
            $article[name] = "[leer]";
        }
        $sql = new sql();
开发者ID:BackupTheBerlios,项目名称:redaxo-addons,代码行数:31,代码来源:articles.inc.php

示例3: select

$sel_module = new select();
$sel_module->multiple(1);
$sel_module->set_style("width:250px; height: 150px;");
$sel_module->set_size(10);
$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"), "");
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:user.inc.php


注:本文中的select::multiple方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。