$Servers = array_diff(scandir(SERVER_ROOT.'/misc/heartbeat', 1), array('.', '..'));
View::show_header('Network status');
?>
foreach ($Servers as $Server) {
$Contents = file_get_contents(SERVER_ROOT.'/misc/heartbeat/'.$Server);
if (substr($Server, 0, 7) == 'Tracker' || substr($Server, 0, 3) == 'IRC') {
$Contents = explode("\n", $Contents);
$Contents = '
Online' : 'r03">Offline').''.((substr($Server,0,7)=='Tracker')?'
'.('Backup From: '.time_diff((int)$Contents[0], 2, false)):'');
} else if (substr($Server, 0, 6) == 'Backup') {
$Contents = 'Backup From: '.time_diff((int)$Contents, 2, false);
}
?>
echo ($Server == 'IRC' ? '
' : '');
} ?>
View::show_footer();