fab82227aa6878e4945b2392ee93ec66e775e0aa
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');
bernd database config options

bernd authored 15 years ago

5) require_once('inc/db_connect.php');
6) require_once("inc/base.php");
7) 
8) 
bernd webinterface => /webinterface

bernd authored 17 years ago

9) $go = $_GET['go'];
10) 
11) /*
12)  sanitize $go
13) */
14) 
bernd eliminate .php extensions f...

bernd authored 15 years ago

15) // filenames can end with .php
16) if ( substr( $go, strlen( $go ) - 4 ) == '.php' ) {
17)   $go = substr( $go, 0, strlen($go) - 4);
18) }
19) 
20) DEBUG($go);
21) 
22) if (strstr($go, "..") or strstr($go, "./") or strstr($go, ":") or (! file_exists("modules/$go.php")) or (! is_file("modules/$go.php")))
bernd webinterface => /webinterface

bernd authored 17 years ago

23) {
24)   die("illegal command");
25) }
bernd Inaktive module können nich...

bernd authored 16 years ago

26) $tmp = explode('/', $go, 2);
27) $module = $tmp[0];
bernd Mehr config-optionen und co...

bernd authored 14 years ago

28) if (! in_array($module, config('modules')))
bernd Inaktive module können nich...

bernd authored 16 years ago

29) {
30)   die("illegal command");
31) }
bernd webinterface => /webinterface

bernd authored 17 years ago

32) 
33) 
34) /*
bernd Die Module können überschre...

bernd authored 16 years ago

35)  construct prefix
bernd webinterface => /webinterface

bernd authored 17 years ago

36) */
37) 
38) global $prefix;
39) $prefix = "../";
40) $count = 0;
41) str_replace("/", "x", $go, $count);
42) 
43) $prefix = $prefix.str_repeat("../", $count);
44) 
45) 
46) require_once('session/start.php');
47) 
48) $output = "";
bernd Allow Header entries and AJAX

bernd authored 15 years ago

49) $html_header = "";
bernd Logging aktiviert

bernd authored 16 years ago

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

bernd authored 17 years ago

51) /* setup module include path */
bernd Webapp-Installer, erste Ver...

bernd authored 15 years ago

52) ini_set('include_path',ini_get('include_path').':./modules/'.$module.'/include:');
bernd webinterface => /webinterface

bernd authored 17 years ago

53) 
bernd Die Module können überschre...

bernd authored 16 years ago

54) /* Look where we are (but let the module override) */
bernd git-svn-id: https://svn.sch...

bernd authored 15 years ago

55) $section = str_replace("/", "_", $go);
bernd Die Module können überschre...

bernd authored 16 years ago

56) 
bernd webinterface => /webinterface

bernd authored 17 years ago

57) /* Let the module work */
bernd eliminate .php extensions f...

bernd authored 15 years ago

58) include("modules/".$go.".php");
bernd webinterface => /webinterface

bernd authored 17 years ago

59) 
bernd Gebe nichts aus, wenn $outp...

bernd authored 13 years ago

60) //$title = '';
61) if ($output)
62) {
63)   include('inc/top.php');
64)   print $output;
65)   include('inc/bottom.php');
66) }