Subversion Repositories ALCASAR

Rev

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

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