From a6acb10ffe4f934d359857374eb6678cc41ea638 Mon Sep 17 00:00:00 2001 From: d1041231017-star Date: Wed, 10 Jun 2026 20:12:23 +0700 Subject: [PATCH] initiall commit --- 01/dashboard.php | 778 ++++++++++++++++++++++ 01/edit.php | 139 ++++ 01/edit_jalan.php | 41 ++ 01/edit_parsil.php | 42 ++ 01/hapus.php | 33 + 01/hapus_jalan.php | 9 + 01/hapus_parsil.php | 20 + 01/index.php | 1176 ++++++++++++++++++++++++++++++++ 01/koneksi.php | 12 + 01/login.php | 527 +++++++++++++++ 01/logout.php | 6 + 01/proses_edit.php | 18 + 01/simpan_jalan.php | 19 + 01/simpan_parsil.php | 20 + 01/simpan_spbu.php | 23 + 01/update_radius.php | 16 + 01/update_radius_warga.php | 16 + 02/edit_miskin.php | 60 ++ 02/edit_pengaduan.php | 39 ++ 02/edit_rumah_ibadah.php | 43 ++ 02/hapus_miskin.php | 6 + 02/hapus_pengaduan.php | 18 + 02/hapus_rumah_ibadah.php | 6 + 02/histori_bantuan.php | 153 +++++ 02/index.php | 1218 ++++++++++++++++++++++++++++++++++ 02/kelola_laporan.php | 210 ++++++ 02/koneksi.php | 12 + 02/login.php | 527 +++++++++++++++ 02/logout.php | 6 + 02/proses_edit_masjid.php | 35 + 02/proses_edit_miskin.php | 40 ++ 02/proses_edit_pengaduan.php | 25 + 02/simpan_laporan_cepat.php | 18 + 02/simpan_miskin.php | 23 + 02/simpan_pengaduan.php | 20 + 02/simpan_rumah_ibadah.php | 19 + 02/update_radius.php | 16 + 02/update_radius_warga.php | 16 + 38 files changed, 5405 insertions(+) create mode 100644 01/dashboard.php create mode 100644 01/edit.php create mode 100644 01/edit_jalan.php create mode 100644 01/edit_parsil.php create mode 100644 01/hapus.php create mode 100644 01/hapus_jalan.php create mode 100644 01/hapus_parsil.php create mode 100644 01/index.php create mode 100644 01/koneksi.php create mode 100644 01/login.php create mode 100644 01/logout.php create mode 100644 01/proses_edit.php create mode 100644 01/simpan_jalan.php create mode 100644 01/simpan_parsil.php create mode 100644 01/simpan_spbu.php create mode 100644 01/update_radius.php create mode 100644 01/update_radius_warga.php create mode 100644 02/edit_miskin.php create mode 100644 02/edit_pengaduan.php create mode 100644 02/edit_rumah_ibadah.php create mode 100644 02/hapus_miskin.php create mode 100644 02/hapus_pengaduan.php create mode 100644 02/hapus_rumah_ibadah.php create mode 100644 02/histori_bantuan.php create mode 100644 02/index.php create mode 100644 02/kelola_laporan.php create mode 100644 02/koneksi.php create mode 100644 02/login.php create mode 100644 02/logout.php create mode 100644 02/proses_edit_masjid.php create mode 100644 02/proses_edit_miskin.php create mode 100644 02/proses_edit_pengaduan.php create mode 100644 02/simpan_laporan_cepat.php create mode 100644 02/simpan_miskin.php create mode 100644 02/simpan_pengaduan.php create mode 100644 02/simpan_rumah_ibadah.php create mode 100644 02/update_radius.php create mode 100644 02/update_radius_warga.php diff --git a/01/dashboard.php b/01/dashboard.php new file mode 100644 index 0000000..b485dd5 --- /dev/null +++ b/01/dashboard.php @@ -0,0 +1,778 @@ + + + + + +WebGIS Pontianak — Portal Sistem Informasi Geografis + + + + + + + + + + + +
+
+
+
GIS Kota Pontianak
+

Pilih Modul Peta
yang Ingin Diakses

+

Sistem WebGIS terpadu Kota Pontianak terbagi menjadi dua modul: infrastruktur fisik dan data sosial warga. Pilih modul di bawah untuk masuk.

+
+ + + Jalan & Parsil + + + + SPBU + + + + Data Warga + + + + Pengaduan + +
+
+
+ + +
+ + + + + + + + +
+
+
+ +
+
+
Ruas Jalan
+
+
+
+
+
+ +
+
+
Bidang Parsil
+
+
+
+
+
+ +
+
+
Titik SPBU
+
+
+
+
+
+ +
+
+
Rumah Ibadah
+
+
+
+
+
+ +
+
+
Data Warga
+
+
+
+
+
+ +
+
+
Pengaduan
+
+
+
+
+ + +
+ +
+
+
+ + Semua Lapisan Data +
+
+
+
+
+
+ Jalan Nasional + Folder 01 +
+
+
+ Jalan Provinsi + Folder 01 +
+
+
+ SPBU 24 Jam + Folder 01 +
+
+
+ Parsil Kavling + Folder 01 +
+
+
+ Rumah Ibadah + Folder 02 +
+
+
+ Data Warga Miskin + Folder 02 +
+
+
+ Pengaduan Warga + Folder 02 +
+
+
+
+ + +
+
+
+ + Aktivitas Sistem +
+ +
+
+
+
+
+ +
+
+
Data jalan diperbarui
+
Folder 01 · edit_jalan.php
+
+
+
+
+ +
+
+
Parsil baru disimpan
+
Folder 01 · simpan_parsil.php
+
+
+
+
+ +
+
+
Radius ibadah diperbarui
+
Folder 02 · update_radius.php
+
+
+
+
+ +
+
+
Laporan pengaduan masuk
+
Folder 02 · simpan_laporan_cepat.php
+
+
+
+
+
+
+ + + + +
+ + + + + + + \ No newline at end of file diff --git a/01/edit.php b/01/edit.php new file mode 100644 index 0000000..060101e --- /dev/null +++ b/01/edit.php @@ -0,0 +1,139 @@ +alert('Data tidak ditemukan!'); window.location='index.php';"; + exit; +} + +// 3. Proses Update saat tombol Simpan ditekan +if (isset($_POST['update'])) { + $nama = mysqli_real_escape_string($conn, $_POST['nama']); + $wa = mysqli_real_escape_string($conn, $_POST['wa']); + $jam = $_POST['jam']; + + // Update ke tabel spbu + $sql = "UPDATE spbu SET nama_spbu='$nama', no_whatsapp='$wa', status_24jam='$jam' WHERE id='$id'"; + + if (mysqli_query($conn, $sql)) { + echo ""; + } else { + echo "Gagal Update: " . mysqli_error($conn); + } +} +?> + + + + + + + Edit Data SPBU + + + +
+

Edit Data SPBU

+
+ + + + + + + + + + + ← Batal dan Kembali +
+
+ + \ No newline at end of file diff --git a/01/edit_jalan.php b/01/edit_jalan.php new file mode 100644 index 0000000..d90e16b --- /dev/null +++ b/01/edit_jalan.php @@ -0,0 +1,41 @@ +alert('Data Jalan Diperbarui!'); window.location='index.php';"; +} +?> + + + + Edit Jalan + + + +
+

Edit Data Jalan

+
+ + + + + +

← Kembali
+
+
+ + \ No newline at end of file diff --git a/01/edit_parsil.php b/01/edit_parsil.php new file mode 100644 index 0000000..8e58410 --- /dev/null +++ b/01/edit_parsil.php @@ -0,0 +1,42 @@ +alert('Data Parsil Diperbarui!'); window.location='index.php';"; +} +?> + + + + Edit Parsil + + + +
+

Edit Data Parsil

+
+ + + + + +

