]>
Softwares of Agnibho - simpleipd.git/blob - www/report.php
2 require(dirname(__DIR__
)."/require.php");
3 if(checkAccess("report")!="all"){
4 header("Location: error.php");
7 if(!empty($_GET["pid"]) && !empty($_GET["form"])){
9 if(!empty($_POST["date"])){
10 if(!empty($_GET["id"])){
11 $db->editReport($_POST, $pid, $_GET["id"], $_POST["form"]);
14 $db->addReport($_POST, $pid, $_POST["form"]);
16 if(!empty($_GET["req"])){
17 $db->omitRequisition($_GET["req"]);
19 if(!empty($_GET["src"]) && $_GET["src"]=="index"){
20 header("Location: index.php");
24 header("Location: view.php?pid=".$_GET["pid"]);
28 if(!empty($_GET["time"])){
34 if(isSet($_GET["id"])){
35 $form=schema2form("forms/".$_GET["form"].".schema.json", $pid, $_GET["id"], "reports", null, $time);
38 $form=schema2form("forms/".$_GET["form"].".schema.json", null, null, null, null, $time);
45 <?php
include(CONFIG_LIB
."head.php");?
>
46 <title
>Reports
</title
>
49 <div
class="container">
50 <?php
include(CONFIG_LIB
."top.php");?
>
52 <div
class="card-body">
53 <h4
class="card-title">Add
New Report
</h4
>
55 <p id
='get-sample' style
='display:none'><?php
if(!empty($_GET["sample"])) echo $_GET["sample"];?
></p
>
56 <?php
if(!empty($_GET["req"])){echo "<p class='text-right'><a href='attachments.php?pid=".$pid."&req=".$_GET["req"]."'>Upload PDF instead</a></p>";}?
>
60 <?php
include(CONFIG_LIB
."foot.php");?
>