Subversion Repositories ALCASAR

Rev

Rev 912 | Rev 1805 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

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