228275dc454e67f14af5fe52b29bbe0ed60d38d3
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) }
15) 
16) 
17) /*
bernd Die Module können überschre...

bernd authored 16 years ago

18)  construct prefix
bernd webinterface => /webinterface

bernd authored 17 years ago

19) */
20) 
21) global $prefix;
22) $prefix = "../";
23) $count = 0;
24) str_replace("/", "x", $go, $count);
25) 
26) $prefix = $prefix.str_repeat("../", $count);
27) 
28) 
29) require_once('session/start.php');
30) 
31) $output = "";
bernd Logging aktiviert

bernd authored 16 years ago

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

bernd authored 17 years ago

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

bernd authored 16 years ago

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