<?PHP
  include "include/header.inc";
?>
<table border=0 align=center>

    <tr>
        <th align="center">Carnivore - Status at a Glance</th>
    </tr>

    <tr>
        <td align="center" width=800>
<?PHP

    include("include/commons.inc");
    include("include/pgsql.inc");
    $db = new DB_Pgsql;

    // Check for any 'current' non-green's..






    // Display last 25 events..
    echo "<br><br><br>Last 25 Events";
    echo "<br><table border=0>\n";
    $query = "select host.host_name, service.service_name, host_statuschange.* from host_statuschange, host, service where host_statuschange.host_id=host.host_id and host_statuschange.service_id=service.service_id order by host_statuschange.log_datetime desc limit 25 offset 0";
    $db->query($query);
    while ($db->next_record()) {
      echo "<tr><td align=center>".date("D M jS H:i:s", $db->f("log_datetime")/1000)."</td><td align=center style=\"color: black; background-color: ".$statuscodes[$db->f("log_newstatus")]."\">".$db->f("host_name")."</td><td align=center>".$db->f("service_name")."</td><td align=center><img border=0 src=\"images/".$statuscodes[$db->f("log_oldstatus")].".gif\"></td><td align=center>--&gt;</td><td align=center><img border=0 src=\"images/".$statuscodes[$db->f("log_newstatus")].".gif\"></td></tr>\n";
    }
    echo "</table>\n";
















?>
        </td>
    </tr>
</table>

<?PHP
  include "include/footer.inc";
?>
