Project

General

Profile

« Previous | Next » 

Revision 0f3a8925

Added by Colin Fleming over 12 years ago

Tidy up "system_authservers.php" XHTML

Add CDATA sections to SCRIPT tags
Update HTML boolean operators
Close INPUT tags
Move TFOOT between THEAD and TBODY, this is a "quirk" of HTML
Deprecate the ampersand in ANCHOR tags
Add missing closing HTML tag

View differences:

usr/local/www/system_authservers.php
300 300
<body link="#000000" vlink="#000000" alink="#000000" onload="<?= $jsevents["body"]["onload"] ?>">
301 301
<?php include("fbegin.inc"); ?>
302 302
<script type="text/javascript">
303
<!--
303
//<![CDATA[
304 304

  
305 305
function server_typechange(typ) {
306 306

  
......
417 417
        if (oWin==null || typeof(oWin)=="undefined")
418 418
			alert("<?=gettext('Popup blocker detected.  Action aborted.');?>");
419 419
}
420
//-->
420
//]]>
421 421
</script>
422 422
<?php
423 423
	if ($input_errors)
......
425 425
	if ($savemsg)
426 426
		print_info_box($savemsg);
427 427
?>
428
<table width="100%" border="0" cellpadding="0" cellspacing="0">
428
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="auth servers">
429 429
	<tr>
430 430
		<td>
431 431
		<?php
......
445 445
				<?php if ($act == "new" || $act == "edit" || $input_errors): ?>
446 446

  
447 447
				<form action="system_authservers.php" method="post" name="iform" id="iform">
448
					<table width="100%" border="0" cellpadding="6" cellspacing="0">
448
					<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
449 449
						<tr>
450 450
							<td width="22%" valign="top" class="vncellreq"><?=gettext("Descriptive name");?></td>
451 451
							<td width="78%" class="vtable">
......
466 466
									foreach ($auth_server_types as $typename => $typedesc ):
467 467
										$selected = "";
468 468
										if ($pconfig['type'] == $typename)
469
											$selected = "selected";
469
											$selected = "selected=\"selected\"";
470 470
								?>
471 471
									<option value="<?=$typename;?>" <?=$selected;?>><?=$typedesc;?></option>
472 472
								<?php endforeach; ?>
......
479 479
						</tr>
480 480
					</table>
481 481

  
482
					<table width="100%" border="0" cellpadding="6" cellspacing="0" id="ldap" style="display:none">
482
					<table width="100%" border="0" cellpadding="6" cellspacing="0" id="ldap" style="display:none" summary="">
483 483
						<tr>
484 484
							<td colspan="2" class="list" height="12"></td>
485 485
						</tr>
......
506 506
									foreach ($ldap_urltypes as $urltype => $urlport):
507 507
										$selected = "";
508 508
										if ($pconfig['ldap_urltype'] == $urltype)
509
											$selected = "selected";
509
											$selected = "selected=\"selected\"";
510 510
								?>
511 511
									<option value="<?=$urltype;?>" <?=$selected;?>><?=$urltype;?></option>
512 512
								<?php endforeach; ?>
......
522 522
                                                                foreach ($a_ca as $ca):
523 523
                                                                        $selected = "";
524 524
                                                                        if ($pconfig['ldap_caref'] == $ca['refid'])
525
                                                                                $selected = "selected";
525
                                                                                $selected = "selected=\"selected\"";
526 526
                                                        ?>
527 527
									<option value="<?=$ca['refid'];?>" <?=$selected;?>><?=$ca['descr'];?></option>
528 528
                                                        <?php	endforeach; ?>
......
542 542
									foreach ($ldap_protvers as $version):
543 543
										$selected = "";
544 544
										if ($pconfig['ldap_protver'] == $version)
545
											$selected = "selected";
545
											$selected = "selected=\"selected\"";
546 546
								?>
547 547
									<option value="<?=$version;?>" <?=$selected;?>><?=$version;?></option>
548 548
								<?php endforeach; ?>
......
552 552
						<tr>
553 553
							<td width="22%" valign="top" class="vncell"><?=gettext("Search scope");?></td>
554 554
							<td width="78%" class="vtable">
555
								<table border="0" cellspacing="0" cellpadding="2">
555
								<table border="0" cellspacing="0" cellpadding="2" summary="search scope">
556 556
									<tr>
557 557
										<td><?=gettext("Level:");?> &nbsp;</td>
558 558
										<td>
......
561 561
												foreach ($ldap_scopes as $scopename => $scopedesc):
562 562
													$selected = "";
563 563
													if ($pconfig['ldap_scope'] == $scopename)
564
														$selected = "selected";
