require_once JPATH_COMPONENT . DS . 'helper' . DS . 'helper.php'; require_once JPATH_COMPONENT . DS . 'helper' . DS . 'settings.php'; // Require specific controller if requested if ($controller = JRequest::getWord('controller')) { $path = JPATH_COMPONENT . DS . 'controllers' . DS . $controller . '.php'; if (file_exists($path)) { require_once $path; } else { $controller = ''; } } // Create the controller $classname = 'FstController' . $controller; $controller = new $classname(); $css = FSTRoute::x("index.php?option=com_fst&view=css&layout=default"); $document = JFactory::getDocument(); $document->addStyleSheet($css); FST_Helper::IncludeJQuery(); // Perform the Request task $task = JRequest::getVar('task'); if ($task == "captcha_image") { ob_clean(); require_once JPATH_SITE . DS . 'components' . DS . 'com_fst' . DS . 'helper' . DS . 'captcha.php'; $cap = new FST_Captcha(); $cap->GetImage(); exit; } else { $controller->execute($task); // Redirect if set by the controller $controller->redirect(); }