Subversion Repositories ALCASAR

Rev

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

Rev 460 Rev 609
Line 8... Line 8...
8
</head>
8
</head>
9
<body>
9
<body>
10
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
10
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
11
<?
11
<?
12
# Choice of language
12
# Choice of language
-
 
13
$mac_allowed_list="/usr/local/etc/alcasar-macallowed";
13
$Language = 'en';
14
$Language = 'en';
14
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
15
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
15
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
16
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
16
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
17
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
17
if($Language == 'fr'){
18
if($Language == 'fr'){
Line 22... Line 23...
22
  $l_mac_allowed = "@MAC autoris&eacute;e";
23
  $l_mac_allowed = "@MAC autoris&eacute;e";
23
  $l_action = "Action";
24
  $l_action = "Action";
24
  $l_dissociate = "Dissocier";
25
  $l_dissociate = "Dissocier";
25
  $l_disconnect = "D&eacute;connecter";
26
  $l_disconnect = "D&eacute;connecter";
26
  $l_refresh = "Cette page est rafraichie toutes les 30 secondes";
27
  $l_refresh = "Cette page est rafraichie toutes les 30 secondes";
-
 
28
  $l_error_open_file = "Erreur d'ouverture du fichier"; 
27
}
29
}
28
else {
30
else {
29
  $l_activity = "Activity on the consultation LAN";
31
  $l_activity = "Activity on the consultation LAN";
30
  $l_ip_adr = "IP Adress";
32
  $l_ip_adr = "IP Adress";
31
  $l_mac_adr = "MAC Adress";
33
  $l_mac_adr = "MAC Adress";
Line 33... Line 35...
33
  $l_mac_allowed = "@MAC allowed";
35
  $l_mac_allowed = "@MAC allowed";
34
  $l_action = "Action";
36
  $l_action = "Action";
35
  $l_dissociate = "Dissociate";
37
  $l_dissociate = "Dissociate";
36
  $l_disconnect = "Disconnect";
38
  $l_disconnect = "Disconnect";
37
  $l_refresh = "This frame is refreshed every 30'";
39
  $l_refresh = "This frame is refreshed every 30'";
-
 
40
  $l_error_open_file = "File open error"; 
38
}
41
}
39
echo "
42
echo "
40
<tr><th>$l_activity</th></tr>
43
<tr><th>$l_activity</th></tr>
41
<tr bgcolor=\"#FFCC66\"><td><img src=\"/images/pix.gif\" width=\"1\"
44
<tr bgcolor=\"#FFCC66\"><td><img src=\"/images/pix.gif\" width=\"1\"
42
height=\"2\"></td></tr>
45
height=\"2\"></td></tr>
Line 83... Line 86...
83
				echo "<TD>";
86
				echo "<TD>";
84
				# station authorisée 
87
				# station authorisée 
85
				if ($detail[4] == "1"){
88
				if ($detail[4] == "1"){
86
				# par @MAC
89
				# par @MAC
87
					if ($detail[5] == "-"){
90
					if ($detail[5] == "-"){
-
 
91
						echo "$l_mac_allowed";
-
 
92
						if (is_file ($mac_allowed_list)) # le fichier existe
-
 
93
							{
-
 
94
							$tab=file($mac_allowed_list);
-
 
95
							if ($tab) # le fichier n'est pas vide
-
 
96
								{
-
 
97
								foreach ($tab as $line)
-
 
98
									{
-
 
99
									$field=explode("#", $line);
-
 
100
									$mac_addr=trim($field[0],"macallowed=");
-
 
101
									if (trim($detail[0]) == trim($mac_addr))
-
 
102
										{
-
 
103
										echo " ( $field[1])";
-
 
104
										break;	
-
 
105
										}
-
 
106
									}
-
 
107
								}
-
 
108
							}
-
 
109
						else { echo "$l_error_open_file $mac_allowed_list";}
88
						echo "$l_mac_allowed</TD><TD>&nbsp;";}
110
						echo "</TD><TD>&nbsp;";
-
 
111
					}
89
				# par usager authentifié
112
				# par usager authentifié
90
					else {
113
					else {
91
						echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"Editer l'utilisateur $detail[5]\">$detail[5]</a>";
114
						echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"Editer l'utilisateur $detail[5]\">$detail[5]</a>";
92
						echo "</TD>";
115
						echo "</TD>";
93
						echo "<TD>";
116
						echo "<TD>";