summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_shaper_layer7.php
diff options
context:
space:
mode:
authorColin Fleming <cj_fleming@sky.com>2013-03-22 14:54:55 +0000
committerColin Fleming <cj_fleming@sky.com>2013-03-22 14:54:55 +0000
commite750c0afc8c491af47b36400a094604af6877e04 (patch)
treeefecd2b470321192cb3e17cd882f85fee082760e /usr/local/www/firewall_shaper_layer7.php
parentb2f73235f911c800e7dfb24f78581e0356bbb615 (diff)
downloadpfsense-e750c0afc8c491af47b36400a094604af6877e04.zip
pfsense-e750c0afc8c491af47b36400a094604af6877e04.tar.gz
Tidy up "traffic shaper layer7" XHTML
Close INPUT, BR, P and IMG tags Add "alt" to IMG tags Add CDATA section to scripts Move "tree.css" and "tree.js" to the HEAD statement and close the HEAD statement manually Spelling mistake Update PHP shorthand tag Update HTML boolean operators
Diffstat (limited to 'usr/local/www/firewall_shaper_layer7.php')
-rwxr-xr-xusr/local/www/firewall_shaper_layer7.php106
1 files changed, 51 insertions, 55 deletions
diff --git a/usr/local/www/firewall_shaper_layer7.php b/usr/local/www/firewall_shaper_layer7.php
index 44c659f..17c674b 100755
--- a/usr/local/www/firewall_shaper_layer7.php
+++ b/usr/local/www/firewall_shaper_layer7.php
@@ -62,8 +62,8 @@ $shortcut_section = "trafficshaper";
$output_form = "";
$default_layer7shaper_msg = "<tr><td colspan=\"4\">";
-$default_layer7shaper_msg .= "<p><span class=\"vexpl\"><span class=\"red\"><strong>" . gettext("Note") . ":<br>";
-$default_layer7shaper_msg .= "</strong></span>" . gettext("You can add new layer7 protocol patterns by simply uploading the file") . " <a href=\"diag_patterns.php\">" . gettext("here") . ".</a><br>";
+$default_layer7shaper_msg .= "<span class=\"vexpl\"><span class=\"red\"><strong>" . gettext("Note") . ":<br/>";
+$default_layer7shaper_msg .= "</strong></span>" . gettext("You can add new layer7 protocol patterns by simply uploading the file") . " <a href=\"diag_patterns.php\">" . gettext("here") . ".</a><br/>";
$default_layer7shaper_msg .= "</td></tr>";
@@ -222,16 +222,14 @@ $tree .= "</ul>";
$output = "<div id=\"shaperarea\" style=\"position:relative\">";
$output .= $output_form;
-
+$closehead = false;
include("head.inc");
?>
-
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC" >
<link rel="stylesheet" type="text/css" media="all" href="./tree/tree.css" />
<script type="text/javascript" src="./tree/tree.js"></script>
-<script language="javascript">
-
+<script type="text/javascript">
+//<![CDATA[
var initial_count = new Array();
var rows_limit = 0; // Set to 0 to disable limitation
@@ -358,7 +356,7 @@ function addRow(table_id) {
var tFielsNum = rows_count - initial_count[table_id];
if (rows_limit!=0 && tFielsNum >= rows_limit) return false;
- var remove = '<a onclick="removeRow(\''+table_id+'\',this.parentNode.parentNode)" href="#"><img border="0" src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" /></a>';
+ var remove = '<a onclick="removeRow(\''+table_id+'\',this.parentNode.parentNode)" href="#"><img border="0" src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" alt="x" /></a>';
try {
var newRow = tbl.insertRow(rows_count);
@@ -386,11 +384,13 @@ function removeRow(tbl,row) {
alert(ex);
}
}
+//]]>
</script>
+</head>
-<?php
-include("fbegin.inc");
-?>
+<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
+
+<?php include("fbegin.inc"); ?>
<div id="inputerrors"></div>
<?php if ($input_errors) print_input_errors($input_errors); ?>
@@ -398,9 +398,9 @@ include("fbegin.inc");
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('shaper')): ?><p>
-<?php print_info_box_np(gettext("The traffic shaper configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?><br>
+<?php print_info_box_np(gettext("The traffic shaper configuration has been changed") . ".<br/>" . gettext("You must apply the changes in order for them to take effect."));?><br/></p>
<?php endif; ?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
+<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="traffic shaper layer7">
<tr><td>
<?php
$tab_array = array();
@@ -415,7 +415,7 @@ include("fbegin.inc");
<tr>
<td>
<div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
+ <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="main area">
<?php if (count($layer7_rules_list) > 0): ?>
<tr class="tabcont"><td width="25%" align="left">
@@ -423,37 +423,37 @@ include("fbegin.inc");
<?php endif; ?>
<tr>
- <td width="25%" valign="top" algin="left">
+ <td width="25%" valign="top" align="left">
<?php
echo $tree;
?>
<br/><br/>
<a href="firewall_shaper_layer7.php?action=add">
- <img src="./themes/<?=$g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("Create new l7 rules group"); ?>" width="17" height="17" border="0"> <?=gettext("Create new l7 rules group"); ?>
+ <img src="./themes/<?=$g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("Create new l7 rules group"); ?>" width="17" height="17" border="0" alt="add" /> <?=gettext("Create new l7 rules group"); ?>
</a><br/>
</td>
<td width="75%" valign="top" align="center">
- <table>
- <?
+ <table summary="output form">
+ <?php
echo $output;
?>
<!-- Layer 7 rules form -->
<?php if($show_proto_form): ?>
- <td width = "22%" valign = "top" class = "vncellreq">
- <div id = "addressnetworkport">
+ <td width="22%" valign="top" class="vncellreq">
+ <div id="addressnetworkport">
<?=gettext("Rule(s)"); ?>
</div>
</td>
- <td width = "78%" class = "vtable">
- <table width="236" id = "maintable">
+ <td width="78%" class="vtable">
+ <table width="236" id="maintable" summary="main table">
<tbody>
<tr>
- <td colspan = "4">
- <div style = "font-size: 8pt; padding:5px; margin-top: 16px; margin-bottom: 16px; border:1px dashed #000066;"
- id = "itemhelp">
+ <td colspan="4">
+ <div style="font-size: 8pt; padding:5px; margin-top: 16px; margin-bottom: 16px; border:1px dashed #000066;"
+ id="itemhelp">
<?=gettext("Add one or more rules"); ?>
</div>
</td>
@@ -461,22 +461,22 @@ include("fbegin.inc");
<tr>
<td>
- <div style = "font-size: 8pt; padding:5px;"
- id = "onecolumn">
+ <div style="font-size: 8pt; padding:5px;"
+ id="onecolumn">
<?=gettext("Protocol"); ?>
</div>
</td>
<td>
- <div style = "font-size: 8pt; padding:5px;"
- id = "twocolumn">
+ <div style="font-size: 8pt; padding:5px;"
+ id="twocolumn">
<?=gettext("Structure"); ?>
</div>
</td>
<td>
- <div style = "font-size: 8pt; padding:5px;"
- id = "threecolumn">
+ <div style="font-size: 8pt; padding:5px;"
+ id="threecolumn">
<?=gettext("Behaviour"); ?>
</div>
</td>
@@ -490,7 +490,7 @@ include("fbegin.inc");
<td>
<select name="protocol[]" class="formselect" id="protocol" style="font-size:8pt">
<?php foreach($avail_protos as $proto): ?>
- <option value="<?=$proto;?>" <?php if ($proto == $l7rule->GetRProtocol()) echo "selected"; ?>><?=$proto;?></option>
+ <option value="<?=$proto;?>" <?php if ($proto == $l7rule->GetRProtocol()) echo "selected=\"selected\""; ?>><?=$proto;?></option>
<?php endforeach; ?>
</select>
</td>
@@ -499,18 +499,18 @@ include("fbegin.inc");
<?php foreach($avail_structures as $struct) {
if($struct == "queue") {
if(!empty($avail_behaviours_altq)) { ?>
- <option value="<?=$struct ?>" <?php if ($struct == $l7rule->GetRStructure()) echo "selected"; ?>><?=$struct;?></option>
+ <option value="<?=$struct ?>" <?php if ($struct == $l7rule->GetRStructure()) echo "selected=\"selected\""; ?>><?=$struct;?></option>
<?php }
}
else {
if($struct == "limiter") {
if(!empty($avail_behaviours_limiter)) { ?>
- <option value="<?=$struct ?>" <?php if ($struct == $l7rule->GetRStructure()) echo "selected"; ?>><?=$struct;?></option>
+ <option value="<?=$struct ?>" <?php if ($struct == $l7rule->GetRStructure()) echo "selected=\"selected\""; ?>><?=$struct;?></option>
<?php }
}
else {
if($struct == "action") { ?>
- <option value="<?=$struct ?>" <?php if ($struct == $l7rule->GetRStructure()) echo "selected"; ?>><?=$struct;?></option>
+ <option value="<?=$struct ?>" <?php if ($struct == $l7rule->GetRStructure()) echo "selected=\"selected\""; ?>><?=$struct;?></option>
<?php }
}
}
@@ -521,25 +521,25 @@ include("fbegin.inc");
<select name="behaviour[]" class="formselect" id="behaviour" style="width:80px; font-size:8pt">
<?php if($l7rule->GetRStructure() == "action"): ?>
<?php foreach($avail_behaviours_action as $behaviour): ?>
- <option value="<?=$behaviour ?>" <?php if ($behaviour == $l7rule->GetRBehaviour()) echo "selected"; ?>><?=$behaviour;?></option>
+ <option value="<?=$behaviour ?>" <?php if ($behaviour == $l7rule->GetRBehaviour()) echo "selected=\"selected\""; ?>><?=$behaviour;?></option>
<?php endforeach; ?>
</select>
<?php endif; ?>
<?php if($l7rule->GetRStructure() == "queue"): ?>
<?php foreach($avail_behaviours_altq as $behaviour): ?>
- <option value="<?=$behaviour ?>" <?php if ($behaviour == $l7rule->GetRBehaviour()) echo "selected"; ?>><?=$behaviour;?></option>
+ <option value="<?=$behaviour ?>" <?php if ($behaviour == $l7rule->GetRBehaviour()) echo "selected=\"selected\""; ?>><?=$behaviour;?></option>
<?php endforeach; ?>
</select>
<?php endif; ?>
<?php if($l7rule->GetRStructure() == "limiter"): ?>
<?php foreach($avail_behaviours_limiter as $behaviour): ?>
- <option value="<?=$behaviour ?>" <?php if ($behaviour == $l7rule->GetRBehaviour()) echo "selected"; ?>><?=$behaviour;?></option>
+ <option value="<?=$behaviour ?>" <?php if ($behaviour == $l7rule->GetRBehaviour()) echo "selected=\"selected\""; ?>><?=$behaviour;?></option>
<?php endforeach; ?>
</select>
<?php endif; ?>
</td>
<td>
- <a onclick="removeRow('maintable',this.parentNode.parentNode); return false;" href="#"><img border="0" src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" /></a>
+ <a onclick="removeRow('maintable',this.parentNode.parentNode); return false;" href="#"><img border="0" src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" alt="x" /></a>
</td>
</tr>
@@ -548,32 +548,29 @@ include("fbegin.inc");
} //end if
?>
</tbody>
-
- <tfoot>
- </tfoot>
</table>
- <a onclick = "javascript:addRow('maintable'); return false;" href="#"> <img border = "0"
- src = "/themes/<?=$g['theme']; ?>/images/icons/icon_plus.gif"
- alt = "" title = "<?=gettext("add another entry"); ?>" /> </a>
+ <a onclick="javascript:addRow('maintable'); return false;" href="#"> <img border="0"
+ src="/themes/<?=$g['theme']; ?>/images/icons/icon_plus.gif"
+ alt="" title="<?=gettext("add another entry"); ?>" /> </a>
</td>
</tr>
<tr>
- <td width = "22%" valign = "top">
+ <td width="22%" valign="top">
&nbsp;
</td>
- <td width = "78%">
- <input id = "submit"
- name = "submit" type = "submit" class = "formbtn" value = "<?=gettext("Save"); ?>" />
+ <td width="78%">
+ <input id="submit"
+ name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" />
- <a href= "firewall_shaper_layer7.php">
- <input id = "cancelbutton"
- name = "cancelbutton" type = "button" class = "formbtn" value = "<?=gettext("Cancel"); ?>" /></a>
+ <a href="firewall_shaper_layer7.php">
+ <input id="cancelbutton"
+ name="cancelbutton" type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" /></a>
<?php if($container): ?>
- <input id = "delete" type="submit" class="formbtn" name="delete" value="<?=gettext("Delete"); ?>"></a>
+ <input id="delete" type="submit" class="formbtn" name="delete" value="<?=gettext("Delete"); ?>" /></a>
<?php endif ?>
</td>
</tr>
@@ -589,7 +586,6 @@ include("fbegin.inc");
</table>
</form>
-<?php include("fend.inc");
-?>
+<?php include("fend.inc"); ?>
</body>
</html>
OpenPOWER on IntegriCloud