Rev 324 | Rev 597 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log
<?php
require('/etc/freeradius-web/config.php');
echo <<<EOM
<html>
<head>
<title>Fermeture des sessions ouvertes pour l'usager : $login</title>
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><th>Gestion des usagers</th></tr>
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1"
height="2"></td></tr>
</TABLE>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=1>
<tr bgcolor="#666666"><td>
<TABLE width="100%" border=0 cellspacing=0 cellpadding=2>
<tr><td valign="middle" align="left">
<center>
<table border=0 width=550 cellpadding=0 cellspacing=0>
<tr valign=top>
<!--<td align=center><img src="images/title2.gif"></td>-->
</tr>
</table>
<table border=0 width=400 cellpadding=0 cellspacing=2>
EOM;
include("../html/user_toolbar.html.php");
print <<<EOM
</table>
<br>
<table border=0 width=540 cellpadding=1 cellspacing=1>
<tr valign=top>
<td width=340></td>
<td bgcolor="black" width=200>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor="#907030" align=right valign=top><th>
<font color="white">Fermeture des sessions ouvertes pour l'usager : $login</font>
</th></tr>
</table>
</td></tr>
<tr bgcolor="black" valign=top><td colspan=2>
<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
<tr><td>
EOM;
if ($clear_sessions == 1)
{
exec ("sudo /usr/local/sbin/alcasar-logout.sh $login");
}
exec ("sudo /usr/sbin/chilli_query list|cut -d\" \" -f5,6|grep $login|grep ^1|wc -l" , $open_sessions);
?>
<form method=post>
<input type=hidden name=login value=<?php print $login ?>>
<input type=hidden name=clear_sessions value="0">
<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
<tr>
<td align=center>
<?
if ($open_sessions[0] == 0)
{
echo "L'usager $login n'a pas de session ouverte";
}
else {
echo "L'usager $login a <i>$open_sessions[0]</i> session(s) ouverte(s)<br><br>";
echo "Êtes-vous certain de vouloir ";
if ($open_sessions == 1) { echo "la"; } else {echo "les"; }
echo " fermer ? ";
echo "<input type=submit class=button value=\"Oui, Fermer\" OnClick=\"this.form.clear_sessions.value=1\">";
}
?>
</form>
</td></tr></table>
</td></tr></table>
</TD></TR></TABLE>
</body>
</html>