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 {
 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) {
 }
 $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 {
 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;
                             $slice_content = $this->sliceIn($slice_content);
                             // $slice_content .= "**";
                             $this->mode = "edit";
                         } else {
                             if (($RE_MODUL_PHP[$I_ID] == 0 || $MODULE_PERM[php]) && ($RE_MODUL_HTML[$I_ID] == 0 || $MODULE_PERM[html])) {
                                 $slice_content .= $fmenue . $tbl_head . $RE_MODUL_OUT[$I_ID] . $tbl_bott;
                             } else {
                                 $slice_content .= $p_menue . $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
                 $this->article_content .= $slice_content;
                 // zum nachsten slice
                 $I_ID = $RE_CONTS[$I_ID];
                 $PRE_ID = $I_ID;
             }
             if ($this->mode == "edit") {
                 $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>";
                 if ($this->function == "add" && $this->slice_id == $I_ID) {
                     $slice_content = $this->addSlice($I_ID, $module_id);
                 } else {
                     $slice_content = $amodule;
                 }
                 $this->article_content .= $slice_content;
             }
             // -------------------------- schreibe content
             if ($REX[RC]) {
                 return $this->article_content;
             } else {
                 eval("?>" . $this->article_content);
             }
         } else {
             return $I18N->msg('no_article_available');
         }
     }
 }
Example #5
0
        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 = "";
        }
        <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;
    }
}
     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) {
                    $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");
     $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>';
     $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]) {
Example #11
0
                    $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();
Example #12
0
      <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[]")) {
 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
                 if ($this->ctype == "" or $this->ctype == $RE_CONTS_CTYPE[$I_ID]) {
                     $this->article_content .= $slice_content;
                 }
                 // zum nachsten slice
                 $I_ID = $RE_CONTS[$I_ID];
                 $PRE_ID = $I_ID;
             }
             if ($this->mode == "edit") {
                 $amodule = "\r\n\t\t\t\t\t<table cellspacing=0 cellpadding=5 border=0 width=100%>\r\n\t\t\t\t\t<form action=index.php";
                 if ($this->setanker) {
                     $amodule .= "#addslice";
                 }
                 $amodule .= " method=get>\r\n\t\t\t\t\t<input type=hidden name=article_id value={$this->article_id}>\r\n\t\t\t\t\t<input type=hidden name=page value=content>\r\n\t\t\t\t\t<input type=hidden name=mode value={$this->mode}>\r\n\t\t\t\t\t<input type=hidden name=slice_id value={$I_ID}>\r\n\t\t\t\t\t<input type=hidden name=function value=add>\r\n\t\t\t\t\t<input type=hidden name=clang value=" . $this->clang . ">\r\n\t\t\t\t\t<input type=hidden name=ctype value=" . $this->ctype . ">\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=dblue>" . $MODULESELECT->out() . "</td>\r\n\t\t\t\t\t</tr></form></table>";
                 if ($this->function == "add" && $this->slice_id == $I_ID) {
                     $slice_content = $this->addSlice($I_ID, $module_id);
                 } else {
                     $slice_content = $amodule;
                 }
                 $this->article_content .= $slice_content;
             }
             // -------------------------- schreibe content
             if ($REX[RC]) {
                 return $this->article_content;
             } else {
                 eval("?>" . $this->article_content);
             }
         } else {
             return $I18N->msg('no_article_available');
         }
     }
 }
                        $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>
 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]) {
                             $slice_content .= $this->editSlice($RE_CONTS[$I_ID], $RE_MODUL_IN[$I_ID], $RE_CONTS_CTYPE[$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                <table width=100% cellspacing=0 cellpadding=5 border=0>\r\n                <tr>\r\n                <td class=blue><b>{$RE_MODUL_NAME[$I_ID]}</b> | <b>" . $I18N->msg('no_editing_rights') . "</b></td>\r\n                </tr>\r\n                </table>";
                         $slice_content .= $mne . $tbl_head . $RE_MODUL_OUT[$I_ID] . $tbl_bott;
                         $slice_content = $this->sliceIn($slice_content);
                     }
                 } else {
                     // ----- wenn mode nicht edit
                     if ($this->getSlice) {
                         while (list($k, $v) = each($RE_CONTS)) {
                             $I_ID = $k;
                         }
                     }
                     $slice_content .= $RE_MODUL_OUT[$I_ID];
                     $slice_content = $this->sliceIn($slice_content);
                 }
                 // --------------- ENDE EINZELNER SLICE
                 // ---------- slice in ausgabe speichern wenn ctype richtig
                 if ($this->ctype == -1 or $this->ctype == $RE_CONTS_CTYPE[$I_ID]) {
                     $this->article_content .= $slice_content;
                     // last content type slice id
                     $LCTSL_ID = $RE_CONTS[$I_ID];
                 }
                 // ----- zwischenstand: ctype .. wenn ctype neu dann if
                 if ($this->mode != "edit" && isset($RE_CONTS_CTYPE[$RE_CONTS[$I_ID]]) && $RE_CONTS_CTYPE[$I_ID] != $RE_CONTS_CTYPE[$RE_CONTS[$I_ID]] && $RE_CONTS_CTYPE[$RE_CONTS[$I_ID]] != "") {
                     $this->article_content .= "<?php } if(\$" . $this->ctype_var . " == '" . $RE_CONTS_CTYPE[$RE_CONTS[$I_ID]] . "' || \$" . $this->ctype_var . " == '-1'){ ?>";
                 }
                 // zum nachsten slice
                 $I_ID = $RE_CONTS[$I_ID];
                 $PRE_ID = $I_ID;
             }
             // ----- end: ctype unterscheidung
             if ($this->mode != "edit" && $i > 0) {
                 $this->article_content .= "<?php } ?>";
             }
             // ----- add module im edit mode
             if ($this->mode == "edit") {
                 if ($this->function == "add" && $this->slice_id == $LCTSL_ID) {
                     $slice_content = $this->addSlice($LCTSL_ID, $module_id);
                 } else {
                     $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={$LCTSL_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>";
                     $slice_content = $amodule;
                 }
                 $this->article_content .= $slice_content;
             }
             // -------------------------- schreibe content
             if (isset($REX['RC']) and $REX['RC']) {
                 echo $this->article_content;
             } else {
                 eval("?>" . $this->article_content);
             }
         } else {
             echo $I18N->msg('no_article_available');
         }
     }
     // ----- end: article caching
     $CONTENT = ob_get_contents();
     ob_end_clean();
     return $CONTENT;
 }
Example #16
0
         $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()) {
         foreach ($cats as $cat) {
             add_cat_options($move_a, $cat, $cat_ids);
 $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') . ">";
         if ($clang_id > 0) {
             echo "<input type=submit name=delclang value=delete onclick='return confirm(\"" . $I18N->msg('delete') . " ?\")'>";
         }
        }
        $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>";
    }
    $sql = new sql();
    $sql->setQuery("select * from rex_action order by name");
Example #19
0
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 
}