diff --git a/create_tables.php b/create_tables.php
new file mode 100644
index 0000000..6d44224
--- /dev/null
+++ b/create_tables.php
@@ -0,0 +1,24 @@
+query($sql) === TRUE) {
+ echo json_encode(['status' => 'success', 'message' => 'Tabel jalan_rusak berhasil dibuat atau sudah ada']);
+} else {
+ echo json_encode(['status' => 'error', 'message' => $conn->error]);
+}
+
+$conn->close();
+?>
diff --git a/data/pontianak-kecamatan.geojson b/data/pontianak-kecamatan.geojson
index 64d8c1f..1f4cdd2 100644
--- a/data/pontianak-kecamatan.geojson
+++ b/data/pontianak-kecamatan.geojson
@@ -6998,7 +6998,8 @@
"Id": 0,
"Plan_Area": 113026328.1,
"Ket": "Pontianak Timur",
- "name": "Pontianak Timur"
+ "name": "Pontianak Timur",
+ "population": 121500
}
},
{
@@ -7854,7 +7855,8 @@
"Id": 0,
"Plan_Area": 113026328.1,
"Ket": "Pontianak Selatan",
- "name": "Pontianak Selatan"
+ "name": "Pontianak Selatan",
+ "population": 133600
}
},
{
@@ -14352,7 +14354,8 @@
"Id": 0,
"Plan_Area": 113026328.1,
"Ket": "Pontianak Utara",
- "name": "Pontianak Utara"
+ "name": "Pontianak Utara",
+ "population": 129200
}
},
{
@@ -17096,7 +17099,8 @@
"Id": 0,
"Plan_Area": 113026328.1,
"Ket": "Pontianak Barat",
- "name": "Pontianak Barat"
+ "name": "Pontianak Barat",
+ "population": 148800
}
},
{
@@ -18288,7 +18292,8 @@
"Id": 0,
"Plan_Area": 113026328.1,
"Ket": "Pontianak Kota",
- "name": "Pontianak Kota"
+ "name": "Pontianak Kota",
+ "population": 98500
}
},
{
@@ -19400,7 +19405,8 @@
"Id": 0,
"Plan_Area": 113026328.1,
"Ket": "Pontianak Tenggara",
- "name": "Pontianak Tenggara"
+ "name": "Pontianak Tenggara",
+ "population": 52900
}
}
]
diff --git a/delete_jalan_rusak.php b/delete_jalan_rusak.php
new file mode 100644
index 0000000..28bda90
--- /dev/null
+++ b/delete_jalan_rusak.php
@@ -0,0 +1,46 @@
+ 'error', 'message' => 'ID wajib diisi']);
+ exit;
+ }
+
+ // Ambil data gambar untuk dihapus
+ $stmt = $conn->prepare("SELECT gambar FROM jalan_rusak WHERE id = ?");
+ $stmt->bind_param("i", $id);
+ $stmt->execute();
+ $result = $stmt->get_result();
+ $row = $result->fetch_assoc();
+
+ if ($row && $row['gambar'] && file_exists($row['gambar'])) {
+ unlink($row['gambar']);
+ }
+
+ $stmt->close();
+
+ // Hapus record
+ $stmt = $conn->prepare("DELETE FROM jalan_rusak WHERE id = ?");
+ $stmt->bind_param("i", $id);
+
+ if ($stmt->execute()) {
+ echo json_encode(['status' => 'success', 'message' => 'Laporan jalan rusak berhasil dihapus']);
+ } else {
+ http_response_code(500);
+ echo json_encode(['status' => 'error', 'message' => $stmt->error]);
+ }
+
+ $stmt->close();
+ $conn->close();
+ exit;
+}
+
+http_response_code(405);
+echo json_encode(['status' => 'error', 'message' => 'Method tidak diizinkan']);
+$conn->close();
+?>
diff --git a/get_jalan_rusak.php b/get_jalan_rusak.php
new file mode 100644
index 0000000..8ad088a
--- /dev/null
+++ b/get_jalan_rusak.php
@@ -0,0 +1,29 @@
+query($sql);
+$data = [];
+
+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['latitude'] = (float)$row['latitude'];
+ $row['longitude'] = (float)$row['longitude'];
+ $data[] = $row;
+ }
+}
+
+echo json_encode($data);
+$conn->close();
+?>
diff --git a/index.html b/index.html
index 3752686..f624c29 100644
--- a/index.html
+++ b/index.html
@@ -83,6 +83,9 @@
+
@@ -265,6 +268,58 @@
+
+
+
+
+
+
Lapor Jalan Rusak
+
Dokumentasikan kondisi jalan dengan foto untuk membantu perbaikan.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
![Preview]()
+
+
+
+ 📍 Koordinat: -
+
+
+
+
+
+
+
+
+