Subversion Repositories ALCASAR

Compare Revisions

Regard whitespace Rev 2079 → Rev 2080

/web/acc/manager/htdocs/activity.php
98,7 → 98,7
<th>$l_action</th>
</tr>";
$output = array(); $detail = array(); $nb_ligne = 0;
exec ("sudo /sbin/ip link show $intif", $output);
exec ("sudo /sbin/ip link show $intif", $output); // retrieve ALCASAR MAC address
$detail = explode (" " , $output[1]);
$intif_mac_addr=strtoupper(str_replace(":","-",$detail[5]));
unset ($output);unset ($detail);
110,7 → 110,7
echo "<TR>";
echo "<TD>".$nb_ligne."</TD>";
echo "<TD>".$detail[1]."</TD>";
if(file_exists('/usr/share/arp-scan/ieee-oui.txt'))
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);
exec ("grep $oui_id /usr/share/arp-scan/ieee-oui.txt | cut -f2", $mac_manufacturer);
122,14 → 122,17
echo "<TD>$detail[0]</TD>";
}
echo "<TD>";
# authenticated equipment
if ($detail[4] == "1"){
# retrieve user info
if ($detail[4] == "1"){ // authenticated equipment
$login = $detail[5];
//if (is_file("lib/sql/defaults.php")) //retrieve user groups
include("../lib/sql/defaults.php");
unset ($found_users); $search = $login; $search_IN = 'username'; // is user in database ?
if (is_file("../lib/sql/find.php"))
include("../lib/sql/find.php");
if (isset ($found_users)) // user is in database
{
echo "OK - ";
if (is_file("../lib/sql/user_info.php")) //retrieve user info
include("../lib/sql/user_info.php");
}
# The user is an allowed MAC address
if ($detail[5] == $detail[0]){
if ($cn != '-') {echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"$l_edit_user\">$l_mac_allowed ($cn)</a>";}
136,7 → 139,6
else { echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"$l_edit_user\">$l_mac_allowed</a>";}
echo "</TD>";
echo "<TD>";
# Disable temporarily @MAC access
echo "<INPUT type='hidden' name='mac_addr' value='$detail[0]'>";
echo "<INPUT type=submit name='action' value='$l_disconnect'>";