Subversion Repositories ALCASAR

Rev

Rev 911 | Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
324 richard 1
<?php
2
require('/etc/freeradius-web/config.php');
3
if ($type != 'group')
4
	if (is_file("../lib/$config[general_lib_type]/user_info.php"))
5
		include("../lib/$config[general_lib_type]/user_info.php");
6
else
7
	if (is_file("../lib/$config[general_lib_type]/group_info.php"))
8
		include("../lib/$config[general_lib_type]/group_info.php");
9
 
10
$whatis = ($user_type == 'group') ? 'le groupe' : 'l\'usager';
11
$whatisL = ($user_type == 'group') ? 'de groupe' : 'd\'usager';
12
 
13
echo <<<EOM
14
<html>
15
<head>
16
EOM;
17
 
18
if ($user_type != 'group'){
19
	echo "<title>delete user $login ($cn)</title>\n";
20
	$util = "usagers";}
21
else{
22
	echo "<title>delete group $login</title>\n";
23
	$util = "groupes";}
24
 
25
echo <<<EOM
26
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
27
<link rel="stylesheet" href="/css/style.css">
28
</head>
29
<body>
30
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
31
	<tr><th>Gestion des $util</th></tr>
32
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
33
height="2"></td></tr>
34
</TABLE>
35
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
36
	<tr bgcolor="#666666"><td>
37
	<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
38
		<tr><td valign="middle" align="left">
39
<center>
40
<table border=0 width=550 cellpadding=0 cellspacing=0>
41
<tr valign=top>
42
<!--<td align=center><img src="images/title2.gif"></td>-->
43
</tr>
44
</table>
45
 
46
<table border=0 width=400 cellpadding=0 cellspacing=2>
47
EOM;
48
 
49
if ($user_type != 'group')
50
	include("../html/user_toolbar.html.php");
51
else
52
	include("../html/group_toolbar.html.php");
53
 
54
print <<<EOM
55
</table>
56
 
57
<br>
58
<table border=0 width=540 cellpadding=1 cellspacing=1>
59
<tr valign=top>
60
<td width=340></td>
61
<td bgcolor="black" width=200>
62
	<table border=0 width=100% cellpadding=2 cellspacing=0>
63
	<tr bgcolor="#907030" align=right valign=top><th>
64
	<font color="white">Suppression $whatisL</font>&nbsp;
65
	</th></tr>
66
	</table>
67
</td></tr>
68
<tr bgcolor="black" valign=top><td colspan=2>
69
	<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
70
	<tr><td>
71
EOM;
72
 
73
if ($delete_user == 1){
74
	if ($user_type != 'group'){
75
		if (is_file("../lib/$config[general_lib_type]/delete_user.php"))
76
			include("../lib/$config[general_lib_type]/delete_user.php");
77
	}
78
	else{
79
		if ($delete_users_of_group == 1){
80
			unset($group_members);
81
			$tmp_group_name=$login;
82
			if (is_file("../lib/$config[general_lib_type]/group_info.php")){
83
				include("../lib/$config[general_lib_type]/group_info.php");
84
			}
85
			foreach ($group_members as $member){
86
				$login=$member;
87
				if (is_file("../lib/$config[general_lib_type]/delete_user.php"))
88
					include("../lib/$config[general_lib_type]/delete_user.php");
89
			}
90
			$login=$tmp_group_name;
91
		}
92
		if (is_file("../lib/$config[general_lib_type]/delete_group.php"))
93
			include("../lib/$config[general_lib_type]/delete_group.php");
94
	}
95
	echo <<<EOM
96
</td></tr>
97
</table>
98
</tr>
99
</table>
100
</body>
101
</html>
102
EOM;
103
	exit();
104
}
105
?>
106
   <form method=post>
107
      <input type=hidden name=login value=<?php print $login ?>>
108
      <input type=hidden name=delete_user value="0">
109
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
110
<tr>
111
<td align=center>
112
<?php
113
if ($user_type == 'group'){
114
  echo "Suppression automatique des membres du groupe : ";
115
  echo "<input type=checkbox name=delete_users_of_group value=\"1\">";
116
}
117
echo "<br>";
118
echo "Etes-vous certain de vouloir supprimer $whatis $login ? ";
119
?>
120
<input type=submit class=button value="Oui supprimer" OnClick="this.form.delete_user.value=1">
121
</form>
122
</td></tr></table></td></tr>
123
</table>
124
</tr>
125
</table>
126
</TD></TR>
127
</TABLE>
128
</td></tr>
129
</TABLE>
130
</body>
131
</html>