c208bd906b3991555db11b9229846c4601ca408c
bernd Umstellung auf Theme-Suppor...

bernd authored 13 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) 
5) Written 2008-2012 by schokokeks.org Hosting, namely
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 13 years ago

16) 
17) function show_page($path = NULL) 
18) {
bernd Auch $html_header muss dem...

bernd authored 13 years ago

19)   global $go, $title, $headline, $output, $module, $page, $html_header;
bernd Umstellung auf Theme-Suppor...

bernd authored 13 years ago

20)   if ($path) {
21)   	$module = $path;
22)   }
23)   $theme = config('theme');
bernd Setze "default" als Standar...

bernd authored 13 years ago

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

bernd authored 13 years ago

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

bernd authored 13 years ago

56)   if (!isset($headline))
57)     $headline = $title;