Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | daniel-mar | 1 | <?php |
2 | |||
3 | require 'includes/main.inc.php'; |
||
4 | require 'includes/modulinit.inc.php'; |
||
5 | |||
6 | echo $header_navi; |
||
7 | |||
8 | ?><table cellspacing="0" cellpadding="2" border="0" width="100%" style="height:100%"> |
||
9 | <tr class="area_bar"> |
||
10 | <td valign="middle" align="center" colspan="5"> |
||
11 | |||
12 | <b><?php |
||
13 | |||
14 | $ueberschrift = ''; |
||
15 | $menue = ''; |
||
16 | |||
17 | if (!isset($prv_seite)) $prv_seite = 'main'; |
||
18 | |||
19 | if ($ueberschrift != '') |
||
20 | { |
||
21 | echo $ueberschrift; |
||
22 | } |
||
23 | else |
||
24 | { |
||
25 | if ($wb_user_type == '0') |
||
26 | echo 'Gastzugang'; |
||
27 | else if ($wb_user_type == '1') |
||
28 | echo 'Benutzermenü'; |
||
29 | else if ($wb_user_type == '2') |
||
30 | echo 'Verwaltung'; |
||
31 | else |
||
32 | echo 'Hauptmenü'; |
||
33 | } |
||
34 | |||
35 | ?></b><img src="designs/spacer.gif" alt="" width="1" height="14"></td> |
||
36 | </tr> |
||
37 | |||
38 | <?php |
||
39 | |||
40 | echo wb_draw_menu_spacer(); |
||
41 | |||
42 | $startgefunden = false; |
||
43 | if ($menue == '') |
||
44 | { |
||
45 | // Wenn Sek-Pos nicht gegeben, nach Überschrift sortieren |
||
46 | $sort_by_captions = array(); |
||
47 | foreach ($modules as $m1 => $m2) |
||
48 | { |
||
49 | $module_information = WBModuleHandler::get_module_information($m2); |
||
50 | $sort_by_captions[$m2] = $module_information->caption; |
||
51 | } |
||
52 | unset($m1); |
||
53 | unset($m2); |
||
54 | asort($sort_by_captions); |
||
55 | |||
56 | // Nun einzelne Einträge abgehen |
||
57 | $men = array(); |
||
58 | foreach ($sort_by_captions as $m1 => $m2) |
||
59 | { |
||
60 | $module_information = WBModuleHandler::get_module_information($m1); |
||
61 | |||
62 | if (((($wb_user_type == 0) || ($wb_user_type == 1)) && ($module_information->rights == 0)) || ($wb_user_type == $module_information->rights)) |
||
63 | { |
||
64 | if (($module_information->menu_visible) && (file_exists('modules/'.$m1.'/page/main.inc.php'))) |
||
65 | { |
||
66 | if (file_exists('modules/'.$m1.'/images/menu/32.gif')) |
||
67 | $g = 'modules/'.$m1.'/images/menu/32.gif'; |
||
68 | else if (file_exists('modules/'.$m1.'/images/menu/32.png')) |
||
69 | $g = 'modules/'.$m1.'/images/menu/32.png'; |
||
70 | else |
||
71 | $g = 'designs/spacer.gif'; |
||
72 | |||
73 | if (file_exists('modules/'.$m1.'/images/menu/16.gif')) |
||
74 | $k = 'modules/'.$m1.'/images/menu/16.gif'; |
||
75 | else if (file_exists('modules/'.$m1.'/images/menu/16.png')) |
||
76 | $k = 'modules/'.$m1.'/images/menu/16.png'; |
||
77 | else |
||
78 | $k = 'designs/spacer.gif'; |
||
79 | |||
80 | if (!isset($men[$module_information->primary_position][$module_information->secondary_position])) $men[$module_information->primary_position][$module_information->secondary_position] = ''; |
||
81 | $men[$module_information->primary_position][$module_information->secondary_position] .= wb_draw_menu_item($m1, 'main', htmlentities($module_information->caption), $k, $g); |
||
82 | } |
||
83 | if (isset($prv_modul) && ($m1 == $prv_modul) && (file_exists('modules/'.$m1.'/page/main.inc.php'))) |
||
84 | { |
||
85 | if (file_exists('modules/'.$m1.'/images/menu/32.gif')) |
||
86 | $g = 'modules/'.$m1.'/images/menu/32.gif'; |
||
87 | else if (file_exists('modules/'.$m1.'/images/menu/32.png')) |
||
88 | $g = 'modules/'.$m1.'/images/menu/32.png'; |
||
89 | else |
||
90 | $g = 'designs/spacer.gif'; |
||
91 | |||
92 | $endjs = '<script language="JavaScript" type="text/javascript"> |
||
93 | <!-- |
||
94 | oop(\''.$m1.'\', \''.$prv_seite.'\', \''.htmlentities($module_information->caption).'\', \''.$g.'\'); |
||
95 | // --> |
||
96 | </script>'."\n\n"; |
||
97 | $startgefunden = true; |
||
98 | } |
||
99 | else |
||
100 | { |
||
101 | if (($module_information->primary_position == 0) && ($module_information->secondary_position == 0) && (!$startgefunden) && (file_exists('modules/'.$m1.'/page/main.inc.php'))) |
||
102 | { |
||
103 | if (file_exists('modules/'.$m1.'/images/menu/32.gif')) |
||
104 | $g = 'modules/'.$m1.'/images/menu/32.gif'; |
||
105 | else if (file_exists('modules/'.$m1.'/images/menu/32.png')) |
||
106 | $g = 'modules/'.$m1.'/images/menu/32.png'; |
||
107 | else |
||
108 | $g = 'designs/spacer.gif'; |
||
109 | |||
110 | $endjs = '<script language="JavaScript" type="text/javascript"> |
||
111 | <!-- |
||
112 | oop(\''.$m1.'\', \'main\', \''.htmlentities($module_information->caption).'\', \''.$g.'\'); |
||
113 | // --> |
||
114 | </script>'."\n\n"; |
||
115 | $startgefunden = true; |
||
116 | } |
||
117 | } |
||
118 | } |
||
119 | } |
||
120 | unset($m1); |
||
121 | unset($m2); |
||
122 | |||
123 | $first = true; |
||
124 | ksort($men); |
||
125 | foreach ($men as $m1 => $m2) |
||
126 | { |
||
127 | if ($first) |
||
128 | $first = false; |
||
129 | else |
||
130 | echo wb_draw_menu_spacer(); |
||
131 | ksort($men[$m1]); |
||
132 | foreach ($men[$m1] as $x1 => $x2) |
||
133 | echo $x2; |
||
134 | } |
||
135 | |||
136 | unset($m1); |
||
137 | unset($m2); |
||
138 | } |
||
139 | else |
||
140 | { |
||
141 | echo $menue; |
||
142 | } |
||
143 | |||
144 | ?> |
||
145 | |||
146 | <tr> |
||
147 | <td colspan="5" height="100%"><img src="designs/spacer.gif" alt="" width="1" height="1"></td> |
||
148 | </tr> |
||
149 | </table> |
||
150 | |||
151 | <?php |
||
152 | |||
153 | echo $endjs; |
||
154 | |||
155 | echo $footer; |
||
156 | |||
157 | ?> |