From 647cf40eb5e7448dec7baff286694a7c82127cc6 Mon Sep 17 00:00:00 2001 From: Agnibho Mondal Date: Tue, 18 May 2021 12:43:50 +0530 Subject: [PATCH] Added redirection --- www/admission.php | 4 ++-- www/death.php | 4 ++-- www/history.php | 4 ++-- www/login.php | 2 +- www/nursing.php | 4 ++-- www/physician.php | 4 ++-- www/report.php | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/www/admission.php b/www/admission.php index 9109104..07a97c7 100644 --- a/www/admission.php +++ b/www/admission.php @@ -6,8 +6,8 @@ if(checkAccess("admission")!="all"){ } if(!empty($_POST["pid"]) && !empty($_POST["name"])){ $db->admit($_POST); - //header("Location: view.php?pid=".$_POST["pid"]); - //exit(); + header("Location: view.php?pid=".$_POST["pid"]); + exit(); } if(!empty($_GET["pid"])){ $pid=$_GET["pid"]; diff --git a/www/death.php b/www/death.php index 95f9143..7ad9fc7 100644 --- a/www/death.php +++ b/www/death.php @@ -8,8 +8,8 @@ if(!empty($_GET["pid"])){ $pid=$_GET["pid"]; if(!empty($_POST["date"]) && !empty($_POST["time"]) && !empty($_POST["diagnosis"])){ $db->setDead($pid, $_POST); - //header("Location: view.php?id=".$_GET["id"]); - //exit(); + header("Location: view.php?pid=".$_GET["pid"]); + exit(); } $form=schema2form("forms/death.schema.json", $pid, null, null, (object)["diagnosis"=>$db->getDiagnosis($pid)->fetchArray()["diagnosis"]]); } diff --git a/www/history.php b/www/history.php index 69d67c6..7dc5f62 100644 --- a/www/history.php +++ b/www/history.php @@ -4,8 +4,8 @@ if(!empty($_GET["pid"])){ $pid=$_GET["pid"]; if(!empty($_POST["cc"])){ $db->updateHistory($_POST, $pid); - //header("Location: view.php?pid=".$pid); - //exit(); + header("Location: view.php?pid=".$pid); + exit(); } } if(!empty($_GET["pid"])){ diff --git a/www/login.php b/www/login.php index 7689da3..d159b3b 100644 --- a/www/login.php +++ b/www/login.php @@ -17,7 +17,7 @@ if(!empty($_POST["username"]) && !empty($_POST["password"])){ $error="
Username or password is incorrect.
"; } } -//header("Location: view.php?id=".$_GET["id"]); +//header("Location: view.php?pid=".$_GET["pid"]); //exit(); ?> diff --git a/www/nursing.php b/www/nursing.php index a833ec1..56d3b1c 100644 --- a/www/nursing.php +++ b/www/nursing.php @@ -9,8 +9,8 @@ if(!empty($_GET["pid"])){ else{ $db->addNursing($_POST, $pid); } - //header("Location: view.php?id=".$_GET["id"]); - //exit(); + header("Location: view.php?pid=".$_GET["pid"]); + exit(); } if(isSet($_GET["id"])){ $form=schema2form("forms/nursing.schema.json", $pid, $_GET["id"], "nursing"); diff --git a/www/physician.php b/www/physician.php index b95ff67..b84645a 100644 --- a/www/physician.php +++ b/www/physician.php @@ -9,8 +9,8 @@ if(!empty($_GET["pid"])){ else{ $db->addPhysician($_POST, $pid); } - //header("Location: view.php?id=".$_GET["id"]); - //exit(); + header("Location: view.php?pid=".$_GET["pid"]); + exit(); } if(isSet($_GET["id"])){ $form=schema2form("forms/physician.schema.json", $pid, $_GET["id"], "physician"); diff --git a/www/report.php b/www/report.php index 7f8e2ce..d53f3ba 100644 --- a/www/report.php +++ b/www/report.php @@ -16,8 +16,8 @@ if(!empty($_GET["pid"]) && !empty($_GET["form"])){ if(!empty($_GET["req"])){ $db->omitRequisition($_GET["req"]); } - //header("Location: view.php?id=".$_GET["id"]); - //exit(); + header("Location: view.php?pid=".$_GET["pid"]); + exit(); } if(isSet($_GET["id"])){ $form=schema2form("forms/".$_GET["form"].".schema.json", $pid, $_GET["id"], "reports"); -- 2.39.2