summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_unbound_acls.php
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2014-01-29 20:49:40 +0200
committerWarren Baker <warren@decoy.co.za>2014-01-29 20:49:40 +0200
commit9961044ab5c932170b65af2544447f48831a28ff (patch)
tree23e3e71eb55d3e2a974d6ff3e59e629f48b8ffda /usr/local/www/services_unbound_acls.php
parent06b17388f85caf534839949b941d7d737a137a84 (diff)
downloadpfsense-9961044ab5c932170b65af2544447f48831a28ff.zip
pfsense-9961044ab5c932170b65af2544447f48831a28ff.tar.gz
More html formatting
Diffstat (limited to 'usr/local/www/services_unbound_acls.php')
-rw-r--r--usr/local/www/services_unbound_acls.php399
1 files changed, 200 insertions, 199 deletions
diff --git a/usr/local/www/services_unbound_acls.php b/usr/local/www/services_unbound_acls.php
index 6455bfb..52b7aab 100644
--- a/usr/local/www/services_unbound_acls.php
+++ b/usr/local/www/services_unbound_acls.php
@@ -155,7 +155,7 @@ include("head.inc");
rowsize[2] = "40";
</script>
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
+<body>
<?php include("fbegin.inc"); ?>
<form action="services_unbound_acls.php" method="post" name="iform" id="iform">
@@ -172,206 +172,207 @@ if ($savemsg)
if (is_subsystem_dirty("unbound"))
print_info_box_np(gettext("The settings for the DNS Resolver have changed. You must apply the configuration to take affect."));
?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td class="tabnavtbl">
- <ul id="tabnav">
- <?php
- $tab_array = array();
- $tab_array[] = array(gettext("General Settings"), false, "/services_unbound.php");
- $tab_array[] = array(gettext("Advanced settings"), false, "services_unbound_advanced.php");
- $tab_array[] = array(gettext("Access Lists"), true, "/services_unbound_acls.php");
- display_top_tabs($tab_array, true);
- ?>
- </ul>
- </td>
- </tr>
- <tr>
- <td class="tabcont">
-
- <?php if($act=="new" || $act=="edit"): ?>
-
-
- <input name="aclid" type="hidden" value="<?=$id;?>">
- <input name="act" type="hidden" value="<?=$act;?>">
-
- <table width="100%" border="0" cellpadding="6" cellspacing="0">
- <tr>
- <td colspan="2" valign="top" class="listtopic"><?=ucwords(sprintf(gettext("%s Access List"),$act));?></td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Access List name");?></td>
- <td width="78%" class="vtable">
- <input name="aclname" type="text" class="formfld" id="aclname" size="30" maxlength="30" value="<?=htmlspecialchars($pconfig['aclname']);?>">
- <br />
- <span class="vexpl"><?=gettext("Provide an Access List name.");?></span>
- </td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Action");?></td>
- <td width="78%" class="vtable">
- <select name="aclaction" class="formselect">
- <?php $types = explode(",", "Allow,Deny,Refuse,Allow Snoop"); foreach ($types as $type): ?>
- <option value="<?=strtolower($type);?>" <?php if (strtolower($type) == strtolower($pconfig['aclaction'])) echo "selected"; ?>>
- <?=htmlspecialchars($type);?>
- </option>
- <?php endforeach; ?>
- </select>
- <br/>
- <span class="vexpl">
- <?=gettext("Choose what to do with DNS requests that match the criteria specified below.");?> <br/>
- <?=gettext("<b>Deny:</b> This action stops queries from hosts within the netblock defined below.");?> <br/>
- <?=gettext("<b>Refuse:</b> This action also stops queries from hosts within the netblock defined below, but sends a DNS rcode REFUSED error message back to the client.");?> <br/>
- <?=gettext("<b>Allow:</b> This action allows queries from hosts within the netblock defined below.");?> <br/>
- <?=gettext("<b>Allow Snoop:</b> This action allows recursive and nonrecursive access from hosts within the netblock defined below. Used for cache snooping and ideally should only be configured for your administrative host.");?> <br/>
- </span>
- </td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncellreq"><?=gettext("Networks");?></td>
- <td width="78%" class="vtable">
- <table id="maintable">
- <tbody>
- <tr>
- <td><div id="onecolumn"><?=gettext("Network");?></div></td>
- <td><div id="twocolumn"><?=gettext("CIDR");?></div></td>
- <td><div id="threecolumn"><?=gettext("Description");?></div></td>
- </tr>
- <?php $counter = 0; ?>
- <?php
- if($networkacl)
- foreach($networkacl as $item):
- ?>
- <?php
- $network = $item['acl_network'];
- $cidr = $item['mask'];
- $description = $item['description'];
- ?>
- <tr>
- <td>
- <input autocomplete="off" name="acl_network<?=$counter;?>" type="text" class="formfld unknown" id="acl_network<?=$counter;?>" size="40" value="<?=htmlspecialchars($network);?>" />
- </td>
- <td>
- <select name="mask<?=$counter;?>" class="formselect" id="mask<?=$counter;?>">
- <?php
- for ($i = 128; $i > 0; $i--) {
- echo "<option value=\"$i\" ";
- if ($i == $cidr) echo "selected";
- echo ">" . $i . "</option>";
- }
- ?>
- </select>
- </td>
- <td>
- <input autocomplete="off" name="description<?=$counter;?>" type="text" class="listbg" id="description<?=$counter;?>" size="40" value="<?=htmlspecialchars($description);?>" />
- </td>
- <td>
- <a onclick="removeRow(this); return false;" href="#"><img border="0" src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" /></a>
- </td>
- </tr>
- <?php $counter++; ?>
- <?php endforeach; ?>
- </tbody>
- <tfoot>
- </tfoot>
- </table>
- <a onclick="javascript:addRowTo('maintable', 'formfldalias'); return false;" href="#">
- <img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" title="<?=gettext("add another entry");?>" />
- </a>
- <script type="text/javascript">
- field_counter_js = 3;
- rows = 1;
- totalrows = <?php echo $counter; ?>;
- loaded = <?php echo $counter; ?>;
- </script>
-
- </td>
- </tr>
-
- <tr>
- <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
- <td width="78%" class="vtable">
- <input name="description" type="text" class="formfld unknown" id="description" size="52" maxlength="52" value="<?=htmlspecialchars($pconfig['description']);?>">
- <br />
- <span class="vexpl"><?=gettext("You may enter a description here for your reference.");?></span>
- </td>
- </tr>
- <tr>
- <td>&nbsp;</td>
- </tr>
- <tr>
- <td width="22%" valign="top">&nbsp;</td>
- <td width="78%">
- &nbsp;<br>&nbsp;
- <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"> <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
- </td>
- </tr>
- </table>
- </form>
-
- <?php else: ?>
-
- <table class="sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
- <thead>
- <tr>
- <td width="25%" class="listhdrr"><?=gettext("Access List Name"); ?></td>
- <td width="25%" class="listhdrr"><?=gettext("Action"); ?></td>
- <td width="40%" class="listhdrr"><?=gettext("Description"); ?></td>
- <td width="10%" class="list"></td>
- </tr>
- </thead>
- <tbody>
+<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="services unbound acls">
+ <tbody>
+ <tr>
+ <td class="tabnavtbl">
+ <ul id="tabnav">
<?php
- $i = 0;
- foreach($a_acls as $acl):
+ $tab_array = array();
+ $tab_array[] = array(gettext("General Settings"), false, "/services_unbound.php");
+ $tab_array[] = array(gettext("Advanced settings"), false, "services_unbound_advanced.php");
+ $tab_array[] = array(gettext("Access Lists"), true, "/services_unbound_acls.php");
+ display_top_tabs($tab_array, true);
?>
- <tr ondblclick="document.location='services_unbound_acls.php?act=edit&id=<?=$i;?>'">
- <td class="listlr">
- <?=$acl['aclname'];?>
- </td>
- <td class="listr">
- <?=htmlspecialchars($acl['aclaction']);?>
- </td>
- <td class="listbg">
- <?=htmlspecialchars($acl['description']);?>
- </td>
- <td valign="middle" nowrap class="list">
- <a href="services_unbound_acls.php?act=edit&id=<?=$i;?>">
- <img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit access list"); ?>" width="17" height="17" border="0">
- </a>
- &nbsp;
- <a href="services_unbound_acls.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this access list?"); ?>')">
- <img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete access list"); ?>" width="17" height="17" border="0">
- </a>
- </td>
- </tr>
- <?php
- $i++;
- endforeach;
- ?>
- </tbody>
- <tfoot>
- <tr>
- <td class="list" colspan="4"></td>
- <td class="list">
- <a href="services_unbound_acls.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("Add new Access List"); ?>" width="17" height="17" border="0">
- </a>
- </td>
- </tr>
- <tr>
- <td colspan="4">
- <p>
- <?=gettext("Access Lists to control access to the DNS Resolver can be defined here.");?>
- </p>
- </td>
- </tr>
- </tfoot>
- </table>
-
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td id="mainarea">
+ <div class="tabcont">
+ <?php if($act=="new" || $act=="edit"): ?>
+ <input name="aclid" type="hidden" value="<?=$id;?>">
+ <input name="act" type="hidden" value="<?=$act;?>">
+
+ <table width="100%" border="0" cellpadding="6" cellspacing="0">
+ <tr>
+ <td colspan="2" valign="top" class="listtopic"><?=ucwords(sprintf(gettext("%s Access List"),$act));?></td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Access List name");?></td>
+ <td width="78%" class="vtable">
+ <input name="aclname" type="text" class="formfld" id="aclname" size="30" maxlength="30" value="<?=htmlspecialchars($pconfig['aclname']);?>">
+ <br />
+ <span class="vexpl"><?=gettext("Provide an Access List name.");?></span>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Action");?></td>
+ <td width="78%" class="vtable">
+ <select name="aclaction" class="formselect">
+ <?php $types = explode(",", "Allow,Deny,Refuse,Allow Snoop"); foreach ($types as $type): ?>
+ <option value="<?=strtolower($type);?>" <?php if (strtolower($type) == strtolower($pconfig['aclaction'])) echo "selected"; ?>>
+ <?=htmlspecialchars($type);?>
+ </option>
+ <?php endforeach; ?>
+ </select>
+ <br/>
+ <span class="vexpl">
+ <?=gettext("Choose what to do with DNS requests that match the criteria specified below.");?> <br/>
+ <?=gettext("<b>Deny:</b> This action stops queries from hosts within the netblock defined below.");?> <br/>
+ <?=gettext("<b>Refuse:</b> This action also stops queries from hosts within the netblock defined below, but sends a DNS rcode REFUSED error message back to the client.");?> <br/>
+ <?=gettext("<b>Allow:</b> This action allows queries from hosts within the netblock defined below.");?> <br/>
+ <?=gettext("<b>Allow Snoop:</b> This action allows recursive and nonrecursive access from hosts within the netblock defined below. Used for cache snooping and ideally should only be configured for your administrative host.");?> <br/>
+ </span>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("Networks");?></td>
+ <td width="78%" class="vtable">
+ <table id="maintable">
+ <tbody>
+ <tr>
+ <td><div id="onecolumn"><?=gettext("Network");?></div></td>
+ <td><div id="twocolumn"><?=gettext("CIDR");?></div></td>
+ <td><div id="threecolumn"><?=gettext("Description");?></div></td>
+ </tr>
+ <?php $counter = 0; ?>
+ <?php
+ if($networkacl)
+ foreach($networkacl as $item):
+ ?>
+ <?php
+ $network = $item['acl_network'];
+ $cidr = $item['mask'];
+ $description = $item['description'];
+ ?>
+ <tr>
+ <td>
+ <input autocomplete="off" name="acl_network<?=$counter;?>" type="text" class="formfld unknown" id="acl_network<?=$counter;?>" size="40" value="<?=htmlspecialchars($network);?>" />
+ </td>
+ <td>
+ <select name="mask<?=$counter;?>" class="formselect" id="mask<?=$counter;?>">
+ <?php
+ for ($i = 128; $i > 0; $i--) {
+ echo "<option value=\"$i\" ";
+ if ($i == $cidr) echo "selected";
+ echo ">" . $i . "</option>";
+ }
+ ?>
+ </select>
+ </td>
+ <td>
+ <input autocomplete="off" name="description<?=$counter;?>" type="text" class="listbg" id="description<?=$counter;?>" size="40" value="<?=htmlspecialchars($description);?>" />
+ </td>
+ <td>
+ <a onclick="removeRow(this); return false;" href="#"><img border="0" src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" /></a>
+ </td>
+ </tr>
+ <?php $counter++; ?>
+ <?php endforeach; ?>
+ </tbody>
+ <tfoot>
+ </tfoot>
+ </table>
+ <a onclick="javascript:addRowTo('maintable', 'formfldalias'); return false;" href="#">
+ <img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" title="<?=gettext("add another entry");?>" />
+ </a>
+ <script type="text/javascript">
+ field_counter_js = 3;
+ rows = 1;
+ totalrows = <?php echo $counter; ?>;
+ loaded = <?php echo $counter; ?>;
+ </script>
+
+ </td>
+ </tr>
+
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
+ <td width="78%" class="vtable">
+ <input name="description" type="text" class="formfld unknown" id="description" size="52" maxlength="52" value="<?=htmlspecialchars($pconfig['description']);?>">
+ <br />
+ <span class="vexpl"><?=gettext("You may enter a description here for your reference.");?></span>
+ </td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top">&nbsp;</td>
+ <td width="78%">
+ &nbsp;<br>&nbsp;
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"> <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
+ </td>
+ </tr>
+ </table>
+ </form>
+
+ <?php else: ?>
+
+ <table class="sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
+ <thead>
+ <tr>
+ <td width="25%" class="listhdrr"><?=gettext("Access List Name"); ?></td>
+ <td width="25%" class="listhdrr"><?=gettext("Action"); ?></td>
+ <td width="40%" class="listhdrr"><?=gettext("Description"); ?></td>
+ <td width="10%" class="list"></td>
+ </tr>
+ </thead>
+ <tbody>
+ <?php
+ $i = 0;
+ foreach($a_acls as $acl):
+ ?>
+ <tr ondblclick="document.location='services_unbound_acls.php?act=edit&id=<?=$i;?>'">
+ <td class="listlr">
+ <?=$acl['aclname'];?>
+ </td>
+ <td class="listr">
+ <?=htmlspecialchars($acl['aclaction']);?>
+ </td>
+ <td class="listbg">
+ <?=htmlspecialchars($acl['description']);?>
+ </td>
+ <td valign="middle" nowrap class="list">
+ <a href="services_unbound_acls.php?act=edit&id=<?=$i;?>">
+ <img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit access list"); ?>" width="17" height="17" border="0">
+ </a>
+ &nbsp;
+ <a href="services_unbound_acls.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this access list?"); ?>')">
+ <img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete access list"); ?>" width="17" height="17" border="0">
+ </a>
+ </td>
+ </tr>
+ <?php
+ $i++;
+ endforeach;
+ ?>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td class="list" colspan="4"></td>
+ <td class="list">
+ <a href="services_unbound_acls.php?act=new">
+ <img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("Add new Access List"); ?>" border="0">
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <p>
+ <?=gettext("Access Lists to control access to the DNS Resolver can be defined here.");?>
+ </p>
+ </td>
+ </tr>
+ </tfoot>
+ </table>
<?php endif; ?>
-
- </td>
- </tr>
+ </td>
+ </tr>
+ </tbody>
</table>
-</body>
+
<?php include("fend.inc"); ?>
+</body>
+</html> \ No newline at end of file
OpenPOWER on IntegriCloud