403Webshell
Server IP : 127.0.1.1  /  Your IP : 127.0.0.1
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux sealall 5.15.0-179-generic #189-Ubuntu SMP Tue May 5 18:20:56 UTC 2026 x86_64
User : devops ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/domains/sealall.ca/wp-content/plugins/independent-analytics/IAWP/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/domains/sealall.ca/wp-content/plugins/independent-analytics/IAWP/Map_Data.php
<?php

namespace IAWP;

use IAWP\Models\Geo;
/** @internal */
class Map_Data
{
    private $geos;
    private $country_data;
    /**
     * @param Geo[] $geos
     */
    public function __construct(array $geos)
    {
        $this->geos = $geos;
        $this->country_data = $this->calculate_country_data($geos);
    }
    public function get_country_data() : array
    {
        return $this->country_data;
    }
    public function calculate_country_data($geos) : array
    {
        $countries = [];
        foreach ($geos as $geo) {
            $existing_country_index = null;
            foreach ($countries as $index => $country) {
                if ($geo->country_code() === $country['country_code']) {
                    $existing_country_index = $index;
                }
            }
            if (\is_numeric($existing_country_index)) {
                $countries[$existing_country_index]['views'] += $geo->views();
                $countries[$existing_country_index]['visitors'] += $geo->visitors();
                $countries[$existing_country_index]['sessions'] += $geo->sessions();
            } else {
                $countries[] = ['country_code' => $geo->country_code(), 'country' => $geo->country(), 'flag' => \IAWP\Icon_Directory_Factory::flags()->find($geo->country_code()), 'views' => $geo->views(), 'visitors' => $geo->visitors(), 'sessions' => $geo->sessions()];
            }
        }
        return $countries;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit