UnknownSec Bypass
403
:
/
var
/
www
/
jpsagrisolution
/
cpanel
/
product_images
/
sym
/
root
/
var
/
www
/
stbilling
/
cpanel
/ [
drwxrwxr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
add_product.php
<?php include "top.php";?> <script> $(document).ready(function() { var id = getUrlVars()['id']; var op = getUrlVars()['op']; if (id != "") { $.ajax({ method: 'POST', url: 'get_product.php', data: '&id=' + id, dataType: "JSON", success: function(data) { $('#hdid').val(data.hdid); $('#product').val(data.name); $('#unit').val(data.unit); $('#hsncode').val(data.hsncode); $('#salesprice').val(data.salesprice); $('#cgst').val(data.cgst); $('#sgst').val(data.sgst); $('#igst').val(data.igst); if (op == "Update") { $('#pageheading').text("UPDATE PRODUCT"); $('#btnopration').text("Update"); document.getElementById("product").focus(); } else if (op == "Delete") { $('#pageheading').text("DELETE PRODUCT"); $('#btnopration').text("Delete"); document.getElementById("partyname").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 selectCountry(val) { $("#search-box").val(val); $("#suggesstion-box").hide(); } function isNumberKey(evt, element) { var charCode = (evt.which) ? evt.which : event.keyCode if (charCode > 31 && (charCode < 48 || charCode > 57) && !(charCode == 46 || charCode == 8)) return false; else { var len = $(element).val().length; var index = $(element).val().indexOf('.'); if (index > 0 && charCode == 46) { return false; } if (index > 0) { var CharAfterdot = (len + 1) - index; if (CharAfterdot > 3) { return false; } } } return true; } function sum() { var txtFirstNumberValue = document.getElementById('cgst').value; var txtSecondNumberValue = document.getElementById('sgst').value; if (txtFirstNumberValue == "") txtFirstNumberValue = 0; if (txtSecondNumberValue == "") txtSecondNumberValue = 0; var result = parseInt(txtFirstNumberValue) + parseInt(txtSecondNumberValue); if (!isNaN(result)) { document.getElementById('igst').value = result; } } function saveemployee() { var flag = true; var inputField1 = document.getElementById("product"); if (inputField1.value == "") { flag = false; alert("Please enter Product name"); document.getElementById("Product").focus(); return false; } var inputField2 = document.getElementById("unit"); if (inputField2.value == "") { flag = false; alert("Please select unit"); document.getElementById("unit").focus(); return false; } var inputField3 = document.getElementById("salesprice"); if (inputField3.value == "") { flag = false; alert("Please enter sales price."); document.getElementById("salesprice").focus(); return false; } var inputField4 = document.getElementById("cgst"); if (inputField4.value == "") { flag = false; alert("Please enter cgst"); document.getElementById("cgst").focus(); return false; } var inputField13 = document.getElementById("sgst"); if (inputField13.value == "") { flag = false; alert("Please enter sgst"); document.getElementById("sgst").focus(); return false; } var inputField14 = document.getElementById("igst"); if (inputField14.value == "") { flag = false; alert("Please enter igst"); document.getElementById("igst").focus(); return false; } var productname = document.getElementById("product").value; var hsncode = document.getElementById("hsncode").value; var unit = document.getElementById("unit").value; var salesprice = document.getElementById("salesprice").value; var cgst = document.getElementById("cgst").value; var sgst = document.getElementById("sgst").value; var igst = document.getElementById("igst").value; var hdid = document.getElementById("hdid").value; var btnopration = document.getElementById("btnopration").innerHTML; var text = "Do you want " + btnopration + " product"; if (confirm(text) == false) { flag = false; return false; } try { if (flag == true) { var urlgetcode = 'manage_product.php'; $.ajax({ method: 'POST', url: urlgetcode, data: '&productname=' + productname + '&hsncode=' + hsncode + '&unit=' + unit + '&salesprice=' + salesprice + '&cgst=' + cgst + '&sgst=' + sgst + '&igst=' + igst + '&hdid=' + hdid + '&btnopration=' + btnopration, dataType: 'json', async: true, cache: false, success: function(msg) { if (msg == "1") { alert("Save Successfully"); $('#hdid').val(""); $('#Product').val(""); $('#hsncode').val(""); $('#unit').val(""); $('#salesprice').val(""); $('#cgst').val(""); $('#sgst').val(""); $('#igst').val(""); $('#btnopration').text("Save"); window.location.href = "list_product.php"; } else if (msg == "2") { alert("Product name already exist"); $('#hdid').val(""); $('#Product').val(""); $('#hsncode').val(""); $('#unit').val(""); $('#salesprice').val(""); $('#cgst').val(""); $('#sgst').val(""); $('#igst').val(""); $('#btnopration').text("Save"); window.location.href = "list_product.php"; } else if (msg == "3") { alert("Update Successfully"); $('#hdid').val(""); $('#Product').val(""); $('#hsncode').val(""); $('#unit').val(""); $('#salesprice').val(""); $('#cgst').val(""); $('#sgst').val(""); $('#igst').val(""); $('#btnopration').text("Save"); window.location.href = "list_product.php"; } else if (msg == "4") { alert("Delete Successfully"); $('#hdid').val(""); $('#employeename').val(""); $('#designation').val("-"); $('#gender').val("-"); $('#maritalstatus').val("-"); $('#dateofbirth').val(""); $('#dateofjoining').val(""); $('#mobileno').val(""); $('#emailid').val(""); $('#aadharno').val(""); $('#panno').val(""); $('#currentaddress').val(""); $('#parmanentaddress').val(""); $('#state').val("Select"); $('#district').val("Select"); $('#username').val(""); $('#userpassword').val(""); $('#btnopration').text("Save"); window.location.href = "list_employee.php"; } else if (msg == "5") { alert("Product can not be deleted because it is in use"); $('#hdid').val(""); $('#employeename').val(""); $('#designation').val("-"); $('#gender').val("-"); $('#maritalstatus').val("-"); $('#dateofbirth').val(""); $('#dateofjoining').val(""); $('#mobileno').val(""); $('#emailid').val(""); $('#aadharno').val(""); $('#panno').val(""); $('#currentaddress').val(""); $('#parmanentaddress').val(""); $('#state').val("Select"); $('#district').val("Select"); $('#username').val(""); $('#userpassword').val(""); $('#btnopration').text("Save"); window.location.href = "list_employee.php"; } }, error: function(request) { alert(request.responseText); } }); } } catch (Error) { alert(Error); } return; } </script> <!-- main content start--> <div id="page-wrapper"> <div class="main-page"> <div class="forms"> <div class="row"> <div class="col-md-3 grid_box1"> <h4 id="pageheading">ADD PRODUCT</h4> </div> <div class="col-md-6 grid_box1"> </div> <div class="col-md-3 grid_box1"> <a href="list_product.php" class="btn btn-primary" style="width: 100%">Back To product list List</a> </div> </div> <div class="row"> <div class="form-three widget-shadow"> <div class="form-horizontal"> <div class="form-group"> <input type="hidden" class="form-control1" id="hdid" name="hdid"> <label for="employeename" class="col-sm-2 control-label">Product Name</label> <div class="col-sm-10"> <input type="text" class="form-control1" id="product" name="product" placeholder="Enter Product Name"> </div> </div> <div class="form-group"> <label for="mobileno" class="col-sm-2 control-label">HSN Code.</label> <div class="col-sm-4"> <input type="text" class="form-control1" id="hsncode" name="hsncode" placeholder="Please enter hsn code"> </div> <label for="emailid" class="col-sm-2 control-label">Unit</label> <div class="col-sm-4"> <select name="unit" id="unit" class="form-control" style="width: 100%;"> <option>SQFT </option> <option>PCS </option> <option>UNIT </option> </select> </div> </div> <div class="form-group"> <label for="mobileno" class="col-sm-2 control-label">Sales Price</label> <div class="col-sm-4"> <input type="text" class="form-control1" id="salesprice" name="salesprice" onkeypress="return isNumberKey(event,this);" placeholder="Please enter sales price"> </div> <label for="emailid" class="col-sm-2 control-label">Cgst in %</label> <div class="col-sm-4"> <input type="text" class="form-control1" id="cgst" name="cgst" onkeypress="return isNumberKey(event,this);" onkeyup="sum();" placeholder="Please enter Cgst"> </div> </div> <div class="form-group"> <label for="mobileno" class="col-sm-2 control-label">Sgst in %</label> <div class="col-sm-4"> <input type="text" class="form-control1" id="sgst" name="sgst" onkeypress="return isNumberKey(event,this);" onkeyup="sum();" placeholder="Please enter Sgst"> </div> <label for="emailid" class="col-sm-2 control-label">Igst in %</label> <div class="col-sm-4"> <input type="text" class="form-control1" id="igst" name="igst" onkeypress="return isNumberKey(event,this);" disabled="disabled" placeholder="Please enter Igst"> </div> </div> <div align="center"> <button type="submit" id="btnopration" class="btn btn-default" onclick="saveemployee();">Save</button> </div> </div> </div> </div> </div> </div> </div> <!-- main content end--> <!-- script references --> <?php include "footer.php";?>
Copyright © 2025 - UnknownSec