Projet

Général

Profil

« Précédent | Suivant » 

Révision 572f4f09

Ajouté par Colin Fleming il y a presque 10 ans

Tidy up "vpn_pptp.php" XHTML

Add CDATA sections to SCRIPTS
Add SUMMARY to TABLES
Update HTML Boolean Operators
Close INPUT tags
Add missing closing TR tags and missing closing TD tags

Voir les différences:

usr/local/www/vpn_pptp.php
202 202
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
203 203
<?php include("fbegin.inc"); ?>
204 204
<script type="text/javascript">
205
<!--
205
//<![CDATA[
206 206
function get_radio_value(obj)
207 207
{
208 208
	for (i = 0; i < obj.length; i++) {
......
292 292
		document.iform.redir.disabled = 1;
293 293
	}
294 294
}
295
//-->
295
//]]>
296 296
</script>
297 297
<form action="vpn_pptp.php" method="post" name="iform" id="iform">
298 298
<?php if ($input_errors) print_input_errors($input_errors); ?>
299 299
<?php if ($savemsg) print_info_box($savemsg); ?>
300 300
<?php print_info_box(gettext("PPTP is no longer considered a secure VPN technology because it relies upon MS-CHAPv2 which has been compromised. If you continue to use PPTP be aware that intercepted traffic can be decrypted by a third party, so it should be considered unencrypted. We advise migrating to another VPN type such as OpenVPN or IPsec.<br /><br /><a href=\"https://isc.sans.edu/diary/End+of+Days+for+MS-CHAPv2/13807\">Read More</a>")); ?>
301
<table width="100%" border="0" cellpadding="0" cellspacing="0">
301
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="vpn pptp">
302 302
  <tr><td class="tabnavtbl">
303 303
<?php
304 304
	$tab_array = array();
......
310 310
  <tr> 
311 311
    <td>
312 312
<div id="mainarea">
313
              <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
313
              <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
314 314
                <tr> 
315 315
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
316 316
                  <td width="78%" class="vtable"> 
317 317
                    <input name="mode" type="radio" onclick="enable_change(false)" value="off"
318
				  	<?php if (($pconfig['mode'] != "server") && ($pconfig['mode'] != "redir")) echo "checked";?>>
318
				  	<?php if (($pconfig['mode'] != "server") && ($pconfig['mode'] != "redir")) echo "checked=\"checked\"";?> />
319 319
                    <?=gettext("Off"); ?></td>
320
                </tr> 
320 321
                <tr> 
321 322
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
322 323
                  <td width="78%" class="vtable">
323 324

  
324
			<input type="radio" name="mode" value="redir" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "redir") echo "checked" ?>>
325
			<input type="radio" name="mode" value="redir" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "redir") echo "checked=\"checked\"" ?> />
325 326
                    <?=gettext("Redirect incoming PPTP connections to");?>:</td>
327
                </tr> 
326 328
				<tr>
327 329
				  <td width="22%" valign="top" class="vncellreq"><?=gettext("PPTP redirection");?></td>
328 330
                  <td width="78%" class="vtable"> 
329
                    <?=$mandfldhtml;?><input name="redir" type="text" class="formfld unknown" id="redir" size="20" value="<?=htmlspecialchars($pconfig['redir']);?>"> 
331
                    <?=$mandfldhtml;?><input name="redir" type="text" class="formfld unknown" id="redir" size="20" value="<?=htmlspecialchars($pconfig['redir']);?>" /> 
330 332
                    <br />
331 333
                    <?=gettext("Enter the IP address of a host which will accept incoming " .
332 334
                    "PPTP connections"); ?>.</td>
335
                </tr> 
333 336
                <tr> 
334 337
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
335 338
                  <td width="78%" class="vtable">
336
			<input type="radio" name="mode" value="server" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "server") echo "checked"; ?>>
339
			<input type="radio" name="mode" value="server" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "server") echo "checked=\"checked\""; ?> />
337 340
                    <?=gettext("Enable PPTP server"); ?></td>
338 341
                </tr>
339 342
				<tr>
