From 0e0db8c8774a6d4c89bea97e46097a93759b0da1 Mon Sep 17 00:00:00 2001 From: Alexander Davis Date: Mon, 10 Aug 2020 17:56:22 +0100 Subject: [PATCH] Creation of button and SQL --- app/public/actions/reopen.php | 27 +++++++++++++++++++++++++++ app/public/view.php | 4 +++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 app/public/actions/reopen.php diff --git a/app/public/actions/reopen.php b/app/public/actions/reopen.php new file mode 100644 index 0000000..ee79f47 --- /dev/null +++ b/app/public/actions/reopen.php @@ -0,0 +1,27 @@ +prepare($stmt); + $sql->bindParam(':uuid', $_GET['rid']); + $sql->execute(); + } catch (PDOException $e) { + $alert = array("danger", "Failed to reopen request: " . $e->getMessage()); + } + $newURL = "/"; + echo(""); + } else { + $alert = array("danger", "You are not authorised to close this request."); + $newURL = "/view?rid=" . $request['uuid']; + echo(""); + } + +?> diff --git a/app/public/view.php b/app/public/view.php index 1224e54..a2919a1 100644 --- a/app/public/view.php +++ b/app/public/view.php @@ -53,7 +53,9 @@

Manage subscribers - + + Reopen request + Update the request Add attachment(s)