Esempio n. 1
0
$gContent = new BitGmap();
//Preview mode is handled by javascript on the client side.
//There is no callback to the server for previewing changes.
$format = 'xml';
$XMLContent = "";
$statusCode = 401;
if (!empty($_REQUEST["save_tilelayer"])) {
    $gBitUser->verifyTicket();
    if ($result = $gContent->storeTilelayer($_REQUEST)) {
        $statusCode = 200;
        $gBitSmarty->assign_by_ref('tilelayerInfo', $result);
    }
    //Check if this to remove from a set, or to delete completely
} elseif (!empty($_REQUEST["remove_tilelayer"])) {
    $gBitUser->verifyTicket();
    if ($gContent->removeTilelayerFromMaptype($_REQUEST)) {
        $statusCode = 200;
        $gBitSmarty->assign('removeSucces', true);
    } else {
        $XMLContent = tra("Sorry, there was an unknown error trying to remove the tilelayer.");
    }
} elseif (!empty($_REQUEST["expunge_tilelayer"])) {
    $gBitUser->verifyTicket();
    if ($gContent->expungeTilelayer($_REQUEST)) {
        $statusCode = 200;
        $gBitSmarty->assign('expungeSucces', true);
    } else {
        $XMLContent = tra("Sorry, there was an unknown error trying to delete the tilelayer.");
    }
} else {
    if (isset($_REQUEST["tilelayer_id"])) {