Uname:Linux localhost.localdomain 5.14.0-596.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jun 27 16:02:33 UTC 2025 x86_64

403WebShell
403Webshell
Server IP : 14.225.216.240  /  Your IP : 216.73.216.26
Web Server : nginx/1.20.1
System : Linux localhost.localdomain 5.14.0-596.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jun 27 16:02:33 UTC 2025 x86_64
User : taidh ( 1001)
PHP Version : 8.3.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/pts/st/assets/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/pts/st/assets/pts.dz.js
(function ($) {
    jQuery.ajaxSetup({
        headers: {
            "X-CSRF-TOKEN": jQuery('meta[name="_token"]').attr("content"),
        },
    });

    // Set image value & validate it ( if any )
    setFile = function(val, id, maxFiles, field) {
        let v = val;
        let isUpload = true;
        if (maxFiles > 1){
            var  arr = [];
            var data = jQuery('#' + field, parent.document).val();
            if (data.trim() != '') {
                try {
                    arr = JSON.parse(data);
                } catch(e) {}
            }
            arr.push({file:val, guid: id});
            
            v = JSON.stringify(arr);
            if (arr.length > maxFiles) {
                isUpload = false;
            }
        } else {
            const dropzoneIdx = $(`#${field}`).data('idx');
            $(`#filesActions-${dropzoneIdx}`).hide();
        }
        if (!isUpload) {
            const dropzoneIdx = $(`#${field}`).data('idx');
            $(`#filesActions-${dropzoneIdx}`).hide();
        } else {
            $('#' + field, parent.document).val(v).trigger('change');				
            var form = $('form', parent.document);
            form.formValidation('revalidateField', $(`#${field}`).attr('name'));
        }
        return isUpload;
    }
    
    // Remove file
    removeFile = function(url, id, maxFiles, field, $data = {}) {
        const dropzoneIdx = $(`#${field}`).data('idx');
        
        if (typeof(id) != 'undefined') {
            $(`#${id}`).remove();
        }
        $.ajax({
            url: url,
            type: 'DELETE',
            data: $data,
            success: function(response) {	
                let v = '';
                if (maxFiles > 1){
                    let  arr = [];
                    const data = jQuery('#' + field, parent.document).val();
                    if (data.trim() != '') {
                        try {
                            arr = JSON.parse(data);
                        } catch(e) {}							
                    }
                    let val = '';
                    if (arr.length > 0) {
                        for (var i = 0; i < arr.length; i++) {
                            if (arr[i]?.guid == id || (arr[i]?.file == response?.file && response?.file != null) || (arr[i]?.guid == $data?.guid && $data?.guid != null) || (arr[i]?.file == $data?.image && arr[i]?.file != null)) {
                                arr.splice(i, 1);
                            }
                        }
                        if (arr.length > 0) { val = JSON.stringify(arr); }
                    } 
                    v = val;
                    if (arr.length < maxFiles) {
                        $(`#filesActions-${dropzoneIdx}`).show();
                    }
                } else {
                    $(`#filesActions-${dropzoneIdx}`).show();
                }																			
                $('#' + field, parent.document).val(v).trigger('change');	
                var form = $('form', parent.document);
                form.formValidation('revalidateField', $(`#${field}`).attr('name'));		
            }
        });
    }

    jQuery('body').on('click', 'button.dz-delete', function(e){
        e.preventDefault();
        const $this = $(this);
        const $url = $this.data('url');
        const $field = $this.data('field');
        const $maxFiles = $this.data('max-files');
        const $id = $this.data('id');
        const $image = $this.data('image');
        const $guid = $this.data('guid');
        removeFile($url, $id, $maxFiles, $field, {
            image: JSON.stringify($image),
            manual: true,
            guid: $guid
        });
    });

    videoValidation = (value, _validator, $field) => {
		const $url = $(`#${$field.data('field')}`).val() || '';
		let result = true;
		if (_.isEmpty(value) && _.isEmpty($url)) {
			result = false;
		}
		return result;
	}
})(jQuery);

Youez - 2016 - github.com/yon3zu
LinuXploit