Server IP : 213.176.29.180 / Your IP : 3.148.105.152 Web Server : Apache System : Linux 213.176.29.180.hostiran.name 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64 User : webtaragh ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/webtaragh/public_html/whmcs/downloads/../modules/widgets/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php namespace WHMCS\Module\Widget; use WHMCS\Carbon; use WHMCS\Module\AbstractWidget; use WHMCS\User\AdminLog; /** * Staff Widget. * * @copyright Copyright (c) WHMCS Limited 2005-2020 * @license https://www.whmcs.com/license/ WHMCS Eula */ class Staff extends AbstractWidget { protected $title = 'کارمندان آنلاین'; protected $description = 'مشاهده کارمندان آنلاین شما'; protected $weight = 50; protected $cache = true; protected $cacheExpiry = 60; public function getData() { return AdminLog::with('admin')->online()->get(); } public function generateOutput($data) { $staffOutput = ''; //phpcs:disable foreach ($data as $session) { $staffOutput .= '<div class="staff">' . '<img src="https://www.gravatar.com/avatar/' . $session['admin']['gravatarHash'] . '?s=60&d=mp" width="60" height="60" alt="Gravatar"/>' . '<div class="name">' . $session['admin']['firstname'] . ' ' . $session['admin']['lastname'] . '</div>' . '<div class="note text-muted">' . Carbon::createFromFormat('Y-m-d H:i:s', $session['lastvisit'])->diffForHumans() . '</div>' . '</div>'; } //phpcs:enable return <<<EOF <div class="widget-staff-container clearfix"> {$staffOutput} </div> EOF; } }