r301: Adding base template structure to the system.
[bugdar.git] / global.php
1 <?php
2 /*=====================================================================*\
3 || ################################################################### ||
4 || # BugStrike [#]version[#]
5 || # --------------------------------------------------------------- # ||
6 || # Copyright ©2002-[#]year[#] by Iris Studios, Inc. All Rights Reserved. # ||
7 || # This file may not be reproduced in any way without permission. # ||
8 || # --------------------------------------------------------------- # ||
9 || # User License Agreement at http://www.iris-studios.com/license/ # ||
10 || ################################################################### ||
11 \*=====================================================================*/
12
13 require_once('./includes/init.php');
14
15 // ###################################################################
16 // initialize template system
17 $bugsys->load('template_fs');
18 $template->extension = 'tpl';
19 $template->templatedir = $bugsys->fetch_sourcepath('templates/');
20
21 // ###################################################################
22 // global template variables
23
24 $datetime = $datef->format('l, F j, Y g:i A');
25
26 // ###################################################################
27 // cache templates
28 $globaltemplates = array(
29 'doctype',
30 'header',
31 'headinclude',
32 'footer',
33 'selectoption',
34 'selectoptgroup',
35 'std_error',
36 'std_redirect',
37 'std_message',
38 'bugfield_input_text',
39 'bugfield_input_checkbox',
40 'bugfield_select_single_option',
41 'bugfield_select_single'
42 );
43
44 $template->cache(array_merge($globaltemplates, (array)$fetchtemplates));
45
46 eval('$header = "' . $template->fetch('header') . '";');
47 eval('$doctype = "' . $template->fetch('doctype') . '";');
48 eval('$headinclude = "' . $template->fetch('headinclude') . '";');
49 eval('$footer = "' . $template->fetch('footer') . '";');
50
51 // ###################################################################
52 // initialize template variables
53 $show = array();
54
55 // ###################################################################
56 // create error reporter
57 require_once('./includes/class_message_reporter.php');
58 $message = new Message_Reporter();
59 $bugsys->message =& $message;
60
61 /*=====================================================================*\
62 || ###################################################################
63 || # $HeadURL$
64 || # $Id$
65 || ###################################################################
66 \*=====================================================================*/
67 ?>