76 lines
2.0 KiB
PHP
76 lines
2.0 KiB
PHP
<?php include 'HEADER.php'; ?>
|
|
<title>Status of thunix Servers and Services - thunix Community</title>
|
|
</head>
|
|
<body>
|
|
<div id="top">
|
|
<div id="header">
|
|
<div id="logo">
|
|
<h1>☣ thunix</h1>
|
|
</div>
|
|
</div>
|
|
<div id="page">
|
|
<div id="page-bgtop">
|
|
<div id="page-bgbtm">
|
|
<div id="content">
|
|
<div class="post">
|
|
<h2 class="title">Information and Service Announcements</h2>
|
|
<div style="clear: both;"> </div>
|
|
<div class="entry">
|
|
<p>(Coming soon)</p>
|
|
</div>
|
|
</div>
|
|
<div class="post">
|
|
<h2 class="title">Server Status</h2>
|
|
<div style="clear: both;"> </div>
|
|
<div class="entry">
|
|
<p>
|
|
<!-- Have to clean this section up a bit, styling, really -->
|
|
<?php
|
|
|
|
$hosts="all";
|
|
|
|
$f = fopen("./report", "r");
|
|
|
|
echo "Last update: " . date ("H:i", filemtime('./report'))."<p>\n";
|
|
echo "<table>";
|
|
while (($line = fgetcsv($f)) !== false) {
|
|
echo "<tr>";
|
|
if ($hosts == "failed" ) {
|
|
if ($line[2] == "FAILED") {
|
|
foreach ($line as $cell) {
|
|
if ($cell == "FAILED") {
|
|
echo '<td style="color:#FF0000">' . htmlspecialchars($cell) . '</td>';
|
|
}
|
|
else {
|
|
echo "<td>" .htmlspecialchars($cell) . "</td>";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
elseif ($hosts == "all") {
|
|
foreach ($line as $cell) {
|
|
if ($cell == "FAILED") {
|
|
echo '<td style="color:#FF0000">' . htmlspecialchars($cell) . '</td>';
|
|
}
|
|
elseif ($cell=="GOOD") {
|
|
echo '<td style="color:#00FF00">' . htmlspecialchars($cell) . "</td>";
|
|
}
|
|
else {
|
|
echo "<td>" .htmlspecialchars($cell) . "</td>";
|
|
}
|
|
}
|
|
}
|
|
echo "</tr><p>\n";
|
|
}
|
|
echo "\n</table><p>\n";
|
|
fclose($f);
|
|
?>
|
|
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div style="clear: both;"> </div>
|
|
</div>
|
|
<?php include 'MENU.php'; ?>
|
|
<?php include 'FOOTER.php'; ?>
|