← Kembali
+
+
+ + \ No newline at end of file diff --git a/01/hapus.php b/01/hapus.php new file mode 100644 index 0000000..b7a3e23 --- /dev/null +++ b/01/hapus.php @@ -0,0 +1,33 @@ + + alert('Data SPBU Berhasil Dihapus!'); + window.location='index.php'; + "; + } else { + // Jika gagal, tampilkan pesan error + echo ""; + } + +} else { + // Jika tidak ada ID di URL, langsung lempar balik ke index + header("location:index.php"); +} +?> \ No newline at end of file diff --git a/01/hapus_jalan.php b/01/hapus_jalan.php new file mode 100644 index 0000000..4f42bf1 --- /dev/null +++ b/01/hapus_jalan.php @@ -0,0 +1,9 @@ +alert('Data Jalan Berhasil Dihapus!'); window.location='index.php';"; + } +} +?> \ No newline at end of file diff --git a/01/hapus_parsil.php b/01/hapus_parsil.php new file mode 100644 index 0000000..a77549e --- /dev/null +++ b/01/hapus_parsil.php @@ -0,0 +1,20 @@ + + alert('Data Parsil Berhasil Dihapus!'); + window.location='index.php'; + "; + } else { + echo "Gagal menghapus data: " . mysqli_error($conn); + } +} else { + header("Location: index.php"); +} +?> \ No newline at end of file diff --git a/01/index.php b/01/index.php new file mode 100644 index 0000000..34c6611 --- /dev/null +++ b/01/index.php @@ -0,0 +1,1176 @@ + + + + + + +WebGIS Pontianak + + + + + + + + + + + +
+ + +
+ + +
+ + +
+
+
+
WebGIS
+
Peta Infrastruktur
+
+
Pontianak
+
+ +
+ + +
Peta Dasar
+
+
+
+
+
+
+
+
+
+
Peta Jalan
+
+
+
+
Satelit
+
+
+ + +
Tambah Data
+
+ + + +
+ + +
Data Spasial
+ +
+
+
+
SPBU 24 Jam
+
Pom bensin nonstop
+
+ + +
+ +
+
+
+
SPBU Reguler
+
Pom bensin jam terbatas
+
+ + +
+ +
+
+
+
Manajemen Jalan
+
Jaringan & status jalan
+
+ + +
+ +
+
+
+
Parsil Kavling
+
Batas & kepemilikan tanah
+
+ + +
+ +
+ + +
+
+ + +
+ + +
+ + +
+
+ +
+
+ +
+
+ + +
+ + Data berhasil disimpan! +
+ + + + + + + + + 0) { + while ($d = mysqli_fetch_assoc($q)) { + list($lat, $lng) = ambilKoordinatBersih($d); + if ($lat == 0 || $lng == 0) continue; + $is24 = ($d['status_24jam'] ?? 'Tidak') == 'Ya'; + $status = $is24 ? '24 Jam' : 'Reguler'; + $hexColor = $is24 ? '#10b981' : '#ef4444'; + $groupName = $is24 ? 'spbu24Group' : 'spbuNormalGroup'; + $nama_spbu = htmlspecialchars($d['nama_spbu'] ?? 'SPBU', ENT_QUOTES); + $no_wa = htmlspecialchars($d['no_whatsapp'] ?? '-', ENT_QUOTES); + $id = (int)$d['id']; + $popup = "
{$nama_spbu}
" + . "
WhatsApp: {$no_wa}
Operasional: {$status}
" + . "
" + . " Edit" + . " Hapus" + . "
"; + $popupJs = json_encode($popup); + echo "\n"; + } +} + +// ========================================================================= +// 2. DATA JALAN (POLYLINE) +// ========================================================================= +$q = mysqli_query($conn, "SELECT * FROM jalan ORDER BY id DESC"); +if ($q && mysqli_num_rows($q) > 0) { + while ($d = mysqli_fetch_assoc($q)) { + if (empty($d['geojson'])) continue; + $status = $d['status_jalan'] ?? 'Jalan Kabupaten'; + $warna = $status=='Jalan Nasional' ? '#ef4444' : ($status=='Jalan Provinsi' ? '#f59e0b' : '#3b82f6'); + $nama_jalan = htmlspecialchars($d['nama_jalan'] ?? 'Jalan', ENT_QUOTES); + $id = (int)$d['id']; + $popup = "
Lintasan Jalan
" + . "
Nama: {$nama_jalan}
Status: {$status}
" + . "
" + . " Edit" + . " Hapus
"; + $popupJs = json_encode($popup); + $geojson = $d['geojson']; + echo "\n"; + } +} + +// ========================================================================= +// 3. DATA PARSIL KAVLING (POLYGON) +// ========================================================================= +$q = mysqli_query($conn, "SELECT * FROM parsil ORDER BY id DESC"); +if ($q && mysqli_num_rows($q) > 0) { + while ($d = mysqli_fetch_assoc($q)) { + if (empty($d['geojson'])) continue; + $status = $d['status_kepemilikan'] ?? ($d['status_shm'] ?? 'SHM'); + $warna = $status=='SHM' ? '#10b981' : '#8b5cf6'; + $pemilik = htmlspecialchars($d['nama_pemilik'] ?? ($d['pemilik_tanah'] ?? 'Tanpa Nama'), ENT_QUOTES); + $id = (int)$d['id']; + $popup = "
Informasi Kavling
" + . "
Pemilik: {$pemilik}
Status: {$status}
" + . "
" + . " Edit" + . " Hapus
"; + $popupJs = json_encode($popup); + $geojson = $d['geojson']; + echo "\n"; + } +} +?> + + \ No newline at end of file diff --git a/01/koneksi.php b/01/koneksi.php new file mode 100644 index 0000000..b527aac --- /dev/null +++ b/01/koneksi.php @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/01/login.php b/01/login.php new file mode 100644 index 0000000..39f49a4 --- /dev/null +++ b/01/login.php @@ -0,0 +1,527 @@ + 0) { + $user = mysqli_fetch_assoc($q); + $_SESSION['user_id'] = $user['id']; + $_SESSION['user_nama'] = $user['nama']; + $_SESSION['user_role'] = $user['role']; + header('Location: index.php'); + exit; + } else { + $error = 'Username atau password salah!'; + } +} +?> + + + + + +Login - WebGIS Pontianak + + + + + + +
+
+
+ + + +
+ +
+
+
+

WebGIS Pontianak

+

Sistem Informasi Geografis Kota Pontianak

+
+
+ +
+ Sistem Online +
+ +
Selamat Datang
+
Masuk ke akun Anda untuk mengakses peta
+ +
+ + +
+ + +
+ + +
+
+ +
+ + +
+
+ +
+ +
+ + + +
+
+ + +
+ +
+
+ Akun Tersedia +
+
+ +
+
+
+
+
+
admin
+
admin123
+
+
+ Administrator +
+ +
+
+
+
+
walikota
+
walikota123
+
+
+ Walikota +
+
+ +
+ + + + \ No newline at end of file diff --git a/01/logout.php b/01/logout.php new file mode 100644 index 0000000..1f4bcf7 --- /dev/null +++ b/01/logout.php @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/01/proses_edit.php b/01/proses_edit.php new file mode 100644 index 0000000..f4f33dc --- /dev/null +++ b/01/proses_edit.php @@ -0,0 +1,18 @@ +alert('Data berhasil diperbarui!'); window.location='index.php';"; + } else { + echo "Gagal mengupdate data: " . mysqli_error($conn); + } +} +?> \ No newline at end of file diff --git a/01/simpan_jalan.php b/01/simpan_jalan.php new file mode 100644 index 0000000..a14479d --- /dev/null +++ b/01/simpan_jalan.php @@ -0,0 +1,19 @@ +alert('Data Jalan berhasil disimpan!'); window.location='index.php';"; + } else { + echo "Gagal menyimpan: " . mysqli_error($conn); + } +} +?> \ No newline at end of file diff --git a/01/simpan_parsil.php b/01/simpan_parsil.php new file mode 100644 index 0000000..0c67bcb --- /dev/null +++ b/01/simpan_parsil.php @@ -0,0 +1,20 @@ +alert('Data Parsil berhasil disimpan!'); window.location='index.php';"; + } else { + echo "Gagal menyimpan: " . mysqli_error($conn); + } +} +?> \ No newline at end of file diff --git a/01/simpan_spbu.php b/01/simpan_spbu.php new file mode 100644 index 0000000..01b290c --- /dev/null +++ b/01/simpan_spbu.php @@ -0,0 +1,23 @@ + + alert('Data SPBU berhasil disimpan!'); + window.location='index.php'; + "; + } else { + echo "Gagal menyimpan: " . mysqli_error($conn); + } +} +?> \ No newline at end of file diff --git a/01/update_radius.php b/01/update_radius.php new file mode 100644 index 0000000..af6d38b --- /dev/null +++ b/01/update_radius.php @@ -0,0 +1,16 @@ + \ No newline at end of file diff --git a/01/update_radius_warga.php b/01/update_radius_warga.php new file mode 100644 index 0000000..a30177b --- /dev/null +++ b/01/update_radius_warga.php @@ -0,0 +1,16 @@ + \ No newline at end of file diff --git a/02/edit_miskin.php b/02/edit_miskin.php new file mode 100644 index 0000000..92a9bfd --- /dev/null +++ b/02/edit_miskin.php @@ -0,0 +1,60 @@ + + + + + Edit Data Miskin + + + +
+

