";
echo $ParsedownExtra->text($content);
// Monitoring section
$hosts="all";
$f = fopen("$doc_root/report", "r");
echo "Last update: " . date ("H:i", filemtime('./report'))."
\n";
echo "
";
echo "
Host |
Check |
Status |
";
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);
// End monitoring section
print "