564
														$selected = "selected=\"selected\"";
565 565
											?>
566 566
												<option value="<?=$scopename;?>" <?=$selected;?>><?=$scopedesc;?></option>
567 567
											<?php endforeach; ?>
......
581 581
						<tr>
582 582
							<td width="22%" valign="top" class="vncellreq"><?=gettext("Authentication containers");?></td>
583 583
							<td width="78%" class="vtable">
584
								<table border="0" cellspacing="0" cellpadding="2">
584
								<table border="0" cellspacing="0" cellpadding="2" summary="auth containers">
585 585
									<tr>
586 586
										<td><?=gettext("Containers:");?> &nbsp;</td>
587 587
										<td>
588
											<input id="ldapauthcontainers" name="ldapauthcontainers" type="text" class="formfld unknown" id="ldapauthcontainers" size="40" value="<?=htmlspecialchars($pconfig['ldap_authcn']);?>"/>
589
											<input type="button" onClick="select_clicked();" value="<?=gettext("Select");?>">
588
											<input name="ldapauthcontainers" type="text" class="formfld unknown" id="ldapauthcontainers" size="40" value="<?=htmlspecialchars($pconfig['ldap_authcn']);?>"/>
589
											<input type="button" onclick="select_clicked();" value="<?=gettext("Select");?>" />
590 590
											<br /><?=gettext("Note: Semi-Colon separated. This will be prepended to the search base dn above or you can specify full container path.");?>
591 591
											<br /><?=gettext("Example: CN=Users;DC=example");?>
592 592
											<br /><?=gettext("Example: CN=Users,DC=example,DC=com;OU=OtherUsers,DC=example,DC=com ");?>
......
598 598
						<tr>
599 599
							<td width="22%" valign="top" class="vncell"><?=gettext("Extended Query");?></td>
600 600
							<td width="78%" class="vtable">
601
								<table border="0" cellspacing="0" cellpadding="2">
601
								<table border="0" cellspacing="0" cellpadding="2" summary="query">
602 602
									<tr>
603 603
										<td>
604
											<input name="ldap_extended_enabled" type="checkbox" id="ldap_extended_enabled" value="no" <?php if ($pconfig['ldap_extended_enabled']) echo "checked"; ?> >
604
											<input name="ldap_extended_enabled" type="checkbox" id="ldap_extended_enabled" value="no" <?php if ($pconfig['ldap_extended_enabled']) echo "checked=\"checked\""; ?> />
605 605
										</td>
606 606
										<td>
607 607

  
......
615 615
						<tr>
616 616
							<td width="22%" valign="top" class="vncell"><?=gettext("Bind credentials");?></td>
617 617
							<td width="78%" class="vtable">
618
								<table border="0" cellspacing="0" cellpadding="2">
618
								<table border="0" cellspacing="0" cellpadding="2" summary="bind credentials">
619 619
									<tr>
620 620
										<td>
621
											<input name="ldap_anon" type="checkbox" id="ldap_anon" value="yes" <?php if ($pconfig['ldap_anon']) echo "checked"; ?> onClick="ldap_bindchange()">
621
											<input name="ldap_anon" type="checkbox" id="ldap_anon" value="yes" <?php if ($pconfig['ldap_anon']) echo "checked=\"checked\""; ?> onclick="ldap_bindchange()" />
622 622
										</td>
623 623
										<td>
624 624
											<?=gettext("Use anonymous binds to resolve distinguished names");?>
625 625
										</td>
626 626
									</tr>
627 627
								</table>
628
								<table border="0" cellspacing="0" cellpadding="2" id="ldap_bind">
628
								<table border="0" cellspacing="0" cellpadding="2" id="ldap_bind" summary="bind">
629 629
									<tr>
630 630
										<td colspan="2"></td>
631 631
									</tr>
......
653 653
									foreach ($ldap_templates as $tmplname => $tmpldata):
654 654
										$selected = "";
655 655
										if ($pconfig['ldap_template'] == $tmplname)
656
											$selected = "selected";
656
											$selected = "selected=\"selected\"";
657 657
								?>
658 658
									<option value="<?=$tmplname;?>" <?=$selected;?>><?=$tmpldata['desc'];?></option>
659 659
								<?php endforeach; ?>
......
681 681
						</tr>
682 682
					</table>
683 683

  
684
					<table width="100%" border="0" cellpadding="6" cellspacing="0" id="radius" style="display:none">
684
					<table width="100%" border="0" cellpadding="6" cellspacing="0" id="radius" style="display:none" summary="">
685 685
						<tr>
686 686
							<td colspan="2" class="list" height="12"></td>
687 687
						</tr>
