From 04dad13ad3a03295a04a91439dcff10a62a120a6 Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Sat, 8 Apr 2023 21:59:54 +0100 Subject: [PATCH] Client file deletion - Add file delete confirmation modal - Change file deletes to POST not GET requests in post.php as they are state changing - Require CSRF validation for file deletes --- client_file_add_modal.php | 2 +- client_file_delete_modal.php | 21 +++++++++++++++++++++ client_files.php | 6 ++++-- js/file_delete_modal.js | 5 +++++ post.php | 29 +++++++++++++++-------------- 5 files changed, 46 insertions(+), 17 deletions(-) create mode 100644 client_file_delete_modal.php create mode 100644 js/file_delete_modal.js diff --git a/client_file_add_modal.php b/client_file_add_modal.php index 5b5fa383..6a1ca4b8 100644 --- a/client_file_add_modal.php +++ b/client_file_add_modal.php @@ -17,7 +17,7 @@
- + diff --git a/client_file_delete_modal.php b/client_file_delete_modal.php new file mode 100644 index 00000000..63c1a2fa --- /dev/null +++ b/client_file_delete_modal.php @@ -0,0 +1,21 @@ + + diff --git a/client_files.php b/client_files.php index 67566805..fa019b80 100644 --- a/client_files.php +++ b/client_files.php @@ -47,7 +47,7 @@ $num_of_files = mysqli_num_rows($sql_files_images) + mysqli_num_rows($sql_files_ - + )" class="text-white float-right mr-1"> @@ -90,7 +90,7 @@ $num_of_files = mysqli_num_rows($sql_files_images) + mysqli_num_rows($sql_files_ " download="" class="text-secondary float-left ml-1"> )" class="text-secondary float-left ml-1"> - + )" class="text-secondary float-right mr-1">