Subversion Repositories ALCASAR

Rev

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

Rev 2906 Rev 2965
Line 27... Line 27...
27
	}
27
	}
28
}
28
}
29
fclose($file_conf);
29
fclose($file_conf);
30
 
30
 
31
$tmp = explode("/",$conf["PRIVATE_IP"]);
31
$tmp = explode("/",$conf["PRIVATE_IP"]);
32
$intif = $conf["INTIF"];
-
 
33
$private_ip=$tmp[0];
32
$private_ip=$tmp[0];
-
 
33
$intif = $conf["INTIF"];
-
 
34
if ($conf['MULTIWAN'] !== 'Off') {
-
 
35
	exec ('sudo /usr/local/bin/alcasar-list-ip_gw.sh', $list_ip_gw); 
-
 
36
}
34
require('/etc/freeradius-web/config.php');
37
require('/etc/freeradius-web/config.php');
35
# Choice of language
38
# Choice of language
36
$Language = 'en';
39
$Language = 'en';
37
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
40
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
38
	$Langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
41
	$Langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
Line 54... Line 57...
54
	$l_edit_user = "Editer l'utilisateur";
57
	$l_edit_user = "Editer l'utilisateur";
55
	$l_connect = "Autoriser temporairement";
58
	$l_connect = "Autoriser temporairement";
56
	$l_captureon = "Autoriser et capturer";
59
	$l_captureon = "Autoriser et capturer";
57
	$l_captureoff = "Arrêter la capture";
60
	$l_captureoff = "Arrêter la capture";
58
	$l_captureonly_on = "Capturer";
61
	$l_captureonly_on = "Capturer";
-
 
62
	$l_gw = "Routeur";
59
} else if ($Language === 'es') {
63
} else if ($Language === 'es') {
60
	$l_activity = "Actividad en la LAN";
64
	$l_activity = "Actividad en la LAN";
61
	$l_ip_adr = "Dirección IP";
65
	$l_ip_adr = "Dirección IP";
62
	$l_mac_adr = "Dirección MAC";
66
	$l_mac_adr = "Dirección MAC";
63
	$l_unknown = "fabricante desconocido";
67
	$l_unknown = "fabricante desconocido";
Line 72... Line 76...
72
	$l_edit_user = "usuario de edición"; 
76
	$l_edit_user = "usuario de edición"; 
73
	$l_connect = "Permitir temporalmente";
77
	$l_connect = "Permitir temporalmente";
74
	$l_captureon = "Autorizar y capturar";
78
	$l_captureon = "Autorizar y capturar";
75
	$l_captureoff = "Detener la captura";
79
	$l_captureoff = "Detener la captura";
76
	$l_captureonly_on = "Captura";
80
	$l_captureonly_on = "Captura";
-
 
81
	$l_gw = "Router";
77
} else {
82
} else {
78
	$l_activity = "Activity on the consultation LAN";
83
	$l_activity = "Activity on the consultation LAN";
79
	$l_ip_adr = "IP Address";
84
	$l_ip_adr = "IP Address";
80
	$l_mac_adr = "MAC Address";
85
	$l_mac_adr = "MAC Address";
81
	$l_unknown = "fabricant inconnu";
86
	$l_unknown = "fabricant inconnu";
Line 90... Line 95...
90
	$l_edit_user = "Edit user";
95
	$l_edit_user = "Edit user";
91
	$l_connect = "Temporarily authorize";
96
	$l_connect = "Temporarily authorize";
92
	$l_captureon = "Authorize and capture";
97
	$l_captureon = "Authorize and capture";
93
	$l_captureoff = "Stop capture";
98
	$l_captureoff = "Stop capture";
94
	$l_captureonly_on = "Capture";
99
	$l_captureonly_on = "Capture";
-
 
100
	$l_gw = "Router";
95
}
101
}
96
function taille_fichier($fichier)
102
function taille_fichier($fichier)
97
{
103
{
98
	$taille_fichier = filesize($fichier);
104
	$taille_fichier = filesize($fichier);
99
	if ($taille_fichier >= 1073741824){
105
	if ($taille_fichier >= 1073741824){
Line 156... Line 162...
156
			<th>#</th>
162
			<th>#</th>
157
			<th><?= $l_ip_adr ?></th>
163
			<th><?= $l_ip_adr ?></th>
158
			<th><?= $l_mac_adr ?></th>
164
			<th><?= $l_mac_adr ?></th>
159
			<th><?= $l_user ?></th>
165
			<th><?= $l_user ?></th>
160
			<th><?= $l_action ?></th>
166
			<th><?= $l_action ?></th>
161
		</tr>
167
			<?php
-
 
168
			if ($conf['MULTIWAN'] !== 'Off') {
-
 
169
				echo "<th>$l_gw</th>";
162
		<?php
170
			}
-
 
171
		echo "</tr>";
163
		$IoT_capture = $conf["IOT_CAPTURE"];
172
		$IoT_capture = $conf["IOT_CAPTURE"];
164
		$output = array(); $detail = array(); $nb_ligne = 0;
173
		$output = array(); $detail = array(); $nb_ligne = 0;
165
		exec("sudo /sbin/ip link show ".escapeshellarg($intif), $output); // retrieve ALCASAR MAC address
174
		exec("sudo /sbin/ip link show ".escapeshellarg($intif), $output); // retrieve ALCASAR MAC address
166
		$detail = explode (" " , $output[1]);
175
		$detail = explode (" " , $output[1]);
167
		$intif_mac_addr=strtoupper(str_replace(":","-",$detail[5]));
176
		$intif_mac_addr=strtoupper(str_replace(":","-",$detail[5]));
Line 285... Line 294...
285
							}
294
							}
286
					}
295
					}
287
				}
296
				}
288
				echo "</FORM></TD>";
297
				echo "</FORM></TD>";
289
			}
298
			}
-
 
299
			if ($conf['MULTIWAN'] !== 'Off') {
-
 
300
				if ($detail[4] == "1"){ // authenticated equipment
-
 
301
					while (list(,$ligne2) = each($list_ip_gw)){
-
 
302
						$detail2 = explode (" ", $ligne2);
-
 
303
						if ($detail2[0] == $detail[1]){
-
 
304
							echo "<td>$detail2[1]</td>";
-
 
305
							break;}
-
 
306
					}
-
 
307
				}
-
 
308
				else {
-
 
309
					echo "<td> </td>";
-
 
310
				}
-
 
311
			}
290
			unset ($mac_in_ether_file);
312
			unset ($mac_in_ether_file);
291
			echo "</tr>";
313
			echo "</tr>";
292
		}
314
		}
293
		?>
315
		?>
294
	</table>
316
	</table>