UnknownSec Bypass
403
:
/
var
/
www
/
zenithentcare
/
cpanel
/ [
drwxrwxr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
add_user_form.php
<?php include "top.php";?> <div id="layoutSidenav_content"> <div class="container-fluid px-4"> <h1 class="mt-4">Add Appointment</h1> <ol class="breadcrumb mb-4 justify-content-between"> <a class="btn btn-primary" href="list_appointment.php">Appointment List</a> <!-- Trigger/Open The Modal --> <!-- <div align="cemter"><button class="btn btn-warning" id="myBtn"><i class="fa fa-search"></i> Find Old Patient</button> </div> --> <div class="row"> <div class="col-lg-12 pt-3"> <div class="card shadow-lg border-0 rounded-lg mb-5"> <div class="card-body"> <input type="hidden" class="form-control1" id="hdid" name="hdid"> <input type="hidden" class="form-control1" id="hdappid" name="hdappid"> <div class="row"> <div class="row"> <div class="col-md-6"> <div class="form-floating mb-3"> <select class="form-control" name="ddlpatienttype" id="ddlpatienttype" onchange="enabledisable(this.value)"> <option value="Yes">Yes</option> <option value="No">No</option> </select> <label for="ddlpatienttype">Is New Patient</label> </div> </div> <div class="col-md-6"> <div class="form-floating mb-3"> <input class="form-control" name="txtsuhid" id="txtsuhid" type="text" disabled="false" placeholder="uhid" required /> <label for="txtsuhid">UHID</label> </div> </div> </div> <div class="row"> <div class="col-md-6"> <div class="form-floating mb-3"> <input class="form-control" name="txtPatientName" id="txtPatientName" type="text" placeholder="Ex. Sanjeev Kumar Singh" required /> <label for="txtPatientName">Patient Name</label> </div> </div> <div class="col-md-6"> <div class="form-floating mb-3"> <input class="form-control" name="txtMobileNo" id="txtMobileNo" type="number" placeholder="Ex. 9999999999" required /> <label for="txtMobileNo">Mobile No.</label> </div> </div> </div> <div class="row"> <div class="col-md-6"> <div class="row"> <div class="col-md-6"> <div class="form-floating mb-3"> <input class="form-control" name="txtAge" id="txtAge" type="number" placeholder="Ex. 25" /> <label for="txtAge">Age</label> </div> </div> <div class="col-md-6"> <div class="form-floating mb-3"> <select class="form-control" name="ddlYears" id="ddlYears"> <option value="Year">Year</option> <option value="Month">Month</option> <option value="Days">Days</option> </select> <label for="ddlYears">Years</label> </div> </div> </div> </div> <div class="col-md-6"> <div class="form-floating mb-3"> <select class="form-control" name="ddlGender" id="ddlGender"> <option value="Male">Male</option> <option value="Female">Female</option> <option value="Other">Other</option> </select> <label for="ddlGender">Gender</label> </div> </div> </div> <div class="row"> <div class="col-md-6"> <div class="form-floating mb-3"> <input class="form-control" name="txtAppointmentDate" id="txtAppointmentDate" type="date" placeholder="Ex. dd/mm/yyyy" /> <label for="inputEmail">Appointment Date</label> </div> </div> <div class="col-md-6"> <div class="form-floating mb-3"> <select class="form-control" name="ddlDoctorName" id="ddlDoctorName"> </select> <label for="ddlDoctorName">Doctor Name</label> </div> </div> </div> <div class="align-items-center text-center mt-4 mb-4"> <!-- <a class="small" href="password.html">Forgot Password?</a> --> <button class="btn btn-primary" onclick="saveapp();" id="btnopration">Save Appointment</button> <button class="btn btn-primary" onclick="clear1();" id="btnclear">Clear</button> </div> </div> <div class="card-footer text-center py-3"> <!-- <div class="small"> <a href="register.html">Need an account? Sign up!</a> </div> --> </div> </div> </div> </div> </div> <script> $(document).ready(function() { getalldoctor(""); //alert(document.getElementById("ddlpatienttype").value); getappointmentdetails(); var date = new Date(); $('#txtAppointmentDate').val(formatDate(date)); $("#ddlpatienttype").prop('disabled', true); // filldatatable(); }); function getUrlVars() { var vars = [], hash; var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); for (var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; } function getappointmentdetails() { var id = getUrlVars()['id']; var op = getUrlVars()['op']; if (jQuery.type(id) == "undefined") { document.getElementById("ddlpatienttype").value = "Yes"; return; } if (id != "") { $.ajax({ method: 'POST', url: 'get_appointmentdetails.php', data: '&id=' + id, dataType: "JSON", success: function(data) { $('#hdid').val(data.uhid); $('#hdappid').val(data.appid); $('#txtPatientName').val(data.name); $('#txtMobileNo').val(data.mobileno); $('#txtAge').val(data.age); $('#ddlYears').val(data.ageinyear); $('#ddlGender').val(data.gender); $('#txtAppointmentDate').val(data.appdate); $('#ddlpatienttype').val(data.isnewpatient); // $('#txtsuhid').val(data.appdate); getalldoctor(data.consultantid); if (op == "Update") { $('#btnopration').text("Update Appointment"); } else if (op == "Cancel") { if (data.status == "0") $('#btnopration').text("Cancel Appointment"); else { $('#btnopration').text("Booked Appointment"); } } } }); } } function formatDate(dt) { var d, y, m; d = dt.getDate(); m = dt.getMonth() + 1; y = dt.getFullYear(); var ret = ''; if (d < 10) d = '0' + d; if (m < 10) m = '0' + m; ret = y + "-" + m + "-" + d; return ret; } function enabledisable(val) { if (val == "Yes") { $("#txtsuhid").prop('disabled', true); } else { $("#txtsuhid").prop('disabled', false); } } function showpatient() { var flag = true; var inputField1 = document.getElementById("txtsuhid"); if (inputField1.value == "") { flag = false; alert("Please enter uhid"); document.getElementById("txtsuhid").focus(); return false; } var uhid = document.getElementById("txtsuhid").value; var btnopration = document.getElementById("btnopration").innerHTML; try { if (flag == true) { var urlgetcode = 'get_patientdetails.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&suhid=' + uhid, dataType: 'json', async: true, cache: false, success: function(data) { if (data == "") { alert("No record found"); return; } $('#hdid').val(data.uhid); $('#txtPatientName').val(data.name); $('#txtMobileNo').val(data.mobileno); $('#txtAge').val(data.age); $('#ddlYears').val(data.ageinyears); $('#ddlGender').val(data.gender); }, error: function(request) { alert(request.responseText); } }); } } catch (Error) { alert(Error); } return; } function getalldoctor(val) { $.ajax({ type: "Get", url: "get_alldoctor.php", success: function(res) { var data = JSON.parse(res); var sel = $("#ddlDoctorName"); sel.empty(); $("#ddlDoctorName").append('<option>Select Consultant</option>'); for (var i = 0; i < data.length; i++) { if (data[i].id == val) { sel.append('<option value="' + data[i].id + '" selected=true>' + data[i] .accountname + '</option>'); } else { sel.append('<option value="' + data[i].id + '">' + data[i].accountname + '</option>'); } } /// $("#state").html(data); } }); } function clear1() { document.getElementById("txtPatientName").value = ""; document.getElementById("txtMobileNo").value = ""; document.getElementById("txtAge").value = ""; document.getElementById("ddlYears").value = "Year"; document.getElementById("ddlGender").value = "Male"; //document.getElementById("txtAppointmentDate").value=$date; document.getElementById("ddlDoctorName").value = ""; document.getElementById("ddlpatienttype").value = ""; document.getElementById("txtsuhid").value = ""; document.getElementById("hdid").value = ""; document.getElementById("hdappid").value = ""; document.getElementById("ddlpatienttype").value = "Yes"; $('#btnopration').text("Save Appointment"); window.location.href = "add_appointment.php"; } function saveapp() { var flag = true; var inputField1 = document.getElementById("txtPatientName"); if (inputField1.value == "") { flag = false; alert("Please enter patient name"); document.getElementById("txtPatientName").focus(); return false; } var inputField2 = document.getElementById("txtMobileNo"); if (inputField2.value == "") { flag = false; alert("Please enter mobile no"); document.getElementById("txtMobileNo").focus(); return false; } var inputField3 = document.getElementById("txtAge"); if (inputField3.value == "") { flag = false; alert("Please enter age"); document.getElementById("txtAge").focus(); return false; } var inputField4 = document.getElementById("ddlYears"); if (inputField4.value == "") { flag = false; alert("Please select age"); document.getElementById("ddlYears").focus(); return false; } var inputField5 = document.getElementById("ddlGender"); if (inputField5.value == "") { flag = false; alert("Please select gender"); document.getElementById("ddlGender").focus(); return false; } var inputField6 = document.getElementById("txtAppointmentDate"); if (inputField6.value == "") { flag = false; alert("Please enter date of appointment"); document.getElementById("txtAppointmentDate").focus(); return false; } var inputField7 = document.getElementById("ddlDoctorName"); if (inputField7.value == "Select Consultant") { flag = false; alert("Please select consultant."); document.getElementById("ddlDoctorName").focus(); return false; } var patientname = document.getElementById("txtPatientName").value; var mobileno = document.getElementById("txtMobileNo").value; var age = document.getElementById("txtAge").value; var ageinyear = document.getElementById("ddlYears").value; var gender = document.getElementById("ddlGender").value; var dateofappointment = document.getElementById("txtAppointmentDate").value; var consultant = document.getElementById("ddlDoctorName").value; var patienttype = document.getElementById("ddlpatienttype").value; var suhid = document.getElementById("txtsuhid").value; var uhid = document.getElementById("hdid").value; var appid = document.getElementById("hdappid").value; var btnopration = document.getElementById("btnopration").innerHTML; var text = "Do you want " + btnopration; if (confirm(text) == false) { flag = false; return false; } try { if (flag == true) { var urlgetcode = 'manage_appointment.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&patientname=' + patientname + '&mobileno=' + mobileno + '&age=' + age + '&ageinyear=' + ageinyear + '&gender=' + gender + '&dateofappointment=' + dateofappointment + '&consultant=' + consultant + '&patienttype=' + patienttype + '&suhid=' + suhid + '&uhid=' + uhid + '&appid=' + appid + '&btnopration=' + btnopration, dataType: 'json', async: true, cache: false, success: function(msg) { if (msg == "1") { alert("Save Successfully"); $('#hdid').val(""); $('#txtPatientName').val(""); $('#txtMobileNo').val("-"); $('#txtAge').val("-"); $('#ddlYears').val("-"); $('#ddlGender').val(""); $('#txtAppointmentDate').val(""); $('#ddlDoctorName').val(""); $('#btnopration').text("Save Appointment"); window.location.href = "list_appointment.php"; } else if (msg == "2") { alert("Appointment Cancel Successfully"); window.location.href = "list_appointment.php"; } else if (msg == "3") { alert(" Appointment Booked Successfully"); window.location.href = "list_appointment.php"; } else if (msg == "4") { alert(" Appointment already booked"); window.location.href = "list_appointment.php"; } }, error: function(request) { alert(request.responseText); } }); } } catch (Error) { alert(Error); } return; } // function filldatatable(){ // var table = $('#example').DataTable({ // // "ajax": "get_oldpatient.php", // "bPaginate": true, // destroy: true, // "bProcessing": true, // "pageLength": 10, // "columns": [{ // mData: 'suhid' // }, // { // mData: 'name' // }, // { // mData: 'age' // }, // { // mData: 'gender' // }, // { // mData: 'mobileno' // }, // // { // mData: null, // defaultContent: '<button class="btn btn-warning">Select</button>', // targets: -1 // } // // ] // }); // } </script> <script> // Get the modal var modal = document.getElementById("myModal"); // Get the button that opens the modal var btn = document.getElementById("myBtn"); var btnselect = document.getElementById("select"); // Get the <span> element that closes the modal var span = document.getElementsByClassName("close")[0]; // When the user clicks on the button, open the modal btn.onclick = function() { var table = $('#example').DataTable({ "ajax": "get_oldpatient.php", "bPaginate": true, destroy: true, "bProcessing": true, "pageLength": 10, "columns": [{ mData: null, defaultContent: '<button class="btn btn-warning">Select</button>', targets: -1 }, { mData: 'suhid' }, { mData: 'name' }, { mData: 'age' }, { mData: 'gender' }, { mData: 'mobileno' } ] }); modal.style.display = "block"; table.on('click', 'button', function(e) { var currentRow = $(this).closest("tr"); var col1 = currentRow.find("td:eq(1)").text(); modal.style.display = "none"; document.getElementById("txtsuhid").value = col1; showpatient(); document.getElementById("ddlpatienttype").value = "No"; $("#ddlpatienttype").prop('disabled', true); //getpatientdetails(); }); } function isNumberKey(evt, element) { var charCode = (evt.which) ? evt.which : event.keyCode if (charCode > 31 && (charCode < 48 || charCode > 57) && !(charCode == 46 || charCode == 8)) return false; else { var len = $(element).val().length; var index = $(element).val().indexOf('.'); if (index > 0 && charCode == 46) { return false; } if (index > 0) { var CharAfterdot = (len + 1) - index; if (CharAfterdot > 3) { return false; } } } return true; } function refresh() { myModal.ajax.reload(); } function closemodalpopup(val) { modal.style.display = "none"; showpatient(); //getpatientdetails(val); } // When the user clicks on <span> (x), close the modal span.onclick = function() { modal.style.display = "none"; } // When the user clicks anywhere outside of the modal, close it window.onclick = function(event) { if (event.target == modal) { modal.style.display = "none"; } } </script> <?php include "footer.php";?>
Copyright © 2025 - UnknownSec