<?php defined('_JEXEC') or die();
/**
 * @version		1.1.1
 * @package		Read More, Basic
 * @copyright	2009 Rockford Solutions, Inc. All rights reserved.
 * @license		GNU/GPL
 */

// Require base controller
require_once(JPATH_COMPONENT . DS . 'controller.php');

// Require extended controller, if requested
if ($controller = strtolower(JRequest::getWord('controller'))) {
    $file = JPATH_COMPONENT . DS . 'controllers' . DS . $controller . '.php';
    
	if (file_exists($file)) {
        require_once $file;
    } else {
        $controller = '';
    }
}

// Select controller class
$classname = 'ReadmoreController' . ucfirst($controller);

// Initialize controller
$controller = new $classname();

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

// Redirect, if set by controller
$controller->redirect();
