Server IP : 162.240.98.243 / Your IP : 3.145.174.249 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("headers.php"); include("menu.php"); include("dbconnection.php"); if(isset($_POST[submit])){ $CheckPatient = $con->query("SELECT * FROM `immunization` WHERE `patientid` = '$_POST[patientid]' AND `Vaccine` = '$_POST[Vaccine]'"); $numSU=mysqli_num_rows($CheckPatient); if($numSU > 0){ echo "<script>alert('Already Exists');</script>"; }else{ $sql ="INSERT INTO immunization(patientid,Vaccine,DateGiven,duedate,Note) values('$_POST[patientid]','$_POST[Vaccine]','$_POST[DateGiven]','$_POST[duedate]','$_POST[Note]')"; if($qsql = mysqli_query($con,$sql)) { echo "<script>alert('Immunization record inserted successfully...');</script><script> window.location.replace('hosImmunization.php');</script>;</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"; } ?> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <link rel="stylesheet" href="/resources/demos/style.css"> <title>Title of the document</title> <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> <style> .modal { display: none; position: fixed; z-index: 8; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0.4); } .modal-content { margin: 50px auto; border: 1px solid #999; width: 60%; } h2,p { margin: 0 0 20px; font-weight: 400; } .form1 { padding: 25px; margin: 25px; box-shadow: 0 2px 5px #f5f5f5; background: #eee; } input, textarea, select { width: 100%; padding: 6px; margin-bottom: 20px; border: 1px solid #1c87c9; outline: none; } .contact-form button { width: 100%; padding: 10px; border: none; background: #1c87c9; font-size: 16px; font-weight: 400; color: #fff; } button:hover { background: #2371a0; } .close { color: #aaa; float: right; font-size: 58px; font-weight: bold; } .close:hover, .close:focus { color: black; text-decoration: none; cursor: pointer; } button.button { display: inline-block; border-bottom: #02274a 1px solid; font-size: 19px; cursor: pointer; } button.button:hover { border-bottom: #a99567 1px solid; color: #a99567; } </style> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script> $( function() { $.widget( "custom.combobox", { _create: function() { this.wrapper = $( "<span>" ) .addClass( "custom-combobox" ) .insertAfter( this.element ); this.element.hide(); this._createAutocomplete(); this._createShowAllButton(); }, _createAutocomplete: function() { var selected = this.element.children( ":selected" ), value = selected.val() ? selected.text() : ""; this.input = $( "<input>" ) .appendTo( this.wrapper ) .val( value ) .attr( "title", "" ) .addClass( "custom-combobox-input ui-widget ui-widget-content ui-state-default ui-corner-left" ) .autocomplete({ delay: 0, minLength: 0, source: $.proxy( this, "_source" ) }) .tooltip({ classes: { "ui-tooltip": "ui-state-highlight" } }); this._on( this.input, { autocompleteselect: function( event, ui ) { ui.item.option.selected = true; this._trigger( "select", event, { item: ui.item.option }); }, autocompletechange: "_removeIfInvalid" }); }, _createShowAllButton: function() { var input = this.input, wasOpen = false; $( "<a>" ) .attr( "tabIndex", -1 ) .attr( "title", "Show All Items" ) .tooltip() .appendTo( this.wrapper ) .button({ icons: { primary: "ui-icon-triangle-1-s" }, text: false }) .removeClass( "ui-corner-all" ) .addClass( "custom-combobox-toggle ui-corner-right" ) .on( "mousedown", function() { wasOpen = input.autocomplete( "widget" ).is( ":visible" ); }) .on( "click", function() { input.trigger( "focus" ); // Close if already visible if ( wasOpen ) { return; } // Pass empty string as value to search for, displaying all results input.autocomplete( "search", "" ); }); }, _source: function( request, response ) { var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" ); response( this.element.children( "option" ).map(function() { var text = $( this ).text(); if ( this.value && ( !request.term || matcher.test(text) ) ) return { label: text, value: text, option: this }; }) ); }, _removeIfInvalid: function( event, ui ) { // Selected an item, nothing to do if ( ui.item ) { return; } // Search for a match (case-insensitive) var value = this.input.val(), valueLowerCase = value.toLowerCase(), valid = false; this.element.children( "option" ).each(function() { if ( $( this ).text().toLowerCase() === valueLowerCase ) { this.selected = valid = true; return false; } }); // Found a match, nothing to do if ( valid ) { return; } // Remove invalid value this.input .val( "" ) .attr( "title", value + " didn't match any item" ) .tooltip( "open" ); this.element.val( "" ); this._delay(function() { this.input.tooltip( "close" ).attr( "title", "" ); }, 2500 ); this.input.autocomplete( "instance" ).term = ""; }, _destroy: function() { this.wrapper.remove(); this.element.show(); } }); $( "#combobox" ).combobox(); $( "#toggle" ).on( "click", function() { $( "#combobox" ).toggle(); }); } ); </script> <ul> <li class="first">Add your allergy</li></ul> </div> </div> <div class="wrapper col4"> <div id="container"> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <div style = "display:none;" id = "loaderImg"> <div class="loader"> </div> </div> <form method="post" action="" name="submit" id="myForm" onSubmit="return validateform()"> <table width="532" border="3"> <table id="example2" class="table table-bordered table-hover"> <tbody> <?php include("dbconnection.php"); $narayan=LoginManager::currentUser(); $harilal=LoginManager::getUserTypeByuname("$narayan"); $sqlpatient1 = "SELECT * FROM site_users WHERE userno='$harilal'"; $qsqlpatient1 = mysqli_query($con,$sqlpatient1); $rsn = mysqli_fetch_array($qsqlpatient1); echo "<input type='hidden' name='patientid' id='patientid' value='$rsn[userno]'></td>"; ?> <tr> <td height="62">Vaccine</td> <td><input type="text" name="Vaccine" id="Vaccine"></td> </tr> <tr> <td height="62">Date Given</td> <td><input type="date" name="DateGiven" id="DateGiven" ></textarea></td> </tr> <tr> <td height="62">Due Date </td> <td><input type="date" name="duedate" id="duedate" ></textarea></td> </tr> <td>Note</td> <td><textarea name="Note" rows="2" cols="50" id="Note"></textarea></td> </tr> <tr> <td colspan="2" align="center"><input type="submit" name="submit" id="submit" value="Submit" /></td> </tr> </tbody> <a href='hosImmunization.php' style="float:right;font-size:25px;"><i class="fa fa-window-close-o" aria-hidden="true"></i> </a> </table> </form> <br> <p> </p> </div> </div> </div> <div class="clear"></div> </div> </div> <?php include("footer.php"); ?> <script type="application/javascript"> var alphaExp = /^[a-zA-Z]+$/; //Variable to validate only alphabets var alphaspaceExp = /^[a-zA-Z\s]+$/; //Variable to validate only alphabets and space var numericExpression = /^[0-9]+$/; //Variable to validate only numbers var alphanumericExp = /^[0-9a-zA-Z]+$/; //Variable to validate numbers and alphabets var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/; //Variable to validate Email ID function validateform() { if(document.frmpatapp.patiente.value == "") { alert("Patient name should not be empty.."); document.frmpatapp.patiente.focus(); return false; } else if(!document.frmpatapp.patiente.value.match(alphaspaceExp)) { alert("Patient name not valid.."); document.frmpatapp.patiente.focus(); return false; } else if(document.frmpatapp.textarea.value == "") { alert("Address should not be empty.."); document.frmpatapp.textarea.focus(); return false; } else if(document.frmpatapp.city.value == "") { alert("City should not be empty.."); document.frmpatapp.city.focus(); return false; } else if(!document.frmpatapp.city.value.match(alphaspaceExp)) { alert("City name not valid.."); document.frmpatapp.city.focus(); return false; } else if(document.frmpatapp.mobileno.value == "") { alert("Mobile number should not be empty.."); document.frmpatapp.mobileno.focus(); return false; } else if(!document.frmpatapp.mobileno.value.match(numericExpression)) { alert("Mobile number not valid.."); document.frmpatapp.mobileno.focus(); return false; } else if(document.frmpatapp.loginid.value == "") { alert("login ID should not be empty.."); document.frmpatapp.loginid.focus(); return false; } else if(!document.frmpatapp.loginid.value.match(alphanumericExp)) { alert("login ID not valid.."); document.frmpatapp.loginid.focus(); return false; } else if(document.frmpatapp.password.value == "") { alert("Password should not be empty.."); document.frmpatapp.password.focus(); return false; } else if(document.frmpatapp.password.value.length < 8) { alert("Password length should be more than 8 characters..."); document.frmpatapp.password.focus(); return false; } else if(document.frmpatapp.select6.value == "") { alert("Gender should not be empty.."); document.frmpatapp.select6.focus(); return false; } else if(document.frmpatapp.dob.value == "") { alert("Date Of Birth should not be empty.."); document.frmpatapp.dob.focus(); return false; } else if(document.frmpatapp.appointmentdate.value == "") { alert("Appointment date should not be empty.."); document.frmpatapp.appointmentdate.focus(); return false; } else if(document.frmpatapp.appointmenttime.value == "") { alert("Appointment time should not be empty.."); document.frmpatapp.appointmenttime.focus(); return false; } else { return true; } } function loaddoctor(deptid) { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { document.getElementById("divdoc").innerHTML = this.responseText; } }; xmlhttp.open("GET","departmentDoctor.php?deptid="+deptid,true); xmlhttp.send(); } </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> <script src="../plugins/select2/js/select2.full.min.js"></script> <script> $(function () { //Initialize Select2 Elements $('.select2').select2() //Initialize Select2 Elements $('.select2bs4').select2({ theme: 'bootstrap4' }) </script> <script> let modalBtns = [...document.querySelectorAll(".button")]; modalBtns.forEach(function(btn) { btn.onclick = function() { let modal = btn.getAttribute('data-modal'); document.getElementById(modal) .style.display = "block"; } }); let closeBtns = [...document.querySelectorAll(".close")]; closeBtns.forEach(function(btn) { btn.onclick = function() { let modal = btn.closest('.modal'); modal.style.display = "none"; } }); window.onclick = function(event) { if(event.target.className === "modal") { event.target.style.display = "none"; } } </script>