......
708 708
									foreach ($radius_srvcs as $srvcname => $srvcdesc):
709 709
										$selected = "";
710 710
										if ($pconfig['radius_srvcs'] == $srvcname)
711
											$selected = "selected";
711
											$selected = "selected=\"selected\"";
712 712
								?>
713 713
									<option value="<?=$srvcname;?>" <?=$selected;?>><?=$srvcdesc;?></option>
714 714
								<?php endforeach; ?>
......
738 738
						</tr>
739 739
					</table>
740 740

  
741
					<table width="100%" border="0" cellpadding="6" cellspacing="0">
741
					<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="">
742 742
						<tr>
743 743
							<td width="22%" valign="top">&nbsp;</td>
744 744
							<td width="78%">
......
753 753

  
754 754
				<?php else: ?>
755 755

  
756
				<table class="sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
756
				<table class="sortable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="">
757 757
					<thead>
758 758
						<tr>
759 759
							<th width="25%" class="listhdrr"><?=gettext("Server Name");?></th>
......
762 762
							<th width="10%" class="list"></th>
763 763
						</tr>
764 764
					</thead>
765
					<tfoot>
766
						<tr>
767
							<td class="list" colspan="3"></td>
768
							<td class="list">
769
								<a href="system_authservers.php?act=new">
770
									<img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add server");?>" alt="<?=gettext("add server");?>" width="17" height="17" border="0" />
771
								</a>
772
							</td>
773
						</tr>
774
						<tr>
775
							<td colspan="3">
776
								<p>
777
									<?=gettext("Additional authentication servers can be added here.");?>
778
								</p>
779
							</td>
780
						</tr>
781
					</tfoot>
765 782
					<tbody>
766 783
						<?php
767 784
							$i = 0;
......
770 787
								$type = htmlspecialchars($auth_server_types[$server['type']]);
771 788
								$host = htmlspecialchars($server['host']);
772 789
						?>
773
						<tr <?php if ($i < (count($a_server) - 1)): ?> ondblclick="document.location='system_authservers.php?act=edit&id=<?=$i;?>'" <?php endif; ?>>
790
						<tr <?php if ($i < (count($a_server) - 1)): ?> ondblclick="document.location='system_authservers.php?act=edit&amp;id=<?=$i;?>'" <?php endif; ?>>
774 791
							<td class="listlr"><?=$name?>&nbsp;</td>
775 792
							<td class="listr"><?=$type;?>&nbsp;</td>
776 793
							<td class="listr"><?=$host;?>&nbsp;</td>
777
							<td valign="middle" nowrap class="list">
794
							<td valign="middle" class="list nowrap">
778 795
							<?php if ($i < (count($a_server) - 1)): ?>
779
								<a href="system_authservers.php?act=edit&id=<?=$i;?>">
796
								<a href="system_authservers.php?act=edit&amp;id=<?=$i;?>">
780 797
									<img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit server");?>" alt="<?=gettext("edit server");?>" width="17" height="17" border="0" />
781 798
								</a>
782 799
								&nbsp;
783
								<a href="system_authservers.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this Server?");?>')">
800
								<a href="system_authservers.php?act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this Server?");?>')">
784 801
									<img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete server");?>" alt="<?=gettext("delete server");?>" width="17" height="17" border="0" />
785 802
								</a>
786 803
							<?php endif; ?>
......
790 807
							$i++; endforeach;
791 808
						?>
792 809
					</tbody>
793
					<tfoot>
794
						<tr>
795
							<td class="list" colspan="3"></td>
796
							<td class="list">
797
								<a href="system_authservers.php?act=new">
798
									<img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add server");?>" alt="<?=gettext("add server");?>" width="17" height="17" border="0" />
799
								</a>
800
							</td>
801
						</tr>
802
						<tr>
803
							<td colspan="3">
804
								<p>
805
									<?=gettext("Additional authentication servers can be added here.");?>
806
								</p>
807
							</td>
808
						</tr>
809
					</tfoot>
810 810
				</table>
811 811

  
812 812
				<?php endif; ?>
......
817 817
</table>
818 818
<?php include("fend.inc"); ?>
819 819
<script type="text/javascript">
820
<!--
820
//<![CDATA[
821 821
server_typechange('<?=htmlspecialchars($pconfig['type']);?>');
822 822
<?php if (!isset($id) || $pconfig['type'] == "ldap"): ?>
823 823
ldap_bindchange();
......
830 830
<?php if (!isset($id) || $pconfig['type'] == "radius"): ?>
831 831
radius_srvcschange();
832 832
<?php endif; ?>
833
//-->
833
//]]>
834 834
</script>
835 835
</body>
836
</html>

Also available in: Unified diff