452ec619bd2286d8fa055f9ab94f1e1ee7357f71
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) 
11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
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) 
17) function show_page($path = NULL) 
18) {
Bernd Wurst Binde style.css von Modulen...

Bernd Wurst authored 6 years ago

19)   global $prefix, $go, $title, $headline, $output, $module, $page, $html_header, $footnotes;
20) 
21)   $styles = array();
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)   }
bernd Umstellung auf Theme-Suppor...

bernd authored 14 years ago

28)   if ($path) {
29)   	$module = $path;
30)   }
31)   $theme = config('theme');
bernd Setze "default" als Standar...

bernd authored 14 years ago

32)   if (! $theme)
33)     $theme = 'default';
bernd Umstellung auf Theme-Suppor...

bernd authored 14 years ago

34)   $theme_path = "themes/$theme/";
35)   $candidates = array();
36)   if ($page) {
37)     $candidates[] = "{$theme_path}page-$module-$page.tpl.php";
38)   }
39)   $candidates[] = "{$theme_path}page-$module.tpl.php";
40)   $candidates[] = "{$theme_path}page.tpl.php";
41)   if ($page) {
42)     $candidates[] = "modules/{$module}/theme/page-$page.tpl.php";
43)   }
44)   $candidates[] = "modules/{$module}/theme/page.tpl.php";
45)   if ($page) {
46)     $candidates[] = "themes/default/page-$module-$page.tpl.php";
47)   }
48)   $candidates[] = "themes/default/page-$module.tpl.php";
49)   $candidates[] = "themes/default/page.tpl.php";
50) 
51)   $theme_file = NULL;
52)   foreach ($candidates AS $c) {
53)   	if (file_exists($c)) {
54) 		$theme_file = $c;
55) 		break;
56) 	}
57)   }
58)   if (! file_exists($theme_file))
59)     die("cannot get any theme file");
60) 
61)   include('inc/top.php');
62)   if (!isset($title))
63)     $title = '';
bernd Benutze überall title() sta...

bernd authored 14 years ago

64)   if (!isset($headline))
65)     $headline = $title;