From: Agnibho Mondal Date: Sun, 23 May 2021 15:10:43 +0000 (+0530) Subject: Time from requisition X-Git-Url: https://code.agnibho.com/repo?a=commitdiff_plain;h=65c7f48144167003240282cdc4376a33c43e581e;p=simpleipd.git Time from requisition --- diff --git a/lib/functions.php b/lib/functions.php index 782a5d6..24bcef9 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -1,5 +1,5 @@ $field."'"; $value2=$data->$field; } + elseif(!empty($time) && $field=="date"){ + $value="value='".date("Y-m-d", $time)."'"; + $value2=date("Y-m-d", $time); + } + elseif(!empty($time) && $field=="time"){ + $value="value='".date("H:i", $time)."'"; + $value2=date("H:i", $time); + } else{ $value=""; $value2=""; diff --git a/www/antibiogram.php b/www/antibiogram.php index 09c84f6..a56f92e 100644 --- a/www/antibiogram.php +++ b/www/antibiogram.php @@ -47,9 +47,13 @@ if(!empty($_GET["pid"]) && !empty($_GET["form"])){ $sample="value='".$data->sample."'"; $organism="value='".$data->organism."'"; } - elseif(!empty($_GET["sample"])){ - $date=""; - $sample="value='".$_GET["sample"]."'"; + elseif(!empty($_GET["time"]) || !empty($_GET["sample"])){ + if(!empty($_GET["time"])){ + $date="value='".date("Y-m-d", $_GET["time"])."'"; + } + if(!empty($_GET["sample"])){ + $sample="value='".$_GET["sample"]."'"; + } $organism=""; } else{ diff --git a/www/index.php b/www/index.php index 05d46f2..9900dbb 100644 --- a/www/index.php +++ b/www/index.php @@ -12,10 +12,10 @@ while($arr=$reqs->fetchArray()){ $pid=$arr["pid"]; if(!empty($arr["form"])){ if($arr["form"]=="report-cs"){ - $test="".$arr["test"].""; + $test="".$arr["test"].""; } else{ - $test="".$arr["test"].""; + $test="".$arr["test"].""; } } else{ diff --git a/www/report.php b/www/report.php index 8f13094..bb969ae 100644 --- a/www/report.php +++ b/www/report.php @@ -25,11 +25,17 @@ if(!empty($_GET["pid"]) && !empty($_GET["form"])){ exit(); } } + if(!empty($_GET["time"])){ + $time=$_GET["time"]; + } + else{ + $time=null; + } if(isSet($_GET["id"])){ - $form=schema2form("forms/".$_GET["form"].".schema.json", $pid, $_GET["id"], "reports"); + $form=schema2form("forms/".$_GET["form"].".schema.json", $pid, $_GET["id"], "reports", null, $time); } else{ - $form=schema2form("forms/".$_GET["form"].".schema.json"); + $form=schema2form("forms/".$_GET["form"].".schema.json", null, null, null, null, $time); } } ?> diff --git a/www/vitek.php b/www/vitek.php index 127a43c..a72ee20 100644 --- a/www/vitek.php +++ b/www/vitek.php @@ -13,6 +13,12 @@ if(!empty($_GET["sample"])){ else{ $sample=""; } +if(!empty($_GET["time"])){ + $time="&time=".$_GET["time"]; +} +else{ + $time=""; +} if(!empty($_GET["src"]) && $_GET["src"]=="index"){ $src="&src=index"; } @@ -33,10 +39,10 @@ else{

Type of Organism