2007-04-03 14:10:23 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if(!$samehost) {
|
|
|
|
if($bg == $list_colour_a) { $bg = $list_colour_b; } else { $bg = $list_colour_a; }
|
|
|
|
}
|
|
|
|
|
2007-04-08 18:09:21 +00:00
|
|
|
$service_type = strtolower($service['service_type']);
|
2007-04-03 14:10:23 +00:00
|
|
|
|
|
|
|
if($service[service_status] == '0') {$status = "<span class=red><b>$service_type</b></span>";
|
|
|
|
} elseif ($service[service_status] == '1') {$status = "<span class=green><b>$service_type</b></span>";
|
|
|
|
} elseif ($service[service_status] == '2') {$status = "<span class=grey><b>$service_type</b></span>";}
|
|
|
|
|
2007-04-08 18:09:21 +00:00
|
|
|
$message = trim($service['service_message']);
|
2007-04-03 14:10:23 +00:00
|
|
|
$message = str_replace("\n", "<br />", $message);
|
|
|
|
|
2007-04-08 18:09:21 +00:00
|
|
|
$since = time() - $service['service_changed'];
|
2007-04-03 14:10:23 +00:00
|
|
|
$since = formatUptime($since);
|
|
|
|
|
2007-04-08 18:09:21 +00:00
|
|
|
if($service['service_checked']) {
|
|
|
|
$checked = time() - $service['service_checked'];
|
2007-04-03 14:10:23 +00:00
|
|
|
$checked = formatUptime($checked);
|
|
|
|
} else { $checked = "Never"; }
|
|
|
|
|
2010-02-21 19:32:08 +00:00
|
|
|
$mini_url = $config['base_url'] . "/graph.php?id=".$service['service_id']."&type=service&from=".$day."&to=".$now."&width=80&height=20&bg=efefef";
|
|
|
|
|
2007-04-03 14:10:23 +00:00
|
|
|
|
|
|
|
echo("
|
2007-06-06 09:23:41 +00:00
|
|
|
<tr style=\"background-color: $bg; padding: 5px;\">");
|
2007-04-03 14:10:23 +00:00
|
|
|
|
|
|
|
if($device_id) {
|
|
|
|
if(!$samehost) {
|
2007-04-08 18:09:21 +00:00
|
|
|
$device['device_id'] = $device_id;
|
|
|
|
$device['hostname'] = $device_hostname;
|
2007-11-21 14:26:24 +00:00
|
|
|
echo("<td valign=top width=250><span style='font-weight:bold;'>" . generatedevicelink($device) . "</span></td>");
|
2007-04-03 14:10:23 +00:00
|
|
|
} else {
|
|
|
|
echo("<td></td>");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-02-21 19:32:08 +00:00
|
|
|
echo("
|
2007-04-03 14:10:23 +00:00
|
|
|
<td valign=top class=list-bold>
|
|
|
|
$status
|
|
|
|
</td>
|
2010-02-21 19:32:08 +00:00
|
|
|
<td><img src='$mini_url'></td>
|
2007-04-03 14:10:23 +00:00
|
|
|
<td valign=top width=175>
|
|
|
|
$since
|
|
|
|
</td>
|
|
|
|
<td valign=top>
|
|
|
|
<span class=box-desc>$message</span>
|
|
|
|
</td>
|
|
|
|
</tr>");
|
|
|
|
|
|
|
|
$i++;
|
|
|
|
|
|
|
|
?>
|