Subversion Repositories ALCASAR

Rev

Rev 2888 | Rev 2965 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2888 Rev 2906
Line 40... Line 40...
40
}
40
}
41
if ($Language === 'fr') {
41
if ($Language === 'fr') {
42
	$l_activity = "Activité sur le réseau de consultation";
42
	$l_activity = "Activité sur le réseau de consultation";
43
	$l_ip_adr = "Adresse IP";
43
	$l_ip_adr = "Adresse IP";
44
	$l_mac_adr = "Adresse MAC";
44
	$l_mac_adr = "Adresse MAC";
-
 
45
	$l_unknown = "manufacturer unknown";
45
	$l_user = "Usager";
46
	$l_user = "Usager";
46
	$l_mac_allowed = "@MAC autorisée";
47
	$l_mac_allowed = "@MAC autorisée";
47
	$l_mac_temporarily_allowed = "@MAC autorisée temporairement";
48
	$l_mac_temporarily_allowed = "@MAC autorisée temporairement";
48
	$l_action = "Action";
49
	$l_action = "Action";
49
	$l_dissociate = "Dissocier @IP";
50
	$l_dissociate = "Dissocier @IP";
Line 56... Line 57...
56
	$l_captureoff = "Arrêter la capture";
57
	$l_captureoff = "Arrêter la capture";
57
	$l_captureonly_on = "Capturer";
58
	$l_captureonly_on = "Capturer";
58
} else if ($Language === 'es') {
59
} else if ($Language === 'es') {
59
	$l_activity = "Actividad en la LAN";
60
	$l_activity = "Actividad en la LAN";
60
	$l_ip_adr = "Dirección IP";
61
	$l_ip_adr = "Dirección IP";
61
	$l_mac_adr = "MAC Adress";
62
	$l_mac_adr = "Dirección MAC";
-
 
63
	$l_unknown = "fabricante desconocido";
62
	$l_user = "Usuario";
64
	$l_user = "Usuario";
63
	$l_mac_allowed = "@MAC autorizada";
65
	$l_mac_allowed = "@MAC autorizada";
64
	$l_mac_temporarily_allowed = "@MAC temporalmente autorizada";
66
	$l_mac_temporarily_allowed = "@MAC temporalmente autorizada";
65
	$l_action = "Acción";
67
	$l_action = "Acción";
66
	$l_dissociate = "Liberar @IP";
68
	$l_dissociate = "Liberar @IP";
Line 72... Line 74...
72
	$l_captureon = "Autorizar y capturar";
74
	$l_captureon = "Autorizar y capturar";
73
	$l_captureoff = "Detener la captura";
75
	$l_captureoff = "Detener la captura";
74
	$l_captureonly_on = "Captura";
76
	$l_captureonly_on = "Captura";
75
} else {
77
} else {
76
	$l_activity = "Activity on the consultation LAN";
78
	$l_activity = "Activity on the consultation LAN";
77
	$l_ip_adr = "IP Adress";
79
	$l_ip_adr = "IP Address";
78
	$l_mac_adr = "MAC Adress";
80
	$l_mac_adr = "MAC Address";
-
 
81
	$l_unknown = "fabricant inconnu";
79
	$l_user = "User";
82
	$l_user = "User";
80
	$l_mac_allowed = "@MAC allowed";
83
	$l_mac_allowed = "@MAC allowed";
81
	$l_mac_temporarily_allowed = "@MAC temporarily allowed";
84
	$l_mac_temporarily_allowed = "@MAC temporarily allowed";
82
	$l_action = "Action";
85
	$l_action = "Action";
83
	$l_dissociate = "Dissociate @IP";
86
	$l_dissociate = "Dissociate @IP";
Line 168... Line 171...
168
			$detail = explode (" ", $ligne);
171
			$detail = explode (" ", $ligne);
169
			$nb_ligne ++;
172
			$nb_ligne ++;
170
			echo "<tr valign=\"middle\">";
173
			echo "<tr valign=\"middle\">";
171
			echo "<td>".$nb_ligne."</td>";
174
			echo "<td>".$nb_ligne."</td>";
172
			echo "<td>".$detail[1]."</td>";
175
			echo "<td>".$detail[1]."</td>";
-
 
176
			echo "<td>$detail[0]";
173
			if(file_exists('/usr/local/share/nmap-mac-prefixes')) // for each device on LAN, retrieve the MAC manufacturer
177
			if(file_exists('/usr/local/share/nmap-mac-prefixes')) // for each device on LAN, retrieve the MAC manufacturer
174
			{
178
			{
175
				$oui_id = substr(str_replace("-","",$detail[0]),0,6);
179
				$oui_id = substr(str_replace("-","",$detail[0]),0,6);
176
				exec ("grep $oui_id /usr/local/share/nmap-mac-prefixes | cut -f2", $mac_manufacturer);
180
				exec ("grep $oui_id /usr/local/share/nmap-mac-prefixes | cut -f2", $mac_manufacturer);
177
				if(! empty($mac_manufacturer[0]))
181
				if(! empty($mac_manufacturer[0])) echo " <font size=\"1\">($mac_manufacturer[0])</font>";
178
				{
-
 
179
				echo "<td>$detail[0] <font size=\"1\">($mac_manufacturer[0])</font>";
182
					else echo " <font size=\"1\">($l_unknown)</font>";
180
				}
-
 
181
				unset($mac_manufacturer);
183
				unset($mac_manufacturer);
182
			}
184
			}
183
			else
-
 
184
			{
-
 
185
				echo "<td>$detail[0]";
-
 
186
			}
-
 
187
			exec ("grep $detail[0] /usr/local/etc/alcasar-ethers-info |cut -d' ' -f3", $mac_in_ether_file);
185
			exec ("grep $detail[0] /usr/local/etc/alcasar-ethers-info |cut -d' ' -f3", $mac_in_ether_file);
188
			if (!empty($mac_in_ether_file[0]))
186
			if (!empty($mac_in_ether_file[0]))
189
			{
187
			{
-
 
188
				$mac_info= ltrim($mac_in_ether_file[0],'#');
190
				echo " - <b>" . ltrim($mac_in_ether_file[0],'#') . "</b>";
189
				if (!empty($mac_info)) echo " - <b>" . ltrim($mac_in_ether_file[0],'#') . "</b>";
191
			}
190
			}
192
			echo "</td><td>";
191
			echo "</td><td>";
193
			if ($detail[4] == "1"){ // authenticated equipment
192
			if ($detail[4] == "1"){ // authenticated equipment
194
				$login = $detail[5];
193
				$login = $detail[5];
195
				unset ($found_users); unset ($cn);
194
				unset ($found_users); unset ($cn);