diff --git a/api/status.php b/api/status.php index 2d4ffb6..52328ca 100644 --- a/api/status.php +++ b/api/status.php @@ -30,11 +30,11 @@ die ($serverstatus); function getResult() { try { $start = microtime(true); - + $tsstatus = getTeamspeakServerStatus(); - + $stop = microtime(true); - + return json_encode(array( "tsstatus" => $tsstatus, "generated" => date('d-m-Y H:i:s') @@ -58,9 +58,9 @@ function exception_error_handler($errno, $errstr, $errfile, $errline ) { } function getTeamspeakServerStatus() { - + $response = pingTeamspeakServerFromConfig(); - + if ($response) { return array( "success" => $response["virtualserver_status"]->toString() == "online", diff --git a/bans.php b/bans.php index 2bc3119..5a81d20 100644 --- a/bans.php +++ b/bans.php @@ -62,36 +62,36 @@ if (is_null($banlist)) { banList(); - + $output = ""; - + foreach ($bany as $ban) { - + if(!isset($ban['lastnickname'])) continue; - + $lastnickname = $ban['lastnickname']->toString(); $reason = $ban['reason']; $invokername = $ban['invokername']->toString(); $created = date('d-m-Y H:i:s', $ban['created']); $duration = $ban['duration']; - + if(empty($reason)) $reason = "(brak powodu)"; - + if($duration == 0) $expires = "Ban permanentny"; else $expires = date('d-m-Y H:i:s', $ban['created'] + $duration); - + $output .= "
Wystąpił błąd ' . $e->getCode() . ': ' . $e->getMessage() . '
$icon$group
"; - + $clients = $group->clientList(); - + if(empty($clients)) { $output .= 'Ta grupa jest pusta
'; continue; } - + foreach ($clients as $userInfo) { $user = getClientByDbid($tsAdmin, $userInfo['cldbid']); - + if(!$user) { $output .= '' . $userInfo['client_nickname'] . 'Offline
'; continue; } - + $output .= '' . '' . $user . '' . ($user['client_away'] ? 'Away' : 'Online') . '
Wystąpił błąd ' . $e->getCode() . ': ' . $e->getMessage() . '