Project

General

Profile

« Previous | Next » 

Revision 3ef5194d

Added by N0YB over 11 years ago

XHTML Compliance

VPN - OpenVPN - Client Specific Overrides

View differences:

usr/local/www/vpn_openvpn_csc.php
232 232

  
233 233
<body link="#000000" vlink="#000000" alink="#000000" onload="<?= $jsevents["body"]["onload"] ?>">
234 234
<?php include("fbegin.inc"); ?>
235
<script language="JavaScript">
235
<script type="text/JavaScript">
236 236
<!--
237 237

  
238 238
function dns_domain_change() {
......
289 289
<table width="100%" border="0" cellpadding="0" cellspacing="0">
290 290
 	<tr>
291 291
		<td class="tabnavtbl">
292
			<ul id="tabnav">
292
			<ul id="tabnav"><li>
293 293
			<?php 
294 294
				$tab_array = array();
295 295
				$tab_array[] = array(gettext("Server"), false, "vpn_openvpn_server.php");
......
299 299
				add_package_tabs("OpenVPN", $tab_array);
300 300
				display_top_tabs($tab_array);
301 301
			?>
302
			</ul>
302
			</li></ul>
303 303
		</td>
304 304
	</tr>    
305 305
	<tr>
......
324 324
									<td>
325 325
										&nbsp;
326 326
										<span class="vexpl">
327
											<strong><?=gettext("Disable this override"); ?></strong><br>
327
											<strong><?=gettext("Disable this override"); ?></strong><br />
328 328
										</span>
329 329
									</td>
330 330
								</tr>
......
335 335
					<tr> 
336 336
						<td width="22%" valign="top" class="vncellreq"><?=gettext("Common name"); ?></td>
337 337
						<td width="78%" class="vtable"> 
338
							<input name="common_name" type="text" class="formfld unknown" size="30" value="<?=htmlspecialchars($pconfig['common_name']);?>">
339
							<br>
338
							<input name="common_name" type="text" class="formfld unknown" size="30" value="<?=htmlspecialchars($pconfig['common_name']);?>"/>
339
							<br />
340 340
							<?=gettext("Enter the client's X.509 common name here"); ?>.
341 341
						</td>
342 342
					</tr>
343 343
					<tr> 
344 344
						<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
345 345
						<td width="78%" class="vtable"> 
346
							<input name="description" type="text" class="formfld unknown" size="30" value="<?=htmlspecialchars($pconfig['description']);?>">
347
							<br>
346
							<input name="description" type="text" class="formfld unknown" size="30" value="<?=htmlspecialchars($pconfig['description']);?>"/>
347
							<br />
348 348
							<?=gettext("You may enter a description here for your reference (not parsed)"); ?>.
349 349
						</td>
350 350
					</tr>
......
378 378
					<tr>
379 379
						<td width="22%" valign="top" class="vncell"><?=gettext("Tunnel Network"); ?></td>
380 380
						<td width="78%" class="vtable">
381
							<input name="tunnel_network" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['tunnel_network']);?>">
382
							<br>
381
							<input name="tunnel_network" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['tunnel_network']);?>"/>
382
							<br />
