UnknownSec Bypass
403
:
/
var
/
www
/
html
/
adminpnl
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
add_token_category.php
<?php include "top.php"; ?> <style> select { -webkit-appearance: none; -moz-appearance: none; -ms-appearance: none; appearance: none; outline: 0; /*background: green;*/ background-image: none; border: 1px solid #c3c3c3; } .select { position: relative; display: block; width: 20em; height: 3em; line-height: 3; width: 100%; /*background: #2C3E50;*/ overflow: hidden; border-radius: .25em; } select { width: 100%; height: 100%; margin: 0; padding: 0 0 0 .5em; color: #000; cursor: pointer; } select::-ms-expand { display: none; } .select::after { content: '\25BC'; position: absolute; top: 0; right: 0; bottom: 0; padding: 0 1em; background: #293462; pointer-events: none; } .select:hover::after { color: #F39C12; } <!-- For different browsers --> .select::after { -webkit-transition: .25s all ease; -o-transition: .25s all ease; transition: .25s all ease; } </style> <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: 'gettoken_category.php', data: '&id=' + id+'&canteenname='+canteen, dataType:"JSON", success:function(data) { $('#hdID').val(data.id); $('#ddlcategory').val(data.itemcategory); $('#txtfromdate').val(data.fromdate); $('#txttodate').val(data.todate); if(op=="Update") { $('#btntokencategory').text("Update"); document.getElementById("ddlcategory").focus(); } else if(op=="Delete") { $('#btntokencategory').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 saveupdatetokencategory() { var flag = true; var inputField1 =document.getElementById("ddlcategory"); if (inputField1.value == "Select Token Category") { flag = false; alert("Please select category."); document.getElementById("ddlcategory").focus(); return false; } var inputField2 = document.getElementById("txtfromdate"); if (inputField2.value == "") { flag = false; alert("Please select from date."); document.getElementById("txtfromdate").focus(); return false; } // Parse the date parts to integers var parts = inputField2.value.split("-"); var day = parseInt(parts[0], 10); if(isNaN(day)) { alert("Date is not correct."); document.getElementById("txtfromdate").focus(); return false; } var month = parseInt(parts[1], 10); if(isNaN(month)) { alert("Month is not correct."); document.getElementById("txtfromdate").focus(); return false; } var year = parseInt(parts[2], 10); if(isNaN(year)) { alert("Year is not correct."); document.getElementById("txtfromdate").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("txtfromdate").focus(); return false; } if (month == 0 || month > 12) { alert("Month is not correct"); document.getElementById("txtfromdate").focus(); return false; } if (year < 2020 || year > 3000) { alert("Year is not correct"); document.getElementById("txtfromdate").focus(); return false; } } var inputField3 = document.getElementById("txttodate"); if (inputField3.value == "") { flag = false; alert("Please select to date."); document.getElementById("txttodate").focus(); return false; } // Parse the date parts to integers var parts = inputField3.value.split("-"); var day = parseInt(parts[0], 10); if(isNaN(day)) { alert("Date is not correct."); document.getElementById("txttodate").focus(); return false; } var month = parseInt(parts[1], 10); if(isNaN(month)) { alert("Month is not correct."); document.getElementById("txttodate").focus(); return false; } var year = parseInt(parts[2], 10); if(isNaN(year)) { alert("Year is not correct."); document.getElementById("txttodate").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("txttodate").focus(); return false; } if (month == 0 || month > 12) { alert("Month is not correct"); document.getElementById("txttodate").focus(); return false; } if (year < 2020 || year > 3000) { alert("Year is not correct"); document.getElementById("txttodate").focus(); return false; } } var category = document.getElementById("ddlcategory").value; var fromdate = document.getElementById("txtfromdate").value; var todate = document.getElementById("txttodate").value; var id = document.getElementById("hdID").value; var btntext = document.getElementById("btntokencategory").innerHTML; var canteen= document.getElementById("hdcanteen").value; var userid= document.getElementById("hduserid").value; var text = "Do you want "+btntext+ " category"; if (confirm(text) == false) { flag=false; return false; } try { if (flag == true) { var urlgetcode = 'token_category_save_update.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&itemcategory='+category +'&fromdate='+ fromdate+'&todate='+todate+'&userdetailid='+userid +'&id='+ id +'&canteenname='+canteen+'&btntext='+btntext, dataType: 'json', async: true, cache: false, success: function (msg) { if(msg=="1") { alert("Save Successfully"); document.getElementById("hdID").value=""; document.getElementById("ddlcategory").value="Select Token Category"; document.getElementById("txtfromdate").value=""; document.getElementById("txttodate").value=""; $('#btntokencategory').text("Save"); window.location.href="token_category.php"; } else if(msg=="2") { alert("Already Exist"); document.getElementById("hdID").value=""; document.getElementById("ddlcategory").value="Select Token Category"; document.getElementById("txtfromdate").value=""; document.getElementById("txttodate").value=""; $('#btntokencategory').text("Save"); window.location.href="token_category.php"; } else if(msg=="3") { alert("Update Successfully"); document.getElementById("hdID").value=""; document.getElementById("ddlcategory").value="Select Token Category"; document.getElementById("txtfromdate").value=""; document.getElementById("txttodate").value=""; $('#btntokencategory').text("Save"); window.location.href="token_category.php"; } else if(msg=="4") { alert("Delete Successfully"); document.getElementById("hdID").value=""; document.getElementById("ddlcategory").value="Select Token Category"; document.getElementById("txtfromdate").value=""; document.getElementById("txttodate").value=""; $('#btntokencategory').text("Save"); window.location.href="token_category.php"; } }, error: function (request) { alert(request.responseText); } }); } } catch (Error) { alert(Error); } return; } </script> <!-- /contact-form --> <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">Token Category</h6> <h3 class="hny-title">Fill details to set<span> TOKEN CATEGORY</span></h3> </div> <div class="row align-form-map"> <div class="col-lg-12 form-inner-cont"> <input type="hidden" name="hdcanteen" id="hdcanteen" value="<?php echo $_SESSION['admincanteenname']; ?>" /> <input type="hidden" name="hdID" id="hdID" /> <input type="hidden" name="hduserid" id="hduserid" value="1" /> <div class="form-input"> <label for="w3lSender">Token Category*</label> <div class="select"> <select name="slct" id="ddlcategory"> <option>Select Token Category</option> <option value="Grocery and Liquor">Grocery and Liquor</option> <option value="Grocery">Grocery</option> <option value="Liquor">Liquor</option> </select> </div> </div> <div class="form-input"> <label for="w3lSender">From Date*</label> <input required type="text" name="txtfromdate" id="txtfromdate" placeholder="dd-MM-yyyy" title="Choose your desired date" /> </div> <div class="form-input"> <label for="w3lSender">To Date*</label> <input required type="text" name="txttodate" id="txttodate" placeholder="dd-MM-yyyy" title="Choose your desired date" /> </div> <button type="submit" style="width: 100%" name="btntokencategory" id="btntokencategory" onclick="saveupdatetokencategory();" class="btn btn-contact">Save</button> </div> </div> </div> </section> <!-- //contact-form --> <script>$('#txtfromdate').datepicker({ dateFormat: 'dd-mm-yy' }).val();</script> <script>$('#txttodate').datepicker({ dateFormat: 'dd-mm-yy' }).val();</script> <?php include "footer.php";?>
Copyright © 2025 - UnknownSec