Esempio n. 1
0
     $lang_a = new select();
     $lang_a->set_name("clang_a");
     $lang_a->set_style("width:100px;");
     $lang_a->set_size(1);
     foreach ($REX['CLANG'] as $val => $key) {
         $lang_a->add_option($key, $val);
     }
     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");
                    echo "<tr>\r\n\t\t\t\t\t\t<td class=grey>&nbsp;</td>\r\n\t\t\t\t\t\t<td class=grey>";
                    echo "<a href=index.php?page=module&subpage=actions&action_id={$action_id}&function=edit>" . $gma->getValue("name") . "</a>";
                    echo " [";
                    echo $PREPOST[$gma->getValue("prepost")] . "|";
                    echo $ASTATUS[$gma->getValue("status")];
                    echo "] </td>";
                    echo "<td class=grey><a href=index.php?page=module&modul_id={$modul_id}&function_action=delete&function=edit&iaction_id={$iaction_id}>" . $I18N->msg("action_delete") . "</a></td>";
                    echo "</tr>";
                    $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;
    }
}
            $add .= "<a href=index.php?page=simple_shop&clang={$key}" . $langswitchadd . " >{$val}</a> | ";
        }
    }
    $add .= "</b></td></tr></table>";
    echo $add;
}
// ----------------------->  Suche der Artikel über die Kategorien
$sel_cat = new select();
$sel_cat->set_style("width:100%;");
$sel_cat->set_size(1);
$sel_cat->set_name("articlesearch");
$sel_cat->set_id("articlesearch");
$sel_cat->set_selected($articlesearch);
//  $STYLE= "onchange='document.forms[0].submit();'";
$sel_cat->set_selectextra('onchange="document.forms[0].submit();"');
$sel_cat->add_option($I18N_SIMPLE_SHOP->msg("please_choose_a_cat"), "100000000000000000");
$cat_ids = array();
if ($rootCats = OOCategory::getRootCategories()) {
    foreach ($rootCats as $rootCat) {
        add_cat_options($sel_cat, $rootCat, $cat_ids);
    }
}
echo "\n  <table class=rex border=0 cellpadding=5 cellspacing=1 width=770>\n  <tr>\n    <th class=icon>&nbsp;</th>\n    <th colspan=2 align=left>" . $I18N_SIMPLE_SHOP->msg("product_overview") . "</th>\n  </tr>\n  <tr>\n    <form action='index.php' method='post' name=catsearch>\n    <input type='hidden' name='page' value='" . $mypage . "' />\n    <input type='hidden' name='clang' value='" . $clang . "' />\n      \n    <td class=grey>&nbsp;</td>\n    <td class=grey width=280>\n      " . $sel_cat->out() . "\n    </td>\n    <td class=grey>\n      <table border=0 cellspacing=0 cellpadding=0>\n      <td>\n      <input type=submit name='cs' value='" . $I18N_SIMPLE_SHOP->msg("show") . "' />\n      </td></form><form action='index.php' method='post' name=catsearch>\n        <input type='hidden' name='clang' value='" . $clang . "' />\n        <input type='hidden' name='page' value='" . $mypage . "' />\n        <input type='hidden' name='articlesearch' value='' />\n      <td>\n        <input type=submit name='cs' value='" . $I18N_SIMPLE_SHOP->msg("show_all") . "' />\n      </td></form><form action='index.php' method='post' name=catsearch>\n        <input type='hidden' name='clang' value='" . $clang . "' />\n        <input type='hidden' name='page' value='" . $mypage . "' />\n        <input type='hidden' name='articlesearch' value='0' />\n      <td>\n        <input type=submit name='cs' value='" . $I18N_SIMPLE_SHOP->msg("show_wo_cat") . "' />\n      </td></form>\n      </table>\n    </td>\n  </tr>\n  </table>";
$STYLE = "";
if ($function == "edit_article") {
    // ---------------> Artikel wird editiert oder angelegt
    $sel_cat = new select();
    $sel_cat->multiple(1);
    $sel_cat->set_style("width:100%;");
    $sel_cat->set_size(20);
    $sel_cat->set_name("article[cat][]");
         $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++) {
             $status = "";
             if ($gaa->getValue("sadd") == 1) {
                 $status .= "|" . $ASTATUS[0];
             }
             if ($gaa->getValue("sedit") == 1) {
                 $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>';
     }
 }
 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');
         }
     }
 }
        }
    }
    $KAT->next();
}
echo $echo;
echo "</table>";
// --------------------------------------------- ARTIKEL LISTE
// --------------------- READ TEMPLATES
if ($category_id > -1) {
    $TEMPLATES = new sql();
    $TEMPLATES->setQuery("select * from " . $REX['TABLE_PREFIX'] . "template order by name");
    $TMPL_SEL = new select();
    $TMPL_SEL->set_name("template_id");
    $TMPL_SEL->set_size(1);
    $TMPL_SEL->set_style("width:150");
    $TMPL_SEL->add_option($I18N->msg("option_no_template"), "0");
    for ($i = 0; $i < $TEMPLATES->getRows(); $i++) {
        if ($TEMPLATES->getValue("active") == 1) {
            $TMPL_SEL->add_option($TEMPLATES->getValue("name"), $TEMPLATES->getValue("id"));
        }
        $TEMPLATE_NAME[$TEMPLATES->getValue("id")] = $TEMPLATES->getValue("name");
        $TEMPLATES->nextValue();
    }
    $TEMPLATE_NAME[0] = $I18N->msg("template_default_name");
    // --------------------- ARTIKEL LIST
    echo "  <br><table class=rex style=table-layout:auto; cellpadding=5 cellspacing=1>\r\n      <tr>\r\n        <th class=icon>";
    if ($KATPERM && !$REX_USER->isValueOf("rights", "editContentOnly[]")) {
        echo "<a href=index.php?page=structure&category_id={$category_id}&function=add_art&clang={$clang}><img src=pics/document_plus.gif width=16 height=16 border=0 alt=\"" . $I18N->msg("article_add") . "\" title=\"" . $I18N->msg("article_add") . "\"></a>";
    } else {
        echo "&nbsp;";
    }
         }
     } else {
         $message = $I18N->msg("enter_name");
         $func = "addclang";
     }
 } elseif ($func == "editclangsave") {
     rex_editCLang($clang_id, $clang_name);
     $message = $I18N->msg("clang_edited");
     unset($func);
     unset($clang_id);
 }
 // seltype
 $sel = new select();
 $sel->set_name("clang_id");
 $sel->set_size(1);
 $sel->add_option("1", "1");
 $sel->add_option("2", "2");
 $sel->add_option("3", "3");
 $sel->add_option("4", "4");
 $sel->add_option("5", "5");
 $sel->add_option("6", "6");
 $sel->add_option("7", "7");
 $sel->add_option("8", "8");
 $sel->add_option("8", "8");
 $sel->add_option("9", "9");
 $sel->add_option("10", "10");
 $sel->add_option("11", "11");
 $sel->add_option("12", "12");
 $sel->add_option("13", "13");
 $sel->set_style("width:40px");
 echo "<table class=rex style=table-layout:auto; cellpadding=5 cellspacing=1>\r\n           <tr>\r\n\t\t\t<th class=icon><a href=index.php?page=specials&spage=lang&func=addclang#clang>+</a></th>\r\n\t\t\t<th style='width:40px; text-align:center;'>ID</th>\r\n\t\t\t<th width=250>" . $I18N->msg("clang_desc") . "</th>\r\n\t\t\t<th colspan=2>-</th></tr>";
 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');
         }
     }
 }