Edit Data Warga

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + \ No newline at end of file diff --git a/02/edit_pengaduan.php b/02/edit_pengaduan.php new file mode 100644 index 0000000..8494951 --- /dev/null +++ b/02/edit_pengaduan.php @@ -0,0 +1,39 @@ + + + + + + Edit Data Pengaduan + + + +
+

Edit Laporan Warga

+
+ + + + + + + + + + + + +
+
+ + \ No newline at end of file diff --git a/02/edit_rumah_ibadah.php b/02/edit_rumah_ibadah.php new file mode 100644 index 0000000..c327c75 --- /dev/null +++ b/02/edit_rumah_ibadah.php @@ -0,0 +1,43 @@ + + + + + Edit Data Masjid + + + +
+

Edit Lokasi Masjid

+
+ + + + + + + + + + + + +

← Kembali ke Peta
+
+
+ + \ No newline at end of file diff --git a/02/hapus_miskin.php b/02/hapus_miskin.php new file mode 100644 index 0000000..89d4979 --- /dev/null +++ b/02/hapus_miskin.php @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/02/hapus_pengaduan.php b/02/hapus_pengaduan.php new file mode 100644 index 0000000..3db9775 --- /dev/null +++ b/02/hapus_pengaduan.php @@ -0,0 +1,18 @@ + + alert('Laporan pengaduan berhasil dihapus!'); + window.location.href='index.php'; + "; + } else { + echo "Gagal menghapus data: " . mysqli_error($conn); + } +} +?> \ No newline at end of file diff --git a/02/hapus_rumah_ibadah.php b/02/hapus_rumah_ibadah.php new file mode 100644 index 0000000..19bccbb --- /dev/null +++ b/02/hapus_rumah_ibadah.php @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/02/histori_bantuan.php b/02/histori_bantuan.php new file mode 100644 index 0000000..271b9e7 --- /dev/null +++ b/02/histori_bantuan.php @@ -0,0 +1,153 @@ + + + + + + +Histori Bantuan - WebGIS Pontianak + + + + + +
+

