diff options
author | Colin Fleming <cj_fleming@sky.com> | 2014-05-29 15:18:26 +0100 |
---|---|---|
committer | Colin Fleming <cj_fleming@sky.com> | 2014-05-29 15:18:26 +0100 |
commit | 7786daaa9dbc3243e4e057ad0bfd1089ec19e8c6 (patch) | |
tree | 371e643d401e1a09048f1dea3a9c5ced3a7ca9ba /usr | |
parent | 499f6e20a83922f510c823a9aba5a591e2b92390 (diff) | |
download | pfsense-7786daaa9dbc3243e4e057ad0bfd1089ec19e8c6.zip pfsense-7786daaa9dbc3243e4e057ad0bfd1089ec19e8c6.tar.gz |
Tidy up "diag_tables.php" XHTML
Add BODY tag
Add ACTION to FORM tag
Add CDATA section to SCRIPTS
Remove NAME from OPTION tag, not valid in XHTML
Update HTML Boolean operators
Add SUMMARY to TABLE
Close IMG tag and add ALT
Move closing Anchor tag into PHP staement
Change Paragraph tag to TR tag and close
Update non breaking space tag
Add missing closing FORM, closing BODY and closing HTML tags
Diffstat (limited to 'usr')
-rw-r--r-- | usr/local/www/diag_tables.php | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/usr/local/www/diag_tables.php b/usr/local/www/diag_tables.php index d9c8f84..e181c80 100644 --- a/usr/local/www/diag_tables.php +++ b/usr/local/www/diag_tables.php @@ -91,14 +91,15 @@ exec("/sbin/pfctl -t " . escapeshellarg($tablename) . " -T show", $entries); exec("/sbin/pfctl -sT", $tables); include("head.inc"); -include("fbegin.inc"); - ?> +<body> +<?php include("fbegin.inc"); ?> <?php if ($savemsg) print_info_box($savemsg); ?> -<form method='post'> +<form method="post" action="diag_tables.php"> <script type="text/javascript"> +//<![CDATA[ function method_change(entrytype) { window.location='diag_tables.php?type=' + entrytype; } @@ -114,58 +115,62 @@ include("fbegin.inc"); } }); } +//]]> </script> <?=gettext("Table:");?> -<select id='type' onChange='method_change(jQuery("#type").val());' name='type'> +<select id="type" onchange="method_change(jQuery('#type').val());" name="type"> <?php foreach ($tables as $table) { - echo "<option name='{$table}' value='{$table}'"; + echo "<option value=\"{$table}\""; if ($tablename == $table) - echo " selected "; + echo " selected=\"selected\""; echo ">{$table}</option>\n"; } ?> </select> -<p/> +<br/><br/> -<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0"> +<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" summary="tables"> <tr> <td class="listhdrr"><?=gettext("IP Address");?></td> </tr> <?php $count = 0; foreach($entries as $entryA): ?> <?php $entry = trim($entryA); ?> - <tr id='<?=$entry?>'> + <tr id="<?=$entry?>"> <td> <?php echo $entry; ?> </td> <td> <?php if ( ($tablename != "bogons") && ($tablename != "bogonsv6") ) { ?> - <a onClick='del_entry("<?=htmlspecialchars($entry)?>");'> - <img img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif"> - <?php } ?> + <a onclick="del_entry('<?=htmlspecialchars($entry)?>');"> + <img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" alt="delete" /> </a> + <?php } ?> </td> </tr> <?php $count++; endforeach; ?> <?php if($count == 0) if( ($tablename == "bogons") || ($tablename == "bogonsv6") ) - echo "<p/>" . gettext("No entries exist in this table.") . "  " . "<input name='Download' type='submit' class='formbtn' value='" . gettext("Download") . "'> " . gettext(" the latest bogon data."); + echo "<tr><td>" . gettext("No entries exist in this table.") . " " . "<input name=\"Download\" type=\"submit\" class=\"formbtn\" value=\"" . gettext("Download") . "\" /> " . gettext(" the latest bogon data."); else - echo "<p/>" . gettext("No entries exist in this table."); + echo "<tr><td>" . gettext("No entries exist in this table."); ?> <?php if($count > 0) if( ($tablename == "bogons") || ($tablename == "bogonsv6") ) { $last_updated = exec('/usr/bin/grep -i -m 1 -E "^# last updated" /etc/' . escapeshellarg($tablename)); - echo "<p/> <b>$count</b> " . gettext("entries in this table.") . "  " . "<input name='Download' type='submit' class='formbtn' value='" . gettext("Download") . "'> " . gettext(" the latest bogon data.") . "<br />" . "$last_updated"; + echo "<tr><td> <b>$count</b> " . gettext("entries in this table.") . " " . "<input name=\"Download\" type=\"submit\" class=\"formbtn\" value=\"" . gettext("Download") . "\" /> " . gettext(" the latest bogon data.") . "<br />" . "$last_updated"; } else - echo "<p/>" . gettext("Delete") . " <a href='diag_tables.php?deleteall=true&type=" . htmlspecialchars($tablename) . "'>" . gettext("all") . "</a> " . "<b>$count</b> " . gettext("entries in this table."); + echo "<tr><td>" . gettext("Delete") . " <a href=\"diag_tables.php?deleteall=true&type=" . htmlspecialchars($tablename) . "\">" . gettext("all") . "</a> " . "<b>$count</b> " . gettext("entries in this table."); ?> - +</td></tr> </table> +</form> <?php include("fend.inc"); ?> +</body> +</html> |