<?php
/*=====================================================================*\
|| ###################################################################
|| # Bugdar
|| # Copyright (c)2004-2009 Blue Static
|| #
|| # This program is free software; you can redistribute it and/or modify
|| # it under the terms of the GNU General Public License as published by
|| # the Free Software Foundation; version 2 of the License.
|| #
|| # This program is distributed in the hope that it will be useful, but
|| # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|| # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|| # more details.
|| #
|| # You should have received a copy of the GNU General Public License along
|| # with this program; if not, write to the Free Software Foundation, Inc.,
|| # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|| ###################################################################
\*=====================================================================*/
require_once('./includes/init.php');
define('HTML_CHECKED', ' checked="checked"');
// ###################################################################
// initialize template system
require_once ISSO . '/Template.php';
BSTemplate::$preParseHook = 'isso_pre_parse_hook';
BSTemplate::$dbCacheTable = TABLE_PREFIX . 'template';
BSTemplate::$langcall = 'T';
BSTemplate::$templatePath = 'templates/%s.tpl';
// ###################################################################
// initialize the email system
require_once ISSO . '/Mail.php';
require_once 'includes/emails.php';
define('MAIL_FROM_ADDRESS', bugdar::$options['webmasteremail']);
define('MAIL_FROM_NAME', bugdar::$options['trackertitle']);
// ###################################################################
// global template variables
$show = array(
'admin' => can_perform('canadminpanel'),
'newreport' => can_perform('cansubmitbugs'),
'search' => can_perform('cansearch')
);
if (!(defined('NO_TEMPLATES') AND constant('NO_TEMPLATES') == true))
{
// ###################################################################
// cache templates
$globaltemplates = array(
'doctype',
'header',
'headinclude',
'footer',
'selectoption',
'selectoptgroup',
'std_error',
'std_redirect',
'std_message',
'bugfield_input_text',
'bugfield_input_checkbox',
'bugfield_select_single_option',
'bugfield_select_single',
'username_display',
'help_link'
);
$start = microtime();
BSTemplate::cache(array_merge($globaltemplates, (array)$fetchtemplates));
BSApp::debug('time for tpl cache: ' . BSFunctions::fetch_microtime_diff($start));
BSTemplate::$globalVars = array(
'stylevar' => &$stylevar,
'show' => &$show,
'focus' => $focus
);
$globalTemplates = array(
'header' => BSTemplate::fetch('header')->evaluate()->getTemplate(),
'doctype' => BSTemplate::fetch('doctype')->evaluate()->getTemplate(),
'headinclude' => BSTemplate::fetch('headinclude')->evaluate()->getTemplate(),
'footer' => BSTemplate::fetch('footer')
);
BSTemplate::$globalVars = array_merge($globalTemplates, BSTemplate::$globalVars);
}
// ###################################################################
// create error reporter
require_once('./includes/class_message_reporter.php');
$message = new MessageReporter();
?>