3,11 → 3,11 |
<head> |
<META HTTP-EQUIV="Refresh" CONTENT="30"> |
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]"> |
<title>État du réseau</title> |
<title>Activity</title> |
<link rel="stylesheet" href="/css/style.css"> |
</head> |
<body> |
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0"> |
<table width="100%" border="0" cellspacing="0" cellpadding="0"> |
<? |
#retrieve IP_address of ALCASAR |
$alcasar_conf_file="/usr/local/etc/alcasar.conf"; |
62,11 → 62,9 |
$l_edit_user = "Edit user"; |
$l_connect = "Temporarily authorize"; |
} |
echo " |
<tr><th>$l_activity</th></tr> |
<tr bgcolor=\"#FFCC66\"><td><img src=\"/images/pix.gif\" width=\"1\" |
height=\"2\"></td></tr> |
</TABLE>"; |
echo "<tr><th>$l_activity</th></tr> |
<tr bgcolor=\"#FFCC66\"><td><img src=\"/images/pix.gif\" width=\"1\" height=\"2\"></td></tr> |
</table>"; |
if (isset($_POST['action'])){ |
switch ($_POST['action']){ |
case "$l_disconnect" : |
84,14 → 82,11 |
} |
} |
?> |
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1> |
<tr><td valign="middle" align="left"> |
<center> |
<? echo "$l_refresh";?> |
<table border=1 width="80%" bordercolordark="#ffffe0" bordercolorlight="#000000" width="100%" cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top> |
<table width="100%" border=1 cellspacing=0 cellpadding=1> |
<tr><td valign="middle" align="center"><? echo "$l_refresh";?><br> |
<table border=1 width="80%" bordercolordark="#ffffe0" bordercolorlight="#000000" cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top> |
<tr bgcolor="#d0ddb0"> |
<? echo " |
<th>#</th> |
<? echo " <th>#</th> |
<th>$l_ip_adr</th> |
<th>$l_mac_adr</th> |
<th>$l_user</th> |
106,10 → 101,9 |
while (list(,$ligne) = each($output)){ |
$detail = explode (" ", $ligne); |
$nb_ligne ++; |
echo "<FORM action='".$_SERVER['PHP_SELF']."' method=POST>"; |
echo "<TR>"; |
echo "<TD>".$nb_ligne."</TD>"; |
echo "<TD>".$detail[1]."</TD>"; |
echo "<tr valign=\"middle\">"; |
echo "<td>".$nb_ligne."</td>"; |
echo "<td>".$detail[1]."</td>"; |
if(file_exists('/usr/share/arp-scan/ieee-oui.txt')) // for each device on LAN, retrieve the MAC manufacturer |
{ |
$oui_id = substr(str_replace("-","",$detail[0]),0,6); |
119,14 → 113,14 |
$mac_manufacturer[0] = "Unknown"; |
} |
|
echo "<TD>$detail[0] ($mac_manufacturer[0])</TD>"; |
echo "<td>$detail[0] ($mac_manufacturer[0])</td>"; |
unset($mac_manufacturer); |
} |
else |
{ |
echo "<TD>$detail[0]</TD>"; |
echo "<td>$detail[0]</td>"; |
} |
echo "<TD>"; |
echo "<td>"; |
if ($detail[4] == "1"){ // authenticated equipment |
$login = $detail[5]; |
unset ($found_users); unset ($cn); |
148,8 → 142,10 |
else { #MAC is temporarily allowed |
echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"$l_edit_user\">$l_mac_temporarily_allowed</a>"; |
echo "</td><td>"; |
echo "<FORM action='".$_SERVER['PHP_SELF']."' method=POST>"; |
echo "<INPUT type='hidden' name='mac_addr' value='$detail[0]'>"; |
echo "<INPUT type=submit name='action' value='$l_disconnect'>"; |
echo "</FORM></TD>"; |
} |
# Disable temporarily @MAC access |
} |
157,37 → 153,34 |
else { |
if ($cn != '-') { echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"$l_edit_user $detail[5]\">$detail[5] ($cn)</a>";} |
else { echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"$l_edit_user $detail[5]\">$detail[5]</a>";} |
echo "</TD>"; |
echo "<TD>"; |
echo "<FORM action='".$_SERVER['PHP_SELF']."' method=POST>"; |
echo "<INPUT type='hidden' name='mac_addr' value='$detail[0]'>"; |
echo "<INPUT type=submit name='action' value='$l_disconnect'>"; |
echo "</FORM></TD>"; |
} |
} |
# equipment without authenticated user |
else if (($detail[0] == $intif_mac_addr) || ($detail[1] == $private_ip)){ |
echo "ALCASAR system"; |
echo "</TD>"; |
echo "<TD>"; |
echo " "; |
echo "</TD>"; |
} |
else { |
echo " "; |
echo "</TD>"; |
echo "<TD>"; |
|
echo "<FORM action='".$_SERVER['PHP_SELF']."' method=POST>"; |
# Dissociate user (... or other) who is not connected yet |
echo "<INPUT type='hidden' name='mac_addr' value='$detail[0]'>"; |
echo "<INPUT type='submit' name='action' value='$l_dissociate'>"; |
|
# Enable temporarily @MAC access |
echo "<INPUT type=submit name='action' value='$l_connect'>"; |
|
echo "</FORM></TD>"; |
} |
|
echo "</TR></FORM>"; |
echo "</tr>"; |
} |
?> |
</td></tr> |
</table> |
</td></tr> |
</table> |