From cab3bbad97e81518fd1f8c45498480ab4b9b1814 Mon Sep 17 00:00:00 2001 From: Ubergeek Date: Wed, 6 Feb 2019 14:09:30 +0000 Subject: [PATCH] First round of testing the monitoring table --- server.php | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/server.php b/server.php index 724f157..b2a0e08 100644 --- a/server.php +++ b/server.php @@ -23,7 +23,50 @@

Server Status

 
-

(Coming soon)

+

+ +\n"; + +while (($line = fgetcsv($f)) !== false) { + echo ""; + if ($hosts == "failed" ) { + if ($line[2] == "FAILED") { + foreach ($line as $cell) { + if ($cell == "FAILED") { + echo '' . htmlspecialchars($cell) . ''; + } + else { + echo "" .htmlspecialchars($cell) . ""; + } + } + } + } + elseif ($hosts == "all") { + foreach ($line as $cell) { + if ($cell == "FAILED") { + echo '' . htmlspecialchars($cell) . ''; + } + elseif ($cell=="GOOD") { + echo '' . htmlspecialchars($cell) . ""; + } + else { + echo "" .htmlspecialchars($cell) . ""; + } + } + } + echo "\n"; +} +echo "\n

\n"; +fclose($f); +?> + +