r294: Preparing global templates; removing header code from global.php.
[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 // cache templates
23 $globaltemplates = array(
24 'doctype',
25 'header',
26 'headinclude',
27 'footer',
28 'selectoption',
29 'selectoptgroup',
30 'std_error',
31 'std_redirect',
32 'std_message',
33 'bugfield_input_text',
34 'bugfield_input_checkbox',
35 'bugfield_select_single_option',
36 'bugfield_select_single'
37 );
38
39 $template->cache(array_merge($globaltemplates, (array)$fetchtemplates));
40
41 eval('$header = "' . $template->fetch('header') . '";');
42 eval('$doctype = "' . $template->fetch('doctype') . '";');
43 eval('$headinclude = "' . $template->fetch('headinclude') . '";');
44 eval('$footer = "' . $template->fetch('footer') . '";');
45
46 // ###################################################################
47 // initialize template variables
48 $show = array();
49
50 // ###################################################################
51 // create error reporter
52 require_once('./includes/class_message_reporter.php');
53 $message = new Message_Reporter();
54 $bugsys->message =& $message;
55
56 /*=====================================================================*\
57 || ###################################################################
58 || # $HeadURL$
59 || # $Id$
60 || ###################################################################
61 \*=====================================================================*/
62 ?>