]>
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 // initialize the email system
36 require_once ISSO
. '/Mail.php';
37 require_once 'includes/emails.php';
39 define('MAIL_FROM_ADDRESS', bugdar
::$options['webmasteremail']);
40 define('MAIL_FROM_NAME', bugdar
::$options['trackertitle']);
42 // ###################################################################
43 // global template variables
46 'admin' => can_perform('canadminpanel'),
47 'newreport' => can_perform('cansubmitbugs'),
48 'search' => can_perform('cansearch')
51 if (!(defined('NO_TEMPLATES') AND constant('NO_TEMPLATES') == true))
53 // ###################################################################
55 $globaltemplates = array(
65 'bugfield_input_text',
66 'bugfield_input_checkbox',
67 'bugfield_select_single_option',
68 'bugfield_select_single',
75 BSTemplate
::cache(array_merge($globaltemplates, (array)$fetchtemplates));
77 BSApp
::debug('time for tpl cache: ' . BSFunctions
::fetch_microtime_diff($start));
79 BSTemplate
::$globalVars = array(
80 'stylevar' => &$stylevar,
85 $globalTemplates = array(
86 'header' => BSTemplate
::fetch('header')->evaluate()->getTemplate(),
87 'doctype' => BSTemplate
::fetch('doctype')->evaluate()->getTemplate(),
88 'headinclude' => BSTemplate
::fetch('headinclude')->evaluate()->getTemplate(),
89 'footer' => BSTemplate
::fetch('footer')->evaluate()->getTemplate(),
92 BSTemplate
::$globalVars = array_merge($globalTemplates, BSTemplate
::$globalVars);
95 // ###################################################################
96 // create error reporter
97 require_once('./includes/class_message_reporter.php');
98 $message = new MessageReporter();
99 $bugsys->message
= $message;
101 /*=====================================================================*\
102 || ###################################################################
105 || ###################################################################
106 \*=====================================================================*/