diff --git a/source/packages/mod_mokosuiteclient_cpanel/tmpl/default.php b/source/packages/mod_mokosuiteclient_cpanel/tmpl/default.php index 9a3fbc97..ffa65e9c 100644 --- a/source/packages/mod_mokosuiteclient_cpanel/tmpl/default.php +++ b/source/packages/mod_mokosuiteclient_cpanel/tmpl/default.php @@ -1,9 +1,6 @@ 0, 'users' => 0, 'extensions' => 0, 'updates' => 0]; $disk = $disk ?? (object) ['free_mb' => null, 'total_mb' => null]; $currentIp = $currentIp ?? ''; -$collapsed = true; -$showHealth = $params->get('show_health', 1); -$showStats = $params->get('show_stats', 1); -$showDisk = $params->get('show_disk', 1); -$showIp = $params->get('show_ip', 1); -$showPlugins = $params->get('show_plugins', 1); -$showActions = $params->get('show_actions', 1); -$showVersions = $params->get('show_versions', 1); -$token = Session::getFormToken(); +$token = Session::getFormToken(); +$showPlugins = $params->get('show_plugins', 1); $enabledCount = 0; $totalCount = count($plugins); - -foreach ($plugins as $p) -{ - if ($p->enabled) - { - $enabledCount++; - } +foreach ($plugins as $p) { + if ($p->enabled) $enabledCount++; } $labels = [ @@ -52,41 +35,106 @@ $labels = [ 'mokosuiteclient_offline' => 'Offline Bypass', 'mokosuiteclient_dbip' => 'GeoIP Lookup', 'mokosuiteclient_license' => 'License Manager', + 'mokosuiteclient_backup' => 'Backup Bridge', ]; -$diskPct = ($disk->total_mb && $disk->total_mb > 0) - ? round((($disk->total_mb - ($disk->free_mb ?? 0)) / $disk->total_mb) * 100) - : null; -$diskColor = ($diskPct !== null && $diskPct > 90) ? 'bg-danger' : (($diskPct !== null && $diskPct > 75) ? 'bg-warning' : 'bg-success'); +$diskPct = ($disk->total_mb && $disk->total_mb > 0) + ? round((($disk->total_mb - ($disk->free_mb ?? 0)) / $disk->total_mb) * 100) : null; +$diskColor = ($diskPct !== null && $diskPct > 90) ? 'danger' : (($diskPct !== null && $diskPct > 75) ? 'warning' : 'success'); + +$canDashboard = Factory::getApplication()->getIdentity()->authorise('core.manage', 'com_mokosuiteclient'); +$siteName = htmlspecialchars($siteInfo->sitename ?? '', ENT_QUOTES, 'UTF-8'); +$mokoVer = htmlspecialchars($siteInfo->mokosuiteclient_version ?? '', ENT_QUOTES, 'UTF-8'); +$joomlaVer = htmlspecialchars($siteInfo->joomla_version ?? '', ENT_QUOTES, 'UTF-8'); +$phpVer = htmlspecialchars($siteInfo->php_version ?? '', ENT_QUOTES, 'UTF-8'); +$dbType = htmlspecialchars($siteInfo->db_type ?? '', ENT_QUOTES, 'UTF-8'); +$ipEscaped = htmlspecialchars($currentIp, ENT_QUOTES, 'UTF-8'); + +$statusDots = []; +if (!empty($siteInfo->debug)) $statusDots[] = 'Debug'; +if (!empty($siteInfo->offline)) $statusDots[] = 'Offline'; +if (($counts->updates ?? 0) > 0) $statusDots[] = '' . (int)$counts->updates . ' updates'; ?> -
+
+
+
+
+