Пример #1
0
    $layout = JRequest::getCmd('layout');
    if (!empty($layout)) {
        JRequest::setVar('task', $layout);
    }
}
$taskGroup = JRequest::getCmd('ctrl', JRequest::getCmd('gtask', 'lists'));
global $Itemid;
if (empty($Itemid)) {
    $urlItemid = JRequest::getInt('Itemid');
    if (!empty($urlItemid)) {
        $Itemid = $urlItemid;
    }
}
$doc =& JFactory::getDocument();
$doc->addScript(ACYMAILING_JS . 'acymailing.js');
$config =& acymailing::config();
$cssFrontend = $config->get('css_frontend', 'default');
if (!empty($cssFrontend)) {
    $doc->addStyleSheet(ACYMAILING_CSS . 'component_' . $cssFrontend . '.css');
}
if (!(include ACYMAILING_CONTROLLER_FRONT . $taskGroup . '.php')) {
    return JError::raiseError(404, 'Page not found : ' . $taskGroup);
}
$className = ucfirst($taskGroup) . 'Controller';
$classGroup = new $className();
JRequest::setVar('view', $classGroup->getName());
$classGroup->execute(JRequest::getCmd('task'));
$classGroup->redirect();
if (JRequest::getString('tmpl') !== 'component' and !in_array(JRequest::getCmd('task'), array('unsub', 'saveunsub', 'optout'))) {
    echo acymailing::footer();
}