Esempio n. 9
0
     $size = getimagesize($REX[INCLUDE_PATH] . "/../../files/{$fname}");
     $fwidth = $size[0];
     $fheight = $size[1];
     if ($fwidth > 199) {
         $rfwidth = 200;
     } else {
         $rfwidth = $fwidth;
     }
 }
 $cats = new sql();
 $cats->setQuery("SELECT * FROM rex_file_category ORDER BY name ASC");
 $cats_sel = new select();
 $cats_sel->set_name("rex_file_category");
 $cats_sel->set_size(1);
 $cats_sel->set_style("' class='inp100");
 $cats_sel->add_option($I18N->msg('pool_kats_no'), "0");
 for ($i = 0; $i < $cats->getRows(); $i++) {
     $cats_sel->add_option($cats->getValue("name"), $cats->getValue("id"));
     $cats->next();
 }
 $cats_sel->set_selected($rex_file_category);
 if ($msg != "") {
     print "<table border=0 cellpadding=3 cellspacing=0 width=100%><tr><td width=20 class=warning><img src=pics/warning.gif width=16 height=16></td><td class=warning>{$msg}</td></tr><tr><td colspan=2></td></tr></table>";
     $msg = "";
 }
 // INPUT FIELD
 if ($_SESSION[myarea] == '') {
     $opener_link = "<a href=javascript:void(0) onClick=selectMedia('" . $fname . "');>" . $I18N->msg('pool_file_get') . "</a>";
     $olinka = "<a href=javascript:void(0) onClick=selectMedia('" . $fname . "');>";
 } else {
     // GET HTML WRAP FROM CONFIG FILE
 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;
 }
