diff options
Diffstat (limited to 'usr/local/www/services_captiveportal_ip.php')
-rwxr-xr-x | usr/local/www/services_captiveportal_ip.php | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/usr/local/www/services_captiveportal_ip.php b/usr/local/www/services_captiveportal_ip.php index 29acb1c..171f583 100755 --- a/usr/local/www/services_captiveportal_ip.php +++ b/usr/local/www/services_captiveportal_ip.php @@ -59,10 +59,16 @@ if ($_GET['act'] == "del") { $ipent = $a_allowedips[$_GET['id']]; if (isset($config['captiveportal']['enable'])) { + if (!empty($ipent['sn'])) + $ipent['ip'] .= "/{$ipent['sn']}"; mwexec("/sbin/ipfw table 3 delete " . $ipent['ip']); mwexec("/sbin/ipfw table 4 delete " . $ipent['ip']); mwexec("/sbin/ipfw table 5 delete " . $ipent['ip']); mwexec("/sbin/ipfw table 6 delete " . $ipent['ip']); + mwexec("/sbin/ipfw table 7 delete " . $ipent['ip']); + mwexec("/sbin/ipfw table 8 delete " . $ipent['ip']); + mwexec("/sbin/ipfw table 9 delete " . $ipent['ip']); + mwexec("/sbin/ipfw table 10 delete " . $ipent['ip']); } unset($a_allowedips[$_GET['id']]); @@ -109,13 +115,23 @@ include("head.inc"); <?php $i = 0; foreach ($a_allowedips as $ip): ?> <tr ondblclick="document.location='services_captiveportal_ip_edit.php?id=<?=$i;?>'"> <td class="listlr"> - <?php if($ip['dir'] == "to") - echo "any <img src=\"in.gif\" width=\"11\" height=\"11\" align=\"absmiddle\">"; + <?php + if($ip['dir'] == "to") { + echo "any <img src=\"/themes/{$g['theme']}/images/icons/icon_in.gif\" width=\"11\" height=\"11\" align=\"absmiddle\"> "; + } + if($ip['dir'] == "both") { + echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_pass.gif\" width=\"11\" height=\"11\" align=\"absmiddle\"> "; + } + echo strtolower($ip['ip']); + if($ip['sn'] != "32" && is_numeric($ip['sn'])) { + $sn = $ip['sn']; + echo "/$sn"; + } + if($ip['dir'] == "from") { + echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_in.gif\" width=\"11\" height=\"11\" align=\"absmiddle\"> any"; + } + ?> - <?=strtolower($ip['ip']);?> - <?php if($ip['dir'] == "from") - echo "<img src=\"in.gif\" width=\"11\" height=\"11\" align=\"absmiddle\"> any"; - ?> </td> <td class="listbg"> <?=htmlspecialchars($ip['descr']);?> @@ -152,6 +168,10 @@ include("head.inc"); <td>x.x.x.x <span class="vexpl"><img src="/themes/<?=$g['theme'];?>/images/icons/icon_in.gif" width="11" height="11" align="absmiddle"></span> any </td> <td><span class="vexpl">All connections <strong>from</strong> the IP address are allowed </span></td> </tr> + <tr> + <td><span class="vexpl"><img src="/themes/<?=$g['theme'];?>/images/icons/icon_pass.gif" width="11" height="11" align="right"></span> </td> + <td><span class="vexpl"> All connections <strong>to</strong> and <strong>from</strong> the IP address are allowed </span></td> + </tr> </table></td> <td class="list"> </td> </tr> |