From a75708bc4ae0fdc40b4c9bb68a65b927fd33bdc2 Mon Sep 17 00:00:00 2001 From: Colin Smith Date: Sun, 11 Sep 2005 22:12:32 +0000 Subject: Tweak column widths and only foreach() if it's possible. --- packages/arpwatch_reports.php | 45 ++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 22 deletions(-) (limited to 'packages/arpwatch_reports.php') diff --git a/packages/arpwatch_reports.php b/packages/arpwatch_reports.php index 8311507a..709035ea 100755 --- a/packages/arpwatch_reports.php +++ b/packages/arpwatch_reports.php @@ -77,32 +77,33 @@ include("head.inc"); IP Timestamp - MAC - Hostname + MAC + Hostname $rawentries) { - $printip = true; - $entries = $rawentries; - sort($entries); - foreach($entries as $entry) { - echo ''; - if($printip) { - echo '' . $ip . ''; - $stampclass = "listr"; - $printip = false; - } else { - $stampclass = "listlr"; - echo ''; + if($report) + foreach($report as $ip => $rawentries) { + $printip = true; + $entries = $rawentries; + sort($entries); + foreach($entries as $entry) { + echo ''; + if($printip) { + echo '' . $ip . ''; + $stampclass = "listr"; + $printip = false; + } else { + $stampclass = "listlr"; + echo ''; + } + echo '' . + date("D M j G:i:s", $entry['timestamp']) . + ''; + echo '' . $entry['mac'] . ''; + echo '' . $entry['hostname'] . ''; + echo ''; } - echo '' . - date("D M j G:i:s", $entry['timestamp']) . - ''; - echo '' . $entry['mac'] . ''; - echo '' . $entry['hostname'] . ''; - echo ''; } - } ?> -- cgit v1.2.3