Пример #1
0
    case 'edit':
        showEdit();
        break;
    case 'edit2':
        updateBanner();
        showMainMenu();
        break;
    case 'new':
        showNewBanner();
        break;
    case 'new2':
        addBanner();
        showMainMenu();
        break;
    case 'delete':
        deleteBanner();
        showMainMenu();
        break;
    case 'donate':
        updateDonate();
        showMainMenu();
        break;
    default:
        showMainMenu();
}
/**
* Show the main options menu
*/
function showMainMenu()
{
    global $options_url;
Пример #2
0
    case "edit":
        edit($_GET['bid']);
        break;
    case "finishEdit":
        finishEdit($_POST['bid'], $_POST['edit_banner_area_title']);
        break;
    case "delete":
        deleteBannerArea($_GET['bid']);
        break;
    case "addBanner":
        addBanner($_POST['bannerImg'], $_POST['bannerLink'], $_POST['area_id']);
        break;
    case "editBanner":
        editBanner($_GET['id']);
        break;
    case "finishEditBanner":
        finishEditBanner($_POST['id'], $_POST['bannerImg'], $_POST['bannerLink'], $_POST['area_id']);
        break;
    case "deleteBanner":
        deleteBanner($_GET['id']);
        break;
    case "bannerAreaWeight":
        bannerAreaWeight($_GET['op'], $_GET['id']);
        break;
    case "bannerWeight":
        bannerWeight($_GET['op'], $_GET['id']);
        break;
    default:
        main();
        break;
}
Пример #3
0
$mode = '';
if (isset($_REQUEST['mode'])) {
    $mode = $_REQUEST['mode'];
}
if ($mode == $LANG_ADMIN['delete'] && !empty($LANG_ADMIN['delete'])) {
    $bid = COM_applyFilter($_POST['bid']);
    if (!isset($bid) || empty($bid)) {
        // || ($bid == 0)
        COM_errorLog('Attempted to delete banner bid=' . $bid);
        $display .= COM_refresh($_CONF['site_admin_url'] . '/plugins/banner/index.php');
    } elseif (SEC_checkToken()) {
        $type = '';
        if (isset($_POST['type'])) {
            $type = COM_applyFilter($_POST['type']);
        }
        $display .= deleteBanner($bid, $type);
    } else {
        COM_accessLog("User {$_USER['username']} tried to illegally delete banner {$bid} and failed CSRF checks.");
        echo COM_refresh($_CONF['site_admin_url'] . '/index.php');
    }
} elseif ($mode == $LANG_ADMIN['save'] && !empty($LANG_ADMIN['save']) && SEC_checkToken()) {
    $cid = '';
    if (isset($_POST['cid'])) {
        $cid = $_POST['cid'];
    }
    $display .= savebanner(COM_applyFilter($_POST['bid']), COM_applyFilter($_POST['old_bid']), $cid, $_POST['categorydd'], $_POST['url'], $_POST['description'], $_POST['title'], COM_applyFilter($_POST['publishstart']), COM_applyFilter($_POST['publishend']), COM_applyFilter($_POST['hits'], true), COM_applyFilter($_POST['owner_id'], true), COM_applyFilter($_POST['group_id'], true), $_POST['perm_owner'], $_POST['perm_group'], $_POST['perm_members'], $_POST['perm_anon']);
} else {
    if ($mode == 'editsubmission') {
        $display .= COM_siteHeader('menu', $LANG_BANNER_ADMIN[1]);
        $display .= editbanner($mode, COM_applyFilter($_GET['id']));
        $display .= COM_siteFooter();