Example #1
0
// ensure user has access to this function
if (!($acl->acl_check('administration', 'edit', 'users', $my->usertype, 'components', 'all') | $acl->acl_check('administration', 'edit', 'users', $my->usertype, 'components', 'com_weblinks'))) {
    mosRedirect('index2.php', _NOT_AUTH);
}
require_once $mainframe->getPath('admin_html');
require_once $mainframe->getPath('class');
$cid = josGetArrayInts('cid');
switch ($task) {
    case 'new':
        editWeblink($option, 0);
        break;
    case 'edit':
        editWeblink($option, $cid[0]);
        break;
    case 'editA':
        editWeblink($option, $id);
        break;
    case 'save':
        saveWeblink($option);
        break;
    case 'remove':
        removeWeblinks($cid, $option);
        break;
    case 'publish':
        publishWeblinks($cid, 1, $option);
        break;
    case 'unpublish':
        publishWeblinks($cid, 0, $option);
        break;
    case 'approve':
        break;
Example #2
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, 'components', 'all') | $acl->acl_check('administration', 'edit', 'users', $my->usertype, 'components', 'com_weblinks'))) {
    mosRedirect('index2.php', _NOT_AUTH);
}
require_once $mainframe->getPath('admin_html');
require_once $mainframe->getPath('class');
$cid = mosGetParam($_POST, 'cid', array(0));
switch ($task) {
    case 'new':
        editWeblink($option, 0);
        break;
    case 'edit':
        editWeblink($option, $cid[0]);
        break;
    case 'save':
        saveWeblink($option);
        break;
    case 'remove':
        removeWeblinks($cid, $option);
        break;
    case 'publish':
        publishWeblinks($cid, 1, $option);
        break;
    case 'unpublish':
        publishWeblinks($cid, 0, $option);
        break;
    case 'approve':
        break;