<?php
/**
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;

// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_spstgsrv')) {
        JFactory::getApplication()->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'warning');
        return FALSE;
}

//import KAINOTOMO PH LTD libraries and language
JFactory::getLanguage()->load('lib_spcyend', JPATH_SITE);
jimport('spcyend.utilities.factory');
jimport('spcyend.utilities.download');
jimport('spcyend.database.source');

//import SP Transfer language
JFactory::getLanguage()->load('com_sptransfer', JPATH_ADMINISTRATOR);
JFactory::getLanguage()->load('com_spstgsrv', JPATH_SITE);
JFactory::getLanguage()->load('com_installer', JPATH_ADMINISTRATOR);

// Include dependancies
jimport('joomla.application.component.controller');

$controller	= JControllerLegacy::getInstance('SPStgSrv');
$controller->execute(JFactory::getApplication()->input->get('task'));
$controller->redirect();
