6108de7883b491404150c3901961c7b65f6faceb
bernd webinterface => /webinterface

bernd authored 17 years ago

1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting.
4) Please see http://source.schokokeks.org for the newest source files.
5) 
Bernd Wurst Updated copyright notice (2...

Bernd Wurst authored 11 years ago

6) Written 2008-2013 by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

7)   Bernd Wurst <bernd@schokokeks.org>
8)   Hanno Böck <hanno@schokokeks.org>
9) 
10) To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
11) 
12) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
13) http://creativecommons.org/publicdomain/zero/1.0/
14) 
15) Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
16) */
bernd webinterface => /webinterface

bernd authored 17 years ago

17) 
bernd Menü-Includes sinnvoller /...

bernd authored 17 years ago

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

bernd authored 17 years ago

19) require_once('inc/debug.php');
Bernd Wurst Umstellung auf mysqli

Bernd Wurst authored 11 years ago

20) require_once('inc/db.php');
bernd database config options

bernd authored 15 years ago

21) require_once("inc/base.php");
bernd Umstellung auf Theme-Suppor...

bernd authored 14 years ago

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

bernd authored 15 years ago

23) 
24) 
bernd webinterface => /webinterface

bernd authored 17 years ago

25) $go = $_GET['go'];
26) 
27) /*
28)  sanitize $go
29) */
30) 
bernd eliminate .php extensions f...

bernd authored 16 years ago

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

39) {
40)   die("illegal command");
41) }
bernd Umstellung auf Theme-Suppor...

bernd authored 14 years ago

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

bernd authored 15 years ago

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

bernd authored 17 years ago

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

bernd authored 14 years ago

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

bernd authored 17 years ago

47) }
bernd webinterface => /webinterface

bernd authored 17 years ago

48) 
49) 
50) /*
bernd Die Module können überschre...

bernd authored 17 years ago

51)  construct prefix
bernd webinterface => /webinterface

bernd authored 17 years ago

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

bernd authored 16 years ago

65) $html_header = "";
bernd Logging aktiviert

bernd authored 17 years ago

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

bernd authored 17 years ago

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

bernd authored 15 years ago

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

bernd authored 17 years ago

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

bernd authored 17 years ago

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

bernd authored 16 years ago

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

bernd authored 17 years ago

72) 
bernd webinterface => /webinterface

bernd authored 17 years ago

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

bernd authored 16 years ago

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

bernd authored 17 years ago

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

bernd authored 14 years ago

76) if ($output)
77) {
bernd Umstellung auf Theme-Suppor...

bernd authored 14 years ago

78)   if (!isset($title)) {
79)     $title = '';
80)   }
81)   show_page($module, $page);
bernd Gebe nichts aus, wenn $outp...

bernd authored 14 years ago

82) }