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


PHP select::out方法代码示例

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


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

示例1: sql

     echo " ";
 }
 echo "</td>\n\t\t\t<th align=left>" . $I18N->msg("header_article_name") . "</th>\n\t\t\t<th align=left width=50>" . $I18N->msg("header_priority") . "</th>\n\t\t\t<th align=left width=150>" . $I18N->msg("header_template") . "</th>\n\t\t\t<th align=left width=100>" . $I18N->msg("header_date") . "</th>\n\t\t\t<th align=left>&nbsp;</th>\n\t\t\t<th align=left colspan=3>" . $I18N->msg("header_status") . "</th>\n\t\t</tr>";
 if ($amessage != "") {
     echo "<tr><td align=center class=warning><img src=pics/warning.gif width=16 height=16></td><td colspan=8 class=warning><b>{$amessage}</b></td></tr>";
 }
 if ($function == "add_art") {
     // ---------------- ARTIKEL ERSTELLEN FORM / DEFAULT TEMPLATE
     if ($template_id == "") {
         $sql = new sql();
         $sql->setQuery("select template_id from rex_article where category_id={$category_id} and startpage=1");
         if ($sql->getRows() == 1) {
             $TMPL_SEL->set_selected($sql->getValue("template_id"));
         }
     }
     echo "\t<tr>\n\t\t\t<form action=index.php method=post>\n\t\t\t<input type=hidden name=page value=structure>\n\t\t\t<input type=hidden name=category_id value={$category_id}>\n\t\t\t<td class=grey align=center><img src=pics/document.gif width=16 height=16 border=0></td>\n\t\t\t<td class=grey><input type=hidden name=function value='add_article'><input type=text name=article_name size=20></td>\n\t\t\t<td class=grey>&nbsp;<input type=text name=Position_New_Article value=\"1\" style='width:30px'></td>\n\t\t\t<td class=grey>" . $TMPL_SEL->out() . "</td>\n\t\t\t<td class=grey>" . date_from_mydate(date("YmdHis"), "") . "&nbsp;</td>\n\t\t\t<td class=grey><b>" . $I18N->msg("article") . "</b></td>\n\t\t\t<td class=grey colspan=3><input type=submit value='add_article'></td>\n\t\t\t</form>\n\t\t\t</tr>";
 }
 // Check startArticle[] Permissons
 $startSQL = "";
 if ($REX_USER->isValueOf("rights", "startArticle[none]")) {
     if (!$REX_USER->isValueOf("rights", "startArticle[{$category_id}]")) {
         $startSQL = "AND startpage = 0";
     }
 }
 $sql = new sql();
 $sql->setQuery("select * from rex_article where category_id='{$category_id}' {$startSQL} order by prior,name");
 for ($i = 0; $i < $sql->getRows(); $i++) {
     if ($sql->getValue("startpage") == 1) {
         $startpage = $I18N->msg("start_article");
         $icon = "liste.gif";
     } else {
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:structure.inc.php

示例2: sql

 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";
     } else {
         $startpage = $I18N->msg("article");
         $icon = "document.gif";
     }
     //    $pos++; // wird das noch gebraucht?
     // --------------------- ARTIKEL EDIT FORM
     if (isset($function) and $function == "edit" && isset($article_id) && $sql->getValue("id") == $article_id && $KATPERM) {
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:structure.inc.php

示例3: select

 }
 $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>";
 }
 echo "<tr bgcolor=#eeeeee>";
 if ($article->getValue("checkbox01") == 1) {
     echo "<td align=right class=grey><input type=checkbox name=checkbox01 checked value=1></td>";
 } else {
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:content.inc.php

示例4: getArticle

 function getArticle()
 {
     global $module_id, $FORM, $REX_USER, $REX, $REX_SESSION, $I18N;
     if ($REX[GG]) {
         if ($this->article_id != 0) {
             $this->contents = "";
             if ($REX[BF]) {
                 $filename = $REX[INCLUDE_PATH] . "/generated/articles/" . $this->article_id . ".bcontent";
             } else {
                 $filename = $REX[INCLUDE_PATH] . "/generated/articles/" . $this->article_id . ".content";
             }
             if ($fd = @fopen($filename, "r")) {
                 $this->contents = fread($fd, filesize($filename));
                 fclose($fd);
                 eval($this->contents);
             }
         }
     } else {
         if ($this->article_id != 0) {
             // ---------- select alle slices eines artikels
             $this->CONT = new sql();
             $this->CONT->setQuery("select rex_modultyp.name, rex_modultyp.ausgabe, rex_modultyp.bausgabe, rex_modultyp.eingabe, rex_modultyp.php_enable, rex_modultyp.html_enable, rex_article_slice.*, rex_article.category_id\n                                                        from\n                                                                rex_article_slice\n                                                        left join rex_modultyp on rex_article_slice.modultyp_id=rex_modultyp.id\n                                                        left join rex_article on rex_article_slice.article_id=rex_article.id\n                                                        where\n                                                                rex_article_slice.article_id='" . $this->article_id . "'\n                                                        order by\n                                                                rex_article_slice.re_article_slice_id");
             // ---------- SLICE IDS/MODUL SETZEN
             for ($i = 0; $i < $this->CONT->getRows(); $i++) {
                 $RE_CONTS[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_article_slice.id");
                 if ($REX[BF]) {
                     $RE_MODUL_OUT[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_modultyp.bausgabe");
                 } else {
                     $RE_MODUL_OUT[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_modultyp.ausgabe");
                 }
                 $RE_MODUL_IN[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_modultyp.eingabe");
                 $RE_MODUL_NAME[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_modultyp.name");
                 $RE_MODUL_PHP[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_modultyp.php_enable");
                 $RE_MODUL_HTML[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_modultyp.html_enable");
                 $RE_C[$this->CONT->getValue("re_article_slice_id")] = $i;
                 $this->CONT->nextValue();
             }
             // ---------- moduleselect
             if ($this->mode == "edit") {
                 // auslesen ob php/html rechte
                 $add_sql = "";
                 $MODULE_PERM[php] = $REX_USER->isValueOf("rights", "module[php]");
                 $MODULE_PERM[html] = $REX_USER->isValueOf("rights", "module[html]");
                 if (!$MODULE_PERM[php]) {
                     $add_sql = "where php_enable='0'";
                 }
                 if (!$MODULE_PERM[html]) {
                     if ($add_sql != "") {
                         $add_sql .= " and html_enable='0'";
                     } else {
                         $add_sql = "where html_enable='0'";
                     }
                 }
                 $MODULE = new sql();
                 $MODULE->setQuery("select * from rex_modultyp {$add_sql} order by name");
                 $MODULESELECT = new select();
                 $MODULESELECT->set_name("module_id");
                 $MODULESELECT->set_size(1);
                 $MODULESELECT->set_style("width:100%;' onchange='this.form.submit();");
                 $MODULESELECT->add_option("----------------------------  " . $I18N->msg("add_block"), '');
                 for ($i = 0; $i < $MODULE->getRows(); $i++) {
                     $MODULESELECT->add_option($MODULE->getValue("name"), $MODULE->getValue("id"));
                     $MODULE->next();
                 }
             }
             // ---------- SLICE IDS SORTIEREN UND AUSGEBEN
             $I_ID = 0;
             $PRE_ID = 0;
             $this->article_content = "";
             $this->CONT->resetCounter();
             for ($i = 0; $i < $this->CONT->getRows(); $i++) {
                 // ------------- 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 = "\n                                                        <table cellspacing=0 cellpadding=5 border=0 width=100%>\n                                                        <form action=index.php";
                     if ($this->setanker) {
                         $amodule .= "#addslice";
                     }
                     $amodule .= " method=get>\n                                                        <input type=hidden name=article_id value={$this->article_id}>\n                                                        <input type=hidden name=page value=content>\n                                                        <input type=hidden name=mode value={$this->mode}>\n                                                        <input type=hidden name=slice_id value={$I_ID}>\n                                                        <input type=hidden name=function value=add>\n                                                        <tr>\n                                                        <td class=dblue>" . $MODULESELECT->out() . "</td>\n                                                        </tr></form></table>";
                     $fmenue = "\n                                                        <a name=slice{$RE_CONTS[$I_ID]}></a>\n                                                        <table width=100% cellspacing=0 cellpadding=5 border=0>\n                                                        <tr>\n                                                        <td class=blue width=380><b>{$RE_MODUL_NAME[$I_ID]}</b></td>\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#slice{$RE_CONTS[$I_ID]} class=green12b><b>" . $I18N->msg('edit') . "</b></a></td>\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#slice{$RE_CONTS[$I_ID]} class=red12b><b>" . $I18N->msg('delete') . "</b></a></td>\n                                                        </tr>\n                                                        </table>";
                     $p_menue = "\n                                                        <table width=100% cellspacing=0 cellpadding=5 border=0>\n                                                        <tr>\n                                                        <td class=blue> MODUL: <b>{$RE_MODUL_NAME[$I_ID]}</b> | <b>" . $I18N->msg('no_editing_rights') . "</b></td>\n                                                        </tr>\n                                                        </table>";
                     $tbl_head = "<table width=100% cellspacing=0 cellpadding=5 border=0><tr><td class=lblue>";
                     $tbl_bott = "</td></tr></table>";
                     // && ( $RE_MODUL_PHP[$module_id] == 0 || $MODULE_PERM[php] ) && ( $RE_MODUL_HTML[$module_id] == 0 || $MODULE_PERM[html] )
                     if ($this->function == "add" && $this->slice_id == $I_ID) {
                         $slice_content = $this->addSlice($I_ID, $module_id);
                     } else {
                         $slice_content .= $amodule;
                     }
                     if ($this->function == "edit" && $this->slice_id == $RE_CONTS[$I_ID] && ($RE_MODUL_PHP[$I_ID] == 0 || $MODULE_PERM[php]) && ($RE_MODUL_HTML[$I_ID] == 0 || $MODULE_PERM[html])) {
                         $slice_content .= $fmenue . $tbl_head . $this->editSlice($RE_CONTS[$I_ID], $RE_MODUL_IN[$I_ID]) . $tbl_bott;
                     } elseif ($this->function == "delete" && $this->slice_id == $RE_CONTS[$I_ID]) {
                         $slice_content .= $fmenue . $tbl_head . $this->deleteSlice($RE_CONTS[$I_ID], $RE_MODUL_OUT[$I_ID], $PRE_ID) . $tbl_bott;
                     } else {
                         if (!$MODULE_PERM[html] && $RE_MODUL_HTML[$I_ID]) {
                             $this->mode = "";
                             $slice_content .= $p_menue . $tbl_head . $RE_MODUL_OUT[$I_ID] . $tbl_bott;
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:101,代码来源:class.article.inc.php

示例5: next

        for ($i = 0; $i < count($userperm_module); $i++) {
            $sel_module->set_selected(current($userperm_module));
            next($userperm_module);
        }
        $message = $I18N->msg("user_login_exists");
    }
}
// ---------------------------------- ERR MSG
if ($message != "") {
    echo "<table class=rex style=table-layout:auto; cellpadding=5 cellspacing=1><tr class=warning><td class=icon><img src=pics/warning.gif width=16 height=16></td><td colspan=3 class=warning>{$message}</td></tr></table><br>";
}
// --------------------------------- FORMS
$SHOW = true;
if ($FUNC_ADD) {
    $SHOW = false;
    echo "\t<table class=rex style=table-layout:auto; cellpadding=5 cellspacing=1>\r\n\t\t<form action=index.php method=post>\r\n\t\t<input type=hidden name=page value=user>\r\n\t\t<input type=hidden name=save value=1>\r\n\t\t<input type=hidden name=FUNC_ADD value=1>\r\n\t\t<tr><th colspan=4><b>" . $I18N->msg("create_user") . "</b></th></tr>\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td width=100>" . $I18N->msg("login_name") . "</td>\r\n\t\t\t<td><input class=inp100 type=text size=20 name=userlogin value=\"" . stripslashes(htmlentities($userlogin)) . "\"></td>\r\n\t\t\t<td width=100>" . $I18N->msg("password") . "</td>\r\n\t\t\t<td ><input class=inp100 type=text size=20 name=userpsw value=\"" . stripslashes(htmlentities($userpsw)) . "\"></td>\r\n\t\t</tr>\r\n\r\n\t\t<tr>\r\n\t\t\t<td>" . $I18N->msg("name") . "</td>\r\n\t\t\t<td><input class=inp100 type=text size=20 name=username value=\"" . stripslashes(htmlentities($username)) . "\"></td>\r\n\t\t\t<td>" . $I18N->msg("description") . "</td>\r\n\t\t\t<td><input class=inp100 type=text size=20 name=userdesc value=\"" . stripslashes(htmlentities($userdesc)) . "\"></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td align=right><input type=checkbox id=useradmin name=useradmin value=1 {$adminchecked}></td>\r\n            <td><label for=useradmin>" . $I18N->msg("user_admin") . "</label></td>\r\n            <td align=right><input type=checkbox id=devadmin name=devadmin value=1 {$devchecked}></td>\r\n            <td><label for=devadmin>" . $I18N->msg("user_developer") . "</label></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td>" . $I18N->msg("user_lang_xs") . "</td>\r\n\t\t\t<td>" . $sel_sprachen->out() . "<br>" . $I18N->msg("ctrl") . "</td>\r\n\t\t\t<td><!-- Meine Backendsprache -->&nbsp;</td>\r\n\t\t\t<td><!-- " . $sel_mylang->out() . " -->&nbsp;</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td valign=top>" . $I18N->msg("user_all") . "</td>\r\n\t\t\t<td>\r\n              " . $sel_all->out() . "<br>" . $I18N->msg("ctrl") . "\r\n            </td>\r\n\t\t\t<td valign=top>" . $I18N->msg("user_options") . "</td>\r\n\t\t\t<td>\r\n              " . $sel_ext->out() . "<br>" . $I18N->msg("ctrl") . "\r\n            </td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n            <td align=right><input type=checkbox id=allcats name=allcats value=1 {$allcatschecked}></td>\r\n            <td><label for=allcats>" . $I18N->msg("all_categories") . "</label></td>\r\n            <td align=right><input type=checkbox id=allmcats name=allmcats value=1 {$allmcatschecked}></td>\r\n            <td><label for=allmcats>" . $I18N->msg("all_mediafolder") . "</label></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td valign=top>" . $I18N->msg("categories") . "</td>\r\n\t\t\t<td>\r\n              " . $sel_cat->out() . "<br>" . $I18N->msg("ctrl") . "\r\n            </td>\r\n\t\t\t<td valign=top>" . $I18N->msg("mediafolder") . "</td>\r\n\t\t\t<td>\r\n              " . $sel_media->out() . "<br>" . $I18N->msg("ctrl") . "\r\n            </td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td valign=top>" . $I18N->msg("modules") . "</td>\r\n\t\t\t<td>\r\n              " . $sel_module->out() . "<br>" . $I18N->msg("ctrl") . "\r\n            </td>\r\n\t\t\t<td valign=top>" . $I18N->msg("extras") . "</td>\r\n\t\t\t<td>\r\n              " . $sel_extra->out() . "<br>" . $I18N->msg("ctrl") . "\r\n            </td>\r\n\t\t</tr>\r\n\t\t\r\n\t\t<tr>\r\n\t\t\t<td>&nbsp;</td>\r\n\t\t\t<td colspan=3><input type=submit name=function value='" . $I18N->msg("add_user") . "'></td>\r\n\t\t</tr>\r\n\t\t</form>\r\n\t\t</table>";
} elseif ($user_id != "") {
    $sql = new sql();
    $sql->setQuery("select * from rex_user where user_id='{$user_id}'");
    if ($sql->getRows() == 1) {
        // ----- EINLESEN DER PERMS
        if ($sql->isValueOf("rights", "admin[]")) {
            $adminchecked = "checked";
        } else {
            $adminchecked = "";
        }
        if ($sql->isValueOf("rights", "dev[]")) {
            $devchecked = "checked";
        } else {
            $devchecked = "";
        }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:user.inc.php

示例6: htmlspecialchars

        <td class="grey" colspan="2"><input type="text" size="10" name="mname" value="' . htmlspecialchars($mname) . '" style="width:100%;"></td>
      </tr>
      <tr>
        <td valign="top">' . $I18N->msg("input") . '</td>
        <td colspan="2">
          <textarea cols="20" rows="70" name="actioninput" id="actioninput" style="width:100%; height: 150;">' . htmlspecialchars($actioninput) . '</textarea>
        </td>
      </tr>' . "\n";
        echo '
      <tr>
        <td align="right" valign="middle">' . $PREPOST[0] . '/' . $PREPOST[1] . '</td>
        <td valign="middle" class="grey" colspan="2">' . $sel_prepost->out() . '</td>
      </tr>
      <tr>
        <td align="right" valign="middle">STATUS</td>
        <td valign="middle" colspan="2">' . $sel_status->out() . '</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td width="200"><input type="submit" value="' . $I18N->msg("save_action_and_quit") . '"></td>
        <td>' . "\n";
        if ($function != "add") {
            echo '<input type="submit" name="goon" value="' . $I18N->msg("save_action_and_continue") . '">';
        }
        echo '</td>
      </tr>
      </form>
      </table>' . "\n";
        $OUT = false;
    }
}
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:module.action.inc.php

示例7: sql

     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 ($function == "add_art" && $KATPERM) {
     if ($template_id == "") {
         $sql = new sql();
         $sql->setQuery("select template_id from rex_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\t\t\t\t<form action=index.php method=post>\r\n\t\t\t\t<input type=hidden name=page value=structure>\r\n\t\t\t\t<input type=hidden name=category_id value={$category_id}>\r\n\t\t\t\t<input type=hidden name=clang value={$clang}>\r\n\t\t\t\t<input type=hidden name=function value='add_article'>\r\n\t\t\t\t<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>&nbsp;</td>";
     }
     echo "\t\t\t\t\r\n\t\t\t\t<td><input type=text name=article_name size=20></td>\r\n\t\t\t\t<td>&nbsp;<input type=text name=Position_New_Article value=\"1\" style='width:30px'></td>\r\n\t\t\t\t<td>" . $TMPL_SEL->out() . "</td>\r\n\t\t\t\t<td>" . strftime($I18N->msg("adateformat")) . "&nbsp;</td>\r\n\t\t\t\t<td><b>" . $I18N->msg("article") . "</b></td>\r\n\t\t\t\t<td colspan=3><input type=submit value='add_article'></td>\r\n\t\t\t\t</form>\r\n\t\t\t\t</tr>";
 }
 // --------------------- ARTIKEL LIST
 $sql = new sql();
 $sql->setQuery("select * \r\n\t\t\tfrom \r\n\t\t\t\trex_article \r\n\t\t\twhere \r\n\t\t\t\t((re_id='{$category_id}' and startpage=0) or (id='{$category_id}' and startpage=1)) \r\n\t\t\t\tand clang={$clang}  \r\n\t\t\torder by \r\n\t\t\t\tprior,name");
 for ($i = 0; $i < $sql->getRows(); $i++) {
     if ($sql->getValue("startpage") == 1) {
         $startpage = $I18N->msg("start_article");
         $icon = "liste.gif";
     } else {
         $startpage = $I18N->msg("article");
         $icon = "document.gif";
     }
     $pos++;
     // --------------------- ARTIKEL EDIT FORM
     if ($function == "edit" && $sql->getValue("id") == $article_id && $KATPERM) {
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:structure.inc.php

示例8: select

                    $gma->next();
                }
                $gaa_sel = new select();
                $gaa_sel->set_name("action_id");
                $gaa_sel->set_size(1);
                $gaa_sel->set_style("' class='inp100");
                for ($i = 0; $i < $gaa->getRows(); $i++) {
                    $gaa_sel->add_option($gaa->getValue("name") . " [" . $PREPOST[$gaa->getValue("prepost")] . "|" . $ASTATUS[$gaa->getValue("status")] . "]", $gaa->getValue("id"));
                    $gaa->next();
                }
                echo "<form action=index.php#action method=post>";
                echo "<input type=hidden name=page value=module>";
                echo "<input type=hidden name=modul_id value={$modul_id}>";
                echo "<input type=hidden name=function value=edit>";
                echo "<input type=hidden name=function_action value=add>";
                echo "<tr><td colspan=3></td></tr><tr>\r\n\t\t\t\t\t<td class=grey>&nbsp;</td>\r\n\t\t\t\t\t<td class=grey>" . $gaa_sel->out() . "</td>\r\n\t\t\t\t\t<td class=grey><input type=submit value='" . $I18N->msg("action_add") . "'></td>\r\n\t\t\t\t\t</tr>";
                echo "</form>";
            }
        }
        echo "</table>";
        $OUT = false;
    }
}
if ($OUT) {
    // ausgabe modulliste !
    echo "<table border=0 cellpadding=5 cellspacing=1 width=770>\r\n\t\t<tr>\r\n\t\t\t<th width=30><a href=index.php?page=module&function=add><img src=pics/modul_plus.gif width=16 height=16 border=0></a></th>\r\n\t\t\t<th align=left width=300>" . $I18N->msg("module_description") . "</th>\r\n\t\t\t<th align=left>" . $I18N->msg("module_functions") . "</th>\r\n\t\t\t<th align=left width=100>PHP</th>\r\n\t\t\t<th align=left width=100>HTML</th>\r\n\t\t</tr>\r\n\t\t";
    if ($message != "") {
        echo "<tr><td align=center class=warning><img src=pics/warning.gif width=16 height=16></td><td colspan=5 class=warning>{$message}</td></tr>";
    }
    $sql = new sql();
    $sql->setQuery("select * from rex_modultyp order by name");
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:module.modules.inc.php

示例9: htmlspecialchars

     $message = "";
 }
 if (isset($func) and $func == "addclang") {
     if (!isset($clang_id)) {
         $clang_id = '';
     }
     if (!isset($clang_name)) {
         $clang_name = '';
     }
     $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="subpage" value="lang">
       <input type="hidden" name="func" value="addclangsave">';
     echo '<td></td>';
     echo '<td>' . $sel->out() . '</td>';
     echo '<td><input type="text" size="10" class="inp100" name="clang_name" value="' . htmlspecialchars($clang_name) . '"></td>';
     echo '<td><input type="submit" value="' . $I18N->msg('add') . '"></td>';
     echo '</form></tr>';
 }
 reset($REX['CLANG']);
 for ($i = 0; $i < count($REX['CLANG']); $i++) {
     if (isset($clang_id) and $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="subpage" 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="' . htmlspecialchars(current($REX['CLANG'])) . '"></td>';
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:specials.inc.php

示例10: htmlentities

     $olinke = "</a>";
 }
 ####### UPLOAD TABLE
 print "<table border=0 cellpadding=5 cellspacing=1 width=100%>\n";
 print "<tr><th align=left colspan=3>Detailinformationen | {$opener_link}</th></tr>";
 print "<form name=rex_file_cat action=index.php method=POST ENCTYPE=multipart/form-data>\n";
 print "<input type=hidden name=page value=medienpool>\n";
 print "<input type=hidden name=media_method value=edit_file>\n";
 print "<input type=hidden name=mode value=detail>\n";
 print "<input type=hidden name=file_id value={$file_id}>\n";
 print "<tr><td class=grey width=100>Titel:</td><td class=grey><input type=text size=20 name=ftitle class=inp100 value='" . htmlentities(stripslashes($ftitle)) . "'></td>";
 if ($ffiletype_ii) {
     echo "<td rowspan=10 width=220 align=center class=lgrey valign=top><br>{$olinka}<img src=../files/{$fname} width={$rfwidth} border=0>{$olinke}</td>";
 }
 print "</tr>\n";
 print "<tr><td class=grey>" . $I18N->msg('pool_category') . ":</td><td class=grey>" . $cats_sel->out() . "</td></tr>\n";
 print "<tr><td class=grey valign=top>" . $I18N->msg('pool_description') . ":</td><td class=grey><textarea cols=30 rows=3 name=fdescription class=inp100>" . stripslashes($fdescription) . "</textarea></td></tr>\n";
 print "<tr><td class=grey>" . $I18N->msg('pool_copyright') . ":</td><td class=grey><input type=text size=20 name=fcopyright class=inp100 value='" . stripslashes($fcopyright) . "'></td></tr>\n";
 print "<tr><td class=grey>" . $I18N->msg('pool_filename') . ":</td><td class=grey><a href=../files/{$fname} target=_blank>{$fname}</a></td></tr>\n";
 print "<tr><td class=grey>" . $I18N->msg('pool_file_exchange') . ":</td><td class=grey><input type=file name=file_new size=30></td></tr>";
 // hier noch überprüfen ob grafik oder nicht und dann erst ausgeben
 if ($ffiletype_ii) {
     echo "<tr>\n                                <td class=lgrey>" . $I18N->msg('pool_img_width') . " W</td>\n                                <td class=lgrey>";
     if ($REX[IMAGEMAGICK]) {
         echo "<input type=field name=width size=5 value='{$fwidth}'> px";
     } else {
         echo "-";
     }
     echo "</td>\n                                </tr>";
     echo "<tr>\n                                <td class=lgrey>" . $I18N->msg('pool_img_height') . " H</td>\n                                <td class=lgrey>";
     if ($REX[IMAGEMAGICK]) {
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:medienpool.inc.php

示例11: substr

                    $export_archives[] = substr($file, 0, -7);
                    $exports_found = true;
                }
            }
            closedir($handle);
        }
        foreach ($export_sqls as $sql_export) {
            // Es ist ein Export Archiv + SQL File vorhanden
            if (in_array($sql_export, $export_archives)) {
                $sel_export->add_option($sql_export, $sql_export);
            }
        }
    }
    echo "\n                  <tr>\n                    <td width=50 align=right><input type=radio id=dbanlegen[0] name=dbanlegen value=0 {$dbchecked0}></td>\n                    <td><label for='dbanlegen[0]'>" . $I18N->msg("setup_034") . "</label></td>\n                  </tr>\n                  <tr>  <td align=right><input type=radio id=dbanlegen[1] name=dbanlegen value=1 {$dbchecked1}></td>\n                    <td><label for='dbanlegen[1]'>" . $I18N->msg("setup_035") . "</label></td>\n                  </tr>\n                  <tr>\n                    <td align=right><input type=radio id=dbanlegen[2] name=dbanlegen value=2 {$dbchecked2}></td>\n                    <td><label for='dbanlegen[2]'>" . $I18N->msg("setup_036") . "</label></td>\n                  </tr>";
    if ($exports_found) {
        echo "\n                  <tr>\n                    <td align=right><input type=radio id=dbanlegen[3] name=dbanlegen value=3 {$dbchecked3}></td>\n                    <td>\n                      <label for='dbanlegen[3]'>" . $I18N->msg("setup_037") . "</label>\n                    </td>\n                  </tr>\n                  <tr>\n                    <td>&nbsp;</td>\n                    <td valign=middle>" . $sel_export->out() . "</td>\n                  </tr>";
    }
    echo "\n                  <tr>\n                    <td>&nbsp;</td>\n                    <td valign=middle><input type=submit value='" . $I18N->msg("setup_038") . "'></td>\n                  </tr>\n                  </table><br>";
}
// ---------------------------------- MODUS 4 | User anlegen ...
if ($checkmodus == 4 && $send == 1) {
    $err_msg = "";
    if ($noadmin != 1) {
        if ($redaxo_user_login == '') {
            $err_msg .= $I18N->msg("setup_040") . "<br>";
        }
        if ($redaxo_user_pass == '') {
            $err_msg .= $I18N->msg("setup_041") . "<br>";
        }
        if ($err_msg == "") {
            $ga = new sql();
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:setup.inc.php

示例12: elseif

      <td>
        ' . $sel_cat->out() . '<br />' . $I18N->msg("ctrl") . '
      </td>
      <td valign="top">' . $I18N->msg("mediafolder") . '</td>
      <td>
        ' . $sel_media->out() . '<br />' . $I18N->msg("ctrl") . '
      </td>
    </tr>
    <tr>
      <td valign="top">' . $I18N->msg("modules") . '</td>
      <td>
        ' . $sel_module->out() . '<br />' . $I18N->msg("ctrl") . '
      </td>
      <td valign="top">' . $I18N->msg("extras") . '</td>
      <td>
        ' . $sel_extra->out() . '<br />' . $I18N->msg("ctrl") . '
      </td>
    </tr>
    
    <tr>
      <td>&nbsp;</td>
      <td colspan="3"><input type="submit" name="function" value="' . $I18N->msg("add_user") . '"></td>
    </tr>
    </form>
    </table>' . "\n";
} elseif (isset($user_id) and $user_id != '') {
    $sql = new rex_login_sql();
    $sql->setQuery("select * from " . $REX['TABLE_PREFIX'] . "user where user_id='{$user_id}'");
    if ($sql->getRows() == 1) {
        // ----- EINLESEN DER PERMS
        if ($sql->isValueOf("rights", "admin[]")) {
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:user.inc.php

示例13: getArticle

 function getArticle()
 {
     global $module_id, $FORM, $REX_USER, $REX, $REX_SESSION, $REX_ACTION, $I18N;
     if ($REX[GG]) {
         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) {
             // ---------- select alle slices eines artikels
             $sql = "select rex_modultyp.id, rex_modultyp.name, rex_modultyp.ausgabe, rex_modultyp.eingabe, rex_modultyp.php_enable, rex_modultyp.html_enable, rex_article_slice.*, rex_article.re_id\r\n\t\t\t\t\tfrom\r\n\t\t\t\t\t\trex_article_slice\r\n\t\t\t\t\tleft join rex_modultyp on rex_article_slice.modultyp_id=rex_modultyp.id\r\n\t\t\t\t\tleft join rex_article on rex_article_slice.article_id=rex_article.id\r\n\t\t\t\t\twhere\r\n\t\t\t\t\t\trex_article_slice.article_id='" . $this->article_id . "' and \r\n\t\t\t\t\t\trex_article_slice.clang='" . $this->clang . "' and \r\n\t\t\t\t\t\trex_article.clang='" . $this->clang . "' \r\n\t\t\t\t\torder by\r\n\t\t\t\t\t\trex_article_slice.re_article_slice_id";
             $this->CONT = new sql();
             $this->CONT->setQuery($sql);
             // ---------- SLICE IDS/MODUL SETZEN
             for ($i = 0; $i < $this->CONT->getRows(); $i++) {
                 $RE_CONTS[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_article_slice.id");
                 $RE_CONTS_CTYPE[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_article_slice.ctype");
                 $RE_MODUL_OUT[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_modultyp.ausgabe");
                 $RE_MODUL_IN[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_modultyp.eingabe");
                 $RE_MODUL_ID[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_modultyp.id");
                 $RE_MODUL_NAME[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_modultyp.name");
                 $RE_C[$this->CONT->getValue("re_article_slice_id")] = $i;
                 $this->CONT->nextValue();
             }
             // ---------- moduleselect
             if ($this->mode == "edit") {
                 $MODULE = new sql();
                 $MODULE->setQuery("select * from rex_modultyp {$add_sql} order by name");
                 $MODULESELECT = new select();
                 $MODULESELECT->set_name("module_id");
                 $MODULESELECT->set_size(1);
                 $MODULESELECT->set_style("width:100%;' 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[]") || $REX_USER->isValueOf("rights", "dev[]")) {
                         $MODULESELECT->add_option($MODULE->getValue("name"), $MODULE->getValue("id"));
                     }
                     $MODULE->next();
                 }
             }
             // ---------- SLICE IDS SORTIEREN UND AUSGEBEN
             $I_ID = 0;
             $PRE_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++) {
                 // ------------- 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\t\t\t\t\t\t<table cellspacing=0 cellpadding=5 border=0 width=100%>\r\n\t\t\t\t\t\t<form action=index.php";
                     if ($this->setanker) {
                         $amodule .= "#addslice";
                     }
                     $amodule .= " method=get>\r\n\t\t\t\t\t\t<input type=hidden name=article_id value={$this->article_id}>\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=mode value={$this->mode}>\r\n\t\t\t\t\t\t<input type=hidden name=slice_id value={$I_ID}>\r\n\t\t\t\t\t\t<input type=hidden name=function value=add>\r\n\t\t\t\t\t\t<input type=hidden name=clang value=" . $this->clang . ">\r\n\t\t\t\t\t\t<input type=hidden name=ctype value=" . $this->ctype . ">\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class=dblue>" . $MODULESELECT->out() . "</td>\r\n\t\t\t\t\t\t</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[]") || $REX_USER->isValueOf("rights", "dev[]")) {
                         // hat rechte zum edit und delete
                         $mne = "\r\n\t\t\t\t\t\t\t\t<a name=slice{$RE_CONTS[$I_ID]}></a>\r\n\t\t\t\t\t\t\t\t<table width=100% cellspacing=0 cellpadding=5 border=0>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td class=blue width=380><b>{$RE_MODUL_NAME[$I_ID]}</b></td>\r\n\t\t\t\t\t\t\t\t<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\t\t\t\t\t\t\t\t<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 . " 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 . " 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]) {
                             $slice_content .= $this->editSlice($RE_CONTS[$I_ID], $RE_MODUL_IN[$I_ID]);
                         } else {
                             $slice_content .= $RE_MODUL_OUT[$I_ID];
                         }
                         $slice_content .= $tbl_bott;
                         $slice_content = $this->sliceIn($slice_content);
                     } else {
                         // hat keine rechte an diesem modul
                         $mne = "\r\n\t\t\t\t\t\t\t\t<table width=100% cellspacing=0 cellpadding=5 border=0>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td class=blue><b>{$RE_MODUL_NAME[$I_ID]}</b> | <b>" . $I18N->msg('no_editing_rights') . "</b></td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t</table>";
                         $slice_content .= $mne . $tbl_head . $RE_MODUL_OUT[$I_ID] . $tbl_bott;
                         $slice_content = $this->sliceIn($slice_content);
                     }
                 } else {
                     // wenn mode nicht edit
                     $slice_content .= $RE_MODUL_OUT[$I_ID];
                     $slice_content = $this->sliceIn($slice_content);
                 }
                 // --------------- ENDE EINZELNER SLICE
                 // ---------- slice in ausgabe speichern wenn ctype richtig
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:101,代码来源:class.article.inc.php

示例14:

                        $status .= "|" . $ASTATUS[1];
                    }
                    if ($gaa->getValue("sdelete") == 1) {
                        $status .= "|" . $ASTATUS[2];
                    }
                    $gaa_sel->add_option($gaa->getValue("name") . " [" . $PREPOST[$gaa->getValue("prepost")] . "{$status}]", $gaa->getValue("id"));
                    $gaa->next();
                }
                echo '<form action="index.php#action" method="post">';
                echo '<input type="hidden" name="page" value="module">';
                echo '<input type="hidden" name="modul_id" value="' . $modul_id . '">';
                echo '<input type="hidden" name="function" value="edit">';
                echo '<input type="hidden" name="function_action" value="add">';
                echo '<tr><td colspan="3"></td></tr><tr>
          <td>&nbsp;</td>
          <td>' . $gaa_sel->out() . '</td>
          <td><input type="submit" value="' . $I18N->msg("action_add") . '"></td>
          </tr>' . "\n";
                echo '</form>';
            }
        }
        echo '</table>';
        $OUT = false;
    }
}
if ($OUT) {
    // ausgabe modulliste !
    echo '<table class="rex" style="table-layout:auto;" cellpadding="5" cellspacing="1">
    <tr>
      <th class="icon"><a href="index.php?page=module&amp;function=add"><img src="pics/modul_plus.gif" width="16" height="16" border="0" alt="' . $I18N->msg("create_module") . '" title="' . $I18N->msg("create_module") . '"></a></th>
      <th class="icon">ID</th>
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:module.modules.inc.php

示例15: 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


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