diff --git a/interface/web/admin/lib/interface.d/tpl_default.menu.php b/interface/web/admin/lib/interface.d/tpl_default.menu.php index 5c30072e34fa3ab6f39875f97ad82d1bcfa4fdc6..e2e7745679ced2d245b00543dfa4b227fdba8b06 100644 --- a/interface/web/admin/lib/interface.d/tpl_default.menu.php +++ b/interface/web/admin/lib/interface.d/tpl_default.menu.php @@ -1,7 +1,14 @@ 'Default Theme', - 'target' => 'content', - 'link' => 'admin/tpl_default.php', - 'html_id' => 'tpl_default'); +for($m = 0; $m < count($module['nav']); $m++) { + if($module['nav'][$m]['title'] == 'Interface') { + + $module['nav'][$m]['items'][] = array( 'title' => 'Default Theme', + 'target' => 'content', + 'link' => 'admin/tpl_default.php', + 'html_id' => 'tpl_default'); + break; + } +} + ?> diff --git a/interface/web/admin/lib/module.conf.php b/interface/web/admin/lib/module.conf.php index 489daacf2df23e91e9adbc8211efc49403bd706c..92e1979b16e23a5c990166d5e05a146d81177b82 100644 --- a/interface/web/admin/lib/module.conf.php +++ b/interface/web/admin/lib/module.conf.php @@ -83,20 +83,6 @@ $items[] = array( 'title' => 'Interface Config', 'link' => 'admin/system_config_edit.php?id=1', 'html_id' => 'interface_config'); -//**** Load the settings pages of all installed themes -$menu_dir = ISPC_WEB_PATH.'/admin/lib/interface.d'; - -if (is_dir($menu_dir)) { - if ($dh = opendir($menu_dir)) { - //** Go through all files in the menu dir - while (($file = readdir($dh)) !== false) { - if ($file != '.' && $file != '..' && substr($file, -9, 9) == '.menu.php') { - include_once($menu_dir . '/' . $file); - } - } - } -} - $module['nav'][] = array( 'title' => 'Interface', 'open' => "1", 'items' => $items); diff --git a/interface/web/capp.php b/interface/web/capp.php index 45123919880e7f584702dfeaf75ad38595cfa931..7917aa0bbbeb6bc81c50928cb62bc03c0f79b1e1 100644 --- a/interface/web/capp.php +++ b/interface/web/capp.php @@ -52,7 +52,21 @@ if(!in_array($mod,$user_modules)) $app->error($app->lng(301)); //* Load module configuration into the session. if(is_file($mod."/lib/module.conf.php")) { include_once($mod."/lib/module.conf.php"); - $_SESSION["s"]["module"] = $module; + + $menu_dir = ISPC_WEB_PATH.'/' . $mod . '/lib/menu.d'; + + if (is_dir($menu_dir)) { + if ($dh = opendir($menu_dir)) { + //** Go through all files in the menu dir + while (($file = readdir($dh)) !== false) { + if ($file != '.' && $file != '..' && substr($file, -9, 9) == '.menu.php' && $file != 'dns_resync.menu.php') { + include_once($menu_dir . '/' . $file); + } + } + } + } + + $_SESSION["s"]["module"] = $module; session_write_close(); if($redirect == ''){ echo "HEADER_REDIRECT:".$_SESSION["s"]["module"]["startpage"]; diff --git a/interface/web/login/index.php b/interface/web/login/index.php index a99a77546edac1679d6934cb7e514e1026c5810a..a158422f89baa7d8b3056fbfea6bd388be755bea 100644 --- a/interface/web/login/index.php +++ b/interface/web/login/index.php @@ -195,6 +195,18 @@ class login_index { if(is_file($_SESSION['s']['user']['startmodule'].'/lib/module.conf.php')) { include_once($_SESSION['s']['user']['startmodule'].'/lib/module.conf.php'); + $menu_dir = ISPC_WEB_PATH.'/' . $_SESSION['s']['user']['startmodule'] . '/lib/menu.d'; + + if (is_dir($menu_dir)) { + if ($dh = opendir($menu_dir)) { + //** Go through all files in the menu dir + while (($file = readdir($dh)) !== false) { + if ($file != '.' && $file != '..' && substr($file, -9, 9) == '.menu.php' && $file != 'dns_resync.menu.php') { + include_once($menu_dir . '/' . $file); + } + } + } + } $_SESSION['s']['module'] = $module; } diff --git a/interface/web/themes/default/templates/sidenav.tpl.htm b/interface/web/themes/default/templates/sidenav.tpl.htm index 8ec46aa867cf8f79ba1025cdf06195c1c7b8b5c3..b42ea6667a363b29b8e52a029813aa339a5b4ee3 100644 --- a/interface/web/themes/default/templates/sidenav.tpl.htm +++ b/interface/web/themes/default/templates/sidenav.tpl.htm @@ -12,7 +12,11 @@
  • id='' > + + + + diff --git a/interface/web/tools/lib/module.conf.php b/interface/web/tools/lib/module.conf.php index 10855fe70be368076965ff2cd9ba02a191044aae..c6b6aaeb87f18fdab4e2d92a193a0096025bfa5a 100644 --- a/interface/web/tools/lib/module.conf.php +++ b/interface/web/tools/lib/module.conf.php @@ -40,18 +40,6 @@ $module['nav'][] = array( 'title' => 'Interface', unset($items); -//**** Load additional menu items -$menu_dir = ISPC_WEB_PATH.'/tools/lib/menu.d'; - -if (is_dir($menu_dir)) { - if ($dh = opendir($menu_dir)) { - //** Go through all files in the menu dir - while (($file = readdir($dh)) !== false) { - if ($file != '.' && $file != '..' && substr($file, -9, 9) == '.menu.php' && $file != 'dns_resync.menu.php') { - include_once($menu_dir . '/' . $file); - } - } - } -} + ?> \ No newline at end of file