Mr.Fn4ticHz Shell
Server IP : 162.240.98.243  /  Your IP : 3.16.212.217
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/FO/Patient/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/btiyawmy/www/login.easenup.in/FO/Patient/BedCharge.php
 <?php
 if(isset($_GET['DelId'])){
   
    $sql4 ="DELETE FROM `transferbed` WHERE srno='$_GET[DelId]'";
    if($qsql = mysqli_query($con,$sql4))
		{
		    
    echo "<script>alert('Delete successfully');</script><script>window.history.go(-1)</script>;</script>";
  } 
}
 ?>
 <br>
 <table id="example2"  id ="demo" class="table table-bordered table-hover">
                  <thead>
                  <tr>
               
                    
     <th>Date & Time</th>
    
                         <th>Invoice</th>
                         <th>Paid Amount</th>
                         <th>Due Amount</th>
                         
                         <th>Action</th>
                                </tr>
                  </thead>
                  
               
                 
<tbody>
  
    
  <?php
    $hospital_course_Bill=$con->query("SELECT * FROM `BillChargeDueAmt` WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'  ORDER BY `id` DESC");
    while($rowBill=$hospital_course_Bill->fetch_assoc()){
    $DueAmt=round($rowBill['DueAmt']);
    
    
    ?>    
 <tr>
        <td><?php echo $rowBill['createdBy']; ?></td>
        
        <td><?php echo $rowBill['invoice']; ?></td>
         <td><?php echo $rowBill['Pay']; ?></td>
        <td><?php echo $DueAmt; ?></td>
        <td>
            <?php 
            if($rowBill['DueAmt']=='0'){
                echo "Paid";
            ?>
            
               <?php }else{?>
             <a href='Print_Bedinvoice.php?prescriptionid=<?php echo $_GET['prescriptionid']; ?>&patientid=<?php echo $_GET['patientid']; ?>&invoice=<?php echo $rowBill['invoice']; ?>&id=<?php echo $rowBill['id'] ?>'>View</a>
        
            
        <?php    } ?>
            
            </td>
    </tr>    
    
    
 <?php } ?>   
   </tbody>
</table> 
 <br>
  <table class="table table-bordered table-hover">
                  <thead>
                  <tr>
             <th><strong>Transfer In</strong></th>
             <th><strong>Transfer Out</strong></th>
          <th><strong>Towards </strong></th>
          <th><strong>Day </strong></th>
           <th><strong>Charge </strong></th>
            <th><strong>Amount </strong></th>
       <th><strong>    <section class="content-header">Action</section> </strong></th>             
        </tr>
     
                  </thead>
<?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))
	{
	  
      $date1 =$rsp['datetime']; 
      $date2 =$rsp['Discharge'];
      $datetime= date("Y-m-d H:i:s");
      $timestamp1 = strtotime($date1);
      $timestamp2 = strtotime($date2);
      $day = round(abs($timestamp2 - $timestamp1)/(60*60*24));
      //echo $day; 
    //     $diff = abs(strtotime($date2) - strtotime($date1)); 
	   // $years   = floor($diff / (365*60*60*24)); 
    //     $months  = floor(($diff - $years * 365*60*60*24) / (30*60*60*24)); 
    //     $day    = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));  
	    
	    	if($day=='0'){
              	$amt=$rsn['price']*1;
              	}elseif($day==$rsp['day']){
              	  $amt=$rsn['price']*$rsp['day'];
              	}
              	else {
              	    $amt=$rsn['price']*1;
                } 
    // $sqlPatientDay="SELECT prescriptionid ,DATEDIFF('$rsp[Discharge]','$rsp[datetime]') AS BedDays FROM transferbed Where prescriptionid='$rs[prescriptionid]'  GROUP BY prescriptionid";
     $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>&nbsp;$rsp[datetime]</td>
            <td>&nbsp;$rsp[Discharge]</td>
              		<td>&nbsp;$rsn12[ward_type]-$rsn12[ward_name]-$rsn[bedname] <br></td>
              		<td>";
              		?><?php 
              	if($day=='0'){
              	echo '1 day';
              	}elseif($day==$rsp['day']){
              	   echo $day.' days';
              	}
              	else {
              	    echo "1 day";
                } 
              	?>
              	<?php	echo"</td>
              	
              	<td>$rsn[price]</td>
              	<td>$amt
              	<input type='hidden' name='amt' id='amt' class='amt' value='$amt'/>
              	
              	</td>
              	
              						<td>
              						
              						
              						<section class='content-header'> 
              						
              						<a href='BillingSet.php?prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]&DelId=$rsp[srno]'><i class='fa fa-trash-o' aria-hidden='true' style='color:red; font-size:20px;'></i></a>"  ; 
              						
              						?>
              						
              						
              						
              						
              						<?php 
              					echo "</section>
              						
              						
              						
              						</td>
          </tr>                   
          
          ";
}
}
}
}
?>  
<?php
$Hospital=$con->query("SELECT * FROM `hospital_bed_Bill` Where prescriptionid=$_GET[prescriptionid] AND patientid=$_GET[patientid]");
$RowHosBill=$Hospital->fetch_assoc();
if($RowHosBill['TotalAmt']==$_POST['TotalAmount']){
?>

 <tr>
    
      <td>Total Amount :- <i class='fa fa-inr'></i>   
 <b><span align='right' id="Amtval"></span> /-</b>
 <input type='hidden' name='TotalAmount' id='Amtresult'/>
 
 </td></tr>

     
 <tr><td><a href='BedChargePay.php?prescriptionid=<?php echo $_GET['prescriptionid'] ?>&patientid=<?php echo $_GET['patientid'] ?>' class='btn btn-info'>Pay</a>
</td></tr>
 <?php }else{ ?>

  <tr>
      <td>Due Amount :- <i class='fa fa-inr'></i>   
    <b> <?php echo $RowHosBill['DueAmt'] ?> /-</b></td>
  </tr>
 <tr><td><a href='BillChargeDuePay.php?prescriptionid=<?php echo $_GET['prescriptionid'] ?>&patientid=<?php echo $_GET['patientid'] ?>&invoice=<?php echo $RowHosBill['invoice']; ?>' class='btn btn-info'>Pay</a>
</td></tr>
<?php } ?>





</tbody>
  <tfoot>
          </tfoot>
        </table>
        
        <br>
      
    <a href="#">

     
 <script>
     
          var table = document.getElementById("myTable"), sumVal2 = 0
            
            $(".amt").each(function() {
                    sumVal2 += Number($(this).val());
                    });
            document.getElementById("Amtval").innerHTML = "" + sumVal2;
            console.log(sumVal2);
            $('#Amtresult').val(sumVal2);
           // $('#cBalance').val(sumVal2);
          
     

     

       
    </script>

Anon7 - 2022
AnonSec Team