diff options
author | Colin Fleming <cj_fleming@sky.com> | 2014-05-17 17:02:13 +0100 |
---|---|---|
committer | Colin Fleming <cj_fleming@sky.com> | 2014-05-17 17:02:13 +0100 |
commit | f1a9b09dc7c2ca378a6ae0c0e239d8048c7b95bf (patch) | |
tree | 33b9cead9e9cf780c1980353011cda50463e7a1d /usr/local/www/diag_ping.php | |
parent | 024068017f98572f6bd41b7ba542fc36fccee39a (diff) | |
download | pfsense-f1a9b09dc7c2ca378a6ae0c0e239d8048c7b95bf.zip pfsense-f1a9b09dc7c2ca378a6ae0c0e239d8048c7b95bf.tar.gz |
Tidy up "diag_ping.php" XHTML
Add SUMMARY to TABLES
Close INPUT tags
Update HTML Boolean operators
Change the PRE tag to a TEXTAREA tag and ad a piece of JavaScript code
to take off the warp
Add missing closing BODY and HTML tags
Diffstat (limited to 'usr/local/www/diag_ping.php')
-rw-r--r-- | usr/local/www/diag_ping.php | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/usr/local/www/diag_ping.php b/usr/local/www/diag_ping.php index e2e8a85..d74feac 100644 --- a/usr/local/www/diag_ping.php +++ b/usr/local/www/diag_ping.php @@ -85,25 +85,25 @@ if (!isset($do_ping)) { include("head.inc"); ?> <body link="#000000" vlink="#000000" alink="#000000"> <?php include("fbegin.inc"); ?> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="ping"> <tr><td> <?php if ($input_errors) print_input_errors($input_errors); ?> <form action="diag_ping.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="tabcont"> <tr> <td colspan="2" valign="top" class="listtopic"><?=gettext("Ping"); ?></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="formfldunknown" id="host" size="20" value="<?=htmlspecialchars($host);?>"></td> + <?=$mandfldhtml;?><input name="host" type="text" class="formfldunknown" 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> @@ -116,7 +116,7 @@ include("head.inc"); ?> 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']);?> @@ -130,7 +130,7 @@ include("head.inc"); ?> <td width="78%" class="vtable"> <select name="count" class="formfld" id="count"> <?php for ($i = 1; $i <= MAX_COUNT; $i++): ?> - <option value="<?=$i;?>" <?php if ($i == $count) echo "selected"; ?>><?=$i;?></option> + <option value="<?=$i;?>" <?php if ($i == $count) echo "selected=\"selected\""; ?>><?=$i;?></option> <?php endfor; ?> </select> </td> @@ -138,15 +138,24 @@ include("head.inc"); ?> <tr> <td width="22%" valign="top"> </td> <td width="78%"> - <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Ping"); ?>"> + <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Ping"); ?>" /> </td> </tr> <tr> <td valign="top" colspan="2"> <?php if ($do_ping) { - echo "<font face='terminal' size='2'>"; + echo "<font face=\"terminal\" size=\"2\">"; echo "<strong>" . gettext("Ping output") . ":</strong><br />"; - echo('<pre>'); +?> + <script type="text/javascript"> + //<![CDATA[ + window.onload=function(){ + document.getElementById("pingCaptured").wrap='off'; + } + //]]> + </script> +<?php + echo "<textarea id=\"pingCaptured\" style=\"width:98%\" name=\"code\" rows=\"15\" cols=\"66\" readonly=\"readonly\">"; $ifscope = ''; $command = "/sbin/ping"; if ($ipproto == "ipv6") { @@ -166,7 +175,7 @@ include("head.inc"); ?> $cmd = "{$command} {$srcip} -c" . escapeshellarg($count) . " " . escapeshellarg($host); //echo "Ping command: {$cmd}\n"; system($cmd); - echo('</pre>'); + echo('</textarea> </font>'); } ?> </td> @@ -180,3 +189,5 @@ include("head.inc"); ?> </td></tr> </table> <?php include("fend.inc"); ?> +</body> +</html> |