add new header ident.h
[freeradius.git] / dialup_admin / htdocs / show_groups.php3
1 <?php
2 require('../conf/config.php3');
3 ?>
4 <html>
5 <?php
6
7 if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php3"))
8         include_once("../lib/sql/drivers/$config[sql_type]/functions.php3");
9 else{
10         echo <<<EOM
11 <title>User Groups</title>
12 <meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
13 <link rel="stylesheet" href="style.css">
14 </head>
15 <body>
16 <center>
17 <b>Could not include SQL library functions. Aborting</b>
18 </body>
19 </html>
20 EOM;
21         exit();
22 }
23 if ($config[general_lib_type] != 'sql'){
24         echo <<<EOM
25 <title>User Groups</title>
26 <meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
27 <link rel="stylesheet" href="style.css">
28 </head>
29 <body>
30 <center>
31 <b>This page is only available if you are using sql as general library type</b>
32 </body>
33 </html>
34 EOM;
35         exit();
36 }
37 ?>
38 <head>
39 <title>User Groups</title>
40 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
41 <link rel="stylesheet" href="style.css">
42 </head>
43 <body>
44 <center>
45 <table border=0 width=550 cellpadding=0 cellspacing=0>
46 <tr valign=top>
47 <td align=center><img src="images/title2.gif"></td>
48 </tr>
49 </table>
50
51 <br><br>
52 <table border=0 width=540 cellpadding=1 cellspacing=1>
53 <tr valign=top>
54 <td width=55%></td>
55 <td bgcolor="black" width=45%>
56         <table border=0 width=100% cellpadding=2 cellspacing=0>
57         <tr bgcolor="#907030" align=right valign=top><th>
58         <font color="white">User Groups</font>&nbsp;
59         </th></tr>
60         </table>
61 </td></tr>
62 <tr bgcolor="black" valign=top><td colspan=2>
63         <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
64         <tr><td>
65 <font size=-2>Only groups with members are shown</font><p>
66         <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
67         <tr bgcolor="#d0ddb0">
68         <th>#</th><th>group</th><th># of members</th>
69         </tr>
70
71 <?php
72 unset($login);
73 $num = 0;
74 include_once("../lib/$config[general_lib_type]/group_info.php3");
75 if (isset($existing_groups)){
76         foreach ($existing_groups as $group => $num_members){
77                 $num++;
78                 $Group = urlencode($group);
79                 echo <<<EOM
80                 <tr align=center>
81                         <td>$num</td>
82                         <td><a href="group_admin.php3?login=$Group" title="Edit group $group">$group</a></td>
83                         <td>$num_members</td>
84                 </tr>
85 EOM;
86         }
87 }
88 else
89         echo "<b>Could not find any groups</b><br>\n";
90 ?>
91         </table>
92 </table>
93 </tr>
94 </table>
95 </body>
96 </html>