Subversion Repositories ALCASAR

Rev

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