874472f64c02e211a3eed33c645483fc26427fe6
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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

5) Written 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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

9) This code is published under a 0BSD license.
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

10) 
11) 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.
12) */
bernd Umstellung auf Theme-Suppor...

bernd authored 14 years ago

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

Hanno authored 6 years ago

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

bernd authored 14 years ago

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

Hanno authored 6 years ago

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

Bernd Wurst authored 6 years ago

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

Hanno Böck authored 3 years ago

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

Hanno authored 6 years ago

19)     if (file_exists("modules/{$module}/style.css")) {
20)         $styles[] = "modules/{$module}/style.css";
21)     }
22)     foreach ($styles as $style) {
Hanno Böck remove obsolete type attrib...

Hanno Böck authored 10 months ago

23)         html_header('<link rel="stylesheet" href="' . $prefix . $style . '">' . "\n");
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

24)     }
25)     if ($path) {
26)         $module = $path;
27)     }
28)     $theme = config('theme');
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 1 year ago

29)     if (!$theme) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

30)         $theme = 'default';
31)     }
32)     $theme_path = "themes/$theme/";
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

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

Hanno authored 6 years ago

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

bernd authored 14 years ago

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

Hanno authored 6 years ago

49)     $theme_file = null;
50)     foreach ($candidates as $c) {
51)         if (file_exists($c)) {
52)             $theme_file = $c;
53)             break;
54)         }
55)     }
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 1 year ago

56)     if (!file_exists($theme_file)) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

57)         die("cannot get any theme file");
58)     }
bernd Umstellung auf Theme-Suppor...

bernd authored 14 years ago

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

Hanno authored 6 years ago

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

bernd authored 14 years ago

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

Hanno authored 6 years ago

69)     include($theme_file);