9,6 → 9,23 |
<body> |
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0"> |
<? |
#retrieve IP_address of ALCASAR |
$ouvre=fopen("/usr/local/etc/alcasar.conf","r"); |
if ($ouvre){ |
while (!feof ($ouvre)) |
{ |
$tampon = fgets($ouvre, 4096); |
if (strpos($tampon,"=")!==false){ |
$tmp = explode("=",$tampon); |
$conf[$tmp[0]] = $tmp[1]; |
} |
} |
}else{ |
exit("Erreur d'ouverture du fichier ".ALCASAR_ETH1); |
} |
fclose($ouvre); |
$tmp = explode("/",$conf["PRIVATE_IP"]); |
$private_ip=$tmp[0]; |
# Choice of language |
$mac_allowed_list="/usr/local/etc/alcasar-macallowed"; |
$Language = 'en'; |
77,18 → 94,18 |
exec ('sudo /usr/sbin/chilli_query list|sort -k5 -r', $output); |
while (list(,$ligne) = each($output)){ |
$detail = explode (" ", $ligne); |
if (($detail[1] != "0.0.0.0")&&($detail[1] != "1.0.0.0")){ |
if ($detail[1] != $private_ip){ |
$nb_ligne ++; |
echo "<FORM action='".$_SERVER['PHP_SELF']."' method=POST>"; |
echo "<TR>"; |
echo "<TD>"; echo $nb_ligne; echo "</TD>"; |
echo "<TD>"; echo $detail[1]; echo "</TD>"; |
echo "<TD>"; echo $detail[0]; echo "</TD>"; |
echo "<TD>".$nb_ligne."</TD>"; |
echo "<TD>".$detail[1]."</TD>"; |
echo "<TD>".$detail[0]."</TD>"; |
echo "<TD>"; |
# station authorisée |
# authorized equipment |
if ($detail[4] == "1"){ |
# par @MAC |
if ($detail[5] == "-"){ |
# by MAC address |
if ($detail[5] == $detail[0]){ |
echo "$l_mac_allowed"; |
if (is_file ($mac_allowed_list)) # le fichier existe |
{ |
110,7 → 127,7 |
else { echo "$l_error_open_file $mac_allowed_list";} |
echo "</TD><TD> "; |
} |
# par usager authentifié |
# by user |
else { |
echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"Editer l'utilisateur $detail[5]\">$detail[5]</a>"; |
echo "</TD>"; |
121,7 → 138,7 |
echo "<INPUT type=submit value='$l_disconnect'>"; |
} |
} |
# station sans usager connecté |
# equipment without authenticated user |
else { |
echo " "; |
echo "</TD>"; |