Project

General

Profile

« Previous | Next » 

Revision 5b42a459

Added by Cyrill B almost 13 years ago

Make tables sortable

View differences:

usr/local/www/system_authservers.php
2 2
/*
3 3
    system_authservers.php
4 4

  
5
    Copyright (C) 2010 Ermal Lui
5
    Copyright (C) 2010 Ermal Luçi
6 6
    Copyright (C) 2008 Shrew Soft Inc.
7 7
    All rights reserved.
8 8

  
......
733 733

  
734 734
				<?php else: ?>
735 735

  
736
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
737
					<tr>
738
						<td width="25%" class="listhdrr"><?=gettext("Server Name");?></td>
739
						<td width="25%" class="listhdrr"><?=gettext("Type");?></td>
740
						<td width="35%" class="listhdrr"><?=gettext("Host Name");?></td>
741
						<td width="10%" class="list"></td>
742
					</tr>
743
					<?php
744
						$i = 0;
745
						foreach($a_server as $server):
746
							$name = htmlspecialchars($server['name']);
747
							$type = htmlspecialchars($auth_server_types[$server['type']]);
748
							$host = htmlspecialchars($server['host']);
749
					?>
750
					<tr <?php if ($i < (count($a_server) - 1)): ?> ondblclick="document.location='system_authservers.php?act=edit&id=<?=$i;?>'" <?php endif; ?>>
751
						<td class="listlr"><?=$name?>&nbsp;</td>
752
						<td class="listr"><?=$type;?>&nbsp;</td>
753
						<td class="listr"><?=$host;?>&nbsp;</td>
754
						<td valign="middle" nowrap class="list">
755
						<?php if ($i < (count($a_server) - 1)): ?>
756
							<a href="system_authservers.php?act=edit&id=<?=$i;?>">
757
								<img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit server");?>" alt="<?=gettext("edit server");?>" width="17" height="17" border="0" />
758
							</a>
759
							&nbsp;
760
							<a href="system_authservers.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this Server?");?>')">
761
								<img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete server");?>" alt="<?=gettext("delete server");?>" width="17" height="17" border="0" />
762
							</a>
763
						<?php endif; ?>
764
						</td>
765
					</tr>
766
					<?php
767
						$i++; endforeach;
768
					?>
769
					<tr>
770
						<td class="list" colspan="3"></td>
771
						<td class="list">
772
							<a href="system_authservers.php?act=new">
773
								<img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add server");?>" alt="<?=gettext("add server");?>" width="17" height="17" border="0" />
774
							</a>
775
						</td>
776
					</tr>
777
					<tr>
778
						<td colspan="3">
779
							<p>
780
								<?=gettext("Additional authentication servers can be added here.");?>
781
							</p>
782
						</td>
783
					</tr>
736
				<table class="sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
737
					<thead>
738
						<tr>
739
							<th width="25%" class="listhdrr"><?=gettext("Server Name");?></th>
740
							<th width="25%" class="listhdrr"><?=gettext("Type");?></th>
741
							<th width="35%" class="listhdrr"><?=gettext("Host Name");?></th>
742
							<th width="10%" class="list"></th>
743
						</tr>
744
					</thead>
745
					<tbody>
746
						<?php
747
							$i = 0;
748
							foreach($a_server as $server):
749
								$name = htmlspecialchars($server['name']);
750
								$type = htmlspecialchars($auth_server_types[$server['type']]);
751
								$host = htmlspecialchars($server['host']);
752
						?>
753
						<tr <?php if ($i < (count($a_server) - 1)): ?> ondblclick="document.location='system_authservers.php?act=edit&id=<?=$i;?>'" <?php endif; ?>>
754
							<td class="listlr"><?=$name?>&nbsp;</td>
755
							<td class="listr"><?=$type;?>&nbsp;</td>
756
							<td class="listr"><?=$host;?>&nbsp;</td>
757
							<td valign="middle" nowrap class="list">
758
							<?php if ($i < (count($a_server) - 1)): ?>
759
								<a href="system_authservers.php?act=edit&id=<?=$i;?>">
760
									<img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit server");?>" alt="<?=gettext("edit server");?>" width="17" height="17" border="0" />
761
								</a>
762
								&nbsp;
763
								<a href="system_authservers.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this Server?");?>')">
764
									<img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete server");?>" alt="<?=gettext("delete server");?>" width="17" height="17" border="0" />
765
								</a>
766
							<?php endif; ?>
767
							</td>
768
						</tr>
769
						<?php
770
							$i++; endforeach;
771
						?>
772
					</tbody>
773
					<tfoot>
774
						<tr>
775
							<td class="list" colspan="3"></td>
776
							<td class="list">
777
								<a href="system_authservers.php?act=new">
778
									<img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add server");?>" alt="<?=gettext("add server");?>" width="17" height="17" border="0" />
779
								</a>
780
							</td>
781
						</tr>
782
						<tr>
783
							<td colspan="3">
784
								<p>
785
									<?=gettext("Additional authentication servers can be added here.");?>
786
								</p>
787
							</td>
788
						</tr>
789
					</tfoot>
784 790
				</table>
785 791

  
786 792
				<?php endif; ?>
usr/local/www/system_groupmanager.php
399 399

  
400 400
				<?php else: ?>
401 401

  
402
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
403
					<tr>
404
						<td width="25%" class="listhdrr"><?=gettext("Group name");?></td>
405
						<td width="25%" class="listhdrr"><?=gettext("Description");?></td>
406
						<td width="30%" class="listhdrr"><?=gettext("Member Count");?></td>
407
						<td width="10%" class="list"></td>
408
					</tr>
409
					<?php
410
						$i = 0;
411
						foreach($a_group as $group):
412

  
413
							if($group['scope'] == "system")
414
								$grpimg = "/themes/{$g['theme']}/images/icons/icon_system-group-grey.png";
415
							else
416
								$grpimg = "/themes/{$g['theme']}/images/icons/icon_system-group.png";
417
							$groupcount = count($group['member']);
418
							if ($group["name"] == "all")
419
								$groupcount = count($config['system']['user']);
420
					?>
421
					<tr ondblclick="document.location='system_groupmanager.php?act=edit&id=<?=$i;?>'">
422
						<td class="listlr">
423
							<table border="0" cellpadding="0" cellspacing="0">
424
								<tr>
425
									<td align="left" valign="center">
426
										<img src="<?=$grpimg;?>" alt="<?=gettext("User");?>" title="<?=gettext("User");?>" border="0" height="16" width="16" />
427
									</td>
428
									</td>
429
									<td align="left" valign="middle">
430
										<?=htmlspecialchars($group['name']); ?>&nbsp;
431
									</td>
432
								</tr>
433
							</table>
434
						</td>
435
						<td class="listr">
436
							<?=htmlspecialchars($group['description']);?>&nbsp;
437
						</td>
438
						<td class="listbg">
439
							<?=$groupcount;?>
440
						</td>
441
						<td valign="middle" nowrap class="list">
442
							<a href="system_groupmanager.php?act=edit&id=<?=$i;?>">
443
								<img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit group");?>" width="17" height="17" border="0">
444
							</a>
445
							&nbsp;
446
							<?php if($group['scope'] != "system"): ?>
447
							<a href="system_groupmanager.php?act=delgroup&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this group?"); ?>')">
448
								<img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete group"); ?>" width="17" height="17" border="0">
449
							</a>
450
							<?php endif; ?>
451
						</td>
452
					</tr>
453
					<?php
454
						$i++;
455
						endforeach;
456
					?>
457
					<tr> 
458
						<td class="list" colspan="3"></td>
459
						<td class="list">
460
							<a href="system_groupmanager.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add group");?>" width="17" height="17" border="0">
461
							</a>
462
						</td>
463
					</tr>
464
					<tr>
465
						<td colspan="3">
466
							<p>
467
								<?=gettext("Additional webConfigurator groups can be added here. 
468
								Group permissions can be assigned which are inherited by users who are members of the group.
469
								An icon that appears grey indicates that it is a system defined object.
470
								Some system object properties can be modified but they cannot be deleted.");?>
471
							</p>
472
						</td>
473
					</tr>
402
				<table class="sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
403
					<thead>
404
						<tr>
405
							<th width="25%" class="listhdrr"><?=gettext("Group name");?></th>
406
							<th width="25%" class="listhdrr"><?=gettext("Description");?></th>
407
							<th width="30%" class="listhdrr"><?=gettext("Member Count");?></th>
408
							<th width="10%" class="list"></th>
409
						</tr>
410
					</thead>
411
					<tbody>
412
						<?php
413
							$i = 0;
414
							foreach($a_group as $group):
415

  
416
								if($group['scope'] == "system")
417
									$grpimg = "/themes/{$g['theme']}/images/icons/icon_system-group-grey.png";
418
								else
419
									$grpimg = "/themes/{$g['theme']}/images/icons/icon_system-group.png";
420
								$groupcount = count($group['member']);
421
								if ($group["name"] == "all")
422
									$groupcount = count($config['system']['user']);
423
						?>
424
						<tr ondblclick="document.location='system_groupmanager.php?act=edit&id=<?=$i;?>'">
425
							<td class="listlr">
426
								<table border="0" cellpadding="0" cellspacing="0">
427
									<tr>
428
										<td align="left" valign="center">
429
											<img src="<?=$grpimg;?>" alt="<?=gettext("User");?>" title="<?=gettext("User");?>" border="0" height="16" width="16" />
430
										</td>
431
										</td>
432
										<td align="left" valign="middle">
433
											<?=htmlspecialchars($group['name']); ?>&nbsp;
434
										</td>
435
									</tr>
436
								</table>
437
							</td>
438
							<td class="listr">
439
								<?=htmlspecialchars($group['description']);?>&nbsp;
440
							</td>
441
							<td class="listbg">
442
								<?=$groupcount;?>
443
							</td>
444
							<td valign="middle" nowrap class="list">
445
								<a href="system_groupmanager.php?act=edit&id=<?=$i;?>">
446
									<img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit group");?>" width="17" height="17" border="0">
447
								</a>
448
								&nbsp;
449
								<?php if($group['scope'] != "system"): ?>
450
								<a href="system_groupmanager.php?act=delgroup&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this group?"); ?>')">
451
									<img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete group"); ?>" width="17" height="17" border="0">
452
								</a>
453
								<?php endif; ?>
454
							</td>
455
						</tr>
456
						<?php
457
							$i++;
458
							endforeach;
459
						?>
460
					</tbody>
461
					<tfoot>
462
						<tr> 
463
							<td class="list" colspan="3"></td>
464
							<td class="list">
465
								<a href="system_groupmanager.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add group");?>" width="17" height="17" border="0">
466
								</a>
467
							</td>
468
						</tr>
469
						<tr>
470
							<td colspan="3">
471
								<p>
472
									<?=gettext("Additional webConfigurator groups can be added here. 
473
									Group permissions can be assigned which are inherited by users who are members of the group.
474
									An icon that appears grey indicates that it is a system defined object.
475
									Some system object properties can be modified but they cannot be deleted.");?>
476
								</p>
477
							</td>
478
						</tr>
479
					</tfoot>
474 480
				</table>
475 481
			
476 482
				<?php endif; ?>
usr/local/www/system_usermanager.php
780 780

  
781 781
				<?php else: ?>
782 782

  
783
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
784
					<tr>
785
						<td width="25%" class="listhdrr"><?=gettext("Username"); ?></td>
786
						<td width="25%" class="listhdrr"><?=gettext("Full name"); ?></td>
787
						<td width="5%" class="listhdrr"><?=gettext("Disabled"); ?></td>
788
						<td width="25%" class="listhdrr"><?=gettext("Groups"); ?></td>
789
						<td width="10%" class="list"></td>
790
					</tr>
791
					<?php
792
						$i = 0;
793
						foreach($a_user as $userent):
794
					?>
795
					<tr ondblclick="document.location='system_usermanager.php?act=edit&id=<?=$i;?>'">
796
						<td class="listlr">
797
							<table border="0" cellpadding="0" cellspacing="0">
798
								<tr>
799
									<td align="left" valign="center">
800
										<?php
801
											if($userent['scope'] != "user")
802
												$usrimg = "/themes/{$g['theme']}/images/icons/icon_system-user-grey.png";
803
											else
804
												$usrimg = "/themes/{$g['theme']}/images/icons/icon_system-user.png";
805
										?>
806
										<img src="<?=$usrimg;?>" alt="<?=gettext("User"); ?>" title="<?=gettext("User"); ?>" border="0" height="16" width="16" />
807
									</td>
808
									<td align="left" valign="middle">
809
										<?=htmlspecialchars($userent['name']);?>
810
									</td>
811
								</tr>
812
							</table>
813
						</td>
814
						<td class="listr"><?=htmlspecialchars($userent['descr']);?>&nbsp;</td>
815
						<td class="listr"><?php if(isset($userent['disabled'])) echo "*"; ?></td>
816
						<td class="listbg">
817
								<?=implode(",",local_user_get_groups($userent));?>
818
							&nbsp;
819
						</td>
820
						<td valign="middle" nowrap class="list">
821
							<a href="system_usermanager.php?act=edit&id=<?=$i;?>">
822
								<img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit user"); ?>" alt="<?=gettext("edit user"); ?>" width="17" height="17" border="0" />
823
							</a>
824
							<?php if($userent['scope'] != "system"): ?>
825
							&nbsp;
826
							<a href="system_usermanager.php?act=deluser&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this User?");?>')">
827
								<img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete user"); ?>" alt="<?=gettext("delete user"); ?>" width="17" height="17" border="0" />
828
							</a>
829
							<?php endif; ?>
830
						</td>
831
					</tr>
832
					<?php
833
							$i++;
834
						endforeach;
835
					?>
836
					<tr>
837
						<td class="list" colspan="4"></td>
838
						<td class="list">
839
							<a href="system_usermanager.php?act=new">
840
								<img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add user"); ?>" alt="<?=gettext("add user"); ?>" width="17" height="17" border="0" />
841
							</a>
842
						</td>
843
					</tr>
844
					<tr>
845
						<td colspan="4">
846
							<p>
847
								<?=gettext("Additional users can be added here. User permissions for accessing " .
848
								"the webConfigurator can be assigned directly or inherited from group memberships. " .
849
								"An icon that appears grey indicates that it is a system defined object. " .
850
								"Some system object properties can be modified but they cannot be deleted."); ?>
851
								<br/><br/>
852
								<?=gettext("Accounts created here are also used for other parts of the system " .
853
								"such as OpenVPN, IPsec, and Captive Portal.");?>
854
							</p>
855
						</td>
856
					</tr>
783
				<table class="sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
784
					<thead>
785
						<tr>
786
							<th width="25%" class="listhdrr"><?=gettext("Username"); ?></th>
787
							<th width="25%" class="listhdrr"><?=gettext("Full name"); ?></th>
788
							<th width="5%" class="listhdrr"><?=gettext("Disabled"); ?></th>
789
							<th width="25%" class="listhdrr"><?=gettext("Groups"); ?></th>
790
							<th width="10%" class="list"></td>
791
						</tr>
792
					</thead>
793
					<tbody>
794
						<?php
795
							$i = 0;
796
							foreach($a_user as $userent):
797
						?>
798
						<tr ondblclick="document.location='system_usermanager.php?act=edit&id=<?=$i;?>'">
799
							<td class="listlr">
800
								<table border="0" cellpadding="0" cellspacing="0">
801
									<tr>
802
										<td align="left" valign="center">
803
											<?php
804
												if($userent['scope'] != "user")
805
													$usrimg = "/themes/{$g['theme']}/images/icons/icon_system-user-grey.png";
806
												else
807
													$usrimg = "/themes/{$g['theme']}/images/icons/icon_system-user.png";
808
											?>
809
											<img src="<?=$usrimg;?>" alt="<?=gettext("User"); ?>" title="<?=gettext("User"); ?>" border="0" height="16" width="16" />
810
										</td>
811
										<td align="left" valign="middle">
812
											<?=htmlspecialchars($userent['name']);?>
813
										</td>
814
									</tr>
815
								</table>
816
							</td>
817
							<td class="listr"><?=htmlspecialchars($userent['descr']);?>&nbsp;</td>
818
							<td class="listr"><?php if(isset($userent['disabled'])) echo "*"; ?></td>
819
							<td class="listbg">
820
									<?=implode(",",local_user_get_groups($userent));?>
821
								&nbsp;
822
							</td>
823
							<td valign="middle" nowrap class="list">
824
								<a href="system_usermanager.php?act=edit&id=<?=$i;?>">
825
									<img src="/themes/<?= $g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit user"); ?>" alt="<?=gettext("edit user"); ?>" width="17" height="17" border="0" />
826
								</a>
827
								<?php if($userent['scope'] != "system"): ?>
828
								&nbsp;
829
								<a href="system_usermanager.php?act=deluser&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this User?");?>')">
830
									<img src="/themes/<?= $g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete user"); ?>" alt="<?=gettext("delete user"); ?>" width="17" height="17" border="0" />
831
								</a>
832
								<?php endif; ?>
833
							</td>
834
						</tr>
835
						<?php
836
								$i++;
837
							endforeach;
838
						?>
839
					</tbody>
840
					<tfoot>
841
						<tr>
842
							<td class="list" colspan="4"></td>
843
							<td class="list">
844
								<a href="system_usermanager.php?act=new">
845
									<img src="/themes/<?= $g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add user"); ?>" alt="<?=gettext("add user"); ?>" width="17" height="17" border="0" />
846
								</a>
847
							</td>
848
						</tr>
849
						<tr>
850
							<td colspan="4">
851
								<p>
852
									<?=gettext("Additional users can be added here. User permissions for accessing " .
853
									"the webConfigurator can be assigned directly or inherited from group memberships. " .
854
									"An icon that appears grey indicates that it is a system defined object. " .
855
									"Some system object properties can be modified but they cannot be deleted."); ?>
856
									<br/><br/>
857
									<?=gettext("Accounts created here are also used for other parts of the system " .
858
									"such as OpenVPN, IPsec, and Captive Portal.");?>
859
								</p>
860
							</td>
861
						</tr>
862
					</tfoot>
857 863
				</table>
858 864

  
859 865
				<?php endif; ?>

Also available in: Unified diff