Subversion Repositories ALCASAR

Rev

Rev 685 | Rev 911 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 685 Rev 910
Line 1... Line 1...
1
<?php
1
<?php
-
 
2
//gestion de la langue
-
 
3
$origine='find_user';
-
 
4
if (is_file("../lib/langues.php"))
-
 
5
	include("../lib/langues.php");
2
require('/etc/freeradius-web/config.php');
6
require('/etc/freeradius-web/config.php');
3
if (isset($search_IN)) $selected[$search_IN] = 'selected';
7
if (isset($search_IN)) $selected[$search_IN] = 'selected';
4
if (isset ($radius_attr)) $selected[$radius_attr] = 'selected';
8
if (isset ($radius_attr)) $selected[$radius_attr] = 'selected';
5
if (isset ($max_results)){ $max = ($max_results) ? $max_results : 40;}
9
if (isset ($max_results)){ $max = ($max_results) ? $max_results : 40;}
6
?>
10
?>
7
<html>
11
<html>
8
<head>
12
<head>
9
<title>Gestion des usager</title>
13
<title><?php echo "$l_title";?></title>
10
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config['general_charset']?>">
14
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config['general_charset']?>">
11
<link rel="stylesheet" href="/css/style.css">
15
<link rel="stylesheet" href="/css/style.css">
12
</head>
16
</head>
13
<body>
17
<body>
14
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
18
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
15
	<tr><th>Gestion des usagers</th></tr>
19
<tr><th><?php echo "$l_frame_top";?></th></tr>
16
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" 
20
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" 
17
height="2"></td></tr>
21
height="2"></td></tr>
18
</TABLE>
22
</TABLE>
19
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
23
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
20
	<tr bgcolor="#666666"><td>
24
	<tr bgcolor="#666666"><td>
Line 25... Line 29...
25
<tr valign=top>
29
<tr valign=top>
26
<td width=340></td>
30
<td width=340></td>
27
<td bgcolor="black" width=200>
31
<td bgcolor="black" width=200>
28
	<table border=0 width=100% cellpadding=2 cellspacing=0>
32
	<table border=0 width=100% cellpadding=2 cellspacing=0>
29
	<tr bgcolor="#907030" align=right valign=top><th>
33
	<tr bgcolor="#907030" align=right valign=top><th>
30
	<font color="white">Filtre de recherche</font>&nbsp;
34
	<font color="white"><?php echo "$l_search_filter";?></font>
31
	</th></tr>
35
	</th></tr>
32
	</table>
36
	</table>
33
</td></tr>
37
</td></tr>
34
<tr bgcolor="black" valign=top><td colspan=2>
38
<tr bgcolor="black" valign=top><td colspan=2>
35
	<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
39
	<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
Line 45... Line 49...
45
		$num = 0;
49
		$num = 0;
46
		$msg .= <<<EOM
50
		$msg .= <<<EOM
47
 
51
 
48
        <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
52
        <table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
49
        <tr bgcolor="#d0ddb0">
53
        <tr bgcolor="#d0ddb0">
50
        <th>#</th><th>Usager</th><th>Actions</th><th>membre du groupe</th>
54
        <th>#</th><th>$l_user</th><th>Actions</th><th>$l_group_member</th>
51
        </tr>
55
        </tr>
52
EOM;
56
EOM;
53
		foreach ($found_users as $user){
57
		foreach ($found_users as $user){
54
			if ($user == '')
58
			if ($user == '')
55
				$user = '-';
59
				$user = '-';
56
			$User = urlencode($user);
60
			$User = urlencode($user);
57
			$num++;
61
			$num++;
58
			$msg .= "<tr align=center><td>$num</td><td>$user";
62
			$msg .= "<tr align=center><td>$num</td><td>$user";
59
			$msg .= <<<EOM
63
			$msg .= <<<EOM
60
				</td><td><a href="user_admin.php?login=$User" title="&Eacute;tat"><img src=/images/info.gif></a>
64
				</td><td><a href="user_admin.php?login=$User" title="$l_status"><img src=/images/info.gif></a>
61
				<a href="user_edit.php?login=$User" title="Attributs"><img src=/images/create.gif></a>
65
				<a href="user_edit.php?login=$User" title="$l_attributes"><img src=/images/create.gif></a>
62
				<a href="user_info.php?login=$User" title="Informations personnelles"><img src=/images/tpf.gif></a>
66
				<a href="user_info.php?login=$User" title="$l_personal_info"><img src=/images/tpf.gif></a>
63
				<a href="user_accounting.php?login=$User" title="Connexions effectu&eacute;es"><img src=/images/graph.gif></a>
67
				<a href="user_accounting.php?login=$User" title="$l_connections"><img src=/images/graph.gif></a>
64
				<a href="clear_opensessions.php?login=$User" title="Sessions ouvertes"><img src=/images/state_ok.gif></a>
68
				<a href="clear_opensessions.php?login=$User" title="$l_open_sessions"><img src=/images/state_ok.gif></a>
65
				<a href="user_delete.php?login=$User" title="Supprimer"><img src=/images/state_error.gif></a></td><td>
69
				<a href="user_delete.php?login=$User" title="$l_remove"><img src=/images/state_error.gif></a></td><td>
66
EOM;
70
EOM;
67
			$login = $user;
71
			$login = $user;
68
			if (is_file("../lib/sql/defaults.php")) //retrieve member_groups
72
			if (is_file("../lib/sql/defaults.php")) //retrieve member_groups
69
				include("../lib/sql/defaults.php");
73
				include("../lib/sql/defaults.php");
70
			if (isset($member_groups)) foreach ($member_groups as $group) { $msg .= "$group";}
74
			if (isset($member_groups)) foreach ($member_groups as $group) { $msg .= "$group";}
Line 72... Line 76...
72
		$msg .= "</td>";
76
		$msg .= "</td>";
73
		}
77
		}
