2c12954c8f8de67563104506a0dfb7a2387c8b91
bernd webinterface => /webinterface

bernd authored 17 years ago

1) <?php
2) 
bernd Menü-Includes sinnvoller /...

bernd authored 16 years ago

3) require_once('config.php');
bernd webinterface => /webinterface

bernd authored 17 years ago

4) require_once('inc/debug.php');
5) $go = $_GET['go'];
6) 
7) /*
8)  sanitize $go
9) */
10) 
bernd aufgerufenes Modul muss ein...

bernd authored 16 years ago

11) if (strstr($go, "..") or strstr($go, "./") or strstr($go, ":") or (! file_exists("modules/$go")) or (! is_file("modules/$go")))
bernd webinterface => /webinterface

bernd authored 17 years ago

12) {
13)   die("illegal command");
14) }
bernd Inaktive module können nich...

bernd authored 16 years ago

15) $tmp = explode('/', $go, 2);
16) $module = $tmp[0];
17) if (! in_array($module, $config['modules']))
18) {
19)   die("illegal command");
20) }
bernd webinterface => /webinterface

bernd authored 17 years ago

21) 
22) 
23) /*
bernd Die Module können überschre...

bernd authored 16 years ago

24)  construct prefix
bernd webinterface => /webinterface

bernd authored 17 years ago

25) */
26) 
27) global $prefix;
28) $prefix = "../";
29) $count = 0;
30) str_replace("/", "x", $go, $count);
31) 
32) $prefix = $prefix.str_repeat("../", $count);
33) 
34) 
35) require_once('session/start.php');
36) 
37) $output = "";
bernd Logging aktiviert

bernd authored 16 years ago

38) require_once("inc/base.php");
bernd webinterface => /webinterface

bernd authored 17 years ago

39) /* setup module include path */
40) ini_set('include_path',ini_get('include_path').':./modules/'.dirname($go).'/include:');
41) 
bernd Die Module können überschre...

bernd authored 16 years ago

42) /* Look where we are (but let the module override) */
43) $section = str_replace("/", "_", str_replace(".php", "", $go));
44)