2626dd47daad110c63a82c0560b134e2364eeac3
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.
Hanno Böck URLs von http nach https

Hanno Böck authored 8 years ago

4) Please see https://source.schokokeks.org for the newest source files.
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

5) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

6) Written 2008-2018 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) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

12) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Hanno Böck URLs von http nach https

Hanno Böck authored 8 years ago

13) https://creativecommons.org/publicdomain/zero/1.0/
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

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 database config options

bernd authored 15 years ago

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

bernd authored 14 years ago

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

bernd authored 15 years ago

22) 
23) 
bernd webinterface => /webinterface

bernd authored 17 years ago

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

bernd authored 16 years ago

30) // filenames can end with .php
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

31) if (substr($go, strlen($go) - 4) == '.php') {
32)     $go = substr($go, 0, strlen($go) - 4);
bernd eliminate .php extensions f...

bernd authored 16 years ago

33) }
34) 
35) DEBUG($go);
36) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

37) if (strstr($go, "..") or strstr($go, "./") or strstr($go, ":") or (! file_exists("modules/$go.php")) or (! is_file("modules/$go.php"))) {
38)     die("illegal command");
bernd webinterface => /webinterface

bernd authored 17 years ago

39) }
bernd Umstellung auf Theme-Suppor...

bernd authored 14 years ago

40) list($module, $page) = explode('/', $go, 2);
41) $page = str_replace('/', '-', $page);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

42) if (! in_array($module, config('modules'))) {
43)     die("inactive module");
bernd Inaktive module können nich...

bernd authored 17 years ago

44) }
bernd webinterface => /webinterface

bernd authored 17 years ago

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

bernd authored 17 years ago

48)  construct prefix
bernd webinterface => /webinterface

bernd authored 17 years ago

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

bernd authored 16 years ago

62) $html_header = "";
bernd Logging aktiviert

bernd authored 17 years ago

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

bernd authored 17 years ago

64) /* setup module include path */
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

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

bernd authored 17 years ago

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

bernd authored 17 years ago

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

bernd authored 16 years ago

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

bernd authored 17 years ago

69) 
bernd webinterface => /webinterface

bernd authored 17 years ago

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

bernd authored 16 years ago

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

bernd authored 17 years ago

72) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

73) if ($output) {
74)     if (!isset($title)) {
75)         $title = '';
76)     }
77)     show_page($module, $page);