<?php
/**
* @version 1.0.0
* @package RSFiles! 1.0.0
* @copyright (C) 2009 www.rsjoomla.com
* @license GPL, http://www.gnu.org/copyleft/gpl.html
*/

defined( '_JEXEC' ) or die( 'Restricted access' );

define('RSFL_PRODUCT','RSFiles!');
define('RSFL_VERSION','1.0.0');
define('RSFL_REVISION','5');
define('RSFL_RS_KEY','RK238DSJ41');
define('RSFL_COPYRIGHT','&copy;2007-2010 www.rsjoomla.com');
define('RSFL_LICENSE','GPL License');
define('RSFL_AUTHOR','<a href="http://www.rsjoomla.com" target="_blank">www.rsjoomla.com</a>');

$document =& JFactory::getDocument();
$document->addStyleSheet(JURI::root(true).'/administrator/components/com_rsfiles/assets/css/style.css');	
$document->addScript(JURI::root(true).'/administrator/components/com_rsfiles/assets/js/scripts.js');	

require_once( JPATH_COMPONENT.DS.'controller.php' );
require_once( JPATH_COMPONENT.DS.'helpers'.DS.'rsfiles.php' );
rsfilesHelper::readConfig();


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


$classname	= 'RSFilesController'.$controller;
$controller	= new $classname( );
$controller->registerDefaultTask('rsfiles');
$controller->execute(JRequest::getVar('task'));
$controller->redirect();