]>
src.bluestatic.org Git - bugdar.git/blob - global.php
2 /*=====================================================================*\
3 || ###################################################################
5 || # Copyright ©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 require_once ISSO
. '/Template.php';
29 BSTemplate
::$preParseHook = 'isso_pre_parse_hook';
30 BSTemplate
::$dbCacheTable = TABLE_PREFIX
. 'template';
31 BSTemplate
::$langcall = 'T';
32 BSTemplate
::$templatePath = 'templates/%s.tpl';
34 // ###################################################################
35 // global template variables
38 'admin' => can_perform('canadminpanel'),
39 'newreport' => can_perform('cansubmitbugs'),
40 'search' => can_perform('cansearch')
43 if (!(defined('NO_TEMPLATES') AND constant('NO_TEMPLATES') == true))
45 // ###################################################################
47 $globaltemplates = array(
57 'bugfield_input_text',
58 'bugfield_input_checkbox',
59 'bugfield_select_single_option',
60 'bugfield_select_single',
67 BSTemplate
::cache(array_merge($globaltemplates, (array)$fetchtemplates));
69 BSApp
::debug('time for tpl cache: ' . BSFunctions
::fetch_microtime_diff($start));
71 BSTemplate
::$globalVars = array(
72 'stylevar' => &$stylevar,
77 $globalTemplates = array(
78 'header' => BSTemplate
::fetch('header')->evaluate()->getTemplate(),
79 'doctype' => BSTemplate
::fetch('doctype')->evaluate()->getTemplate(),
80 'headinclude' => BSTemplate
::fetch('headinclude')->evaluate()->getTemplate(),
81 'footer' => BSTemplate
::fetch('footer')->evaluate()->getTemplate(),
84 BSTemplate
::$globalVars = array_merge($globalTemplates, BSTemplate
::$globalVars);
87 // ###################################################################
88 // create error reporter
89 require_once('./includes/class_message_reporter.php');
90 $message = new MessageReporter();
91 $bugsys->message
= $message;
93 /*=====================================================================*\
94 || ###################################################################
97 || ###################################################################
98 \*=====================================================================*/