🤩 File Manager - Mr.X
PHP:
8.3.33
Server:
Apache
OS:
Linux 5.14.0-611.49.1.el9_7.x86_64
User:
websparkit
Navigate
Upload:
Upload
New File
New Folder
Editing:admin_delete.php
<?php require_once __DIR__ . '/../config/config.php'; require_once __DIR__ . '/../includes/functions.php'; header('Content-Type: application/json'); if (!isAdmin()) { echo json_encode(['success'=>false,'message'=>'Unauthorized']); exit; } $type = $_POST['type'] ?? ''; $id = intval($_POST['id'] ?? 0); $allowed = ['booking']; if (!in_array($type, $allowed)) { echo json_encode(['success'=>false,'message'=>'Invalid type']); exit; } if ($type == 'booking') { $conn->query("DELETE FROM bookings WHERE id=$id"); echo json_encode(['success'=>true,'message'=>'Deleted']); exit; } echo json_encode(['success'=>false,'message'=>'Unknown type']);
Save Changes
Cancel
Create New File
Create New Folder