UnknownSec Bypass
403
:
/
var
/
www
/
html
/
adminpnl
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
add_customer.php
<?php include "top.php"; ?> <script type="text/javascript"> $(document).ready(function () { var id= getUrlVars()['id'] ; var op= getUrlVars()['op'] ; var cantten=""; if(id!="") { $.ajax({ method: 'post', url: 'customergetdetails.php', data: '®isid='+id+'&canteenname='+cantten, dataType:"JSON", success:function(data) { id=""; $('#hdID').val(data.regisid); $('#txtName').val(data.name); $('#txtpersonalno').val(data.personalno); $('#txtrank').val(data.cusrank); $('#txtmobileno').val(data.mobileno); $('#txtpassword').val(data.cuspassword); if(op=="Update") { $('#btnsavecustomer').text("Update"); document.getElementById("txtName").focus(); } else if(op=="Delete") { $('#btnsavecustomer').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 SaveCustomer() { var flag = true; var inputField1 =document.getElementById("txtName"); if (inputField1.value == "") { flag = false; alert("Please enter name."); document.getElementById("txtName").focus(); return false; } var inputField2 = document.getElementById("txtpersonalno"); if (inputField2.value == "") { flag = false; alert("Please enter personal no."); document.getElementById("txtpersonalno").focus(); return false; } var inputField3 = document.getElementById("txtrank"); if (inputField3.value == "") { flag = false; alert("Please enter rank."); document.getElementById("txtrank").focus(); return false; } var inputField4 = document.getElementById("txtmobileno"); if (inputField4.value == "") { flag = false; alert("Please enter mobile no."); document.getElementById("txtmobileno").focus(); return false; } var inputField5 = document.getElementById("txtpassword"); if (inputField5.value == "") { flag = false; alert("Please enter password."); document.getElementById("txtpassword").focus(); return false; } var name = document.getElementById("txtName").value; var personalno = document.getElementById("txtpersonalno").value; var rank = document.getElementById("txtrank").value; var mobileno = document.getElementById("txtmobileno").value; var password = document.getElementById("txtpassword").value; var id = document.getElementById("hdID").value; var btntext = document.getElementById("btnsavecustomer").innerHTML; var canteen= document.getElementById("hdcanteen").value; var userid = document.getElementById("hduserid").value; var text = "Do you want "+btntext+ " customer details"; if (confirm(text) == false) { flag=false; return false; } try { if (flag == true) { var urlgetcode = 'customer_save_update.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&name='+ name +'&personalno='+ personalno+'&cusrank='+rank+'&mobileno='+mobileno+'&cuspassword='+password +'®isid='+ id +'&canteenname='+ canteen+'&btntext='+btntext+'&userdetailid='+userid, dataType: 'json', async: true, cache: false, success: function (msg) { if(msg=="1") { alert("Save Successfully"); $('#hdID').val(""); $('#txtName').val(""); $('#txtpersonalno').val(""); $('#txtrank').val(""); $('#txtmobileno').val(""); $('#txtpassword').val(""); $('#btnsavecustomer').text("Save"); window.location.href="add_customer.php"; } else if(msg=="2") { alert("Already Exist"); $('#hdID').val(""); $('#txtName').val(""); $('#txtpersonalno').val(""); $('#txtrank').val(""); $('#txtmobileno').val(""); $('#txtpassword').val(""); $('#btnsavecustomer').text("Save"); window.location.href="add_customer.php"; } else if(msg=="3") { alert("Update Successfully"); $('#hdID').val(""); $('#txtName').val(""); $('#txtpersonalno').val(""); $('#txtrank').val(""); $('#txtmobileno').val(""); $('#txtpassword').val(""); $('#btnsavecustomer').text("Save"); window.location.href="customer.php"; } else if(msg=="4") { alert("Delete Successfully"); $('#hdID').val(""); $('#txtName').val(""); $('#txtpersonalno').val(""); $('#txtrank').val(""); $('#txtmobileno').val(""); $('#txtpassword').val(""); $('#btnsavecustomer').text("Save"); window.location.href="customer.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">Customer Registration</h6> <h3 class="hny-title">Fill details to register<span> NEW CUSTOMER</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" /> <input type="hidden" name="hduserid" id="hduserid" value="<?php echo $_SESSION['adminuserid']; ?>" /> <div class="form-input"> <label for="w3lSender">Name*</label> <input type="text" name="txtName" id="txtName" placeholder="" required="" /> </div> <div class="form-input"> <label for="w3lSender">Personal No.*</label> <input type="text" name="txtpersonalno" id="txtpersonalno" placeholder="" required="" /> </div> <div class="form-input"> <label for="w3lSender">Rank*</label> <input type="text" name="txtrank" id="txtrank" placeholder="" required="" /> </div> <div class="form-input"> <label for="w3lSender">Mobile No.*</label> <input type="text" name="txtmobileno" id="txtmobileno" placeholder="" required="" /> </div> <div class="form-input"> <label for="w3lSender">Password*</label> <input type="text" name="txtpassword" id="txtpassword" placeholder="" required="" /> </div> <button type="submit" style="width: 100%" name="btnsavecustomer" id="btnsavecustomer" onclick="SaveCustomer();" class="btn btn-contact">Save</button> </div> </div> </div> </section> <!-- //contact-form --> <?php include "footer.php";?>
Copyright © 2025 - UnknownSec