Server IP : 162.240.98.243 / Your IP : 3.15.226.120 Web Server : Apache System : Linux server.bti.yaw.mybluehostin.me 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : btiyawmy ( 1003) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/btiyawmy/public_html/login.easenup.in/ |
Upload File : |
<?php session_start(); require_once("../patientmanager.php"); require_once("../DBManager.php"); if(isset($_POST[BIPAPva])) { PatientManager::BIPAP("$_GET[prescriptionid]","$_GET[patientid]","$_POST[BIPAP]","$_POST[BIPAP_start]","$_POST[BIPAP_stop]","$_POST[duration]","$_POST[entered_by]"); } ?> <?php include("dbconnection.php"); if(isset($_GET[delid])) { $sql ="DELETE FROM BIPAP WHERE id='$_GET[delid]'"; $qsql=mysqli_query($con,$sql); if(mysqli_affected_rows($con) == 1) { $sql1 ="DELETE FROM patient_invace WHERE pagetype='$_GET[delid]'"; $qsql1=mysqli_query($con,$sql1); if(mysqli_affected_rows($con) == 1) { echo "<script>alert('Deleted successfully..');</script>"; } } } ?> <?php if(isset($_POST['updateBIPAP'])) { $sql6="UPDATE BIPAP SET BIPAP='$_POST[BIPAP]',BIPAP_stop='$_POST[BIPAP_stop]',duration='$_POST[duration]' WHERE patientid='$_GET[patientid]' AND prescriptionid='$_GET[prescriptionid]' AND BIPAP='on'"; if($qsql6 = mysqli_query($con,$sql6)) { echo "<script>alert('Update successfully');</script><script>window.location='nursingrecodstest.php?prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]'</script>;</script>"; $sql4 ="SELECT * FROM BIPAP WHERE patientid='$_GET[patientid]' AND prescriptionid='$_GET[prescriptionid]' AND id='$_POST[id]'"; $qsql4 = mysqli_query($con,$sql4); while($rpn = mysqli_fetch_array($qsql4)) { $date1 =$rpn[BIPAP_start]; $date2 =$rpn[BIPAP_stop]; $timestamp1 = strtotime($date1); $timestamp2 = strtotime($date2); $hour = abs($timestamp2 - $timestamp1)/(60*60); $d8=round($hour); if ($rpn[BIPAP_stop]=='') { if ($d8 < "1") { } } else { $total=$d8; } require_once('../DBManager.php'); require_once('../LoginManager.php'); $narayan=LoginManager::currentUser(); $usertype=LoginManager::getUserTypeByuname("$narayan"); $today = date('Y-m-d'); $sql1 ="SELECT * FROM site_users WHERE userno='$usertype'"; $qsql1 = mysqli_query($con,$sql1); if($re = mysqli_fetch_array($qsql1)) { $sql56 ="SELECT * FROM request_for_admission WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'"; $qsql56 = mysqli_query($con,$sql56); while($rs56 = mysqli_fetch_array($qsql56)) { $sql212 ="SELECT * FROM tarifrate WHERE tarifid='7' AND hospitalid='$re[entered_by]' AND wardid='$rs56[Ward]'"; $qsql212 = mysqli_query($con,$sql212); if($rs112 = mysqli_fetch_array($qsql212)) { $subbill=$total*$rs112[rate]; $msg=mysqli_query($con," INSERT INTO `patient_invace`(`invaceid`, `patientid`, `prescriptionid`, `discription`, `pagetype`, `TypeOfVisit`, `link`, `duration`, `ward_id`, `bed_id`, `pricetotal`, `discount`, `grand_total`, `paymentmode`, `status`, `entered_by`, `created_at`, `updated_at`) VALUES ('NULL','$_GET[patientid]','$_GET[prescriptionid]','BIPAP','$_POST[id]','TypeOfVisit','drinvace.php?prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]&id=$_POST[id]','$_POST[duration]','$_POST[ward_id]','$_POST[bed_id]','$subbill','discount','grand_total','paymentmode','status','$harilal','$created_at','$updated_at')"); { } } } } } } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content="Dashboard"> <meta name="keyword" content="Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina"> <title>BIPAP </title> <h3><i class="fa fa-angle-right"></i> BIPAP </h3> <body> <?php $DisplayForm=True; $sql5 ="SELECT * FROM BIPAP WHERE patientid='$_GET[patientid]' AND prescriptionid='$_GET[prescriptionid]' AND BIPAP='on'"; $qsql5 = mysqli_query($con,$sql5); if($rt5 = mysqli_fetch_array($qsql5)) { $DisplayForm=False; date_default_timezone_set('Asia/Kolkata'); $date = date('y-m-d h:i:s'); echo " <form name='updateBIPAP' method='post'>"; include("dbconnection.php"); require_once('../DBManager.php'); require_once('../LoginManager.php'); $narayan=LoginManager::currentUser(); $harilal=LoginManager::getUserTypeByuname("$narayan"); $sql1 ="SELECT * FROM site_users WHERE userno='$harilal'"; $qsql1 = mysqli_query($con,$sql1); if($re = mysqli_fetch_array($qsql1)) $transferbed="SELECT * FROM `request_for_admission` WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' "; $qTransferbed = mysqli_query($con,$transferbed); if($rTransferbed = mysqli_fetch_array($qTransferbed)) $sql41 ="SELECT * FROM BIPAP WHERE ward_id='$rTransferbed[Ward]' AND bed_id='$rTransferbed[Bed]'"; $qsql41 = mysqli_query($con,$sql41); if($rpn1 = mysqli_fetch_array($qsql41)) date_default_timezone_set('Asia/Kolkata'); $date = date('y-m-d h:i:s'); $date1 ="$rpn1[BIPAP_start]"; $date2 =$date; $timestamp1 = strtotime($date1); $timestamp2 = strtotime($date2); $hour = abs($timestamp2 - $timestamp1)/(60*60); $d8=round($hour); echo" <br> <input type='hidden' name='bedid' id='bedid' value='$rpn1[bed_id]'/> <input type='hidden' name='wardid' id='Ward' value='$rpn1[ward_id]'/> <input type='hidden' name='duration' id='duration' value='$d8'/> "; echo " <input type='hidden' name='id' value='$rt5[id]'> <input type='hidden' name='BIPAP_stop' value='20$date'> <script> var today = new Date(); var time = today.getHours() + ':' + today.getMinutes() + ':' + today.getSeconds(); document.getElementById('myCheckBIPAP').value = time; </script> <button type='submit' name='updateBIPAP'>Stop</button> </form>"; } if($DisplayForm) { ?> <form name="BIPAPva" method="post"> <input type='hidden' value='on' name='BIPAP'> <?php date_default_timezone_set('Asia/Kolkata'); $date = date('y-m-d h:i:s'); echo" <input type='hidden' name='BIPAP_start' value='20$date'> "; ?> <script> var today = new Date(); var time = today.getHours() + ':' + today.getMinutes() + ':' + today.getSeconds(); document.getElementById('myCheckBIPAPstart').value = time; </script> <button type='submit' name='BIPAPva'>Start</button> </form> <?php } ?> <style> form{ margin: 20px 0; } form input, button{ padding: 5px; } table{ width: 100%; margin-bottom: 20px; border-collapse: collapse; } table, th, td{ border: 1px solid #cdcdcd; } table th, table td{ padding: 10px; text-align: left; } <style> table{ border: solid 1px gray; width: 100%; } </style> </head> <div id="container"> <table border="1" class='table table-hover table-bordered'> <tbody> <tr> <th><div align="center">Start At <br> (YYYY-MM-DD)</div></th> <th><div align="center">Stop At <br> (YYYY-MM-DD)</div></th> <th><div align="center">Duration </div></th> <th><div align="center">Created By</div></th> <th><div align="center">Action</div></th> </tr> </tbody> <?php include("dbconnection.php"); require_once('../DBManager.php'); require_once('../LoginManager.php'); $narayan=LoginManager::currentUser(); $harilal=LoginManager::getUserTypeByuname("$narayan"); $sql1 ="SELECT * FROM site_users WHERE userno='$harilal'"; $qsql1 = mysqli_query($con,$sql1); while($re = mysqli_fetch_array($qsql1)) { $sql4 ="SELECT * FROM BIPAP WHERE patientid='$_GET[patientid]' AND prescriptionid='$_GET[prescriptionid]'"; $qsql4 = mysqli_query($con,$sql4); while($rpn = mysqli_fetch_array($qsql4)) { $date1 =$rpn[BIPAP_start]; $date2 =$rpn[BIPAP_stop]; $timestamp1 = strtotime($date1); $timestamp2 = strtotime($date2); $hour = abs($timestamp2 - $timestamp1)/(60*60); $d8=round($hour); echo " <tbody> <tr> <td> $rpn[BIPAP_start]</td> <td> $rpn[BIPAP_stop]</td> <td>"; if ($rpn[BIPAP_stop]=='') { if ($d8 < "1") { } } else { echo"$d8 <input type='hidden' name='duration' id='duration' value='$d8'/>"; } echo"</td> <td> $re[name]</td> <td style='width:25%'><a href='edit_showBIPAP.php?prescriptionid=$rpn[prescriptionid]&patientid=$rpn[patientid]&id=$rpn[id]' style='width:15%'><i class='fa fa-pencil-square-o' aria-hidden='true' style='font-size:20px;width:10%'></i></a> | <a href='nursingrecodstest.php?prescriptionid=$rpn[prescriptionid]&patientid=$rpn[patientid]&delid=$rpn[id]' style='width:15%'><i class='fa fa-trash-o' aria-hidden='true' style='font-size:20px;color:red;width:10%'></i></a></td> </tr> "; } } ?> </tbody> <tfoot> </tfoot> </table> </div>