T.ME/BIBIL_0DAY
CasperSecurity


Server : Apache/2
System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User : gositeme ( 1004)
PHP Version : 8.2.29
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Directory :  /home/gositeme/domains/gositeme.com/public_html/whmcs/modules/widgets/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/gositeme.com/public_html/whmcs/modules/widgets/Activity.php
<?php

namespace WHMCS\Module\Widget;

use WHMCS\Carbon;
use WHMCS\Log\Activity as ActivityLog;
use WHMCS\Module\AbstractWidget;

/**
 * Activity Widget.
 *
 * @copyright Copyright (c) WHMCS Limited 2005-2021
 * @license https://www.whmcs.com/eula/ WHMCS Eula
 */
class Activity extends AbstractWidget
{
    protected $title = 'Activity';
    protected $description = 'Recent system activity.';
    protected $weight = 120;
    protected $cache = true;
    protected $requiredPermission = 'View Activity Log';

    public function getData()
    {
        return localAPI('GetActivityLog', array('limitstart' => 0, 'limitnum' => 10));
    }

    public function generateOutput($data)
    {
        $log = new ActivityLog();

        $output = '';
        foreach ($data['activity']['entry'] as $entry) {

            $date = Carbon::createFromFormat('Y-m-d H:i:s', $entry['date']);

            $description = $entry['description'];
            if ($entry['userId']) {
                $userLabel = ' - User ID: ' . $entry['userId'];
                if (!strpos($description, $userLabel)) {
                    $description .= $userLabel;
                }
            }

            $output .= '
                <div class="feed-element">
                    <div>
                        <small class="pull-right text-navy">' . $date->diffForHumans() . '</small>
                        <strong>' . $entry['username'] . '</strong>
                        <div>' . $log->autoLink($description) . '</div>
                        <small class="text-muted">' . $entry['ipaddress'] . '</small>
                    </div>
                </div>';
        }

        return <<<EOF
<div class="widget-content-padded">
    {$output}
</div>
EOF;
    }
}

CasperSecurity Mini