if ($gContent->isValid()) { $gContent->verifyUpdatePermission(); } else { $gContent->verifyCreatePermission(); // $gBitSystem->verifyPermission( 'p_gmap_overlayset_edit' ); /* if we are passed a gmap_id the user is trying to add a set to a map. if they dont have the right, then f**k it. in the future it might be nice to send this back as an alert to display so that the form does not get erased and their work is not lost, but this should prevent the form from even loading. -wjames5 */ if (isset($_REQUEST['gmap_id'])) { require_once GMAP_PKG_PATH . 'BitGmap.php'; $set = new BitGmap($_REQUEST['gmap_id']); $set->load(); 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);