Pull fix from branch_1_1, so proxied EAP replies work
[freeradius.git] / dialup_admin / htdocs / group_admin.php3
1 <?php
2 require('../conf/config.php3');
3 if ($show == 1 && isset($del_members)){
4         header("Location: user_admin.php3?login=$del_members[0]");
5         exit;
6 }
7 if ($config[general_lib_type] != 'sql'){
8         echo <<<EOM
9 <title>Group Administration Page</title>
10 <meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
11 <link rel="stylesheet" href="style.css">
12 </head>
13 <body>
14 <center>
15 <b>This page is only available if you are using sql as general library type</b>
16 </body>
17 </html>
18 EOM;
19         exit();
20 }
21
22 unset($group_members);
23 if (is_file("../lib/$config[general_lib_type]/group_info.php3")){
24         include("../lib/$config[general_lib_type]/group_info.php3");
25         if ($group_exists == 'no'){
26                 echo <<<EOM
27 <title>Group Administration Page</title>
28 <meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
29 <link rel="stylesheet" href="style.css">
30 </head>
31 <body>
32 <center>
33 <form action="group_admin.php3" method=get>
34 <b>Group Name&nbsp;&nbsp;</b>
35 <input type="text" size=10 name="login" value="$login">
36 <b>&nbsp;&nbsp;does not exist</b><br>
37 <input type=submit class=button value="Show Group">
38 </body>
39 </html>
40 EOM;
41                 exit();
42         }
43 }
44 ?>
45
46 <html>
47 <head>
48 <title>Group Administration Page</title>
49 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
50 <link rel="stylesheet" href="style.css">
51 </head>
52 <body>
53 <center>
54 <table border=0 width=550 cellpadding=0 cellspacing=0>
55 <tr valign=top>
56 <td align=center><img src="images/title2.gif"></td>
57 </tr>
58 </table>
59 <table border=0 width=400 cellpadding=0 cellspacing=2>
60
61 <?php
62 include("../html/group_toolbar.html.php3");
63 ?>
64
65 </table>
66 <br>
67 <table border=0 width=540 cellpadding=1 cellspacing=1>
68 <tr valign=top>
69 <td width=340></td>
70 <td bgcolor="black" width=200>
71         <table border=0 width=100% cellpadding=2 cellspacing=0>
72         <tr bgcolor="#907030" align=right valign=top><th>
73         <font color="white">Group <?php echo $login ?> Administration</font>&nbsp;
74         </th></tr>
75         </table>
76 </td></tr>
77 <tr bgcolor="black" valign=top><td colspan=2>
78         <table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
79         <tr><td>
80
81 <?php
82 if ($do_changes == 1){
83         if (is_file("../lib/$config[general_lib_type]/group_admin.php3"))
84                 include("../lib/$config[general_lib_type]/group_admin.php3");
85         if (is_file("../lib/$config[general_lib_type]/group_info.php3"))
86                 include("../lib/$config[general_lib_type]/group_info.php3");
87 }
88 ?>
89         
90    
91    <form method=post>
92       <input type=hidden name=login value=<?php echo $login ?>>
93       <input type=hidden name=do_changes value=0>
94       <input type=hidden name=show value=0>
95         <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
96 <tr>
97 <td align=right bgcolor="#d0ddb0">
98 Group Members (Check to Delete)
99 </td>
100 <td>
101 <select name=del_members[] multiple size=5> 
102 <?php
103 foreach ($group_members as $member){
104         echo "<option value=\"$member\">$member\n";
105 }
106 ?>
107 </select>
108 </td>
109 </tr>
110 <tr>
111 <td align=right bgcolor="#d0ddb0">
112 New Group Member(s)<br>Separate group members<br> by whitespace or newline
113 </td>
114 <td>
115 <textarea name=new_members cols="15" wrap="PHYSICAL" rows=5></textarea>
116 </td>
117 </tr>
118         </table>
119 <br>
120 <input type=submit class=button value="Commit Changes" OnClick="this.form.do_changes.value=1">
121 <br><br>
122 <input type=submit class=button value="Administer selected user" OnClick="this.form.show.value=1">
123 </form>
124 </td></tr>
125 </table>
126 </tr>
127 </table>
128 </body>
129 </html>