File tree Expand file tree Collapse file tree 6 files changed +43
-32
lines changed
Expand file tree Collapse file tree 6 files changed +43
-32
lines changed Original file line number Diff line number Diff line change 11<?php
22
3- $ items [] = array ( 'title ' => 'Default Theme ' ,
4- 'target ' => 'content ' ,
5- 'link ' => 'admin/tpl_default.php ' ,
6- 'html_id ' => 'tpl_default ' );
3+ for ($ m = 0 ; $ m < count ($ module ['nav ' ]); $ m ++) {
4+ if ($ module ['nav ' ][$ m ]['title ' ] == 'Interface ' ) {
5+
6+ $ module ['nav ' ][$ m ]['items ' ][] = array ( 'title ' => 'Default Theme ' ,
7+ 'target ' => 'content ' ,
8+ 'link ' => 'admin/tpl_default.php ' ,
9+ 'html_id ' => 'tpl_default ' );
10+ break ;
11+ }
12+ }
13+
714?>
Original file line number Diff line number Diff line change 8383 'link ' => 'admin/system_config_edit.php?id=1 ' ,
8484 'html_id ' => 'interface_config ' );
8585
86- //**** Load the settings pages of all installed themes
87- $ menu_dir = ISPC_WEB_PATH .'/admin/lib/interface.d ' ;
88-
89- if (is_dir ($ menu_dir )) {
90- if ($ dh = opendir ($ menu_dir )) {
91- //** Go through all files in the menu dir
92- while (($ file = readdir ($ dh )) !== false ) {
93- if ($ file != '. ' && $ file != '.. ' && substr ($ file , -9 , 9 ) == '.menu.php ' ) {
94- include_once ($ menu_dir . '/ ' . $ file );
95- }
96- }
97- }
98- }
99-
10086$ module ['nav ' ][] = array ( 'title ' => 'Interface ' ,
10187 'open ' => "1 " ,
10288 'items ' => $ items );
Original file line number Diff line number Diff line change 5252//* Load module configuration into the session.
5353if (is_file ($ mod ."/lib/module.conf.php " )) {
5454 include_once ($ mod ."/lib/module.conf.php " );
55- $ _SESSION ["s " ]["module " ] = $ module ;
55+
56+ $ menu_dir = ISPC_WEB_PATH .'/ ' . $ mod . '/lib/menu.d ' ;
57+
58+ if (is_dir ($ menu_dir )) {
59+ if ($ dh = opendir ($ menu_dir )) {
60+ //** Go through all files in the menu dir
61+ while (($ file = readdir ($ dh )) !== false ) {
62+ if ($ file != '. ' && $ file != '.. ' && substr ($ file , -9 , 9 ) == '.menu.php ' && $ file != 'dns_resync.menu.php ' ) {
63+ include_once ($ menu_dir . '/ ' . $ file );
64+ }
65+ }
66+ }
67+ }
68+
69+ $ _SESSION ["s " ]["module " ] = $ module ;
5670 session_write_close ();
5771 if ($ redirect == '' ){
5872 echo "HEADER_REDIRECT: " .$ _SESSION ["s " ]["module " ]["startpage " ];
Original file line number Diff line number Diff line change @@ -195,6 +195,18 @@ public function render() {
195195
196196 if (is_file ($ _SESSION ['s ' ]['user ' ]['startmodule ' ].'/lib/module.conf.php ' )) {
197197 include_once ($ _SESSION ['s ' ]['user ' ]['startmodule ' ].'/lib/module.conf.php ' );
198+ $ menu_dir = ISPC_WEB_PATH .'/ ' . $ _SESSION ['s ' ]['user ' ]['startmodule ' ] . '/lib/menu.d ' ;
199+
200+ if (is_dir ($ menu_dir )) {
201+ if ($ dh = opendir ($ menu_dir )) {
202+ //** Go through all files in the menu dir
203+ while (($ file = readdir ($ dh )) !== false ) {
204+ if ($ file != '. ' && $ file != '.. ' && substr ($ file , -9 , 9 ) == '.menu.php ' && $ file != 'dns_resync.menu.php ' ) {
205+ include_once ($ menu_dir . '/ ' . $ file );
206+ }
207+ }
208+ }
209+ }
198210 $ _SESSION ['s ' ]['module ' ] = $ module ;
199211 }
200212
Original file line number Diff line number Diff line change 1212 < tmpl _loop name ="items ">
1313 < li < tmpl _if name ="html_id "> id='< tmpl _var name ="html_id "> ' </ tmpl _if> >
1414 < tmpl _if name ="link ">
15+ < tmpl _if name ="target " op ="== " value ="_blank ">
16+ < a href ="<tmpl_var name='link'> " target ="_blank ">
17+ < tmpl _else >
1518 < a href ="# " onclick ="loadContent('<tmpl_var name='link'>') ">
19+ </ tmpl _if>
1620 </ tmpl _if>
1721 < tmpl _var name ="title ">
1822 < tmpl _if name ="link ">
Original file line number Diff line number Diff line change 4040
4141unset($ items );
4242
43- //**** Load additional menu items
44- $ menu_dir = ISPC_WEB_PATH .'/tools/lib/menu.d ' ;
45-
46- if (is_dir ($ menu_dir )) {
47- if ($ dh = opendir ($ menu_dir )) {
48- //** Go through all files in the menu dir
49- while (($ file = readdir ($ dh )) !== false ) {
50- if ($ file != '. ' && $ file != '.. ' && substr ($ file , -9 , 9 ) == '.menu.php ' && $ file != 'dns_resync.menu.php ' ) {
51- include_once ($ menu_dir . '/ ' . $ file );
52- }
53- }
54- }
55- }
43+
5644
5745?>
You can’t perform that action at this time.
0 commit comments