HEX
Server: Apache
System: Linux web2213.uni5.net 5.4.282-1.el8.elrepo.x86_64 #1 SMP Mon Aug 19 18:33:22 EDT 2024 x86_64
User: clinicamaciel (596848)
PHP: 7.3.33
Disabled: apache_child_terminate,c99_buff_prepare,c99_sess_put,dl,eval,exec,leak,link,myshellexec,openlog,passthru,pclose,pcntl_exec,php_check_syntax,php_strip_whitespace,popen,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,symlink,system,socket_listen,socket_create_listen,putenv
Upload Files
File: /home/clinicamaciel/www/index/wp-content/plugins/w3-total-cache/lib/NetDNA/NetDNAPresentation.php
<?php

class NetDNAPresentation {

    public static function format_popular($popular_files) {
        $formatted = array();
        foreach ($popular_files as $file) {
            // basename cannot be used, kills chinese chars and similar characters
            $filename = substr($file['uri'], strrpos($file['uri'], '/')+1);
            $formatted[] = array('file' => $filename, 'title' => $file['uri'],
                'group' => self::get_file_group($file['uri']), 'hit' => $file['hit']);
        }

        return $formatted;
    }

    public static function group_hits_per_filetype_group($filetypes) {
        $groups = array();
        foreach ($filetypes as $file) {
            $file_group = self::get_file_group($file['file_type']);
            if (!isset($groups[$file_group]))
                $groups[$file_group] = 0;
            $groups[$file_group] += $file['hit'];
        }
        return $groups;
    }
    public static function get_file_group($uri) {
        $uri_exploded = explode('.', $uri);
        $ext = end($uri_exploded);
        switch ($ext) {
            case 'css':
            case 'js':
                return $ext;
                break;
            case 'png':
            case 'tiff':
            case 'gif':
            case 'jpg':
            case 'jpeg':
                return 'images';
                break;
            default:
                return 'misc';
                break;
        }
    }

    public static function get_file_group_color($group) {
        switch ($group){
            case 'css':
                return '#739468';
            case 'js':
                return '#ffb05d';
            case 'images':
                return '#b080df';
            default:
                return '#4ba0fa';
        }
    }

    public static function get_account_status($status)  {
        switch ($status) {
            case 1:
                return __('Pending', 'w3-total-cache');
            case 2:
                return __('Active', 'w3-total-cache');
            case 3:
                return __('Cancelled', 'w3-total-cache');
            case 4:
                return __('Suspended', 'w3-total-cache');
            case 5:
                return __('Fraud', 'w3-total-cache');
            default:
                return __('unknown', 'w3-total-cache');
        }
    }
}