summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_aliases.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-04-02 12:26:15 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-04-02 12:34:43 -0300
commit9db1ff32c7005da50baf78e089608e7eb72eae9a (patch)
tree609986e4ce502f23351b02c9f737d50395a760d8 /usr/local/www/firewall_aliases.php
parent43d049ac6a6710ee2d3c933d6c02ee44c5d81dc3 (diff)
downloadpfsense-9db1ff32c7005da50baf78e089608e7eb72eae9a.zip
pfsense-9db1ff32c7005da50baf78e089608e7eb72eae9a.tar.gz
Fix whitespaces, indent and add a missing <tr>
Diffstat (limited to 'usr/local/www/firewall_aliases.php')
-rwxr-xr-xusr/local/www/firewall_aliases.php215
1 files changed, 110 insertions, 105 deletions
diff --git a/usr/local/www/firewall_aliases.php b/usr/local/www/firewall_aliases.php
index 18314cd..878a002 100755
--- a/usr/local/www/firewall_aliases.php
+++ b/usr/local/www/firewall_aliases.php
@@ -179,116 +179,121 @@ include("head.inc");
$tab_array[] = array(gettext("All"), ($tab=="all"? true : false), "/firewall_aliases.php?tab=all");
display_top_tabs($tab_array);
?>
- <input type="hidden" name="tab" value="<?=htmlspecialchars($tab);?>">
+ <input type="hidden" name="tab" value="<?=htmlspecialchars($tab);?>">
</td>
</tr>
-<tr><td><div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="20%" class="listhdrr"><?=gettext("Name"); ?></td>
- <td width="43%" class="listhdrr"><?=gettext("Values"); ?></td>
- <td width="30%" class="listhdr"><?=gettext("Description"); ?></td>
- <td width="7%" class="list">
- <table border="0" cellspacing="0" cellpadding="1">
- <tr>
- <td valign="middle" width="17">&nbsp;</td>
- <td valign="middle"><a href="firewall_aliases_edit.php?tab=<?=$tab?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" <?=dom_title(gettext("Add a new alias"));?>></a></td>
- </tr>
- </table>
- </td>
-</tr>
- <?php
- asort($a_aliases);
- foreach ($a_aliases as $i=> $alias){
- unset ($show_alias);
- switch ($tab){
- case "all":
- $show_alias= true;
- break;
- case "ip":
- case "host":
- case "network":
- if (preg_match("/(host|network)/",$alias["type"]))
- $show_alias= true;
- break;
- case "url":
- if (preg_match("/(url)/i",$alias["type"]))
- $show_alias= true;
- break;
- case "port":
- if($alias["type"] == "port")
- $show_alias= true;
- break;
- }
- if ($show_alias){?>
- <tr>
- <td class="listlr" ondblclick="document.location='firewall_aliases_edit.php?id=<?=$i;?>';">
- <?=htmlspecialchars($alias['name']);?>
- </td>
- <td class="listr" ondblclick="document.location='firewall_aliases_edit.php?id=<?=$i;?>';">
- <?php
- if ($alias["url"]) {
- echo $alias["url"] . "<br/>";
- }
- if(is_array($alias["aliasurl"])) {
- $aliasurls = implode(", ", array_slice($alias["aliasurl"], 0, 10));
- echo $aliasurls;
- if(count($aliasurls) > 10) {
- echo "...<br/>";
- }
- echo "<br/>\n";
- }
- $tmpaddr = explode(" ", $alias['address']);
- $addresses = implode(", ", array_slice($tmpaddr, 0, 10));
- echo $addresses;
- if(count($tmpaddr) > 10) {
- echo "...";
- }
- ?>
- </td>
- <td class="listbg" ondblclick="document.location='firewall_aliases_edit.php?id=<?=$i;?>';">
- <?=htmlspecialchars($alias['descr']);?>&nbsp;
- </td>
- <td valign="middle" nowrap class="list">
- <table border="0" cellspacing="0" cellpadding="1">
- <tr>
- <td valign="middle"><a href="firewall_aliases_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" <?=dom_title(gettext("Edit alias")." {$alias['name']}");?>></a></td>
- <td><a href="firewall_aliases.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this alias? 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" <?=dom_title(gettext("Delete alias")." {$alias['name']}");?>></a></td>
- </tr>
- </table>
- </td>
- </tr>
- <?php
- }
- }?>
+ <tr>
+ <td>
+ <div id="mainarea">
+ <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td width="20%" class="listhdrr"><?=gettext("Name"); ?></td>
+ <td width="43%" class="listhdrr"><?=gettext("Values"); ?></td>
+ <td width="30%" class="listhdr"><?=gettext("Description"); ?></td>
+ <td width="7%" class="list">
+ <table border="0" cellspacing="0" cellpadding="1">
+ <tr>
+ <td valign="middle" width="17">&nbsp;</td>
+ <td valign="middle"><a href="firewall_aliases_edit.php?tab=<?=$tab?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" <?=dom_title(gettext("Add a new alias"));?>></a></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <?php
+ asort($a_aliases);
+ foreach ($a_aliases as $i=> $alias){
+ unset ($show_alias);
+ switch ($tab){
+ case "all":
+ $show_alias= true;
+ break;
+ case "ip":
+ case "host":
+ case "network":
+ if (preg_match("/(host|network)/",$alias["type"]))
+ $show_alias= true;
+ break;
+ case "url":
+ if (preg_match("/(url)/i",$alias["type"]))
+ $show_alias= true;
+ break;
+ case "port":
+ if($alias["type"] == "port")
+ $show_alias= true;
+ break;
+ }
+ if ($show_alias) {
+ ?>
+ <tr>
+ <td class="listlr" ondblclick="document.location='firewall_aliases_edit.php?id=<?=$i;?>';">
+ <?=htmlspecialchars($alias['name']);?>
+ </td>
+ <td class="listr" ondblclick="document.location='firewall_aliases_edit.php?id=<?=$i;?>';">
+ <?php
+ if ($alias["url"]) {
+ echo $alias["url"] . "<br/>";
+ }
+ if(is_array($alias["aliasurl"])) {
+ $aliasurls = implode(", ", array_slice($alias["aliasurl"], 0, 10));
+ echo $aliasurls;
+ if(count($aliasurls) > 10) {
+ echo "...<br/>";
+ }
+ echo "<br/>\n";
+ }
+ $tmpaddr = explode(" ", $alias['address']);
+ $addresses = implode(", ", array_slice($tmpaddr, 0, 10));
+ echo $addresses;
+ if(count($tmpaddr) > 10) {
+ echo "...";
+ }
+ ?>
+ </td>
+ <td class="listbg" ondblclick="document.location='firewall_aliases_edit.php?id=<?=$i;?>';">
+ <?=htmlspecialchars($alias['descr']);?>&nbsp;
+ </td>
+ <td valign="middle" nowrap class="list">
+ <table border="0" cellspacing="0" cellpadding="1">
+ <tr>
+ <td valign="middle"><a href="firewall_aliases_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" <?=dom_title(gettext("Edit alias")." {$alias['name']}");?>></a></td>
+ <td><a href="firewall_aliases.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this alias? 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" <?=dom_title(gettext("Delete alias")." {$alias['name']}");?>></a></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <?php
+ } // if ($show_alias)
+ } // foreach
+ ?>
-<tr>
- <td colspan="3"/>&nbsp;</td>
- <td valign="middle" nowrap class="list">
- <table border="0" cellspacing="0" cellpadding="1">
- <tbody>
- <tr>
- <td valign="middle">
- <a href="firewall_aliases_edit.php?tab=<?=$tab?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" <?=dom_title(gettext("Add a new alias")); ?>></a>
- </td>
- <td valign="middle">
- <a href="firewall_aliases_import.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_import_alias.gif" width="17" height="17" border="0" <?=dom_title(gettext("Bulk import aliases from list"));?> alt="" /></a>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
-</tr>
+ <tr>
+ <td colspan="3"/>&nbsp;</td>
+ <td valign="middle" nowrap class="list">
+ <table border="0" cellspacing="0" cellpadding="1">
+ <tbody>
+ <tr>
+ <td valign="middle">
+ <a href="firewall_aliases_edit.php?tab=<?=$tab?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" <?=dom_title(gettext("Add a new alias")); ?>></a>
+ </td>
+ <td valign="middle">
+ <a href="firewall_aliases_import.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_import_alias.gif" width="17" height="17" border="0" <?=dom_title(gettext("Bulk import aliases from list"));?> alt="" /></a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
- <td class="tabcont" colspan="3">
- <p><span class="vexpl"><span class="red"><strong><?=gettext("Note:"); ?><br></strong></span><div style="overflow:hidden; text-align:justify;"><?=gettext("Aliases act as placeholders for real hosts, networks or ports. They can be used to minimize the number of changes that have to be made if a host, network or port changes. You can enter the name of an alias instead of the host, network or port in all fields that have a red background. The alias will be resolved according to the list above. If an alias cannot be resolved (e.g. because you deleted it), the corresponding element (e.g. filter/NAT/shaper rule) will be considered invalid and skipped."); ?></div></span></p>
- </td>
-</tr>
+ <tr>
+ <td class="tabcont" colspan="3">
+ <p><span class="vexpl"><span class="red"><strong><?=gettext("Note:"); ?><br></strong></span><div style="overflow:hidden; text-align:justify;"><?=gettext("Aliases act as placeholders for real hosts, networks or ports. They can be used to minimize the number of changes that have to be made if a host, network or port changes. You can enter the name of an alias instead of the host, network or port in all fields that have a red background. The alias will be resolved according to the list above. If an alias cannot be resolved (e.g. because you deleted it), the corresponding element (e.g. filter/NAT/shaper rule) will be considered invalid and skipped."); ?></div></span></p>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
</table>
- </div>
- </td>
- </tr>
- </table>
</form>
<?php include("fend.inc"); ?>
</body>
OpenPOWER on IntegriCloud