aboutsummaryrefslogtreecommitdiffstats
path: root/packages/arpwatch_reports.php
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-09-11 22:12:32 +0000
committerColin Smith <colin@pfsense.org>2005-09-11 22:12:32 +0000
commita75708bc4ae0fdc40b4c9bb68a65b927fd33bdc2 (patch)
tree9780a778543f18ebc289f1fe3b90537a0961979d /packages/arpwatch_reports.php
parent3af778c9d8362bb1c9ec1e7950405206c906a5da (diff)
downloadpfsense-packages-a75708bc4ae0fdc40b4c9bb68a65b927fd33bdc2.tar.gz
pfsense-packages-a75708bc4ae0fdc40b4c9bb68a65b927fd33bdc2.tar.bz2
pfsense-packages-a75708bc4ae0fdc40b4c9bb68a65b927fd33bdc2.zip
Tweak column widths and only foreach() if it's possible.
Diffstat (limited to 'packages/arpwatch_reports.php')
-rwxr-xr-xpackages/arpwatch_reports.php45
1 files changed, 23 insertions, 22 deletions
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");
<tr>
<td width="15%" class="listhdrr">IP</td>
<td width="25%" class="listhdrr">Timestamp</td>
- <td width="25%" class="listhdrr">MAC</td>
- <td width="35%" class="listhdrr">Hostname</td>
+ <td width="15%" class="listhdrr">MAC</td>
+ <td width="45%" class="listhdrr">Hostname</td>
</tr>
<?php
- foreach($report as $ip => $rawentries) {
- $printip = true;
- $entries = $rawentries;
- sort($entries);
- foreach($entries as $entry) {
- echo '<tr>';
- if($printip) {
- echo '<td class="listlr">' . $ip . '</td>';
- $stampclass = "listr";
- $printip = false;
- } else {
- $stampclass = "listlr";
- echo '<td></td>';
+ if($report)
+ foreach($report as $ip => $rawentries) {
+ $printip = true;
+ $entries = $rawentries;
+ sort($entries);
+ foreach($entries as $entry) {
+ echo '<tr>';
+ if($printip) {
+ echo '<td class="listlr">' . $ip . '</td>';
+ $stampclass = "listr";
+ $printip = false;
+ } else {
+ $stampclass = "listlr";
+ echo '<td></td>';
+ }
+ echo '<td class="' . $stampclass . '">' .
+ date("D M j G:i:s", $entry['timestamp']) .
+ '</td>';
+ echo '<td class="listr">' . $entry['mac'] . '</td>';
+ echo '<td class="listr">' . $entry['hostname'] . '</td>';
+ echo '</tr>';
}
- echo '<td class="' . $stampclass . '">' .
- date("D M j G:i:s", $entry['timestamp']) .
- '</td>';
- echo '<td class="listr">' . $entry['mac'] . '</td>';
- echo '<td class="listr">' . $entry['hostname'] . '</td>';
- echo '</tr>';
}
- }
?>
<tr>
<td>