ff0f9b9b8aecdc1dfd011fdfbee2cf577b00e3a2
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");
bernd Umstellung auf Theme-Suppor...

bernd authored 13 years ago

7) require_once("inc/theme.php");
bernd database config options

bernd authored 15 years ago

8) 
9) 
bernd webinterface => /webinterface

bernd authored 17 years ago

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

bernd authored 15 years ago

16) // filenames can end with .php
17) if ( substr( $go, strlen( $go ) - 4 ) == '.php' ) {
18)   $go = substr( $go, 0, strlen($go) - 4);
19) }
20) 
21) DEBUG($go);
22) 
23) 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

24) {
25)   die("illegal command");
26) }
bernd Umstellung auf Theme-Suppor...

bernd authored 13 years ago

27) list($module, $page) = explode('/', $go, 2);
28) $page = str_replace('/', '-', $page);
bernd Mehr config-optionen und co...

bernd authored 14 years ago

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

bernd authored 16 years ago

30) {
bernd Umstellung auf Theme-Suppor...

bernd authored 13 years ago

31)   die("inactive module");
bernd Inaktive module können nich...

bernd authored 16 years ago

32) }
bernd webinterface => /webinterface

bernd authored 17 years ago

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

bernd authored 16 years ago

36)  construct prefix
bernd webinterface => /webinterface

bernd authored 17 years ago

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

bernd authored 15 years ago

50) $html_header = "";
bernd Logging aktiviert

bernd authored 16 years ago

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

bernd authored 17 years ago

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

bernd authored 15 years ago

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

bernd authored 17 years ago

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

bernd authored 16 years ago

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

bernd authored 15 years ago

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

bernd authored 16 years ago

57) 
bernd webinterface => /webinterface

bernd authored 17 years ago

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

bernd authored 15 years ago

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

bernd authored 17 years ago

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

bernd authored 13 years ago

61) if ($output)
62) {
bernd Umstellung auf Theme-Suppor...

bernd authored 13 years ago

63)   if (!isset($title)) {
64)     $title = '';
65)   }
66)   show_page($module, $page);
bernd Gebe nichts aus, wenn $outp...

bernd authored 13 years ago

67) }