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


PHP select::set_selected方法代码示例

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


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

示例1: foreach

     $lang_a->set_size(1);
     foreach ($REX['CLANG'] as $val => $key) {
         $lang_a->add_option($key, $val);
     }
     if (isset($_REQUEST["clang_a"])) {
         $lang_a->set_selected($_REQUEST["clang_a"]);
     }
     $lang_b = new select();
     $lang_b->set_name("clang_b");
     $lang_b->set_style("width:100px;");
     $lang_b->set_size(1);
     foreach ($REX['CLANG'] as $val => $key) {
         $lang_b->add_option($key, $val);
     }
     if (isset($_REQUEST["clang_b"])) {
         $lang_b->set_selected($_REQUEST["clang_b"]);
     }
     echo "<tr><td class=grey width=150>" . $I18N->msg("content_contentoflang") . "</td><td class=grey>" . $lang_a->out() . " " . $I18N->msg("content_to") . " " . $lang_b->out() . " " . $I18N->msg("content_copy") . "</td></tr>";
     echo "<tr>\n          <td class=grey>&nbsp;</td>\n          <td class=grey><input type=submit value='" . $I18N->msg("content_submitcopycontent") . "' size=8></td>\n          </tr>";
     echo "</form>";
 }
 // --------------------------------------------------- INHALTE KOPIEREN ENDE
 // --------------------------------------------------- ARTIKEL VERSCHIEBEN START
 if ($article->getValue("startpage") == 0 && ($REX_USER->isValueOf("rights", "admin[]") || $REX_USER->isValueOf("rights", "moveArticle[]"))) {
     print "<form action=index.php method=get>\n\t\t\t\t\t\t<input type=hidden name=page value=content>\n\t\t\t\t\t\t<input type=hidden name=article_id value='{$article_id}'>\n\t\t\t\t\t\t<input type=hidden name=category_id_old value='{$category_id}'>\n\t\t\t\t\t\t<input type=hidden name=mode value='meta'>\n\t\t\t\t\t\t<input type=hidden name=clang value={$clang}>\n\t\t\t\t\t\t<input type=hidden name=ctype value={$ctype}>\n\t\t\t\t\t\t<input type=hidden name=function value=movearticle>";
     // Wenn Artikel kein Startartikel dann Selectliste darstellen, sonst...
     $move_a = new select();
     $move_a->set_name("category_id_new");
     $move_a->set_style("width:100%;");
     $move_a->set_size(1);
     if ($cats = OOCategory::getRootCategories()) {
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:content.inc.php

示例2: select

        if ($message != "") {
            echo "<tr><td colspan=3 class=warning>{$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_selected($prepost);
        $sel_status = new select();
        $sel_status->set_name("status");
        $sel_status->add_option($ASTATUS[0], "0");
        $sel_status->add_option($ASTATUS[1], "1");
        $sel_status->add_option($ASTATUS[2], "2");
        $sel_status->set_size(1);
        $sel_status->set_selected($status);
        echo "\t\n\t\t\t<form action=index.php method=post>\n\t\t\t<input type=hidden name=page value=module>\n\t\t\t<input type=hidden name=subpage value=actions>\n\t\t\t<input type=hidden name=function value={$function}>\n\t\t\t<input type=hidden name=save value=ja>\n\t\t\t<input type=hidden name=action_id value={$action_id}>\n\t\t\t<tr>\n\t\t\t\t<td width=100 class=grey>" . $I18N->msg("action_name") . "</td>\n\t\t\t\t<td class=grey colspan=2><input type=text size=10 name=mname value=\"" . htmlentities($mname) . "\" style='width:100%;'></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td valign=top class=grey>" . $I18N->msg("input") . "</td>\n\t\t\t\t<td class=grey colspan=2><textarea cols=20 rows=70 name=actioninput style='width:100%; height: 150;'>" . htmlentities($actioninput) . "</textarea></td>\n\t\t\t</tr>";
        echo "\n\t\t\t<tr>\n\t\t\t\t<td align=right valign=middle class=grey>{$PREPOST['0']}/{$PREPOST['1']}</td>\n\t\t\t\t<td valign=middle class=grey colspan=2>" . $sel_prepost->out() . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td align=right valign=middle class=grey>STATUS</td>\n\t\t\t\t<td valign=middle class=grey colspan=2>" . $sel_status->out() . "</td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td class=grey>&nbsp;</td>\n\t\t\t\t<td class=grey width=200><input type=submit value='" . $I18N->msg("save_action_and_quit") . "'></td>\n\t\t\t\t<td class=grey>";
        if ($function != "add") {
            echo "<input type=submit name=goon value='" . $I18N->msg("save_action_and_continue") . "'>";
        }
        echo "</td>\n\t\t\t</tr>\n\t\t\t</form>\n\t\t\t</table>";
        $OUT = false;
    }
}
if ($OUT) {
    // ausgabe actionsliste !
    echo "<table border=0 cellpadding=5 cellspacing=1 width=770>\n\t\t<tr>\n\t\t\t<th width=30><a href=index.php?page=module&subpage=actions&function=add><img src=pics/modul_plus.gif width=16 height=16 border=0></a></th>\n\t\t\t<th align=left width=300>" . $I18N->msg("action_name") . "</th>\n\t\t\t<th align=left>" . $I18N->msg("action_functions") . "</th>\n\t\t</tr>\n\t\t";
    if ($message != "") {
        echo "<tr><td align=center class=warning><img src=pics/warning.gif width=16 height=16></td><td colspan=4 class=warning>{$message}</td></tr>";
    }
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:module.action.inc.php

示例3: sql

     echo "<th>ID</th>";
 }
 echo "\r\n        <th>" . $I18N->msg("header_article_name") . "</th>\r\n        <th width=50>" . $I18N->msg("header_priority") . "</th>\r\n        <th width=150>" . $I18N->msg("header_template") . "</th>\r\n        <th width=100>" . $I18N->msg("header_date") . "</th>\r\n        <th>&nbsp;</th>\r\n        <th colspan=3>" . $I18N->msg("header_status") . "</th>\r\n      </tr>";
 if (isset($amessage) and $amessage != "") {
     echo '<tr class="warning"><td align="center"><img src="pics/warning.gif" width="16" height="16"></td><td colspan="9"><b>' . $amessage . '</b></td></tr>';
 }
 // --------------------- ARTIKEL ADD FORM
 if (isset($function) and $function == "add_art" && $KATPERM && !$REX_USER->isValueOf("rights", "editContentOnly[]")) {
     if (!isset($template_id) or $template_id == '') {
         if (!isset($re_id)) {
             $re_id = '';
         }
         $sql = new sql();
         $sql->setQuery("SELECT template_id FROM " . $REX['TABLE_PREFIX'] . "article WHERE re_id={$re_id} and clang={$clang} and startpage=1");
         if ($sql->getRows() == 1) {
             $TMPL_SEL->set_selected($sql->getValue("template_id"));
         }
     }
     echo "<tr>\r\n            <form action=index.php method=post name=art_add_form>\r\n            <input type=hidden name=page value=structure>\r\n            <input type=hidden name=category_id value={$category_id}>\r\n            <input type=hidden name=clang value={$clang}>\r\n            <input type=hidden name=function value='add_article'>\r\n            <td class=icon><img src=pics/document.gif width=16 height=16 border=0></td>";
     if ($REX_USER->isValueOf("rights", "advancedMode[]")) {
         echo "<td class=grey align=center>-</td>";
     }
     echo "        \r\n            <td><input type=text name=article_name size=20></td>\r\n            <td>&nbsp;<input type=text name=Position_New_Article value=\"100\" style='width:30px'></td>\r\n            <td>" . $TMPL_SEL->out() . "</td>\r\n            <td>" . strftime($I18N->msg("adateformat")) . "&nbsp;</td>\r\n            <td><b>" . $I18N->msg("article") . "</b></td>\r\n            <td colspan=3><input type=submit value='add_article'></td>\r\n            </form>\r\n            <script type='text/javascript'> \r\n               <!-- \r\n               document.art_add_form.article_name.focus(); \r\n               //--> \r\n            </script>\r\n            </tr>";
 }
 // --------------------- ARTIKEL LIST
 $sql = new sql();
 $sql->setQuery("SELECT * \r\n        FROM \r\n          " . $REX['TABLE_PREFIX'] . "article \r\n        WHERE \r\n          ((re_id='{$category_id}' and startpage=0) or (id='{$category_id}' and startpage=1)) \r\n          and clang={$clang}  \r\n        ORDER BY \r\n          prior, name");
 for ($i = 0; $i < $sql->getRows(); $i++) {
     if ($sql->getValue("startpage") == 1) {
         $startpage = $I18N->msg("start_article");
         $icon = "liste.gif";
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:structure.inc.php

示例4: select

        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>&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);
开发者ID:BackupTheBerlios,项目名称:redaxo-addons,代码行数:31,代码来源:articles.inc.php

示例5: generateArticle

     $meta_sql->update();
     $article->setQuery("select * from rex_article where id='{$article_id}'");
     $err_msg = $I18N->msg("metadata_updated") . $message;
     generateArticle($article_id);
 }
 $typesel = new select();
 $typesel->set_name("type_id");
 $typesel->set_style("width:100%;");
 $typesel->set_size(1);
 $typesql = new sql();
 $typesql->setQuery("select * from rex_article_type order by name");
 for ($i = 0; $i < $typesql->getRows(); $i++) {
     $typesel->add_option($typesql->getValue("name"), $typesql->getValue("type_id"));
     $typesql->next();
 }
 $typesel->set_selected($article->getValue("type_id"));
 if ($typesql->getRows() == 1) {
     $out = "<input type=hidden name=type_id value=1>";
 } else {
     $out = "<tr><td class=grey>" . $I18N->msg("article_type_list_name") . "</td><td class=grey>" . $typesel->out() . "</td></tr>";
 }
 echo "\t<table border=0 cellpadding=5 cellspacing=1 width=100%>\r\n\t\t\t\t<form action=index.php method=post ENCTYPE=multipart/form-data>\r\n\t\t\t\t<input type=hidden name=page value=content>\r\n\t\t\t\t<input type=hidden name=article_id value='{$article_id}'>\r\n\t\t\t\t<input type=hidden name=mode value='meta'>\r\n\t\t\t\t<input type=hidden name=save value=1>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td colspan=2>" . $I18N->msg("general") . "</td>\r\n\t\t\t\t</tr>";
 if ($err_msg != "") {
     echo "<tr><td colspan=2 class=warning><font class=warning>{$err_msg}</font></td></tr>";
 }
 echo "\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=grey width=150>" . $I18N->msg("online_from") . "</td>\r\n\t\t\t\t\t<td class=grey>" . selectdate($article->getValue("online_von"), "_von") . "</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=grey>" . $I18N->msg("online_to") . "</td>\r\n\t\t\t\t\t<td class=grey>" . selectdate($article->getValue("online_bis"), "_bis") . "</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=grey>" . $I18N->msg("name_description") . "</td>\r\n\t\t\t\t\t<td class=grey><input type=text name=article_name value=\"" . htmlentities($article->getValue("name")) . "\" size=30 style=\"width:100%;\"></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=grey>" . $I18N->msg("description") . "</td>\r\n\t\t\t\t\t<td class=grey><textarea name=beschreibung cols=30 rows=5 style='width:100%;'>" . htmlentities($article->getValue("beschreibung")) . "</textarea></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=grey>" . $I18N->msg("keywords") . "</td>\r\n\t\t\t\t\t<td class=grey><textarea name=suchbegriffe cols=30 rows=5 style='width:100%;'>" . htmlentities($article->getValue("suchbegriffe")) . "</textarea></td>\r\n\t\t\t\t</tr>";
 if ($article->getValue("file") != "") {
     echo "<tr>\r\n\t\t\t\t\t<td class=grey>" . $I18N->msg("metadata_image") . "</td>\r\n\t\t\t\t\t<td class=grey><img src=../files/" . $article->getValue("file") . " width=250></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=grey align=right><input type=checkbox name=METAFILEDEL></td>\r\n\t\t\t\t\t<td class=grey>" . $I18N->msg("delete_file") . "</td>\r\n\t\t\t\t</tr>";
 } else {
     echo "<tr>\r\n\t\t\t\t\t<td class=grey>" . $I18N->msg("metadata_image") . "</td>\r\n\t\t\t\t\t<td class=grey><INPUT NAME=METAFILE TYPE=file size=2></td>\r\n\t\t\t\t</tr>";
 }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:content.inc.php

示例6: select

 if ($REX_USER->isValueOf("rights", "admin[]") || $REX_USER->isValueOf("rights", "moveArticle[]") || $REX_USER->isValueOf("rights", "copyArticle[]") || $REX_USER->isValueOf("rights", "copyContent[]") && count($REX['CLANG']) > 1) {
     echo "<table border=0 cellpadding=5 cellspacing=1 width=100%>\r\n          <tr>\r\n            <td colspan=3>" . $I18N->msg("other_functions") . "</td>\r\n          </tr>";
     // --------------------------------------------------- INHALTE KOPIEREN START
     if (($REX_USER->isValueOf("rights", "admin[]") || $REX_USER->isValueOf("rights", "copyContent[]")) && count($REX['CLANG']) > 1) {
         echo "\r\n          <form action=index.php method=get>\r\n          <input type=hidden name=page value=content>\r\n          <input type=hidden name=article_id value='{$article_id}'>\r\n          <input type=hidden name=mode value='meta'>\r\n          <input type=hidden name=clang value={$clang}>\r\n          <input type=hidden name=ctype value={$ctype}>\r\n          <input type=hidden name=function value=copycontent>";
         $lang_a = new select();
         $lang_a->set_name("clang_a");
         $lang_a->set_style("width:100px;");
         $lang_a->set_size(1);
         foreach ($REX['CLANG'] as $val => $key) {
             $lang_a->add_option($key, $val);
         }
         $lang_b = $lang_a;
         $lang_b->set_name("clang_b");
         if (isset($_REQUEST["clang_a"])) {
             $lang_a->set_selected($_REQUEST["clang_a"]);
         }
         if (isset($_REQUEST["clang_b"])) {
             $lang_b->set_selected($_REQUEST["clang_b"]);
         }
         echo "<tr><td class=grey width=150>" . $I18N->msg("content_contentoflang") . "</td><td class=grey>" . $lang_a->out() . " " . $I18N->msg("content_to") . " " . $lang_b->out() . " " . $I18N->msg("content_copy") . "</td></tr>";
         echo "<tr>\r\n          <td class=grey>&nbsp;</td>\r\n          <td class=grey><input type=submit value='" . $I18N->msg("content_submitcopycontent") . "' size=8></td>\r\n          </tr>";
         echo "</form>";
     }
     // --------------------------------------------------- INHALTE KOPIEREN ENDE
     // --------------------------------------------------- ARTIKEL VERSCHIEBEN START
     if ($article->getValue("startpage") == 0 && ($REX_USER->isValueOf("rights", "admin[]") || $REX_USER->isValueOf("rights", "moveArticle[]"))) {
         print "<form action=index.php method=get>\r\n\t\t\t\t\t\t<input type=hidden name=page value=content>\r\n\t\t\t\t\t\t<input type=hidden name=article_id value='{$article_id}'>\r\n\t\t\t\t\t\t<input type=hidden name=category_id_old value='{$category_id}'>\r\n\t\t\t\t\t\t<input type=hidden name=mode value='meta'>\r\n\t\t\t\t\t\t<input type=hidden name=clang value={$clang}>\r\n\t\t\t\t\t\t<input type=hidden name=ctype value={$ctype}>\r\n\t\t\t\t\t\t<input type=hidden name=function value=movearticle>";
         // Wenn Artikel kein Startartikel dann Selectliste darstellen, sonst...
         $move_a = new select();
         $move_a->set_name("category_id_new");
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:content.inc.php

示例7: 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)) {
     $action_id = '';
 }
 if (!isset($mname)) {
     $mname = '';
 }
 if (!isset($actioninput)) {
     $actioninput = '';
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:module.action.inc.php

示例8: htmlentities

 $sel->add_option("7", "7");
 $sel->add_option("8", "8");
 $sel->add_option("8", "8");
 $sel->add_option("9", "9");
 $sel->add_option("10", "10");
 $sel->add_option("11", "11");
 $sel->add_option("12", "12");
 $sel->add_option("13", "13");
 $sel->set_style("width:40px");
 echo "<table class=rex style=table-layout:auto; cellpadding=5 cellspacing=1>\r\n           <tr>\r\n\t\t\t<th class=icon><a href=index.php?page=specials&spage=lang&func=addclang#clang>+</a></th>\r\n\t\t\t<th style='width:40px; text-align:center;'>ID</th>\r\n\t\t\t<th width=250>" . $I18N->msg("clang_desc") . "</th>\r\n\t\t\t<th colspan=2>-</th></tr>";
 if ($message != "") {
     echo "<tr class=warning><td class=icon><img src=pics/warning.gif width=16 height=16></td><td colspan=4>{$message}</td></tr>";
     $message = "";
 }
 if ($func == "addclang") {
     $sel->set_selected($clang_id);
     echo "<tr><form action=index.php#clang method=post><input type=hidden name=page value=specials><input type=hidden name=spage value=lang><input type=hidden name=func value=addclangsave>";
     echo "<td>add</td>";
     echo "<td>" . $sel->out() . "</td>";
     echo "<td><input type=text size=10 class=inp100 name=clang_name value='" . htmlentities($clang_name) . "'></td>";
     echo "<td><input type=submit value=submit></td>";
     echo "</form></tr>";
 }
 reset($REX[CLANG]);
 for ($i = 0; $i < count($REX[CLANG]); $i++) {
     if ($clang_id == key($REX[CLANG]) and $clang_id != "" and $func == "editclang") {
         echo "<tr><form action=index.php#clang method=post><input type=hidden name=page value=specials><input type=hidden name=spage value=lang><input type=hidden name=clang_id value={$clang_id}><input type=hidden name=func value=editclangsave>";
         echo "<td>edit</td>";
         echo "<td align=center class=grey>" . key($REX[CLANG]) . "</td>";
         echo "<td><input type=text size=10 class=inp100 name=clang_name value='" . htmlentities(current($REX[CLANG])) . "''></td>";
         echo "<td><input type=submit name=edit value=" . $I18N->msg('edit') . ">";
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:specials.inc.php

示例9: sql

     } else {
         $rfwidth = $fwidth;
     }
 }
 $cats = new sql();
 $cats->setQuery("SELECT * FROM rex_file_category ORDER BY name ASC");
 $cats_sel = new select();
 $cats_sel->set_name("rex_file_category");
 $cats_sel->set_size(1);
 $cats_sel->set_style("' class='inp100");
 $cats_sel->add_option($I18N->msg('pool_kats_no'), "0");
 for ($i = 0; $i < $cats->getRows(); $i++) {
     $cats_sel->add_option($cats->getValue("name"), $cats->getValue("id"));
     $cats->next();
 }
 $cats_sel->set_selected($rex_file_category);
 if ($msg != "") {
     print "<table border=0 cellpadding=3 cellspacing=0 width=100%><tr><td width=20 class=warning><img src=pics/warning.gif width=16 height=16></td><td class=warning>{$msg}</td></tr><tr><td colspan=2></td></tr></table>";
     $msg = "";
 }
 // INPUT FIELD
 if ($_SESSION[myarea] == '') {
     $opener_link = "<a href=javascript:void(0) onClick=selectMedia('" . $fname . "');>" . $I18N->msg('pool_file_get') . "</a>";
     $olinka = "<a href=javascript:void(0) onClick=selectMedia('" . $fname . "');>";
 } else {
     // GET HTML WRAP FROM CONFIG FILE
     $html_source = str_replace("###URL###", $REX[WWW_PATH] . "/files/" . $fname, $htmlarea['default']);
     $html_source = str_replace("###FILE_NAME###", $fname, $html_source);
     $file_ext = strrchr($fname, ".");
     foreach ($htmlarea as $key => $var) {
         if (eregi($file_ext, $key)) {
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:medienpool.inc.php

示例10: next

 if ($allmcats == 1) {
     $allmcatschecked = " checked";
 }
 // userperm_all
 for ($i = 0; $i < count($userperm_all); $i++) {
     $sel_all->set_selected(current($userperm_all));
     next($userperm_all);
 }
 // userperm_ext
 for ($i = 0; $i < count($userperm_ext); $i++) {
     $sel_ext->set_selected(current($userperm_ext));
     next($userperm_ext);
 }
 // userperm_extra
 for ($i = 0; $i < count($userperm_extra); $i++) {
     $sel_extra->set_selected(current($userperm_extra));
     next($userperm_extra);
 }
 // userperm_sprachen
 for ($i = 0; $i < count($userperm_sprachen); $i++) {
     $sel_sprachen->set_selected(current($userperm_sprachen));
     next($userperm_sprachen);
 }
 if ($userperm_mylang == "") {
     $userperm_mylang = "be_lang[default]";
 }
 $sel_mylang->set_selected($userperm_mylang);
 // userperm_cat
 for ($i = 0; $i < count($userperm_cat); $i++) {
     $sel_cat->set_selected(current($userperm_cat));
     next($userperm_cat);
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:user.inc.php

示例11: printFormFields

function printFormFields($shortcut = '', $description = '', $language = '', $casesense = '')
{
    global $I18N, $I18N_GLOSSAR;
    $oLangSelect = new select();
    if ($language !== '') {
        $oLangSelect->set_selected($language);
    }
    $oLangSelect->set_name('form_lang');
    $oLangSelect->set_style('width: 100%');
    $oLangSelect->set_size(1);
    $oLangSelect->add_option($I18N_GLOSSAR->msg('lang_de'), $I18N_GLOSSAR->msg('lang_de_id'));
    $oLangSelect->add_option($I18N_GLOSSAR->msg('lang_en'), $I18N_GLOSSAR->msg('lang_en_id'));
    $oLangSelect->add_option($I18N_GLOSSAR->msg('lang_fr'), $I18N_GLOSSAR->msg('lang_fr_id'));
    $oCaseSelect = new select();
    if ($casesense !== '') {
        $oCaseSelect->set_selected($casesense);
    }
    $oCaseSelect->set_size(1);
    $oCaseSelect->set_name('form_case');
    $oCaseSelect->set_style('width: 100%');
    $oCaseSelect->add_option($I18N_GLOSSAR->msg('casesense'), 1);
    $oCaseSelect->add_option($I18N_GLOSSAR->msg('caseless'), 0);
    $mode = $shortcut !== '' || $description !== '' || $language !== '' || $casesense !== '' ? 'update' : 'add';
    ?>
    <tr>
        <td class="dgrey"></td>
        <td class="dgrey"><input style="width:100%" type="text" size="20" maxlength="255" name="form_short" value="<?php 
    echo $shortcut;
    ?>
"></td>
        <td class="dgrey"><?php 
    echo $oLangSelect->out();
    ?>
</td>
        <td class="dgrey"><input style="width:100%" type="text" size="20" maxlength="255" name="form_desc" value="<?php 
    echo $description;
    ?>
"></td>
        <td class="dgrey"><?php 
    echo $oCaseSelect->out();
    ?>
</td>
        <td class="dgrey">
            <input type="submit" name="function" value="<?php 
    echo $I18N->msg($mode);
    ?>
">
            <input type="submit" name="function" value="<?php 
    echo $I18N->msg('delete');
    ?>
">
        </td>
    </tr>
<?php 
}
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:55,代码来源:index.inc.php


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