Beispiel #1
0
        return array('HEADER' => $H, 'FOOTER' => $F);
    }
}
//include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
// FIXME - quick temporarry fix for missing icons on menu administration. We need different core style to be included (forced) here - e.g. e107_web/css/admin/sprite.css
if (e_IFRAME) {
    //e107::js('core','bootstrap/js/bootstrap.min.js');
    //e107::css('core','bootstrap/css/bootstrap.min.css');
    e107::css('url', '{e_THEME}/bootstrap3/admin_style.css');
}
$e_sub_cat = 'menus';
require_once e_HANDLER . "file_class.php";
require_once e_HANDLER . "menumanager_class.php";
$rs = new form();
$frm = e107::getForm();
$men = new e_menuManager(0);
// use 1 for dragdrop.
$mes = e107::getMessage();
if (e_AJAX_REQUEST) {
    if (vartrue($_GET['enc'])) {
        $string = base64_decode($_GET['enc']);
        parse_str($string, $_GET);
        //	 print_a($_GET);
    }
    //	print_a($_POST);
    if (vartrue($_GET['vis'])) {
        $text = $men->menuVisibilityOptions();
    }
    // print_a($_GET);
    if (vartrue($_GET['parmsId'])) {
        $text = $men->menuInstanceParameters();
Beispiel #2
0
 function themeHandler()
 {
     global $e107cache, $pref;
     $mes = e107::getMessage();
     require_once e_HANDLER . "form_handler.php";
     //enable inner tabindex counter
     $this->frm = new e_form();
     $this->fl = e107::getFile();
     if (isset($_POST['upload'])) {
         $this->themeUpload();
     }
     $this->themeArray = defined('E107_INSTALL') ? $this->getThemes('xml') : $this->getThemes();
     //     print_a($this -> themeArray);
     foreach ($_POST as $key => $post) {
         if (strstr($key, "preview")) {
             //	$this -> id = str_replace("preview_", "", $key);
             $this->id = key($post);
             $this->themePreview();
         }
         if (strstr($key, "selectmain")) {
             //	$this -> id = str_replace("selectmain_", "", $key);
             $this->id = key($post);
             $this->setTheme();
         }
         if (strstr($key, "selectadmin")) {
             $this->id = key($post);
             $this->setAdminTheme();
             $this->refreshPage('admin');
         }
     }
     if (isset($_POST['submit_adminstyle'])) {
         $this->id = $_POST['curTheme'];
         if ($this->setAdminStyle()) {
             eMessage::getInstance()->add(TPVLAN_43, E_MESSAGE_SUCCESS);
         }
         e107::getConfig()->save(true);
     }
     if (isset($_POST['submit_style'])) {
         $this->id = $_POST['curTheme'];
         $this->SetCustomPages($_POST['custompages']);
         $this->setStyle();
         e107::getConfig()->save(true);
     }
     if (isset($_POST['installplugin'])) {
         $key = key($_POST['installplugin']);
         include_lan(e_LANGUAGEDIR . e_LANGUAGE . "/admin/lan_plugin.php");
         require_once e_HANDLER . "plugin_class.php";
         $eplug = new e107plugin();
         $message = $eplug->install_plugin($key);
         $mes->add($message, E_MESSAGE_SUCCESS);
     }
     if (isset($_POST['setMenuPreset'])) {
         $key = key($_POST['setMenuPreset']);
         include_lan(e_LANGUAGEDIR . e_LANGUAGE . "/admin/lan_menus.php");
         require_once e_HANDLER . "menumanager_class.php";
         $men = new e_menuManager();
         $men->curLayout = $key;
         //menu_layout is left blank when it's default.
         $men->dbLayout = $men->curLayout != $pref['sitetheme_deflayout'] ? $men->curLayout : "";
         if ($areas = $men->menuSetPreset()) {
             foreach ($areas as $val) {
                 $ar[$val['menu_location']][] = $val['menu_name'];
             }
             foreach ($ar as $k => $v) {
                 $message .= MENLAN_14 . " " . $k . " : " . implode(", ", $v) . "<br />";
             }
             $mes->add(MENLAN_43 . " : " . $key . "<br />" . $message, E_MESSAGE_SUCCESS);
         }
     }
 }
Beispiel #3
0
    function renderPresets($key)
    {
        require_once e_HANDLER . "menumanager_class.php";
        $frm = e107::getForm();
        $men = new e_menuManager();
        $men->curLayout = $key;
        $preset = $men->getMenuPreset();
        // 		print_a($preset);
        //TODO LAN
        $text = "<div class='btn-group pull-right'>" . $frm->admin_button("setMenuPreset[" . $key . "]", "Activate Menus", 'other');
        $text .= '<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
		<span class="caret"></span>
		</button>
		<ul class="dropdown-menu col-selection">
		<!-- dropdown menu links -->
		<li class="dropdown-header">Activates the following:</li>
		';
        foreach ($preset as $val) {
            $text .= "<li><a title='" . $val['menu_name'] . "'>" . str_replace("_menu", "", $val['menu_name']) . "</a></li>";
        }
        $text .= "</ul></div>";
        return $text;
    }
Beispiel #4
0
    e107::js('core', 'password/jquery.pwdMeter.js', 'jquery', 2);
    //
    e107::js("core", "plupload/customUpload.js", "jquery", 3);
    e107::js("core", "core/mediaManager.js", "jquery", 3);
    e107::css('core', 'core/admin.css', 'jquery');
    e107::js('core', 'core/admin.jquery.js', 'jquery', 4);
    e107::css('inline', "\t.column { width:100%;  padding-bottom: 100px; }\n\t.regularMenu { border:1px dotted silver; margin-bottom:6px; padding-left:3px; padding-right:3px }\n\t.menuOptions { padding-top:7px; padding-right:5px; text-align:right; }\n\t.portlet { margin: 0 1em 1em 0; }\n\t.portlet-header { margin: 0.3em; padding-bottom: 4px; padding-left: 0.2em; cursor:move }\n\t.portlet-header .ui-icon { float: right; }\n\t.portlet-content { padding: 7px; }\n\t.ui-sortable-placeholder { border: 1px dotted black; visibility: visible !important; height: 50px !important; }\n\t.ui-sortable-placeholder * { visibility: hidden; }\n\t", 'jquery');
}
$e_sub_cat = 'menus';
require_once e_HANDLER . "file_class.php";
require_once e_HANDLER . "form_handler.php";
require_once e_HANDLER . 'message_handler.php';
require_once e_HANDLER . "menumanager_class.php";
$rs = new form();
$frm = new e_form();
$men = new e_menuManager(0);
// use 1 for dragdrop.
if (e_AJAX_REQUEST) {
    $men->menuSaveAjax();
    exit;
}
if (isset($_GET['configure']) || isset($_GET['iframe'])) {
    //No layout parse when in iframe mod
    define('e_IFRAME', true);
}
require_once "auth.php";
if ($_POST) {
    $e107cache->clear_sys("menus_");
}
if ($message != "") {
    echo $ns->tablerender('Updated', "<div style='text-align:center'><b>" . $message . "</b></div><br /><br />");