false]); return; } $shapeType = isset($_POST['ShapeType']) ? (int)$_POST['ShapeType'] : 0; $minLat = isset($_POST['MinLat']) ? (float)$_POST['MinLat'] : 0; $maxLat = isset($_POST['MaxLat']) ? (float)$_POST['MaxLat'] : 0; $minLon = isset($_POST['MinLon']) ? (float)$_POST['MinLon'] : 0; $maxLon = isset($_POST['MaxLon']) ? (float)$_POST['MaxLon'] : 0; $centerLat = isset($_POST['CenterLat']) ? (float)$_POST['CenterLat'] : 0; $centerLon = isset($_POST['CenterLon']) ? (float)$_POST['CenterLon'] : 0; $radius = isset($_POST['Radius']) ? (float)$_POST['Radius'] : 0; $now = date('Y-m-d H:i:s'); $q = "UPDATE Geofences SET ShapeType=$shapeType, MinLat=$minLat, MaxLat=$maxLat, MinLon=$minLon, MaxLon=$maxLon, CenterLat=$centerLat, CenterLon=$centerLon, Radius=$radius, UpdateDateTime='$now' WHERE GeofenceID=$geofenceID"; $dummy=[]; $cnt=0; $err=''; $st=''; PACommonDBSelectRecord($q, $dummy, $cnt, $err, $st); echo json_encode(['ok'=>true,'GeofenceID'=>$geofenceID]);