HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux aritmodecarnaval.es 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: www-data (33)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /home/www/torresncgolf/wp-content/plugins/ninja-forms/assets/js/admin-system-status.js
/*
 @var i string default
 @var l how many repeat s
 @var s string to repeat
 @var w where s should indent
 */
jQuery.wc_strPad = function(i,l,s,w) {
    var o = i.toString();
    if (!s) { s = '0'; }
    while (o.length < l) {
        // empty
        if(w == 'undefined'){
            o = s + o;
        }else{
            o = o + s;
        }
    }
    return o;
};
jQuery('#copy-system-status' ).click( function(){

    var paragraphContainer = jQuery( this ).parent();
    var report = "";

    jQuery('.nf-status-table thead, .nf-status-table tbody').each(function(){
        if ( jQuery( this ).is('thead') ) {
            report = report + "\n### " + jQuery( this ).text().trim() + " ###\n\n";
        } else {
            jQuery('tr', jQuery( this )).each(function(){
                var the_name    = jQuery.wc_strPad( jQuery( this ).find('td:eq(0)').text().trim(), 25, ' ' );
                var the_value   = jQuery( this ).find('td:eq(1)').text().trim();
                var value_array = the_value.split( ', ' );
                if ( value_array.length > 1 ){
                    // if value have a list of plugins ','
                    // split to add new line
                    var output = '';
                    var temp_line ='';
                    jQuery.each( value_array, function(key, line){
                        var tab = ( key == 0 )?0:25;
                        temp_line = temp_line + jQuery.wc_strPad( '', tab, ' ', 'f' ) + line +'\n';
                    });
                    the_value = temp_line;
                }
                report = report +''+ the_name + the_value + "\n";
            });
        }
    } );

    try {

        var tmp = jQuery("<textarea>");
        jQuery("body").append(tmp);
        tmp.val( report ).select();
        document.execCommand("copy");
        tmp.remove();

        var myModal = new jBox( 'Modal', {
          content: '<i class="fa fa-clipboard" aria-hidden="true"></i> Copied!',
          onOpen: function() {
            setTimeout(function(){ myModal.close() }, 700);
          }
        } );
         
        myModal.open();

        return false;
    } catch(e) {
        console.log( e );
    }

    return false;
});