diff options
-rw-r--r-- | usr/local/www/services_unbound_acls.php | 85 |
1 files changed, 45 insertions, 40 deletions
diff --git a/usr/local/www/services_unbound_acls.php b/usr/local/www/services_unbound_acls.php index aaac462..f78de82 100644 --- a/usr/local/www/services_unbound_acls.php +++ b/usr/local/www/services_unbound_acls.php @@ -130,7 +130,7 @@ if ($_POST) { } } - +$closehead = false; $pgtitle = "Services: DNS Resolver: Access Lists"; include("head.inc"); @@ -140,12 +140,13 @@ include("head.inc"); </script> <script type="text/javascript"> +//<![CDATA[ function mask_field(fieldname, fieldsize, n) { return '<select name="' + fieldname + n + '" class="formselect" id="' + fieldname + n + '"><?php for ($i = 128; $i >= 0; $i--) { - echo "<option value=\"$i\">$i</option>"; + echo "<option value=\"$i\">$i<\/option>"; } - ?></select>'; + ?><\/select>'; } rowtype[0] = "textbox"; @@ -156,7 +157,9 @@ include("head.inc"); rowtype[2] = "textbox"; rowname[2] = "description"; rowsize[2] = "40"; +//]]> </script> +</head> <body> @@ -192,17 +195,17 @@ if (is_subsystem_dirty("unbound")) <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;?>"> + <input name="aclid" type="hidden" value="<?=$id;?>" /> + <input name="act" type="hidden" value="<?=$act;?>" /> - <table width="100%" border="0" cellpadding="6" cellspacing="0"> + <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area"> <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']);?>"> + <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> @@ -212,7 +215,7 @@ if (is_subsystem_dirty("unbound")) <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"; ?>> + <option value="<?=strtolower($type);?>" <?php if (strtolower($type) == strtolower($pconfig['aclaction'])) echo "selected=\"selected\""; ?>> <?=htmlspecialchars($type);?> </option> <?php endforeach; ?> @@ -230,7 +233,7 @@ if (is_subsystem_dirty("unbound")) <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Networks");?></td> <td width="78%" class="vtable"> - <table id="maintable"> + <table id="maintable" summary="networks"> <tbody> <tr> <td><div id="onecolumn"><?=gettext("Network");?></div></td> @@ -256,7 +259,7 @@ if (is_subsystem_dirty("unbound")) <?php for ($i = 128; $i > 0; $i--) { echo "<option value=\"$i\" "; - if ($i == $cidr) echo "selected"; + if ($i == $cidr) echo "selected=\"selected\""; echo ">" . $i . "</option>"; } ?> @@ -266,23 +269,23 @@ if (is_subsystem_dirty("unbound")) <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> + <a onclick="removeRow(this); return false;" href="#"><img border="0" src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" alt="delete" /></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"> + //<![CDATA[ field_counter_js = 3; rows = 1; totalrows = <?php echo $counter; ?>; loaded = <?php echo $counter; ?>; + //]]> </script> </td> @@ -291,7 +294,7 @@ if (is_subsystem_dirty("unbound")) <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']);?>"> + <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> @@ -303,15 +306,14 @@ if (is_subsystem_dirty("unbound")) <td width="22%" valign="top"> </td> <td width="78%"> <br /> - <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"> <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()"> + <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"> + <table class="sortable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="results"> <thead> <tr> <td width="25%" class="listhdrr"><?=gettext("Access List Name"); ?></td> @@ -320,12 +322,29 @@ if (is_subsystem_dirty("unbound")) <td width="10%" class="list"></td> </tr> </thead> + <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" alt="add" /> + </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> <tbody> <?php $i = 0; foreach($a_acls as $acl): ?> - <tr ondblclick="document.location='services_unbound_acls.php?act=edit&id=<?=$i;?>'"> + <tr ondblclick="document.location='services_unbound_acls.php?act=edit&id=<?=$i;?>'"> <td class="listlr"> <?=$acl['aclname'];?> </td> @@ -336,12 +355,12 @@ if (is_subsystem_dirty("unbound")) <?=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 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" alt="edit" /> </a> - <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 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" alt="delete" /> </a> </td> </tr> @@ -349,31 +368,17 @@ if (is_subsystem_dirty("unbound")) $i++; endforeach; ?> + <tr style="display:none"><td></td></tr> </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; ?> + </div> </td> </tr> </tbody> </table> +</form> <?php include("fend.inc"); ?> </body> -</html>
\ No newline at end of file +</html> |