Projet

Général

Profil

« Précédent | Suivant » 

Révision 391453a1

Ajouté par Colin Fleming il y a presque 10 ans

Tidy up "vpn_ipsec" XHTML

Add CDATA section to SCRIPTS
Add SUMMARY to TABLES
Update HTML Boolean operators
Close INPUT and IMG tags and ALT to IMG tags
Move NOWRAP into CLASS statement
Deprecate ampersand in Anchor tags

Voir les différences:

usr/local/www/vpn_ipsec.php
130 130
	if ($pconfig['enable'] && is_subsystem_dirty('ipsec'))
131 131
		print_info_box_np(gettext("The IPsec tunnel configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
132 132
?>
133
<table width="100%" border="0" cellpadding="0" cellspacing="0">
133
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="vpn ipsec">
134 134
	<tr>
135 135
		<td class="tabnavtbl">
136 136
			<?php
......
146 146
	<tr>
147 147
		<td>
148 148
			<div id="mainarea">
149
				<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
149
				<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
150 150
					<tr>
151 151
						<td class="vtable">
152
							<table border="0" cellspacing="2" cellpadding="0">
152
							<table border="0" cellspacing="2" cellpadding="0" summary="enable">
153 153
								<tr>
154 154
									<td>
155
										<input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked";?>>
155
										<input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked=\"checked\"";?> />
156 156
									</td>
157 157
									<td>
158 158
										<strong><?=gettext("Enable IPsec"); ?></strong>
......
163 163
					</tr>
164 164
					<tr>
165 165
						<td>
166
							<input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
166
							<input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" />
167 167
						</td>
168 168
					</tr>
169 169
				</table>
170
				<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
170
				<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="phase-1 entries">
171 171
					<?php
172 172
						$i = 0;
173 173
						foreach ($a_phase1 as $ph1ent) {
......
244 244
							<?=htmlspecialchars($ph1ent['descr']);?>&nbsp;
245 245
							<?=$spane;?>
246 246
						</td>
247
						<td valign="middle" nowrap class="list">
248
							<table border="0" cellspacing="0" cellpadding="1">
247
						<td valign="middle" class="list nowrap">
248
							<table border="0" cellspacing="0" cellpadding="1" summary="icons">
249 249
								<tr>
250 250
									<td>
251 251
										<a href="vpn_ipsec_phase1.php?p1index=<?=$i;?>">
252
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit phase1 entry"); ?>" width="17" height="17" border="0">
252
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit phase1 entry"); ?>" width="17" height="17" border="0" alt="edit" />
253 253
										</a>
254 254
									</td>
255 255
									<td>
256
										<a href="vpn_ipsec.php?act=delph1&p1index=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this phase1 and all associated phase2 entries?"); ?>')">
257
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete phase1 entry"); ?>" width="17" height="17" border="0">
256
										<a href="vpn_ipsec.php?act=delph1&amp;p1index=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this phase1 and all associated phase2 entries?"); ?>')">
257
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete phase1 entry"); ?>" width="17" height="17" border="0" alt="delete" />
258 258
										</a>
259 259
									</td>
260 260
								</tr>
......
264 264
									</td>
265 265
									<td>
266 266
										<a href="vpn_ipsec_phase1.php?dup=<?=$i;?>">
267
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("copy phase1 entry"); ?>" width="17" height="17" border="0">
267
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("copy phase1 entry"); ?>" width="17" height="17" border="0" alt="add" />
268 268
										</a>
269 269
									</td>
270 270
								</tr>
......
285 285
										$phase2count++;
286 286
									}
287 287
								?>								
288
								<input  type="button" onClick="show_phase2('tdph2-<?=$i?>','shph2but-<?=$i?>')" value="+" /> - <?php printf(gettext("Show %s Phase-2 entries"), $phase2count); ?></a>
288
								<input type="button" onclick="show_phase2('tdph2-<?=$i?>','shph2but-<?=$i?>')" value="+" /> - <?php printf(gettext("Show %s Phase-2 entries"), $phase2count); ?>
289 289
							</div>
290
							<table class="tabcont" width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" id="tdph2-<?=$i?>" style="display:none">
