Subversion Repositories ALCASAR

Rev

Rev 911 | Rev 925 | 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>
45
<table border=0 width=550 cellpadding=0 cellspacing=0>
46
<tr valign=top>
47
<!--<td align=center><img src="images/title2.gif"></td>-->
48
</tr>
49
</table>
50
 
51
<table border=0 width=400 cellpadding=0 cellspacing=2>
52
EOM;
53
 
54
if ($user_type != 'group')
55
	include("../html/user_toolbar.html.php");
56
else
57
	include("../html/group_toolbar.html.php");
58
 
59
print <<<EOM
60
</table>
61
 
62
<br>
63
<table border=0 width=540 cellpadding=1 cellspacing=1>
64
<tr valign=top>
65
<td width=340></td>
66
<td bgcolor="black" width=200>
67
	<table border=0 width=100% cellpadding=2 cellspacing=0>
68
	<tr bgcolor="#907030" align=right valign=top><th>
911 richard 69
	<font color="white">$util : $login ($cn)</font>&nbsp;
324 richard 70
	</th></tr>
71
	</table>
72
</td></tr>
73
<tr bgcolor="black" valign=top><td colspan=2>
74
	<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
75
	<tr><td>
76
EOM;
77
 
78
if ($delete_user == 1){
79
	if ($user_type != 'group'){
80
		if (is_file("../lib/$config[general_lib_type]/delete_user.php"))
81
			include("../lib/$config[general_lib_type]/delete_user.php");
82
	}
83
	else{
84
		if ($delete_users_of_group == 1){
85
			unset($group_members);
86
			$tmp_group_name=$login;
87
			if (is_file("../lib/$config[general_lib_type]/group_info.php")){
88
				include("../lib/$config[general_lib_type]/group_info.php");
89
			}
90
			foreach ($group_members as $member){
91
				$login=$member;
92
				if (is_file("../lib/$config[general_lib_type]/delete_user.php"))
93
					include("../lib/$config[general_lib_type]/delete_user.php");
94
			}
95
			$login=$tmp_group_name;
96
		}
97
		if (is_file("../lib/$config[general_lib_type]/delete_group.php"))
98
			include("../lib/$config[general_lib_type]/delete_group.php");
99
	}
100
	echo <<<EOM
101
</td></tr>
102
</table>
103
</tr>
104
</table>
105
</body>
106
</html>
107
EOM;
108
	exit();
109
}
110
?>
111
   <form method=post>
112
      <input type=hidden name=login value=<?php print $login ?>>
113
      <input type=hidden name=delete_user value="0">
114
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
115
<tr>
116
<td align=center>
117
<?php
118
if ($user_type == 'group'){
911 richard 119
  echo "$l_group_members_remove : ";
324 richard 120
  echo "<input type=checkbox name=delete_users_of_group value=\"1\">";
121
}
122
echo "<br>";
911 richard 123
echo "$l_are_you_sure <b>$login</b> ? ";
324 richard 124
?>
911 richard 125
	<input type=submit class=button value="<?php echo"$l_yes_remove";?>" OnClick="this.form.delete_user.value=1">
324 richard 126
</form>
127
</td></tr></table></td></tr>
128
</table>
129
</tr>
130
</table>
131
</TD></TR>
132
</TABLE>
133
</td></tr>
134
</TABLE>
135
</body>
136
</html>