X7ROOT File Manager
Current Path:
/home/mysptejz/public_html/billing/modules/widgets
home
/
mysptejz
/
public_html
/
billing
/
modules
/
widgets
/
ðŸ“
..
📄
Activity.php
(1.7 KB)
📄
Automation.php
(8.34 KB)
📄
Badges.php
(3.54 KB)
📄
Billing.php
(1.8 KB)
📄
ClientActivity.php
(3.59 KB)
📄
Health.php
(3.19 KB)
📄
MarketConnect.php
(4.85 KB)
📄
NetworkStatus.php
(2.47 KB)
📄
Overview.php
(11.26 KB)
📄
Staff.php
(1.25 KB)
📄
Support.php
(3.54 KB)
📄
ToDo.php
(4.61 KB)
📄
index.php
(37 B)
Editing: Staff.php
<?php namespace WHMCS\Module\Widget; use WHMCS\Carbon; use WHMCS\Module\AbstractWidget; use WHMCS\User\AdminLog; /** * Staff Widget. * * @copyright Copyright (c) WHMCS Limited 2005-2021 * @license https://www.whmcs.com/eula/ WHMCS Eula */ class Staff extends AbstractWidget { protected $title = 'Staff Online'; protected $description = 'An overview of staff.'; protected $weight = 300; protected $cache = true; protected $cacheExpiry = 60; public function getData() { return AdminLog::with('admin')->online()->get(); } public function generateOutput($data) { $staffOutput = ''; foreach ($data as $session) { $sessionAge = Carbon::createFromFormat('Y-m-d H:i:s', $session['lastvisit'])->diffForHumans(); $staffOutput .= <<<HTML <div class="staff"> <img src="https://www.gravatar.com/avatar/{$session['admin']['gravatarHash']}?s=60&d=mp" width="60" height="60" alt="Gravatar Icon"/> <div class="name">{$session['admin']['firstname']} {$session['admin']['lastname']}</div> <div class="note text-muted">{$sessionAge}</div> </div> HTML; } return <<<EOF <div class="widget-staff-container clearfix"> {$staffOutput} </div> EOF; } }
Upload File
Create Folder