Subversion Repositories ALCASAR

Rev

Rev 685 | Rev 911 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
324 richard 1
<?php
910 richard 2
//gestion de la langue
3
$origine='find_user';
4
if (is_file("../lib/langues.php"))
5
	include("../lib/langues.php");
324 richard 6
require('/etc/freeradius-web/config.php');
7
if (isset($search_IN)) $selected[$search_IN] = 'selected';
8
if (isset ($radius_attr)) $selected[$radius_attr] = 'selected';
9
if (isset ($max_results)){ $max = ($max_results) ? $max_results : 40;}
10
?>
11
<html>
12
<head>
910 richard 13
<title><?php echo "$l_title";?></title>
324 richard 14
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config['general_charset']?>">
15
<link rel="stylesheet" href="/css/style.css">
16
</head>
17
<body>
18
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
910 richard 19
<tr><th><?php echo "$l_frame_top";?></th></tr>
324 richard 20
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" 
21
height="2"></td></tr>
22
</TABLE>
23
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
24
	<tr bgcolor="#666666"><td>
25
	<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
26
		<tr><td valign="middle" align="left">
27
<center>
28
<table border=0 width=540 cellpadding=1 cellspacing=1>
29
<tr valign=top>
30
<td width=340></td>
31
<td bgcolor="black" width=200>
32
	<table border=0 width=100% cellpadding=2 cellspacing=0>
33
	<tr bgcolor="#907030" align=right valign=top><th>
910 richard 34
	<font color="white"><?php echo "$l_search_filter";?></font>
324 richard 35
	</th></tr>
36
	</table>
37
</td></tr>
38
<tr bgcolor="black" valign=top><td colspan=2>
39
	<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
40
	<tr><td>
41
 
42
<?php
43
if (isset($find_user)){
44
if ($find_user == 1){
45
	unset($found_users);
46
	if (is_file("../lib/$config[general_lib_type]/find.php"))
47
		include("../lib/$config[general_lib_type]/find.php");
48
	if (isset($found_users)){
49
		$num = 0;
50
		$msg .= <<<EOM
51
 
52
        <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
53
        <tr bgcolor="#d0ddb0">
910 richard 54
        <th>#</th><th>$l_user</th><th>Actions</th><th>$l_group_member</th>
324 richard 55
        </tr>
56
EOM;
57
		foreach ($found_users as $user){
58
			if ($user == '')
59
				$user = '-';
60
			$User = urlencode($user);
61
			$num++;
685 richard 62
			$msg .= "<tr align=center><td>$num</td><td>$user";
324 richard 63
			$msg .= <<<EOM
910 richard 64
				</td><td><a href="user_admin.php?login=$User" title="$l_status"><img src=/images/info.gif></a>
65
				<a href="user_edit.php?login=$User" title="$l_attributes"><img src=/images/create.gif></a>
66
				<a href="user_info.php?login=$User" title="$l_personal_info"><img src=/images/tpf.gif></a>
67
				<a href="user_accounting.php?login=$User" title="$l_connections"><img src=/images/graph.gif></a>
68
				<a href="clear_opensessions.php?login=$User" title="$l_open_sessions"><img src=/images/state_ok.gif></a>
69
				<a href="user_delete.php?login=$User" title="$l_remove"><img src=/images/state_error.gif></a></td><td>
324 richard 70
EOM;
685 richard 71
			$login = $user;
72
			if (is_file("../lib/sql/defaults.php")) //retrieve member_groups
73
				include("../lib/sql/defaults.php");
74
			if (isset($member_groups)) foreach ($member_groups as $group) { $msg .= "$group";}
75
			else $msg .= "&nbsp"; 
76
		$msg .= "</td>";
324 richard 77
		}
685 richard 78
		$msg .= "</tr></table>\n";
324 richard 79
	}
80
	else
910 richard 81
		$msg = "<b>$l_no_user_found</b><br>\n";
324 richard 82
}
83
}
84
?>
85
   <form method=post>
86
      <input type=hidden name=find_user value="0">
87
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
88
<tr>
89
<td align=right bgcolor="#d0ddb0">
910 richard 90
<?php
91
echo <<<EOM
92
$l_search_criteria
324 richard 93
</td>
94
<td>
95
<select name="search_IN" editable onChange="this.form.submit();">
910 richard 96
<option $selected[username] value="username">$l_login
97
<option $selected[name]  value="name">$l_name
324 richard 98
<option $selected[department] value="department">Service
910 richard 99
<option $selected[radius] value="radius">$l_special_attribute
324 richard 100
EOM;
101
?>
102
 
