diff --git a/include/adminlist.php b/include/adminlist.php index 3470eaa..e7599d8 100644 --- a/include/adminlist.php +++ b/include/adminlist.php @@ -66,12 +66,20 @@ function getAdminList() { $offlineClients[] = '
' . htmlspecialchars($userInfo['client_nickname']) . '' . translate($lang["adminlist"]["status"]["offline"]) . '
'; continue; } + + $userAwayTitle = ''; + if(!$user["client_away_message"]) { $userAway = translate($lang["adminlist"]["status"]["away"]); - }else{ + } else { $userAway = htmlspecialchars($user["client_away_message"]); + if (mb_strlen($userAway) > 23) { + $userAwayTitle = 'title="' . $userAway . '"'; + $userAway = mb_substr($userAway, 0, 23) . "..."; + } } - $onlineClients[] = '' . '' . htmlspecialchars($user) . '' . ($user['client_away'] ? '' . $userAway . '' : '' . translate($lang["adminlist"]["status"]["online"]) . '') . '
'; + + $onlineClients[] = '' . '' . htmlspecialchars($user) . '' . ($user['client_away'] ? '' . $userAway . '' : '' . translate($lang["adminlist"]["status"]["online"]) . '') . '
'; } foreach (array_merge($onlineClients, $offlineClients) as $str)