290
							<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" id="tdph2-<?=$i?>" style="display:none" summary="phase-2 entries">
291 291
								<tr>
292 292
									<td class="listhdrr"><?=gettext("Mode"); ?></td>
293 293
									<?php if(($ph2ent['mode'] == "tunnel") or ($ph2ent['mode'] == "tunnel6")): ?>
......
298 298
									<td class="listhdrr"><?=gettext("P2 Transforms"); ?></td>
299 299
									<td class="listhdrr"><?=gettext("P2 Auth Methods"); ?></td>
300 300
									<td class ="list">
301
										<a href="vpn_ipsec_phase2.php?ikeid=<?=$ph1ent['ikeid'];?><?php if (isset($ph1ent['mobile'])) echo "&mobile=true";?>">
302
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add phase2 entry"); ?>" width="17" height="17" border="0">
301
										<a href="vpn_ipsec_phase2.php?ikeid=<?=$ph1ent['ikeid'];?><?php if (isset($ph1ent['mobile'])) echo "&amp;mobile=true";?>">
302
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add phase2 entry"); ?>" width="17" height="17" border="0" alt="add" />
303 303
										</a>
304 304
									</td>
305 305
								</tr>
......
320 320
								?>
321 321
								<tr valign="top" ondblclick="document.location='vpn_ipsec_phase2.php?p2index=<?=$j;?>'">
322 322

  
323
									<td nowrap class="listlr">
323
									<td class="listlr nowrap">
324 324
										<?=$spans;?>
325 325
											<?=$ph2ent['mode'];?>
326 326
										<?=$spane;?>
327 327
									</td>
328 328
									<?php 
329 329
										if(($ph2ent['mode'] <> "tunnel") and ($ph2ent['mode'] <> "tunnel6")) {
330
											echo "<td nowrap class=\"listr\">&nbsp;</td><td nowrap class=\"listr\">&nbsp;</td>";
330
											echo "<td class=\"listr nowrap\">&nbsp;</td><td class=\"listr nowrap\">&nbsp;</td>";
331 331
										} 
332 332
									?>
333 333
									<?php if(($ph2ent['mode'] == "tunnel") or ($ph2ent['mode'] == "tunnel6")): ?>
334
									<td nowrap class="listr">
334
									<td class="listr nowrap">
335 335
										<?=$spans;?>
336 336
											<?=ipsec_idinfo_to_text($ph2ent['localid']); ?>
337 337
										<?=$spane;?>
338 338
									</td>
339
									<td nowrap class="listr">
339
									<td class="listr nowrap">
340 340
										<?=$spans;?>
341 341
											<?=ipsec_idinfo_to_text($ph2ent['remoteid']); ?>
342 342
										<?=$spane;?>
343 343
									</td>
344 344
									<?php endif; ?>
345
									<td nowrap class="listr">
345
									<td class="listr nowrap">
346 346
										<?=$spans;?>
347 347
											<?php echo $p2_protos[$ph2ent['protocol']];	?>
348 348
										<?=$spane;?>
......
365 365
										?>
366 366
										<?=$spane;?>
367 367
									</td>
368
									<td nowrap class="listr">
368
									<td class="listr nowrap">
369 369
										<?=$spans;?>
370 370
										<?php
371 371
											$k = 0;
......
377 377
										?>
378 378
										<?=$spane;?>
379 379
									</td>
380
									<td nowrap class="list">
380
									<td class="list nowrap">
381 381
										<a href="vpn_ipsec_phase2.php?p2index=<?=$j;?>">
382
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit phase2 entry"); ?>" width="17" height="17" border="0">
382
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit phase2 entry"); ?>" width="17" height="17" border="0" alt="edit" />
383 383
										</a>
384
										<a href="vpn_ipsec.php?act=delph2&p1index=<?=$i;?>&p2index=<?=$j;?>" onclick="return confirm('<?=gettext("Do you really want to delete this phase2 entry?"); ?>')">
385
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete phase2 entry"); ?>" width="17" height="17" border="0">
384
										<a href="vpn_ipsec.php?act=delph2&amp;p1index=<?=$i;?>&amp;p2index=<?=$j;?>" onclick="return confirm('<?=gettext("Do you really want to delete this phase2 entry?"); ?>')">
