* @subpackage functions */ /** * required setup */ require_once '../kernel/setup_inc.php'; // Is package installed and enabled $gBitSystem->verifyPackage('gmap'); // Access the gmap class global $gContent; require_once GMAP_PKG_PATH . 'BitGmap.php'; require_once LIBERTY_PKG_PATH . 'lookup_content_inc.php'; $gContent = new BitGmap(); //if a maptype_id is passed try to look it up and see if the user is the owner or has admin perms if (isset($_REQUEST['style_id']) && is_numeric($_REQUEST['style_id'])) { $style = $gContent->getMarkerStyle($_REQUEST['style_id']); if ($style != NULL && ($style['user_id'] == $gBitUser->mUserId || $gBitUser->hasPermission('p_gmap_admin')) != TRUE) { $gBitSystem->fatalError(tra("You can not edit this style!")); } } //check the user has permission to edit maptypes in general $gBitSystem->verifyPermission('p_gmap_overlay_update'); //Preview mode is handled by javascript on the client side. //There is no callback to the server for previewing changes. $format = 'xml'; if (!empty($_REQUEST["save_markerstyle"])) { $gBitUser->verifyTicket(); if ($result = $gContent->storeMarkerStyle($_REQUEST)) { $gBitSmarty->assign_by_ref('markerstyleInfo', $result); } } else {