Line 1... |
Line 1... |
1 |
<?php
|
1 |
<?php
|
2 |
# $Id: index.php 1989 2016-07-14 13:38:53Z raphael.pion $
|
2 |
# $Id: index.php 1992 2016-07-15 16:10:59Z richard $
|
3 |
#
|
3 |
#
|
4 |
# index.php for ALCASAR
|
4 |
# index.php for ALCASAR bu Rexy
|
5 |
# by REXY
|
- |
|
6 |
# UI & css style by stephane ERARD
|
5 |
# UI & css style by stephane ERARD
|
7 |
# The contents of this file may be used under the terms of the GNU
|
6 |
# The contents of this file may be used under the terms of the GNU
|
8 |
# General Public License Version 2, provided that the above copyright
|
7 |
# General Public License Version 2, provided that the above copyright
|
9 |
# notice and this permission notice is included in all copies or
|
8 |
# notice and this permission notice is included in all copies or
|
10 |
# substantial portions of the software.
|
9 |
# substantial portions of the software.
|
Line 46... |
Line 45... |
46 |
$domainname = trim($conf["DOMAIN"]);
|
45 |
$domainname = trim($conf["DOMAIN"]);
|
47 |
$hostname = "alcasar.".$domainname;
|
46 |
$hostname = "alcasar.".$domainname;
|
48 |
$network_pb = False;
|
47 |
$network_pb = False;
|
49 |
$cert_add = "http://$hostname/certs";
|
48 |
$cert_add = "http://$hostname/certs";
|
50 |
$direct_access = False;
|
49 |
$direct_access = False;
|
51 |
$display_button_user_not_auth_yet=False;
|
50 |
$display_menu=False;
|
52 |
$diagnostic = "can't contact the default router";
|
51 |
$diagnostic = "can't contact the default router";
|
53 |
$remote_ip = preg_match('#^([0-9]{1,3}\.){3}[0-9]{1,3}$#', $_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : "";
|
52 |
$remote_ip = preg_match('#^([0-9]{1,3}\.){3}[0-9]{1,3}$#', $_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : "";
|
54 |
$tab = array();$user = array();
|
53 |
$tab = array();$user = array();
|
55 |
$connection_history = "";
|
54 |
$connection_history = "";
|
56 |
$nb_connection_history = 3;
|
55 |
$nb_connection_history = 3;
|
- |
|
56 |
$Language = 'en';
|
- |
|
57 |
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
|
- |
|
58 |
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
- |
|
59 |
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
|
- |
|
60 |
$redirect_link = "http://www.alcasar.net";
|
57 |
|
61 |
|
58 |
# Retrieve the user info behind the remote ip
|
62 |
# Retrieve the user info behind the remote ip
|
59 |
exec ("sudo /usr/sbin/chilli_query list|grep $remote_ip" , $tab);
|
63 |
exec ("sudo /usr/sbin/chilli_query list|grep $remote_ip" , $tab);
|
60 |
$user = explode (" ", $tab[0]);
|
64 |
$user = explode (" ", $tab[0]);
|
61 |
|
65 |
|
62 |
# cleaning the cache
|
- |
|
63 |
header("Expires: Tue, 01 Jan 2000 00:00:00 GMT");
|
- |
|
64 |
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
- |
|
65 |
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
|
- |
|
66 |
header("Cache-Control: post-check=0, pre-check=0", false);
|
- |
|
67 |
header("Pragma: no-cache");
|
- |
|
68 |
|
- |
|
69 |
|
66 |
|
70 |
# Test if it'a direct connexion to ALCASAR
|
67 |
# Test if it's a direct connexion to ALCASAR
|
71 |
if (isset($_SERVER['HTTP_HOST']) && (($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_ADDR']) || preg_match ("/^alcasar$/", $_SERVER['HTTP_HOST']) || preg_match ("/^$hostname$/", $_SERVER['HTTP_HOST']) || preg_match ("/^$organisme$/", $_SERVER['HTTP_HOST'])))
|
68 |
if ((isset($_SERVER['HTTP_HOST'])) && (($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_ADDR']) || (preg_match ("/^alcasar$/", $_SERVER['HTTP_HOST'])) || (preg_match ("/^$hostname$/", $_SERVER['HTTP_HOST'])) || (preg_match ("/^$organisme$/", $_SERVER['HTTP_HOST']))))
|
72 |
{
|
69 |
{
|
- |
|
70 |
echo $_SERVER['HTTP_HOST']." / ".$_SERVER['SERVER_ADDR']." / ".$hostname." / ".$organisme;
|
73 |
$direct_access=True;
|
71 |
$direct_access=True;
|
- |
|
72 |
exec("sudo /usr/sbin/ipset del not_auth_yet $remote_ip"); # del user of the ipset "not_auth_yet" to not loop
|
74 |
}
|
73 |
}
|
75 |
# Function to adapt time connexion in seconds to H,M,S
|
74 |
# Function to adapt time connexion in seconds to H,M,S
|
76 |
function secondsToDuration($seconds = null){
|
75 |
function secondsToDuration($seconds = null){
|
77 |
if ($seconds == null) return "";
|
76 |
if ($seconds == null) return "";
|
78 |
|
- |
|
79 |
$temp = $seconds % 3600;
|
77 |
$temp = $seconds % 3600;
|
80 |
$time[0] = ( $seconds - $temp ) / 3600 ; // hours
|
78 |
$time[0] = ( $seconds - $temp ) / 3600 ; // hours
|
81 |
$time[2] = $temp % 60 ; // seconds
|
79 |
$time[2] = $temp % 60 ; // seconds
|
82 |
$time[1] = ( $temp - $time[2] ) / 60; // minutes
|
80 |
$time[1] = ( $temp - $time[2] ) / 60; // minutes
|
83 |
|
- |
|
84 |
return $time[0]." h ".$time[1]." m ".$time[2]." s";
|
81 |
return $time[0]." h ".$time[1]." m ".$time[2]." s";
|
85 |
}
|
82 |
}
|
86 |
|
83 |
|
87 |
# If the user is connected : retrieve the 3 last connexions
|
84 |
# If the user is connected : retrieve the 3 last connexions
|
88 |
if ((isset ($user[4])) && ($user[4] != "0")){
|
85 |
if ((isset ($user[4])) && ($user[4] != "0")){
|
Line 104... |
Line 101... |
104 |
$connection_history.="</ul>";
|
101 |
$connection_history.="</ul>";
|
105 |
}
|
102 |
}
|
106 |
}
|
103 |
}
|
107 |
}
|
104 |
}
|
108 |
}
|
105 |
}
|
109 |
else
|
106 |
else # user not connected
|
110 |
{
|
107 |
{
|
111 |
# the user isn't connected and he isn't in the ipset "not_auth_yet" yet
|
- |
|
112 |
exec("sudo /usr/sbin/ipset list not_auth_yet | grep $remote_ip | wc -l 2>&1", $ipset_not_auth_yet);
|
108 |
exec("sudo /usr/sbin/ipset list not_auth_yet | grep $remote_ip | wc -l 2>&1", $ipset_not_auth_yet);
|
113 |
if(!$direct_access && $ipset_not_auth_yet[0] == '0')
|
109 |
if(!$direct_access && $ipset_not_auth_yet[0] == '0') # it's an interception
|
114 |
{
|
110 |
{
|
115 |
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") # if HTTPS, we redirect user to HTTP to flag him (ipset : not_auth_yet)
|
111 |
$display_menu = True; # Display menu for user not_auth_yet
|
116 |
{
|
- |
|
117 |
header("Location: http://$_SERVER[HTTP_HOST]");
|
112 |
$redirect_link = $_SERVER['HTTP_HOST'];
|
118 |
exit;
|
- |
|
119 |
}
|
- |
|
120 |
|
- |
|
121 |
$display_button_user_not_auth_yet=True; # Display menu for user not_auth_yet, he need to click on 'open connection' to be flagged in the ipset "not_auth_yet"
|
- |
|
122 |
}
|
113 |
}
|
123 |
if(isset($_GET['url'])) #When user clicked to open a connection ...
|
114 |
if(isset($_GET['url'])) # When user has clicked to open a connection ...
|
124 |
{
|
115 |
{
|
125 |
exec("sudo /usr/sbin/ipset add not_auth_yet $remote_ip"); # Add user in the ipset "not_auth_yet" to not loop when redirected
|
116 |
exec("sudo /usr/sbin/ipset add not_auth_yet $remote_ip"); # Add user in the ipset "not_auth_yet" (DNS requests not intercepted)
|
126 |
echo "<script>window.location.href='http://$_GET[url]'</script>"; #we redirect him to his HTTP website (to be intecepted by coova)
|
117 |
#header('Location: http://www.alcasar.net',TRUE,307);
|
- |
|
118 |
header("Location: $redirect_link");
|
127 |
exit;
|
119 |
exit;
|
128 |
|
- |
|
129 |
}
|
- |
|
130 |
if ((!$direct_access && !$display_button_user_not_auth_yet) || $ipset_not_auth_yet[0] == '1'){ #if user not_auth_yet still here (index.php), we force DNS resquest.
|
- |
|
131 |
echo "<script>window.location.reload(true)</script>"; #We force DNS request
|
- |
|
132 |
}
|
120 |
}
|
133 |
|
- |
|
134 |
|
- |
|
135 |
/* ANCIEN FONCTIONNEMENT : l'utilisateur ne cliquait pas sur le boutton pour etre flaggué + pas d'access au menu index.php avec les boutons
|
- |
|
136 |
# the user isn't connected and he isn't in the ipset "not_auth_yet" yet
|
- |
|
137 |
exec("sudo /usr/sbin/ipset list not_auth_yet | grep $remote_ip | wc -l 2>&1", $ipset_not_auth_yet);
|
- |
|
138 |
if(!$direct_access && $ipset_not_auth_yet[0] == '0')
|
- |
|
139 |
{
|
- |
|
140 |
exec("sudo /usr/sbin/ipset add not_auth_yet $remote_ip"); # Add in the ipset "not_auth_yet" to not loop when redirected
|
121 |
if ($ipset_not_auth_yet[0] == '1'){ #if user not_auth_yet still here (index.php), we force DNS resquest.
|
141 |
|
- |
|
142 |
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on")
|
- |
|
143 |
{
|
- |
|
144 |
header("Location: http://$_SERVER[HTTP_HOST]");
|
- |
|
145 |
}
|
- |
|
146 |
else
|
- |
|
147 |
{
|
- |
|
148 |
echo "<script>window.location.reload(true)</script>"; # the user web browser need to perform a new DNS request when redirected (as in a "<CTRL>+F5")
|
- |
|
149 |
echo "<script>window.location.href='http://$_SERVER[HTTP_HOST]'</script>";
|
- |
|
150 |
}
|
- |
|
151 |
exit;
|
- |
|
152 |
}
|
- |
|
153 |
if(!$direct_access) #If user is already in not_auth_yet
|
- |
|
154 |
{
|
- |
|
155 |
echo "<script>window.location.reload(true)</script>"; #We force DNS request
|
122 |
echo "<script>window.location.reload(true)</script>"; # force DNS request
|
156 |
exit;
|
- |
|
157 |
}*/
|
- |
|
158 |
|
- |
|
159 |
|
- |
|
160 |
|
123 |
}
|
161 |
}
|
124 |
}
|
162 |
# Choice of language
|
125 |
# Choice of language
|
163 |
$Language = 'en';
|
- |
|
164 |
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
|
- |
|
165 |
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
- |
|
166 |
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
|
- |
|
167 |
if($Language == 'fr'){
|
126 |
if($Language == 'fr'){
|
168 |
$l_access_denied = "ACCÈS REFUSÉ";
|
127 |
$l_access_denied = "Contrôle d'accès";
|
169 |
$l_access_welcome = "Bienvenue sur ALCASAR";
|
128 |
$l_access_welcome = "Bienvenue sur ALCASAR";
|
170 |
$l_access_unavailable = "ACCÈS INDISPONIBLE";
|
129 |
$l_access_unavailable = "ACCÈS INDISPONIBLE";
|
171 |
$l_required_domain = "Site WEB demandé";
|
130 |
$l_required_domain = "Site WEB demandé";
|
172 |
$l_explain_acc_access = "Le centre de gestion permet d'administrer le portail. Vous devez posséder un compte d'administration ou de gestion pour y accéder.";
|
131 |
$l_explain_acc_access = "Le centre de gestion permet d'administrer le portail. Vous devez posséder un compte d'administration ou de gestion pour y accéder.";
|
173 |
$l_explain_access_deny = "Vous tentez d'accéder à une ressource dont le contenu est réputé contenir des informations inappropriées.";
|
132 |
$l_explain_access_deny = "Vous tentez d'accéder à une ressource dont le contenu est réputé contenir des informations inappropriées.";
|
Line 181... |
Line 140... |
181 |
$l_certif_explain = "Permet l'échange de données sécurisées entre votre station de consultation et le portail captif ALCASAR.<BR>Si ce certificat n'est pas enregistré sur votre station de consultation, il est possible que des alertes de sécurités soient émises par votre navigateur.<br><br>";
|
140 |
$l_certif_explain = "Permet l'échange de données sécurisées entre votre station de consultation et le portail captif ALCASAR.<BR>Si ce certificat n'est pas enregistré sur votre station de consultation, il est possible que des alertes de sécurités soient émises par votre navigateur.<br><br>";
|
182 |
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Aide complémentaire</a>";
|
141 |
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Aide complémentaire</a>";
|
183 |
$l_category = "catégorie :";
|
142 |
$l_category = "catégorie :";
|
184 |
if ((isset ($user[4])) && ($user[4] == "0")) {
|
143 |
if ((isset ($user[4])) && ($user[4] == "0")) {
|
185 |
$l_logout_explain = "Aucune session de consultation Internet n'est actuellement ouverte sur votre système.";
|
144 |
$l_logout_explain = "Aucune session de consultation Internet n'est actuellement ouverte sur votre système.";
|
186 |
|
- |
|
187 |
if($display_button_user_not_auth_yet)
|
- |
|
188 |
{
|
- |
|
189 |
$l_logout = "<a href=\"http://alcasar/index.php?url=$_SERVER[HTTP_HOST]\">Ouvrir une session Internet</a>";
|
145 |
$l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">Ouvrir une session Internet</a>";
|
190 |
}
|
- |
|
191 |
else
|
- |
|
192 |
{
|
- |
|
193 |
$l_logout = "<a href=\"http://www.google.com\">Ouvrir une session Internet</a>";
|
- |
|
194 |
}
|
- |
|
195 |
|
- |
|
196 |
|
- |
|
197 |
}
|
146 |
}
|
198 |
else {
|
147 |
else {
|
199 |
if ($user[5] != $user[0]) // authentication exception or not
|
148 |
if ($user[5] != $user[0]) // authentication exception or not
|
200 |
{
|
149 |
{
|
201 |
$l_logout_explain = "Ferme la session de l'usager actuellement connecté. <br><br>Utilisateur connecté : <a href=\"http://$hostname:3990/logoff\" title=\"Deconnecter l'utilisateur $user[5]\"><b>$user[5]</b></a><br><br>$nb_connection_history dernières connexions :$connection_history";
|
150 |
$l_logout_explain = "Ferme la session de l'usager actuellement connecté. <br><br>Utilisateur connecté : <a href=\"http://$hostname:3990/logoff\" title=\"Deconnecter l'utilisateur $user[5]\"><b>$user[5]</b></a><br><br>$nb_connection_history dernières connexions :$connection_history";
|
Line 214... |
Line 163... |
214 |
$l_service_sms = "Service SMS actif";
|
163 |
$l_service_sms = "Service SMS actif";
|
215 |
$l_service_sms_n = "Service SMS non actif";
|
164 |
$l_service_sms_n = "Service SMS non actif";
|
216 |
$l_acc_sms = "Auto enregistrement par SMS";
|
165 |
$l_acc_sms = "Auto enregistrement par SMS";
|
217 |
}
|
166 |
}
|
218 |
else if($Language == 'pt'){
|
167 |
else if($Language == 'pt'){
|
219 |
$l_access_denied = "Acesso negado";
|
168 |
$l_access_denied = "Controle de acesso";
|
220 |
$l_access_welcome = "Bem-vindo ao Alcasar";
|
169 |
$l_access_welcome = "Bem-vindo ao Alcasar";
|
221 |
$l_access_unavailable = "ACESSO INDISPONÍVEL";
|
170 |
$l_access_unavailable = "ACESSO INDISPONÍVEL";
|
222 |
$l_required_domain = "Site WEB Obrigatório";
|
171 |
$l_required_domain = "Site WEB Obrigatório";
|
223 |
$l_explain_acc_access = "Este é o centro de controle do portal para acessar você deve ter uma conta administrativa valida.";
|
172 |
$l_explain_acc_access = "Este é o centro de controle do portal para acessar você deve ter uma conta administrativa valida.";
|
224 |
$l_explain_access_deny = "Você tenta se conectar a um recurso cujo conteúdo é considerado inadequado no conteúdo de informações.";
|
173 |
$l_explain_access_deny = "Você tenta se conectar a um recurso cujo conteúdo é considerado inadequado no conteúdo de informações.";
|
Line 231... |
Line 180... |
231 |
$l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Instalar Certificado Alcasar AC</a>";
|
180 |
$l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Instalar Certificado Alcasar AC</a>";
|
232 |
$l_certif_explain = "O certificado Permiti a troca de dados seguro entre seu computador e o portal Alcasar.<BR>Se este certificado não estiver incorporado no seu computador, alguns alertas de segurança deverá aparecer no navegador.<br><br>";
|
181 |
$l_certif_explain = "O certificado Permiti a troca de dados seguro entre seu computador e o portal Alcasar.<BR>Se este certificado não estiver incorporado no seu computador, alguns alertas de segurança deverá aparecer no navegador.<br><br>";
|
233 |
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Essa foi uma ajuda complementar</a>";
|
182 |
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Essa foi uma ajuda complementar</a>";
|
234 |
$l_category = "categoria :";
|
183 |
$l_category = "categoria :";
|
235 |
if ((isset ($user[4])) && ($user[4] == "0")) {
|
184 |
if ((isset ($user[4])) && ($user[4] == "0")) {
|
236 |
$l_logout_explain = "Não há conexão de Internet aberta em seu computador, deseja conectar?";
|
185 |
$l_logout_explain = "Não há conexão de Internet aberta em seu computador, deseja conectar?";
|
237 |
if($display_button_user_not_auth_yet)
|
- |
|
238 |
{
|
- |
|
239 |
$l_logout = "<a href=\"http://alcasar/index.php?url=$_SERVER[HTTP_HOST]\">Abrir uma conexão de Internet</a>";
|
186 |
$l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">Abrir uma conexão de Internet</a>";
|
240 |
}
|
- |
|
241 |
else
|
- |
|
242 |
{
|
- |
|
243 |
$l_logout = "<a href=\"http://www.google.com\">Abrir uma conexão de Internet</a>";
|
- |
|
244 |
}
|
- |
|
245 |
|
- |
|
246 |
|
- |
|
247 |
|
- |
|
248 |
}
|
187 |
}
|
249 |
else {
|
188 |
else {
|
250 |
if ($user[5] != $user[0]) // authentication exception or not
|
189 |
if ($user[5] != $user[0]) // authentication exception or not
|
251 |
{
|
190 |
{
|
252 |
$l_logout_explain = "Se desejar, feche a conexão do usuário atual conectado.<br> Usuário conectado : <a href=\"http://$hostname:3990/logoff\" title=\"Disconnect user $user[5]\"><b>$user[5]</b></a><br><br>$nb_connection_history last connections :$connection_history";
|
191 |
$l_logout_explain = "Se desejar, feche a conexão do usuário atual conectado.<br> Usuário conectado : <a href=\"http://$hostname:3990/logoff\" title=\"Disconnect user $user[5]\"><b>$user[5]</b></a><br><br>$nb_connection_history last connections :$connection_history";
|
Line 265... |
Line 204... |
265 |
$l_service_sms = "SMS service enable";
|
204 |
$l_service_sms = "SMS service enable";
|
266 |
$l_service_sms_n = "SMS service disable";
|
205 |
$l_service_sms_n = "SMS service disable";
|
267 |
$l_acc_sms = "Auto registration by SMS";
|
206 |
$l_acc_sms = "Auto registration by SMS";
|
268 |
}
|
207 |
}
|
269 |
else {
|
208 |
else {
|
270 |
$l_access_denied = "ACCESS DENIED";
|
209 |
$l_access_denied = "Access control";
|
271 |
$l_access_welcome = "Welcome on ALCASAR";
|
210 |
$l_access_welcome = "Welcome on ALCASAR";
|
272 |
$l_access_unavailable = "ACCESS UNAVAILABLE";
|
211 |
$l_access_unavailable = "ACCESS UNAVAILABLE";
|
273 |
$l_required_domain = "Required WEB site";
|
212 |
$l_required_domain = "Required WEB site";
|
274 |
$l_explain_acc_access = "This center control the portal. You must have an administrative account.";
|
213 |
$l_explain_acc_access = "This center control the portal. You must have an administrative account.";
|
275 |
$l_explain_access_deny = "You try to connect to a resource whose content is deemed to contain inappropriate information.";
|
214 |
$l_explain_access_deny = "You try to connect to a resource whose content is deemed to contain inappropriate information.";
|
Line 282... |
Line 221... |
282 |
$l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Install ALCASAR AC Certificate</a>";
|
221 |
$l_install_certif_more = "<a href=\"$cert_add/certificat_alcasar_ca.der\">Install ALCASAR AC Certificate</a>";
|
283 |
$l_certif_explain = "Allow secure data exchange between your computer and ALCASAR portal.<BR>If this certificate isn't incorporated in your computer, some security alerts should appear in your browser.<br><br>";
|
222 |
$l_certif_explain = "Allow secure data exchange between your computer and ALCASAR portal.<BR>If this certificate isn't incorporated in your computer, some security alerts should appear in your browser.<br><br>";
|
284 |
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Complementary help</a>";
|
223 |
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Complementary help</a>";
|
285 |
$l_category = "category :";
|
224 |
$l_category = "category :";
|
286 |
if ((isset ($user[4])) && ($user[4] == "0")) {
|
225 |
if ((isset ($user[4])) && ($user[4] == "0")) {
|
287 |
$l_logout_explain = "No Internet consultation session is actualy open on your system";
|
226 |
$l_logout_explain = "No Internet consultation session is actualy open on your system";
|
288 |
if($display_button_user_not_auth_yet)
|
- |
|
289 |
{
|
- |
|
290 |
$l_logout = "<a href=\"http://alcasar/index.php?url=$_SERVER[HTTP_HOST]\">Open an Internet session</a>";
|
227 |
$l_logout = "<a href=\"http://$hostname/index.php?url=$redirect_link\">Open an Internet session</a>";
|
291 |
}
|
- |
|
292 |
else
|
- |
|
293 |
{
|
- |
|
294 |
$l_logout = "<a href=\"http://www.google.com\">Open an Internet session</a>";
|
- |
|
295 |
}
|
- |
|
296 |
|
- |
|
297 |
|
- |
|
298 |
}
|
228 |
}
|
299 |
else {
|
229 |
else {
|
300 |
if ($user[5] != $user[0]) // authentication exception or not
|
230 |
if ($user[5] != $user[0]) // authentication exception or not
|
301 |
{
|
231 |
{
|
302 |
$l_logout_explain = "Close the session of the user currently connected.<br> User logged-on : <a href=\"http://$hostname:3990/logoff\" title=\"Disconnect user $user[5]\"><b>$user[5]</b></a><br><br>$nb_connection_history last connections :$connection_history";
|
232 |
$l_logout_explain = "Close the session of the user currently connected.<br> User logged-on : <a href=\"http://$hostname:3990/logoff\" title=\"Disconnect user $user[5]\"><b>$user[5]</b></a><br><br>$nb_connection_history last connections :$connection_history";
|
Line 319... |
Line 249... |
319 |
|
249 |
|
320 |
$l_title = ($direct_access ? $l_access_welcome : ($network_pb ? $l_access_unavailable : $l_access_denied));
|
250 |
$l_title = ($direct_access ? $l_access_welcome : ($network_pb ? $l_access_unavailable : $l_access_denied));
|
321 |
$l_explain = ($direct_access ? $l_explain_acc_access : ($network_pb ? $l_explain_net_pb : $l_explain_access_deny));
|
251 |
$l_explain = ($direct_access ? $l_explain_acc_access : ($network_pb ? $l_explain_net_pb : $l_explain_access_deny));
|
322 |
|
252 |
|
323 |
# set the icons
|
253 |
# set the icons
|
324 |
$img_rep = "http://alcasar/images/";
|
254 |
$img_rep = "./images/";
|
325 |
$img_organisme = "organisme.png";
|
255 |
$img_organisme = "organisme.png";
|
326 |
$img_access = "globe_acces_70.png";
|
256 |
$img_access = "globe_acces_70.png";
|
327 |
$img_connect = "globe_70.png";
|
257 |
$img_connect = "globe_70.png";
|
328 |
$img_warning = "globe_warning_70.png";
|
258 |
$img_warning = "globe_warning_70.png";
|
329 |
$img_pwd = "cle_ombre.png";
|
259 |
$img_pwd = "cle_ombre.png";
|
Line 344... |
Line 274... |
344 |
}
|
274 |
}
|
345 |
else {
|
275 |
else {
|
346 |
$img_internet = $img_connect;
|
276 |
$img_internet = $img_connect;
|
347 |
}
|
277 |
}
|
348 |
|
278 |
|
- |
|
279 |
# cleaning the cache
|
- |
|
280 |
header("Expires: Tue, 01 Jan 2000 00:00:00 GMT");
|
- |
|
281 |
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
- |
|
282 |
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
|
- |
|
283 |
header("Cache-Control: post-check=0, pre-check=0", false);
|
- |
|
284 |
header("Pragma: no-cache");
|
349 |
?>
|
285 |
?>
|
350 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
286 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
351 |
<html>
|
287 |
<html>
|
352 |
<head>
|
288 |
<head>
|
353 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
289 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
354 |
<title>ALCASAR - <?php echo $l_title; ?></title>
|
290 |
<title>ALCASAR - <?php echo $l_title; ?></title>
|
355 |
<meta http-equiv="Cache-control" content="no-cache">
|
291 |
<meta http-equiv="Cache-control" content="no-cache">
|
356 |
<meta http-equiv="Pragma" content="no-cache">
|
292 |
<meta http-equiv="Pragma" content="no-cache">
|
357 |
<?php
|
293 |
<?php
|
358 |
if($display_button_user_not_auth_yet) #if user is intercepted (ipset:not_auth_yet), css style is not included properly
|
- |
|
359 |
{
|
- |
|
360 |
echo "<style>";
|
294 |
echo "<style>";
|
361 |
include("css/style_intercept.css");
|
295 |
include("css/style_intercept.css");
|
362 |
echo "</style>";
|
296 |
echo "</style>";
|
363 |
}
|
- |
|
364 |
else
|
- |
|
365 |
{
|
- |
|
366 |
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"css/style_intercept.css\">";
|
- |
|
367 |
}
|
- |
|
368 |
?>
|
297 |
?>
|
369 |
<script type="text/javascript">
|
298 |
<script type="text/javascript">
|
370 |
function valoriserDiv5(param){
|
299 |
function valoriserDiv5(param){
|
371 |
document.getElementById("box_info").innerHTML = param.innerHTML;
|
300 |
document.getElementById("box_info").innerHTML = param.innerHTML;
|
372 |
}
|
301 |
}
|
373 |
</script>
|
302 |
</script>
|
374 |
</head>
|
303 |
</head>
|
375 |
<body onload="valoriserDiv5(text_conn);">
|
304 |
<body onload="valoriserDiv5(text_conn);">
|
376 |
<?php
|
305 |
<?php
|
377 |
if ($direct_access || $display_button_user_not_auth_yet){
|
306 |
if ($direct_access || $display_menu){
|
378 |
echo "
|
307 |
echo "
|
379 |
<div id=\"cadre_titre\" class=\"titre_controle\">
|
308 |
<div id=\"cadre_titre\" class=\"titre_controle\">
|
380 |
<p id=\"acces_controle\" class=\"titre_controle\">$l_title</p>";
|
309 |
<p id=\"acces_controle\" class=\"titre_controle\">$l_title</p>";
|
381 |
if ($network_pb) {
|
310 |
if ($network_pb) {
|
382 |
echo " <span>$l_explain_net_pb</span>";
|
311 |
echo " <span>$l_explain_net_pb</span>";
|
Line 422... |
Line 351... |
422 |
$sms_div='';
|
351 |
$sms_div='';
|
423 |
$sms_div_over='';
|
352 |
$sms_div_over='';
|
424 |
}
|
353 |
}
|
425 |
?>
|
354 |
?>
|
426 |
<?php
|
355 |
<?php
|
427 |
if ($direct_access || $display_button_user_not_auth_yet){
|
356 |
if ($direct_access || $display_menu){
|
428 |
echo " <div id=\"box_bienvenue\">
|
357 |
echo " <div id=\"box_bienvenue\">
|
429 |
$l_welcome
|
358 |
$l_welcome
|
430 |
</div>
|
359 |
</div>
|
431 |
<div class=\"box_menu\" id=\"box_conn\" onmouseover=\"valoriserDiv5(text_conn);\">
|
360 |
<div class=\"box_menu\" id=\"box_conn\" onmouseover=\"valoriserDiv5(text_conn);\">
|
432 |
<span>$l_logout</span>
|
361 |
<span>$l_logout</span>
|