UnknownSec Bypass
403
:
/
var
/
www
/
zenithentcare
/
cpanel
/ [
drwxrwxr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
add_appointmentnew.php
<?php include "top.php";?> <style> /* The Modal (background) */ .modalnew { display: none; /* Hidden by default */ position: fixed; /* Stay in place */ z-index: 1500; /* Sit on top */ left: 0; top: 0; width: 100%; /* Full width */ height: 100%; /* Full height */ overflow: auto; /* Enable scroll if needed */ background-color: rgb(0, 0, 0); /* Fallback color */ background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */ } /* Modal Content/Box */ .modalnew-content { background-color: #fefefe; margin: 3% auto; /* 15% from the top and centered */ padding: 20px; border: 1px solid #888; width: 80%; /* Could be more or less, depending on screen size */ } /* The Close Button */ .close { color: #aaa; float: right; font-size: 28px; font-weight: bold; } .close:hover, .close:focus { color: black; text-decoration: none; cursor: pointer; } </style> <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"> <li class="breadcrumb-item active"><button id="myBtn" class="btn btn-danger">Old Patient</button></li> <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="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 class="align-items-center text-center mt-4 mb-0"> <!-- <a class="small" href="password.html">Forgot Password?</a> --> <button class="btn btn-primary" onclick="showpatient();" id="btnshow">Show</button> </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="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 class="row"> <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="form-floating mb-3"> <input class="form-control" id="inputEmail" type="date" placeholder="name@example.com" /> <label for="inputEmail">Date</label> </div> <div class="form-floating mb-3"> <select class="form-control" name="cars" id="cars"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option> </select> <label for="inputEmail">Select</label> </div> <div class="form-check mb-3"> <input class="form-check-input" id="inputRememberPassword" type="checkbox" value="" /> <label class="form-check-label" for="inputRememberPassword">Remember Password</label> </div>--> <div class="align-items-center text-center mt-4 mb-0"> <!-- <a class="small" href="password.html">Forgot Password?</a> --> <button class="btn btn-primary" onclick="saveapp();" id="btnopration">Save Appointment</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> <div id="myModal" class="modalnew"> <!-- Modal content --> <div class="modalnew-content"> <span class="close">×</span> <div class="container-fluid px-4"> <h4 class="mt-4">Appointment List</h4> <!-- <ol class="breadcrumb mb-4 justify-content-between"> <li class="breadcrumb-item active">List of booked appointment.</li> <a class="btn btn-primary">Add Appointment</a> </ol> --> <div class="card mb-4"> <div class="card-header"> <i class="fas fa-table me-1"></i> Appointment </div> <div class="card-body"> <table id="datatablesSimple"> <thead> <tr> <th>UHID</th> <th>Name</th> <th>Age</th> <th>Sex</th> <th>Mobile</th> <th>Address</th> <th></th> </tr> </thead> </table> </div> </div> </div> </div> </div> <script> $(document).ready(function() { getalldoctor(""); //alert(document.getElementById("ddlpatienttype").value); getappointmentdetails(); }); 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 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 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; alert('suhid ' + suhid); alert('uhid ' + uhid); alert('appid ' + appid); var btnopration = document.getElementById("btnopration").innerHTML; var text = "Do you want " + btnopration + " appointment"; 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"); 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"; } }, error: function(request) { alert(request.responseText); } }); } } catch (Error) { alert(Error); } return; } </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() { alert("ok"); var table = $('#datatablesSimple').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 } ] }); modal.style.display = "block"; table.on('click', 'button', function(e) { var currentRow = $(this).closest("tr"); var col1 = currentRow.find("td:eq(0)").text(); modal.style.display = "none"; document.getElementById("txtsuhid").value = col1; showpatient(); document.getElementById("ddlpatienttype").value = "No"; //getpatientdetails(); }); } // 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