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
+36
View File
@@ -0,0 +1,36 @@
<?php
include 'koneksi.php';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$id = isset($_POST['id']) ? intval($_POST['id']) : 0;
$tabel = isset($_POST['tabel']) ? trim($_POST['tabel']) : '';
if ($id <= 0) {
http_response_code(400);
echo "ID tidak valid!";
exit;
}
$allowed_tables = ['spbu_locations'];
if (in_array($tabel, $allowed_tables)) {
$stmt = $conn->prepare("DELETE FROM $tabel WHERE id = ?");
$stmt->bind_param("i", $id);
if ($stmt->execute()) {
echo "Data berhasil dihapus!";
} else {
http_response_code(500);
echo "Gagal menghapus: " . $conn->error;
}
$stmt->close();
} else {
http_response_code(400);
echo "Tabel tidak valid!";
}
$conn->close();
} else {
http_response_code(405);
echo "Metode tidak diizinkan";
}
?>