Subversion Repositories ALCASAR

Rev

Rev 324 | Rev 912 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

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