324 |
richard |
1 |
<?php
|
|
|
2 |
require('/etc/freeradius-web/config.php');
|
|
|
3 |
if (isset($search_IN)) $selected[$search_IN] = 'selected';
|
|
|
4 |
if (isset ($radius_attr)) $selected[$radius_attr] = 'selected';
|
|
|
5 |
if (isset ($max_results)){ $max = ($max_results) ? $max_results : 40;}
|
|
|
6 |
?>
|
|
|
7 |
<html>
|
|
|
8 |
<head>
|
|
|
9 |
<title>Gestion des usager</title>
|
|
|
10 |
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config['general_charset']?>">
|
|
|
11 |
<link rel="stylesheet" href="/css/style.css">
|
|
|
12 |
</head>
|
|
|
13 |
<body>
|
|
|
14 |
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
15 |
<tr><th>Gestion des usagers</th></tr>
|
|
|
16 |
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
|
|
|
17 |
height="2"></td></tr>
|
|
|
18 |
</TABLE>
|
|
|
19 |
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
|
|
|
20 |
<tr bgcolor="#666666"><td>
|
|
|
21 |
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
|
|
|
22 |
<tr><td valign="middle" align="left">
|
|
|
23 |
<center>
|
|
|
24 |
<table border=0 width=540 cellpadding=1 cellspacing=1>
|
|
|
25 |
<tr valign=top>
|
|
|
26 |
<td width=340></td>
|
|
|
27 |
<td bgcolor="black" width=200>
|
|
|
28 |
<table border=0 width=100% cellpadding=2 cellspacing=0>
|
|
|
29 |
<tr bgcolor="#907030" align=right valign=top><th>
|
|
|
30 |
<font color="white">Filtre de recherche</font>
|
|
|
31 |
</th></tr>
|
|
|
32 |
</table>
|
|
|
33 |
</td></tr>
|
|
|
34 |
<tr bgcolor="black" valign=top><td colspan=2>
|
|
|
35 |
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
|
|
|
36 |
<tr><td>
|
|
|
37 |
|
|
|
38 |
<?php
|
|
|
39 |
if (isset($find_user)){
|
|
|
40 |
if ($find_user == 1){
|
|
|
41 |
unset($found_users);
|
|
|
42 |
if (is_file("../lib/$config[general_lib_type]/find.php"))
|
|
|
43 |
include("../lib/$config[general_lib_type]/find.php");
|
|
|
44 |
if (isset($found_users)){
|
|
|
45 |
$num = 0;
|
|
|
46 |
$msg .= <<<EOM
|
|
|
47 |
|
|
|
48 |
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
|
|
|
49 |
<tr bgcolor="#d0ddb0">
|
|
|
50 |
<th>#</th><th>Usager</th><th>Actions</th>
|
|
|
51 |
</tr>
|
|
|
52 |
EOM;
|
|
|
53 |
foreach ($found_users as $user){
|
|
|
54 |
if ($user == '')
|
|
|
55 |
$user = '-';
|
|
|
56 |
$User = urlencode($user);
|
|
|
57 |
$num++;
|
|
|
58 |
$msg .= <<<EOM
|
|
|
59 |
<tr align=center>
|
|
|
60 |
<td>$num</td>
|
|
|
61 |
<td>$user</td>
|
|
|
62 |
<td><a href="user_admin.php?login=$User" title="État"><img src=/images/info.gif></a>
|
|
|
63 |
<a href="user_edit.php?login=$User" title="Attributs"><img src=/images/create.gif></a>
|
|
|
64 |
<a href="user_info.php?login=$User" title="Informations personnelles"><img src=/images/tpf.gif></a>
|
|
|
65 |
<a href="user_accounting.php?login=$User" title="Connexions effectuées"><img src=/images/graph.gif></a>
|
|
|
66 |
<a href="clear_opensessions.php?login=$User" title="Sessions ouvertes"><img src=/images/state_ok.gif></a>
|
|
|
67 |
<a href="user_delete.php?login=$User" title="Supprimer"><img src=/images/state_error.gif></a></td>
|
|
|
68 |
</tr>
|
|
|
69 |
EOM;
|
|
|
70 |
}
|
|
|
71 |
$msg .= "</table>\n";
|
|
|
72 |
}
|
|
|
73 |
else
|
|
|
74 |
$msg = "<b>Pas d'usagers trouvés</b><br>\n";
|
|
|
75 |
}
|
|
|
76 |
}
|
|
|
77 |
?>
|
|
|
78 |
<form method=post>
|
|
|
79 |
<input type=hidden name=find_user value="0">
|
|
|
80 |
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
|
|
|
81 |
<tr>
|
|
|
82 |
<td align=right bgcolor="#d0ddb0">
|
|
|
83 |
Critère de recherche
|
|
|
84 |
</td>
|
|
|
85 |
<td>
|
|
|
86 |
<?php
|
|
|
87 |
echo <<<EOM
|
|
|
88 |
<select name="search_IN" editable onChange="this.form.submit();">
|
|
|
89 |
<option $selected[username] value="username">Identifiant (login)
|
|
|
90 |
<option $selected[name] value="name">Nom complet (NOM Prenom)
|
|
|
91 |
<option $selected[department] value="department">Service
|
|
|
92 |
<option $selected[radius] value="radius">Attribut particulier
|
|
|
93 |
EOM;
|
|
|
94 |
?>
|
|
|
95 |
|
|
|
96 |
</select>
|
|
|
97 |
</td>
|
|
|
98 |
</tr>
|
|
|
99 |
<?php
|
|
|
100 |
if (isset($search_IN)){
|
|
|
101 |
if ($search_IN == 'radius'){
|
|
|
102 |
require('../lib/attrshow.php');
|
|
|
103 |
echo <<<EOM
|
|
|
104 |
<tr>
|
|
|
105 |
<td align=right bgcolor="#d0ddb0">
|
|
|
106 |
Attributs RADIUS
|
|
|
107 |
</td>
|
|
|
108 |
<td>
|
|
|
109 |
<select name="radius_attr" editable>
|
|
|
110 |
EOM;
|
|
|
111 |
foreach($show_attrs as $key => $desc)
|
|
|
112 |
echo "<option $selected[$key] value=\"$key\">$desc\n";
|
|
|
113 |
echo <<<EOM
|
|
|
114 |
</select>
|
|
|
115 |
</td>
|
|
|
116 |
</tr>
|
|
|
117 |
EOM;
|
|
|
118 |
}
|
|
|
119 |
}
|
|
|
120 |
?>
|
|
|
121 |
<tr>
|
|
|
122 |
<td align=right bgcolor="#d0ddb0">
|
|
|
123 |
qui contient<BR>
|
|
|
124 |
(champ vide = tous)
|
|
|
125 |
</td>
|
|
|
126 |
<td>
|
|
|
127 |
<input type=text name="search" value="<?php if (isset($search)) echo $search ;?>" size=25>
|
|
|
128 |
</td>
|
|
|
129 |
</tr>
|
|
|
130 |
<!--<tr>
|
|
|
131 |
<td align=right bgcolor="#d0ddb0">
|
|
|
132 |
Nombre de résultats Max.
|
|
|
133 |
</td>
|
|
|
134 |
<td>
|
|
|
135 |
<input type=text name="max_results" value="<?php echo $max ?>" size=25>
|
|
|
136 |
</td>
|
|
|
137 |
</tr> -->
|
|
|
138 |
</table>
|
|
|
139 |
<br>
|
|
|
140 |
<input type=submit class=button value="Lancer la recherche" OnClick="this.form.find_user.value=1">
|
|
|
141 |
</form>
|
|
|
142 |
<?php
|
|
|
143 |
if (isset($find_user)){
|
|
|
144 |
if ($find_user == 1){ echo $msg ;}}
|
|
|
145 |
?>
|
|
|
146 |
</td></tr>
|
|
|
147 |
</table>
|
|
|
148 |
</td></tr>
|
|
|
149 |
</table>
|
|
|
150 |
</td></tr>
|
|
|
151 |
</TABLE>
|
|
|
152 |
</td></tr>
|
|
|
153 |
</TABLE>
|
|
|
154 |
</body>
|
|
|
155 |
</html>
|