383 383
							<?=gettext("This is the virtual network used for private " .
384 384
							"communications between this client and the " .
385 385
							"server expressed using CIDR (eg. 10.0.8.0/24). " .
......
438 438
								<tr>
439 439
									<td>
440 440
										<?php set_checked($pconfig['dns_domain_enable'],$chk); ?>
441
										<input name="dns_domain_enable" type="checkbox" id="dns_domain_enable" value="yes" <?=$chk;?> onClick="dns_domain_change()">
441
										<input name="dns_domain_enable" type="checkbox" id="dns_domain_enable" value="yes" <?=$chk;?> onclick="dns_domain_change()"/>
442 442
									</td>
443 443
									<td>
444 444
										<span class="vexpl">
445
	                                        <?=gettext("Provide a default domain name to clients"); ?><br>
445
	                                        <?=gettext("Provide a default domain name to clients"); ?><br />
446 446
										</span>
447 447
									</td>
448 448
								</tr>
......
450 450
							<table border="0" cellpadding="2" cellspacing="0" id="dns_domain_data">
451 451
								<tr>
452 452
									<td>
453
										<input name="dns_domain" type="text" class="formfld unknown" id="dns_domain" size="30" value="<?=htmlspecialchars($pconfig['dns_domain']);?>">
453
										<input name="dns_domain" type="text" class="formfld unknown" id="dns_domain" size="30" value="<?=htmlspecialchars($pconfig['dns_domain']);?>"/>
454 454
									</td>
455 455
								</tr>
456 456
							</table>
......
463 463
								<tr>
464 464
									<td>
465 465
										<?php set_checked($pconfig['dns_server_enable'],$chk); ?>
466
										<input name="dns_server_enable" type="checkbox" id="dns_server_enable" value="yes" <?=$chk;?> onClick="dns_server_change()">
466
										<input name="dns_server_enable" type="checkbox" id="dns_server_enable" value="yes" <?=$chk;?> onclick="dns_server_change()"/>
467 467
									</td>
468 468
									<td>
469 469
										<span class="vexpl">
470
											<?=gettext("Provide a DNS server list to clients"); ?><br>
470
											<?=gettext("Provide a DNS server list to clients"); ?><br />
471 471
										</span>
472 472
									</td>
473 473
								</tr>
......
478 478
										<span class="vexpl">
479 479
											<?=gettext("Server"); ?> #1:&nbsp;
480 480
										</span>
481
										<input name="dns_server1" type="text" class="formfld unknown" id="dns_server1" size="20" value="<?=htmlspecialchars($pconfig['dns_server1']);?>">
481
										<input name="dns_server1" type="text" class="formfld unknown" id="dns_server1" size="20" value="<?=htmlspecialchars($pconfig['dns_server1']);?>"/>
482 482
									</td>
483 483
								</tr>
484 484
								<tr>
......
486 486
										<span class="vexpl">
487 487
											<?=gettext("Server"); ?> #2:&nbsp;
488 488
										</span>
489
										<input name="dns_server2" type="text" class="formfld unknown" id="dns_server2" size="20" value="<?=htmlspecialchars($pconfig['dns_server2']);?>">
489
										<input name="dns_server2" type="text" class="formfld unknown" id="dns_server2" size="20" value="<?=htmlspecialchars($pconfig['dns_server2']);?>"/>
490 490
									</td>
491 491
								</tr>
492 492
								<tr>
......
494 494
										<span class="vexpl">
495 495
											<?=gettext("Server"); ?> #3:&nbsp;
496 496
										</span>
497
										<input name="dns_server3" type="text" class="formfld unknown" id="dns_server3" size="20" value="<?=htmlspecialchars($pconfig['dns_server3']);?>">
497
										<input name="dns_server3" type="text" class="formfld unknown" id="dns_server3" size="20" value="<?=htmlspecialchars($pconfig['dns_server3']);?>"/>
498 498
									</td>
499 499
								</tr>
500 500
								<tr>
......
502 502
										<span class="vexpl">
503 503
											<?=gettext("Server"); ?> #4:&nbsp;
504 504
										</span>
505
										<input name="dns_server4" type="text" class="formfld unknown" id="dns_server4" size="20" value="<?=htmlspecialchars($pconfig['dns_server4']);?>">
505
										<input name="dns_server4" type="text" class="formfld unknown" id="dns_server4" size="20" value="<?=htmlspecialchars($pconfig['dns_server4']);?>"/>
506 506
									</td>
507 507
								</tr>
508 508
							</table>
......
515 515
								<tr>
516 516
									<td>
517 517
										<?php set_checked($pconfig['ntp_server_enable'],$chk); ?>
518
										<input name="ntp_server_enable" type="checkbox" id="ntp_server_enable" value="yes" <?=$chk;?> onClick="ntp_server_change()">
518
										<input name="ntp_server_enable" type="checkbox" id="ntp_server_enable" value="yes" <?=$chk;?> onclick="ntp_server_change()"/>
519 519
									</td>
520 520
									<td>
521 521
										<span class="vexpl">
522
											<?=gettext("Provide a NTP server list to clients"); ?><br>
522
											<?=gettext("Provide a NTP server list to clients"); ?><br />
523 523
										</span>
524 524
									</td>
525 525
								</tr>
......
530 530
										<span class="vexpl">
531 531
											<?=gettext("Server"); ?> #1:&nbsp;
532 532
										</span>
533
										<input name="ntp_server1" type="text" class="formfld unknown" id="ntp_server1" size="20" value="<?=$pconfig['ntp_server1'];?>">
533
										<input name="ntp_server1" type="text" class="formfld unknown" id="ntp_server1" size="20" value="<?=$pconfig['ntp_server1'];?>"/>
534 534
									</td>
535 535
								</tr>
536 536
								<tr>
......
538 538
										<span class="vexpl">
539 539
											<?=gettext("Server"); ?> #2:&nbsp;
540 540
										</span>
541
										<input name="ntp_server2" type="text" class="formfld unknown" id="ntp_server2" size="20" value="<?=$pconfig['ntp_server2'];?>">
541
										<input name="ntp_server2" type="text" class="formfld unknown" id="ntp_server2" size="20" value="<?=$pconfig['ntp_server2'];?>"/>
542 542
									</td>
543 543
								</tr>
544 544
							</table>
......
551 551
								<tr>
552 552
									<td>
553 553
										<?php set_checked($pconfig['netbios_enable'],$chk); ?>
554
										<input name="netbios_enable" type="checkbox" id="netbios_enable" value="yes" <?=$chk;?> onClick="netbios_change()">
554
										<input name="netbios_enable" type="checkbox" id="netbios_enable" value="yes" <?=$chk;?> onclick="netbios_change()"/>
555 555
									</td>
556 556
									<td>
557 557
										<span class="vexpl">
558
											<?=gettext("Enable NetBIOS over TCP/IP"); ?><br>
558
											<?=gettext("Enable NetBIOS over TCP/IP"); ?><br />
559 559
										</span>
560 560
									</td>
561 561
								</tr>
......
574 574
											foreach ($netbios_nodetypes as $type => $name):
575 575
												$selected = "";
576 576
												if ($pconfig['netbios_ntype'] == $type)
577
													$selected = "selected";
577
													$selected = "selected=\"selected\"";
578 578
										?>
579 579
											<option value="<?=$type;?>" <?=$selected;?>><?=$name;?></option>
580 580
										<?php endforeach; ?>
......
592 592
										<span class="vexpl">
593 593
											Scope ID:&nbsp;
594 594
										</span>
595
										<input name="netbios_scope" type="text" class="formfld unknown" id="netbios_scope" size="30" value="<?=htmlspecialchars($pconfig['netbios_scope']);?>">
595
										<input name="netbios_scope" type="text" class="formfld unknown" id="netbios_scope" size="30" value="<?=htmlspecialchars($pconfig['netbios_scope']);?>"/>
596 596
										<br/>
597 597
										<?=gettext("A NetBIOS Scope	ID provides an extended naming " .
598 598
										"service for	NetBIOS over TCP/IP. The NetBIOS " .
......
611 611
								<tr>
612 612
									<td>
613 613
										<?php set_checked($pconfig['wins_server_enable'],$chk); ?>
614
										<input name="wins_server_enable" type="checkbox" id="wins_server_enable" value="yes" <?=$chk;?> onClick="wins_server_change()">
614
										<input name="wins_server_enable" type="checkbox" id="wins_server_enable" value="yes" <?=$chk;?> onclick="wins_server_change()"/>
615 615
									</td>
616 616
									<td>
617 617
										<span class="vexpl">
618
											<?=gettext("Provide a WINS server list to clients"); ?><br>
618
											<?=gettext("Provide a WINS server list to clients"); ?><br />
619 619
										</span>
620 620
									</td>
621 621
								</tr>
......
626 626
										<span class="vexpl">
627 627
											<?=gettext("Server"); ?> #1:&nbsp;
628 628
										</span>
629
										<input name="wins_server1" type="text" class="formfld unknown" id="wins_server1" size="20" value="<?=$pconfig['wins_server1'];?>">
629
										<input name="wins_server1" type="text" class="formfld unknown" id="wins_server1" size="20" value="<?=$pconfig['wins_server1'];?>"/>
630 630
									</td>
631 631
								</tr>
632 632
								<tr>
......
634 634
										<span class="vexpl">
635 635
											<?=gettext("Server"); ?> #2:&nbsp;
636 636
										</span>
637
										<input name="wins_server2" type="text" class="formfld unknown" id="wins_server2" size="20" value="<?=$pconfig['wins_server2'];?>">
637
										<input name="wins_server2" type="text" class="formfld unknown" id="wins_server2" size="20" value="<?=$pconfig['wins_server2'];?>"/>
638 638
									</td>
639 639
								</tr>
640 640
							</table>
......
657 657
					<tr>
658 658
						<td width="22%" valign="top">&nbsp;</td>
659 659
						<td width="78%"> 
660
							<input name="save" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"> 
661
							<input name="act" type="hidden" value="<?=$act;?>">
660
							<input name="save" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"/> 
661
							<input name="act" type="hidden" value="<?=$act;?>"/>
662 662
							<?php if (isset($id) && $a_csc[$id]): ?>
663
							<input name="id" type="hidden" value="<?=$id;?>">
663
							<input name="id" type="hidden" value="<?=$id;?>"/>
664 664
							<?php endif; ?>
665 665
						</td>
666 666
					</tr>
......
683 683
						if (isset($csc['disable']))
684 684
							$disabled = "YES";
685 685
				?>
686
				<tr ondblclick="document.location='vpn_openvpn_csc.php?act=edit&id=<?=$i;?>'">
686
				<tr ondblclick="document.location='vpn_openvpn_csc.php?act=edit&amp;id=<?=$i;?>'">
687 687
					<td class="listlr">
688 688
						<?=$disabled;?>
689 689
					</td>
......
693 693
					<td class="listbg">
694 694
						<?=htmlspecialchars($csc['description']);?>
695 695
					</td>
696
					<td valign="middle" nowrap class="list">
697
						<a href="vpn_openvpn_csc.php?act=edit&id=<?=$i;?>">
698
							<img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit csc"); ?>" width="17" height="17" border="0">
696
					<td valign="middle" nowrap="nowrap" class="list">
697
						<a href="vpn_openvpn_csc.php?act=edit&amp;id=<?=$i;?>">
698
							<img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit csc"); ?>" alt="" width="17" height="17" border="0"/>
699 699
						</a>
700 700
						&nbsp;
701
						<a href="vpn_openvpn_csc.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this csc?"); ?>')">
702
							<img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete csc"); ?>" width="17" height="17" border="0">
701
						<a href="vpn_openvpn_csc.php?act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this csc?"); ?>')">
