Esempio n. 1
0
    $mainframe->redirect('index.php', JText::_('ALERTNOTAUTH'));
}
// Set the table directory
JTable::addIncludePath(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_newsfeeds' . DS . 'tables');
require_once JApplicationHelper::getPath('admin_html');
$task = JRequest::getCmd('task');
switch ($task) {
    case 'add':
        editNewsFeed(false);
        break;
    case 'edit':
        editNewsFeed(true);
        break;
    case 'save':
    case 'apply':
        saveNewsFeed();
        break;
    case 'publish':
        publishNewsFeeds();
        break;
    case 'unpublish':
        unPublishNewsFeeds();
        break;
    case 'remove':
        removeNewsFeeds();
        break;
    case 'cancel':
        cancelNewsFeed();
        break;
    case 'orderup':
        moveUpNewsFeed();
Esempio n. 2
0
}
require_once $mainframe->getPath('admin_html');
require_once $mainframe->getPath('class');
$cid = josGetArrayInts('cid');
switch ($task) {
    case 'new':
        editNewsFeed(0, $option);
        break;
    case 'edit':
        editNewsFeed(intval($cid[0]), $option);
        break;
    case 'editA':
        editNewsFeed($id, $option);
        break;
    case 'save':
        saveNewsFeed($option);
        break;
    case 'publish':
        publishNewsFeeds($cid, 1, $option);
        break;
    case 'unpublish':
        publishNewsFeeds($cid, 0, $option);
        break;
    case 'remove':
        removeNewsFeeds($cid, $option);
        break;
    case 'cancel':
        cancelNewsFeed($option);
        break;
    case 'orderup':
        orderNewsFeed(intval($cid[0]), -1, $option);