Example #1
0
/** ensure this file is being included by a parent file */
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');
// ensure user has access to this function
if (!($acl->acl_check('administration', 'edit', 'users', $my->usertype, 'mambots', 'all') | $acl->acl_check('administration', 'install', 'users', $my->usertype, 'mambots', 'all'))) {
    mosRedirect('index2.php', _NOT_AUTH);
}
require_once $mainframe->getPath('admin_html');
$client = mosGetParam($_REQUEST, 'client', '');
$cid = mosGetParam($_POST, 'cid', array(0));
if (!is_array($cid)) {
    $cid = array(0);
}
switch ($task) {
    case 'new':
    case 'edit':
        editMambot($option, $cid[0], $client);
        break;
    case 'save':
        saveMambot($option, $client);
        break;
    case 'remove':
        removeMambot($cid, $option, $client);
        break;
    case 'cancel':
        cancelMambot($option, $client);
        break;
    case 'publish':
    case 'unpublish':
        publishMambot($cid, $task == 'publish', $option, $client);
        break;
    case 'orderup':
Example #2
0
if (!($acl->acl_check('administration', 'edit', 'users', $my->usertype, 'mambots', 'all') | $acl->acl_check('administration', 'install', 'users', $my->usertype, 'mambots', 'all'))) {
    mosRedirect('index2.php', T_('You are not authorized to view this resource.'));
}
require_once $mainframe->getPath('admin_html');
$client = mosGetParam($_REQUEST, 'client', '');
$cid = mosGetParam($_POST, 'cid', array(0));
if (!is_array($cid)) {
    $cid = array(0);
}
switch ($task) {
    case 'new':
    case 'edit':
        editMambot($option, $cid[0], $client);
        break;
    case 'editA':
        editMambot($option, $id, $client);
        break;
    case 'save':
    case 'apply':
        saveMambot($option, $client, $task);
        break;
    case 'remove':
        removeMambot($cid, $option, $client);
        break;
    case 'cancel':
        cancelMambot($option, $client);
        break;
    case 'publish':
    case 'unpublish':
        publishMambot($cid, $task == 'publish', $option, $client);
        break;