]>
src.bluestatic.org Git - bugdar.git/blob - global.php
2 /*=====================================================================*\
3 || ###################################################################
4 || # Bugdar [#]version[#]
5 || # Copyright ©2002-[#]year[#] 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 [#]gpl[#] 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');
34 // ###################################################################
35 // global template variables
36 $datetime = $datef->format('l, F j, Y g:i A');
37 $year = $datef->format('Y');
38 $version = $bugsys->options
['trackerversion'];
40 $show['admin'] = (bool)can_perform('canadminpanel');
41 $show['newreport'] = (bool)can_perform('cansubmitbugs');
42 $show['search'] = (bool)can_perform('cansearch');
44 if (!(defined('NO_TEMPLATES') AND constant('NO_TEMPLATES') == true))
46 // ###################################################################
48 $globaltemplates = array(
58 'bugfield_input_text',
59 'bugfield_input_checkbox',
60 'bugfield_select_single_option',
61 'bugfield_select_single',
68 $template->cache(array_merge($globaltemplates, (array)$fetchtemplates));
70 $bugsys->debug('time for tpl cache: ' . $funct->fetch_microtime_diff($start));
72 eval('$header = "' . $template->fetch('header') . '";');
73 eval('$doctype = "' . $template->fetch('doctype') . '";');
74 eval('$headinclude = "' . $template->fetch('headinclude') . '";');
75 eval('$footer = "' . $template->fetch('footer') . '";');
78 // ###################################################################
80 // ###################################################################
81 // initialize template variables
84 // ###################################################################
85 // create error reporter
86 require_once('./includes/class_message_reporter.php');
87 $message = new MessageReporter();
88 $bugsys->message
=& $message;
90 /*=====================================================================*\
91 || ###################################################################
94 || ###################################################################
95 \*=====================================================================*/