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


PHP select::set_selectextra方法代码示例

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


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

示例1: sql

// ***** kategorie checken
$gc = new sql();
$gc->setQuery("select * from " . $REX['TABLE_PREFIX'] . "file_category where id='{$rex_file_category}'");
if ($gc->getRows() == 0) {
    $rex_file_category = 0;
}
// ***** kategorie auswahl
$db = new sql();
$file_cat = $db->get_array("SELECT * FROM " . $REX['TABLE_PREFIX'] . "file_category ORDER BY name ASC");
$cat_out = "<table border=0 cellpadding=5 cellspacing=1 width=100% class=rex style='width:100%'>\n";
$cat_out .= "<form name=rex_file_cat action=index.php method=POST>\n";
$cat_out .= "<input type=hidden name=page value=medienpool>";
$cat_out .= "<tr>\r\n      <td class=icon></td>\r\n      <td width=80 class=grey><b>" . $I18N->msg('pool_kats') . "</td>\r\n      <td class=grey>";
$sel_media = new select();
$sel_media->set_style('class="inp100"');
$sel_media->set_selectextra('onchange="location.href=\'index.php?page=medienpool&amp;rex_file_category=\'+this[this.selectedIndex].value;"');
$sel_media->set_size(1);
$sel_media->set_name("rex_file_category");
$sel_media->add_option($I18N->msg('pool_kats_no'), "0");
$mediacat_ids = array();
if ($rootCats = OOMediaCategory::getRootCategories()) {
    foreach ($rootCats as $rootCat) {
        add_mediacat_options($sel_media, $rootCat, $mediacat_ids);
    }
}
$sel_media->set_selected($rex_file_category);
$cat_out .= $sel_media->out();
$cat_out .= "</td>\n";
$cat_out .= "<td class=grey width=150><input type=submit value='" . $I18N->msg('pool_search') . "'></td>";
$cat_out .= "</tr></form></table>";
$_SESSION["rex_file_category"] = $rex_file_category;
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:medienpool.inc.php

