UnknownSec Bypass
403
:
/
var
/
www
/
html
/
adminpnl
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
add_holiday.php
<?php include "top.php"; ?> <!-- /contact-form --> <script type="text/javascript"> $(document).ready(function () { var id= getUrlVars()['id'] ; var op= getUrlVars()['op'] ; var canteen= document.getElementById("hdcanteen").value; if(id!="") { $.ajax({ method: 'POST', url: 'getholiday.php', data: '&id=' + id+'&canteenname='+canteen, dataType:"JSON", success:function(data) { $('#hdID').val(data.id); $('#txtDate').val(data.holidaydate); $('#txtdescription').val(data.holidaydescription); if(op=="Update") { $('#btnholiday').text("Update"); document.getElementById("txtDate").focus(); } else if(op=="Delete") { $('#btnholiday').text("Delete"); } } }); } } ); 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 SaveHoliday() { var flag = true; var inputField1 =document.getElementById("txtDate"); if (inputField1.value == "") { flag = false; alert("Please enter Date."); document.getElementById("txtDate").focus(); return false; } // Parse the date parts to integers var parts = inputField1.value.split("-"); var day = parseInt(parts[0], 10); if(isNaN(day)) { alert("Date is not correct."); document.getElementById("txtDate").focus(); return false; } var month = parseInt(parts[1], 10); if(isNaN(month)) { alert("Month is not correct."); document.getElementById("txtDate").focus(); return false; } var year = parseInt(parts[2], 10); if(isNaN(year)) { alert("Year is not correct."); document.getElementById("txtDate").focus(); return false; } // Check the ranges of month and year if (year < 2020 || year > 3000 || day > 31 || month == 0 || month > 12) { if (day > 31) { alert("day is not correct"); document.getElementById("txtDate").focus(); return false; } if (month == 0 || month > 12) { alert("month is not correct"); document.getElementById("txtDate").focus(); return false; } if (year < 2020 || year > 3000) { alert("year is not correct"); document.getElementById("txtDate").focus(); return false; } } var inputField2 = document.getElementById("txtdescription"); if (inputField2.value == "") { flag = false; alert("Please enter description."); document.getElementById("txtdescription").focus(); return false; } var holidaydate = document.getElementById("txtDate").value; var holidaydescription = document.getElementById("txtdescription").value; var id = document.getElementById("hdID").value; var btntext = document.getElementById("btnholiday").innerHTML; var canteen= document.getElementById("hdcanteen").value; var text = "Do you want "+btntext+ " holiday"; if (confirm(text) == false) { flag=false; return false; } try { if (flag == true) { var urlgetcode = 'SaveUpdateHoliday.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&holidaydate='+ holidaydate +'&holidaydescription='+ holidaydescription +'&id='+ id +'&canteenname='+ canteen+'&btntext='+btntext, dataType: 'json', async: true, cache: false, success: function (msg) { if(msg=="1") { alert("Save Successfully"); $('#hdID').val(""); $('#txtDate').val(""); $('#txtdescription').val(""); $('#btnholiday').text("Save"); window.location.href="holiday.php"; } else if(msg=="2") { alert("Already Exist"); $('#hdID').val(""); $('#txtDate').val(""); $('#txtdescription').val(""); $('#btnholiday').text("Save"); window.location.href="add_holiday.php"; } else if(msg=="3") { alert("Update Successfully"); $('#hdID').val(""); $('#txtDate').val(""); $('#txtdescription').val(""); $('#btnholiday').text("Save"); window.location.href="holiday.php"; } else if(msg=="4") { alert("Delete Successfully"); $('#hdID').val(""); $('#txtDate').val(""); $('#txtdescription').val(""); $('#btnholiday').text("Save"); window.location.href="holiday.php"; } }, error: function (request) { alert(request.responseText); } }); } } catch (Error) { alert(Error); } return; } </script> <section class="w3l-contact-main"> <div class="contact-infhny py-5"> <div class="container py-lg-3"> <div class="title-content text-left mb-lg-4 mb-4"> <h6 class="sub-title">Holiday Settings</h6> <h3 class="hny-title">Fill details to set<span> HOLIDAYS</span></h3> </div> <div class="row align-form-map"> <div class="col-lg-12 form-inner-cont"> <input type="hidden" name="hdID" id="hdcanteen" value="<?php echo $_SESSION['admincanteenname']; ?>" /> <input type="hidden" name="hdID" id="hdID" /> <div class="form-input"> <label for="w3lSender">Date*</label> <input required type="text" name="txtDate" id="txtDate" autocomplete="Off" title="Choose your desired date" placeholder="dd-MM-yyyy" /> </div> <div class="form-input"> <label for="w3lSender">Discription*</label> <input type="text" name="w3lSender" id="txtdescription" placeholder="" required="" /> </div> <button type="Submit" style="width: 100%" name="btnholiday" id="btnholiday" onclick="SaveHoliday();" class="btn btn-contact">Save</button> </div> </div> </div> </section> <!-- //contact-form --> <script>$('#txtDate').datepicker({ dateFormat: 'dd-mm-yy' }).val();</script> <?php include "footer.php";?>
Copyright © 2025 - UnknownSec