Initial WebGIS portal project

This commit is contained in:
2026-06-10 19:53:39 +07:00
commit c0aa8e09d5
62 changed files with 9013 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
require_once 'db_pdo.php';
require_once 'auth.php';
require_admin_login(true);
header('Content-Type: application/json');
$input = json_decode(file_get_contents('php://input'), true);
if (!$input || empty($input['id'])) {
echo json_encode(['success' => false, 'message' => 'Input tidak valid']);
exit;
}
try {
$stmt = $pdo->prepare("DELETE FROM penduduk_miskin WHERE id=?");
$stmt->execute([$input['id']]);
// Note: anggota_keluarga will be deleted automatically due to ON DELETE CASCADE
echo json_encode(['success' => true]);
} catch (Exception $e) {
echo json_encode(['success' => false, 'message' => $e->getMessage()]);
}