Subversion Repositories ALCASAR

Rev

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

Rev 2128 Rev 2129
Line 33... Line 33...
33
$Language = 'en';
33
$Language = 'en';
34
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
34
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
35
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
35
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
36
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
36
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
37
if($Language == 'fr'){
37
if($Language == 'fr'){
38
  $l_activity = "Activité; sur le réseau de consultation";
38
  $l_activity = "Activité sur le réseau de consultation";
39
  $l_ip_adr = "Adresse IP";
39
  $l_ip_adr = "Adresse IP";
40
  $l_mac_adr = "Adresse MAC";
40
  $l_mac_adr = "Adresse MAC";
41
  $l_user = "Usager";
41
  $l_user = "Usager";
42
  $l_mac_allowed = "@MAC autorisée";
42
  $l_mac_allowed = "@MAC autorisée";
-
 
43
  $l_mac_temporarily_allowed = "@MAC autorisée temporairement";
43
  $l_action = "Action";
44
  $l_action = "Action";
44
  $l_dissociate = "Dissocier";
45
  $l_dissociate = "Dissocier @IP";
45
  $l_disconnect = "Déconnecter";
46
  $l_disconnect = "Déconnecter";
46
  $l_refresh = "Cette page est rafraichie toutes les 30 secondes";
47
  $l_refresh = "Cette page est rafraichie toutes les 30 secondes";
47
  $l_edit_user = "Editer l'utilisateur"; 
48
  $l_edit_user = "Editer l'utilisateur"; 
48
  $l_mac_action = "Action temporaire";
-
 
49
  $l_connect = "Autoriser";
49
  $l_connect = "Autoriser temporairement";
50
}
50
}
51
else {
51
else {
52
  $l_activity = "Activity on the consultation LAN";
52
  $l_activity = "Activity on the consultation LAN";
53
  $l_ip_adr = "IP Adress";
53
  $l_ip_adr = "IP Adress";
54
  $l_mac_adr = "MAC Adress";
54
  $l_mac_adr = "MAC Adress";
55
  $l_user = "User";
55
  $l_user = "User";
56
  $l_mac_allowed = "@MAC allowed";
56
  $l_mac_allowed = "@MAC allowed";
-
 
57
  $l_mac_temporarily_allowed = "@MAC temporarily allowed";
57
  $l_action = "Action";
58
  $l_action = "Action";
58
  $l_dissociate = "Dissociate";
59
  $l_dissociate = "Dissociate @IP";
59
  $l_disconnect = "Disconnect";
60
  $l_disconnect = "Disconnect";
60
  $l_refresh = "This frame is refreshed every 30'";
61
  $l_refresh = "This frame is refreshed every 30'";
61
  $l_edit_user = "Edit user"; 
62
  $l_edit_user = "Edit user"; 
62
  $l_mac_action = "Temporarily Action";
63
  $l_connect = "Temporarily authorize";
63
  $l_connect = "Authorize";
-
 
64
}
64
}
65
echo "
65
echo "
66
<tr><th>$l_activity</th></tr>
66
<tr><th>$l_activity</th></tr>
67
<tr bgcolor=\"#FFCC66\"><td><img src=\"/images/pix.gif\" width=\"1\"
67
<tr bgcolor=\"#FFCC66\"><td><img src=\"/images/pix.gif\" width=\"1\"
68
height=\"2\"></td></tr>
68
height=\"2\"></td></tr>
Line 133... Line 133...
133
				$search = $login; $search_IN = 'username'; // is user in database ?
133
				$search = $login; $search_IN = 'username'; // is user in database ?
134
				if (is_file("../lib/sql/find.php"))
134
				if (is_file("../lib/sql/find.php"))
135
					include("../lib/sql/find.php");
135
					include("../lib/sql/find.php");
136
				if (isset ($found_users)) // user is in database
136
				if (isset ($found_users)) // user is in database
137
				{
137
				{
138
					echo "OK - ";
-
 
139
					if (is_file("../lib/sql/user_info.php")) //retrieve user info (especialy $cn)
138
					if (is_file("../lib/sql/user_info.php")) //retrieve user info (especialy $cn)
140
						include("../lib/sql/user_info.php");
139
						include("../lib/sql/user_info.php");
141
				}
140
				}
142
				if (! isset ($cn)){ $cn='-';}
141
				if (! isset ($cn)){ $cn='-';}
143
				# The user is an allowed MAC address
142
				# The user is an allowed MAC address
144
					if ($detail[5] == $detail[0]){
143
					if ($detail[5] == $detail[0]){
145
						if (isset ($found_users)) { #MAC is in database
144
						if (isset ($found_users)) { #MAC is in database
146
							echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"$l_edit_user\">$l_mac_allowed";if ($cn != '-'){ echo "($cn)";};echo "</a>";
145
							echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"$l_edit_user\">$l_mac_allowed";if ($cn != '-'){ echo " ($cn)";};echo "</a>";
-
 
146
							echo "</td><td>";
147
						}
147
						}
148
						else { #MAC is temporarly allowed
148
						else { #MAC is temporarily allowed
149
							echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"$l_edit_user\">$l_mac_temporarly_allowed</a>";
149
							echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"$l_edit_user\">$l_mac_temporarily_allowed</a>";
-
 
150
							echo "</td><td>";
-
 
151
							echo "<INPUT type='hidden' name='mac_addr' value='$detail[0]'>";
-
 
152
							echo "<INPUT type=submit name='action' value='$l_disconnect'>";
150
						}
153
						}
151
						echo "</TD>";
-
 
152
						echo "<TD>";
-
 
153
						# Disable temporarily @MAC access
154
						# Disable temporarily @MAC access
154
						echo "<INPUT type='hidden' name='mac_addr' value='$detail[0]'>";
-
 
155
						echo "<INPUT type=submit name='action' value='$l_disconnect'>";
-
 
156
						}
155
					}
157
				# The user is a humanoide ;-)
156
				# The user is a humanoide ;-)
158
					else {
157
					else {
159
						if ($cn != '-') { echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"$l_edit_user $detail[5]\">$detail[5] ($cn)</a>";}
158
						if ($cn != '-') { echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"$l_edit_user $detail[5]\">$detail[5] ($cn)</a>";}
160
						else { echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"$l_edit_user $detail[5]\">$detail[5]</a>";}
159
						else { echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"$l_edit_user $detail[5]\">$detail[5]</a>";}
161
						echo "</TD>";
160
						echo "</TD>";