\n\nMonitoring Report\n\n\n\n"; $hosts=""; if (isset($_GET['hosts'])) { $hosts = $_GET["hosts"]; } if ( $hosts !="all" ) { $hosts = "failed"; } $f = fopen("/tmp/report", "r"); echo "Last update: " . date ("H:i", filemtime('/tmp/report'))."

\n"; if ( $hosts == "all" ) { echo "Failures Only

\n"; } else { echo "All

\n"; } while (($line = fgetcsv($f)) !== false) { echo "

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

\n"; fclose($f); echo "";