HEX
Server: Apache
System: Linux WWW 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64
User: web11 (1011)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/intranet.kauko.lt/wp-content/plugins/employee-directory/assets/js/emd-import-set.js
jQuery(document).ready(function($){
        $('.emd-import').click(function(e){
                $('#'+ imp_vars.action).click();
        });
        $('#'+imp_vars.action).change(function(e){
                fname = $(this).val();
                var file_data = $(this).prop('files')[0];
                var myd = new FormData();
                myd.append('file', file_data);
                myd.append('action', imp_vars.action);
                myd.append('fname', fname);
                myd.append('app', $(this).data('app'));
                myd.append('nonce',imp_vars.nonce);
                $.ajax({
                        type : 'POST',
                        url: imp_vars.ajax_url,
                        contentType: false,
                        processData: false,
                        data: myd,
                        success : function(resp) {
                                if(resp){
                                        //refresh page
                                        window.location.href = imp_vars.ret_url;
                                }
                                else {
                                        alert(imp_vars.import_err);
                                }
                        }
                });
        });
});