<?php
/**
* TS2WebAdmin - Lightweight TeamSpeak 2 Control Panel
*
* $Id: mod_error.php 2009-09-03 20:23:12 sven $
*
* 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, either version 3 of the License, or
* (at your option) any later version.
*
* 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, see <http://www.gnu.org/licenses/>.
*
* @package TS2WebAdmin
* @version 2.0.0-alpha2
* @author Sven 'ScP' Paulsen
* @copyright Copyright (c) 2009 by Planet TeamSpeak. All rights reserved.
*/
/* check if file is included correctly */
defined('TS2WA_VALID') || die('Access denied...');
/**
* @package TS2WebAdmin_Module_Error
* @category TS2WebAdmin_Module
*/
class TS2WebAdmin_Module_Error extends TS2WebAdmin_Module
{
function errorAction($details = null)
{
$this->assign('code', $this->_app->getLastErrorCode());
$this->assign('mesg', $this->_app->getLastErrorMesg());
$this->assign('details', $details);
if(!file_exists(TS2WA_TPL . DS . 'error.html'))
{
$this->_app->raiseError('Template file "/' . basename(TS2WA_TPL) . '/error.html" does not exist');
}
$this->assignDefaultVars();
$this->_tpl->display('error.html');
}
}