<?php
/*=====================================================================*\
|| ###################################################################
|| # Kalens [#]version[#]
|| # Copyright ©2002-[#]year[#] Iris Studios, Inc.
|| #
|| # 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 [#]gpl[#] 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');

// ###################################################################
// load the template system

$kalens->load('template_fs', 'template', true);
$template->setExtension('tpl');
$template->setTemplateDir('templates');

$globaltemplates = array(
	'doctype',
	'header',
	'std_message'
);

$template->cache(array_merge($globaltemplates, (array)$cachetemplates));

// ###################################################################
// error handling and reporting

require_once('./includes/class_api_error.php');

require_once('./includes/class_message_reporter.php');
$kalens->message = $message = new MessageReporter();

// ###################################################################
// parse global templates

eval('$doctype = "' . $template->fetch('doctype') . '";');
eval('$header = "' . $template->fetch('header') . '";');

/*=====================================================================*\
|| ###################################################################
|| # $HeadURL$
|| # $Id$
|| ###################################################################
\*=====================================================================*/
?>