userinfo['userid'])
{
$templatesetid = $bugsys->userinfo['templatesetid'];
$templateset = $bugsys->datastore['templateset']["$templatesetid"];
}
if (!$templatesetid)
{
foreach ($bugsys->datastore['templateset'] AS $templateset)
{
if ($templateset['default'])
{
$templatesetid = $templateset['templatesetid'];
$templateset = $bugsys->datastore['templateset']["$templatesetid"];
}
}
}
// ###################################################################
// load the template system
if (file_exists("./templates/$templateset[shortname]/tsinfo.php"))
{
$bugsys->load('template_fs');
$template->extension = 'tpl';
$template->templatedir = $bugsys->fetch_sourcepath("templates/$templateset[shortname]/");
}
else
{
echo "template set info (templates/$templateset[shortname]/tsinfo.php) could not be loaded!";
exit;
}
// ###################################################################
// check for userinfo -- temp
// #*# remove
if ($bugsys->userinfo['userid'])
{
echo '
You are logged in as ' . construct_user_display($bugsys->userinfo) . ' | [
Home] | [
New Bug]' . ((can_perform('canadminpanel')) ? ' | [
Admin]' : '') . '
' . "\n\n\n\n";
}
// ###################################################################
// cache templates
$globaltemplates = array(
'doctype',
'header',
'headinclude',
'footer',
'selectoption',
'selectoptgroup',
'std_error',
'std_redirect',
'std_message'
);
$template->cache(array_merge($globaltemplates, (array)$fetchtemplates));
// ###################################################################
// initialize template variables
$show = array();
// ###################################################################
// create error reporter
require_once('./includes/class_message_reporter.php');
$message = new Message_Reporter();
$bugsys->message =& $message;
/*=====================================================================*\
|| ###################################################################
|| # $HeadURL$
|| # $Id$
|| ###################################################################
\*=====================================================================*/
?>