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