403Webshell
Server IP : 38.190.208.107  /  Your IP : 216.73.217.46
Web Server : nginx/1.28.1
System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64
User : root ( 0)
PHP Version : 8.2.28
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv,eval,assert,passthru,system,exec,shell_exec,popen,proc_open
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/wp.3/wp-content/plugins/wp-statistics/src/Service/Admin/Geographic/Views/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/wp.3/wp-content/plugins/wp-statistics/src/Service/Admin/Geographic/Views/TabsView.php
<?php

namespace WP_Statistics\Service\Admin\Geographic\Views;

use WP_STATISTICS\Admin_Assets;
use WP_STATISTICS\Menus;
use WP_STATISTICS\Helper;
use WP_STATISTICS\Admin_Template;
use WP_Statistics\Abstracts\BaseTabView;
use WP_STATISTICS\Country;
use WP_Statistics\Service\Admin\ExportImport\ExportTypes;
use WP_Statistics\Service\Admin\Geographic\GeographicDataProvider;

class TabsView extends BaseTabView
{
    protected $dataProvider;
    protected $defaultTab = 'overview';
    protected $tabs = [
        'overview',
        'countries',
        'cities',
        'europe',
        'us',
        'regions'
    ];

    public function __construct()
    {
        parent::__construct();

        $this->dataProvider = new GeographicDataProvider([
            'per_page'  => Admin_Template::$item_per_page,
            'page'      => Admin_Template::getCurrentPaged()
        ]);
    }

    public function getOverviewData()
    {
        $data       = $this->dataProvider->getOverviewData();
        $chartData  = $this->dataProvider->getOverviewChartData();

        // Send map chart to the view as well
        $data['map_data'] = $chartData['map_chart_data'];

        wp_localize_script(Admin_Assets::$prefix, 'Wp_Statistics_Geographic_Object', $chartData);

        return $data;
    }

    public function getCountriesData()
    {
        return $this->dataProvider->getCountriesData();
    }

    public function getCitiesData()
    {
        return $this->dataProvider->getCitiesData();
    }

    public function getEuropeData()
    {
        return $this->dataProvider->getEuropeData();
    }

    public function getUsData()
    {
        return $this->dataProvider->getUsData();
    }

    public function getRegionsData()
    {
        return $this->dataProvider->getRegionsData();
    }

    public function render()
    {
        $currentTab     = $this->getCurrentTab();
        $data           = $this->getTabData();
        $countryCode    = Helper::getTimezoneCountry();

        $args = [
            'title'      => esc_html__('Geographic', 'wp-statistics'),
            'pageName'   => Menus::get_page_slug('geographic'),
            'paged'      => Admin_Template::getCurrentPaged(),
            'custom_get' => ['tab' => $currentTab],
            'DateRang'   => Admin_Template::DateRange(),
            'hasDateRang'=> true,
            'data'       => $data,
            'tabs'       => [
                [
                    'id'      => 'overview',
                    'link'    => Menus::admin_url('geographic', ['tab'   => 'overview']),
                    'title'   => esc_html__('Overview', 'wp-statistics'),
                    'class'   => $this->isTab('overview') ? 'current' : '',
                    'export'  => [ExportTypes::CSV_METRICS, ExportTypes::PDF_PAGE]
                ],
                [
                    'id'      => 'countries',
                    'link'    => Menus::admin_url('geographic', ['tab'   => 'countries']),
                    'title'   => esc_html__('Countries', 'wp-statistics'),
                    'tooltip' => esc_html__('Displays visitor counts from different countries.', 'wp-statistics'),
                    'class'   => $this->isTab('countries') ? 'current' : '',
                    'export'  => [ExportTypes::CSV_TABLE, ExportTypes::PDF_PAGE]
                ],
                [
                    'id'      => 'cities',
                    'link'    => Menus::admin_url('geographic', ['tab' => 'cities']),
                    'title'   => esc_html__('Cities', 'wp-statistics'),
                    'tooltip' => esc_html__('Displays visitor data based on their cities of origin.', 'wp-statistics'),
                    'class'   => $this->isTab('cities') ? 'current' : '',
                    'export'  => [ExportTypes::CSV_TABLE, ExportTypes::PDF_PAGE]
                ],
                [
                    'id'      => 'europe',
                    'link'    => Menus::admin_url('geographic', ['tab'   => 'europe']),
                    'title'   => esc_html__('European Countries', 'wp-statistics'),
                    'tooltip' => esc_html__('Displays visitor counts from European countries.', 'wp-statistics'),
                    'class'   => $this->isTab('europe') ? 'current' : '',
                    'export'  => [ExportTypes::CSV_TABLE, ExportTypes::PDF_PAGE]
                ],
                [
                    'id'      => 'us',
                    'link'    => Menus::admin_url('geographic', ['tab'   => 'us']),
                    'title'   => esc_html__('US States', 'wp-statistics'),
                    'tooltip' => esc_html__('Displays visitor counts categorized by states within the USA.', 'wp-statistics'),
                    'class'   => $this->isTab('us') ? 'current' : '',
                    'export'  => [ExportTypes::CSV_TABLE, ExportTypes::PDF_PAGE]
                ]
            ],
        ];

        // If the country is US, or Unknown, hide region tab
        if ($countryCode && $countryCode != 'US') {
            $regionsTab = [
                'id'      => 'regions',
                'link'    => Menus::admin_url('geographic', ['tab'   => 'regions']),
                'title'   => sprintf(esc_html__('Regions of %s', 'wp-statistics'), Country::getName($countryCode)),
                'tooltip' => esc_html__('Displays visitor statistics for regions within your website’s country, based on your website’s timezone setting.', 'wp-statistics'),
                'class'   => $this->isTab('regions') ? 'current' : '',
                'export'  => [ExportTypes::CSV_TABLE, ExportTypes::PDF_PAGE]
            ];

            array_splice($args['tabs'], 4, 0, [$regionsTab]);
        }

        if (isset($data['total']) && $data['total'] > 0) {
            $args['total'] = $data['total'];

            $args['pagination'] = Admin_Template::paginate_links([
                'total' => $data['total'],
                'echo'  => false
            ]);
        }

        Admin_Template::get_template(['layout/header', 'layout/tabbed-page-header', "pages/geographic/$currentTab", 'layout/postbox.hide', 'layout/footer'], $args);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit