This commit is contained in:
NW
2023-09-21 13:45:08 +01:00
commit a35c276b35
320 changed files with 74667 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
<?php
if (! (! empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')) {
echo 'Permission denied';
exit;
}
if (! empty($_POST['file_name'])) {
$toDelete = './uploads/'.$_POST['file_name'];
if (unlink($toDelete)) {
echo json_encode(['success' => 1,
'msg' => 'Removed', ]);
exit;
} else {
echo json_encode(['success' => 0,
'msg' => 'Try again', ]);
exit;
}
}