Subversion Repositories ALCASAR

Rev

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

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