Esempio n. 11
0
     } else {
         $message = $I18N->msg("enter_name");
         $func = "addclang";
     }
 } elseif (isset($func) and $func == "editclangsave") {
     rex_editCLang($clang_id, $clang_name);
     $message = $I18N->msg("clang_edited");
     unset($func);
     unset($clang_id);
 }
 // seltype
 $sel = new select();
 $sel->set_name("clang_id");
 $sel->set_size(1);
 foreach (array_diff(range(0, 14), array_keys($REX['CLANG'])) as $clang) {
     $sel->add_option($clang, $clang);
 }
 $sel->set_style("width:40px");
 echo '<table class="rex" style="table-layout:auto;" cellpadding="5" cellspacing="1">
        <tr>
   <th class="icon"><a href="index.php?page=specials&amp;subpage=lang&amp;func=addclang#clang">+</a></th>
   <th style="width:40px; text-align:center;">ID</th>
   <th width="250">' . $I18N->msg("clang_desc") . '</th>
   <th colspan="2">-</th></tr>';
 if (isset($message) and $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 (isset($func) and $func == "addclang") {
     if (!isset($clang_id)) {
         $clang_id = '';
Esempio n. 12
0
                $isSql = substr($file, strlen($file) - 4) == '.sql';
                $isArchive = substr($file, strlen($file) - 7) == '.tar.gz';
                if ($isSql) {
                    $export_sqls[] = substr($file, 0, -4);
                    $exports_found = true;
                } elseif ($isArchive) {
                    $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>";
Esempio n. 13
0
    $sel_module->add_option($name, $sqlmodule->getValue("id"));
    $sqlmodule->next();
}
// extrarechte - von den addons übergeben
$sel_extra = new select();
$sel_extra->multiple(1);
$sel_extra->set_style("width:250px; height: 150px;");
$sel_extra->set_size(10);
$sel_extra->set_name("userperm_extra[]");
$sel_extra->set_id("userperm_extra");
if (isset($REX['EXTRAPERM'])) {
    for ($i = 0; $i < count($REX['EXTRAPERM']); $i++) {
        if ($i == 0) {
            reset($REX['EXTRAPERM']);
        }
        $sel_extra->add_option(current($REX['EXTRAPERM']), current($REX['EXTRAPERM']));
        next($REX['EXTRAPERM']);
    }
}
// --------------------------------- Title
rex_title($I18N->msg("title_user"), "");
// --------------------------------- FUNCTIONS
if (isset($FUNC_UPDATE) && $FUNC_UPDATE != '' || (isset($FUNC_APPLY) and $FUNC_APPLY != '')) {
    $updateuser = new sql();
    $updateuser->setTable($REX['TABLE_PREFIX'] . "user");
    $updateuser->where("user_id='{$user_id}'");
    $updateuser->setValue("name", $username);
    $updateuser->setValue("updatedate", time());
    $updateuser->setValue("updateuser", $REX_USER->getValue("login"));
    if ($REX['PSWFUNC'] != "" && $userpsw != $sql->getValue($REX['TABLE_PREFIX'] . "user.psw")) {
        $userpsw = call_user_func($REX['PSWFUNC'], $userpsw);
                $msg .= $I18N->msg('pool_file_not_found');
                $subpage = "";
            }
            $msg .= "<br>";
        }
    } else {
        $msg = $I18N->msg('pool_selectedmedia_error');
    }
}
// *************************************** SUBPAGE: "" -> MEDIEN ANZEIGEN
if (!isset($subpage) or $subpage == '') {
    $cats_sel = new select();
    $cats_sel->set_style("width:150px;");
    $cats_sel->set_size(1);
    $cats_sel->set_name("rex_file_category");
    $cats_sel->add_option($I18N->msg('pool_kats_no'), "0");
    $mediacat_ids = array();
    $rootCat = 0;
    if ($rootCats = OOMediaCategory::getRootCategories()) {
        foreach ($rootCats as $rootCat) {
            add_mediacat_options_wperm($cats_sel, $rootCat, $mediacat_ids);
        }
    }
    $cats_sel->set_selected($rex_file_category);
    echo "<table width=100% cellpadding=5 cellspacing=1 border=0 ><tr><td class=grey><b class=head>" . $I18N->msg('pool_file_list') . "</b></td></tr><tr><td></td></tr></table>";
    echo $cat_out;
    print "<table class=rex border=0 cellpadding=5 cellspacing=1 style='width:100%'>\n";
    print "<tr>\r\n    <th align=left class=icon></th>\r\n    <th align=left width=80><b>" . $I18N->msg('pool_file_thumbnail') . "</b></th>\r\n    <th align=left><b>" . $I18N->msg('pool_file_info') . "/ " . $I18N->msg('pool_file_description') . "</b></th>\r\n    <th align=left width=150><b>" . $I18N->msg('pool_file_functions') . "</b></th>\r\n    </tr>\n";
    if (isset($msg) and $msg != "") {
        print "<tr class=warning><td align=center><img src=pics/warning.gif width=16 height=16></td><td class=warning colspan=3>{$msg}</td></tr>";
        $msg = "";
Esempio n. 15
0
         $meta_sql->setValue("file", '');
     }
     // ----------------------------- / FILE UPLOAD
     $meta_sql->update();
     $article->setQuery("select * from rex_article where id='{$article_id}'");
     $err_msg = $I18N->msg("metadata_updated") . $message;
     generateArticle($article_id);
 }
 $typesel = new select();
 $typesel->set_name("type_id");
 $typesel->set_style("width:100%;");
 $typesel->set_size(1);
 $typesql = new sql();
 $typesql->setQuery("select * from rex_article_type order by name");
 for ($i = 0; $i < $typesql->getRows(); $i++) {
     $typesel->add_option($typesql->getValue("name"), $typesql->getValue("type_id"));
     $typesql->next();
 }
 $typesel->set_selected($article->getValue("type_id"));
 if ($typesql->getRows() == 1) {
     $out = "<input type=hidden name=type_id value=1>";
 } else {
     $out = "<tr><td class=grey>" . $I18N->msg("article_type_list_name") . "</td><td class=grey>" . $typesel->out() . "</td></tr>";
 }
 echo "\t<table border=0 cellpadding=5 cellspacing=1 width=100%>\r\n\t\t\t\t<form action=index.php method=post ENCTYPE=multipart/form-data>\r\n\t\t\t\t<input type=hidden name=page value=content>\r\n\t\t\t\t<input type=hidden name=article_id value='{$article_id}'>\r\n\t\t\t\t<input type=hidden name=mode value='meta'>\r\n\t\t\t\t<input type=hidden name=save value=1>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td colspan=2>" . $I18N->msg("general") . "</td>\r\n\t\t\t\t</tr>";
 if ($err_msg != "") {
     echo "<tr><td colspan=2 class=warning><font class=warning>{$err_msg}</font></td></tr>";
 }
 echo "\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=grey width=150>" . $I18N->msg("online_from") . "</td>\r\n\t\t\t\t\t<td class=grey>" . selectdate($article->getValue("online_von"), "_von") . "</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=grey>" . $I18N->msg("online_to") . "</td>\r\n\t\t\t\t\t<td class=grey>" . selectdate($article->getValue("online_bis"), "_bis") . "</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=grey>" . $I18N->msg("name_description") . "</td>\r\n\t\t\t\t\t<td class=grey><input type=text name=article_name value=\"" . htmlentities($article->getValue("name")) . "\" size=30 style=\"width:100%;\"></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=grey>" . $I18N->msg("description") . "</td>\r\n\t\t\t\t\t<td class=grey><textarea name=beschreibung cols=30 rows=5 style='width:100%;'>" . htmlentities($article->getValue("beschreibung")) . "</textarea></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=grey>" . $I18N->msg("keywords") . "</td>\r\n\t\t\t\t\t<td class=grey><textarea name=suchbegriffe cols=30 rows=5 style='width:100%;'>" . htmlentities($article->getValue("suchbegriffe")) . "</textarea></td>\r\n\t\t\t\t</tr>";
 if ($article->getValue("file") != "") {
     echo "<tr>\r\n\t\t\t\t\t<td class=grey>" . $I18N->msg("metadata_image") . "</td>\r\n\t\t\t\t\t<td class=grey><img src=../files/" . $article->getValue("file") . " width=250></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=grey align=right><input type=checkbox name=METAFILEDEL></td>\r\n\t\t\t\t\t<td class=grey>" . $I18N->msg("delete_file") . "</td>\r\n\t\t\t\t</tr>";
            // 0=pre / 1=post
            $status = 0;
            // 0=add / 1=edit / 2=delete
        }
        if ($message != "") {
            echo "<tr><td colspan=3 class=warning>{$message}</td></tr>";
        }
        $sel_prepost = new select();
        $sel_prepost->set_name("prepost");
        $sel_prepost->add_option($PREPOST[0], "0");
        $sel_prepost->add_option($PREPOST[1], "1");
        $sel_prepost->set_size(1);
        $sel_prepost->set_selected($prepost);
        $sel_status = new select();
        $sel_status->set_name("status");
        $sel_status->add_option($ASTATUS[0], "0");
        $sel_status->add_option($ASTATUS[1], "1");
        $sel_status->add_option($ASTATUS[2], "2");
        $sel_status->set_size(1);
        $sel_status->set_selected($status);
        echo "\t\n\t\t\t<form action=index.php method=post>\n\t\t\t<input type=hidden name=page value=module>\n\t\t\t<input type=hidden name=subpage value=actions>\n\t\t\t<input type=hidden name=function value={$function}>\n\t\t\t<input type=hidden name=save value=ja>\n\t\t\t<input type=hidden name=action_id value={$action_id}>\n\t\t\t<tr>\n\t\t\t\t<td width=100 class=grey>" . $I18N->msg("action_name") . "</td>\n\t\t\t\t<td class=grey colspan=2><input type=text size=10 name=mname value=\"" . htmlentities($mname) . "\" style='width:100%;'></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td valign=top class=grey>" . $I18N->msg("input") . "</td>\n\t\t\t\t<td class=grey colspan=2><textarea cols=20 rows=70 name=actioninput style='width:100%; height: 150;'>" . htmlentities($actioninput) . "</textarea></td>\n\t\t\t</tr>";
        echo "\n\t\t\t<tr>\n\t\t\t\t<td align=right valign=middle class=grey>{$PREPOST['0']}/{$PREPOST['1']}</td>\n\t\t\t\t<td valign=middle class=grey colspan=2>" . $sel_prepost->out() . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td align=right valign=middle class=grey>STATUS</td>\n\t\t\t\t<td valign=middle class=grey colspan=2>" . $sel_status->out() . "</td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td class=grey>&nbsp;</td>\n\t\t\t\t<td class=grey width=200><input type=submit value='" . $I18N->msg("save_action_and_quit") . "'></td>\n\t\t\t\t<td class=grey>";
        if ($function != "add") {
            echo "<input type=submit name=goon value='" . $I18N->msg("save_action_and_continue") . "'>";
        }
        echo "</td>\n\t\t\t</tr>\n\t\t\t</form>\n\t\t\t</table>";
        $OUT = false;
    }
}
if ($OUT) {
    // ausgabe actionsliste !
Esempio n. 17
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 
}