コード例 #1
0
ファイル: catpage.php プロジェクト: Novo1987/mozilo2.0
function catpage()
{
    global $CatPage;
    if (getRequestValue('editpage', 'post', false)) {
        list($cat, $page) = $CatPage->split_CatPage_fromSyntax(getRequestValue('editpage', 'post', false));
        if ($CatPage->exists_CatPage($cat, $page)) {
            if (false === getRequestValue('content', 'post', false)) {
                echo get_page($cat, $page);
            } elseif (getRequestValue('content', 'post', false)) {
                echo save_page($cat, $page);
            }
        } else {
            ajax_return("error", true, returnMessage(false, getLanguageValue("page_error_no_page")), true, "js-dialog-reload");
        }
        exit;
    } elseif (false !== ($changeart = getRequestValue('changeart', 'post')) and false !== ($cat_page_change = getRequestValue('cat_page_change', 'post'))) {
        if (false !== ($sort_array = getRequestValue('sort_array', 'post')) and !is_array($sort_array)) {
            ajax_return("error", true, returnMessage(false, getLanguageValue("error_post_parameter")), true, true);
        }
        if (function_exists($changeart)) {
            if (!is_array($cat_page_change)) {
                ajax_return("error", true, returnMessage(false, getLanguageValue("error_post_parameter")), true, true);
            } else {
                $name = make_NewOrgCatPageFromRequest();
                if (is_array($name)) {
                    $function = $changeart;
                    echo $function($name);
                } else {
                    ajax_return("error", true, returnMessage(false, getLanguageValue("error_post_parameter")), true, true);
                }
            }
        } else {
            ajax_return("error", true, returnMessage(false, getLanguageValue("function_exists_error")), true, true);
        }
        exit;
    } elseif (false !== ($sort_array = getRequestValue('sort_array', 'post'))) {
        if (is_array($sort_array)) {
            echo write_sort_list();
        } else {
            ajax_return("error", true, returnMessage(false, getLanguageValue("error_post_parameter")), true, true);
        }
        exit;
    }
    $page_lang = array("category" => "", "page" => "", "pages" => "", "url" => "", "target" => "", "page_saveasnormal" => "", "page_saveashidden" => "", "page_saveasdraft" => "");
    # Variable erzeugen z.B. pages = $text_pages
    foreach ($page_lang as $language => $tmp) {
        $page_lang[$language] = getLanguageValue($language);
    }
    $page_lang[EXT_PAGE] = $page_lang["page_saveasnormal"];
    $page_lang[EXT_HIDDEN] = $page_lang["page_saveashidden"];
    $page_lang[EXT_DRAFT] = $page_lang["page_saveasdraft"];
    return array(ul_cats($page_lang) . pageedit_dialog(), new_cat_page($page_lang));
}
コード例 #2
0
ファイル: config.php プロジェクト: Novo1987/mozilo2.0
function config()
{
    global $CMS_CONF;
    global $specialchars;
    global $CONTACT_CONF;
    global $ADMIN_CONF;
    global $USER_SYNTAX;
    if (getRequestValue('savesyntax', 'post') == "true") {
        if (false !== ($content = getRequestValue('content', 'post', false)) and $CMS_CONF->get('usecmssyntax') == "true") {
            $USER_SYNTAX->setFromTextarea($content);
            require_once BASE_DIR_ADMIN . 'editsite.php';
            $selctbox = '<span id="replace-item">' . returnUserSyntaxSelectbox() . '</span>';
            $var_UserSyntax = '0E0M0P0T0Y0';
            # die userSxntax hat sich geändert deshalb schiecken wir dem editor userSyntax die neuen
            global $USER_SYNTAX;
            $moziloUserSyntax = $USER_SYNTAX->toArray();
            if (count($moziloUserSyntax) > 0) {
                $moziloUserSyntax = array_keys($moziloUserSyntax);
                rsort($moziloUserSyntax);
                $var_UserSyntax = implode('|', $moziloUserSyntax);
            }
            $var_UserSyntax = '<span id="moziloUserSyntax">' . $var_UserSyntax . '</span>';
            echo ajax_return("success", false) . $selctbox . $var_UserSyntax;
        } elseif ($CMS_CONF->get('usecmssyntax') == "true") {
            require_once BASE_DIR_ADMIN . 'editsite.php';
            $selctbox = '<span id="replace-item">' . returnUserSyntaxSelectbox() . '</span>';
            $selctbox .= '<textarea id="page-content">' . $USER_SYNTAX->getToTextarea() . '</textarea>';
            echo ajax_return("success", false) . $selctbox;
        }
        exit;
    } elseif (getRequestValue('chanceconfig', 'post') == "true") {
        echo set_config_para();
        exit;
    }
    $pagecontent = NULL;
    $show = $ADMIN_CONF->get("config");
    if (!is_array($show)) {
        $show = array();
    }
    $template = array();
    $error = array();
    // ALLGEMEINE EINSTELLUNGEN
    $titel = "config_titel_cmsglobal";
    // Zeile "WEBSITE-TITEL", "TITEL-TRENNER" und "WEBSITE-TITELLEISTE"
    if (ROOT or in_array("websitetitle", $show)) {
        $error[$titel][] = false;
        $template[$titel][] = '<div class="ui-helper-clearfix">' . '<div class="mo-in-li-l">' . getLanguageValue("config_text_websitetitle") . '</div>' . '<div class="mo-in-li-r">' . '<input type="text" class="mo-input-text" name="websitetitle" value="' . $specialchars->rebuildSpecialChars($CMS_CONF->get("websitetitle"), true, true) . '" />' . '</div>' . '</div>' . '<div class="mo-padding-top ui-helper-clearfix">' . '<div class="mo-in-li-l">' . getLanguageValue("config_text_websitetitleseparator") . '</div>' . '<div class="mo-in-li-r">' . '<input type="text" class="mo-input-text" name="titlebarseparator" value="' . $specialchars->rebuildSpecialChars($CMS_CONF->get("titlebarseparator"), true, true) . '" />' . '</div>' . '</div>' . '<div class="mo-padding-top">' . getLanguageValue("config_text_websitetitlebar") . '<br /><input type="text" class="mo-input-text mo-input-margin-top" name="titlebarformat" value="' . $specialchars->rebuildSpecialChars($CMS_CONF->get("titlebarformat"), true, true) . '" />' . '</div>';
    }
    // Zeile "WEBSITE-BESCHREIBUNG" und "WEBSITE-KEYWORDS"
    if (ROOT or in_array("websitedescription", $show)) {
        $error[$titel][] = false;
        $template[$titel][] = getLanguageValue("config_text_websitedescription") . '<br /><input type="text" class="mo-input-text mo-input-margin-top" name="websitedescription" value="' . $specialchars->rebuildSpecialChars($CMS_CONF->get("websitedescription"), true, true) . '" /><div class="mo-padding-top">' . getLanguageValue("config_text_websitekeywords") . '</div><input type="text" class="mo-input-text mo-input-margin-top" name="websitekeywords" value="' . $specialchars->rebuildSpecialChars($CMS_CONF->get("websitekeywords"), true, true) . '" />';
    }
    // Zeile "SPRACHAUSWAHL"
    if (ROOT or in_array("cmslanguage", $show)) {
        $tmp_array = getDirAsArray(BASE_DIR_CMS . 'sprachen', "file", "natcasesort");
        if (count($tmp_array) <= 0) {
            $error[$titel][] = getLanguageValue("config_error_language_empty");
        } elseif (!in_array("language_" . $CMS_CONF->get('cmslanguage') . ".txt", $tmp_array)) {
            $error[$titel][] = getLanguageValue("config_error_languagefile_error") . "<br />" . CMS_DIR_NAME . "/sprachen/language_" . $CMS_CONF->get('cmslanguage') . ".txt";
        } else {
            $error[$titel][] = false;
        }
        $conf_inhalt = '<div class="mo-select-div"><select name="cmslanguage" class="mo-select">';
        foreach ($tmp_array as $file) {
            $currentlanguagecode = substr($file, strlen("language_"), strlen($file) - strlen("language_") - strlen(".txt"));
            $selected = NULL;
            // aktuell ausgewählte Sprache als ausgewählt markieren
            if ($currentlanguagecode == $CMS_CONF->get("cmslanguage")) {
                $selected = " selected";
            }
            $conf_inhalt .= '<option' . $selected . ' value="' . $currentlanguagecode . '">';
            // Übersetzer aus der aktuellen Sprachdatei holen
            $languagefile = new Properties(BASE_DIR_CMS . "sprachen/" . $file);
            $conf_inhalt .= $currentlanguagecode . " (" . getLanguageValue("config_input_translator") . " " . $languagefile->get("_translator_0") . ")";
            $conf_inhalt .= "</option>";
        }
        $conf_inhalt .= "</select></div>";
        $template[$titel][] = array(getLanguageValue("config_text_cmslanguage"), $conf_inhalt);
    }
    // Zeile "STANDARD-KATEGORIE"
    if (ROOT or in_array("defaultcat", $show)) {
        $tmp_array = getDirAsArray(CONTENT_DIR_REL, "dir", "natcasesort");
        if (count($tmp_array) <= 0) {
            $error[$titel][] = getLanguageValue("config_error_defaultcat_emty");
        } elseif (!in_array($CMS_CONF->get('defaultcat'), $tmp_array)) {
            $error[$titel][] = getLanguageValue("config_error_defaultcat_existed") . "<br />" . $specialchars->rebuildSpecialChars($CMS_CONF->get('defaultcat'), true, true);
        } else {
            $error[$titel][] = false;
        }
        $conf_inhalt = '<div class="mo-select-div"><select name="defaultcat" class="mo-select">';
        foreach ($tmp_array as $element) {
            if (count(getDirAsArray(CONTENT_DIR_REL . $element, array(EXT_PAGE, EXT_HIDDEN), "none")) == 0) {
                continue;
            }
            $selected = NULL;
            if ($element == $CMS_CONF->get("defaultcat")) {
                $selected = "selected ";
            }
            $conf_inhalt .= '<option ' . $selected . 'value="' . $element . '">' . $specialchars->rebuildSpecialChars($element, true, true) . "</option>";
        }
        $conf_inhalt .= "</select></div>";
        $template[$titel][] = array(getLanguageValue("config_text_defaultcat"), $conf_inhalt);
    }
    if (ROOT or in_array("draftmode", $show)) {
        $conf_checkbox = buildCheckBox("draftmode", $CMS_CONF->get("draftmode"), getLanguageValue("config_input_draftmode"));
        $conf_select = "";
        $tmp_array = getDirAsArray(BASE_DIR . "layouts", "dir", "natcasesort");
        if (count($tmp_array) <= 0) {
            $error[$titel][] = getLanguageValue("config_error_layouts_emty");
        } else {
            $error[$titel][] = false;
        }
        $conf_select .= '<div style="font-size:.4em;">&nbsp;</div><div class="mo-select-div"><select name="draftlayout" class="mo-select">';
        $conf_select .= '<option value="false">' . getLanguageValue("config_input_draftlayout") . '</option>';
        foreach ($tmp_array as $file) {
            $selected = NULL;
            if ($file == $CMS_CONF->get("draftlayout")) {
                $selected = " selected";
            }
            $conf_select .= '<option' . $selected . ' value="' . $file . '">';
            $conf_select .= $specialchars->rebuildSpecialChars($file, true, true);
            $conf_select .= "</option>";
        }
        $conf_select .= "</select></div>";
        $template[$titel][] = array(getLanguageValue("config_text_draftmode"), $conf_checkbox . $conf_select);
    }
    # sitemap.xml
    if (ROOT or in_array("usesitemap", $show)) {
        $error[$titel][] = false;
        $template[$titel][] = array(getLanguageValue("config_text_usesitemap"), buildCheckBox("usesitemap", $CMS_CONF->get("usesitemap"), getLanguageValue("config_input_usesitemap")));
    }
    // Zeile "NUTZE CMS-SYNTAX"
    // SYNTAX-EINSTELLUNGEN
    $titel = "config_titel_cmssyntax";
    if (ROOT or in_array("usecmssyntax", $show)) {
        $error[$titel][] = false;
        $template[$titel][] = array(getLanguageValue("config_text_usesyntax"), buildCheckBox("usecmssyntax", $CMS_CONF->get("usecmssyntax"), getLanguageValue("config_input_usesyntax")));
    }
    if (ROOT or (in_array("usecmssyntax", $show) or !in_array("usecmssyntax", $show) and $CMS_CONF->get("usecmssyntax") == "true")) {
        if (ROOT or in_array("editusersyntax", $show)) {
            $error[$titel][] = false;
            $template[$titel][] = array(getLanguageValue("config_text_usersyntax"), '<div class="js-usecmssyntax">' . '<img class="js-editsyntax mo-tool-icon mo-icons-icon mo-icons-page-edit" src="' . ICON_URL_SLICE . '" alt="page-edit" hspace="0" vspace="0" />' . '</div>');
        }
        // Zeile "ERSETZE EMOTICONS"
        if (ROOT or in_array("replaceemoticons", $show)) {
            $error[$titel][] = false;
            $template[$titel][] = array(getLanguageValue("config_text_replaceemoticons"), '<div class="js-usecmssyntax">' . buildCheckBox("replaceemoticons", $CMS_CONF->get("replaceemoticons") == "true", getLanguageValue("config_input_replaceemoticons")) . '</div>');
        }
        if (ROOT or in_array("defaultcolors", $show)) {
            $error[$titel][] = false;
            $colors_div = '<div class="mo-in-li-l">';
            $colors_div .= '<img class="js-save-default-color mo-tool-icon mo-icons-icon mo-icons-save" src="' . ICON_URL_SLICE . '" alt="save" />';
            $colors_div .= '<img id="js-del-config-default-color" class="mo-tool-icon ui-corner-all mo-icons-icon mo-icons-delete" src="' . ICON_URL_SLICE . '" alt="delete" hspace="0" vspace="0" />';
            $colors_div .= '<div id="js-config-default-color-box" class="ce-default-color-box ui-widget-content ui-corner-all">&nbsp;';
            $colors_div .= '</div>';
            $colors_div .= '</div>';
            $colors_div .= '<div id="js-menu-config-default-color" class="mo-in-li-r">' . '← <img class="js-new-config-default-color ce-bg-color-change ce-default-color-img ui-widget-content ui-corner-all" alt="" title="" src="' . ICON_URL_SLICE . '" />' . '<input type="text" maxlength="6" value="DD0000" class="ce-bg-color-change js-in-hex ce-in-hex" id="js-new-default-color-value" size="6" />' . '<img class="js-coloreditor-button ed-icon-border ed-syntax-icon ed-farbeedit" alt="' . getLanguageValue("dialog_title_coloredit") . '" title="' . getLanguageValue("dialog_title_coloredit") . '" src="' . ICON_URL_SLICE . '" style="display:none;" />' . '</div>';
            $template[$titel][] = '<div class="mo-margin-bottom">' . getLanguageValue("config_text_defaultcolors") . '</div>' . $colors_div . '<input type="hidden" name="defaultcolors" value="' . $specialchars->rebuildSpecialChars($CMS_CONF->get("defaultcolors"), false, false) . '" />';
        }
    }
    // Erweiterte Einstellungen
    // Zeile "showhiddenpagesin"
    $titel = "config_titel_expert";
    if (ROOT or in_array("hiddenpages", $show)) {
        $error[$titel][] = false;
        $template[$titel][] = array(getLanguageValue("config_text_showhiddenpages"), buildCheckBox("showhiddenpagesinsearch", $CMS_CONF->get("showhiddenpagesinsearch") == "true", getLanguageValue("config_input_search")) . '<br />' . buildCheckBox("showhiddenpagesinsitemap", $CMS_CONF->get("showhiddenpagesinsitemap") == "true", getLanguageValue("config_input_sitemap")) . '<br />' . buildCheckBox("showhiddenpagesasdefaultpage", $CMS_CONF->get("showhiddenpagesasdefaultpage") == "true", getLanguageValue("config_input_pagesasdefaultpage")));
    }
    // Zeile "Links öffnen self blank"
    if (ROOT or in_array("targetblank", $show)) {
        $error[$titel][] = false;
        $template[$titel][] = array(getLanguageValue("config_text_target"), buildCheckBox("targetblank_download", $CMS_CONF->get("targetblank_download") == "true", getLanguageValue("config_input_download")) . '<br />' . buildCheckBox("targetblank_link", $CMS_CONF->get("targetblank_link") == "true", getLanguageValue("config_input_link")));
    }
    // Zeile "wenn page == cat"
    if (ROOT or in_array("hidecatnamedpages", $show)) {
        $error[$titel][] = false;
        $template[$titel][] = array(getLanguageValue("config_text_catnamedpages"), buildCheckBox("hidecatnamedpages", $CMS_CONF->get("hidecatnamedpages") == "true", getLanguageValue("config_input_catnamedpages")));
    }
    // Zeile "mod_rewrite"
    if (ROOT or in_array("modrewrite", $show)) {
        $error[$titel][] = false;
        $template[$titel][] = array(getLanguageValue("config_text_modrewrite"), buildCheckBox("modrewrite", $CMS_CONF->get("modrewrite") == "true", getLanguageValue("config_input_modrewrite")));
    }
    // Zeile "showsyntaxtooltips"
    if (ROOT or in_array("showsyntaxtooltips", $show)) {
        $error[$titel][] = false;
        $template[$titel][] = array(getLanguageValue("config_text_showsyntaxtooltips"), buildCheckBox("showsyntaxtooltips", $CMS_CONF->get("showsyntaxtooltips") == "true", getLanguageValue("config_input_showsyntaxtooltips")));
    }
    $pagecontent .= contend_template($template, $error);
    if (ROOT or in_array("editusersyntax", $ADMIN_CONF->get("config"))) {
        $pagecontent .= pageedit_dialog();
    }
    return $pagecontent;
}
コード例 #3
0
ファイル: template.php プロジェクト: Novo1987/mozilo2.0
function template()
{
    global $CMS_CONF;
    global $specialchars;
    global $message;
    global $debug;
    $template_manage_open = false;
    # templates löschen
    if (getRequestValue('template-all-del', 'post') and getRequestValue('template-del', 'post')) {
        template_del();
        $template_manage_open = true;
    }
    # template activ setzen
    if (!getRequestValue('template-all-del', 'post') and !getRequestValue('template-install', 'post') and getRequestValue('template-active', 'post')) {
        $debug .= "active=" . getRequestValue('template-active', 'post') . "<br />\n";
        template_setactiv();
    }
    # hochgeladenes template installieren
    if (isset($_FILES["template-install-file"]["error"]) and getRequestValue('template-install', 'post') and $_FILES["template-install-file"]["error"] == 0 and strtolower(substr($_FILES["template-install-file"]["name"], -4)) == ".zip") {
        $debug .= "install=" . $_FILES["template-install-file"]["name"] . "<br />\n";
        template_install();
        $template_manage_open = true;
    } elseif ($template_select = $specialchars->rebuildSpecialChars(getRequestValue('template-install-select', 'post'), false, false) and getRequestValue('template-install', 'post') and is_file(BASE_DIR . LAYOUT_DIR_NAME . "/" . $template_select) !== false and strtolower(substr($template_select, -4)) == ".zip") {
        $debug .= "local install=" . getRequestValue('template-install-select', 'post') . "<br />\n";
        template_install($template_select);
        $template_manage_open = true;
    }
    $showdebug = false;
    if ($showdebug and !empty($debug)) {
        $message .= returnMessage(false, $debug);
    }
    $ACTIV_TEMPLATE = $CMS_CONF->get("cmslayout");
    $LAYOUT_DIR = LAYOUT_DIR_NAME . "/" . $ACTIV_TEMPLATE . '/';
    if (getRequestValue('chancefiles') == "true") {
        require_once BASE_DIR_ADMIN . "jquery/File-Upload/upload.class.php";
    }
    if (false !== ($newfile = getRequestValue('newfile', 'post')) and false !== ($orgfile = getRequestValue('orgfile', 'post')) and false !== ($curent_dir = getRequestValue('curent_dir', 'post'))) {
        $dir = BASE_DIR . LAYOUT_DIR_NAME . "/" . str_replace('%2F', '/', $curent_dir) . "/";
        if (true !== ($error = moveFileDir($dir . $orgfile, $dir . $newfile, true))) {
            ajax_return("error", true, $error, true, "js-dialog-reload");
        }
        ajax_return("success", true);
    }
    if (getRequestValue('templateselectbox', 'post') == "true") {
        require_once BASE_DIR_ADMIN . 'editsite.php';
        # wir schiken die neue selectbox zurück
        echo '<span id="replace-item">' . returnTemplateSelectbox() . '</span>';
        ajax_return("success", true);
    }
    if (getRequestValue('configtemplate', 'post') == "true") {
        if (false !== ($templatefile = BASE_DIR . getRequestValue('templatefile', 'post', false)) and !file_exists($templatefile)) {
            ajax_return("error", true, returnMessage(false, getLanguageValue("error_no_file_dir") . " " . $templatefile), true, true);
        }
        if (false !== ($content = getRequestValue('content', 'post', false))) {
            if (false === mo_file_put_contents($templatefile, $content)) {
                ajax_return("error", true, returnMessage(false, getLanguageValue("editor_content_error_save")), true, true);
            }
            echo ajax_return("success", false);
        } else {
            if (false === ($syntax = get_contents_ace_edit($templatefile))) {
                ajax_return("error", true, returnMessage(false, getLanguageValue("editor_content_error_open")), true, true);
            }
            echo '<textarea id="page-content">' . $syntax . '</textarea>';
            echo ajax_return("success", false);
        }
        exit;
    }
    global $ADMIN_CONF;
    $show = $ADMIN_CONF->get("template");
    if (!is_array($show)) {
        $show = array();
    }
    $html_manage = "";
    if (ROOT or in_array("template_manage", $show)) {
        $template_manage = array();
        $disabled = '';
        if (!function_exists('gzopen')) {
            $disabled = ' disabled="disabled"';
        }
        $template_install = array();
        foreach (getDirAsArray(BASE_DIR . LAYOUT_DIR_NAME, array(".zip")) as $zip_file) {
            $template_install[] = '<option value="' . mo_rawurlencode($zip_file) . '">' . $zip_file . '</option>';
        }
        $template_install_html = "";
        if (count($template_install) > 0) {
            $template_install_html .= '<br /><select class="mo-install-select mo-select-div" name="template-install-select" size="1"' . $disabled . '>' . '<option value="">' . getLanguageValue("template_select", true) . '</option>' . implode("", $template_install) . '</select>';
        }
        $template_manage["template_title_manage"][] = '<div class="mo-nowrap align-right ui-helper-clearfix">' . '<span class="align-left" style="float:left"><span class="mo-bold">' . getLanguageValue("template_text_filebutton") . '</span><br />' . getLanguageValue("template_text_fileinfo") . '</span>' . '<input type="file" id="js-template-install-file" name="template-install-file" class="mo-select-div"' . $disabled . ' />' . $template_install_html . '<input type="submit" id="js-template-install-submit" name="template-install" value="' . getLanguageValue("template_button_install", true) . '"' . $disabled . ' /><br />' . '<input type="submit" id="js-template-del-submit" value="' . getLanguageValue("template_button_delete", true) . '" class="mo-margin-top" />' . '</div>';
        foreach (getDirAsArray(BASE_DIR . LAYOUT_DIR_NAME, "dir", "natcasesort") as $pos => $file) {
            $template_activ = '';
            $checkbox_del = '<input type="checkbox" name="template-del[]" value="' . $file . '" class="mo-checkbox" />';
            $radio_activ = '<input id="template-status' . $pos . '" name="template-active" type="radio" value="' . $file . '" class="mo-radio" /><label for="template-status' . $pos . '">' . getLanguageValue("template_input_set_active") . '</label>';
            if ($ACTIV_TEMPLATE == $file) {
                $checkbox_del = '&nbsp;';
                $radio_activ = "";
                $template_activ = ' mo-bold';
            }
            $template_manage["template_title_manage"][] = '<div class="mo-middle mo-tag-height-from-icon ui-helper-clearfix">' . '<span class="mo-nowrap  mo-padding-left' . $template_activ . '">' . $specialchars->rebuildSpecialChars($file, false, true) . '</span>' . '<div style="float:right;">' . $checkbox_del . '</div>' . '<div style="float:right;width:30%;">' . $radio_activ . '</div>' . '</div>';
        }
        $multi_user = "";
        if (defined('MULTI_USER') and MULTI_USER) {
            $multi_user = "******";
        }
        if (count($template_manage["template_title_manage"]) > 0) {
            $template_manage["template_title_manage"]["toggle"] = true;
            $html_manage = '<form id="js-template-manage" action="index.php?nojs=true&amp;action=template' . $multi_user . '" method="post" enctype="multipart/form-data">' . contend_template($template_manage) . '</form>';
            # es wurde in der template verwaltung was gemacht dann soll die aufgeklapt bleiben
            if ($template_manage_open) {
                $html_manage = str_replace("display:none;", "", $html_manage);
            }
        }
    }
    $html_template = "";
    if (ROOT or in_array("template_edit", $show)) {
        $template = array();
        foreach (getDirAsArray(BASE_DIR . $LAYOUT_DIR, array(".html"), "natcasesort") as $file) {
            $template["template_title_html_css"][] = '<div class="js-tools-show-hide mo-middle mo-tag-height-from-icon ui-helper-clearfix">' . '<span class="js-filename mo-nowrap mo-padding-left">' . $file . '</span>' . '<img style="float:right;" class="js-tools-icon-show-hide js-edit-template js-html mo-tool-icon mo-icons-icon mo-icons-page-edit" src="' . ICON_URL_SLICE . '" alt="page-edit" hspace="0" vspace="0" />' . '<span class="js-edit-file-pfad" style="display:none;">' . $specialchars->replaceSpecialChars($LAYOUT_DIR . $file, true) . '</span>' . '</div>';
        }
        foreach (getDirAsArray(BASE_DIR . $LAYOUT_DIR . 'css', array(".css"), "natcasesort") as $file) {
            $template["template_title_html_css"][] = '<div class="js-tools-show-hide mo-middle mo-tag-height-from-icon ui-helper-clearfix">' . '<span class="js-filename mo-nowrap mo-padding-left"><span class="mo-bold mo-padding-right">css/</span>' . $file . '</span>' . '<img style="float:right;" class="js-tools-icon-show-hide js-edit-template js-css mo-tool-icon mo-icons-icon mo-icons-page-edit" src="' . ICON_URL_SLICE . '" alt="page-edit" hspace="0" vspace="0" />' . '<span class="js-edit-file-pfad" style="display:none;">' . $specialchars->replaceSpecialChars($LAYOUT_DIR . 'css/' . $file, true) . '</span>' . '</div>';
        }
        require_once BASE_DIR_ADMIN . "jquery/File-Upload/fileupload.php";
        $template_img = getFileUpload($CMS_CONF->get("cmslayout") . '/grafiken');
        $html_img = get_template_truss('<li class="mo-li ui-corner-all">' . $template_img . '</li>', "template_title_grafiken", true);
        $html_template = get_template_truss('<li class="ui-corner-all">' . contend_template($template) . $html_img . '</li>', "template_title_template", false);
        $html_template = str_replace("{TemplateName}", '<span style="font-weight:normal;">' . $specialchars->rebuildSpecialChars($CMS_CONF->get("cmslayout"), false, true) . '</span>', $html_template);
    }
    $html_plugins = "";
    if (ROOT or in_array("template_plugin_css", $show)) {
        $show = $ADMIN_CONF->get("plugins");
        if (!is_array($show)) {
            $show = array();
        }
        global $activ_plugins;
        $template_plugins = array();
        $template_plugins["template_title_plugins"] = array();
        foreach ($activ_plugins as $plugin) {
            if (!ROOT and !in_array($plugin, $show)) {
                continue;
            }
            if (!is_file(BASE_DIR . PLUGIN_DIR_NAME . "/" . $plugin . "/plugin.css")) {
                continue;
            }
            $template_plugins["template_title_plugins"][] = '<div class="js-tools-show-hide mo-middle mo-tag-height-from-icon ui-helper-clearfix">' . '<span class="js-filename mo-nowrap mo-padding-left"><span class="mo-bold mo-padding-right">css/</span>' . $plugin . '</span>' . '<img style="float:right;" class="js-tools-icon-show-hide js-edit-template js-css mo-tool-icon mo-icons-icon mo-icons-page-edit" src="' . ICON_URL_SLICE . '" alt="page-edit" hspace="0" vspace="0" />' . '<span class="js-edit-file-pfad" style="display:none;">' . $specialchars->replaceSpecialChars(PLUGIN_DIR_NAME . "/" . $plugin . "/plugin.css", true) . '</span>' . '</div>';
        }
        if (count($template_plugins["template_title_plugins"]) > 0) {
            $template_plugins["template_title_plugins"]["toggle"] = true;
            $html_plugins = contend_template($template_plugins);
        }
    }
    $html_editor = "";
    if (!empty($html_template) or !empty($html_plugins)) {
        $html_editor = pageedit_dialog();
    }
    return $html_manage . $html_template . $html_plugins . $html_editor;
}