Location: PHPKode > projects > phpMyPrepaid > phpmyprepaid/www/include/tabs/d.php
<?php
if (isset($_POST['UserName']))  
	$pullUser=$_POST['UserName'];
if (isset($_POST['clear_sessions']))  
	$clear_sessions=$_POST['clear_sessions'];
$open_sessions = 0;

echo "<br>
<table border=2 width=540 bgcolor=\"#666699\"  bordercolordark=#ffffe0 bordercolorlight=#000000  cellpadding=1 cellspacing=1>
<tr bgcolor=\"#666699\" valign=top>
<td class=\"bl\ width=340></td>
<td class=\"bl\  width=200>

<table border=2 width=100%  cellpadding=2 cellspacing=0>
        <tr bgcolor=\"#666699\" align=right valign=top><th>
	<font color=\"white\">Clear open sessions for $pullUser</font>&nbsp;
</th></tr>
</table>
</tr>

<tr  bgcolor=\"#666699\" valign=top>";

   
if ($clear_sessions == 1)
{
  echo "<td  class=\"bl\" colspan=2><table border=2 width=540 cellpadding=12 cellspacing=0 bgcolor=\"#666699\" valign=top>
  <td class=\"bl\">";
  include('../divers/disconnectuser.php');
 echo '</td></td>'; 
  
}
else
{		
  $search ="SELECT COUNT(*) AS counter FROM radacct WHERE username = '$pullUser' AND acctstoptime IS NULL;";
  $result = $oreon->database->database->query($search) or die("Query database error !");
  if ($result)
    {
      if ($row = $oreon->database->database->fetch_array($result))
	$open_sessions = $row['counter'];
    }
  else
    echo "<b>Database query failed: " .die("Query database error !"). "</b><br>\n";
echo "</table>";
}

echo "<form method=post>
<input type=hidden name=login value=$pullUser >
<input type=hidden name=tab value='d'>
<input type=hidden name=clear_sessions value=\"0\">
<table width=540 border=2 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor=\"#666699\" valign=top><tr>
<td  align=center>
User $pullUser;  has <i> $open_sessions; </i> open sessions<br><br>
Are you sure you want to clear all open user sessions?
</td>
</tr>
</table>
<br>
<input type=submit class=button value=\"Yes Clear\" OnClick=\"this.form.clear_sessions.value=1\">
</form>
<br><small>Note : <b><small> Be careful, if you choose the user disconnect feature, the software will try to disconnect the user from chillispot too";
echo "</table></table>";
include('test.php');
include('debugcheck.php');
include('debugreply.php');
?>

Return current item: phpMyPrepaid