......
344 347
								$toselect = ($pconfig['n_pptp_units'] > 0) ? $pconfig['n_pptp_units'] : 16;
345 348
								for($x=1; $x<255; $x++) {
346 349
									if($x == $toselect)
347
										$SELECTED = " SELECTED";
350
										$SELECTED = " selected=\"selected\"";
348 351
									else
349 352
										$SELECTED = "";
350 353
									echo "<option value=\"{$x}\"{$SELECTED}>{$x}</option>\n";
......
357 360
                <tr> 
358 361
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Server address"); ?></td>
359 362
                  <td width="78%" class="vtable"> 
360
                    <?=$mandfldhtml;?><input name="localip" type="text" class="formfld unknown" id="localip" size="20" value="<?=htmlspecialchars($pconfig['localip']);?>"> 
363
                    <?=$mandfldhtml;?><input name="localip" type="text" class="formfld unknown" id="localip" size="20" value="<?=htmlspecialchars($pconfig['localip']);?>" /> 
361 364
			<br />
362 365
			<?=gettext("Enter the IP address the PPTP server should give to clients for use as their \"gateway\""); ?>.
363 366
			<br />
......
370 373
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Remote address " .
371 374
                    "range"); ?></td>
372 375
                  <td width="78%" class="vtable"> 
373
                    <?=$mandfldhtml;?><input name="remoteip" type="text" class="formfld unknown" id="remoteip" size="20" value="<?=htmlspecialchars($pconfig['remoteip']);?>">
376
                    <?=$mandfldhtml;?><input name="remoteip" type="text" class="formfld unknown" id="remoteip" size="20" value="<?=htmlspecialchars($pconfig['remoteip']);?>" />
374 377
                    <br />
375 378
                    <?=gettext("Specify the starting address for the client IP subnet"); ?>.<br />
379
                  </td>
376 380
                </tr>
377 381
                <tr> 
378 382
                  <td width="22%" valign="top" class="vncell"><?=gettext("PPTP DNS Servers"); ?></td>
379 383
                  <td width="78%" class="vtable"> 
380
                    <?=$mandfldhtml;?><input name="pptp_dns1" type="text" class="formfld unknown" id="pptp_dns1" size="20" value="<?=htmlspecialchars($pconfig['pptp_dns1']);?>">
384
                    <?=$mandfldhtml;?><input name="pptp_dns1" type="text" class="formfld unknown" id="pptp_dns1" size="20" value="<?=htmlspecialchars($pconfig['pptp_dns1']);?>" />
381 385
                    <br />
382
					<input name="pptp_dns2" type="text" class="formfld unknown" id="pptp_dns2" size="20" value="<?=htmlspecialchars($pconfig['pptp_dns2']);?>">
386
					<input name="pptp_dns2" type="text" class="formfld unknown" id="pptp_dns2" size="20" value="<?=htmlspecialchars($pconfig['pptp_dns2']);?>" />
383 387
                    <br />
384 388
                   <?=gettext("primary and secondary DNS servers assigned to PPTP clients"); ?><br />
389
                  </td>
385 390
                </tr>
386 391
                <tr> 
387 392
                  <td width="22%" valign="top" class="vncell"><?=gettext("WINS Server"); ?></td>
388 393
                  <td width="78%" valign="top" class="vtable">
389
                      <input name="wins" class="formfld unknown" id="wins" size="20" value="<?=htmlspecialchars($pconfig['wins']);?>">
394
                      <input name="wins" class="formfld unknown" id="wins" size="20" value="<?=htmlspecialchars($pconfig['wins']);?>" />
390 395
                  </td>
391 396
                </tr>
392 397
                <tr> 
393 398
                  <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS"); ?></td>
394 399
                  <td width="78%" class="vtable"> 
395
                      <input name="radiusenable" type="checkbox" id="radiusenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiusenable']) echo "checked"; ?>>
400
                      <input name="radiusenable" type="checkbox" id="radiusenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiusenable']) echo "checked=\"checked\""; ?> />
396 401
                      <strong><?=gettext("Use a RADIUS server for authentication"); ?></strong><br />
