diff options
author | Phil Davis <phil.davis@inf.org> | 2015-05-24 12:54:59 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2015-05-24 12:54:59 +0545 |
commit | c0bf78583c54a68b7343d47589e3bafaca5f5036 (patch) | |
tree | 4324b3c55054f9420542a71bbb64c589ecab9def /usr/local/www/services_igmpproxy.php | |
parent | 88cbd0049b78bd731648be68c13e08161e5e943c (diff) | |
download | pfsense-c0bf78583c54a68b7343d47589e3bafaca5f5036.zip pfsense-c0bf78583c54a68b7343d47589e3bafaca5f5036.tar.gz |
Code style services igmpproxy
Diffstat (limited to 'usr/local/www/services_igmpproxy.php')
-rw-r--r-- | usr/local/www/services_igmpproxy.php | 175 |
1 files changed, 98 insertions, 77 deletions
diff --git a/usr/local/www/services_igmpproxy.php b/usr/local/www/services_igmpproxy.php index 99c5181..8749b2d 100644 --- a/usr/local/www/services_igmpproxy.php +++ b/usr/local/www/services_igmpproxy.php @@ -2,7 +2,7 @@ /* $Id$ */ /* services_igmpproxy.php - + Copyright (C) 2013-2015 Electric Sheep Fencing, LP Copyright (C) 2009 Ermal Luçi Copyright (C) 2004 Scott Ullrich @@ -34,7 +34,7 @@ POSSIBILITY OF SUCH DAMAGE. */ /* - pfSense_MODULE: dyndns + pfSense_MODULE: igmpproxy */ ##|+PRIV @@ -46,8 +46,9 @@ require("guiconfig.inc"); -if (!is_array($config['igmpproxy']['igmpentry'])) +if (!is_array($config['igmpproxy']['igmpentry'])) { $config['igmpproxy']['igmpentry'] = array(); +} //igmpproxy_sort(); $a_igmpproxy = &$config['igmpproxy']['igmpentry']; @@ -60,10 +61,11 @@ if ($_POST) { /* reload all components that use igmpproxy */ $retval = services_igmpproxy_configure(); - if(stristr($retval, "error") <> true) - $savemsg = get_std_save_message($retval); - else - $savemsg = $retval; + if (stristr($retval, "error") <> true) { + $savemsg = get_std_save_message($retval); + } else { + $savemsg = $retval; + } clear_subsystem_dirty('igmpproxy'); } @@ -78,7 +80,7 @@ if ($_GET['act'] == "del") { } } -$pgtitle = array(gettext("Services"),gettext("IGMP Proxy")); +$pgtitle = array(gettext("Services"), gettext("IGMP Proxy")); include("head.inc"); ?> @@ -92,75 +94,94 @@ include("head.inc"); <?php endif; ?> <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="igmp proxy"> -<tr> - <td width="15%" class="listhdrr"><?=gettext("Name");?></td> - <td width="10%" class="listhdrr"><?=gettext("Type");?></td> - <td width="25%" class="listhdrr"><?=gettext("Values");?></td> - <td width="25%" class="listhdr"><?=gettext("Description");?></td> - <td width="5%" class="list"> - <table border="0" cellspacing="0" cellpadding="1" summary="add"> - <tr> - <td valign="middle" width="17"> </td> - <td valign="middle"><a href="services_igmpproxy_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new igmpentry");?>" alt="add" /></a></td> - </tr> - </table> - </td> -</tr> - <?php $i = 0; foreach ($a_igmpproxy as $igmpentry): ?> -<tr> - <td class="listlr" ondblclick="document.location='services_igmpproxy_edit.php?id=<?=$i;?>';"> - <?=htmlspecialchars(convert_friendly_interface_to_friendly_descr($igmpentry['ifname']));?> - </td> - <td class="listlr" ondblclick="document.location='services_igmpproxy_edit.php?id=<?=$i;?>';"> - <?=htmlspecialchars($igmpentry['type']);?> - </td> - <td class="listr" ondblclick="document.location='services_igmpproxy_edit.php?id=<?=$i;?>';"> - <?php - $addresses = implode(", ", array_slice(explode(" ", $igmpentry['address']), 0, 10)); - echo $addresses; - if(count($addresses) < 10) { - echo " "; - } else { - echo "..."; - } - ?> - </td> - <td class="listbg" ondblclick="document.location='services_igmpproxy_edit.php?id=<?=$i;?>';"> - <?=htmlspecialchars($igmpentry['descr']);?> - </td> - <td valign="middle" class="list nowrap"> - <table border="0" cellspacing="0" cellpadding="1" summary="icons"> - <tr> - <td valign="middle"><a href="services_igmpproxy_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit igmpentry"); ?>" alt="edit" /></a></td> - <td><a href="services_igmpproxy.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this igmp entry? All elements that still use it will become invalid (e.g. filter rules)!");?>')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete igmpentry");?>" alt="delete" /></a></td> - </tr> - </table> - </td> -</tr> - <?php $i++; endforeach; ?> -<tr> - <td class="list" colspan="4"></td> - <td class="list"> - <table border="0" cellspacing="0" cellpadding="1"> - <tr> - <td valign="middle" width="17"> </td> - <td valign="middle"><a href="services_igmpproxy_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new igmpentry");?>" alt="add" /></a></td> - </tr> - </table> - </td> -</tr> - <tr> - <td colspan="2" width="78%"> - <br /> - <input id="submit" name="submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /> - <br /> - </td> - </tr> -<tr> - <td class="tabcont" colspan="4"> - <p><span class="vexpl"><span class="red"><strong><?=gettext("Note:");?><br /></strong></span><?=gettext("Please add the interface for upstream, the allowed subnets, and the downstream interfaces you would like the proxy to allow. Only one 'upstream' interface can be configured.");?></span></p> - </td> -</tr> + <tr> + <td width="15%" class="listhdrr"><?=gettext("Name");?></td> + <td width="10%" class="listhdrr"><?=gettext("Type");?></td> + <td width="25%" class="listhdrr"><?=gettext("Values");?></td> + <td width="25%" class="listhdr"><?=gettext("Description");?></td> + <td width="5%" class="list"> + <table border="0" cellspacing="0" cellpadding="1" summary="add"> + <tr> + <td valign="middle" width="17"> </td> + <td valign="middle"> + <a href="services_igmpproxy_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new igmpentry");?>" alt="add" /></a> + </td> + </tr> + </table> + </td> + </tr> +<?php + $i = 0; + foreach ($a_igmpproxy as $igmpentry): +?> + <tr> + <td class="listlr" ondblclick="document.location='services_igmpproxy_edit.php?id=<?=$i;?>';"> + <?=htmlspecialchars(convert_friendly_interface_to_friendly_descr($igmpentry['ifname']));?> + </td> + <td class="listlr" ondblclick="document.location='services_igmpproxy_edit.php?id=<?=$i;?>';"> + <?=htmlspecialchars($igmpentry['type']);?> + </td> + <td class="listr" ondblclick="document.location='services_igmpproxy_edit.php?id=<?=$i;?>';"> +<?php + $addresses = implode(", ", array_slice(explode(" ", $igmpentry['address']), 0, 10)); + echo $addresses; + if (count($addresses) < 10) { + echo " "; + } else { + echo "..."; + } +?> + </td> + <td class="listbg" ondblclick="document.location='services_igmpproxy_edit.php?id=<?=$i;?>';"> + <?=htmlspecialchars($igmpentry['descr']);?> + </td> + <td valign="middle" class="list nowrap"> + <table border="0" cellspacing="0" cellpadding="1" summary="icons"> + <tr> + <td valign="middle"><a href="services_igmpproxy_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit igmpentry"); ?>" alt="edit" /></a></td> + <td> + <a href="services_igmpproxy.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this igmp entry? All elements that still use it will become invalid (e.g. filter rules)!");?>')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete igmpentry");?>" alt="delete" /></a> + </td> + </tr> + </table> + </td> + </tr> +<?php + $i++; + endforeach; +?> + <tr> + <td class="list" colspan="4"></td> + <td class="list"> + <table border="0" cellspacing="0" cellpadding="1"> + <tr> + <td valign="middle" width="17"> </td> + <td valign="middle"><a href="services_igmpproxy_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new igmpentry");?>" alt="add" /></a></td> + </tr> + </table> + </td> + </tr> + <tr> + <td colspan="2" width="78%"> + <br /> + <input id="submit" name="submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /> + <br /> + </td> + </tr> + <tr> + <td class="tabcont" colspan="4"> + <p> + <span class="vexpl"> + <span class="red"> + <strong> + <?=gettext("Note:");?><br /> + </strong> + </span> + <?=gettext("Please add the interface for upstream, the allowed subnets, and the downstream interfaces you would like the proxy to allow. Only one 'upstream' interface can be configured.");?> + </span> + </p> + </td> + </tr> </table> </form> <?php include("fend.inc"); ?> |