Esempio n. 1
0
 protected function _glossary(&$text, &$params)
 {
     $text = fsf_Glossary::ReplaceGlossary($text);
     $text .= fsf_Glossary::Footer();
     $css = JURI::root(true) . "/index.php?option=com_fsf&view=css&layout=default";
     $document = JFactory::getDocument();
     $document->addStyleSheet($css);
     FSF_Helper::IncludeJQuery();
     return true;
 }
Esempio n. 2
0
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 = 'FsfController' . $controller;
$controller = new $classname();
$css = JURI::root(true) . "/index.php?option=com_fsf&view=css&layout=default";
$document = JFactory::getDocument();
$document->addStyleSheet($css);
FSF_Helper::IncludeJQuery();
// Perform the Request task
$task = JRequest::getVar('task');
if ($task == "captcha_image") {
    ob_clean();
    require_once JPATH_SITE . DS . 'components' . DS . 'com_fsf' . DS . 'helper' . DS . 'captcha.php';
    $cap = new FSF_Captcha();
    $cap->GetImage();
    exit;
} else {
    $controller->execute($task);
    // Redirect if set by the controller
    $controller->redirect();
}
Esempio n. 3
0
        return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
    }
}
// if bad version display warning message
if ($ver_files != $ver_inst) {
    $task = JRequest::getVar('task');
    $view = JRequest::getVar('view');
    if ($task != "update" || $view != "backup") {
        JError::raiseWarning(100, JText::sprintf('INCORRECT_VERSION', FSFRoute::x('index.php?option=com_fsf&view=backup&task=update')));
    }
    if ($view != "" && $view != "backup") {
        JRequest::setVar('view', '');
    }
}
// if bad version and controller is not fsfs dont display
// Create the controller
$controllername = $controller;
$classname = 'FsfsController' . $controller;
$controller = new $classname();
$css = JRoute::_(JURI::root() . "index.php?option=com_fsf&view=css");
$document = JFactory::getDocument();
$document->addStyleSheet($css);
$document->addStyleSheet(JURI::root() . 'administrator/components/com_fsf/assets/css/main.css');
$document->addStyleSheet(JURI::root() . 'components/com_fsf/assets/css/popup.css');
$document->addScript(JURI::root() . 'components/com_fsf/assets/js/popup.js');
$document->addScript(JURI::root() . 'administrator/components/com_fsf/assets/js/translate.js');
FSF_Helper::IncludeJQuery(true);
// Perform the Request task
$controller->execute(JRequest::getVar('task'));
// Redirect if set by the controller
$controller->redirect();