103
</select>
104
</td>
105
</tr>
106
<?php
107
if (isset($search_IN)){
108
	if ($search_IN == 'radius'){
109
		require('../lib/attrshow.php');
110
		echo <<<EOM
111
<tr>
112
<td align=right bgcolor="#d0ddb0">
910 richard 113
$l_attribute
324 richard 114
</td>
115
<td>
116
<select name="radius_attr" editable>
117
EOM;
118
		foreach($show_attrs as $key => $desc)
910 richard 119
		switch ($key)
120
		{
121
			case 'Simultaneous-Use' : 
122
				$desc=$l_simultaneous_use;
123
				echo "<option $selected[$key] value=\"$key\">$desc\n";		
124
				break;
125
			case 'Max-All-Session' :
126
				$desc=$l_max_all_session;
127
				echo "<option $selected[$key] value=\"$key\">$desc\n";		
128
				break;
129
			case 'Session-Timeout' : 
130
				$desc=$l_session_timeout;
131
				echo "<option $selected[$key] value=\"$key\">$desc\n";		
132
				break;
133
			case 'Max-Daily-Session' :
134
				$desc=$l_daily_timeout;
135
				echo "<option $selected[$key] value=\"$key\">$desc\n";		
136
				break;
137
			case 'Max-Monthly-Session' :
138
				$desc=$l_monthly_timeout;
139
				echo "<option $selected[$key] value=\"$key\">$desc\n";		
140
				break;
141
			case 'Login-Time' : 
142
				$desc=$l_login_time;
143
				echo "<option $selected[$key] value=\"$key\">$desc\n";		
144
				break;
145
			case 'Expiration' :
146
				$desc=$l_expiration;
147
				echo "<option $selected[$key] value=\"$key\">$desc\n";		
148
				break;
149
			case 'ChilliSpot-Max-Input-Octets' :
150
				$desc=$l_max_input_octets;
151
				echo "<option $selected[$key] value=\"$key\">$desc\n";		
152
				break;
153
			case 'ChilliSpot-Max-Output-Octets' :
154
				$desc=$l_max_output_octets;
155
				echo "<option $selected[$key] value=\"$key\">$desc\n";		
156
				break;
157
			case 'ChilliSpot-Max-Total-Octets' :
158
				$desc=$l_max_total_octets;
159
				echo "<option $selected[$key] value=\"$key\">$desc\n";		
160
				break;
161
			case 'ChilliSpot-Bandwidth-Max-Up' :
162
				$desc=$l_max_bandwidth_up;
163
				echo "<option $selected[$key] value=\"$key\">$desc\n";		
164
				break;
165
			case 'ChilliSpot-Bandwidth-Max-Down' :
166
				$desc=$l_max_bandwidth_down;
167
				echo "<option $selected[$key] value=\"$key\">$desc\n";		
168
				break;
169
			case 'WISPr-Redirection-URL' :
170
				$desc=$l_wispr_redirection;
171
				echo "<option $selected[$key] value=\"$key\">$desc\n";		
172
				break;
173
		}
324 richard 174
		echo <<<EOM
175
</select>
176
</td>
177
</tr>
178
EOM;
179
	}
180
}
181
?>
182
<tr>
183
<td align=right bgcolor="#d0ddb0">
910 richard 184
<?php echo "$l_value";?>
324 richard 185
</td>
186
<td>
187
<input type=text name="search" value="<?php if (isset($search)) echo $search ;?>" size=25>
188
</td>
189
</tr>
190
<!--<tr>
191
<td align=right bgcolor="#d0ddb0">
192
Nombre de r&eacute;sultats Max.
193
</td>
194
<td>
195
<input type=text name="max_results" value="<?php echo $max ?>" size=25>
196
</td>
197
</tr> --> 
198
</table>
199
<br>
910 richard 200
<input type=submit class=button value="<?php echo"$l_search";?>" OnClick="this.form.find_user.value=1">
324 richard 201
</form>
202
<?php
203
if (isset($find_user)){
204
	if ($find_user == 1){ echo $msg ;}}
205
?>
206
</td></tr>
207
</table>
208
</td></tr>
209
</table>
210
</td></tr>
211
</TABLE>
212
</td></tr>
213
</TABLE>
214
</body>
215
</html>