Initial WebGIS portal project

This commit is contained in:
2026-06-10 19:53:39 +07:00
commit c0aa8e09d5
62 changed files with 9013 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
declare(strict_types=1);
header('Content-Type: application/json');
require_once __DIR__ . '/db.php';
$sql = 'SELECT id, nama, no, status_24jam, latitude, longitude, created_at FROM spbu_points ORDER BY id DESC';
$result = $connection->query($sql);
if (!$result) {
http_response_code(500);
echo json_encode([
'success' => false,
'message' => 'Gagal mengambil data: ' . $connection->error,
]);
exit;
}
$points = [];
while ($row = $result->fetch_assoc()) {
$points[] = $row;
}
echo json_encode([
'success' => true,
'data' => $points,
]);