Histori Bantuan Warga

+
+ () + Peta + Logout +
+
+ +
+ +
Data bantuan berhasil ditambahkan!
+ + + +
+

Tambah Bantuan

+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+ + +
+

Riwayat Bantuan

+ + + + + + 'b-blt','Sembako'=>'b-sembako','BPJS'=>'b-bpjs'][$h['jenis_bantuan']] ?? 'b-lain'; + ?> + + + + + + + + + + + +
#WargaJenisJumlahTanggalPetugasAksi
+
+
+ + \ No newline at end of file diff --git a/02/index.php b/02/index.php new file mode 100644 index 0000000..b9dd51d --- /dev/null +++ b/02/index.php @@ -0,0 +1,1218 @@ + + + + + + +WebGIS Pontianak + + + + + + + + + + + +
+ + +
+ + +
+ + +
+
+
+
WebGIS
+
Peta Sosial & Warga
+
+
Pontianak
+
+ +
+ + +
Peta Dasar
+
+
+
+
+
+
+
+
+
+
Peta Jalan
+
+
+
+
Satelit
+
+
+ + +
Tambah Data
+
+ + + +
+ + +
Data Spasial
+ +
+
+
+
Rumah Ibadah
+
Titik lokasi rumah ibadah
+
+ + +
+ +
+
+
+
Warga Miskin
+
Sebaran penduduk miskin
+
+ + +
+ +
+
+
+
Pengaduan Warga
+
Laporan & aduan masyarakat
+
+ + +
+ +
+ + +
+
+ + +
+ + +
+ + +
+
+ +
+
+ +
+
+ + +
+ + Data berhasil disimpan! +
+ + + + + + + + 0) { + while ($d = mysqli_fetch_assoc($q)) { + list($lat, $lng) = ambilKoordinatBersih($d); + if ($lat == 0 || $lng == 0) continue; + $rad = !empty($d['radius_meter']) ? (int)$d['radius_meter'] : 500; + $masjids[] = ['lat'=>$lat,'lng'=>$lng,'radius'=>$rad]; + $nama_masjid = htmlspecialchars($d['nama_masjid'] ?? 'Rumah Ibadah', ENT_QUOTES); + $nama_pic = htmlspecialchars($d['nama_pic'] ?? '-', ENT_QUOTES); + $id = (int)$d['id']; + $popup = "
{$nama_masjid}
" + . "
PIC: {$nama_pic}
Jangkauan: {$rad} Meter" + . "
" + . "
" + . "
" + . "
" + . "
" + . " Edit" + . "Hapus
"; + $popupJs = json_encode($popup); + echo "\n"; + } +} + +// ========================================================================= +// 2. DATA PENDUDUK MISKIN +// ========================================================================= +$q = mysqli_query($conn, "SELECT * FROM penduduk_miskin ORDER BY id DESC"); +if ($q && mysqli_num_rows($q) > 0) { + while ($d = mysqli_fetch_assoc($q)) { + list($lat, $lng) = ambilKoordinatBersih($d); + if ($lat == 0 || $lng == 0) continue; + $dalamRadius = false; + foreach ($masjids as $m) { + $R = 6371000; $dLat = deg2rad($lat-$m['lat']); $dLng = deg2rad($lng-$m['lng']); + $a = sin($dLat/2)*sin($dLat/2)+cos(deg2rad($m['lat']))*cos(deg2rad($lat))*sin($dLng/2)*sin($dLng/2); + if (($R*2*atan2(sqrt($a),sqrt(1-$a))) <= $m['radius']) { $dalamRadius = true; break; } + } + $hexColor = $dalamRadius ? '#6366f1' : '#db2777'; + $zoneText = $dalamRadius + ? " Terjangkau Radius" + : " Luar Radius"; + $nama_kk = htmlspecialchars($d['nama_kk'] ?? 'Warga', ENT_QUOTES); + $alamat = htmlspecialchars($d['alamat'] ?? '-', ENT_QUOTES); + $penyakit = htmlspecialchars($d['riwayat_penyakit'] ?? '-', ENT_QUOTES); + $tgl_lahir = !empty($d['tanggal_lahir']) ? date('d M Y', strtotime($d['tanggal_lahir'])) : '-'; + $rad_warga = !empty($d['radius_warga']) ? (int)$d['radius_warga'] : 300; + $id = (int)$d['id']; + $popup = "
{$nama_kk}
" + . "
" + . "Alamat: {$alamat}
" + . "Tgl Lahir: {$tgl_lahir}
" + . "Riwayat Penyakit: {$penyakit}
" + . $zoneText + . "
" + . "
" + . "
" + . "
" + . "
" + . " Edit" + . "Hapus
" + . ""; + $popupJs = json_encode($popup); + echo "\n"; + } +} + +// ========================================================================= +// 3. DATA LAPORAN CEPAT +// ========================================================================= +$q = mysqli_query($conn, "SELECT * FROM laporan_cepat ORDER BY tgl_lapor DESC"); +if ($q && mysqli_num_rows($q) > 0) { + while ($d = mysqli_fetch_assoc($q)) { + list($lat, $lng) = ambilKoordinatBersih($d); + if ($lat == 0 || $lng == 0) continue; + $nama_pelapor = htmlspecialchars($d['nama_pelapor'] ?? 'Anonim', ENT_QUOTES); + $kategori = htmlspecialchars($d['kategori'] ?? '-', ENT_QUOTES); + $deskripsi = htmlspecialchars(substr($d['deskripsi'] ?? '-', 0, 100), ENT_QUOTES); + $status = $d['status'] ?? 'Masuk'; + $statusColor = ['Masuk'=>'#d97706','Diproses'=>'#2563eb','Selesai'=>'#16a34a'][$status] ?? '#64748b'; + $tgl = date('d M Y', strtotime($d['tgl_lapor'])); + $id = (int)$d['id']; + $popup = "
Laporan Cepat
" + . "
" + . "Pelapor: {$nama_pelapor}
" + . "Kategori: {$kategori}
" + . "Laporan: {$deskripsi}
" + . "Tanggal: {$tgl}
" + . "" + . " {$status}" + . "
" + . "
" + . " Edit" + . " Hapus" + . "
"; + $popupJs = json_encode($popup); + echo "\n"; + } +} + +// Fallback tabel pengaduan_warga lama +$q2 = mysqli_query($conn, "SHOW TABLES LIKE 'pengaduan_warga'"); +if ($q2 && mysqli_num_rows($q2) > 0) { + $q = mysqli_query($conn, "SELECT * FROM pengaduan_warga ORDER BY id DESC"); + if ($q && mysqli_num_rows($q) > 0) { + while ($d = mysqli_fetch_assoc($q)) { + list($lat, $lng) = ambilKoordinatBersih($d); + if ($lat == 0 || $lng == 0) continue; + $nama_pelapor = htmlspecialchars($d['nama_pelapor'] ?? 'Anonim', ENT_QUOTES); + $aduan = htmlspecialchars($d['deskripsi_laporan'] ?? '-', ENT_QUOTES); + $id = (int)$d['id']; + $popup = "
Laporan Warga
" + . "
Pelapor: {$nama_pelapor}
Aduan: {$aduan}
" + . "
" + . " Edit" + . " Hapus
"; + $popupJs = json_encode($popup); + echo "\n"; + } + } +} +?> + + \ No newline at end of file diff --git a/02/kelola_laporan.php b/02/kelola_laporan.php new file mode 100644 index 0000000..4b8e14d --- /dev/null +++ b/02/kelola_laporan.php @@ -0,0 +1,210 @@ + + + + + + +Kelola Laporan - WebGIS Pontianak + + + + + +
+

Kelola Laporan Masyarakat

+ +
+ +
+ +
Status laporan berhasil diperbarui!
+ + +
+
+
+
Total Laporan
+
+
+
+
Masuk / Baru
+
+
+
+
Sedang Diproses
+
+
+
+
Selesai
+
+
+ +
+
+

Daftar Laporan Masuk

+ Lihat di Peta +
+ + + + + + + + + + + + + + 'b-masuk','Diproses'=>'b-diproses','Selesai'=>'b-selesai'][$d['status']] ?? 'b-masuk'; + ?> + + + + + + + + + + + +
#PelaporKategoriDeskripsiTanggalStatusAksi
+
+ +
... + +
+
+
+ + + + + + + \ No newline at end of file diff --git a/02/koneksi.php b/02/koneksi.php new file mode 100644 index 0000000..b527aac --- /dev/null +++ b/02/koneksi.php @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/02/login.php b/02/login.php new file mode 100644 index 0000000..39f49a4 --- /dev/null +++ b/02/login.php @@ -0,0 +1,527 @@ + 0) { + $user = mysqli_fetch_assoc($q); + $_SESSION['user_id'] = $user['id']; + $_SESSION['user_nama'] = $user['nama']; + $_SESSION['user_role'] = $user['role']; + header('Location: index.php'); + exit; + } else { + $error = 'Username atau password salah!'; + } +} +?> + + + + + +Login - WebGIS Pontianak + + + + + + +
+
+
+ + + +
+ +
+
+
+

