Ejemplo n.º 1
0
            die;
        }
    }
}
//Preview mode is handled by javascript on the client side.
//There is no callback to the server for previewing changes.
//most of the time we want xml back so we make it the default
$format = 'xml';
$XMLContent = "";
$statusCode = 401;
if (!empty($_REQUEST["save_polyline"])) {
    $gBitUser->verifyTicket();
    $storeHash = $_REQUEST;
    // the user might be submitting encoded html chars by ajax - decode them before storing
    if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
        @BitGmap::decodeAjaxRequest($storeHash);
    }
    if ($gContent->store($storeHash)) {
        $statusCode = 200;
        if ($gContent->hasAdminPermission()) {
            $gContent->setUpdateSharing($_REQUEST);
        }
        $gBitSmarty->assign_by_ref('polylineInfo', $gContent->mInfo);
    }
} elseif (!empty($_REQUEST['move_pos']) && !empty($_REQUEST['set_id'])) {
    $gBitUser->verifyTicket();
    // this is a little ugly
    $gContent->mInfo['set_id'] = $_REQUEST['set_id'];
    if ($_REQUEST['move_pos'] == 'up' ? $gContent->moveUp() : $gContent->moveDown()) {
        $statusCode = 200;
        $XMLContent = tra("Success");
Ejemplo n.º 2
0
        if ($set->isValid() && !$set->hasUserPermission('p_gmap_attach_children')) {
            $gBitSystem->fatalError(tra("You can not add polygonsets to this map!"));
            die;
        }
    }
}
//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_polygonset"])) {
    $gBitUser->verifyTicket();
    // the user might be submitting encoded html chars by ajax - decode them before storing
    if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {
        @BitGmap::decodeAjaxRequest($_REQUEST);
    }
    if ($gContent->store($_REQUEST)) {
        $statusCode = 200;
        if ($gContent->hasAdminPermission()) {
            $gContent->setUpdateSharing($_REQUEST);
            $gContent->setAllowChildren($_REQUEST);
        }
        $gBitSmarty->assign_by_ref('polygonsetInfo', $gContent->mInfo);
    }
} elseif (!empty($_REQUEST['move_pos']) && !empty($_REQUEST['gmap_id'])) {
    $gBitUser->verifyTicket();
    if ($_REQUEST['move_pos'] == 'up' ? $gContent->moveUp() : $gContent->moveDown()) {
        $statusCode = 200;
        $XMLContent = tra("Success");
    } else {