echo "<table border=0 cellpadding=5 cellspacing=1 width=100%>\n <tr>\n <td colspan=3>" . $I18N->msg("other_functions") . "</td>\n </tr>"; // --------------------------------------------------- INHALTE KOPIEREN START if (($REX_USER->isValueOf("rights", "admin[]") || $REX_USER->isValueOf("rights", "copyContent[]")) && count($REX['CLANG']) > 1) { echo "\n <form action=index.php method=get>\n <input type=hidden name=page value=content>\n <input type=hidden name=article_id value='{$article_id}'>\n <input type=hidden name=mode value='meta'>\n <input type=hidden name=clang value={$clang}>\n <input type=hidden name=ctype value={$ctype}>\n <input type=hidden name=function value=copycontent>"; $lang_a = new select(); $lang_a->set_name("clang_a"); $lang_a->set_style("width:100px;"); $lang_a->set_size(1); foreach ($REX['CLANG'] as $val => $key) { $lang_a->add_option($key, $val); } 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> </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[]"))) {
$gma->setQuery("select * from rex_module_action,rex_action where rex_module_action.action_id=rex_action.id and rex_module_action.module_id='{$modul_id}'"); for ($i = 0; $i < $gma->getRows(); $i++) { $iaction_id = $gma->getValue("rex_module_action.id"); $action_id = $gma->getValue("rex_module_action.action_id"); echo "<tr>\r\n\t\t\t\t\t\t<td class=grey> </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> </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 .= "<td class=grey align=center>{$i_category_id}</td>"; } $echo .= "\r\n <td><a href={$kat_link}>" . $KAT->getValue("catname") . " </a></td>\r\n <td valign=middle width=20>" . htmlspecialchars($KAT->getValue("catprior")) . "</td>\r\n <td>" . $I18N->msg("no_permission_to_edit") . "</td><td class=grey>{$kat_status}</td>\r\n </tr>"; } } $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>";
$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> </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> </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][]"); $cat_ids = array(); if ($rootCats = OOCategory::getRootCategories()) { foreach ($rootCats as $rootCat) { add_cat_options($sel_cat, $rootCat, $cat_ids); } } if ($send == 1) { //------------------> Das Formular wurde abgeschickt if ($article[name] == "") { $article[name] = "[leer]"; } $sql = new sql(); $sql->debugsql = 0; // Kategorien werden aufbereitet $diecats = "|";
$nbsp = $nbsp . ' '; foreach ($childs as $child) { add_cat_options($select, $child, $cat_ids, $cat->getName(), $nbsp); } } } } // --------------------------------------------------- ENDE - FUNKTION ZUM AUSLESEN DER KATEGORIEN // ------------------------------------------------------------- SONSTIGES START if ($REX_USER->isValueOf("rights", "admin[]") || $REX_USER->isValueOf("rights", "moveArticle[]") || $REX_USER->isValueOf("rights", "copyArticle[]") || $REX_USER->isValueOf("rights", "copyContent[]") && count($REX['CLANG']) > 1) { echo "<table border=0 cellpadding=5 cellspacing=1 width=100%>\r\n <tr>\r\n <td colspan=3>" . $I18N->msg("other_functions") . "</td>\r\n </tr>"; // --------------------------------------------------- INHALTE KOPIEREN START if (($REX_USER->isValueOf("rights", "admin[]") || $REX_USER->isValueOf("rights", "copyContent[]")) && count($REX['CLANG']) > 1) { echo "\r\n <form action=index.php method=get>\r\n <input type=hidden name=page value=content>\r\n <input type=hidden name=article_id value='{$article_id}'>\r\n <input type=hidden name=mode value='meta'>\r\n <input type=hidden name=clang value={$clang}>\r\n <input type=hidden name=ctype value={$ctype}>\r\n <input type=hidden name=function value=copycontent>"; $lang_a = new select(); $lang_a->set_name("clang_a"); $lang_a->set_style("width:100px;"); $lang_a->set_size(1); foreach ($REX['CLANG'] as $val => $key) { $lang_a->add_option($key, $val); } $lang_b = $lang_a; $lang_b->set_name("clang_b"); if (isset($_REQUEST["clang_a"])) { $lang_a->set_selected($_REQUEST["clang_a"]); } if (isset($_REQUEST["clang_b"])) { $lang_b->set_selected($_REQUEST["clang_b"]); } echo "<tr><td class=grey width=150>" . $I18N->msg("content_contentoflang") . "</td><td class=grey>" . $lang_a->out() . " " . $I18N->msg("content_to") . " " . $lang_b->out() . " " . $I18N->msg("content_copy") . "</td></tr>"; echo "<tr>\r\n <td class=grey> </td>\r\n <td class=grey><input type=submit value='" . $I18N->msg("content_submitcopycontent") . "' size=8></td>\r\n </tr>";
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'); } } }
} else { $selected = ''; } } $cssSelectFile .= '<option value="' . $cssFileName . '" ' . $selected . '>' . $cssFileName . '</option>' . "\n"; } } else { $errorMsg .= '<p class="warning"><strong>Es sind keine CSS Files vorhanden.</strong></p>'; } // Build the Medienpool Dirs as Select List //////////////////////////////////////////////////////////////////////////////// $cats_sel = new select(); $cats_sel->set_style('class="form-select"'); $cats_sel->set_size(1); $cats_sel->set_id("dirCreate"); $cats_sel->set_name("dirCreate"); $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); } } if (!isset($rex_file_category)) { $rex_file_category = ''; } $cats_sel->set_selected($rex_file_category); $selectOut = $cats_sel->out(); if (isset($_POST['send']) and $_POST['send'] != 1) { $editorError = '<p class="warning">Bitte wählen Sie eine Datei aus oder legen eine neue Datei an!</p>';
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'); } } }
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; }
$message = $I18N->msg("id_exists"); $func = "addclang"; } } 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");
switch ($dbanlegen) { case 1: $dbchecked1 = " checked"; break; case 2: $dbchecked2 = " checked"; break; case 3: $dbchecked3 = " checked"; break; default: $dbchecked0 = " checked"; } // Vorhandene Exporte auslesen $sel_export = new select(); $sel_export->set_name('import_name'); $sel_export->set_style('width: 300px;'); $sel_export->set_selectextra('onchange="checkInput(\'dbanlegen[3]\')"'); $export_dir = $export_addon_dir . '/files'; $exports_found = false; if (is_dir($export_dir)) { if ($handle = opendir($export_dir)) { $export_archives = array(); $export_sqls = array(); while (($file = readdir($handle)) !== false) { if ($file == '.' || $file == '..') { continue; } $isSql = substr($file, strlen($file) - 4) == '.sql'; $isArchive = substr($file, strlen($file) - 7) == '.tar.gz'; if ($isSql) {
$sel_module->set_size(10); $sel_module->set_name("userperm_module[]"); $sel_module->set_id("userperm_module"); $sqlmodule = new sql(); $sqlmodule->setQuery("select * from " . $REX['TABLE_PREFIX'] . "modultyp order by name"); for ($i = 0; $i < $sqlmodule->getRows(); $i++) { $name = $sqlmodule->getValue("name"); $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();
return; } $cat_ids[] = $cat->getId(); $select->add_option($cat->getName(), $cat->getId(), $cat->getId(), $cat->getParentId()); $childs = $cat->getChildren(); if (is_array($childs)) { foreach ($childs as $child) { add_cat_options($select, $child, $cat_ids, $cat->getName()); } } } // -----------------------> 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_selected($articlesearch); $STYLE = "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 "\r\n<table border=0 cellpadding=5 cellspacing=1 width=100%>\r\n<tr>\r\n\t<th class=icon width=30> </th>\r\n\t<th colspan=2 align=left>" . $I18N_SIMPLE_SHOP->msg("product_overview") . "</th>\r\n</tr>\r\n<tr>\r\n\t<td class=grey> </td><form action='index.php' method='post' name=catsearch>\r\n\t\t<input type='hidden' name='page' value='" . $mypage . "' />\r\n\t\t<input type='hidden' name='subpage' value='" . $subpage . "' />\r\n\t\t<input type='hidden' name='clang' value='" . $clang . "' />\r\n\t\t<input type='hidden' name='prod_id' value='" . $prod_id . "' />\r\n \t\t<input type='hidden' name='rel_id' value='" . $rel_id . "' />\r\n\t<td class=grey width=280>\r\n\t\t\r\n\t\t" . $sel_cat->out() . "\r\n\t</td>\r\n\t<td class=grey>\r\n\t\t<table border=0 cellspacing=0 cellpadding=0>\r\n\t\t<tr><td>\r\n\t\t<input type=submit name='cs' value='" . $I18N_SIMPLE_SHOP->msg("show") . "' />\r\n\t\t</td></form><form action='index.php' method='post' name=catsearch>\r\n\t\t\t<input type='hidden' name='clang' value='" . $clang . "' />\r\n\t\t\t<input type='hidden' name='page' value='" . $mypage . "' />\r\n\t\t\t<input type='hidden' name='subpage' value='" . $subpage . "' />\r\n\t\t\t<input type='hidden' name='prod_id' value='" . $prod_id . "' />\r\n \t\t\t<input type='hidden' name='rel_id' value='" . $rel_id . "' />\r\n\t\t<td>\r\n\t\t\t\r\n\t\t\t<input type='hidden' name='articlesearch' value='' /><input type=submit name='cs' value='" . $I18N_SIMPLE_SHOP->msg("show_all") . "' />\r\n\t\t</td></form>\r\n\t\t</tr>\r\n\t\t</table>\r\n\t</td>\r\n</tr>\r\n</table><br />"; if (isset($articlesearch)) { //---------------------------------- Liste der Artikel $artikle_objekts = shop_category::getArticleList($clang, $articlesearch); for ($i = 0; $i < count($artikle_objekts); $i++) { echo "<table border=0 cellpadding=5 cellspacing=1 width=100%>\r\n\t\t\t<tr>\r\n\t\t\t<td class=grey width=30 align=center><img src=\"pics/document.gif\" border=\"0\" height=\"16\" width=\"16\"></td>\r\n\t\t\t<td class=grey>" . $artikle_objekts[$i]->getName() . "</td>\r\n\t\t\t<td class=grey width=120 ><a href=\"javascript:opener.setREXShop({$rel_id},'" . $artikle_objekts[$i]->getId() . "','" . $artikle_objekts[$i]->getName() . "');self.close();\")>" . $I18N_SIMPLE_SHOP->msg("header_relation_add") . "</td>\r\n\t\t\t</tr>";
} else { $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>";
$FILESQL->setValue("originalname", ${$FILENAME}); $FILESQL->setValue("filesize", ${$FILESIZE}); $FILESQL->insert(); $meta_sql->setValue("file", $NFILENAME); } } elseif (${$FILEDEL} == "on") { $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>";
$prepost = 0; // 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> </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) {
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 }