1,7 → 1,7 |
<?php |
# $Id$ |
# |
# index.php for ALCASAR bu Rexy |
# index.php for ALCASAR by Rexy |
# UI & css style by stephane ERARD |
# The contents of this file may be used under the terms of the GNU |
# General Public License Version 2, provided that the above copyright |
89,10 → 89,7 |
$direct_access = False; |
} |
|
|
# If the user is connected : retrieve the 3 last connexions |
if ((isset ($user[4])) && ($user[4] != "0")){ |
|
if ((isset ($user[4])) && ($user[4] != "0")){ # the user is authenticated |
if(isset($_GET['redirect'])) # if user has been warned, we redirect him to his website |
{ |
$redir = "http://".$_GET['url']; |
99,17 → 96,15 |
header("Location: $_GET[url]",TRUE,307); |
exit; |
} |
|
|
if ((is_file("./acc/manager/lib/sql/drivers/mysql/functions.php"))&&(is_file("/etc/freeradius-web/config.php"))){ |
// we retrieve his three last connections |
((is_file("./acc/manager/lib/sql/drivers/mysql/functions.php"))&&(is_file("/etc/freeradius-web/config.php"))){ |
include_once("/etc/freeradius-web/config.php"); |
include_once("./acc/manager/lib/sql/drivers/mysql/functions.php"); |
|
$sql = "SELECT UserName, AcctStartTime, AcctStopTime, acctsessiontime FROM radacct WHERE UserName='$user[5]' ORDER BY AcctStartTime DESC LIMIT 0 , $nb_connection_history"; |
$link = @da_sql_pconnect($config); // on affiche pas les erreurs |
$link = @da_sql_pconnect($config); |
if ($link){ |
$res = @da_sql_query($link,$config,$sql); // on affiche pas les erreurs |
|
$res = @da_sql_query($link,$config,$sql); |
if ($res){ |
$connection_history.= "<ul>"; |
while(($row = @da_sql_fetch_array($res,$config))){ |
122,7 → 117,7 |
} |
} |
} |
else # user not connected |
else # the user isn't authenticated |
{ |
exec("sudo /usr/sbin/ipset list not_auth_yet | grep $remote_ip | wc -l 2>&1", $ipset_not_auth_yet); |
if(!$direct_access && $ipset_not_auth_yet[0] == '0') # it's the first stage of the interception |
428,8 → 423,6 |
$sms_div=''; |
$sms_div_over=''; |
} |
?> |
<?php |
if ($direct_access || $display_menu){ |
echo " <div id=\"box_bienvenue\"> |
$l_welcome |