2011-11-07 19:39:15 +00:00
< hr />
< form method = " post " action = " " >
< label >< strong > Search </ strong >
< input type = " text " name = " string " id = " string " value = " <?php echo( $_POST['string'] ); ?> " />
</ label >
< label >
< strong > Type </ strong >
< select name = " type " id = " type " >
< option value = " " > All Types </ option >
< option value = " system " > System </ option >
< ? php
2012-04-06 13:56:23 +00:00
foreach ( dbFetchRows ( " SELECT `type` FROM `eventlog` WHERE device_id = ? GROUP BY `type` ORDER BY `type` " , array ( $device [ 'device_id' ])) as $data )
2011-11-07 19:39:15 +00:00
{
echo ( " <option value=' " . $data [ 'type' ] . " ' " );
if ( $data [ 'type' ] == $_POST [ 'type' ]) { echo ( " selected " ); }
echo ( " > " . $data [ 'type' ] . " </option> " );
}
?>
</ select >
</ label >
< input class = submit type = submit value = Search >
</ form >
< ? php
print_optionbar_end ();
$entries = dbFetchRows ( " SELECT *,DATE_FORMAT(datetime, '%D %b %Y %T') as humandate FROM `eventlog` WHERE `host` = ? ORDER BY `datetime` DESC LIMIT 0,250 " , array ( $device [ 'device_id' ]));
2014-02-28 22:02:39 +00:00
echo ( ' < div class = " panel panel-default panel-condensed " >
< div class = " panel-heading " >
< strong > Eventlog entries </ strong >
</ div >
< table class = " table table-hover table-condensed table-striped " > ' );
2011-11-07 19:39:15 +00:00
foreach ( $entries as $entry )
{
include ( " includes/print-event.inc.php " );
}
2014-02-28 22:02:39 +00:00
echo ( ' </ table >
</ div > ' );
2011-11-07 19:39:15 +00:00
$pagetitle [] = " Events " ;
?>