Rev 685 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log
<?php
require('/etc/freeradius-web/config.php');
if (isset($search_IN)) $selected[$search_IN] = 'selected';
if (isset ($radius_attr)) $selected[$radius_attr] = 'selected';
if (isset ($max_results)){ $max = ($max_results) ? $max_results : 40;}
?>
<html>
<head>
<title>Gestion des usager</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $config['general_charset']?>">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>Gestion des usagers</th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<center>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=200>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white">Filtre de recherche</font>
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
<?php
if (isset($find_user)){
if ($find_user == 1){
unset($found_users);
if (is_file("../lib/$config[general_lib_type]/find.php"))
include("../lib/$config[general_lib_type]/find.php");
if (isset($found_users)){
$num = 0;
$msg .= <<<EOM
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr bgcolor="#d0ddb0">
<th>#</th><th>Usager</th><th>Actions</th>
</tr>
EOM;
foreach ($found_users as $user){
if ($user == '')
$user = '-';
$User = urlencode($user);
$num++;
$msg .= <<<EOM
<tr align=center>
<td>$num</td>
<td>$user</td>
<td><a href="user_admin.php?login=$User" title="État"><img src=/images/info.gif></a>
<a href="user_edit.php?login=$User" title="Attributs"><img src=/images/create.gif></a>
<a href="user_info.php?login=$User" title="Informations personnelles"><img src=/images/tpf.gif></a>
<a href="user_accounting.php?login=$User" title="Connexions effectuées"><img src=/images/graph.gif></a>
<a href="clear_opensessions.php?login=$User" title="Sessions ouvertes"><img src=/images/state_ok.gif></a>
<a href="user_delete.php?login=$User" title="Supprimer"><img src=/images/state_error.gif></a></td>
</tr>
EOM;
}
$msg .= "</table>\n";
}
else
$msg = "<b>Pas d'usagers trouvés</b><br>\n";
}
}
?>
<form method=post>
<input type=hidden name=find_user value="0">
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr>
<td align=right bgcolor="#d0ddb0">
Critère de recherche
</td>
<td>
<?php
echo <<<EOM
<select name="search_IN" editable onChange="this.form.submit();">
<option $selected[username] value="username">Identifiant (login)
<option $selected[name] value="name">Nom complet (NOM Prenom)
<option $selected[department] value="department">Service
<option $selected[radius] value="radius">Attribut particulier
EOM;
?>
</select>
</td>
</tr>
<?php
if (isset($search_IN)){
if ($search_IN == 'radius'){
require('../lib/attrshow.php');
echo <<<EOM
<tr>
<td align=right bgcolor="#d0ddb0">
Attributs RADIUS
</td>
<td>
<select name="radius_attr" editable>
EOM;
foreach($show_attrs as $key => $desc)
echo "<option $selected[$key] value=\"$key\">$desc\n";
echo <<<EOM
</select>
</td>
</tr>
EOM;
}
}
?>
<tr>
<td align=right bgcolor="#d0ddb0">
qui contient<BR>
(champ vide = tous)
</td>
<td>
<input type=text name="search" value="<?php if (isset($search)) echo $search ;?>" size=25>
</td>
</tr>
<!--<tr>
<td align=right bgcolor="#d0ddb0">
Nombre de résultats Max.
</td>
<td>
<input type=text name="max_results" value="<?php echo $max ?>" size=25>
</td>
</tr> -->
</table>
<br>
<input type=submit class=button value="Lancer la recherche" OnClick="this.form.find_user.value=1">
</form>
<?php
if (isset($find_user)){
if ($find_user == 1){ echo $msg ;}}
?>
</td></tr>
</table>
</td></tr>
</table>
</td></tr>
</TABLE>
</td></tr>
</TABLE>
</body>
</html>