Subversion Repositories ALCASAR

Rev

Rev 1805 | Rev 2654 | 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
 
2382 tom.houday 52
if ($delete_user != 1) {
53
	if ($user_type != 'group')
54
		include("../html/user_toolbar.html.php");
55
	else
56
		include("../html/group_toolbar.html.php");
57
}
324 richard 58
 
59
print <<<EOM
60
</table>
61
 
62
<br>
925 richard 63
<table border=0 width=620 cellpadding=1 cellspacing=1>
324 richard 64
<tr valign=top>
925 richard 65
<td width=400></td>
66
<td bgcolor="black">
324 richard 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;
1805 clement.si 77
 
324 richard 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{
1805 clement.si 84
		if (isset($delete_users_of_group) && $delete_users_of_group == 1){
324 richard 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>