Server IP : 162.240.98.243 / Your IP : 3.22.70.206 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/www/login.easenup.in/ |
Upload File : |
<?php session_start(); require_once("../dbconnection.php"); require_once('../DBManager.php'); require_once('../LoginManager.php'); $DisplayForm=True; $sql= "SELECT * FROM patient_invace WHERE prescriptionid='$_GET[prescriptionid]' AND discription='Consultant_fees' AND status='Paid'"; $qsql = mysqli_query($con,$sql); if($rh = mysqli_fetch_array($qsql)) { $DisplayForm=False; echo "<script>window.location='create_drinvace.php?prescriptionid=$rh[prescriptionid]&patientid=$_GET[patientid]'</script>"; } if($DisplayForm) { ?> <?php include("dbconnection.php"); require_once('../DBManager.php'); require_once('../patientmanager.php'); include("header.php"); include("dashboarddocument.php"); if(isset($_POST['signup'])) { $sql="UPDATE patient_invace SET discount='$_POST[discount]',grand_total='$_POST[grand_total]',paymentmode='$_POST[paymentmode]',status='$_POST[status]' WHERE invaceid='$_POST[invaceid]'"; if($qsql = mysqli_query($con,$sql)) { echo "<script>alert('Update successfully');</script><script>window.location='create_drinvace.php?prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]'</script>;</script>"; } } ?> <style> #topright { position: absolute; right: 0; top: 0; margin-top: 73px; margin-right: 30px; display: block; height: 70px; width: 70px; background: url(TRbanner.gif) no-repeat; text-indent: -999em; text-decoration: none; } #toprightj { position: absolute; right: 0; top: 0; margin-top: 73px; margin-right: 120px; display: block; height: 70px; width: 70px; background: url(TRbanner.gif) no-repeat; text-indent: -999em; text-decoration: none; } #toprightb { position: absolute; right: 0; top: 0; margin-top: 73px; margin-right: 200px; display: block; height: 70px; width: 70px; background: url(TRbanner.gif) no-repeat; text-indent: -999em; text-decoration: none; } .center { border: 1px solid grey; text-align:; } .center2 { border: 5px solid grey; text-align:; } </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <style> h2 { color: #4287f5; } a img { border: none; } #memo { padding-top: 50px; margin: 0 20px 0 60px; border-bottom: 1px solid #ddd; height: 150px; } #memo .logo { float: left; margin-right: 20px; } #memo .logo img { width: 150px; height: 100px; } #memo .company-info { float: right; text-align: right; } #memo .company-info > div:first-child { font-weight: bold; font-size: 22px; color: #1e73be; } #memo .company-info span { font-size: 11px; min-width: 20px; } </style> <div class="content-wrapper"> <div class='center'> <section id="memo"> <div class="logo"> <?php $narayan=LoginManager::currentUser(); $usertype=LoginManager::getUserTypeByuname("$narayan"); $sql ="SELECT * FROM site_users WHERE userno='$usertype'"; $qsql = mysqli_query($con,$sql); if($rs = mysqli_fetch_array($qsql)) { $sql ="SELECT * FROM hco WHERE adminid='$rs[entered_by]'"; $qsql = mysqli_query($con,$sql); if($rs = mysqli_fetch_array($qsql)) { $sql ="SELECT * FROM admin WHERE id='$rs[adminid]'"; $qsql = mysqli_query($con,$sql); if($ra = mysqli_fetch_array($qsql)) { echo" <img data-logo='' src='uploads/$rs[Logo]' /> </div> <div class='company-info'> <div>$ra[hsname]</div> <div> <span style='font-size:18px'>$rs[Street] | $rs[Locality]</br>$ra[EmailID] | $ra[numbers]</p></span> </div> "; } } } ?> <br> </section> <br> <?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)) { $sql1 ="SELECT * FROM patient WHERE patientid='$rs[patientid]'"; $qsql1 = mysqli_query($con,$sql1); if($rspi1 = mysqli_fetch_array($qsql1)) { $sqlpatient = "SELECT * FROM patient_invace WHERE prescriptionid='$rs[prescriptionid]' AND discription='Consultant_fees'"; $qsqlpatient = mysqli_query($con,$sqlpatient); if($rsp = mysqli_fetch_array($qsqlpatient)) { $sqlpatient1 = "SELECT * FROM site_users WHERE userno='$rsp[entered_by]'"; $qsqlpatient1 = mysqli_query($con,$sqlpatient1); if($rsn = mysqli_fetch_array($qsqlpatient1)) { echo" <div class='checkbox'><span style='float: left; font-size:19px;'>Date : $rsp[created_at]</span><span style='float: right; font-size:19px;'>Invoice Number :<b>$rsp[invaceid]</b></span></div> <br> <div class='checkbox'><span style='float: left; font-size:19px;'>UHID : $rspi1[patientid]</span><span style='float: right; font-size:19px;'>Name :<b>$rspi1[patientname]</b></span></div> <br> <div class='checkbox'><span style='float: left; font-size:19px;'>Age: $rspi1[dob]</span><span style='float: right; font-size:19px;'>SEX :<b>$rspi1[gendor]</b></span></div> <div class='card-body'> <table id='example2' class='table table-bordered table-hover'> <thead> <tr> <th><strong>Consultant Name </strong></th> <th><strong>Consultant fees</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)) { $sqlpatient2 = "SELECT * FROM patient_invace WHERE prescriptionid='$rs[prescriptionid]' AND discription='Consultant_fees'"; $qsqlpatient2 = mysqli_query($con,$sqlpatient2); if($rsn2 = mysqli_fetch_array($qsqlpatient2)) { $sqlpatient1 = "SELECT * FROM site_users WHERE userno='$rsn2[entered_by]'"; $qsqlpatient1 = mysqli_query($con,$sqlpatient1); if($rsn = mysqli_fetch_array($qsqlpatient1)) { $pricedue=$rsn2[pricetotal]; echo " <tbody> <tr> <td> $rsn[name]</td> <td> $pricedue</td> </tr> "; } } } ?> </tbody> <tfoot> </tfoot> </table> <?php $sqlpatient2 = "SELECT * FROM patient_invace WHERE prescriptionid='$_GET[prescriptionid]' AND discription='Consultant_fees'"; $qsqlpatient2 = mysqli_query($con,$sqlpatient2); if($rsn2 = mysqli_fetch_array($qsqlpatient2)) { echo" <form name='signup' method='post'> <div class='checkbox'><span style='float: right; font-size:19px;'>Total Bill : $rsn2[pricetotal]</span></div> <br> <input type='hidden' name='invaceid' value='$rsn2[invaceid]'> <input type='hidden' id='cBalance' value='$rsn2[pricetotal]'> <div class='checkbox'><span style='float: right; font-size:19px;'>Discount % :<input type='number' name='discount' id='chDiscount' size='2'></span></div> <br> <br> <div class='checkbox'><span style='float: right; font-size:19px;'>Grand Total : <input type='number' value='$rsn2[pricetotal]' name='grand_total' size='2' id='result' required></span></div> <BR><BR> <div class='checkbox'><span style='float: right; font-size:19px;'>Payment Mode : <select name='paymentmode'> <option value='Cash'>Cash</option> <option value='Card'>Card</option> <option value='UPI'>UPI</option> </select></span></div> <input type='hidden' name='status' value='Paid'> <input type='submit' name='signup' value='Pay'> </form> "; } ?> <br> <br> </div> <script> $(document).on("change keyup blur", "#chDiscount", function() { var main = $('#cBalance').val(); var disc = $('#chDiscount').val(); var dec = (disc / 100).toFixed(2); //its convert 10 into 0.10 var mult = main * dec; // gives the value for subtract from main value var discont = main - mult; $('#result').val(discont); }); </script> <?php } ?>