diff --git a/01/ambil_data.php b/01/ambil_data.php new file mode 100644 index 0000000..3f537d5 --- /dev/null +++ b/01/ambil_data.php @@ -0,0 +1,12 @@ +query("SELECT * FROM spbu"); + +$data = []; +while($row = $result->fetch_assoc()){ + $data[] = $row; +} + +echo json_encode($data); +?> diff --git a/01/db_spbu.sql b/01/db_spbu.sql new file mode 100644 index 0000000..6a2faef --- /dev/null +++ b/01/db_spbu.sql @@ -0,0 +1,69 @@ +-- phpMyAdmin SQL Dump +-- version 5.2.1 +-- https://www.phpmyadmin.net/ +-- +-- Host: 127.0.0.1 +-- Waktu pembuatan: 07 Jun 2026 pada 10.53 +-- Versi server: 10.4.32-MariaDB +-- Versi PHP: 8.2.12 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +START TRANSACTION; +SET time_zone = "+00:00"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +-- +-- Database: `db_spbu` +-- + +-- -------------------------------------------------------- + +-- +-- Struktur dari tabel `spbu` +-- + +CREATE TABLE `spbu` ( + `id` int(11) NOT NULL, + `nama_spbu` varchar(255) DEFAULT NULL, + `lat` double DEFAULT NULL, + `lng` double DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +-- +-- Dumping data untuk tabel `spbu` +-- + +INSERT INTO `spbu` (`id`, `nama_spbu`, `lat`, `lng`) VALUES +(1, 'spbu kobar', -0.02197187355969219, 109.31207858442205), +(3, 'spbu paris', 0.007368924759898348, 109.37010012983221), +(4, 'spbu tanray', 0.016651739943910275, 109.29988329640928); + +-- +-- Indexes for dumped tables +-- + +-- +-- Indeks untuk tabel `spbu` +-- +ALTER TABLE `spbu` + ADD PRIMARY KEY (`id`); + +-- +-- AUTO_INCREMENT untuk tabel yang dibuang +-- + +-- +-- AUTO_INCREMENT untuk tabel `spbu` +-- +ALTER TABLE `spbu` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; +COMMIT; + +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/01/hapus.php b/01/hapus.php new file mode 100644 index 0000000..fc40ed4 --- /dev/null +++ b/01/hapus.php @@ -0,0 +1,10 @@ +prepare("DELETE FROM spbu WHERE id=?"); +$stmt->bind_param("i", $id); + +echo $stmt->execute() ? "success" : "error"; +?> diff --git a/01/index.php b/01/index.php new file mode 100644 index 0000000..dec7549 --- /dev/null +++ b/01/index.php @@ -0,0 +1,203 @@ + + +
+Sistem informasi geografis berbasis masyarakat untuk monitoring dan pengentasan kemiskinan yang terintegrasi dengan rumah ibadah.
+Silakan login dengan akun yang telah terdaftar
+Pilih salah satu aplikasi WebGIS untuk membuka peta interaktif.
+Dokumen ringkas ini menjelaskan struktur project, daftar aplikasi, dan konfigurasi environment database untuk deployment Docker atau Coolify.
+ +Struktur root project disiapkan seperti berikut:
+index.html sebagai landing page utama.manual-book.html sebagai dokumentasi singkat.01 sampai 05 sebagai folder aplikasi WebGIS.| Folder | +Nama Aplikasi | +Entry Point | +
|---|---|---|
01 |
+ Webgis SPBU Point | +index.php |
+
02 |
+ Webgis Jalan Parsil | +index.php |
+
03 |
+ Webgis Choropleth | +choropleth.html |
+
04 |
+ Webgis SPBU 24 Ja Upgrade | +index.php |
+
05 |
+ Webgis Kemiskinan | +login.php |
+
Setiap aplikasi PHP memakai environment variable berikut untuk koneksi database:
+DB_HOSTDB_USERDB_PASSWORDDB_NAMEJika database dipisah sebagai resource Coolify, isi DB_HOST dengan hostname service database, bukan localhost.