Subversion Repositories ALCASAR

Rev

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