getAllSessions(); // Find current session details to get Hotspot Name / IP $currentSessionDetails = []; foreach ($allSessions as $s) { if (isset($session) && $s['session_name'] === $session) { $currentSessionDetails = $s; break; } } // Determine label: Hotspot Name > IP Address > 'MIVO' $sessionLabel = $currentSessionDetails['hotspot_name'] ?? $currentSessionDetails['ip_address'] ?? 'MIVO'; if (empty($sessionLabel)) { $sessionLabel = $currentSessionDetails['ip_address'] ?? 'MIVO'; } // Helper for Session Initials (Kebab-friendly) $getInitials = function($name) { if (empty($name)) return 'UN'; if (strpos($name, '-') !== false) { $parts = explode('-', $name); $initials = ''; foreach ($parts as $part) { if (!empty($part)) $initials .= substr($part, 0, 1); } return strtoupper(substr($initials, 0, 2)); } return strtoupper(substr($name, 0, 2)); }; ?>
MIVO