Subversion Repositories ALCASAR

Rev

Rev 324 | Rev 597 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
324 richard 1
<?php
2
require('/etc/freeradius-web/config.php');
3
echo <<<EOM
4
<html>
5
<head>
6
<title>Fermeture des sessions ouvertes pour l'usager : $login</title>
7
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
8
<link rel="stylesheet" href="/css/style.css">
9
</head>
10
<body>
11
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
12
	<tr><th>Gestion des usagers</th></tr>
13
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" 
14
height="2"></td></tr>
15
</TABLE>
16
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
17
	<tr bgcolor="#666666"><td>
18
	<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
19
		<tr><td valign="middle" align="left">
20
<center>
21
<table border=0 width=550 cellpadding=0 cellspacing=0>
22
<tr valign=top>
23
<!--<td align=center><img src="images/title2.gif"></td>-->
24
</tr>
25
</table>
26
 
27
<table border=0 width=400 cellpadding=0 cellspacing=2>
28
EOM;
29
 
30
include("../html/user_toolbar.html.php");
31
 
32
print <<<EOM
33
</table>
34
 
35
<br>
36
<table border=0 width=540 cellpadding=1 cellspacing=1>
37
<tr valign=top>
38
<td width=340></td>
39
<td bgcolor="black" width=200>
40
	<table border=0 width=100% cellpadding=2 cellspacing=0>
41
	<tr bgcolor="#907030" align=right valign=top><th>
42
	<font color="white">Fermeture des sessions ouvertes pour l'usager : $login</font>&nbsp;
43
	</th></tr>
44
	</table>
45
</td></tr>
46
<tr bgcolor="black" valign=top><td colspan=2>
47
	<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
48
	<tr><td>
49
EOM;
50
if ($clear_sessions == 1)
51
	{
52
	exec ("sudo /usr/local/sbin/alcasar-logout.sh $login");
53
	}
580 richard 54
exec ("sudo /usr/sbin/chilli_query list|cut -d\" \" -f5,6|grep $login|grep ^1|wc -l" , $open_sessions);
324 richard 55
?>
56
   <form method=post>
57
      <input type=hidden name=login value=<?php print $login ?>>
58
      <input type=hidden name=clear_sessions value="0">
59
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
60
<tr>
61
<td align=center>
62
<?
580 richard 63
if ($open_sessions[0] == 0)
324 richard 64
	{
65
	echo "L'usager $login n'a pas de session ouverte";
66
	}
67
else	{
580 richard 68
	echo "L'usager $login a <i>$open_sessions[0]</i> session(s) ouverte(s)<br><br>";
324 richard 69
	echo "&Ecirc;tes-vous certain de vouloir ";
70
	if ($open_sessions == 1) { echo "la"; } else {echo "les"; }
71
	echo " fermer ? ";
72
	echo "<input type=submit class=button value=\"Oui, Fermer\" OnClick=\"this.form.clear_sessions.value=1\">";
73
	}
74
?>
75
</form>
76
</td></tr></table>
77
</td></tr></table>
78
</TD></TR></TABLE>
79
</body>
80
</html>