<?php
/**
 * @version		3.0.0
 * @package		JomLand TicketCenter
 * @copyright	Copyright (C) 2010 JomLand.com. All rights reserved.
 * @link 		www.jomland.com
 * @license		GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */

// No direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

define( 'DS','/' );

require_once(JPATH_COMPONENT.DS.'controller.php' );
require_once(JPATH_COMPONENT_SITE.DS.'helpers'.DS.'setup.php');

$controller = JRequest::getWord('controller');
if ($controller==''){
	$controller ='dashboard';
}

if($controller) {
	$path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';
	if (file_exists($path)) {
		require_once $path;
	} else {
		$controller = '';
	}
}

$classname	= 'JLTicketCenterController'.$controller;
$controller	= new $classname();

$controller->execute(JRequest::getVar('task'));

$controller->redirect();