74
		$msg .= "</tr></table>\n";
78
		$msg .= "</tr></table>\n";
75
	}
79
	}
76
	else
80
	else
77
		$msg = "<b>Pas d'usagers trouv&eacute;s</b><br>\n";
81
		$msg = "<b>$l_no_user_found</b><br>\n";
78
}
82
}
79
}
83
}
80
?>
84
?>
81
   <form method=post>
85
   <form method=post>
82
      <input type=hidden name=find_user value="0">
86
      <input type=hidden name=find_user value="0">
83
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
87
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
84
<tr>
88
<tr>
85
<td align=right bgcolor="#d0ddb0">
89
<td align=right bgcolor="#d0ddb0">
86
Crit&egrave;re de recherche
-
 
87
</td>
-
 
88
<td>
-
 
89
<?php
90
<?php
90
echo <<<EOM
91
echo <<<EOM
-
 
92
$l_search_criteria
-
 
93
</td>
-
 
94
<td>
91
<select name="search_IN" editable onChange="this.form.submit();">
95
<select name="search_IN" editable onChange="this.form.submit();">
92
<option $selected[username] value="username">Identifiant (login)
96
<option $selected[username] value="username">$l_login
93
<option $selected[name]  value="name">Nom complet (NOM Prenom)
97
<option $selected[name]  value="name">$l_name
94
<option $selected[department] value="department">Service
98
<option $selected[department] value="department">Service
95
<option $selected[radius] value="radius">Attribut particulier
99
<option $selected[radius] value="radius">$l_special_attribute
96
EOM;
100
EOM;
97
?>
101
?>
98
 
102
 
99
</select>
103
</select>
100
</td>
104
</td>
Line 104... Line 108...
104
	if ($search_IN == 'radius'){
108
	if ($search_IN == 'radius'){
105
		require('../lib/attrshow.php');
109
		require('../lib/attrshow.php');
106
		echo <<<EOM
110
		echo <<<EOM
107
<tr>
111
<tr>
108
<td align=right bgcolor="#d0ddb0">
112
<td align=right bgcolor="#d0ddb0">
109
Attributs RADIUS
113
$l_attribute
110
</td>
114
</td>
111
<td>
115
<td>
112
<select name="radius_attr" editable>
116
<select name="radius_attr" editable>
113
EOM;
117
EOM;
114
		foreach($show_attrs as $key => $desc)
118
		foreach($show_attrs as $key => $desc)
-
 
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;
115
			echo "<option $selected[$key] value=\"$key\">$desc\n";		
171
				echo "<option $selected[$key] value=\"$key\">$desc\n";		
-
 
172
				break;
-
 
173
		}
116
		echo <<<EOM
174
		echo <<<EOM
117
</select>
175
</select>
118
</td>
176
</td>
119
</tr>
177
</tr>
120
EOM;
178
EOM;
121
	}
179
	}
122
}
180
}
123
?>
181
?>
124
<tr>
182
<tr>
125
<td align=right bgcolor="#d0ddb0">
183
<td align=right bgcolor="#d0ddb0">
126
qui contient<BR>
-
 
127
(champ vide = tous)
184
<?php echo "$l_value";?>
128
</td>
185
</td>
129
<td>
186
<td>
130
<input type=text name="search" value="<?php if (isset($search)) echo $search ;?>" size=25>
187
<input type=text name="search" value="<?php if (isset($search)) echo $search ;?>" size=25>
131
</td>
188
</td>
132
</tr>
189
</tr>
Line 138... Line 195...
138
<input type=text name="max_results" value="<?php echo $max ?>" size=25>
195
<input type=text name="max_results" value="<?php echo $max ?>" size=25>
139
</td>
196
</td>
140
</tr> --> 
197
</tr> --> 
141
</table>
198
</table>
142
<br>
199
<br>
143
<input type=submit class=button value="Lancer la recherche" OnClick="this.form.find_user.value=1">
200
<input type=submit class=button value="<?php echo"$l_search";?>" OnClick="this.form.find_user.value=1">
144
</form>
201
</form>
145
<?php
202
<?php
146
if (isset($find_user)){
203
if (isset($find_user)){
147
	if ($find_user == 1){ echo $msg ;}}
204
	if ($find_user == 1){ echo $msg ;}}
148
?>
205
?>