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