UnknownSec Bypass
403
:
/
var
/
www
/
html
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
book_slot.php
<?php include "top.php"; ?> <script type="text/javascript"> $(document).ready(function () { getgroceryliquorstatus(); GenerateCaptcha(); var calendar = $('#calendar').fullCalendar({ editable: false, events: "client_load_slot_details.php", displayEventTime: false, eventRender: function (event, element, view) { if (event.allDay === 'true') { event.allDay = true; event.color="#cdf3cd"; } else { event.allDay = true; } }, selectable: false, selectHelper: false, select: function (start, end, allDay) { var title = prompt('Total Slot:'); if(isNaN(title)) { alert("Please enter numeric value"); return; } if (title) { var start = $.fullCalendar.formatDate(start, "Y-MM-DD"); var canteen= document.getElementById("hdcanteen").value; var end = $.fullCalendar.formatDate(end, "Y-MM-DD"); var color="#000000"; $.ajax({ url: 'slot_save.php', data: 'title=' + title + '&start=' + start + '&end=' + start+'&canteenname='+canteen, type: "POST", success: function (msg) { if(msg==0) { displayMessage("Added Successfully"); window.location.href="seat_settings.php"; } else { alert("You cant allocate seat because holiday set for this date"); window.location.href="seat_settings.php"; } } }); calendar.fullCalendar('renderEvent', { title: title, start: start, end: end, allDay: allDay, color: color, }, true ); } calendar.fullCalendar('unselect'); }, eventClick: function (event) { if(event.title=="NA") { alert("Slot is not available for this date"); return; } if(isNaN(event.title)) { alert("This date is a holiday Please select another date"); return; } var currentdate = $.fullCalendar.formatDate(event.start, "Y-MM-DD"); var canteen= document.getElementById("hdcanteen").value; var RegisID=document.getElementById("hdregisid").value; var itemcategory = document.getElementById("ddlItemCategory").value; var id=1; $.ajax({ method: 'POST', url: 'get_itemcategory_details.php', data: '&curdate=' + currentdate+'&canttenname='+canteen+'®isid='+RegisID+'&itemcategory='+itemcategory, dataType:"JSON", success:function(data) { if(data.itemcategory=="Please first book grocery than liquor.") { alert(data.itemcategory); return; } if(data.itemcategory=="You have already booked Grocery and Liquor for this month that the reason date is not selected") { alert(data.itemcategory); return; } if(data.itemcategory!='') { var date = $.fullCalendar.formatDate(event.start, "DD-MM-Y"); $('#txtSelectedDate').val(date); $('#ddlItemCategory').val(data.itemcategory); $('#ddlCanteen').val(document.getElementById("hdcanteen").value); } else { alert("item category is not set for this date"); $('#txtSelectedDate').val(""); $('#ddlItemCategory').val("-"); $('#ddlCanteen').val(""); } } }); } }); }); function displayMessage(message) { $(".response").html("<div class='success'>"+message+"</div>"); setInterval(function() { $(".success").fadeOut(); }, 1000); } function GenerateCaptcha() { var chr1 = Math.ceil(Math.random() * 10) + ''; var chr2 = Math.ceil(Math.random() * 10) + ''; var chr3 = Math.ceil(Math.random() * 10) + ''; var str = new Array(4).join().replace(/(.|$)/g, function () { return ((Math.random() * 36) | 0).toString(36)[Math.random() < .5 ? "toString" : "toUpperCase"](); }); var captchaCode = str + chr1 + ' ' + chr2 + ' ' + chr3; document.getElementById("txtCaptcha").value = captchaCode } /* Validating Captcha Function */ function ValidCaptcha() { var str1 = removeSpaces(document.getElementById('txtCaptcha').value); var str2 = removeSpaces(document.getElementById('txtCompare').value); if (str1 == str2) { return true; } else { GenerateCaptcha(); return false; } } /* Remove spaces from Captcha Code */ function removeSpaces(string) { return string.split(' ').join(''); } function getgroceryliquorstatus() { var urlgetcode = 'grocery_liquor_status.php'; var can=""; $.ajax({ method: 'POST', url: urlgetcode, data: '', dataType: 'json', async: true, cache: false, success: function (data) { var result = data; if (result == "1") { window.location.href="view_token_list.php"; return; } if(result == "2") { window.location.href="change_password.php"; return; } }, error: function (request) { alert(request.responseText); } }); } function SaveCustomerToken() { var flag = true; var inputField1 =document.getElementById("txtSelectedDate"); if (inputField1.value == "") { flag = false; alert("Please Select Date."); document.getElementById("txtSelectedDate").focus(); return false; } var inputField2 = document.getElementById("ddlItemCategory"); if (inputField2.value == "-") { flag = false; alert("Please Select Item Category."); document.getElementById("ddlItemCategory").focus(); return false; } var inputField3 = document.getElementById("ddlCanteen"); if (inputField3.value == "Select Canteen") { flag = false; alert("Please Select Canteen."); document.getElementById("ddlCanteen").focus(); return false; } if (removeSpaces(document.getElementById('txtCompare').value) == "") { flag = false; alert("Please Enter Captcha Code ."); return false; } var str1 = removeSpaces(document.getElementById('txtCaptcha').value); var str2 = removeSpaces(document.getElementById('txtCompare').value); if (str1 != str2) { alert("Captcha is not correct. please enter again"); flag = false; GenerateCaptcha(); return false; } var itemcategory = document.getElementById("ddlItemCategory").value; var selecteddate = document.getElementById("txtSelectedDate").value; var canteenname = document.getElementById("ddlCanteen").value; var RegisID= document.getElementById("hdregisid").value; try { if (flag == true) { var urlgetcode = 'save_token.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '®isid=' + RegisID + '&bookingdatetime=' + selecteddate + '&itemcategory=' + itemcategory + '&canteenname=' + canteenname, dataType: 'json', async: true, cache: false, success: function (data) { var result = data; if (result != "0" && result != "-1" && result != "-2" && result != "") { alert("Slot save successfully"); window.location.href="view_token_list.php"; } else if (result == "-1") { alert("Booking Slot is not Available Please Try another date"); } else if (result == "-2") { alert("Please Try after some time"); } else if (result =="0") { alert("Your Booking is already done for "+ document.getElementById("ddlItemCategory").value); } else alert("There is problem to save."); }, error: function (request) { alert(request.responseText); } }); } } catch (Error) { alert(Error); } return; } </script> <style> /*body { margin-top: 50px; text-align: center; font-size: 18px; font-family: "Lucida Grande", Helvetica, Arial, Verdana, sans-serif; }*/ #calendar { width: width: 100%; margin: 0 auto; } .response { height: 60px; } .success { background: #cdf3cd; padding: 10px 60px; border: #c3e6c3 1px solid; display: inline-block; } </style> <!-- /contact-form --> <section class="w3l-contact-main"> <div class="contact-infhny py-5"> <div class="container py-lg-3"> <div class="row align-form-map"> <div class="col-lg-12 title-content text-left mb-lg-4 mb-4"> <h4 class="hny-title mb-3">Welcome, <span><?php echo $_SESSION['username']; ?> !</span> You are in <?php echo $_SESSION['usercanteenname']; ?> CSD</h4> </div> <div class="col-lg-12 form-inner-cont"> <div class="response"></div> <div id='calendar'></div> <input type="hidden" name="hdID" id="hdcanteen" value="<?php echo $_SESSION['usercanteenname']; ?>" /> <input type="hidden" name="hdregisid" id="hdregisid" value="<?php echo $_SESSION['regisid']; ?>" /> <!-- /give-set1--> <div class="give-set1 mb-5 pt-3"> <div class="row"> <div class="col-md-12 col-12 mt-4"> <select id="ddlCanteen" runat="server" disabled="disabled" class="form-control" style="color: #000000"> <option>Select Canteen</option> <option>Banbasa</option> <option>Khatima</option> </select> </div> </div> <div class="row"> <div class="col-md-3 col-12 mt-4"> <input type="text" disabled="disabled" runat="server" id="txtSelectedDate" maxlength="50" placeholder="Selected Date" style="color: #000000" /> </div> <div class="col-md-3 col-12 mt-4"> <select id="ddlItemCategory" runat="server" disabled="disabled" class="form-control" style="color: #000000"> <option>-</option> <option>Grocery and Liquor</option> <option>Liquor</option> <option>Grocery</option> </select> </div> <div class="col-md-3 col-12 mt-4"> <input type="text" id="txtCompare" autocomplete="off" style="color: #000000" placeholder="Enter Captcha code"/> </div> <div class="col-md-3 col-12 mt-4"> <input type="text" runat="server" id="txtCaptcha" style="text-align: center; border: none; font-weight: bold; font-family: Modern; color: #000000;" readonly="readonly" /> </div> </div> <div class="row"> <div class="col-md-6 col-12 mt-4"> <input type="button" id="btnrefresh" class="btn btn-contact" value="Refresh Captcha" onclick="GenerateCaptcha();" /> </div> <div class="col-md-6 col-12 mt-4"> <input type="button" id="btnbookslot" class="btn btn-contact" value="Click here to Book Slot" onclick="SaveCustomerToken();" /> </div> </div> </div> <!-- /give-set1--> </div> </div> </div> </section> <!-- //contact-form --> <div class="table-responsive" id="employee_details" style="display:none"> <table class="table table-bordered"> <tr> <td width="10%" align="right"><b>Name</b></td> <td width="90%"><span id="employee_name"></span></td> </tr> <tr> <td width="10%" align="right"><b>Address</b></td> <td width="90%"><span id="employee_address"></span></td> </tr> <tr> <td width="10%" align="right"><b>Gender</b></td> <td width="90%"><span id="employee_gender"></span></td> </tr> <tr> <td width="10%" align="right"><b>Designation</b></td> <td width="90%"><span id="employee_designation"></span></td> </tr> <tr> <td width="10%" align="right"><b>Age</b></td> <td width="90%"><span id="employee_age"></span></td> </tr> </table> </div> <?php include "footer-seat.php";?>
Copyright © 2025 - UnknownSec