c61521fa744024963e46a2d89065740866edfa98
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) /*
9)  read configuration from database
10) */
11) 
12) $options = db_query( "SELECT `key`, value FROM misc.config" );
13) 
14) while( $object = mysql_fetch_assoc( $options ) ) {
15) //	echo "1";
16) //	echo $object['key'];
17) 	$config[$object['key']]=$object['value'];
18) }
19) //print_r($config);
20) 
bernd webinterface => /webinterface

bernd authored 17 years ago

21) $go = $_GET['go'];
22) 
23) /*
24)  sanitize $go
25) */
26) 
bernd eliminate .php extensions f...

bernd authored 15 years ago

27) // filenames can end with .php
28) if ( substr( $go, strlen( $go ) - 4 ) == '.php' ) {
29)   $go = substr( $go, 0, strlen($go) - 4);
30) }
31) 
32) DEBUG($go);
33) 
34) 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

35) {
36)   die("illegal command");
37) }
bernd Inaktive module können nich...

bernd authored 16 years ago

38) $tmp = explode('/', $go, 2);
39) $module = $tmp[0];
40) if (! in_array($module, $config['modules']))
41) {
42)   die("illegal command");
43) }
bernd webinterface => /webinterface

bernd authored 17 years ago

44) 
45) 
46) /*
bernd Die Module können überschre...

bernd authored 16 years ago

47)  construct prefix
bernd webinterface => /webinterface

bernd authored 17 years ago

48) */
49) 
50) global $prefix;
51) $prefix = "../";
52) $count = 0;
53) str_replace("/", "x", $go, $count);
54) 
55) $prefix = $prefix.str_repeat("../", $count);
56) 
57) 
58) require_once('session/start.php');
59) 
60) $output = "";
bernd Allow Header entries and AJAX

bernd authored 15 years ago

61) $html_header = "";
bernd Logging aktiviert

bernd authored 16 years ago

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

bernd authored 17 years ago

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

bernd authored 15 years ago

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

bernd authored 17 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

68) 
bernd webinterface => /webinterface

bernd authored 17 years ago

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

bernd authored 15 years ago

70) include("modules/".$go.".php");