示例2: getArticle

 function getArticle($curctype = -1)
 {
     global $module_id, $FORM, $REX_USER, $REX, $REX_SESSION, $REX_ACTION, $I18N;
     // ctype var festlegung komischer umweg
     $a = $this->ctype_var;
     ${$a} = $curctype;
     $sliceLimit = '';
     if ($this->getSlice) {
         //$REX['GG'] = 0;
         $sliceLimit = " and " . $REX['TABLE_PREFIX'] . "article_slice.id = '" . $this->getSlice . "' ";
     }
     // ----- start: article caching
     ob_start();
     if ($REX['GG'] && !$this->getSlice) {
         if ($this->article_id != 0) {
             $this->contents = "";
             $filename = $REX['INCLUDE_PATH'] . "/generated/articles/" . $this->article_id . "." . $this->clang . ".content";
             if ($fd = @fopen($filename, "r")) {
                 $this->contents = fread($fd, filesize($filename));
                 fclose($fd);
                 eval($this->contents);
             }
         }
     } else {
         if ($this->article_id != 0) {
             // ---------- alle teile/slices eines artikels auswaehlen
             $sql = "select " . $REX['TABLE_PREFIX'] . "modultyp.id, " . $REX['TABLE_PREFIX'] . "modultyp.name, " . $REX['TABLE_PREFIX'] . "modultyp.ausgabe, " . $REX['TABLE_PREFIX'] . "modultyp.eingabe, " . $REX['TABLE_PREFIX'] . "modultyp.php_enable, " . $REX['TABLE_PREFIX'] . "modultyp.html_enable, " . $REX['TABLE_PREFIX'] . "article_slice.*, " . $REX['TABLE_PREFIX'] . "article.re_id\r\n          from\r\n            " . $REX['TABLE_PREFIX'] . "article_slice\r\n          left join " . $REX['TABLE_PREFIX'] . "modultyp on " . $REX['TABLE_PREFIX'] . "article_slice.modultyp_id=" . $REX['TABLE_PREFIX'] . "modultyp.id\r\n          left join " . $REX['TABLE_PREFIX'] . "article on " . $REX['TABLE_PREFIX'] . "article_slice.article_id=" . $REX['TABLE_PREFIX'] . "article.id\r\n          where\r\n            " . $REX['TABLE_PREFIX'] . "article_slice.article_id='" . $this->article_id . "' and\r\n            " . $REX['TABLE_PREFIX'] . "article_slice.clang='" . $this->clang . "' and\r\n            " . $REX['TABLE_PREFIX'] . "article.clang='" . $this->clang . "'";
             $sql .= $sliceLimit;
             $sql .= "order by\r\n            " . $REX['TABLE_PREFIX'] . "article_slice.re_article_slice_id";
             //print $sql;
             $this->CONT = new sql();
             $this->CONT->setQuery($sql);
             // ---------- SLICE IDS/MODUL SETZEN - speichern der daten
             for ($i = 0; $i < $this->CONT->getRows(); $i++) {
                 $RE_CONTS[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue($REX['TABLE_PREFIX'] . "article_slice.id");
                 $RE_CONTS_CTYPE[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue($REX['TABLE_PREFIX'] . "article_slice.ctype");
                 $RE_MODUL_OUT[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue($REX['TABLE_PREFIX'] . "modultyp.ausgabe");
                 $RE_MODUL_IN[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue($REX['TABLE_PREFIX'] . "modultyp.eingabe");
                 $RE_MODUL_ID[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue($REX['TABLE_PREFIX'] . "modultyp.id");
                 $RE_MODUL_NAME[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue($REX['TABLE_PREFIX'] . "modultyp.name");
                 $RE_C[$this->CONT->getValue("re_article_slice_id")] = $i;
                 $this->CONT->nextValue();
             }
             // ---------- moduleselect: nur module nehmen auf die der user rechte hat
             if ($this->mode == "edit") {
                 $MODULE = new sql();
                 $MODULE->setQuery("select * from " . $REX['TABLE_PREFIX'] . "modultyp order by name");
                 $MODULESELECT = new select();
                 $MODULESELECT->set_name("module_id");
                 $MODULESELECT->set_size(1);
                 $MODULESELECT->set_style("width:100%;");
                 $MODULESELECT->set_selectextra("onchange='this.form.submit();'");
                 $MODULESELECT->add_option("----------------------------  " . $I18N->msg("add_block"), '');
                 for ($i = 0; $i < $MODULE->getRows(); $i++) {
                     if ($REX_USER->isValueOf("rights", "module[" . $MODULE->getValue("id") . "]") || $REX_USER->isValueOf("rights", "admin[]")) {
                         $MODULESELECT->add_option($MODULE->getValue("name"), $MODULE->getValue("id"));
                     }
                     $MODULE->next();
                 }
             }
             // ---------- SLICE IDS SORTIEREN UND AUSGEBEN
             $I_ID = 0;
             $PRE_ID = 0;
             $LCTSL_ID = 0;
             $this->article_content = "";
             $this->CONT->resetCounter();
             $tbl_head = "<table width=100% cellspacing=0 cellpadding=5 border=0><tr><td class=lblue>";
             $tbl_bott = "</td></tr></table>";
             for ($i = 0; $i < $this->CONT->getRows(); $i++) {
                 // ----- ctype unterscheidung
                 if ($i == 0 && $this->mode != "edit") {
                     $this->article_content = "<?php if (\$" . $this->ctype_var . " == '" . $RE_CONTS_CTYPE[$I_ID] . "' || (\$" . $this->ctype_var . " == '-1')) { ?>";
                 }
                 // ------------- EINZELNER SLICE - AUSGABE
                 $this->CONT->counter = $RE_C[$I_ID];
                 $slice_content = "";
                 $SLICE_SHOW = TRUE;
                 if ($this->mode == "edit") {
                     $this->ViewSliceId = $RE_CONTS[$I_ID];
                     $amodule = "\r\n            <table cellspacing=0 cellpadding=5 border=0 width=100%>\r\n            <form action=index.php";
                     if ($this->setanker) {
                         $amodule .= "#addslice";
                     }
                     $amodule .= " method=get>\r\n            <input type=hidden name=article_id value={$this->article_id}>\r\n            <input type=hidden name=page value=content>\r\n            <input type=hidden name=mode value={$this->mode}>\r\n            <input type=hidden name=slice_id value={$I_ID}>\r\n            <input type=hidden name=function value=add>\r\n            <input type=hidden name=clang value=" . $this->clang . ">\r\n            <input type=hidden name=ctype value=" . $this->ctype . ">\r\n            <tr>\r\n            <td class=dblue>" . $MODULESELECT->out() . "</td>\r\n            </tr></form></table>";
                     // ----- add select box einbauen
                     if ($this->function == "add" && $this->slice_id == $I_ID) {
                         $slice_content = $this->addSlice($I_ID, $module_id);
                     } else {
                         $slice_content .= $amodule;
                     }
                     // ----- edit / delete
                     if ($REX_USER->isValueOf("rights", "module[" . $RE_MODUL_ID[$I_ID] . "]") || $REX_USER->isValueOf("rights", "admin[]")) {
                         // hat rechte zum edit und delete
                         $mne = "\r\n                <a name=slice{$RE_CONTS[$I_ID]}></a>\r\n                <table width=100% cellspacing=0 cellpadding=5 border=0>\r\n                <tr>\r\n                <td class=blue width=380><b>{$RE_MODUL_NAME[$I_ID]}</b></td>\r\n                <td class=llblue align=center><a href=index.php?page=content&article_id={$this->article_id}&mode=edit&slice_id={$RE_CONTS[$I_ID]}&function=edit&clang=" . $this->clang . "&ctype=" . $this->ctype . "#slice{$RE_CONTS[$I_ID]} class=green12b>" . $I18N->msg('edit') . "</a></td>\r\n                <td class=llblue align=center><a href=index.php?page=content&article_id={$this->article_id}&mode=edit&slice_id={$RE_CONTS[$I_ID]}&function=delete&clang=" . $this->clang . "&ctype=" . $this->ctype . "&save=1#slice{$RE_CONTS[$I_ID]} class=red12b onclick='return confirm(\"" . $I18N->msg('delete') . " ?\")'>" . $I18N->msg('delete') . "</a></td>";
                         if ($REX_USER->isValueOf("rights", "moveSlice[]")) {
                             $mne .= "<td class=llblue><a href=index.php?page=content&article_id={$this->article_id}&mode=edit&slice_id={$RE_CONTS[$I_ID]}&function=moveup&clang=" . $this->clang . "&ctype=" . $this->ctype . "&upd=" . time() . "#slice{$RE_CONTS[$I_ID]} class=green12b><img src=pics/file_up.gif width=16 height=16 border=0 hspace=5></a><a href=index.php?page=content&article_id={$this->article_id}&mode=edit&slice_id={$RE_CONTS[$I_ID]}&function=movedown&clang=" . $this->clang . "&ctype=" . $this->ctype . "&upd=" . time() . "#slice{$RE_CONTS[$I_ID]} class=green12b><img src=pics/file_down.gif width=16 height=16 border=0></a></td>";
                         }
                         $mne .= "</tr></table>";
                         $slice_content .= $mne . $tbl_head;
                         if ($this->function == "edit" && $this->slice_id == $RE_CONTS[$I_ID]) {
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:101,代码来源:class.article.inc.php

示例3: select

        } 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);
    $sel_cat->set_style("width:100%;");
    $sel_cat->set_size(20);
开发者ID:BackupTheBerlios,项目名称:redaxo-addons,代码行数:31,代码来源:articles.inc.php

示例4: select

         $dbchecked1 = " checked";
         break;
     case 2:
         $dbchecked2 = " checked";
         break;
     case 3:
         $dbchecked3 = " checked";
         break;
     default:
         $dbchecked0 = " checked";
 }
 // Vorhandene Exporte auslesen
 $sel_export = new select();
 $sel_export->set_name('import_name');
 $sel_export->set_style('width: 300px;');
 $sel_export->set_selectextra('onchange="checkInput(\'dbanlegen[3]\')"');
 $export_dir = $export_addon_dir . '/files';
 $exports_found = false;
 if (is_dir($export_dir)) {
     if ($handle = opendir($export_dir)) {
         $export_archives = array();
         $export_sqls = array();
         while (($file = readdir($handle)) !== false) {
             if ($file == '.' || $file == '..') {
                 continue;
             }
             $isSql = substr($file, strlen($file) - 4) == '.sql';
             $isArchive = substr($file, strlen($file) - 7) == '.tar.gz';
             if ($isSql) {
                 $export_sqls[] = substr($file, 0, -4);
                 $exports_found = true;
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:setup.inc.php


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