Upload seluruh tugas SIG Point Line dan Polygon

This commit is contained in:
2026-06-11 17:04:19 +07:00
commit ba7c5c2d4d
71 changed files with 11212 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
require_once 'config.php';
if ($_SERVER['REQUEST_METHOD'] === 'DELETE') {
try {
$data = json_decode(file_get_contents('php://input'), true);
if (!isset($data['id'])) {
http_response_code(400);
echo json_encode(['error' => 'Missing marker id']);
exit;
}
$db = getDB();
$stmt = $db->prepare('DELETE FROM markers WHERE id = ?');
$stmt->execute([$data['id']]);
echo json_encode(['success' => true]);
} catch (Exception $e) {
http_response_code(500);
echo json_encode(['error' => $e->getMessage()]);
}
} else {
http_response_code(405);
echo json_encode(['error' => 'Method not allowed']);
}
?>