diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-10-18 01:48:12 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-10-18 01:48:12 +0000 |
commit | 6f5b2c3e099197033d409201ecd7c554be08ec83 (patch) | |
tree | 32f5a572b4bade943bf7bcd0b5f87d582c164d92 /usr/local/www/services_dhcp.php | |
parent | 018ea87778e121103eeb0ea9d1f73cfc08c75c12 (diff) | |
download | pfsense-6f5b2c3e099197033d409201ecd7c554be08ec83.zip pfsense-6f5b2c3e099197033d409201ecd7c554be08ec83.tar.gz |
Do not show blank rows
Diffstat (limited to 'usr/local/www/services_dhcp.php')
-rwxr-xr-x | usr/local/www/services_dhcp.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php index c9c2ce5..105c2a3 100755 --- a/usr/local/www/services_dhcp.php +++ b/usr/local/www/services_dhcp.php @@ -63,12 +63,10 @@ $pconfig['failover_peerip'] = $config['dhcpd'][$if]['failover_peerip']; $ifcfg = $config['interfaces'][$if]; -if (!is_array($config['dhcpd'][$if]['staticmap'])) { - $config['dhcpd'][$if]['staticmap'] = array(); -} -staticmaps_sort($if); $a_maps = &$config['dhcpd'][$if]['staticmap']; +staticmaps_sort($if); + function is_inrange($test, $start, $end) { if ( (ip2long($test) < ip2long($end)) && (ip2long($test) > ip2long($start)) ) return true; @@ -399,7 +397,9 @@ function enable_change(enable_over) { <td width="10%" class="list"> </td> </tr> + <?php if(is_array($a_maps)): ?> <?php $i = 0; foreach ($a_maps as $mapent): ?> + <?php if($mapent['mac'] <> "" and $mapent['ipaddr'] <> ""): ?> <tr> <td class="listlr" ondblclick="document.location='services_dhcp_edit.php?if=<?=$if;?>&id=<?=$i;?>';"> <?=htmlspecialchars($mapent['mac']);?> @@ -419,7 +419,9 @@ function enable_change(enable_over) { </table> </td> </tr> + <?php endif; ?> <?php $i++; endforeach; ?> + <?php endif; ?> <tr> <td class="list" colspan="3"></td> <td class="list"> |