2 /*=====================================================================*\
3 || ###################################################################
5 || # Copyright (c)2002-2007 Blue Static
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version 2 of the License.
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
22 require_once('./includes/init.php');
24 define('HTML_CHECKED', ' checked="checked"');
26 // ###################################################################
27 // initialize template system
28 $bugsys->load('template_fs', 'template', true
);
29 $template->setExtension('tpl');
30 $template->setPreParseHook('isso_pre_parse_hook');
31 $template->setTemplateDir('templates/');
32 $template->setDatabaseCache(TABLE_PREFIX
. 'template');
33 $template->langcall
= 'T';
35 // ###################################################################
36 // global template variables
37 $datetime = $datef->format('l, F j, Y g:i A');
38 $year = $datef->format('Y');
39 $version = $bugsys->options
['trackerversion'];
41 $show['admin'] = (bool
)can_perform('canadminpanel');
42 $show['newreport'] = (bool
)can_perform('cansubmitbugs');
43 $show['search'] = (bool
)can_perform('cansearch');
45 if (!(defined('NO_TEMPLATES') AND constant('NO_TEMPLATES') == true
))
47 // ###################################################################
49 $globaltemplates = array(
59 'bugfield_input_text',
60 'bugfield_input_checkbox',
61 'bugfield_select_single_option',
62 'bugfield_select_single',
69 $template->cache(array_merge($globaltemplates, (array)$fetchtemplates));
71 $bugsys->debug('time for tpl cache: ' . $funct->fetch_microtime_diff($start));
73 eval('$header = "' . $template->fetch('header') . '";');
74 eval('$doctype = "' . $template->fetch('doctype') . '";');
75 eval('$headinclude = "' . $template->fetch('headinclude') . '";');
76 eval('$footer = "' . $template->fetch('footer') . '";');
79 // ###################################################################
81 // ###################################################################
82 // initialize template variables
85 // ###################################################################
86 // create error reporter
87 require_once('./includes/class_message_reporter.php');
88 $message = new MessageReporter();
89 $bugsys->message
=& $message;