From: Agnibho Mondal Date: Mon, 17 May 2021 06:32:41 +0000 (+0530) Subject: Allow PDF as report X-Git-Url: https://code.agnibho.com/repo?a=commitdiff_plain;h=e6d21c70277dc2b4bf0b3c3e0ce7a7f1622dca83;p=simpleipd.git Allow PDF as report --- 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