Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/ecom1.picotech.app/public_html_ecom1/Modules/Refund/Resources/assets/js/ drwxr-xr-x |
Viewing file: Select action/file-type: "use strict";const refundDt=new DataTransfer;var refundObj={};function quantitySelect(){var qty=$("select[name='order_items']").find(":selected").data("quantity"),orderDetailId=$("select[name='order_items']").find(":selected").data("order_detail_id");$('input[name="order_detail_id"]').val(orderDetailId),$("select[name='quantity_sent']").html(`<option value="">${jsLang("Select one")}</option>`);for(let index=1;index<=qty;index++)$("select[name='quantity_sent']").append(`\n <option value="${index}">${index}</option>\n `)}imgInp.onchange=evt=>{for(var files=imgInp.files,filesLength=files.length,i=0;i<filesLength;i++){var f=files[i];if(i<5&&refundDt.files.length<5){refundDt.items.add(f);var rand=(Math.random()+1).toString(36).substring(7);refundObj[rand]=f;var fileReader=new FileReader;fileReader.onload=function(e){$("#refund_image").append(`\n <div class="refund-image mt-5">\n <img data-file="${rand}" class="r-img w-16 h-16 object-cover neg-transition-scale" src="${e.target.result}"/>\n <span>❌</span>\n </div>\n `)},fileReader.readAsDataURL(f)}}imgInp.files=refundDt.files},$(document).on("click",".refund-image span",(function(){var file_key=$(this).siblings(".r-img").attr("data-file"),file=refundObj.file_key;refundDt.items.remove(file),$("#imgInp")[0].files=refundDt.files,$(this).closest("div.refund-image").remove()}));var itemFind=!1;function findProducts(reference){$.ajax({url:SITE_URL+"/user/refund-products/"+reference,type:"GET",dataType:"JSON",success:function(data){$("#order_items").html(`<option value="">${jsLang("Select one")}</option>`);for(const key in data[reference])$("#order_items").append(`\n <option ${product_id==data[reference][key].product_id?"selected":""} data-order_detail_id="${data[reference][key].id}" data-quantity="${data[reference][key].quantity}" value="${data[reference][key].product_id}">${data[reference][key].product_name}</option>\n `);itemFind=!0}})}if(product_id>0){findProducts($("select[name='order_reference']").val());var refund_count=1,intervals=setInterval(()=>{refund_count++,1==itemFind&&(quantitySelect(),clearInterval(intervals)),300==refund_count&&clearInterval(intervals)},100)}$("select[name='order_reference']").on("change",(function(){var tmp=this;clearTimeout(debounce);var debounce=setTimeout((function(){var reference=$(tmp).val();reference?findProducts(reference):($("#order_items").html(`<option value="">${jsLang("Select one")}</option>`),$("select[name='quantity_sent']").html(`<option value="">${jsLang("Select one")}</option>`))}),100)})),$("select[name='order_items']").on("change",(function(){quantitySelect()}));var messageBox=$(".message-box");messageBox.scrollTop(messageBox.prop("scrollHeight")),$(".refund-select").select2(); |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0039 ]-- |