385
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete phase2 entry"); ?>" width="17" height="17" border="0" alt="delete" />
386 386
										</a>
387 387
										<a href="vpn_ipsec_phase2.php?dup=<?=$j;?>">
388
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new Phase 2 based on this one"); ?>" width="17" height="17" border="0">
388
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new Phase 2 based on this one"); ?>" width="17" height="17" border="0" alt="add" />
389 389
										</a>
390 390
									</td>
391 391
								</tr>
......
411 411
					<tr>
412 412
						<td class="list" colspan="5"></td>
413 413
						<td class="list">
414
							<table border="0" cellspacing="0" cellpadding="1">
414
							<table border="0" cellspacing="0" cellpadding="1" summary="add">
415 415
								<tr>
416 416
									<td width="17"></td>
417 417
									<td>
418 418
										<a href="vpn_ipsec_phase1.php">
419
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add phase1 entry"); ?>" width="17" height="17" border="0">
419
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add phase1 entry"); ?>" width="17" height="17" border="0" alt="add" />
420 420
										</a>
421 421
									</td>
422 422
								</tr>
423 423
							</table>
424
						<td>
424
						</td>
425 425
					</tr>
426 426
					<tr>
427 427
						<td colspan="4">
......
445 445
</form>
446 446
<?php include("fend.inc"); ?>
447 447
<script type="text/javascript">
448
//<![CDATA[
448 449
function show_phase2(id, buttonid) {
449 450
	document.getElementById(buttonid).innerHTML='';
450 451
	aodiv = document.getElementById(id);
451 452
	aodiv.style.display = "block";
452 453
}
454
//]]>
453 455
</script>
454 456
</body>
455 457
</html>
usr/local/www/vpn_ipsec_settings.php
122 122
<?php include("fbegin.inc"); ?>
123 123

  
124 124
<script type="text/javascript">
125
<!--
125
//<![CDATA[
126 126

  
127 127
function maxmss_checked(obj) {
128 128
	if (obj.checked)
......
131 131
		jQuery('#maxmss').attr('disabled','true');
132 132
}
133 133

  
134
//-->
134
//]]>
135 135
</script>
136 136

  
137 137
<form action="vpn_ipsec_settings.php" method="post" name="iform" id="iform">
......
143 143
		print_input_errors($input_errors);
144 144
?>
145 145

  
146
<table width="100%" border="0" cellpadding="0" cellspacing="0">
146
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="vpn ipsec settings">
147 147
	<tr>
148 148
		<td class="tabnavtbl">
149 149
			<?php
......
159 159
	<tr>
160 160
		<td id="mainarea">
161 161
			<div class="tabcont">
162
				<table width="100%" border="0" cellpadding="6" cellspacing="0">
162
				<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
163 163
					<tr>
164 164
						<td colspan="2" valign="top" class="listtopic"><?=gettext("IPSec Advanced Settings"); ?></td>
165 165
					</tr>
......
189 189
						<td width="78%" class="vtable">
190 190
							<strong><?=gettext("Start IPSec in debug mode based on sections selected"); ?></strong>
191 191
							<br />
192
							<table>
192
							<table summary="ipsec debug">
193 193
						<?php foreach ($ipsec_loglevels as $lkey => $ldescr): ?>
194 194
							<tr>
195 195
								<td width="22%" valign="top" class="vncell"><?=$ldescr;?></td>
......
206 206
								</td>
207 207
							</tr>
208 208
						<?php endforeach; ?>
209
							<tr style="display:none;"><td></td></tr>
209 210
							</table>
210 211
							<br /><?=gettext("Launches IPSec in debug mode so that more verbose logs " .
211 212
							"will be generated to aid in troubleshooting."); ?>
......
238 239
					<tr>
239 240
						<td width="22%" valign="top">&nbsp;</td>
240 241
						<td width="78%">
241
							<input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
242
							<input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" />
242 243
						</td>
243 244
					</tr>
244 245
				</table>

Formats disponibles : Unified diff