Server IP : 162.240.98.243 / Your IP : 3.141.4.179 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 'workdeskmenu.php'; include 'header.php'; include("dbconnection.php"); ?> <div class='content-wrapper'> <!-- Content Header (Page header) --> <section class='content-header'> <script> function myFunction() { var checkBox = document.getElementById("myCheck"); var text = document.getElementById("text"); if (checkBox.checked == true){ text.style.display = "block"; } else { text.style.display = "none"; } } function myFunction2() { var checkBox = document.getElementById("myCheck2"); var text = document.getElementById("text2"); if (checkBox.checked == true){ text.style.display = "block"; } else { text.style.display = "none"; } } </script> <!DOCTYPE html> <html lang="en"> <head> <link rel="stylesheet" href="select2.min.css" /> <style> /* Automatic Serial Number Row */ .css-serial { counter-reset: serial-number; /* Set the serial number counter to 0 */ } .css-serial td:first-child:before { counter-increment: serial-number; /* Increment the serial number counter */ content: counter(serial-number); /* Display the counter */ } </style> <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>In House Patient</title> <body> <h3><i class="fa fa-angle-right"></i> OPD </h3> </head> <div id="container"> </div> <div id="text" style="display:none" > <form action="/Admission_and_Discharge.php" method='GET'> <input type="date" onchange="dateload(this.value)"> </form></div> <div class="checkbox"> <input name="Addiction" id="myCheck2" onclick="myFunction2()" class="shopitem-list" type="checkbox"><span>Custom Date </span> </div> <div id="text2" style="display:none" > <form action="" method="GET"> <div class="row"> <div class="col-md-4"> <div class="form-group"> <label>From Date</label> <input type="date" name="from_date" value="<?php if(isset($_GET['from_date'])){ echo $_GET['from_date']; } ?>" class="form-control"> </div> </div> <div class="col-md-4"> <div class="form-group"> <label>To Date</label> <input type="date" name="to_date" value="<?php if(isset($_GET['to_date'])){ echo $_GET['to_date']; } ?>" class="form-control"> </div> </div> <div class="col-md-4"> <div class="form-group"> <br> <button type="submit" class="btn btn-primary">Apply</button> </div> </div> </div> </form> </div> <button style='height:40px;width:200px' onclick="location.href='workdesk_opd1.php'" type="button"> <span style="color:white"> Reset</span></button> </section> <H2 align='right' id="val"></H2> <table id="table" class="order-table table table-bordered table-hover css-serial"> <tr> <th>SR No</th> <th>Admitted Under</th> <th>Fee</th> <th>Patient Details</th> <th>Details </th> </tr><tbody> <?php include("dbconnection.php"); require_once('../DBManager.php'); require_once('../LoginManager.php'); $narayan=LoginManager::currentUser(); $usertype=LoginManager::getUserTypeByuname("$narayan"); $sql1 ="SELECT * FROM site_users WHERE userno='$usertype'"; $qsql1 = mysqli_query($con,$sql1); while($re = mysqli_fetch_array($qsql1)){ if(isset($_GET['from_date']) && isset($_GET['to_date'])) { $from_date = $_GET['from_date']; $to_date = $_GET['to_date']; } $showRecordPerPage = 50; if(isset($_GET['page']) && !empty($_GET['page']) ){ $currentPage = $_GET['page']; }else{ $currentPage = 1; } $startFrom = ($currentPage * $showRecordPerPage) - $showRecordPerPage; $totalEmpSQL = "SELECT * FROM discharge WHERE (hospital_id='$re[entered_by]') OR (hospital_id='$re[entered_by]' AND date(admissiondate) BETWEEN '$from_date' AND '$to_date' AND (typevisit='OPD' OR typevisit='Opd_Emergency' OR typevisit='OPD_Routine' ))"; $allEmpResult = mysqli_query($con, $totalEmpSQL); $totalEmployee = mysqli_num_rows($allEmpResult); $lastPage = ceil($totalEmployee/$showRecordPerPage); $firstPage = 1; $nextPage = $currentPage + 1; $previousPage = $currentPage - 1; $empSQL = "SELECT `id`, `prescriptionid`, `patientid`, `hospital_id`, `typevisit`, `status`, `COdischarge`, `Advice_Discharge`, `Detail_Note`, `created_by`, `admissiondate`, `entered_by`, `created_at`, `updated_at` FROM `discharge` WHERE `hospital_id`='$re[entered_by]' ORDER BY `id` DESC LIMIT $startFrom, $showRecordPerPage "; $empResult = mysqli_query($con, $empSQL); while($emp = mysqli_fetch_assoc($empResult)) { $sqlpatient = "SELECT * FROM patient_invace WHERE prescriptionid='$emp[prescriptionid]' AND discription='Consultant_fees' AND grand_total!='grand_total'"; $qsqlpatient = mysqli_query($con,$sqlpatient); while($rsp = mysqli_fetch_array($qsqlpatient)) { $sql4 ="SELECT * FROM patient WHERE patientid='$emp[patientid]'"; $qsql4 = mysqli_query($con,$sql4); while($rp = mysqli_fetch_array($qsql4)) { ?> <tr> <td> </td> <td> </b><?php echo $re['name']; ?> </td> <td><?php echo $rsp['grand_total'] ?> </td> <td><b>UHID :</B><?php echo $rp['patientid'] ?> <br> <b>Patient Name </b><br><?php echo $rp['patientname'] ?></td> <td><a href='drinvace.php?prescriptionid=$rs[prescriptionid]&patientid=$rs[patientid]'>View</td> </tr> <?php }} } } ?> </tbody> </table> <nav aria-label="Page navigation"> <ul class="pagination"> <?php if($currentPage != $firstPage) { ?> <li class="page-item"> <a class="page-link" href="?from_date=<?php echo $from_date; ?>&to_date=<?php echo $to_date; ?>&page=<?php echo $firstPage ?>" tabindex="-1" aria-label="Previous"> <span aria-hidden="true">First</span> </a> </li> <?php } ?> <?php if($currentPage >= 2) { ?> <li class="page-item"><a class="page-link" href="?from_date=<?php echo $from_date; ?>&to_date=<?php echo $to_date; ?>&page=<?php echo $previousPage ?>"><?php echo $previousPage ?></a></li> <?php } ?> <li class="page-item active"><a class="page-link" href="?from_date=<?php echo $from_date; ?>&to_date=<?php echo $to_date; ?>&page=<?php echo $currentPage ?>"><?php echo $currentPage ?></a></li> <?php if($currentPage != $lastPage) { ?> <li class="page-item"><a class="page-link" href="?from_date=<?php echo $from_date; ?>&to_date=<?php echo $to_date; ?>&page=<?php echo $nextPage ?>"><?php echo $nextPage ?></a></li> <li class="page-item"> <a class="page-link" href="?from_date=<?php echo $from_date; ?>&to_date=<?php echo $to_date; ?>&page=<?php echo $lastPage ?>" aria-label="Next"> <span aria-hidden="true">Last</span> </a> </li> <?php } ?> </ul> </nav> <script> var table = document.getElementById("table"), sumVal = 0; for(var i = 1; i < table.rows.length; i++) { sumVal = sumVal + parseInt(table.rows[i].cells[2].innerHTML); } document.getElementById("val").innerHTML = "Total Fee = " + sumVal; console.log(sumVal); </script> </div> <?php if(isset($_SESSION[doctorid])) { ?> <hr> <table> <tr> <td> <div align="center"><strong><a href="prescription.php?patientid=<?php echo $_GET[patientid]; ?>&appid=<?php echo $rsappointment[appointmentid]; ?>">Add Prescription records</a></strong></div> </td> </tr> </table> <script> $(function () { $("#example1").DataTable({ "responsive": true, "autoWidth": false, }); $('#example2').DataTable({ "paging": true, "lengthChange": false, "searching": false, "ordering": true, "info": true, "autoWidth": false, "responsive": true, }); }); </script> <?php } ?> <script> function drugload(drid) { 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("divdr").innerHTML = this.responseText; } }; xmlhttp.open("GET","loaddrji.php?drid="+drid,true); xmlhttp.send(); } </script> <script> function dateload(dateid) { 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("divdr").innerHTML = this.responseText; } }; xmlhttp.open("GET","loaddate.php?dateid="+dateid,true); xmlhttp.send(); } </script> <script> $(document).ready(function () { $('select12').selectize({ sortField: 'text' }); }); </script>