Server IP : 162.240.98.243 / Your IP : 18.118.24.30 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 : |
<?php session_start(); include("header.php"); include("patient_menu.php"); include("dbconnection.php"); if(isset($_POST[submit])) { { $sql ="INSERT INTO medi_condition_final(patientid,medicalcon,Specify,Status) values('$_POST[patientid]','$_POST[medicalcon]','$_POST[Specify]','$_POST[Status]')"; if($qsql = mysqli_query($con,$sql)) { // echo "<script>alert('Medication record inserted successfully...');</script>"; // echo "<script>window.location='medication2.php?patientid=$_GET[patientid]';</script>;"; // echo "</script>"; } else { echo mysqli_error($con); } } } if(isset($_GET[editid])) { $sql="SELECT * FROM immunization WHERE patientid='$_GET[editid]' "; $qsql = mysqli_query($con,$sql); $rsedit = mysqli_fetch_array($qsql); } if(isset($_SESSION[patientid])) { $sqlpatient = "SELECT * FROM patient WHERE patientid='$_SESSION[patientid]' "; $qsqlpatient = mysqli_query($con,$sqlpatient); $rspatient = mysqli_fetch_array($qsqlpatient); $readonly = " readonly"; } ?> <meta name=”viewport” content=”width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;” /> <style> .box{ display: none; } </style> <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> <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; } @keyframes spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } </style> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <script> $(document).ready(function(){ $("select").change(function(){ $(this).find("option:selected").each(function(){ var optionValue = $(this).attr("value"); if(optionValue){ $(".box").not("." + optionValue).hide(); $("." + optionValue).show(); } else{ $(".box").hide(); } }); }).change(); }); </script> <div class="content-wrapper"> <!-- Content Header (Page header) --> <div class="card-body"> <table id="example2" class="table table-bordered table-hover"> <thead> <tr> <div class='card-header d-flex p-0'> <ul class='nav nav-pills ml-auto p-2'> <th><strong>Medical Assessment</strong></th> <th><strong>Status</strong></th> <th><strong>Edit </strong></th> </tr> </thead> <?php $sql ="SELECT * FROM medi_condition_final WHERE patientid='$_GET[patientid]'"; $qsql = mysqli_query($con,$sql); while($rs = mysqli_fetch_array($qsql)) { echo " <tbody> <tr> <td> $rs[medicalcon] <B>$rs[Specify]</B></td> <td> $rs[Status]</td> <td><a href='edit_medicalcon.php?patientid=$rs[patientid]&medicalcoid=$rs[medicalcoid]'><i class='fa fa-pencil-square-o' aria-hidden='true' style='font-size:20px;'></i> </a></td> </tr> "; } ?> </tr> </thead> </tbody> <tfoot> </tfoot> </table> <!DOCTYPE html> <html> <head> <title>Demo Select Box With Search Option Using Jquery - AllPHPTricks.com</title> </head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <body> <div style = "display:none;" id = "loaderImg"> <div class="loader"> </div> </div> <form method="post" action="" id="myForm" name="submit" onSubmit="return validateform()"> <table width="532" border="3"> <table id="example2" class="table table-bordered table-hover"> <tbody> <?php $sqlpatient= "SELECT * FROM patient WHERE patientid='$_GET[patientid]'"; $qsqlpatient = mysqli_query($con,$sqlpatient); while($rspatient=mysqli_fetch_array($qsqlpatient)) { echo "<input type='hidden' name='patientid' id='patientid' value='$rspatient[patientid]'></td>"; } ?> </tr> <tr> <td>Medical Assessment</td> <td><select name="medicalcon"> <option value="">Medical Assessment</option> <option value="Diabetes" selected>Diabetes</option> <option value="Thyroid">Thyroid</option> <option value="Cholesterol">Cholesterol</option> <option value="Physical Injury">Physical Injury</option> <option value="Heart Condition">Heart Condition</option> <option value="Anemia">Anemia</option> <option value="Thalassemia">Thalassemia</option> <option value="HIV">HIV</option> <option value="Low Blood Pressure">Low Blood Pressure</option> <option value="High Blood Pressure">High Blood Pressure</option> <option value="Hypertension">Hypertension</option> <option value="Depression">Depression</option> <option value="Physically challenged">Physically challenged</option> <option value="Mentally challenged">Mentally challenged</option> <?php $sql1 ="SELECT * FROM patient WHERE patientid='$_GET[patientid]'"; $qsql1 = mysqli_query($con,$sql1); while($rspi1 = mysqli_fetch_array($qsql1)) { $sex=$rspi1['gendor']; if($sex == 'Female'){ echo" <option value='PCOD'>PCOD</option> <option value='Pregnancy'>Pregnancy</option>"; }else { echo""; } } ?> } <option value="Terminally ill">Terminally ill</option> <option value="Surgery-Treatment">History of Surgery & Treatment</option> </select> <p class="Surgery-Treatment box"> <label>Specify</label><input type="text" name="Specify"></p> </td> </tr> <td>Status</td> <td><select class="form-control" name="Status"> <option value="" disabled >Status </option> <option value="Active" selected>Active</option> <option value="Cured">Cured</option> </select></td> </tr> <tr> <td colspan="2" align="center"><button type="submit" name="submit" id="btn" class="btn btn-info" />ADD</button></td> </tr> <tr> <td colspan='2' align='center'> <button onclick="location.href='alg.php?<?php echo"patientid=$_GET[patientid]";?>'" type="button"> <span style="color:white"> Next Page</span></button></td> </tr> </tbody> </table> </form> </div></div></div> <script> document.getElementById('btn').addEventListener("click", function(){ this.classList.add("loading"); this.innerHTML = "Loading..."; }); </script> <script> $(function () { $("#example1").DataTable({ "responsive": true, "autoWidth": false, }); $('#example2').DataTable({ "paging": true, "lengthChange": false, "searching": false, "ordering": true, "info": true, "autoWidth": false, "responsive": true, }); }); </script>