397 402
                      <?=gettext("When set, all users will be authenticated using " .
398 403
                      "the RADIUS server specified below. The local user database " .
399 404
                      "will not be used"); ?>.<br />
400 405
                      <br />
401
                      <input name="radacct_enable" type="checkbox" id="radacct_enable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radacct_enable']) echo "checked"; ?>>
406
                      <input name="radacct_enable" type="checkbox" id="radacct_enable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radacct_enable']) echo "checked=\"checked\""; ?> />
402 407
                      <strong><?=gettext("Enable RADIUS accounting"); ?> <br />
403 408
                      </strong><?=gettext("Sends accounting packets to the RADIUS server"); ?>.<br />
404 409
			 <br />
405
                      <input name="radiussecenable" type="checkbox" id="radiussecenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiussecenable']) echo "checked"; ?>>
410
                      <input name="radiussecenable" type="checkbox" id="radiussecenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiussecenable']) echo "checked=\"checked\""; ?> />
406 411
                      <strong><?=gettext("Secondary RADIUS server for failover authentication"); ?></strong><br />
407 412
                      <?=gettext("When set, all requests will go to the secondary server when primary fails"); ?><br />
408 413
		      <br />
409
                      <input name="radiusissueips" value="yes" type="checkbox" class="formfld" id="radiusissueips"<?php if($pconfig['radiusissueips']) echo " CHECKED"; ?>>
414
                      <input name="radiusissueips" value="yes" type="checkbox" class="formfld" id="radiusissueips"<?php if($pconfig['radiusissueips']) echo " checked=\"checked\""; ?> />
410 415
		      <strong><?=gettext("RADIUS issued IPs"); ?></strong>
411 416
                      <br /><?=gettext("Issue IP addresses via RADIUS server"); ?>.
412
		      </td>
413 417
                 </td>
414 418
                </tr>
415 419
                <tr> 
416 420
                  <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS NAS IP"); ?></td>
417 421
                  <td width="78%" valign="top" class="vtable">
418
                      <input name="radius_nasip" class="formfld unknown" id="radius_nasip" size="20" value="<?=htmlspecialchars($pconfig['radius_nasip']);?>">
422
                      <input name="radius_nasip" class="formfld unknown" id="radius_nasip" size="20" value="<?=htmlspecialchars($pconfig['radius_nasip']);?>" />
419 423
                  </td>
420 424
		</tr>
421 425
                <tr> 
422 426
                  <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS Accounting Update"); ?></td>
423 427
                  <td width="78%" valign="top" class="vtable">
424
                      <input name="radius_acct_update" class="formfld unknown" id="radius_acct_update" size="20" value="<?=htmlspecialchars($pconfig['radius_acct_update']);?>">
428
                      <input name="radius_acct_update" class="formfld unknown" id="radius_acct_update" size="20" value="<?=htmlspecialchars($pconfig['radius_acct_update']);?>" />
425 429
                  </td>
426 430
		</tr>
427 431
                <tr> 
428 432
                  <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS Server"); ?> </td>
429 433
                  <td width="78%" class="vtable">
430
                      <input name="radiusserver" type="text" class="formfld unknown" id="radiusserver" size="20" value="<?=htmlspecialchars($pconfig['radiusserver']);?>">
431
                      <input name="radiusserverport" type="text" class="formfld unknown" id="radiusserverport" size="4" value="<?=htmlspecialchars($pconfig['radiusserverport']);?>">
432
                      <input name="radiusserveracctport" type="text" class="formfld unknown" id="radiusserveracctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserveracctport']);?>">
434
                      <input name="radiusserver" type="text" class="formfld unknown" id="radiusserver" size="20" value="<?=htmlspecialchars($pconfig['radiusserver']);?>" />
435
                      <input name="radiusserverport" type="text" class="formfld unknown" id="radiusserverport" size="4" value="<?=htmlspecialchars($pconfig['radiusserverport']);?>" />
436
                      <input name="radiusserveracctport" type="text" class="formfld unknown" id="radiusserveracctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserveracctport']);?>" />
433 437
                      <br />
434 438
                      <?=gettext("Enter the IP address, RADIUS port, and RADIUS accounting port of the RADIUS server"); ?>.</td>
