Subversion Repositories ALCASAR

Rev

Rev 324 | Rev 911 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

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