Subversion Repositories ALCASAR

Rev

Rev 1827 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1827 Rev 2299
Line 66... Line 66...
66
EOM;
66
EOM;
67
 
67
 
68
if ($clear_sessions == 1)
68
if ($clear_sessions == 1)
69
	{
69
	{
70
# close active sessions
70
# close active sessions
71
	exec ("sudo /usr/local/bin/alcasar-logout.sh $login");
71
	exec("sudo /usr/local/bin/alcasar-logout.sh ".escapeshellarg($login));
72
# delete open accounting sessions
72
# delete open accounting sessions
73
	$now = time();
73
	$now = time();
74
	$today_now = date("Y-m-d H:i:s",$now);
74
	$today_now = date("Y-m-d H:i:s",$now);
75
	$link = da_sql_pconnect($config);
75
	$link = da_sql_pconnect($config);
76
	if ($link)
76
	if ($link)
Line 101... Line 101...
101
else
101
else
102
	echo "<b>Could not connect to SQL database</b><br>\n";
102
	echo "<b>Could not connect to SQL database</b><br>\n";
103
 
103
 
104
# Count of chilli open sessions (for coova-chilli)
104
# Count of chilli open sessions (for coova-chilli)
105
$open_chilli_sessions = 0;
105
$open_chilli_sessions = 0;
106
exec ("sudo /usr/sbin/chilli_query list|cut -d\" \" -f5,6|grep $login|grep ^1|wc -l" , $open_chilli_sessions);
106
exec("sudo /usr/sbin/chilli_query list | cut -d\" \" -f5,6 | grep ".escapeshellarg($login)." | grep ^1 | wc -l" , $open_chilli_sessions);
107
 
107
 
108
?>
108
?>
109
   <form method=post>
109
   <form method=post>
110
      <input type=hidden name=login value=<?php print $login ?>>
110
      <input type=hidden name=login value="<?= $login ?>">
111
      <input type=hidden name=clear_sessions value="0">
111
      <input type=hidden name=clear_sessions value="0">
112
	<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>
113
<tr>
113
<tr>
114
<td align=center>
114
<td align=center>
115
<?
115
<?