From e6d21c70277dc2b4bf0b3c3e0ce7a7f1622dca83 Mon Sep 17 00:00:00 2001 From: Agnibho Mondal Date: Mon, 17 May 2021 12:02:41 +0530 Subject: [PATCH] Allow PDF as report --- attachments.php | 13 ++++++++----- report.php | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/attachments.php b/attachments.php index b8ff3d5..2007734 100644 --- a/attachments.php +++ b/attachments.php @@ -15,6 +15,9 @@ if(!empty($_GET["pid"])){ if(in_array($_FILES["upload"]["type"], ["image/jpeg", "image/jpg", "image/png", "image/gif", "application/pdf"])){ $fname=str_replace("/", "", $pid)."-".time()."-".rand(1000,9999).".".pathinfo($_FILES["upload"]["name"], PATHINFO_EXTENSION); move_uploaded_file($_FILES["upload"]["tmp_name"], "data/attachments/".$fname); + if(!empty($_GET["req"])){ + $db->omitRequisition($_GET["req"]); + } } else{ $error=$error."Only jpg, png, gif, pdf files are supported."; @@ -44,6 +47,11 @@ $error=$error."

";
+
+ + + +
@@ -51,11 +59,6 @@ $error=$error."

";
-
- - - -
diff --git a/report.php b/report.php index c791892..004019c 100644 --- a/report.php +++ b/report.php @@ -41,6 +41,7 @@ if(!empty($_GET["pid"]) && !empty($_GET["form"])){

Add New Report

+

">Upload PDF instead

-- 2.39.2