Server IP : 162.240.98.243 / Your IP : 3.129.210.102 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("dbconnection.php"); require_once('../DBManager.php'); require_once("../LoginManager.php"); require_once('../patientmanager.php'); if(isset($_POST[opdmedicine])) { PatientManager::Medicine("$_GET[prescriptionid]","$_GET[patientid]","$_POST[DRUGS]","$_POST[Category]","$_POST[Dose]","$_POST[Route]","$_POST[Frequency]","$_POST[duration]","$_POST[durationselect]","$_POST[potential]","$_POST[poa]","$_POST[status]","$_POST[Action]","$_POST[availability]","$_POST[batchno]","$_POST[entered_by]"); } if(isset($_POST[status])) { $sql ="UPDATE medicinede SET status='$_POST[status]' WHERE prescriptionid='$_GET[prescriptionid]' AND patientid='$_GET[patientid]' AND id='$_GET[id]'"; if($qsql = mysqli_query($con,$sql)) { echo "<script> window.history.go(-1)</script>"; } } ?> <script> $(document).ready(function(){ var x = 1; $("#newbtn").click(function () { $("table tr:first").clone().find("input").each(function () { $(this).val('').attr({ 'id': function (_, id) { return id + x }, 'name': function (_, name) { return name + x }, 'value': '' }); }).end().appendTo("table"); x++; }); $(document).on('click', 'button.deletebtn', function () { alert("Successfully Remove Frequiencies Medicine!"); $(this).closest('tr').remove(); return false; }); }); </script> <form class='form1' name="opdmedicine" method="post"> <head> <title></title> </head> <body> <script type="text/javascript"> window.onload = function () { //Build an array containing Customer records. var customers = new Array(); //Add the data rows. for (var i = 0; i < customers.length; i++) { AddRow(customers[i][0], customers[i][1], customers[i][2], customers[i][3], customers[i][4]); } }; function Add() { var DRUGS = document.getElementById("DRUGS"); var Dose = document.getElementById("Dose"); var Route = document.getElementById("Route"); var Frequency = document.getElementById("Frequency"); var Duration = document.getElementById("Duration"); AddRow(DRUGS.value, Dose.value, Route.value, Frequency.value, Duration.value,); DRUGS.value = ""; Dose.value = ""; Route.value = ""; Frequency.value = ""; Duration.value = ""; }; function Remove(button) { //Determine the reference of the Row using the Button. var row = button.parentNode.parentNode; var DRUGS = row.getElementsByTagName("TD")[0].innerHTML; if (confirm("Do you want to delete: " + DRUGS)) { //Get the reference of the Table. var table = document.getElementById("tblCustomers"); //Delete the Table row using it's Index. table.deleteRow(row.rowIndex); } }; function AddRow(DRUGS,Dose,Route,Frequency,Duration) { //Get the reference of the Table's TBODY element. var tBody = document.getElementById("tblCustomers").getElementsByTagName("TBODY")[0]; //Add Row. row = tBody.insertRow(-1); //Add Name cell. var cell = row.insertCell(-1); cell.innerHTML = DRUGS; var cell = row.insertCell(-1); cell.innerHTML = Dose; //Add Country cell. cell = row.insertCell(-1); cell.innerHTML = Route; cell = row.insertCell(-1); cell.innerHTML = Frequency; cell = row.insertCell(-1); cell.innerHTML = Duration; //Add Button cell. cell = row.insertCell(-1); var btnRemove = document.createElement("INPUT"); btnRemove.type = "button"; btnRemove.value = "Remove"; btnRemove.setAttribute("onclick", "Remove(this);"); cell.appendChild(btnRemove); } </script> <table class="table table-bordered table-hover" id="tblCustomers" cellpadding="0" cellspacing="0" border="1"> <thead> <tr> <th>Drug Name <br> Dose </th> <th>Route</th> <th>Route</th> <th>Route</th> <th>Action</th> </tr> <?php session_start(); include('../dbconnection.php'); $sql ="SELECT * FROM patient WHERE enterd_by='12571'"; $qsql = mysqli_query($con,$sql); while($rs = mysqli_fetch_array($qsql)) { echo"<tr><td><input type='text' value='$rs[patientid]'> <br><input type='text' value='$rs[patientid]'></td><td><input type='text ' value='$rs[patientid]'></td><td><input type='text ' value='$rs[patientid]'></td><td><input type='text ' value='$rs[patientid]'></td><td> <button type='button' class='deletebtn' title='Remove row'>Remove</button></td> </tr> "; } ?> </thead> <tbody> </tbody> <tfoot> <tr> <td><input type="text" name='DRUGS"+i+"'' id="DRUGS" /><br><input type="text" id="Dose" /></td> <td><input type="text" id="Route" /></td> <td><input type="text" id="Frequency" /></td> <td><input type="text" id="Duration" /> </td> <td><input type="button" onclick="Add()" value="Add new Row " /></td> </tr> </tfoot> </table> </body> </html> <input type="submit" value="Add" name="opdmedicine">