435 439
                </tr>
436 440
                <tr> 
437 441
                  <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS shared secret"); ?></td>
438 442
                  <td width="78%" valign="top" class="vtable">
439
                      <input name="radiussecret" type="password" class="formfld pwd" id="radiussecret" size="20" value="<?=htmlspecialchars($pconfig['radiussecret']);?>">
443
                      <input name="radiussecret" type="password" class="formfld pwd" id="radiussecret" size="20" value="<?=htmlspecialchars($pconfig['radiussecret']);?>" />
440 444
                      <br />
441 445
                      <?=gettext("Enter the shared secret that will be used to authenticate " .
442 446
                      "to the RADIUS server"); ?>.</td>
......
444 448
                <tr> 
445 449
                  <td width="22%" valign="top" class="vncell"><?=gettext("Secondary RADIUS server"); ?> </td>
446 450
                  <td width="78%" class="vtable">
447
                      <input name="radiusserver2" type="text" class="formfld unknown" id="radiusserver2" size="20" value="<?=htmlspecialchars($pconfig['radiusserver2']);?>">
448
                      <input name="radiusserver2port" type="text" class="formfld unknown" id="radiusserver2port" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2port']);?>">
449
                      <input name="radiusserver2acctport" type="text" class="formfld unknown" id="radiusserver2acctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2acctport']);?>">
451
                      <input name="radiusserver2" type="text" class="formfld unknown" id="radiusserver2" size="20" value="<?=htmlspecialchars($pconfig['radiusserver2']);?>" />
452
                      <input name="radiusserver2port" type="text" class="formfld unknown" id="radiusserver2port" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2port']);?>" />
453
                      <input name="radiusserver2acctport" type="text" class="formfld unknown" id="radiusserver2acctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2acctport']);?>" />
450 454
                      <br />
451 455
                      <?=gettext("Enter the IP address, RADIUS port, and RADIUS accounting port of the RADIUS server"); ?>.</td>
452 456
                </tr>
453 457
                <tr> 
454 458
                  <td width="22%" valign="top" class="vncell"><?=gettext("Secondary RADIUS shared secret"); ?></td>
455 459
                  <td width="78%" valign="top" class="vtable">
456
                      <input name="radiussecret2" type="password" class="formfld pwd" id="radiussecret2" size="20" value="<?=htmlspecialchars($pconfig['radiussecret2']);?>">
460
                      <input name="radiussecret2" type="password" class="formfld pwd" id="radiussecret2" size="20" value="<?=htmlspecialchars($pconfig['radiussecret2']);?>" />
457 461
                      <br />
458 462
                      <?=gettext("Enter the shared secret that will be used to authenticate " .
459 463
                      "to the secondary RADIUS server"); ?>.</td>
......
464 468
                <tr> 
465 469
                  <td width="22%" valign="middle">&nbsp;</td>
466 470
                  <td width="78%" class="vtable"> 
467
                    <input name="req128" type="checkbox" id="req128" value="yes" <?php if ($pconfig['req128']) echo "checked"; ?>> 
471
                    <input name="req128" type="checkbox" id="req128" value="yes" <?php if ($pconfig['req128']) echo "checked=\"checked\""; ?> /> 
468 472
                    <strong><?=gettext("Require 128-bit encryption"); ?></strong><br />
469 473
                    <?=gettext("When set, only 128-bit encryption will be accepted. Otherwise " .
470 474
                    "40-bit and 56-bit encryption will be accepted as well. Note that " .
......
474 478
                <tr> 
475 479
                  <td width="22%" valign="top">&nbsp;</td>
476 480
                  <td width="78%"> 
477
                    <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)"> 
481
                    <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)" /> 
478 482
                  </td>
479 483
                </tr>
480 484
                <tr> 
......
490 494
</table>
491 495
</form>
492 496
<script type="text/javascript">
493
<!--
497
//<![CDATA[
494 498
enable_change(false);
495
//-->
499
//]]>
496 500
</script>
497 501
<?php include("fend.inc"); ?>
498 502
</body>

Formats disponibles : Unified diff