WebGIS Pontianak

+

Sistem Informasi Geografis Kota Pontianak

+
+
+ +
+ Sistem Online +
+ +
Selamat Datang
+
Masuk ke akun Anda untuk mengakses peta
+ +
+ + +
+ + +
+ + +
+
+ +
+ + +
+
+ +
+ +
+ + + +
+
+ + +
+ +
+
+ Akun Tersedia +
+
+ +
+
+
+
+
+
admin
+
admin123
+
+
+ Administrator +
+ +
+
+
+
+
walikota
+
walikota123
+
+
+ Walikota +
+
+ +
+ + + + \ No newline at end of file diff --git a/02/logout.php b/02/logout.php new file mode 100644 index 0000000..1f4bcf7 --- /dev/null +++ b/02/logout.php @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/02/proses_edit_masjid.php b/02/proses_edit_masjid.php new file mode 100644 index 0000000..3752869 --- /dev/null +++ b/02/proses_edit_masjid.php @@ -0,0 +1,35 @@ + + alert('Data Masjid Berhasil Diperbarui!'); + window.location.href='index.php'; + "; +} else { + // Jika gagal, tampilkan pesan errornya biar ketahuan salahnya di mana + echo "Gagal memperbarui data ke database: " . mysqli_error($conn); +} +?> \ No newline at end of file diff --git a/02/proses_edit_miskin.php b/02/proses_edit_miskin.php new file mode 100644 index 0000000..49ec1a5 --- /dev/null +++ b/02/proses_edit_miskin.php @@ -0,0 +1,40 @@ +alert('Data warga miskin berhasil diperbarui!'); window.location='index.php';"; +} else { + echo "Gagal memperbarui data: " . mysqli_error($conn); +} +?> \ No newline at end of file diff --git a/02/proses_edit_pengaduan.php b/02/proses_edit_pengaduan.php new file mode 100644 index 0000000..30ba408 --- /dev/null +++ b/02/proses_edit_pengaduan.php @@ -0,0 +1,25 @@ + + alert('Laporan pengaduan berhasil diperbarui!'); + window.location.href='index.php'; + "; + } else { + echo "Gagal memperbarui data: " . mysqli_error($conn); + } +} +?> \ No newline at end of file diff --git a/02/simpan_laporan_cepat.php b/02/simpan_laporan_cepat.php new file mode 100644 index 0000000..fd18ff8 --- /dev/null +++ b/02/simpan_laporan_cepat.php @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/02/simpan_miskin.php b/02/simpan_miskin.php new file mode 100644 index 0000000..362983e --- /dev/null +++ b/02/simpan_miskin.php @@ -0,0 +1,23 @@ + \ No newline at end of file diff --git a/02/simpan_pengaduan.php b/02/simpan_pengaduan.php new file mode 100644 index 0000000..000ac88 --- /dev/null +++ b/02/simpan_pengaduan.php @@ -0,0 +1,20 @@ +alert('Laporan Pengaduan berhasil dikirim!'); window.location.href='index.php';"; + } else { + echo "Error: " . mysqli_error($conn); + } +} +?> \ No newline at end of file diff --git a/02/simpan_rumah_ibadah.php b/02/simpan_rumah_ibadah.php new file mode 100644 index 0000000..59fd9f2 --- /dev/null +++ b/02/simpan_rumah_ibadah.php @@ -0,0 +1,19 @@ +alert('Data Masjid berhasil disimpan!'); window.location='index.php';"; + } else { + echo "Gagal menyimpan: " . mysqli_error($conn); + } +} +?> \ No newline at end of file diff --git a/02/update_radius.php b/02/update_radius.php new file mode 100644 index 0000000..af6d38b --- /dev/null +++ b/02/update_radius.php @@ -0,0 +1,16 @@ + \ No newline at end of file diff --git a/02/update_radius_warga.php b/02/update_radius_warga.php new file mode 100644 index 0000000..a30177b --- /dev/null +++ b/02/update_radius_warga.php @@ -0,0 +1,16 @@ + \ No newline at end of file