96649f21ba18d07757afa9d98998f7a22c0d86a3
bernd Umstellung auf Theme-Suppor...

bernd authored 14 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) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

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

Bernd Wurst authored 12 years ago

6)   Bernd Wurst <bernd@schokokeks.org>
7)   Hanno Böck <hanno@schokokeks.org>
8) 
9) 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.
10) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

12) http://creativecommons.org/publicdomain/zero/1.0/
13) 
14) 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.
15) */
bernd Umstellung auf Theme-Suppor...

bernd authored 14 years ago

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

Hanno authored 6 years ago

17) function show_page($path = null)
bernd Umstellung auf Theme-Suppor...

bernd authored 14 years ago

18) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

19)     global $prefix, $go, $title, $headline, $output, $module, $page, $html_header, $footnotes;
Bernd Wurst Binde style.css von Modulen...

Bernd Wurst authored 6 years ago

20) 
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

21)     $styles = [];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

22)     if (file_exists("modules/{$module}/style.css")) {
23)         $styles[] = "modules/{$module}/style.css";
24)     }
25)     foreach ($styles as $style) {
26)         html_header('<link rel="stylesheet" href="'.$prefix.$style.'" type="text/css" />'."\n");
27)     }
28)     if ($path) {
29)         $module = $path;
30)     }
31)     $theme = config('theme');
32)     if (! $theme) {
33)         $theme = 'default';
34)     }
35)     $theme_path = "themes/$theme/";
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

36)     $candidates = [];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

37)     if ($page) {
38)         $candidates[] = "{$theme_path}page-$module-$page.tpl.php";
39)     }
40)     $candidates[] = "{$theme_path}page-$module.tpl.php";
41)     $candidates[] = "{$theme_path}page.tpl.php";
42)     if ($page) {
43)         $candidates[] = "modules/{$module}/theme/page-$page.tpl.php";
44)     }
45)     $candidates[] = "modules/{$module}/theme/page.tpl.php";
46)     if ($page) {
47)         $candidates[] = "themes/default/page-$module-$page.tpl.php";
48)     }
49)     $candidates[] = "themes/default/page-$module.tpl.php";
50)     $candidates[] = "themes/default/page.tpl.php";
bernd Umstellung auf Theme-Suppor...

bernd authored 14 years ago

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

Hanno authored 6 years ago

52)     $theme_file = null;
53)     foreach ($candidates as $c) {
54)         if (file_exists($c)) {
55)             $theme_file = $c;
56)             break;
57)         }
58)     }
59)     if (! file_exists($theme_file)) {
60)         die("cannot get any theme file");
61)     }
bernd Umstellung auf Theme-Suppor...

bernd authored 14 years ago

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

Hanno authored 6 years ago

63)     include('inc/top.php');
64)     if (!isset($title)) {
65)         $title = '';
66)     }
67)     if (!isset($headline)) {
68)         $headline = $title;
69)     }
70)     $content = $output;
bernd Umstellung auf Theme-Suppor...

bernd authored 14 years ago

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

Hanno authored 6 years ago

72)     include($theme_file);