Rev 4 | Rev 9 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4 | Rev 8 | ||
---|---|---|---|
1 | <?php |
1 | <?php |
2 | 2 | ||
3 | ////////////////////////////////////////////////////////////////////////////// |
3 | ////////////////////////////////////////////////////////////////////////////// |
4 | // SICHERHEITSVARIABLE // |
4 | // SICHERHEITSVARIABLE // |
5 | ////////////////////////////////////////////////////////////////////////////// |
5 | ////////////////////////////////////////////////////////////////////////////// |
6 | // Ohne diese werden Modulinhalte nicht ausgeführt // |
6 | // Ohne diese werden Modulinhalte nicht ausgeführt // |
7 | ////////////////////////////////////////////////////////////////////////////// |
7 | ////////////////////////////////////////////////////////////////////////////// |
8 | 8 | ||
9 | define('IBLEGAL', '1'); |
9 | define('IBLEGAL', '1'); |
10 | 10 | ||
11 | header('Content-Type: text/html; charset=ISO-8859-1'); |
11 | header('Content-Type: text/html; charset=ISO-8859-1'); |
12 | mb_internal_encoding("ISO-8859-1"); |
12 | mb_internal_encoding("ISO-8859-1"); |
13 | 13 | ||
14 | ////////////////////////////////////////////////////////////////////////////// |
14 | ////////////////////////////////////////////////////////////////////////////// |
15 | // FUNKTIONEN // |
15 | // FUNKTIONEN // |
16 | ////////////////////////////////////////////////////////////////////////////// |
16 | ////////////////////////////////////////////////////////////////////////////// |
17 | 17 | ||
18 | require 'includes/functions.inc.php'; |
18 | require 'includes/functions.inc.php'; |
19 | 19 | ||
20 | ////////////////////////////////////////////////////////////////////////////// |
20 | ////////////////////////////////////////////////////////////////////////////// |
21 | // PRÜFUNG VON MODDIR.TXT // |
21 | // PRÜFUNG VON MODDIR.TXT // |
22 | ////////////////////////////////////////////////////////////////////////////// |
22 | ////////////////////////////////////////////////////////////////////////////// |
23 | 23 | ||
24 | if (!file_exists('modules/moddir.txt')) |
24 | if (!file_exists('modules/moddir.txt')) |
25 | { |
25 | { |
26 | die('<h1>Personal WebBase ist gesperrt</h1>Kann Datei modules/moddir.txt, die das Modulverzeichnis identifiziert, nicht finden. Ist diese vorhanden, sind die Zugriffsberechtigungen der Dateien falsch. Empfohlen: Ordner CHMOD 755, Dateien CHMOD 644.'); |
26 | die('<h1>Personal WebBase ist gesperrt</h1>Kann Datei modules/moddir.txt, die das Modulverzeichnis identifiziert, nicht finden. Ist diese vorhanden, sind die Zugriffsberechtigungen der Dateien falsch. Empfohlen: Ordner CHMOD 755, Dateien CHMOD 644.'); |
27 | } |
27 | } |
28 | 28 | ||
29 | ////////////////////////////////////////////////////////////////////////////// |
29 | ////////////////////////////////////////////////////////////////////////////// |
30 | // KOMPATIBILITÄT // |
30 | // KOMPATIBILITÄT // |
31 | ////////////////////////////////////////////////////////////////////////////// |
31 | ////////////////////////////////////////////////////////////////////////////// |
32 | // Hier werden Einstellunen von PHP lokal verändert oder Variablen // |
32 | // Hier werden Einstellunen von PHP lokal verändert oder Variablen // |
33 | // bearbeitet, sodass Personal WebBase möglichst unabhängig von fremden // |
33 | // bearbeitet, sodass Personal WebBase möglichst unabhängig von fremden // |
34 | // Konfigurationen wird und funktionell bleibt! // |
34 | // Konfigurationen wird und funktionell bleibt! // |
35 | ////////////////////////////////////////////////////////////////////////////// |
35 | ////////////////////////////////////////////////////////////////////////////// |
36 | 36 | ||
37 | // 1. Magic Quotes Sybase abschalten |
37 | // 1. Magic Quotes Sybase abschalten |
38 | @ini_set('magic_quotes_sybase', 'Off'); |
38 | @ini_set('magic_quotes_sybase', 'Off'); |
39 | 39 | ||
40 | // 2. Magic Quotes Runtime abschalten |
40 | // 2. Magic Quotes Runtime abschalten |
41 | if (function_exists('set_magic_quotes_runtime')) |
41 | if (function_exists('set_magic_quotes_runtime')) |
42 | { |
42 | { |
43 | @set_magic_quotes_runtime(0); |
43 | @set_magic_quotes_runtime(0); |
44 | } |
44 | } |
45 | 45 | ||
46 | // 3. variables_order / gpc_order ersetzen |
46 | // 3. variables_order / gpc_order ersetzen |
47 | @ini_set('register_long_arrays', '1'); |
47 | @ini_set('register_long_arrays', '1'); |
48 | $types_to_register = array('ENV', 'GET', 'POST', 'COOKIE', 'SERVER'); // SESSION und FILES werden nicht extrahiert |
48 | $types_to_register = array('ENV', 'GET', 'POST', 'COOKIE', 'SERVER'); // SESSION und FILES werden nicht extrahiert |
49 | foreach ($types_to_register as $rtype) |
49 | foreach ($types_to_register as $rtype) |
50 | { |
50 | { |
51 | // 4. Funktion von "Register Globals" ersetzen, wenn es ausgeschaltet ist |
51 | // 4. Funktion von "Register Globals" ersetzen, wenn es ausgeschaltet ist |
52 | if ((!ini_get('register_globals')) && isset(${'_'.$rtype}) && (@count(${'_'.$rtype}) > 0)) |
52 | if ((!ini_get('register_globals')) && isset(${'_'.$rtype}) && (@count(${'_'.$rtype}) > 0)) |
53 | extract(${'_'.$rtype}, EXTR_OVERWRITE); |
53 | extract(${'_'.$rtype}, EXTR_OVERWRITE); |
54 | 54 | ||
55 | // Workaround, wenn register_long_arrays nicht auf 1 gesetzt werden konnte |
55 | // Workaround, wenn register_long_arrays nicht auf 1 gesetzt werden konnte |
56 | $ch = '_'.$rtype; |
56 | $ch = '_'.$rtype; |
57 | 57 | ||
58 | // 5. Wenn "Magic Quotes GPC" aktiviert, dann die Aenderungen an GET/POST/COOKIE wieder rueckgaengig machen! |
58 | // 5. Wenn "Magic Quotes GPC" aktiviert, dann die Aenderungen an GET/POST/COOKIE wieder rueckgaengig machen! |
59 | // Wir haben db_escape(), um SQL-Strings vor Injektionen zu schuetzen. Wir brauchen Magic Quotes nicht! |
59 | // Wir haben db_escape(), um SQL-Strings vor Injektionen zu schuetzen. Wir brauchen Magic Quotes nicht! |
60 | if (function_exists('get_magic_quotes_gpc') && (get_magic_quotes_gpc() == 1) && (($rtype == 'GET') || ($rtype == 'POST') || ($rtype == 'COOKIE'))) |
60 | if (function_exists('get_magic_quotes_gpc') && (get_magic_quotes_gpc() == 1) && (($rtype == 'GET') || ($rtype == 'POST') || ($rtype == 'COOKIE'))) |
61 | { |
61 | { |
62 | foreach ($$ch AS $m1 => $m2) |
62 | foreach ($$ch AS $m1 => $m2) |
63 | { |
63 | { |
64 | $$m1 = stripslashes($$m1); |
64 | $$m1 = stripslashes($$m1); |
65 | ${'_'.$rtype}[$m1] = stripslashes(${'_'.$rtype}[$m1]); |
65 | ${'_'.$rtype}[$m1] = stripslashes(${'_'.$rtype}[$m1]); |
66 | } |
66 | } |
67 | 67 | ||
68 | unset($m1); |
68 | unset($m1); |
69 | unset($m2); |
69 | unset($m2); |
70 | } |
70 | } |
71 | 71 | ||
72 | // 6. In HTML-Zeichen translatieren |
72 | // 6. In HTML-Zeichen translatieren |
73 | // Wenn Benutzer z.B. ä in ein Formular eingeben, soll dies nicht uebersetzt werden etc! |
73 | // Wenn Benutzer z.B. ä in ein Formular eingeben, soll dies nicht uebersetzt werden etc! |
74 | // Übersetzung von < und > verhindert HTML-Code-Ausführung |
74 | // Übersetzung von < und > verhindert HTML-Code-Ausführung |
75 | if (($rtype == 'GET') || ($rtype == 'POST') || ($rtype == 'COOKIE')) |
75 | if (($rtype == 'GET') || ($rtype == 'POST') || ($rtype == 'COOKIE')) |
76 | { |
76 | { |
77 | foreach ($$ch AS $m1 => $m2) |
77 | foreach ($$ch AS $m1 => $m2) |
78 | { |
78 | { |
79 | $$m1 = transamp_replace_spitze_klammern($$m1); |
79 | $$m1 = transamp_replace_spitze_klammern($$m1); |
80 | ${'_'.$rtype}[$m1] = transamp_replace_spitze_klammern(${'_'.$rtype}[$m1]); |
80 | ${'_'.$rtype}[$m1] = transamp_replace_spitze_klammern(${'_'.$rtype}[$m1]); |
81 | } |
81 | } |
82 | 82 | ||
83 | unset($m1); |
83 | unset($m1); |
84 | unset($m2); |
84 | unset($m2); |
85 | } |
85 | } |
86 | } |
86 | } |
87 | 87 | ||
88 | // 7. Deutsche Umgebung setzen |
88 | // 7. Deutsche Umgebung setzen |
89 | $ary = explode('.', phpversion()); |
89 | $ary = explode('.', phpversion()); |
90 | if (((int)$ary[0] < 4) || (((int)$ary[0] == 4) && ((int)$ary[1] < 3))) |
90 | if (((int)$ary[0] < 4) || (((int)$ary[0] == 4) && ((int)$ary[1] < 3))) |
91 | setlocale(LC_ALL, 'german'); |
91 | setlocale(LC_ALL, 'german'); |
92 | else |
92 | else |
93 | setlocale(LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge', 'german'); |
93 | setlocale(LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge', 'german'); |
94 | @ini_set('date.timezone', 'Europe/Zurich'); |
94 | @ini_set('date.timezone', 'Europe/Zurich'); |
95 | 95 | ||
96 | // 8. MAX_EXECUTION_TIME |
96 | // 8. MAX_EXECUTION_TIME |
97 | @set_time_limit(0); |
97 | @set_time_limit(0); |
98 | 98 | ||
99 | // 9. Um unsauber entwickelte Module zu verhindern, höchstes Fehlerlevel aktivieren |
99 | // 9. Um unsauber entwickelte Module zu verhindern, höchstes Fehlerlevel aktivieren |
100 | if ((int)$ary[0] >= 5) |
100 | if ((int)$ary[0] >= 5) |
101 | @error_reporting(E_ALL | E_STRICT); |
101 | @error_reporting(E_ALL | E_STRICT); |
102 | else |
102 | else |
103 | @error_reporting(E_ALL); |
103 | @error_reporting(E_ALL); |
104 | 104 | ||
105 | ////////////////////////////////////////////////////////////////////////////// |
105 | ////////////////////////////////////////////////////////////////////////////// |
106 | // VARIABLEN-INCLUDES // |
106 | // VARIABLEN-INCLUDES // |
107 | ////////////////////////////////////////////////////////////////////////////// |
107 | ////////////////////////////////////////////////////////////////////////////// |
108 | 108 | ||
109 | $revision = '?'; |
109 | $revision = '?'; |
110 | $rev_datum = '?'; |
110 | $rev_datum = '?'; |
111 | $mysql_zugangsdaten = array(); |
111 | $mysql_zugangsdaten = array(); |
112 | $mysql_zugangsdaten['server'] = 'localhost'; |
112 | $mysql_zugangsdaten['server'] = 'localhost'; |
113 | $mysql_zugangsdaten['praefix'] = 'ironbase_'; |
113 | $mysql_zugangsdaten['praefix'] = 'ironbase_'; |
114 | $mysql_zugangsdaten['username'] = 'root'; |
114 | $mysql_zugangsdaten['username'] = 'root'; |
115 | $mysql_zugangsdaten['passwort'] = ''; |
115 | $mysql_zugangsdaten['passwort'] = ''; |
116 | $mysql_zugangsdaten['datenbank'] = 'ironbase'; |
116 | $mysql_zugangsdaten['datenbank'] = 'ironbase'; |
117 | $lock = 0; |
117 | $lock = 0; |
118 | $force_ssl = 0; |
118 | $force_ssl = 0; |
119 | 119 | ||
120 | if (file_exists('includes/rev.inc.php')) |
120 | if (file_exists('includes/rev.inc.php')) |
121 | include 'includes/rev.inc.php'; |
121 | include 'includes/rev.inc.php'; |
122 | if (file_exists('includes/config.inc.php')) |
122 | if (file_exists('includes/config.inc.php')) |
123 | include 'includes/config.inc.php'; |
123 | include 'includes/config.inc.php'; |
124 | 124 | ||
125 | ////////////////////////////////////////////////////////////////////////////// |
125 | ////////////////////////////////////////////////////////////////////////////// |
126 | // MANUELLE SPERRUNG DURCH LOCK-VARIABLE // |
126 | // MANUELLE SPERRUNG DURCH LOCK-VARIABLE // |
127 | ////////////////////////////////////////////////////////////////////////////// |
127 | ////////////////////////////////////////////////////////////////////////////// |
128 | 128 | ||
129 | if ($lock) |
129 | if ($lock) |
130 | { |
130 | { |
131 | die('<h1>Personal WebBase ist gesperrt</h1>Die Variable "$lock" in "includes/config.inc.php" steht auf 1 bzw. true. Setzen Sie diese Variable erst auf 0, wenn das Hochladen der Dateien beim Installations- bzw. Updateprozess beendet ist. Wenn Sie Personal WebBase freigeben, bevor der Upload abgeschlossen ist, kann es zu einer Beschädigung der Kundendatenbank kommen!'); |
131 | die('<h1>Personal WebBase ist gesperrt</h1>Die Variable "$lock" in "includes/config.inc.php" steht auf 1 bzw. true. Setzen Sie diese Variable erst auf 0, wenn das Hochladen der Dateien beim Installations- bzw. Updateprozess beendet ist. Wenn Sie Personal WebBase freigeben, bevor der Upload abgeschlossen ist, kann es zu einer Beschädigung der Kundendatenbank kommen!'); |
132 | } |
132 | } |
133 | 133 | ||
134 | ////////////////////////////////////////////////////////////////////////////// |
134 | ////////////////////////////////////////////////////////////////////////////// |
135 | // SSL-VERBINDUNG ERZWINGEN? // |
135 | // SSL-VERBINDUNG ERZWINGEN? // |
136 | ////////////////////////////////////////////////////////////////////////////// |
136 | ////////////////////////////////////////////////////////////////////////////// |
137 | 137 | ||
138 | // Hotfix exklusiv für VTS Demosystem |
138 | // Hotfix exklusiv für VTS Demosystem |
139 | //if ((isset($modul)) && ($modul == 'core_cronjob')) { |
139 | //if ((isset($modul)) && ($modul == 'core_cronjob')) { |
140 | //} else { |
140 | //} else { |
141 | 141 | ||
142 | if ($force_ssl) @ini_set('session.cookie_secure', 1); |
142 | if ($force_ssl) @ini_set('session.cookie_secure', 1); |
143 | 143 | ||
144 | if (($force_ssl) && (!isset($_SERVER['HTTPS']) || (strtolower($_SERVER['HTTPS']) != 'on'))) |
144 | if (($force_ssl) && (!isset($_SERVER['HTTPS']) || (strtolower($_SERVER['HTTPS']) != 'on'))) |
145 | { |
145 | { |
146 | if (!headers_sent()) header('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); |
146 | if (!headers_sent()) header('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); |
147 | exit(); |
147 | exit(); |
148 | } |
148 | } |
149 | 149 | ||
150 | //} |
150 | //} |
151 | 151 | ||
152 | ////////////////////////////////////////////////////////////////////////////// |
152 | ////////////////////////////////////////////////////////////////////////////// |
153 | // DATENBANKKONNEKTIVITÄT // |
153 | // DATENBANKKONNEKTIVITÄT // |
154 | ////////////////////////////////////////////////////////////////////////////// |
154 | ////////////////////////////////////////////////////////////////////////////// |
155 | 155 | ||
156 | require 'includes/database.inc.php'; |
156 | require 'includes/database.inc.php'; |
157 | 157 | ||
158 | ////////////////////////////////////////////////////////////////////////////// |
158 | ////////////////////////////////////////////////////////////////////////////// |
159 | // KONSTANTEN FÜR DESIGN // |
159 | // KONSTANTEN FÜR DESIGN // |
160 | ////////////////////////////////////////////////////////////////////////////// |
160 | ////////////////////////////////////////////////////////////////////////////// |
161 | 161 | ||
162 | $javascript = '<script language="JavaScript" type="text/javascript"> |
162 | $javascript = '<script language="JavaScript" type="text/javascript"> |
163 | <!-- |
163 | <!-- |
164 | 164 | ||
165 | function abfrage(url) |
165 | function abfrage(url) |
166 | { |
166 | { |
167 | var is_confirmed = confirm("M\u00f6chten Sie diese Aktion wirklich ausf\u00fchren?"); |
167 | var is_confirmed = confirm("M\u00f6chten Sie diese Aktion wirklich ausf\u00fchren?"); |
168 | if (is_confirmed) |
168 | if (is_confirmed) |
169 | { |
169 | { |
170 | document.location.href = url; |
170 | document.location.href = url; |
171 | } |
171 | } |
172 | } |
172 | } |
173 | 173 | ||
174 | function open_url(uri) |
174 | function open_url(uri) |
175 | { |
175 | { |
176 | w = screen.availWidth/1.35; |
176 | w = screen.availWidth/1.35; |
177 | h = screen.availHeight/1.35; |
177 | h = screen.availHeight/1.35; |
178 | x = screen.availWidth/2-w/2; |
178 | x = screen.availWidth/2-w/2; |
179 | y = screen.availHeight/2-h/2; |
179 | y = screen.availHeight/2-h/2; |
180 | var load = window.open(\'\', \'\', \'height=\'+h+\',width=\'+w+\',left=\'+x+\',top=\'+y+\',screenX=\'+x+\',screenY=\'+y+\',scrollbars=yes,resizable=yes,toolbar=no,location=no,menubar=no,status=no\'); |
180 | var load = window.open(\'\', \'\', \'height=\'+h+\',width=\'+w+\',left=\'+x+\',top=\'+y+\',screenX=\'+x+\',screenY=\'+y+\',scrollbars=yes,resizable=yes,toolbar=no,location=no,menubar=no,status=no\'); |
181 | load.document.location.href = uri; |
181 | load.document.location.href = uri; |
182 | } |
182 | } |
183 | 183 | ||
184 | function oop(modul, seite, titel, gross) |
184 | function oop(modul, seite, titel, gross) |
185 | { |
185 | { |
186 | if (parent.Caption.fertig != "1") |
186 | if (parent.Caption.fertig != "1") |
187 | { |
187 | { |
188 | window.setTimeout("oop(\'"+modul+"\', \'"+seite+"\', \'"+titel+"\', \'"+gross+"\')", 10); |
188 | window.setTimeout("oop(\'"+modul+"\', \'"+seite+"\', \'"+titel+"\', \'"+gross+"\')", 10); |
189 | } |
189 | } |
190 | else |
190 | else |
191 | { |
191 | { |
192 | titel = \'<img src="\'+gross+\'" alt="Icon" width="32" height="32"> \'+titel; |
192 | titel = \'<img src="\'+gross+\'" alt="Icon" width="32" height="32"> \'+titel; |
193 | if (parent.Caption.document.getElementById) parent.Caption.document.getElementById("ueberschrift").innerHTML = titel; else if (parent.Caption.document.all) parent.Caption.document.ueberschrift.innerHTML = titel; |
193 | if (parent.Caption.document.getElementById) parent.Caption.document.getElementById("ueberschrift").innerHTML = titel; else if (parent.Caption.document.all) parent.Caption.document.ueberschrift.innerHTML = titel; |
194 | parent.Inhalt.location.href = "modulseite.php?'.(($_SERVER["QUERY_STRING"] != '') ? $_SERVER["QUERY_STRING"].'&' : '').'modul="+modul+"&seite="+seite; |
194 | parent.Inhalt.location.href = "modulseite.php?'.(($_SERVER["QUERY_STRING"] != '') ? $_SERVER["QUERY_STRING"].'&' : '').'modul="+modul+"&seite="+seite; |
195 | } |
195 | } |
196 | } |
196 | } |
197 | 197 | ||
198 | function oop2(myurl, titel, gross) |
198 | function oop2(myurl, titel, gross) |
199 | { |
199 | { |
200 | if (parent.Caption.fertig != "1") |
200 | if (parent.Caption.fertig != "1") |
201 | { |
201 | { |
202 | window.setTimeout("oop(\'"+modul+"\', \'"+seite+"\', \'"+titel+"\', \'"+gross+"\')", 10); |
202 | window.setTimeout("oop(\'"+modul+"\', \'"+seite+"\', \'"+titel+"\', \'"+gross+"\')", 10); |
203 | } |
203 | } |
204 | else |
204 | else |
205 | { |
205 | { |
206 | titel = \'<img src="\'+gross+\'" alt="Icon" width="32" height="32"> \'+titel; |
206 | titel = \'<img src="\'+gross+\'" alt="Icon" width="32" height="32"> \'+titel; |
207 | if (parent.Caption.document.getElementById) parent.Caption.document.getElementById("ueberschrift").innerHTML = titel; else if (parent.Caption.document.all) parent.Caption.document.ueberschrift.innerHTML = titel; |
207 | if (parent.Caption.document.getElementById) parent.Caption.document.getElementById("ueberschrift").innerHTML = titel; else if (parent.Caption.document.all) parent.Caption.document.ueberschrift.innerHTML = titel; |
208 | open_url(myurl); |
208 | open_url(myurl); |
209 | } |
209 | } |
210 | } |
210 | } |
211 | 211 | ||
212 | // --> |
212 | // --> |
213 | </script>'; |
213 | </script>'; |
214 | 214 | ||
215 | $header = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
215 | $header = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
216 | 216 | ||
217 | <html> |
217 | <html> |
218 | <head> |
218 | <head> |
219 | <title>ViaThinkSoft Personal WebBase</title> |
219 | <title>ViaThinkSoft Personal WebBase</title> |
220 | <link href="style.css.php" rel="stylesheet" type="text/css"> |
220 | <link href="style.css.php" rel="stylesheet" type="text/css"> |
221 | <link rel="SHORTCUT ICON" href="favicon.ico"> |
221 | <link rel="SHORTCUT ICON" href="favicon.ico"> |
222 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
222 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
223 | </head> |
223 | </head> |
224 | 224 | ||
225 | <body>'.$javascript; |
225 | <body>'.$javascript; |
226 | 226 | ||
227 | $header_navi = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
227 | $header_navi = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
228 | 228 | ||
229 | <html> |
229 | <html> |
230 | <head> |
230 | <head> |
231 | <title>ViaThinkSoft Personal WebBase</title> |
231 | <title>ViaThinkSoft Personal WebBase</title> |
232 | <link href="style.css.php" rel="stylesheet" type="text/css"> |
232 | <link href="style.css.php" rel="stylesheet" type="text/css"> |
233 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
233 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
234 | </head> |
234 | </head> |
235 | 235 | ||
236 | <body class="dark">'.$javascript; |
236 | <body class="dark">'.$javascript; |
237 | 237 | ||
238 | $footer = '</body></html>'; |
238 | $footer = '</body></html>'; |
239 | 239 | ||
240 | ////////////////////////////////////////////////////////////////////////////// |
240 | ////////////////////////////////////////////////////////////////////////////// |
241 | // MODULINITIALISIERUNG // |
241 | // MODULINITIALISIERUNG // |
242 | ////////////////////////////////////////////////////////////////////////////// |
242 | ////////////////////////////////////////////////////////////////////////////// |
243 | 243 | ||
244 | // 1. Modulliste laden |
244 | // 1. Modulliste laden |
245 | 245 | ||
246 | function liste_module() |
246 | function liste_module() |
247 | { |
247 | { |
248 | $ary = array(); |
248 | $ary = array(); |
249 | $i = 0; |
249 | $i = 0; |
250 | $v = 'modules/'; |
250 | $v = 'modules/'; |
251 | $verz = opendir($v); |
251 | $verz = opendir($v); |
252 | 252 | ||
253 | while ($file = readdir($verz)) |
253 | while ($file = readdir($verz)) |
254 | { |
254 | { |
255 | if (($file != '.') && ($file != '..') && (is_dir($v.$file))) |
255 | if (($file != '.') && ($file != '..') && (is_dir($v.$file))) |
256 | { |
256 | { |
257 | $i++; |
257 | $i++; |
258 | $ary[$i] = $file; |
258 | $ary[$i] = $file; |
259 | } |
259 | } |
260 | } |
260 | } |
261 | 261 | ||
262 | closedir($verz); |
262 | closedir($verz); |
263 | sort($ary); |
263 | sort($ary); |
264 | 264 | ||
265 | return $ary; |
265 | return $ary; |
266 | } |
266 | } |
267 | 267 | ||
268 | $module = liste_module(); |
268 | $module = liste_module(); |
269 | 269 | ||
270 | // 2. Modul-Autostarts ausführen |
270 | // 2. Modul-Autostarts ausführen |
271 | 271 | ||
272 | $erf = false; |
272 | $erf = false; |
273 | for ($st=0; true; $st++) |
273 | for ($st=0; true; $st++) |
274 | { |
274 | { |
275 | $erf = false; |
275 | $erf = false; |
276 | foreach ($module AS $m1 => $m2) |
276 | foreach ($module AS $m1 => $m2) |
277 | { |
277 | { |
278 | if (file_exists('modules/'.$m2.'/autostart_'.$st.'.inc.php')) |
278 | if (file_exists('modules/'.wb_dir_escape($m2).'/autostart_'.wb_dir_escape($st).'.inc.php')) |
279 | { |
279 | { |
280 | include 'modules/'.$m2.'/autostart_'.$st.'.inc.php'; |
280 | include 'modules/'.wb_dir_escape($m2).'/autostart_'.wb_dir_escape($st).'.inc.php'; |
281 | $erf = true; |
281 | $erf = true; |
282 | } |
282 | } |
283 | } |
283 | } |
284 | 284 | ||
285 | unset($m1); |
285 | unset($m1); |
286 | unset($m2); |
286 | unset($m2); |
287 | 287 | ||
288 | if (!$erf) break; |
288 | if (!$erf) break; |
289 | } |
289 | } |
290 | 290 | ||
291 | 291 |