chore: prepare docker webgis deployment

This commit is contained in:
Andrie
2026-06-11 18:14:21 +07:00
parent d2214ad9c8
commit a90748d9c1
149 changed files with 20844 additions and 5 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
require_once '../../koneksi.php';
header('Content-Type: application/json');
$result = $conn->query(
"SELECT id, nama, deskripsi, attribute_key, palette, is_visible, created_at
FROM choropleth_layers ORDER BY created_at ASC"
);
if ($result === false) {
echo json_encode(['status' => 'error', 'message' => 'Tabel belum ada. Jalankan setup_database.sql terlebih dahulu. (' . $conn->error . ')']);
$conn->close(); exit;
}
$rows = [];
while ($r = $result->fetch_assoc()) {
$rows[] = [
'id' => (int)$r['id'],
'nama' => $r['nama'],
'deskripsi' => $r['deskripsi'],
'attribute_key' => $r['attribute_key'],
'palette' => $r['palette'],
'is_visible' => (bool)$r['is_visible'],
'created_at' => $r['created_at'],
];
}
$conn->close();
echo json_encode(['status' => 'success', 'data' => $rows, 'total' => count($rows)]);