Projet

Général

Profil

« Précédent | Suivant » 

Révision 2231fe29

Ajouté par Colin Fleming il y a presque 10 ans

Tidy up "diag_testport.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

Voir les différences:

usr/local/www/diag_testport.php
101 101
include("head.inc"); ?>
102 102
<body link="#000000" vlink="#000000" alink="#000000">
103 103
<?php include("fbegin.inc"); ?>
104
<table width="100%" border="0" cellpadding="0" cellspacing="0">
104
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="diag test port">
105 105
<tr><td>
106 106
<?php echo gettext("This page allows you to perform a simple TCP connection test to determine if a host is up and accepting connections on a given port. This test does not function for UDP since there is no way to reliably determine if a UDP port accepts connections in this manner."); ?>
107 107
<br /><br />
......
109 109
<br /><br /><br />
110 110
<?php if ($input_errors) print_input_errors($input_errors); ?>
111 111
	<form action="diag_testport.php" method="post" name="iform" id="iform">
112
	<table width="100%" border="0" cellpadding="6" cellspacing="0">
112
	<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
113 113
		<tr>
114 114
			<td colspan="2" valign="top" class="listtopic"><?=gettext("Test Port"); ?></td>
115 115
		</tr>
......
117 117
			<td width="22%" valign="top" class="vncellreq"><?=gettext("Host"); ?></td>
118 118
			<td width="78%" class="vtable">
119 119
			<?=$mandfldhtml;?>
120
			<input name="host" type="text" class="formfld" id="host" size="20" value="<?=htmlspecialchars($host);?>"></td>
120
			<input name="host" type="text" class="formfld" id="host" size="20" value="<?=htmlspecialchars($host);?>" /></td>
121 121
		</tr>
122 122
		<tr>
123 123
			<td width="22%" valign="top" class="vncellreq"><?= gettext("Port"); ?></td>
124 124
			<td width="78%" class="vtable">
125
				<input name="port" type="text" class="formfld" id="port" size="10" value="<?=htmlspecialchars($port);?>">
125
				<input name="port" type="text" class="formfld" id="port" size="10" value="<?=htmlspecialchars($port);?>" />
126 126
			</td>
127 127
		</tr>
128 128
		<tr>
129 129
			<td width="22%" valign="top" class="vncell"><?= gettext("Source Port"); ?></td>
130 130
			<td width="78%" class="vtable">
131
				<input name="srcport" type="text" class="formfld" id="srcport" size="10" value="<?=htmlspecialchars($srcport);?>">
131
				<input name="srcport" type="text" class="formfld" id="srcport" size="10" value="<?=htmlspecialchars($srcport);?>" />
132 132
				<br /><br /><?php echo gettext("This should typically be left blank."); ?>
133 133
			</td>
134 134
		</tr>
135 135
		<tr>
136 136
			<td width="22%" valign="top" class="vncell"><?= gettext("Show Remote Text"); ?></td>
137 137
			<td width="78%" class="vtable">
138
				<input name="showtext" type="checkbox" id="showtext" <?php if ($showtext) echo "checked" ?>>
138
				<input name="showtext" type="checkbox" id="showtext" <?php if ($showtext) echo "checked=\"checked\"" ?> />
139 139
				<br /><br /><?php echo gettext("Shows the text given by the server when connecting to the port. Will take 10+ seconds to display if checked."); ?>
140 140
			</td>
141 141
		</tr>
......
148 148
					foreach ($sourceips as $sip):
149 149
						$selected = "";
150 150
						if (!link_interface_to_bridge($sip['value']) && ($sip['value'] == $sourceip))
151
							$selected = 'selected="selected"';
151
							$selected = "selected=\"selected\"";
152 152
				?>
153 153
					<option value="<?=$sip['value'];?>" <?=$selected;?>>
154 154
						<?=htmlspecialchars($sip['name']);?>
......
161 161
			<td width="22%" valign="top" class="vncell"><?=gettext("IP Protocol"); ?></td>
162 162
			<td width="78%" class="vtable">
163 163
			<select name="ipprotocol" class="formfld">
164
				<option value="any" <?php if ("any" == $ipprotocol) echo "selected"; ?>>
164
				<option value="any" <?php if ("any" == $ipprotocol) echo "selected=\"selected\""; ?>>
165 165
					Any
166 166
				</option>
167
				<option value="ipv4" <?php if ($ipprotocol == "ipv4") echo "selected"; ?>>
167
				<option value="ipv4" <?php if ($ipprotocol == "ipv4") echo "selected=\"selected\""; ?>>
168 168
					<?=gettext("IPv4");?>
169 169
				</option>
170
				<option value="ipv6" <?php if ($ipprotocol == "ipv6") echo "selected"; ?>>
170
				<option value="ipv6" <?php if ($ipprotocol == "ipv6") echo "selected=\"selected\""; ?>>
171 171
					<?=gettext("IPv6");?>
172 172
				</option>
173 173
			</select>
......
178 178
		<tr>
179 179
			<td width="22%" valign="top">&nbsp;</td>
180 180
			<td width="78%">
181
				<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Test"); ?>">
181
				<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Test"); ?>" />
182 182
			</td>
183 183
		</tr>
184 184
		<tr>
185 185
		<td valign="top" colspan="2">
186 186
		<?php if ($do_testport) {
187
			echo "<font face='terminal' size='2'>";
187
			echo "<font face=\"terminal\" size=\"2\">";
188 188
			echo "<strong>" . gettext("Port Test Results") . ":</strong><br />";
189
			echo '<pre>';
189
		?>
190
			<script type="text/javascript">
191
			//<![CDATA[
192
			window.onload=function(){
193
				document.getElementById("testportCaptured").wrap='off';
194
			}
195
			//]]>
196
			</script>
197
		<?php
198
			echo "<textarea id=\"testportCaptured\" style=\"width:98%\" name=\"code\" rows=\"15\" cols=\"66\" readonly=\"readonly\">";
190 199
			$result = "";
191 200
			$nc_base_cmd = "/usr/bin/nc";
192 201
			$nc_args = "-w {$timeout}";
......
266 275
					echo htmlspecialchars($result);
267 276
				}
268 277
			}
269
			echo '</pre>' ;
278
			echo '</textarea>&nbsp;</font>' ;
270 279
		}
271 280
		?>
272 281
		</td>
......
275 284
</form>
276 285
</td></tr></table>
277 286
<?php include("fend.inc"); ?>
287
</body>
288
</html>

Formats disponibles : Unified diff