Initial commit: Setup Landing Page dan file pertemuan

This commit is contained in:
Romeo3
2026-06-09 13:50:00 +07:00
commit c94bc418ef
35 changed files with 8807 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
include 'koneksi.php';
$jenis = isset($_GET['jenis']) ? $_GET['jenis'] : 'spbu';
if ($jenis == 'spbu') {
$sql = "SELECT * FROM spbu_locations";
} else {
die(json_encode(["error" => "Jenis data tidak ditemukan"]));
}
$result = $conn->query($sql);
$data = array();
if ($result && $result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
if (isset($row['latitude'])) {
$row['latitude'] = floatval($row['latitude']);
}
if (isset($row['longitude'])) {
$row['longitude'] = floatval($row['longitude']);
}
$data[] = $row;
}
}
header('Content-Type: application/json');
echo json_encode($data);
$conn->close();
?>