Subversion Repositories ALCASAR

Rev

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