Server IP : 162.240.98.243 / Your IP : 18.117.152.67 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('../DBManager.php'); require_once('../LoginManager.php'); require_once('../patientmanager.php'); include 'dashboarddocument.php'; include 'header.php'; include("dbconnection.php"); $DisplayForm=True; $today = date('Y-m-d'); $narayan=LoginManager::currentUser(); $harilal=LoginManager::getUserTypeByuname("$narayan"); $sql1 ="SELECT * FROM site_users WHERE userno='$harilal'"; $qsql1 = mysqli_query($con,$sql1); while($rh1 = mysqli_fetch_array($qsql1)) { $sql ="SELECT * FROM discharge WHERE hospital_id='$rh1[entered_by]' AND patientid='$_GET[patientid]' AND date(admissiondate) = '$today' AND typevisit='Opd_Emergency' AND prescriptionid='$_GET[prescriptionid]' OR hospital_id='$rh1[entered_by]' AND patientid='$_GET[patientid]' AND date(admissiondate) = '$today' AND typevisit='OPD' AND prescriptionid='$_GET[prescriptionid]'"; $qsql = mysqli_query($con,$sql); if($rh = mysqli_fetch_array($qsql)) { $DisplayForm=False; echo "<script>window.location='opdtransfer.php?prescriptionid=$rh[prescriptionid]&patientid=$rh[patientid]'</script>"; } } if($DisplayForm) { ?> <?php //Code for Registration if(isset($_POST['Add'])) { $updated_at=date("Y-m-d H:i:s"); $datetime=$updated_at; $sql4 ="UPDATE transferbed SET Discharge='$datetime' WHERE towords='$_POST[bedid]' AND prescriptionid='$_POST[prescriptionid]'"; $BedDetailCharge="INSERT INTO `BedDetailCharge`(`prescriptionid`, `patientid`, `ward`, `bed`, `duration`, `charge`,`totalAmt`, `created_by`, `updated_by`) VALUES ('$_GET[prescriptionid]','$_GET[patientid]','$_POST[wardid]','$_POST[bedid]','$_POST[Duration]','$_POST[price]','$_POST[amount]','$datetime','$updated_at')"; if($qsql = mysqli_query($con,$sql4)){ if($qsql = mysqli_query($con,$BedDetailCharge)){ echo "<script>alert('Add Successfully');</script>"; echo "<script>window.location='billingset.php?prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]'</script>"; } } else { echo "Sorry, there was an error uploading your file."; } } ?> <style> .center { border: 1px solid grey; text-align:; } .center2 { border: 5px solid grey; text-align:; } input.largerCheckbox { width: 20px; height: 20px; } </style> <div class='content-wrapper'> <table id="myTable" class="table table-bordered table-hover"> <thead> <tr> <th><strong>Date & Time</strong></th> <th><strong>Wards </strong></th> <th><strong>Bed </strong></th> <th><strong>Duration </strong></th> <th><strong> <section class="content-header">Action</section> </strong></th> </tr> </thead> <?php include("dbconnection.php"); $sql ="SELECT * FROM addaspatient WHERE patientid='$_GET[patientid]' AND prescriptionid='$_GET[prescriptionid]'"; $qsql = mysqli_query($con,$sql); if($rs = mysqli_fetch_array($qsql)) { $sqlpatient = "SELECT * FROM transferbed WHERE prescriptionid='$rs[prescriptionid]' ORDER BY srno ASC"; $qsqlpatient = mysqli_query($con,$sqlpatient); while($rsp = mysqli_fetch_array($qsqlpatient)) { $sqlpatient1 = "SELECT * FROM bedindex WHERE bedid='$rsp[towords]'"; $qsqlpatient1 = mysqli_query($con,$sqlpatient1); while($rsn = mysqli_fetch_array($qsqlpatient1)) { $sqlpatient12 = "SELECT * FROM ward WHERE wardid='$rsn[wardid]'"; $qsqlpatient12 = mysqli_query($con,$sqlpatient12); while($rsn12 = mysqli_fetch_array($qsqlpatient12)) { $sqlBedDetailCharge = "SELECT * FROM BedDetailCharge WHERE prescriptionid='$rs[prescriptionid]' AND patientid='$_GET[patientid]' AND ward='$rsn[wardid]'"; $qsqlBedDetailCharge = mysqli_query($con,$sqlBedDetailCharge); $rBedDetailCharge = mysqli_fetch_array($qsqlBedDetailCharge); echo " <tbody> <tr> <td> $rsp[datetime]</td> <td> $rsn12[ward_type]-$rsn12[ward_name] <br> <i class='fa fa-inr'></i>"; ?> <?php if($rBedDetailCharge[totalAmt]==''){ echo " $rsn[price] /- <input class='price' id='price' name='price$rsn[bedid]' type='hidden' value='$rsn[price]'/> "; }else{ echo $rBedDetailCharge[totalAmt].' /-' ; echo ""; } ?> <?php echo "<input class='price' id='price' name='price$rsn[bedid]' type='hidden' value='$rBedDetailCharge[totalAmt]'/> <div id='result$rsn[bedid]'></div> </td> <td>$rsn[bedname]</td> <td> "; ?><?php if($rBedDetailCharge[duration]==''){ echo "1 Day <input class='duration' id='duration' name='duration$rsn[bedid]' type='hidden' value='1'/> "; }else{ echo $rBedDetailCharge[duration].' Day' ; echo " <input class='duration' id='duration' name='duration$rsn[bedid]' type='hidden' value='$rBedDetailCharge[duration]'/>"; } ?> <?php echo"</td> <td><section class='content-header'> <a href='#'>Remove</a></section></td> </tr> ";?> <?php } } } } ?> </tbody> <tfoot> <tr><td><i class='fa fa-inr'></i> <b> <span align='right' id="val"></span> /-</b></td></tr> <tr> <td> </td> </tr> </tfoot> </table> <form name="Add" enctype="multipart/form-data" method="post" > <!-- Content Header (Page header) --> <table id="example2" class="table table-bordered table-hover"> <?php session_start(); require_once('../LoginManager.php'); require_once('../DBManager.php'); $sql ="SELECT * FROM addaspatient WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'"; $qsql = mysqli_query($con,$sql); if($rs = mysqli_fetch_array($qsql)) { if(IPD==$rs[typevisit]) { ?> <tr> <td width='50%'> Ward </td><td> <?php $narayan=LoginManager::currentUser(); $usertype=LoginManager::getUserTypeByuname("$narayan"); include("dbconnection.php"); $sql ="SELECT * FROM request_for_admission WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'"; $qsql = mysqli_query($con,$sql); while($rs = mysqli_fetch_array($qsql)) { $sql21 ="SELECT * FROM ward WHERE wardid='$rs[Ward]'"; $qsql21 = mysqli_query($con,$sql21); $rs11 = mysqli_fetch_array($qsql21); $sql22 ="SELECT * FROM bedindex WHERE bedid='$rs[Bed]'"; $qsql22 = mysqli_query($con,$sql22); while($rs12 = mysqli_fetch_array($qsql22)) { $sql1 ="SELECT * FROM site_users WHERE userno='$harilal'"; $qsql1 = mysqli_query($con,$sql1); $rh1 = mysqli_fetch_array($qsql1); $sql2 ="SELECT * FROM ward WHERE adminid='$rh1[entered_by]'"; $qsql2 = mysqli_query($con,$sql2); $rh2 = mysqli_fetch_array($qsql2); echo "<input type='text' value='$rs11[ward_type] - $rs11[ward_name]' name='ward_name' id='ward_name' /> <input type='hidden' value='$rs11[wardid]' name='wardid' id='wardid' /> "; } } ?> </td></tr> <?php $narayan=LoginManager::currentUser(); $usertype=LoginManager::getUserTypeByuname("$narayan"); include("dbconnection.php"); $sql ="SELECT * FROM request_for_admission WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'"; $qsql = mysqli_query($con,$sql); while($rs = mysqli_fetch_array($qsql)) { $sql21 ="SELECT * FROM ward WHERE wardid='$rs[Ward]'"; $qsql21 = mysqli_query($con,$sql21); if($rs11 = mysqli_fetch_array($qsql21)) { $sql22 ="SELECT * FROM bedindex WHERE bedid='$rs[Bed]'"; $qsql22 = mysqli_query($con,$sql22); while($rs12 = mysqli_fetch_array($qsql22)) { echo" <tr id='pavnid'> <td width='50%'>Bed</td> <td width='50%'> <input type='text' placeholder='Bed No.' value='$rs12[bedname]' name='Bed'> <input type='hidden' placeholder='Bed No.' value='$rs12[bedid]' name='bedid'> <input type='hidden' value='$rs12[price]' name='price' id='price1'> <br> </td> </tr> "; } } } ?> <?php } } ?> <tr><td>Duration</td><td><input type='text' name='Duration' id='Duration1'> <input type="hidden" name="amount" id="amount" readonly /></td></tr> </table> <button type="submit" name="Add"><span style="color:WHITE">Add</SPAN></button> <script> function loadbedva(bedid) { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("pavnid").innerHTML = this.responseText; } }; xmlhttp.open("GET","loadbed.php?bedid="+bedid,true); xmlhttp.send(); } </script> <?php } ?> <script> var table = document.getElementById("myTable"), sumVal = 0; $(".price").each(function() { sumVal += Number($(this).val()); }); document.getElementById("val").innerHTML = "" + sumVal; console.log(sumVal); $('#price1, #Duration1').keyup(function(){ var price = parseFloat($('#price1').val()) || 0; var Duration = parseFloat($('#Duration1').val()) || 0; $('#amount').val(price * Duration); }); </script>