diff options
author | Colin Fleming <cj_fleming@sky.com> | 2014-05-17 18:54:58 +0100 |
---|---|---|
committer | Colin Fleming <cj_fleming@sky.com> | 2014-05-17 18:54:58 +0100 |
commit | ffcfd9fb3df91b8f23f8138618d1bf9aaaa4b646 (patch) | |
tree | e876c8126e78d1328f94e5c91cfe3a564932263a | |
parent | 024068017f98572f6bd41b7ba542fc36fccee39a (diff) | |
download | pfsense-ffcfd9fb3df91b8f23f8138618d1bf9aaaa4b646.zip pfsense-ffcfd9fb3df91b8f23f8138618d1bf9aaaa4b646.tar.gz |
Tidy up "diag_traceroute.php" XHTML
Add SUMMARY to tables
Close INPUT tags
Update HTML Boolean operators
Change PRE tag to a TEXTAREA tag and add JavaScript code to take off
warp
Add missing closing FONT, closing BODY and closing HTML tags
-rw-r--r-- | usr/local/www/diag_traceroute.php | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/usr/local/www/diag_traceroute.php b/usr/local/www/diag_traceroute.php index 13e6ac3..cbbc1cb 100644 --- a/usr/local/www/diag_traceroute.php +++ b/usr/local/www/diag_traceroute.php @@ -91,21 +91,21 @@ if (!isset($do_traceroute)) { ?> <?php if ($input_errors) print_input_errors($input_errors); ?> <form action="diag_traceroute.php" method="post" name="iform" id="iform"> -<table width="100%" border="0" cellpadding="6" cellspacing="0"> +<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="diag traceroute"> <tr> <td colspan="2" valign="top" class="listtopic"><?=gettext("Traceroute");?></td> </tr> <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Host");?></td> <td width="78%" class="vtable"> - <?=$mandfldhtml;?><input name="host" type="text" class="formfld" id="host" size="20" value="<?=htmlspecialchars($host);?>"></td> + <?=$mandfldhtml;?><input name="host" type="text" class="formfld" id="host" size="20" value="<?=htmlspecialchars($host);?>" /></td> </tr> <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("IP Protocol"); ?></td> <td width="78%" class="vtable"> <select name="ipproto" class="formselect"> - <option value="ipv4" <?php if ($ipproto == "ipv4") echo 'selected="selected"' ?>>IPv4</option> - <option value="ipv6" <?php if ($ipproto == "ipv6") echo 'selected="selected"' ?>>IPv6</option> + <option value="ipv4" <?php if ($ipproto == "ipv4") echo "selected=\"selected\"" ?>>IPv4</option> + <option value="ipv6" <?php if ($ipproto == "ipv6") echo "selected=\"selected\"" ?>>IPv6</option> </select> </td> </tr> @@ -118,7 +118,7 @@ if (!isset($do_traceroute)) { foreach ($sourceips as $sip): $selected = ""; if (!link_interface_to_bridge($sip['value']) && ($sip['value'] == $sourceip)) - $selected = 'selected="selected"'; + $selected = "selected=\"selected\""; ?> <option value="<?=$sip['value'];?>" <?=$selected;?>> <?=htmlspecialchars($sip['name']);?> @@ -132,7 +132,7 @@ if (!isset($do_traceroute)) { <td width="78%" class="vtable"> <select name="ttl" class="formfld" id="ttl"> <?php for ($i = 1; $i <= MAX_TTL; $i++): ?> - <option value="<?=$i;?>" <?php if ($i == $ttl) echo "selected"; ?>><?=$i;?></option> + <option value="<?=$i;?>" <?php if ($i == $ttl) echo "selected=\"selected\""; ?>><?=$i;?></option> <?php endfor; ?> </select> </td> @@ -140,19 +140,19 @@ if (!isset($do_traceroute)) { <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Reverse Address Lookup");?></td> <td width="78%" class="vtable"> - <input name="resolve" type="checkbox"<?php echo (!isset($resolve) ? "" : " CHECKED"); ?>> + <input name="resolve" type="checkbox"<?php echo (!isset($resolve) ? "" : " checked=\"checked\""); ?> /> </td> </tr> <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Use ICMP");?></td> <td width="78%" class="vtable"> - <input name="useicmp" type="checkbox"<?php if($_REQUEST['useicmp']) echo " CHECKED"; ?>> + <input name="useicmp" type="checkbox"<?php if($_REQUEST['useicmp']) echo " checked=\"checked\""; ?> /> </td> </tr> <tr> <td width="22%" valign="top"> </td> <td width="78%"> - <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Traceroute");?>"> + <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Traceroute");?>" /> </td> </tr> <tr> @@ -169,10 +169,19 @@ if (!isset($do_traceroute)) { <td valign="top" colspan="2"> <?php if ($do_traceroute) { - echo "<font face='terminal' size='2'>\n"; + echo "<font face=\"terminal\" size=\"2\">\n"; echo "<strong>" . gettext("Traceroute output:") . "</strong><br />\n"; ob_end_flush(); - echo "<pre>\n"; +?> + <script type="text/javascript"> + //<![CDATA[ + window.onload=function(){ + document.getElementById("tracerouteCaptured").wrap='off'; + } + //]]> + </script> +<?php + echo "<textarea id=\"tracerouteCaptured\" style=\"width:98%\" name=\"code\" rows=\"15\" cols=\"66\" readonly=\"readonly\">"; $useicmp = isset($_REQUEST['useicmp']) ? "-I" : ""; $n = isset($resolve) ? "" : "-n"; @@ -191,10 +200,12 @@ if ($do_traceroute) { //echo "Traceroute command: {$cmd}\n"; system($cmd); - echo "</pre>\n"; + echo "</textarea> </font>"; } ?> </td> </tr> </table> </form> <?php include("fend.inc"); ?> +</body> +</html> |