702
							<img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete csc"); ?>" alt="" width="17" height="17" border="0"/>
703 703
						</a>
704 704
					</td>
705 705
				</tr>
706 706
				<?php
707 707
					$i++;
708 708
					endforeach;
709
					if ($i == 0)
710
						echo "<tr><td></td></tr>";
709 711
				?>
710 712
				<tr>
711 713
					<td class="list" colspan="3"></td>
712 714
					<td class="list">
713
						<a href="vpn_openvpn_csc.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add csc"); ?>" width="17" height="17" border="0">
715
						<a href="vpn_openvpn_csc.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add csc"); ?>" alt="" width="17" height="17" border="0"/>
714 716
						</a>
715 717
					</td>
716 718
				</tr>
......
728 730
		</td>
729 731
	</tr>
730 732
</table>
731
<script language="JavaScript">
733
<script type="text/JavaScript">
732 734
<!--
733 735
dns_domain_change();
734 736
dns_server_change();
......
737 739
netbios_change();
738 740
//-->
739 741
</script>
740
</body>
741 742
<?php include("fend.inc"); ?>
742 743

  
743 744
<?php
......
746 747

  
747 748
function set_checked($var,& $chk) {
748 749
    if($var)
749
        $chk = 'checked';
750
        $chk = 'checked="checked"';
750 751
    else
751 752
        $chk = '';
752 753
}
753 754

  
754 755
?>
755

  
756
</body>
757
</html>

Also available in: Unified diff