Subversion Repositories ALCASAR

Rev

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

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