feat(landing-page):penambahan landing page utama pdemisah antar fitur

This commit is contained in:
2026-06-11 09:58:07 +07:00
parent 6b7fa7e467
commit d78ee0a79e
35 changed files with 5007 additions and 4753 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
header('Content-Type: application/json');
include __DIR__ . '/../../db_config.php';
$sql = "SELECT id, nama_objek, kategori, status_objek, type, geometry_data, nilai_ukur, created_at
FROM spatial_features
WHERE kategori IN ('Jalan', 'Jalan Raya')
ORDER BY created_at DESC";
$result = $conn->query($sql);
$features = [];
if (!$result) {
http_response_code(500);
echo json_encode(['status' => 'error', 'message' => 'Query gagal: ' . $conn->error]);
$conn->close();
exit;
}
if ($result && $result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
$row['geometry_data'] = json_decode($row['geometry_data']);
$row['nilai_ukur'] = (float)$row['nilai_ukur'];
$features[] = $row;
}
}
echo json_encode($features);
$conn->close();
?>