1 |
<?php
|
1 |
<?php
|
2 |
//gestion de la langue
|
2 |
//gestion de la langue
|
3 |
if (is_file("../lib/langues.php"))
|
3 |
if (is_file("../lib/langues.php"))
|
4 |
include("../lib/langues.php");
|
4 |
include("../lib/langues.php");
|
5 |
require('/etc/freeradius-web/config.php');
|
5 |
require('/etc/freeradius-web/config.php');
|
6 |
require('../lib/attrshow.php');
|
6 |
require('../lib/attrshow.php');
|
7 |
require('../lib/defaults.php');
|
7 |
require('../lib/defaults.php');
|
8 |
if ($user_type != 'group'){
|
8 |
if ($user_type != 'group'){
|
9 |
if (is_file("../lib/$config[general_lib_type]/user_info.php"))
|
9 |
if (is_file("../lib/$config[general_lib_type]/user_info.php"))
|
10 |
include("../lib/$config[general_lib_type]/user_info.php");
|
10 |
include("../lib/$config[general_lib_type]/user_info.php");
|
11 |
if ($config[general_lib_type] == 'sql' && $config[sql_show_all_groups] == 'true'){
|
11 |
if ($config[general_lib_type] == 'sql' && $config[sql_show_all_groups] == 'true'){
|
12 |
$saved_login = $login;
|
12 |
$saved_login = $login;
|
13 |
$login = '';
|
13 |
$login = '';
|
14 |
if (is_file("../lib/sql/group_info.php"))
|
14 |
if (is_file("../lib/sql/group_info.php"))
|
15 |
include("../lib/sql/group_info.php");
|
15 |
include("../lib/sql/group_info.php");
|
16 |
$login = $saved_login;
|
16 |
$login = $saved_login;
|
17 |
}
|
17 |
}
|
18 |
}
|
18 |
}
|
19 |
else{
|
19 |
else{
|
20 |
if (is_file("../lib/$config[general_lib_type]/group_info.php"))
|
20 |
if (is_file("../lib/$config[general_lib_type]/group_info.php"))
|
21 |
include("../lib/$config[general_lib_type]/group_info.php");
|
21 |
include("../lib/$config[general_lib_type]/group_info.php");
|
22 |
}
|
22 |
}
|
23 |
if ($config[general_lib_type] == 'sql' && $config[sql_use_operators] == 'true'){
|
23 |
if ($config[general_lib_type] == 'sql' && $config[sql_use_operators] == 'true'){
|
24 |
$colspan=2;
|
24 |
$colspan=2;
|
25 |
$show_ops = 1;
|
25 |
$show_ops = 1;
|
26 |
include("../lib/operators.php");
|
26 |
include("../lib/operators.php");
|
27 |
}
|
27 |
}
|
28 |
else{
|
28 |
else{
|
29 |
$show_ops = 0;
|
29 |
$show_ops = 0;
|
30 |
$colspan=1;
|
30 |
$colspan=1;
|
31 |
}
|
31 |
}
|
32 |
?>
|
32 |
?>
|
33 |
<html>
|
33 |
<html>
|
34 |
<head>
|
34 |
<head>
|
35 |
<title>Users & groups edition</title>
|
35 |
<title>Users & groups edition</title>
|
36 |
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
|
36 |
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config[general_charset]?>">
|
37 |
<link rel="stylesheet" href="/css/style.css">
|
37 |
<link rel="stylesheet" href="/css/style.css">
|
38 |
<script language="javascript" type="text/javascript">
|
38 |
<script language="javascript" type="text/javascript">
|
39 |
var chars='0123456789abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ'
|
39 |
var chars='0123456789abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ'
|
40 |
function password(size)
|
40 |
function password(size)
|
41 |
{
|
41 |
{
|
42 |
var pass=''
|
42 |
var pass=''
|
43 |
while(pass.length < size)
|
43 |
while(pass.length < size)
|
44 |
{
|
44 |
{
|
45 |
pass+=chars.charAt(Math.round(Math.random() * (chars.length)))
|
45 |
pass+=chars.charAt(Math.round(Math.random() * (chars.length)))
|
46 |
}
|
46 |
}
|
47 |
document.edituser.passwd.value=pass
|
47 |
document.edituser.passwd.value=pass
|
48 |
document.edituser.pwdgene.value=pass
|
48 |
document.edituser.pwdgene.value=pass
|
49 |
}
|
49 |
}
|
50 |
</script>
|
50 |
</script>
|
- |
|
51 |
<script type="text/javascript" src="/js/epoch_classes.js"></script>
|
- |
|
52 |
<script language="javascript" type="text/javascript">
|
- |
|
53 |
/*Insertion du calendrier */
|
- |
|
54 |
var dp_cal;
|
- |
|
55 |
window.onload = function () {
|
- |
|
56 |
dp_cal = new Epoch('epoch_popup','popup',document.getElementById('popup_container'));
|
- |
|
57 |
};
|
- |
|
58 |
</script>
|
- |
|
59 |
|
51 |
</head>
|
60 |
</head>
|
52 |
<body>
|
61 |
<body>
|
53 |
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
|
62 |
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
|
54 |
<tr><th>
|
63 |
<tr><th>
|
55 |
<?php
|
64 |
<?php
|
56 |
if ($user_type != 'group'){ echo "$l_users_managment";} else{ echo "$l_groups_managment";}
|
65 |
if ($user_type != 'group'){ echo "$l_users_managment";} else{ echo "$l_groups_managment";}
|
57 |
?>
|
66 |
?>
|
58 |
</th></tr>
|
67 |
</th></tr>
|
59 |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
|
68 |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
|
60 |
height="2"></td></tr>
|
69 |
height="2"></td></tr>
|
61 |
</TABLE>
|
70 |
</TABLE>
|
62 |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
|
71 |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
|
63 |
<tr><td valign="middle" align="left">
|
72 |
<tr><td valign="middle" align="left">
|
64 |
<center>
|
73 |
<center>
|
65 |
<table border=0 width=640 cellpadding=0 cellspacing=2>
|
74 |
<table border=0 width=640 cellpadding=0 cellspacing=2>
|
66 |
<?php
|
75 |
<?php
|
67 |
if ($user_type != 'group')
|
76 |
if ($user_type != 'group')
|
68 |
{
|
77 |
{
|
69 |
include("../html/user_toolbar.html.php");
|
78 |
include("../html/user_toolbar.html.php");
|
70 |
$titre=$l_user;
|
79 |
$titre=$l_user;
|
71 |
}
|
80 |
}
|
72 |
else
|
81 |
else
|
73 |
{
|
82 |
{
|
74 |
include("../html/group_toolbar.html.php");
|
83 |
include("../html/group_toolbar.html.php");
|
75 |
$titre=$l_group;
|
84 |
$titre=$l_group;
|
76 |
}
|
85 |
}
|
77 |
print <<<EOM
|
86 |
print <<<EOM
|
78 |
</table>
|
87 |
</table>
|
79 |
<br>
|
88 |
<br>
|
80 |
<table border=0 width=620 cellpadding=1 cellspacing=1>
|
89 |
<table border=0 width=620 cellpadding=1 cellspacing=1>
|
81 |
<tr valign=top>
|
90 |
<tr valign=top>
|
82 |
<td width=400></td>
|
91 |
<td width=400></td>
|
83 |
<td bgcolor="black">
|
92 |
<td bgcolor="black">
|
84 |
<table border=0 width=100% cellpadding=2 cellspacing=0>
|
93 |
<table border=0 width=100% cellpadding=2 cellspacing=0>
|
85 |
<tr bgcolor="#907030" align=center valign=top><th>
|
94 |
<tr bgcolor="#907030" align=center valign=top><th>
|
86 |
<font color="white">$titre : $login ($cn)</font>
|
95 |
<font color="white">$titre : $login ($cn)</font>
|
87 |
</th></tr>
|
96 |
</th></tr>
|
88 |
</table>
|
97 |
</table>
|
89 |
</td></tr>
|
98 |
</td></tr>
|
90 |
<tr bgcolor="black" valign=top><td colspan=2>
|
99 |
<tr bgcolor="black" valign=top><td colspan=2>
|
91 |
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
|
100 |
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
|
92 |
<tr><td>
|
101 |
<tr><td>
|
93 |
EOM;
|
102 |
EOM;
|
94 |
|
103 |
|
95 |
if ($change == 1){
|
104 |
if ($change == 1){
|
96 |
if (is_file("../lib/$config[general_lib_type]/change_attrs.php"))
|
105 |
if (is_file("../lib/$config[general_lib_type]/change_attrs.php"))
|
97 |
include("../lib/$config[general_lib_type]/change_attrs.php");
|
106 |
include("../lib/$config[general_lib_type]/change_attrs.php");
|
98 |
if ($user_type != 'group'){
|
107 |
if ($user_type != 'group'){
|
99 |
if ($config[general_show_user_password] != 'no' && $passwd != ''
|
108 |
if ($config[general_show_user_password] != 'no' && $passwd != ''
|
100 |
&& is_file("../lib/$config[general_lib_type]/change_passwd.php"))
|
109 |
&& is_file("../lib/$config[general_lib_type]/change_passwd.php"))
|
101 |
include("../lib/$config[general_lib_type]/change_passwd.php");
|
110 |
include("../lib/$config[general_lib_type]/change_passwd.php");
|
102 |
if (is_file("../lib/$config[general_lib_type]/user_info.php"))
|
111 |
if (is_file("../lib/$config[general_lib_type]/user_info.php"))
|
103 |
include("../lib/$config[general_lib_type]/user_info.php");
|
112 |
include("../lib/$config[general_lib_type]/user_info.php");
|
104 |
if ($group_change && $config[general_lib_type] == 'sql' && $config[sql_show_all_groups] == 'true'){
|
113 |
if ($group_change && $config[general_lib_type] == 'sql' && $config[sql_show_all_groups] == 'true'){
|
105 |
include("../lib/sql/group_change.php");
|
114 |
include("../lib/sql/group_change.php");
|
106 |
include("../lib/defaults.php");
|
115 |
include("../lib/defaults.php");
|
107 |
}
|
116 |
}
|
108 |
# Disconnecting user for re-authentication
|
117 |
# Disconnecting user for re-authentication
|
109 |
$mac=exec("sudo /usr/sbin/chilli_query list | grep \" $login \" | awk '{print $1}'");
|
118 |
$mac=exec("sudo /usr/sbin/chilli_query list | grep \" $login \" | awk '{print $1}'");
|
110 |
exec("sudo /usr/sbin/chilli_query logout $mac");
|
119 |
exec("sudo /usr/sbin/chilli_query logout $mac");
|
111 |
}
|
120 |
}
|
112 |
else{
|
121 |
else{
|
113 |
if (is_file("../lib/$config[general_lib_type]/group_info.php"))
|
122 |
if (is_file("../lib/$config[general_lib_type]/group_info.php"))
|
114 |
include("../lib/$config[general_lib_type]/group_info.php");
|
123 |
include("../lib/$config[general_lib_type]/group_info.php");
|
115 |
# Disconnecting all users from the selected group for re-authentication
|
124 |
# Disconnecting all users from the selected group for re-authentication
|
116 |
if (isset($group_members)){
|
125 |
if (isset($group_members)){
|
117 |
foreach ($group_members as $g_member => $member){
|
126 |
foreach ($group_members as $g_member => $member){
|
118 |
$mac=exec("sudo /usr/sbin/chilli_query list | grep \" $member \" | awk '{print $1}'");
|
127 |
$mac=exec("sudo /usr/sbin/chilli_query list | grep \" $member \" | awk '{print $1}'");
|
119 |
exec("sudo /usr/sbin/chilli_query logout $mac");
|
128 |
exec("sudo /usr/sbin/chilli_query logout $mac");
|
120 |
}
|
129 |
}
|
121 |
}
|
130 |
}
|
122 |
}
|
131 |
}
|
123 |
}
|
132 |
}
|
124 |
else if ($badusers == 1){
|
133 |
else if ($badusers == 1){
|
125 |
if (is_file("../lib/add_badusers.php"))
|
134 |
if (is_file("../lib/add_badusers.php"))
|
126 |
include("../lib/add_badusers.php");
|
135 |
include("../lib/add_badusers.php");
|
127 |
}
|
136 |
}
|
128 |
|
137 |
|
129 |
?>
|
138 |
?>
|
130 |
<form name="edituser" method=post>
|
139 |
<form name="edituser" method=post>
|
131 |
<input type=hidden name=login value=<?php print $login ?>>
|
140 |
<input type=hidden name=login value=<?php print $login ?>>
|
132 |
<input type=hidden name=user_type value=<?php print $user_type ?>>
|
141 |
<input type=hidden name=user_type value=<?php print $user_type ?>>
|
133 |
<input type=hidden name=change value="0">
|
142 |
<input type=hidden name=change value="0">
|
134 |
<input type=hidden name=add value="0">
|
143 |
<input type=hidden name=add value="0">
|
135 |
<input type=hidden name=badusers value="0">
|
144 |
<input type=hidden name=badusers value="0">
|
136 |
<input type=hidden name=group_change value="0">
|
145 |
<input type=hidden name=group_change value="0">
|
137 |
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
|
146 |
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
|
138 |
<?php
|
147 |
<?php
|
139 |
if ($user_type != 'group' && $config[general_show_user_password] != 'no'){
|
148 |
if ($user_type != 'group' && $config[general_show_user_password] != 'no'){
|
140 |
echo <<<EOM
|
149 |
echo <<<EOM
|
141 |
<tr>
|
150 |
<tr>
|
142 |
<td align=right colspan=$colspan bgcolor="#d0ddb0">
|
151 |
<td align=right colspan=$colspan bgcolor="#d0ddb0">
|
143 |
$l_new_password<br>
|
152 |
$l_new_password<br>
|
144 |
EOM;
|
153 |
EOM;
|
145 |
echo <<<EOM
|
154 |
echo <<<EOM
|
146 |
</td>
|
155 |
</td>
|
147 |
<td>
|
156 |
<td>
|
148 |
<input type=password name=passwd value="" size=20>
|
157 |
<input type=password name=passwd value="" size=20>
|
149 |
<br /><input type="button" value="$l_passwd_gen" onclick="password(8)">
|
158 |
<br /><input type="button" value="$l_passwd_gen" onclick="password(8)">
|
150 |
<input type="text" value="" name="pwdgene" size=10 readonly>
|
159 |
<input type="text" value="" name="pwdgene" size=10 readonly>
|
151 |
</td>
|
160 |
</td>
|
152 |
</tr>
|
161 |
</tr>
|
153 |
EOM;
|
162 |
EOM;
|
154 |
}
|
163 |
}
|
155 |
foreach($show_attrs as $key => $desc){
|
164 |
foreach($show_attrs as $key => $desc){
|
156 |
$name = $attrmap["$key"];
|
165 |
$name = $attrmap["$key"];
|
157 |
$generic = $attrmap[generic]["$key"];
|
166 |
$generic = $attrmap[generic]["$key"];
|
158 |
if ($name == 'none')
|
167 |
if ($name == 'none')
|
159 |
continue;
|
168 |
continue;
|
160 |
unset($vals);
|
169 |
unset($vals);
|
161 |
unset($selected);
|
170 |
unset($selected);
|
162 |
unset($ops);
|
171 |
unset($ops);
|
163 |
$def_added = 0;
|
172 |
$def_added = 0;
|
164 |
if ($item_vals["$key"][count]){
|
173 |
if ($item_vals["$key"][count]){
|
165 |
for($i=0;$i<$item_vals["$key"][count];$i++){
|
174 |
for($i=0;$i<$item_vals["$key"][count];$i++){
|
166 |
$vals[] = $item_vals["$key"][$i];
|
175 |
$vals[] = $item_vals["$key"][$i];
|
167 |
$ops[] = $item_vals["$key"][operator][$i];
|
176 |
$ops[] = $item_vals["$key"][operator][$i];
|
168 |
}
|
177 |
}
|
169 |
}
|
178 |
}
|
170 |
else{
|
179 |
else{
|
171 |
if ($default_vals["$key"][count]){
|
180 |
if ($default_vals["$key"][count]){
|
172 |
for($i=0;$i<$default_vals["$key"][count];$i++){
|
181 |
for($i=0;$i<$default_vals["$key"][count];$i++){
|
173 |
$vals[] = $default_vals["$key"][$i];
|
182 |
$vals[] = $default_vals["$key"][$i];
|
174 |
$ops[] = $default_vals["$key"][operator][$i];
|
183 |
$ops[] = $default_vals["$key"][operator][$i];
|
175 |
}
|
184 |
}
|
176 |
}
|
185 |
}
|
177 |
else{
|
186 |
else{
|
178 |
$vals[] = '';
|
187 |
$vals[] = '';
|
179 |
$ops[] = '=';
|
188 |
$ops[] = '=';
|
180 |
}
|
189 |
}
|
181 |
$def_added = 1;
|
190 |
$def_added = 1;
|
182 |
}
|
191 |
}
|
183 |
if ($generic == 'generic' && $def_added == 0){
|
192 |
if ($generic == 'generic' && $def_added == 0){
|
184 |
for($i=0;$i<$default_vals["$key"][count];$i++){
|
193 |
for($i=0;$i<$default_vals["$key"][count];$i++){
|
185 |
$vals[] = $default_vals["$key"][$i];
|
194 |
$vals[] = $default_vals["$key"][$i];
|
186 |
$ops[] = $default_vals["$key"][operator][$i];
|
195 |
$ops[] = $default_vals["$key"][operator][$i];
|
187 |
}
|
196 |
}
|
188 |
}
|
197 |
}
|
189 |
if ($add && $name == $add_attr){
|
198 |
if ($add && $name == $add_attr){
|
190 |
$vals[] = $default_vals["$key"][0];
|
199 |
$vals[] = $default_vals["$key"][0];
|
191 |
$ops[] = ($default_vals["$key"][operator][0] != '') ? $default_vals["$key"][operator][0] : '=';
|
200 |
$ops[] = ($default_vals["$key"][operator][0] != '') ? $default_vals["$key"][operator][0] : '=';
|
192 |
}
|
201 |
}
|
193 |
|
202 |
|
194 |
$i = 0;
|
203 |
$i = 0;
|
195 |
foreach($vals as $val){
|
204 |
foreach($vals as $val){
|
196 |
$name1 = $name . $i;
|
205 |
$name1 = $name . $i;
|
197 |
$val = ereg_replace('"','"',$val);
|
206 |
$val = ereg_replace('"','"',$val);
|
198 |
$oper_name = $name1 . '_op';
|
207 |
$oper_name = $name1 . '_op';
|
199 |
$oper = $ops[$i];
|
208 |
$oper = $ops[$i];
|
200 |
$selected[$oper] = 'selected';
|
209 |
$selected[$oper] = 'selected';
|
201 |
$i++;
|
210 |
$i++;
|
202 |
switch ($key)
|
211 |
switch ($key)
|
203 |
{
|
212 |
{
|
204 |
// $advanced = 1 : champs de saisie amélioré (calendrier, convertisseur, etc.)
|
213 |
// $advanced = 1 : champs de saisie amélioré (calendrier, convertisseur, etc.)
|
205 |
case 'Simultaneous-Use' :
|
214 |
case 'Simultaneous-Use' :
|
206 |
$advanced=1;
|
215 |
$advanced=1;
|
207 |
$help_link="help/simultaneous_use_help.html";
|
216 |
$help_link="help/simultaneous_use_help.html";
|
208 |
$desc=$l_simultaneous_use;
|
217 |
$desc=$l_simultaneous_use;
|
209 |
break;
|
218 |
break;
|
210 |
case 'Max-All-Session' :
|
219 |
case 'Max-All-Session' :
|
211 |
$advanced=1;
|
220 |
$advanced=1;
|
212 |
$help_link="help/max_all_session_help.html";
|
221 |
$help_link="help/max_all_session_help.html";
|
213 |
$desc=$l_max_all_session;
|
222 |
$desc=$l_max_all_session;
|
214 |
break;
|
223 |
break;
|
215 |
case 'Session-Timeout' :
|
224 |
case 'Session-Timeout' :
|
216 |
$advanced=1;
|
225 |
$advanced=1;
|
217 |
$help_link="help/session_timeout_help.html";
|
226 |
$help_link="help/session_timeout_help.html";
|
218 |
$desc=$l_session_timeout;
|
227 |
$desc=$l_session_timeout;
|
219 |
break;
|
228 |
break;
|
220 |
case 'Max-Daily-Session' :
|
229 |
case 'Max-Daily-Session' :
|
221 |
$advanced=1;
|
230 |
$advanced=1;
|
222 |
$help_link="help/session_timeout_help.html";
|
231 |
$help_link="help/session_timeout_help.html";
|
223 |
$desc=$l_daily_timeout;
|
232 |
$desc=$l_daily_timeout;
|
224 |
break;
|
233 |
break;
|
225 |
case 'Max-Monthly-Session' :
|
234 |
case 'Max-Monthly-Session' :
|
226 |
$advanced=1;
|
235 |
$advanced=1;
|
227 |
$help_link="help/session_timeout_help.html";
|
236 |
$help_link="help/session_timeout_help.html";
|
228 |
$desc=$l_monthly_timeout;
|
237 |
$desc=$l_monthly_timeout;
|
229 |
break;
|
238 |
break;
|
230 |
case 'Login-Time' :
|
239 |
case 'Login-Time' :
|
231 |
$advanced=1;
|
240 |
$advanced=1;
|
232 |
$help_link="help/login_time_help.html";
|
241 |
$help_link="help/login_time_help.html";
|
233 |
$desc=$l_login_time;
|
242 |
$desc=$l_login_time;
|
234 |
break;
|
243 |
break;
|
235 |
case 'Expiration' :
|
244 |
case 'Expiration' :
|
236 |
$advanced=1;
|
245 |
$advanced=1;
|
237 |
$help_link="help/expiration_help.html";
|
246 |
$help_link="help/expiration_help.html";
|
238 |
$desc=$l_expiration;
|
247 |
$desc=$l_expiration;
|
239 |
break;
|
248 |
break;
|
240 |
case 'ChilliSpot-Max-Input-Octets' :
|
249 |
case 'ChilliSpot-Max-Input-Octets' :
|
241 |
$advanced=1;
|
250 |
$advanced=1;
|
242 |
$help_link="help/chillispot_max_input_octets_help.html";
|
251 |
$help_link="help/chillispot_max_input_octets_help.html";
|
243 |
$desc=$l_max_input_octets;
|
252 |
$desc=$l_max_input_octets;
|
244 |
break;
|
253 |
break;
|
245 |
case 'ChilliSpot-Max-Output-Octets' :
|
254 |
case 'ChilliSpot-Max-Output-Octets' :
|
246 |
$advanced=1;
|
255 |
$advanced=1;
|
247 |
$help_link="help/chillispot_max_output_octets_help.html";
|
256 |
$help_link="help/chillispot_max_output_octets_help.html";
|
248 |
$desc=$l_max_output_octets;
|
257 |
$desc=$l_max_output_octets;
|
249 |
break;
|
258 |
break;
|
250 |
case 'ChilliSpot-Max-Total-Octets' :
|
259 |
case 'ChilliSpot-Max-Total-Octets' :
|
251 |
$advanced=1;
|
260 |
$advanced=1;
|
252 |
$help_link="help/chillispot_max_total_octets_help.html";
|
261 |
$help_link="help/chillispot_max_total_octets_help.html";
|
253 |
$desc=$l_max_total_octets;
|
262 |
$desc=$l_max_total_octets;
|
254 |
break;
|
263 |
break;
|
255 |
case 'ChilliSpot-Bandwidth-Max-Up' :
|
264 |
case 'ChilliSpot-Bandwidth-Max-Up' :
|
256 |
$advanced=1;
|
265 |
$advanced=1;
|
257 |
$help_link="help/chillispot_bandwidth_max_up_help.html";
|
266 |
$help_link="help/chillispot_bandwidth_max_up_help.html";
|
258 |
$desc=$l_max_bandwidth_up;
|
267 |
$desc=$l_max_bandwidth_up;
|
259 |
break;
|
268 |
break;
|
260 |
case 'ChilliSpot-Bandwidth-Max-Down' :
|
269 |
case 'ChilliSpot-Bandwidth-Max-Down' :
|
261 |
$advanced=1;
|
270 |
$advanced=1;
|
262 |
$help_link="help/chillispot_bandwidth_max_down_help.html";
|
271 |
$help_link="help/chillispot_bandwidth_max_down_help.html";
|
263 |
$desc=$l_max_bandwidth_down;
|
272 |
$desc=$l_max_bandwidth_down;
|
264 |
break;
|
273 |
break;
|
265 |
case 'WISPr-Redirection-URL' :
|
274 |
case 'WISPr-Redirection-URL' :
|
266 |
$advanced=1;
|
275 |
$advanced=1;
|
267 |
$help_link="help/wispr_redirection_url_help.html";
|
276 |
$help_link="help/wispr_redirection_url_help.html";
|
268 |
$desc=$l_wispr_redirection;
|
277 |
$desc=$l_wispr_redirection;
|
269 |
break;
|
278 |
break;
|
270 |
case 'Filter-Id' :
|
279 |
case 'Filter-Id' :
|
271 |
$advanced=1;
|
280 |
$advanced=1;
|
272 |
$help_link="help/filtering_help.html";
|
281 |
$help_link="help/filtering_help.html";
|
273 |
$desc=$l_filtering;
|
282 |
$desc=$l_filtering;
|
274 |
break;
|
283 |
break;
|
275 |
default:
|
284 |
default:
|
276 |
$advanced=1;
|
285 |
$advanced=1;
|
277 |
break;
|
286 |
break;
|
278 |
}
|
287 |
}
|
279 |
print <<<EOM
|
288 |
print <<<EOM
|
280 |
<tr>
|
289 |
<tr>
|
281 |
<td class="etiquette">
|
290 |
<td class="etiquette">
|
282 |
<a href="$help_link" target=help onclick=window.open("$help_link","help","width=600,height=250,toolbar=no,scrollbars=no,resizable=yes") title="$l_click_for_help"><font color="blue">$desc</font></a>
|
291 |
<a href="$help_link" target=help onclick=window.open("$help_link","help","width=600,height=250,toolbar=no,scrollbars=no,resizable=yes") title="$l_click_for_help"><font color="blue">$desc</font></a>
|
283 |
EOM;
|
292 |
EOM;
|
284 |
if ($show_ops){
|
293 |
if ($show_ops){
|
285 |
switch ($key)
|
294 |
switch ($key)
|
286 |
{
|
295 |
{
|
287 |
case 'Simultaneous-Use' :
|
296 |
case 'Simultaneous-Use' :
|
288 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
297 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
289 |
break;
|
298 |
break;
|
290 |
case 'Login-Time' :
|
299 |
case 'Login-Time' :
|
291 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
300 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
292 |
break;
|
301 |
break;
|
293 |
case 'Expiration' :
|
302 |
case 'Expiration' :
|
294 |
if($login == "sms" && $user_type == 'group'){
|
303 |
if($login == "sms" && $user_type == 'group'){
|
295 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20 disabled></td>";
|
304 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20 disabled></td>";
|
296 |
} else {
|
305 |
} else {
|
297 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
306 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input id=\"popup_container\" type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
298 |
}
|
307 |
}
|
299 |
break;
|
308 |
break;
|
300 |
case 'Max-All-Session' :
|
309 |
case 'Max-All-Session' :
|
301 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
310 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
302 |
break;
|
311 |
break;
|
303 |
case 'Session-Timeout' :
|
312 |
case 'Session-Timeout' :
|
304 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
313 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
305 |
break;
|
314 |
break;
|
306 |
case 'Max-Daily-Session' :
|
315 |
case 'Max-Daily-Session' :
|
307 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
316 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
308 |
break;
|
317 |
break;
|
309 |
case 'Max-Weekly-Session' :
|
318 |
case 'Max-Weekly-Session' :
|
310 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
319 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
311 |
break;
|
320 |
break;
|
312 |
case 'Max-Monthly-Session' :
|
321 |
case 'Max-Monthly-Session' :
|
313 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
322 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
314 |
break;
|
323 |
break;
|
315 |
case 'ChilliSpot-Max-Input-Octets' :
|
324 |
case 'ChilliSpot-Max-Input-Octets' :
|
316 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
325 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
317 |
break;
|
326 |
break;
|
318 |
case 'ChilliSpot-Max-Output-Octets' :
|
327 |
case 'ChilliSpot-Max-Output-Octets' :
|
319 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
328 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
320 |
break;
|
329 |
break;
|
321 |
case 'ChilliSpot-Max-Total-Octets' :
|
330 |
case 'ChilliSpot-Max-Total-Octets' :
|
322 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
331 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
323 |
break;
|
332 |
break;
|
324 |
case 'ChilliSpot-Bandwidth-Max-Up' :
|
333 |
case 'ChilliSpot-Bandwidth-Max-Up' :
|
325 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
334 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
326 |
break;
|
335 |
break;
|
327 |
case 'ChilliSpot-Bandwidth-Max-Down' :
|
336 |
case 'ChilliSpot-Bandwidth-Max-Down' :
|
328 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
337 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
329 |
break;
|
338 |
break;
|
330 |
case 'WISPr-Redirection-URL' :
|
339 |
case 'WISPr-Redirection-URL' :
|
331 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
340 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><input type=text name=\"$name1\" value=\"$val\" size=20></td>";
|
332 |
break;
|
341 |
break;
|
333 |
case 'Filter-Id' :
|
342 |
case 'Filter-Id' :
|
334 |
switch($val)
|
343 |
switch($val)
|
335 |
{
|
344 |
{
|
336 |
case "00000001":
|
345 |
case "00000001":
|
337 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option>$l_filtering_none</option><option value=\"00000001\" selected=\"selected\">$l_filtering_havp</option><option value=\"00000011\">$l_filtering_havp_bl</option><option value=\"00000101\">$l_filtering_havp_wl</option></select></td>";
|
346 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option value=\"\">$l_filtering_none</option><option value=\"00000001\" selected=\"selected\">$l_filtering_havp</option><option value=\"00000011\">$l_filtering_havp_bl</option><option value=\"00000101\">$l_filtering_havp_wl</option></select></td>";
|
338 |
break;
|
347 |
break;
|
339 |
case "00000011":
|
348 |
case "00000011":
|
340 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option>$l_filtering_none</option><option value=\"00000001\">$l_filtering_havp</option><option value=\"00000011\" selected=\"selected\">$l_filtering_havp_bl</option><option value=\"00000101\">$l_filtering_havp_wl</option></select></td>";
|
349 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option value=\"\">$l_filtering_none</option><option value=\"00000001\">$l_filtering_havp</option><option value=\"00000011\" selected=\"selected\">$l_filtering_havp_bl</option><option value=\"00000101\">$l_filtering_havp_wl</option></select></td>";
|
341 |
break;
|
350 |
break;
|
342 |
case "00000101":
|
351 |
case "00000101":
|
343 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option>$l_filtering_none</option><option value=\"00000001\">$l_filtering_havp</option><option value=\"00000011\">$l_filtering_havp_bl</option><option value=\"00000101\" selected=\"selected\">$l_filtering_havp_wl</option></select></td>";
|
352 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option value=\"\">$l_filtering_none</option><option value=\"00000001\">$l_filtering_havp</option><option value=\"00000011\">$l_filtering_havp_bl</option><option value=\"00000101\" selected=\"selected\">$l_filtering_havp_wl</option></select></td>";
|
344 |
break;
|
353 |
break;
|
345 |
default :
|
354 |
default :
|
346 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option selected=\"selected\">$l_filtering_none</option><option value=\"00000001\">$l_filtering_havp</option><option value=\"00000011\">$l_filtering_havp_bl</option><option value=\"00000101\">$l_filtering_havp_wl</option></select></td>";
|
355 |
echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=</td><td><select name=\"$name1\"><option value=\"\" selected=\"selected\">$l_filtering_none</option><option value=\"00000001\">$l_filtering_havp</option><option value=\"00000011\">$l_filtering_havp_bl</option><option value=\"00000101\">$l_filtering_havp_wl</option></select></td>";
|
347 |
break;
|
356 |
break;
|
348 |
}
|
357 |
}
|
349 |
break;
|
358 |
break;
|
350 |
default :
|
359 |
default :
|
351 |
print <<<EOM
|
360 |
print <<<EOM
|
352 |
<td>
|
361 |
<td>
|
353 |
<select name=$oper_name>
|
362 |
<select name=$oper_name>
|
354 |
<option $selected[$op_eq] value="=">=
|
363 |
<option $selected[$op_eq] value="=">=
|
355 |
<option $selected[$op_set] value=":=">:=
|
364 |
<option $selected[$op_set] value=":=">:=
|
356 |
<option $selected[$op_add] value="+=">+=
|
365 |
<option $selected[$op_add] value="+=">+=
|
357 |
<option $selected[$op_eq2] value="==">==
|
366 |
<option $selected[$op_eq2] value="==">==
|
358 |
<option $selected[$op_ne] value="!=">!=
|
367 |
<option $selected[$op_ne] value="!=">!=
|
359 |
<option $selected[$op_gt] value=">">>
|
368 |
<option $selected[$op_gt] value=">">>
|
360 |
<option $selected[$op_ge] value=">=">>=
|
369 |
<option $selected[$op_ge] value=">=">>=
|
361 |
<option $selected[$op_lt] value="<"><
|
370 |
<option $selected[$op_lt] value="<"><
|
362 |
<option $selected[$op_le] value="<="><=
|
371 |
<option $selected[$op_le] value="<="><=
|
363 |
<option $selected[$op_regeq] value="=~">=~
|
372 |
<option $selected[$op_regeq] value="=~">=~
|
364 |
<option $selected[$op_regne] value="!~">!~
|
373 |
<option $selected[$op_regne] value="!~">!~
|
365 |
<option $selected[$op_exst] value="=*">=*
|
374 |
<option $selected[$op_exst] value="=*">=*
|
366 |
<option $selected[$op_nexst] value="!*">!*
|
375 |
<option $selected[$op_nexst] value="!*">!*
|
367 |
</select>
|
376 |
</select>
|
368 |
</td>
|
377 |
</td>
|
369 |
<td><input type=text name="$name1" value="$val" size=20></td>
|
378 |
<td><input type=text name="$name1" value="$val" size=20></td>
|
370 |
EOM;
|
379 |
EOM;
|
371 |
break;
|
380 |
break;
|
372 |
}
|
381 |
}
|
373 |
}
|
382 |
}
|
374 |
print <<<EOM
|
383 |
print <<<EOM
|
375 |
</tr>
|
384 |
</tr>
|
376 |
EOM;
|
385 |
EOM;
|
377 |
}
|
386 |
}
|
378 |
}
|
387 |
}
|
379 |
if ($user_type != 'group'){
|
388 |
if ($user_type != 'group'){
|
380 |
echo <<<EOM
|
389 |
echo <<<EOM
|
381 |
<tr>
|
390 |
<tr>
|
382 |
<td align=right colspan=$colspan bgcolor="#d0ddb0">
|
391 |
<td align=right colspan=$colspan bgcolor="#d0ddb0">
|
383 |
$l_group_member<br><font size=-2><i>($l_main_group)</i></font>
|
392 |
$l_group_member<br><font size=-2><i>($l_main_group)</i></font>
|
384 |
</td>
|
393 |
</td>
|
385 |
<td>
|
394 |
<td>
|
386 |
EOM;
|
395 |
EOM;
|
387 |
if (isset($member_groups)){
|
396 |
if (isset($member_groups)){
|
388 |
echo "<select size=5 name=\"edited_groups[]\" multiple OnChange=\"this.form.group_change.value=1\">";
|
397 |
echo "<select size=5 name=\"edited_groups[]\" multiple OnChange=\"this.form.group_change.value=1\">";
|
389 |
if ($config[sql_show_all_groups] == 'true'){
|
398 |
if ($config[sql_show_all_groups] == 'true'){
|
390 |
foreach ($existing_groups as $group => $count){
|
399 |
foreach ($existing_groups as $group => $count){
|
391 |
if ($member_groups[$group] == $group)
|
400 |
if ($member_groups[$group] == $group)
|
392 |
echo "<option selected value=\"$group\">$group\n";
|
401 |
echo "<option selected value=\"$group\">$group\n";
|
393 |
else
|
402 |
else
|
394 |
echo "<option value=\"$group\">$group\n";
|
403 |
echo "<option value=\"$group\">$group\n";
|
395 |
}
|
404 |
}
|
396 |
}else{
|
405 |
}else{
|
397 |
foreach ($member_groups as $group)
|
406 |
foreach ($member_groups as $group)
|
398 |
echo "<option value=\"$group\">$group\n";
|
407 |
echo "<option value=\"$group\">$group\n";
|
399 |
}
|
408 |
}
|
400 |
echo "</select></td></tr>";
|
409 |
echo "</select></td></tr>";
|
401 |
}
|
410 |
}
|
402 |
else{
|
411 |
else{
|
403 |
echo "aucun group</td></tr>";
|
412 |
echo "aucun group</td></tr>";
|
404 |
}
|
413 |
}
|
405 |
}
|
414 |
}
|
406 |
echo "</table><br>";
|
415 |
echo "</table><br>";
|
407 |
echo "<input type=submit class=button value=$l_change OnClick=\"this.form.change.value=1\">";
|
416 |
echo "<input type=submit class=button value=$l_change OnClick=\"this.form.change.value=1\">";
|
408 |
//if ($user_type != 'group'){
|
417 |
//if ($user_type != 'group'){
|
409 |
// echo <<<EOM
|
418 |
// echo <<<EOM
|
410 |
//<br><br>
|
419 |
//<br><br>
|
411 |
//<input type=submit class=button value="Add to Badusers" OnClick="this.form.badusers.value=1">
|
420 |
//<input type=submit class=button value="Add to Badusers" OnClick="this.form.badusers.value=1">
|
412 |
//<a href="help/badusers_help.html" target=bu_help onclick=window.open("help/badusers_help.html","bu_help","width=600,height=210,toolbar=no,scrollbars=no,resizable=yes") title="BADUSERS Help Page"><font color="blue"><--Help</font></a>
|
421 |
//<a href="help/badusers_help.html" target=bu_help onclick=window.open("help/badusers_help.html","bu_help","width=600,height=210,toolbar=no,scrollbars=no,resizable=yes") title="BADUSERS Help Page"><font color="blue"><--Help</font></a>
|
413 |
//EOM;
|
422 |
//EOM;
|
414 |
//}
|
423 |
//}
|
415 |
?>
|
424 |
?>
|
416 |
</form>
|
425 |
</form>
|
417 |
</td></tr>
|
426 |
</td></tr>
|
418 |
</table>
|
427 |
</table>
|
419 |
</tr>
|
428 |
</tr>
|
420 |
</table>
|
429 |
</table>
|
421 |
</td></tr>
|
430 |
</td></tr>
|
422 |
</TABLE>
|
431 |
</TABLE>
|
423 |
</body>
|
432 |
</body>
|
424 |
</html>
|
433 |
</html>
|
425 |
|
434 |
|