Пример #1
0
$scope = JRequest::getCmd('scope');
$cid = JRequest::getVar('cid', array(0), '', 'array');
JArrayHelper::toInteger($cid, array(0));
$task = JRequest::getCmd('task');
switch ($task) {
    case 'add':
        editSection(false);
        break;
    case 'edit':
        editSection(true);
        break;
    case 'go2menu':
    case 'go2menuitem':
    case 'save':
    case 'apply':
        saveSection($option, $scope, $task);
        break;
    case 'remove':
        removeSections($cid, $scope, $option);
        break;
    case 'copyselect':
        copySectionSelect($option, $cid, $scope);
        break;
    case 'copysave':
        copySectionSave($cid, $scope);
        break;
    case 'publish':
        publishSections($scope, $cid, 1, $option);
        break;
    case 'unpublish':
        publishSections($scope, $cid, 0, $option);
Пример #2
0
    } else {
        redirect_header($url_ret, 0, __('Sections updated successfully!', 'docs'));
    }
}
$action = rmc_server_var($_POST, 'action', isset($action) ? $action : '');
switch ($action) {
    case 'new':
        formSection();
        break;
    case 'edit':
        formSection(1);
        break;
    case 'save':
        saveSection();
        break;
    case 'saveedit':
        saveSection(1, 0);
        break;
    case 'saveret':
        saveSection(0, 1);
        break;
    case 'saveretedit':
        saveSection(1, 1);
        break;
    case 'changeorder':
        changeOrderSections();
        break;
    default:
        showSection();
        break;
}
Пример #3
0
require_once $mainframe->getPath('admin_html');
// get parameters from the URL or submitted form
$scope = mosGetParam($_REQUEST, 'scope', '');
$cid = mosGetParam($_REQUEST, 'cid', array(0));
if (!is_array($cid)) {
    $cid = array(0);
}
switch ($task) {
    case "new":
        editSection(0, $scope, $option);
        break;
    case "edit":
        editSection($cid[0], '', $option);
        break;
    case "save":
        saveSection($option, $scope);
        break;
    case "remove":
        removeSections($cid, $scope, $option);
        break;
    case "copyselect":
        copySectionSelect($option, $cid, $section);
        break;
    case "copysave":
        copySectionSave($option, $cid, $section);
        break;
    case "publish":
        publishSections($scope, $cid, 1, $option);
        break;
    case "unpublish":
        publishSections($scope, $cid, 0, $option);