Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 527 → Rev 528

/web/intercept.php
3,6 → 3,7
# intercept.php for Alcasar captive portal
# Copyright (C) 2003, 2004 Mondru AB.
# Modify by REXY & steweb57
# UI & css style by stephane ERARD
# Help for language translation by B. AUBARD (thanks)
 
# The contents of this file may be used under the terms of the GNU
18,11 → 19,7
# logoff : if logout successful
# already : if tried to login while already logged in
# notyet : if not logged in yet
# smartclient :if login from smart client
# popup1 : if requested a logging in pop up window
# popup2 : if requested a success pop up window
# popup3 : if requested a logout pop up window
# Default : it was not a form request
# Default : it was not a form request -> client go to login form
 
# Shared secret used to encrypt challenge with radius.
$uamsecret = "";
42,187 → 39,175
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'es'){
$R_ChilliError = "La autenticación debe ser un éxito a través del servicio de portal cautivo.";
$R_login = "El éxito de la autenticación.<HR>Cierre esta ventana interrumpte la sesion.";
$R_logout = "Conexión de cierre";
$R_loginfailed = "Error de autenticación";
$R_loggingin = "Identificación en el portal cautivo";
$R_loggedcont = "Red de Control de Acceso";
$R_loggedout = "Su sesión se cierra";
$R_user = "Usuario";
$R_password = "Contraseña";
$R_wait = "Por favor, espere un momento ...";
$R_onlinetime = "Tiempo de conexión:";
$R_remainingtime = "Desconexión en:";
$R_encrypted = "La apertura debe usar conexión cifrada";
$R_boutonO = "Autenticación";
$R_boutonF = "Cerrar";
$R_loggedin_stringl1 = "Information System Security";
$R_loggedin_stringl2 = "El portal fue creado reglamentos para garantizar la trazabilidad, la rendición de cuentas y el no repudio de las conexiones.";
$R_loggedin_stringl3 = "Su actividad en la red es registrada, de conformidad con la privacidad.";
$R_loggedin_stringl4 = "Los datos registrados pueden ser capaces de ser operado por una autoridad judicial en el curso de una investigación.";
$R_loggedin_stringl5 = "Estos datos se eliminan automáticamente después de un año.";
$R_loggedin_stringl6 = "Click <a href=$alcasarpath>here</a> to change your password or to integrate the security certificate in your browser";
$R_loggedout_string = "Cerrar sesión hizo portal cautivo!";
$R_reply_1 = "Your daily connexion time has been reached";
$R_reply_2 = "Your monthly connexion time has been reached";
$R_reply_3 = "You try to connect outside of your allowed timespan";
$R_reply_4 = "your account expired";
$R_reply_5 = "You have reached the maximum number of simultaneous logins";
$R_online_time = "Tiempo en linea";
$R_remaining_time = "Tiempo restante";
$l_ChilliError = "La autenticación debe ser un éxito a través del servicio de portal cautivo.";
$l_login = "El éxito de la autenticación.<HR>Cierre esta ventana interrumpte la sesion.";
$l_logout = "Conexión de cierre";
$l_loginfailed = "Error de autenticación";
$l_loggingin = "Identificación en el portal cautivo";
$l_loggedcont = "Red de Control de Acceso";
$l_loggedout = "Su sesión se cierra";
$l_user = "Usuario";
$l_password = "Contraseña";
$l_wait = "Por favor, espere un momento ...";
$l_onlinetime = "Tiempo de conexión:";
$l_remainingtime = "Desconexión en:";
$l_encrypted = "La apertura debe usar conexión cifrada";
$l_boutonO = "Autenticación";
$l_boutonF = "Cerrar";
$l_loggedin_stringl1 = "Information System Security";
$l_loggedin_stringl2 = "El portal fue creado reglamentos para garantizar la trazabilidad, la rendición de cuentas y el no repudio de las conexiones.";
$l_loggedin_stringl3 = "Su actividad en la red es registrada, de conformidad con la privacidad.";
$l_loggedin_stringl4 = "Los datos registrados pueden ser capaces de ser operado por una autoridad judicial en el curso de una investigación.";
$l_loggedin_stringl5 = "Estos datos se eliminan automáticamente después de un año.";
$l_loggedin_stringl6 = "Click <a href='$alcasarpath'>here</a> to change your password or to integrate the security certificate in your browser";
$l_loggedout_string = "Cerrar sesión hizo portal cautivo!";
$l_reply_1 = "Your daily connexion time has been reached";
$l_reply_2 = "Your monthly connexion time has been reached";
$l_reply_3 = "You try to connect outside of your allowed timespan";
$l_reply_4 = "your account expired";
$l_reply_5 = "You have reached the maximum number of simultaneous logins";
$l_online_time = "Tiempo en linea";
$l_remaining_time = "Tiempo restante";
}
else if($Language == 'de'){
$R_ChilliError = "Die Authentifizierung ist erfolgreich durch die Nutzung des Portals erfolgt.";
$R_login = "Erfolgreiche Authentifizierung.<HR>Schlißen dieses fensters unterbricht die sitzung";
$R_logout = "Beenden der Verbindung";
$R_loginfailed = "Authentifizierungsfehler Eigenverbrauch";
$R_loggingin = "Kennzeichnung auf dem Eigenverbrauch";
$R_loggedcont = "Network Access Control";
$R_loggedout = "Ihre Sitzung ist geschlossen";
$R_user = "Benutzer";
$R_password = "Passwort";
$R_wait = "Bitte warten Sie einen Moment ...";
$R_onlinetime = "Online-Zeit:";
$R_remainingtime = "Abmelden:";
$R_encrypted = "Die Öffnung muß der Anschluß Zahlen";
$R_boutonO = "Authentifizierung";
$R_boutonF = "Schließen";
$R_loggedin_stringl1 = "Information System Security";
$R_loggedin_stringl2 = "Dieses Portal wurde eingerichtet, um ordnungsgemäß die Rückverfolgbarkeit, der Zurechenbarkeit und der Nicht-Anerkennung der Verbindungen.";
$R_loggedin_stringl3 = "Ihre Tätigkeit im Netzwerk registriert ist nach Schutz der Privatsphäre.";
$R_loggedin_stringl4 = "Die gespeicherten Daten nicht pouront genutzt werden, dass von einer Justizbehörde im Rahmen einer Untersuchung.";
$R_loggedin_stringl5 = "Diese Daten werden automatisch gelöscht nach einem Jahr.";
$R_loggedin_stringl6 = "Click <a href=$alcasarpath>here</a> to change your password or to integrate the security certificate in your browser";
$R_loggedout_string = "Trennung des Portals erfolgt Gefangener!";
$R_reply_1 = "Your daily connexion time has been reached";
$R_reply_2 = "Your monthly connexion time has been reached";
$R_reply_3 = "You try to connect outside of your allowed timespan";
$R_reply_4 = "your account expired";
$R_reply_5 = "You have reached the maximum number of simultaneous logins";
$R_online_time = "Online-zeit";
$R_remaining_time = "Restzeit";
$l_ChilliError = "Die Authentifizierung ist erfolgreich durch die Nutzung des Portals erfolgt.";
$l_login = "Erfolgreiche Authentifizierung.<HR>Schlißen dieses fensters unterbricht die sitzung";
$l_logout = "Beenden der Verbindung";
$l_loginfailed = "Authentifizierungsfehler Eigenverbrauch";
$l_loggingin = "Kennzeichnung auf dem Eigenverbrauch";
$l_loggedcont = "Network Access Control";
$l_loggedout = "Ihre Sitzung ist geschlossen";
$l_user = "Benutzer";
$l_password = "Passwort";
$l_wait = "Bitte warten Sie einen Moment ...";
$l_onlinetime = "Online-Zeit:";
$l_remainingtime = "Abmelden:";
$l_encrypted = "Die Öffnung muß der Anschluß Zahlen";
$l_boutonO = "Authentifizierung";
$l_boutonF = "Schließen";
$l_loggedin_stringl1 = "Information System Security";
$l_loggedin_stringl2 = "Dieses Portal wurde eingerichtet, um ordnungsgemäß die Rückverfolgbarkeit, der Zurechenbarkeit und der Nicht-Anerkennung der Verbindungen.";
$l_loggedin_stringl3 = "Ihre Tätigkeit im Netzwerk registriert ist nach Schutz der Privatsphäre.";
$l_loggedin_stringl4 = "Die gespeicherten Daten nicht pouront genutzt werden, dass von einer Justizbehörde im Rahmen einer Untersuchung.";
$l_loggedin_stringl5 = "Diese Daten werden automatisch gelöscht nach einem Jahr.";
$l_loggedin_stringl6 = "Click <a href='$alcasarpath'>here</a> to change your password or to integrate the security certificate in your browser";
$l_loggedout_string = "Trennung des Portals erfolgt Gefangener!";
$l_reply_1 = "Your daily connexion time has been reached";
$l_reply_2 = "Your monthly connexion time has been reached";
$l_reply_3 = "You try to connect outside of your allowed timespan";
$l_reply_4 = "your account expired";
$l_reply_5 = "You have reached the maximum number of simultaneous logins";
$l_online_time = "Online-zeit";
$l_remaining_time = "Restzeit";
 
}
else if($Language == 'nl'){
$R_ChilliError = "De authenticatie moet een succes worden via de captive portal dienst.";
$R_login = "Succesvolle authenticatie.<HR>Dit venster te sluiten onderbreekt uw sessie.";
$R_logout = "Slotkoers verbinding";
$R_loginfailed = "Authenticatie mislukt";
$R_loggingin = "Identificatie van de captive-portaal";
$R_loggedcont = "Network Access Control";
$R_loggedout = "Uw sessie is gesloten";
$R_user = "Gebruiker";
$R_password = "Wachtwoord";
$R_wait = "Wacht een moment ...";
$R_onlinetime = "Sluit tijd:";
$R_remainingtime = "Verbreking in:";
$R_encrypted = "De opening moet gebruiken gecodeerde verbinding";
$R_boutonO = "Authenticatie";
$R_boutonF = "Sluiten";
$R_loggedin_stringl1 = "Information System Security";
$R_loggedin_stringl2 = "Het portaal werd opgericht verordeningen om de traceerbaarheid, verantwoordelijkheid en onloochenbaarheid van de verbindingen.";
$R_loggedin_stringl3 = "Uw activiteit op het netwerk is geregistreerd in overeenstemming met de persoonlijke levenssfeer.";
$R_loggedin_stringl4 = "De geregistreerde gegevens kunnen worden kunnen worden bediend door een rechterlijke instantie in de loop van een onderzoek.";
$R_loggedin_stringl5 = "Deze gegevens worden automatisch verwijderd na een jaar.";
$R_loggedin_stringl6 = "Click <a href=$alcasarpath>here</a> to change your password or to integrate the security certificate in your browser";
$R_loggedout_string = "Logout gemaakt intern portaal!";
$R_reply_1 = "Your daily connexion time has been reached";
$R_reply_2 = "Your monthly connexion time has been reached";
$R_reply_3 = "You try to connect outside of your allowed timespan";
$R_reply_4 = "your account expired";
$R_reply_5 = "You have reached the maximum number of simultaneous logins";
$R_online_time = "Online tijd";
$R_remaining_time = "Reterende tijd";
$l_ChilliError = "De authenticatie moet een succes worden via de captive portal dienst.";
$l_login = "Succesvolle authenticatie.<HR>Dit venster te sluiten onderbreekt uw sessie.";
$l_logout = "Slotkoers verbinding";
$l_loginfailed = "Authenticatie mislukt";
$l_loggingin = "Identificatie van de captive-portaal";
$l_loggedcont = "Network Access Control";
$l_loggedout = "Uw sessie is gesloten";
$l_user = "Gebruiker";
$l_password = "Wachtwoord";
$l_wait = "Wacht een moment ...";
$l_onlinetime = "Sluit tijd:";
$l_remainingtime = "Verbreking in:";
$l_encrypted = "De opening moet gebruiken gecodeerde verbinding";
$l_boutonO = "Authenticatie";
$l_boutonF = "Sluiten";
$l_loggedin_stringl1 = "Information System Security";
$l_loggedin_stringl2 = "Het portaal werd opgericht verordeningen om de traceerbaarheid, verantwoordelijkheid en onloochenbaarheid van de verbindingen.";
$l_loggedin_stringl3 = "Uw activiteit op het netwerk is geregistreerd in overeenstemming met de persoonlijke levenssfeer.";
$l_loggedin_stringl4 = "De geregistreerde gegevens kunnen worden kunnen worden bediend door een rechterlijke instantie in de loop van een onderzoek.";
$l_loggedin_stringl5 = "Deze gegevens worden automatisch verwijderd na een jaar.";
$l_loggedin_stringl6 = "Click <a href='$alcasarpath'>here</a> to change your password or to integrate the security certificate in your browser";
$l_loggedout_string = "Logout gemaakt intern portaal!";
$l_reply_1 = "Your daily connexion time has been reached";
$l_reply_2 = "Your monthly connexion time has been reached";
$l_reply_3 = "You try to connect outside of your allowed timespan";
$l_reply_4 = "your account expired";
$l_reply_5 = "You have reached the maximum number of simultaneous logins";
$l_online_time = "Online tijd";
$l_remaining_time = "Reterende tijd";
}
else if($Language == 'fr'){
$R_ChilliError = "L'authentification doit &ecirc;tre r&eacute;ussie au travers du service du portail captif.";
$R_login = "Authentification r&eacute;ussie.<HR>La fermeture de cette fenêtre interrompt votre session.";
$R_logout = "Fermeture de la session";
$R_loginfailed = "Echec d'authentification";
$R_loggingin = "Identification sur le portail captif";
$R_loggedcont = "Contr&ocirc;le d'acc&egrave;s au r&eacute;seau";
$R_loggedout = "Votre session est fermée";
$R_user = "Identifiant";
$R_password = "Mot de passe";
$R_wait = "Patientez un instant ...";
$R_onlinetime = "Temps de connexion:";
$R_remainingtime = "Deconnexion dans :";
$R_encrypted = "La connexion avec le portail doit &ecirc;tre chiffr&eacute;e";
$R_boutonO = "Authentification";
$R_boutonF = "Fermer";
$R_loggedin_stringl1 = "S&eacute;curit&eacute; des Syst&egrave;mes d'Information";
$R_loggedin_stringl2 = "Ce contr&ocirc;le a &eacute;t&eacute; mis en place pour assurer r&eacute;glementairement la tra&ccedil;abilit&eacute;, l'imputabilit&eacute; et la non-r&eacute;pudiation des connexions.";
$R_loggedin_stringl3 = "Votre activit&eacute; sur le r&eacute;seau est enregistr&eacute;e conform&eacute;ment au respect de la vie priv&eacute;e.";
$R_loggedin_stringl4 = "Les donn&eacute;es enregistr&eacute;es ne pourront &ecirc;tre exploit&eacute;es que par une autorit&eacute judiciaire dans le cadre d'une enqu&ecirc;te.";
$R_loggedin_stringl5 = "Ces donn&eacute;es seront automatiquement supprim&eacute;es au bout d'un an.";
$R_loggedin_stringl6 = "Cliquez <a href=$alcasarpath>ici</a> pour changer votre mot de passe ou pour intégrer le certificat de sécurité à votre navigateur";
$R_loggedout_string = "D&eacute;connexion du portail captif effectu&eacute;e !";
$R_reply_1 = "Votre dur&eacute;e de connexion journali&egrave;re a &eacute;t&eacute; atteinte";
$R_reply_2 = "Votre dur&eacute;e de connexion mensuelle a &eacute;t&eacute; atteinte";
$R_reply_3 = "Vous tentez de vous connecter en dehors de votre p&eacute;riode autoris&eacute;e";
$R_reply_4 = "Votre compte a expir&eacute";
$R_reply_5 = "Vous avez atteint le nombre maximum de connexions simultan&eacute;es";
$R_online_time = "Temps de connexion";
$R_remaining_time = "Temps restant";
$l_ChilliError = "L'authentification doit &ecirc;tre r&eacute;ussie au travers du service du portail captif.";
$l_login = "Authentification r&eacute;ussie.<HR>La fermeture de cette fenêtre interrompt votre session.";
$l_logout = "Fermeture de la session";
$l_loginfailed = "Echec d'authentification";
$l_loggingin = "Identification sur le portail captif";
$l_loggedcont = "Contr&ocirc;le d'acc&egrave;s au r&eacute;seau";
$l_loggedout = "Votre session est fermée";
$l_user = "Identifiant";
$l_password = "Mot de passe";
$l_wait = "Patientez un instant ...";
$l_onlinetime = "Temps de connexion:";
$l_remainingtime = "Deconnexion dans :";
$l_encrypted = "La connexion avec le portail doit &ecirc;tre chiffr&eacute;e";
$l_boutonO = "Authentification";
$l_boutonF = "Fermer";
$l_loggedin_stringl1 = "S&eacute;curit&eacute; des Syst&egrave;mes d'Information";
$l_loggedin_stringl2 = "Ce contr&ocirc;le a &eacute;t&eacute; mis en place pour assurer r&eacute;glementairement la tra&ccedil;abilit&eacute;, l'imputabilit&eacute; et la non-r&eacute;pudiation des connexions.";
$l_loggedin_stringl3 = "Votre activit&eacute; sur le r&eacute;seau est enregistr&eacute;e conform&eacute;ment au respect de la vie priv&eacute;e.";
$l_loggedin_stringl4 = "Les donn&eacute;es enregistr&eacute;es ne pourront &ecirc;tre exploit&eacute;es que par une autorit&eacute judiciaire dans le cadre d'une enqu&ecirc;te.";
$l_loggedin_stringl5 = "Ces donn&eacute;es seront automatiquement supprim&eacute;es au bout d'un an.";
$l_loggedin_stringl6 = "Cliquez <a href='$alcasarpath'>ici</a> pour changer votre mot de passe ou pour intégrer le certificat de sécurité à votre navigateur";
$l_loggedout_string = "D&eacute;connexion du portail captif effectu&eacute;e !";
$l_reply_1 = "Votre dur&eacute;e de connexion journali&egrave;re a &eacute;t&eacute; atteinte";
$l_reply_2 = "Votre dur&eacute;e de connexion mensuelle a &eacute;t&eacute; atteinte";
$l_reply_3 = "Vous tentez de vous connecter en dehors de votre p&eacute;riode autoris&eacute;e";
$l_reply_4 = "Votre compte a expir&eacute";
$l_reply_5 = "Vous avez atteint le nombre maximum de connexions simultan&eacute;es";
$l_online_time = "Temps de connexion";
$l_remaining_time = "Temps restant";
}
else{
$R_ChilliError = "The authentication must be successful through the captive portal service.";
$R_login = "Successful authentication.<HR>Closing this window interrupts your session";
$R_logout = "Closing connection";
$R_loginfailed = "Authentication Failed";
$R_loggingin = "Identification on the captive portal";
$R_loggedcont = "Network Access Control";
$R_loggedout = "Your session is closed";
$R_user = "User";
$R_password = "Password";
$R_wait = "Please wait a moment ...";
$R_onlinetime = "Connect time:";
$R_remainingtime = "Disconnection in:";
$R_encrypted = "The opening must use encrypted connection";
$R_boutonO = "Authentication";
$R_boutonF = "Close";
$R_loggedin_stringl1 = "Information System Security";
$R_loggedin_stringl2 = "That control was set up regulations to ensure traceability, accountability and non-repudiation of connections.";
$R_loggedin_stringl3 = "Your activity on the network is registered in accordance with privacy.";
$R_loggedin_stringl4 = "The recorded data can be able to be operated by a judicial authority in the course of an investigation.";
$R_loggedin_stringl5 = "These data will be automatically deleted after one year.";
$R_loggedin_stringl6 = "Click <a href=$alcasarpath>here</a> to change your password or to integrate the security certificate in your browser";
$R_loggedout_string = "Logout made captive portal!";
$R_reply_1 = "Your daily connexion time has been reached";
$R_reply_2 = "Your monthly connexion time has been reached";
$R_reply_3 = "You try to connect outside of your allowed timespan";
$R_reply_4 = "your account expired";
$R_reply_5 = "You have reached the maximum number of simultaneous logins";
$R_online_time = "Online time";
$R_remaining_time = "Remaining time";
$l_ChilliError = "The authentication must be successful through the captive portal service.";
$l_login = "Successful authentication.<HR>Closing this window interrupts your session";
$l_logout = "Closing connection";
$l_loginfailed = "Authentication Failed";
$l_loggingin = "Identification on the captive portal";
$l_loggedcont = "Network Access Control";
$l_loggedout = "Your session is closed";
$l_user = "User";
$l_password = "Password";
$l_wait = "Please wait a moment ...";
$l_onlinetime = "Connect time:";
$l_remainingtime = "Disconnection in:";
$l_encrypted = "The opening must use encrypted connection";
$l_boutonO = "Authentication";
$l_boutonF = "Close";
$l_loggedin_stringl1 = "Information System Security";
$l_loggedin_stringl2 = "That control was set up regulations to ensure traceability, accountability and non-repudiation of connections.";
$l_loggedin_stringl3 = "Your activity on the network is registered in accordance with privacy.";
$l_loggedin_stringl4 = "The recorded data can be able to be operated by a judicial authority in the course of an investigation.";
$l_loggedin_stringl5 = "These data will be automatically deleted after one year.";
$l_loggedin_stringl6 = "Click <a href='$alcasarpath'>here</a> to change your password or to integrate the security certificate in your browser";
$l_loggedout_string = "Logout made captive portal!";
$l_reply_1 = "Your daily connexion time has been reached";
$l_reply_2 = "Your monthly connexion time has been reached";
$l_reply_3 = "You try to connect outside of your allowed timespan";
$l_reply_4 = "your account expired";
$l_reply_5 = "You have reached the maximum number of simultaneous logins";
$l_online_time = "Online time";
$l_remaining_time = "Remaining time";
}
# Make sure that the form parameters are clean
#$OK_CHARS='-a-zA-Z0-9_.@&=%!';
#$_ = $input = <STDIN>;
#s/[^$OK_CHARS]/_/go;
#$input = $_;
 
# Make sure that the get query parameters are clean
#$OK_CHARS='-a-zA-Z0-9_.@&=%!';
#$_ = $query=$ENV{QUERY_STRING};
#s/[^$OK_CHARS]/_/go;
#$query = $_;
 
# If https not use, tell it's wrong
if (!($_SERVER['HTTPS'] == 'on')) {
if (!(isset($_SERVER['HTTPS'])&&($_SERVER['HTTPS'] == 'on'))) {
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<title>$R_loggedcont</title>
<title>$l_loggedcont</title>
<meta http-equiv=\"Cache-control\" content=\"no-cache\">
<meta http-equiv=\"Pragma\" content=\"no-cache\">
</head>
<body bgColor = 'white'>
<h1 style=\"text-align: center;\">$R_loginfailed</h1>
<center>$R_encrypted</center>
<h1 style=\"text-align: center;\">$l_loginfailed</h1>
<center>$l_encrypted</center>
</body>
</html>";
exit(0);
233,9 → 218,9
if (isset($_POST['Password'])){ $password = $_POST['Password'];} else {$password="";}
if (isset($_POST['challenge'])){$challenge = $_POST['challenge'];} else {$challenge="";}
if (isset($_POST['button'])){ $button = $_POST['button'];} else { $button="";}
if (isset($_POST['logout'])){ $logout = $_POST['logout'];} else {$logout="";}
if (isset($_POST['prelogin'])){ $prelogin = $_POST['prelogin'];} else {$prelogin="";}
if (isset($_POST['res'])){ $res = $_POST['res'];} else {$res="";}
//if (isset($_POST['logout'])){ $logout = $_POST['logout'];} else {$logout="";}
//if (isset($_POST['prelogin'])){ $prelogin = $_POST['prelogin'];} else {$prelogin="";}
if (isset($_POST['res'])){ $res = $_POST['res'];} else {$res="";}
if (isset($_POST['uamip'])){ $uamip = $_POST['uamip'];} else {$uamip="";}
if (isset($_POST['uamport'])){ $uamport = $_POST['uamport'];} else {$uamport="";}
if (isset($_POST['userurl'])){ $userurl = $_POST['userurl'];} else {$userurl="";}
243,11 → 228,11
if (isset($_POST['redirurl'])){ $redirurl = $_POST['redirurl'];} else {$redirurl="";}
 
# Read query parameters which we care about
if (isset($_GET['res'])) $res = $_GET['res'];
if (isset($_GET['res'])) $res = $_GET['res'];
if (isset($_GET['challenge'])) $challenge = $_GET['challenge'];
if (isset($_GET['uamip'])) $uamip = $_GET['uamip'];
if (isset($_GET['uamip'])) $uamip = $_GET['uamip'];
if (isset($_GET['uamport'])) $uamport = $_GET['uamport'];
if (isset($_GET['reply'])){ $reply = $_GET['reply'];} else {$reply="";}
if (isset($_GET['reply'])){ $reply = $_GET['reply'];} else {$reply="";}
if (isset($_GET['userurl'])) $userurl = $_GET['userurl'];
if (isset($_GET['timeleft'])) $timeleft = $_GET['timeleft'];
if (isset($_GET['redirurl'])) $redirurl = $_GET['redirurl'];
255,15 → 240,15
# translation of radius replies
if (isset($reply)){
switch(trim ($reply)) {
case 'Your maximum daily usage time has been reached' : $reply = $R_reply_1 ; break;
case 'Your maximum monthly usage time has been reached' : $reply = $R_reply_2 ; break;
case 'You are calling outside your allowed timespan' : $reply = $R_reply_3 ; break;
case 'Password Has Expired' : $reply = $R_reply_4 ; break;
case 'You are already logged in - access denied' : $reply = $R_reply_5 ; break;
case 'Your maximum daily usage time has been reached' : $reply = $l_reply_1 ; break;
case 'Your maximum monthly usage time has been reached' : $reply = $l_reply_2 ; break;
case 'You are calling outside your allowed timespan' : $reply = $l_reply_3 ; break;
case 'Password Has Expired' : $reply = $l_reply_4 ; break;
case 'You are already logged in - access denied' : $reply = $l_reply_5 ; break;
}}
 
# If attempt to login
if ("$button" == "$R_boutonO") {
if ("$button" == "$l_boutonO") {
$hexchal = pack ("H32", $challenge);
$newchal = pack ("H*", md5($hexchal . $uamsecret));
$response = md5("\0" . $password . $newchal);
273,15 → 258,15
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<title>$R_loggingin</title>
<title>$l_loggingin</title>
<meta http-equiv=\"Cache-control\" content=\"no-cache\">
<meta http-equiv=\"Pragma\" content=\"no-cache\">
<meta http-equiv=\"refresh\" content=\"0;url=http://$uamip:$uamport/logon?username=$username&password=$pappassword&userurl=$userurl\">
</head>
<body bgColor = 'white'>
<h1 style=\"text-align: center;\">$R_loggingin</h1>
<h1 style=\"text-align: center;\">$l_loggingin</h1>
<center>
$R_wait
$l_wait
</center>
</body>
</html>";
294,28 → 279,25
case 'logoff': $result = 3; break; // If logout successful
case 'already': $result = 4; break; // If tried to login while already logged in
case 'notyet': $result = 5; break; // If not logged in yet
case 'smartclient': $result = 6; break; // If login from smart client
case 'popup1': $result = 11; break; // If requested a logging in pop up window
case 'popup2': $result = 12; break; // If requested a success pop up window
case 'popup3': $result = 13; break; // If requested a logout pop up window
default: $result = 0; // Default: It was not a form request
default: $result = 0; // Default: It was not a form request -> client go to login form
}
 
# Otherwise it was not a form request
# Send out an error message
if ($result == 0) { //erreur
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<title>$R_loginfailed</title>
<title>$l_loggingin</title>
<meta http-equiv=\"Cache-control\" content=\"no-cache\">
<meta http-equiv=\"Pragma\" content=\"no-cache\">
</head>
<meta http-equiv=\"refresh\" content=\"0;url=http://$uamip:$uamport/prelogin\">
</head>
<body bgColor = 'white'>
<h1 style=\"text-align: center;\">$R_loginfailed</h1>
<h1 style=\"text-align: center;\">$l_loggingin</h1>
<center>
$R_ChilliError
$l_wait
</center>
</body>
</html>";
327,7 → 309,7
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<title>$R_loggingin</title>
<title>$l_loggingin</title>
<meta http-equiv=\"Cache-control\" content=\"no-cache\">
<meta http-equiv=\"Pragma\" content=\"no-cache\">
<script type=\"text/javascript\" language=\"JavaScript\">
334,7 → 316,7
var blur = 0; // not un use
var mytimeleft = 0; // not un use
alcasar_popup = null;
 
function popUp(URL) {
if (self.name != \"alcasar_popup\") {
alcasar_popup = window.open(URL, 'alcasar_popup', 'width=500,height=400,directories=no,resizable=no,scrollbars=yes,location=no,toolbar=no,statusbar=no,menubar=no');
341,142 → 323,90
}
}
 
function doOnLoad(result, userurl, redirurl, timeleft) {
if (timeleft) { // not in use
function doOnLoad(result, userurl, redirurl, adminurl, timeleft) {
if (timeleft) { // not in use
mytimeleft = timeleft;
}
if (result == 1) { //success
if ((result == 1)||(reslut == 4)) { //success or already
//window.location = userurl;
if (alcasar_popup != null) alcasar_popup.focus();
";
if ($adminurl) { echo "window.location = \"$adminurl\";";}
else if ($redirurl) { echo "window.location = \"$redirurl\";";}
else if ($userurl) { echo "window.location = \"$userurl\";";}
else echo "window.home();";
echo "
if (adminurl != ''){
window.location = adminurl;
} else if (redirurl != '') {
window.location = redirurl;
} else if (userurl != '') {
window.location = userurl;
} else {
window.home();
}
}
if ((result == 2) || (result == 3) || result == 5) { //failed or logoff or notyet
if (alcasar_popup != null) alcasar_popup.close();
document.form1.UserName.focus();
document.form1.UserName.focus();
}
}
</script>
<link rel=\"stylesheet\" href=\"/css/style_intercept.css\" type=\"text/css\">
</head>
<body onLoad=\"javascript:doOnLoad($result,'$userurl','$redirurl','$timeleft')\">
<body onLoad=\"javascript:doOnLoad($result,'$userurl','$redirurl','$adminurl','$timeleft')\">
<center>";
#Modifications par stephane ERARD le 30 11 2010
#Modifications par steweb57 le 06 02 2011
if ($debug){
# begin debugging
print "<center>THE INPUT by GET method (for debugging):<br>";
foreach ($_GET as $key => $value) {
print $key . "=" . $value . "<br>";
}
print "<br>";
print "<center>THE INPUT by POST method (for debugging):<br>";
foreach ($_POST as $key => $value) {
print $key . "=" . $value . "<br>";
}
print "<br></center>";
# end debugging
}
 
if ($result == 2) { //failed
echo "
<DIV id=\"logon\">
<h2>$R_loginfailed</h2>";
if ($reply) {
#traitement du reply ...
echo "<center> $reply </BR></BR></center>";
}
}
 
if ($result == 3 || $result == 5) { //logoff or notyet
echo "
<DIV id=\"logon\">
<h1>$organisme</h1>
<h2>$R_loggedcont</h2>";
}
if ($result == 2 || $result == 3 || $result == 5) { //failed or logoff or notyet
echo "
<IMG id=\"logo-alcasar\" src=\"/images/logo-alcasar.png\">
<div id=\"logon\">
<h1>$organisme</h1>
<h2>$l_loggedcont</h2>";
if ($result == 2) { //failed
echo "
<h3>$l_loginfailed</h3>";
if ($reply) {
#traitement du reply ...
echo "<center> $reply <br /><br /></center>";
}
}
echo "
<img id=\"logo-alcasar\" src=\"/images/logo-alcasar.png\">
<form name=\"form1\" method=\"post\" action=\"$loginpath\">
<input type=\"hidden\" name=\"challenge\" value=\"$challenge\">
<input type=\"hidden\" name=\"uamip\" value=\"$uamip\">
<input type=\"hidden\" name=\"uamport\" value=\"$uamport\">
<input type=\"hidden\" name=\"userurl\" value=\"$userurl\">
<TABLE id=\"boite-logon\">
<TR>
<TD width=\"20%\" rowspan=\"3\"><IMG id=\"logo-organ\" src=\"/images/organisme.png\"></TD>
<TD width=\"30%\" align=\"right\">$R_user</TD>
<TD width=\"50%\" align=\"left\"><INPUT type=\"text\" maxLength=\"32\" name=\"UserName\"></TD>
</TR>
<TR>
<TD align=\"right\">$R_password</TD>
<TD align=\"left\"><INPUT maxLength=\"32\" type=\"password\" name=\"Password\"></TD>
</TR>
<TR>
<TD height=\"23\" colSpan=\"2\" align=\"center\"><INPUT value=\"$R_boutonO\" type=\"submit\" name=\"button\" onclick=\"javascript:popUp('$statuspath')\"></TD>
</TR>
</TABLE>
<TABLE id=\"boite-info\" cellSpacing=\"0\" cellPadding=\"0\" width=\"100%\">
<TR>
<TD align=\"center\"><FONT color=\"red\"><B>$R_loggedin_stringl1</B></FONT></TD>
</TR>
<TR>
<TD align=\"left\">
<UL>
<LI>$R_loggedin_stringl2</LI>
<LI>$R_loggedin_stringl4</LI>
<LI>$R_loggedin_stringl3</LI>
<LI>$R_loggedin_stringl5</LI>
<LI>$R_loggedin_stringl6</LI>
</UL>
</TD>
</TR>
</TABLE>
<table id=\"boite-logon\">
<tr>
<td width=\"20%\" rowspan=\"3\"><img id=\"logo-organ\" src=\"/images/organisme.png\"></td>
<td width=\"30%\" align=\"right\">$l_user</td>
<td width=\"50%\" align=\"left\"><INPUT type=\"text\" maxLength=\"32\" name=\"UserName\"></td>
</tr>
<tr>
<td align=\"right\">$l_password</td>
<td align=\"left\"><INPUT maxLength=\"32\" type=\"password\" name=\"Password\"></td>
</tr>
<tr>
<td height=\"23\" colSpan=\"2\" align=\"center\"><INPUT value=\"$l_boutonO\" type=\"submit\" name=\"button\" onclick=\"javascript:popUp('$statuspath')\"></td>
</tr>
</table>
<table id=\"boite-info\" cellSpacing=\"0\" cellPadding=\"0\" width=\"100%\">
<tr>
<td align=\"center\"><FONT color=\"red\"><B>$l_loggedin_stringl1</B></FONT></td>
</tr>
<tr>
<td align=\"left\">
<ul>
<LI>$l_loggedin_stringl2</LI>
<LI>$l_loggedin_stringl4</LI>
<LI>$l_loggedin_stringl3</LI>
<LI>$l_loggedin_stringl5</LI>
<LI>$l_loggedin_stringl6</LI>
</ul>
</td>
</tr>
</table>
</form>
</div>
</center>
</form>
</DIV>
</body>
</html>";
}
#Fin des modifications
if ($result == 1) { //sucess
echo "
<table id=\"auth_reussi\">
<tr>
<td>
<img height=\"150\" src=\"/images/logo-alcasar.png\">
</td>
<td>
<p class=\"text_auth\">$R_login</p>
</td>
</tr>
<tr>
<td></td>
<td>";
if ($reply) {
## traitement reply
echo "$reply</br></br>";
}
echo "
<a href=\"http://$uamip:$uamport/logoff\">$R_logout</a>
</td>
</tr>
</table>
</body>
</html>";
}
if ($result == 11) { //popup 1 (login)
echo "
<h2 style=\"text-align: center;\">$R_loggingin</h2>
<center>$R_wait</center>
</body>
</html>";
}
exit(0);
?>
/web/status.php
1,262 → 1,261
<?php
#
# status.php for Alcasar captive portal
# by steweb57
#
$organisme = "";
 
# Choice of language
//reste quelques traductions à faire
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'es'){
$R_login1 = "El éxito de la autenticación.";
$R_login2 = "Cierre esta ventana interrumpte la sesion.";
$R_logout = "Conexión de cierre";
$R_logout_question = "Are you sure you want to disconnect now?"; //à traduire
$R_loggedout = "Su sesión se cierra";
$R_wait = "Por favor, espere un momento ...";
$R_state_label = "State";
$R_session_id_label = "Session ID";
$R_max_session_time_label = "Max Session Time";
$R_max_idle_time_label = "Max Idle Time";
$R_start_time_label = "Start Time";
$R_session_time_label = "Tiempo de conexión";
$R_idle_time_label = "Idle Time"; //à traduire
$R_downloaded_label = "Downloaded"; //à traduire
$R_uploaded_label = "Uploaded"; //à traduire
$R_original_url_label = "Original URL"; //à traduire
$R_not_available = "Not available"; //à traduire
$R_na = "N/A"; //à traduire
$R_error = "error"; //à traduire
$R_welcome = "Welcome"; //à traduire
}
else if($Language == 'de'){
$R_login1 = "Erfolgreiche Authentifizierung.";
$R_login2 = "Schlißen dieses fensters unterbricht die sitzung";
$R_logout = "Beenden der Verbindung";
$R_logout_question = "Are you sure you want to disconnect now?"; //à traduire
$R_loggedout = "Ihre Sitzung ist geschlossen";
$R_wait = "Bitte warten Sie einen Moment ...";
$R_state_label = "State";
$R_session_id_label = "Session ID";
$R_max_session_time_label = "Max Session Time";
$R_max_idle_time_label = "Max Idle Time";
$R_start_time_label = "Start Time";
$R_session_time_label = "Online-zeit";
$R_idle_time_label = "Idle Time"; //à traduire
$R_downloaded_label = "Downloaded"; //à traduire
$R_uploaded_label = "Uploaded"; //à traduire
$R_original_url_label = "Original URL"; //à traduire
$R_not_available = "Not available"; //à traduire
$R_na = "N/A"; //à traduire
$R_error = "error"; //à traduire
$R_welcome = "Welcome"; //à traduire
}
else if($Language == 'nl'){
$R_login1 = "Succesvolle authenticatie.";
$R_login2 = "Dit venster te sluiten onderbreekt uw sessie.";
$R_logout = "Slotkoers verbinding";
$R_logout_question = "Are you sure you want to disconnect now?"; //à traduire
$R_loggedout = "Uw sessie is gesloten";
$R_wait = "Wacht een moment ...";
$R_state_label = "State";
$R_session_id_label = "Session ID";
$R_max_session_time_label = "Max Session Time";
$R_max_idle_time_label = "Max Idle Time";
$R_start_time_label = "Start Time";
$R_session_time_label = "Online tijd";
$R_idle_time_label = "Idle Time"; //à traduire
$R_downloaded_label = "Downloaded"; //à traduire
$R_uploaded_label = "Uploaded"; //à traduire
$R_original_url_label = "Original URL"; //à traduire
$R_not_available = "Not available"; //à traduire
$R_na = "N/A"; //à traduire
$R_error = "error"; //à traduire
$R_welcome = "Welcome"; //à traduire
}
else if($Language == 'fr'){
$R_login1 = "Authentification r&eacute;ussie.";
$R_login2 = "La fermeture de cette fenêtre interrompt votre session.";
$R_logout = "Fermeture de la session";
$R_logout_question = "Etes vous sûre de vouloir vous déconnecter?";
$R_loggedout = "Votre session est fermée";
$R_wait = "Patientez un instant ....";
$R_state_label = "Etat";
$R_session_id_label = "Session ID";
$R_max_session_time_label = "Temps de connexion autoris&eacute";
$R_max_idle_time_label = "Inactivit&eacute; max. autoris&eacute;e";
$R_start_time_label = "D&eacute;but de connexion";
$R_session_time_label = "Dur&eacute;e de connexion";
$R_idle_time_label = "Inactivit&eacute;";
$R_downloaded_label = "Donn&eacute;es t&eacute;l&eacute;charg&eacute;es";
$R_uploaded_label = "Donn&eacute;es envoy&eacute;es";
$R_original_url_label = "URL demand&eacute;";
$R_not_available = "Not available"; //à traduire
$R_na = "N/A"; //à traduire
$R_error = "erreur";
$R_welcome = "Bienvenue";
}
else {
$R_login1 = "Successful authentication.";
$R_login2 = "Closing this window interrupts your session.";
$R_logout = "Closing connection";
$R_logout_question = "Are you sure you want to disconnect now?";
$R_loggedout = "Your session is closed";
$R_wait = "Please wait a moment ...";
$R_state_label = "State";
$R_session_id_label = "Session ID";
$R_max_session_time_label = "Max Session Time";
$R_max_idle_time_label = "Max Idle Time";
$R_start_time_label = "Start Time";
$R_session_time_label = "Session Time";
$R_idle_time_label = "Idle Time";
$R_downloaded_label = "Downloaded";
$R_uploaded_label = "Uploaded";
$R_original_url_label = "Original URL";
$R_not_available = "Not available";
$R_na = "N/A";
$R_error = "error";
$R_welcome = "Welcome";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="fr">
<!-- written by steweb57 -->
<head>
<title>Alcasar - <?php echo $organisme; ?></title>
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="./js/ChilliLibrary.js"></script>
<script type="text/javascript" src="./js/statusControler.js"></script>
<link type="text/css" href="./css/status.css" rel="stylesheet">
<script language="JavaScript">
function closePopup(){
this.focus();
self.opener=this;
self.close();
}
 
var isloggedout = false;
 
function alcasarLogoff(){
//pb sous Safari et Opera (OnbeforeUnload)
if (isloggedout === false){
chilliClock.stop();
chilliController.logoff();
showWaitPage(5000);
alert("<?php echo $R_loggedout; ?>");
}
isloggedout = true;
}
function logout() {
alcasarLogoff();
window.setTimeout("closePopup()",1000);
}
function logoutWithConfirmation(msg) {//"Are you sure you want to disconnect now?"
if (confirm(msg)) {
logout();
}
return false;
}
</script>
</head>
<body OnbeforeUnload="javascript:alcasarLogoff();">
<div id="Chilli">
<div id="locationName"></div>
<div id="chilliPage">
<div id="loggedOutPage" class="c1">
<table id="disconnectTable">
<tr>
<td><img height="150" src="./images/logo-alcasar.png" alt="logo"></td>
<td>
<p class="text_auth"><?php echo $R_loggedout; ?></p>
</td>
</tr>
</table>
</div>
<div id="statusPage" class="c1">
<table border="0" id="statusTable"><!-- style="padding-top:4px;font-size:70%" -->
<tr>
<td rowspan="2" valign="top"><img height="150" src="./images/logo-alcasar.png" alt="logo"></td>
<td>
<p class="text_auth"><?php echo $R_welcome; ?> <span id="userName"></span>.</p>
<p class="text_auth"><?php echo $R_login1; ?></p>
<hr>
<?php echo $R_login2; ?></td>
</tr>
<tr>
<td align="center"><br>
<a href="#" onclick="return logoutWithConfirmation('<?php echo $R_logout_question;?>');" class="lien_deco"><?php echo $R_logout; ?></a><br>
<br></td>
</tr>
<!--tr id="connectRow">
<td id="statusMessageLabel" class="chilliLabel"><strong><?php echo $R_state_label; ?></strong></td>
<td id="statusMessage" class="chilliValue">Connected</td>
</tr-->
<!--tr id="sessionIdRow">
<td id="sessionIdLabel" class="chilliLabel"><strong><?php echo $R_session_id_label; ?></strong></td>
<td id="sessionId" class="chilliValue"><?php echo $R_not_available; ?></td>
</tr-->
<tr id="sessionTimeoutRow">
<td id="sessionTimeoutLabel" class="chilliLabel"><strong><?php echo $R_max_session_time_label; ?></strong></td>
<td id="sessionTimeout" class="chilliValue"><?php echo $R_not_available; ?></td>
</tr>
<tr id="idleTimeoutRow">
<td id="idleTimeoutLabel" class="chilliLabel"><strong><?php echo $R_max_idle_time_label; ?></strong></td>
<td id="idleTimeout" class="chilliValue"><?php echo $R_not_available; ?></td>
</tr>
<tr id="startTimeRow">
<td id="startTimeLabel" class="chilliLabel"><strong><?php echo $R_start_time_label; ?></strong></td>
<td id="startTime" class="chilliValue"><?php echo $R_not_available; ?></td>
</tr>
<tr id="sessionTimeRow">
<td id="sessionTimeLabel" class="chilliLabel"><strong><?php echo $R_session_time_label; ?></strong></td>
<td id="sessionTime" class="chilliValue"><?php echo $R_not_available; ?></td>
</tr>
<tr id="idleTimeRow">
<td id="idleTimeLabel" class="chilliLabel"><strong><?php echo $R_idle_time_label; ?></strong></td>
<td id="idleTime" class="chilliValue"><?php echo $R_not_available; ?></td>
</tr>
<tr id="inputOctetsRow">
<td id="inputOctetsLabel" class="chilliLabel"><strong><?php echo $R_downloaded_label; ?></strong></td>
<td id="inputOctets" class="chilliValue"><?php echo $R_na; ?></td>
</tr>
<tr id="outputOctetsRow">
<td id="outputOctetsLabel" class="chilliLabel"><strong><?php echo $R_uploaded_label; ?></strong></td>
<td id="outputOctets" class="chilliValue"><?php echo $R_na; ?></td>
</tr>
<tr id="originalURLRow">
<td id="originalURLLabel" class="chilliLabel"><strong><?php echo $R_original_url_label; ?></strong></td>
<td id="originalURL" class="chilliValue"><?php echo $R_na; ?></td>
</tr>
</table>
</div>
<div id="waitPage">
<table id="waitTable">
<tr>
<td><img height="150" src="./images/logo-alcasar.png" alt="logo"></td>
<td>
<p class="text_auth"><img src="./images/wait.gif" width="16" height="16" class="wait" alt="<?php echo $R_wait; ?>"><?php echo $R_wait; ?></p>
</td>
</tr>
</table>
</div>
<div id="errorPage">
<table id="errorTable">
<tr>
<td><img height="150" src="./images/logo-alcasar.png" alt="logo"></td>
<td><span id="errorMessage"><?php echo $R_error; ?></span></td>
</tr>
</table>
</div>
</div>
<!--div id="debugPage" style="display:inline;">
<textarea id="debugarea" rows="20" cols="60">
</textarea>
</div--></div>
</body>
</html>
<?php
#
# status.php for Alcasar captive portal
# by steweb57
#
$organisme = "";
 
# Choice of language
//reste quelques traductions à faire
$Language = 'en';
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
if($Language == 'es'){
$l_login1 = "El éxito de la autenticación.";
$l_login2 = "Cierre esta ventana interrumpte la sesion.";
$l_logout = "Conexión de cierre";
$l_logout_question = "Are you sure you want to disconnect now?"; //à traduire
$l_loggedout = "Su sesión se cierra";
$l_wait = "Por favor, espere un momento ...";
$l_state_label = "State"; //à traduire
$l_session_id_label = "Session ID"; //à traduire
$l_max_session_time_label = "Max Session Time"; //à traduire
$l_max_idle_time_label = "Max Idle Time"; //à traduire
$l_start_time_label = "Start Time"; //à traduire
$l_session_time_label = "Tiempo de conexión";
$l_idle_time_label = "Idle Time"; //à traduire
$l_downloaded_label = "Downloaded"; //à traduire
$l_uploaded_label = "Uploaded"; //à traduire
$l_original_url_label = "Original URL"; //à traduire
$l_not_available = "Not available"; //à traduire
$l_na = "N/A"; //à traduire
$l_error = "error"; //à traduire
$l_welcome = "Welcome"; //à traduire
}
else if($Language == 'de'){
$l_login1 = "Erfolgreiche Authentifizierung.";
$l_login2 = "Schlißen dieses fensters unterbricht die sitzung";
$l_logout = "Beenden der Verbindung";
$l_logout_question = "Are you sure you want to disconnect now?"; //à traduire
$l_loggedout = "Ihre Sitzung ist geschlossen";
$l_wait = "Bitte warten Sie einen Moment ...";
$l_state_label = "State"; //à traduire
$l_session_id_label = "Session ID"; //à traduire
$l_max_session_time_label = "Max Session Time"; //à traduire
$l_max_idle_time_label = "Max Idle Time"; //à traduire
$l_start_time_label = "Start Time"; //à traduire
$l_session_time_label = "Online-zeit";
$l_idle_time_label = "Idle Time"; //à traduire
$l_downloaded_label = "Downloaded"; //à traduire
$l_uploaded_label = "Uploaded"; //à traduire
$l_original_url_label = "Original URL"; //à traduire
$l_not_available = "Not available"; //à traduire
$l_na = "N/A"; //à traduire
$l_error = "error"; //à traduire
$l_welcome = "Welcome"; //à traduire
}
else if($Language == 'nl'){
$l_login1 = "Succesvolle authenticatie.";
$l_login2 = "Dit venster te sluiten onderbreekt uw sessie.";
$l_logout = "Slotkoers verbinding";
$l_logout_question = "Are you sure you want to disconnect now?"; //à traduire
$l_loggedout = "Uw sessie is gesloten";
$l_wait = "Wacht een moment ...";
$l_state_label = "State"; //à traduire
$l_session_id_label = "Session ID"; //à traduire
$l_max_session_time_label = "Max Session Time"; //à traduire
$l_max_idle_time_label = "Max Idle Time"; //à traduire
$l_start_time_label = "Start Time"; //à traduire
$l_session_time_label = "Online tijd";
$l_idle_time_label = "Idle Time"; //à traduire
$l_downloaded_label = "Downloaded"; //à traduire
$l_uploaded_label = "Uploaded"; //à traduire
$l_original_url_label = "Original URL"; //à traduire
$l_not_available = "Not available"; //à traduire
$l_na = "N/A"; //à traduire
$l_error = "error"; //à traduire
$l_welcome = "Welcome"; //à traduire
}
else if($Language == 'fr'){
$l_login1 = "Authentification r&eacute;ussie.";
$l_login2 = "La fermeture de cette fenêtre interrompt votre session.";
$l_logout = "Fermeture de la session";
$l_logout_question = "Etes vous sûre de vouloir vous déconnecter?";
$l_loggedout = "Votre session est fermée";
$l_wait = "Patientez un instant ....";
$l_state_label = "Etat";
$l_session_id_label = "Session ID";
$l_max_session_time_label = "Temps de connexion autoris&eacute";
$l_max_idle_time_label = "Inactivit&eacute; max. autoris&eacute;e";
$l_start_time_label = "D&eacute;but de connexion";
$l_session_time_label = "Dur&eacute;e de connexion";
$l_idle_time_label = "Inactivit&eacute;";
$l_downloaded_label = "Donn&eacute;es t&eacute;l&eacute;charg&eacute;es";
$l_uploaded_label = "Donn&eacute;es envoy&eacute;es";
$l_original_url_label = "URL demand&eacute;";
$l_not_available = "Non disponible";
$l_na = "N/D"; //à traduire
$l_error = "erreur";
$l_welcome = "Bienvenue";
}
else {
$l_login1 = "Successful authentication.";
$l_login2 = "Closing this window interrupts your session.";
$l_logout = "Closing connection";
$l_logout_question = "Are you sure you want to disconnect now?";
$l_loggedout = "Your session is closed";
$l_wait = "Please wait a moment ...";
$l_state_label = "State";
$l_session_id_label = "Session ID";
$l_max_session_time_label = "Max Session Time";
$l_max_idle_time_label = "Max Idle Time";
$l_start_time_label = "Start Time";
$l_session_time_label = "Session Time";
$l_idle_time_label = "Idle Time";
$l_downloaded_label = "Downloaded";
$l_uploaded_label = "Uploaded";
$l_original_url_label = "Original URL";
$l_not_available = "Not available";
$l_na = "N/A";
$l_error = "error";
$l_welcome = "Welcome";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="fr">
<!-- written by steweb57 -->
<head>
<title>Alcasar - <?php echo $organisme; ?></title>
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="./js/ChilliLibrary.js"></script>
<script type="text/javascript" src="./js/statusControler.js"></script>
<link type="text/css" href="./css/status.css" rel="stylesheet">
<script language="JavaScript">
if (typeof isloggedout = 'undefined') isloggedout = true;
function closePopup(){
this.focus();
self.opener=this;
self.close();
}
function alcasarLogoff(){
//pb sous Safari et Opera (OnbeforeUnload)
if (isloggedout === false){
chilliClock.stop();
chilliController.logoff();
showWaitPage(5000);
alert("<?php echo $l_loggedout; ?>");
}
isloggedout = true;
}
function logout() {
alcasarLogoff();
window.setTimeout("closePopup()",1000);
}
function logoutWithConfirmation(msg) {
if (confirm(msg)) {
logout();
}
return false;
}
</script>
</head>
<body OnbeforeUnload="javascript:alcasarLogoff();">
<div id="Chilli">
<div id="locationName"></div>
<div id="chilliPage">
<div id="loggedOutPage" class="c1">
<table id="disconnectTable">
<tr>
<td><img height="150" src="./images/logo-alcasar.png" alt="logo"></td>
<td>
<p class="text_auth"><?php echo $l_loggedout; ?></p>
</td>
</tr>
</table>
</div>
<div id="statusPage" class="c1">
<table border="0" id="statusTable"><!-- style="padding-top:4px;font-size:70%" -->
<tr>
<td rowspan="2" valign="top"><img height="150" src="./images/logo-alcasar.png" alt="logo"></td>
<td>
<p class="text_auth"><?php echo $l_welcome; ?> <span id="userName"></span>.</p>
<p class="text_auth"><?php echo $l_login1; ?></p>
<hr>
<?php echo $l_login2; ?></td>
</tr>
<tr>
<td align="center"><br>
<a href="#" onclick="return logoutWithConfirmation('<?php echo $l_logout_question;?>');" class="lien_deco"><?php echo $l_logout; ?></a><br>
<br></td>
</tr>
<!--tr id="connectRow">
<td id="statusMessageLabel" class="chilliLabel"><strong><?php echo $l_state_label; ?></strong></td>
<td id="statusMessage" class="chilliValue">Connected</td>
</tr-->
<!--tr id="sessionIdRow">
<td id="sessionIdLabel" class="chilliLabel"><strong><?php echo $l_session_id_label; ?></strong></td>
<td id="sessionId" class="chilliValue"><?php echo $l_not_available; ?></td>
</tr-->
<tr id="sessionTimeoutRow">
<td id="sessionTimeoutLabel" class="chilliLabel"><strong><?php echo $l_max_session_time_label; ?></strong></td>
<td id="sessionTimeout" class="chilliValue"><?php echo $l_not_available; ?></td>
</tr>
<tr id="idleTimeoutRow">
<td id="idleTimeoutLabel" class="chilliLabel"><strong><?php echo $l_max_idle_time_label; ?></strong></td>
<td id="idleTimeout" class="chilliValue"><?php echo $l_not_available; ?></td>
</tr>
<tr id="startTimeRow">
<td id="startTimeLabel" class="chilliLabel"><strong><?php echo $l_start_time_label; ?></strong></td>
<td id="startTime" class="chilliValue"><?php echo $l_not_available; ?></td>
</tr>
<tr id="sessionTimeRow">
<td id="sessionTimeLabel" class="chilliLabel"><strong><?php echo $l_session_time_label; ?></strong></td>
<td id="sessionTime" class="chilliValue"><?php echo $l_not_available; ?></td>
</tr>
<tr id="idleTimeRow">
<td id="idleTimeLabel" class="chilliLabel"><strong><?php echo $l_idle_time_label; ?></strong></td>
<td id="idleTime" class="chilliValue"><?php echo $l_not_available; ?></td>
</tr>
<tr id="inputOctetsRow">
<td id="inputOctetsLabel" class="chilliLabel"><strong><?php echo $l_downloaded_label; ?></strong></td>
<td id="inputOctets" class="chilliValue"><?php echo $l_na; ?></td>
</tr>
<tr id="outputOctetsRow">
<td id="outputOctetsLabel" class="chilliLabel"><strong><?php echo $l_uploaded_label; ?></strong></td>
<td id="outputOctets" class="chilliValue"><?php echo $l_na; ?></td>
</tr>
<tr id="originalURLRow">
<td id="originalURLLabel" class="chilliLabel"><strong><?php echo $l_original_url_label; ?></strong></td>
<td id="originalURL" class="chilliValue"><?php echo $l_na; ?></td>
</tr>
</table>
</div>
<div id="waitPage">
<table id="waitTable">
<tr>
<td><img height="150" src="./images/logo-alcasar.png" alt="logo"></td>
<td>
<p class="text_auth"><img src="./images/wait.gif" width="16" height="16" class="wait" alt="<?php echo $l_wait; ?>"><?php echo $l_wait; ?></p>
</td>
</tr>
</table>
</div>
<div id="errorPage">
<table id="errorTable">
<tr>
<td><img height="150" src="./images/logo-alcasar.png" alt="logo"></td>
<td><span id="errorMessage"><?php echo $l_error; ?></span></td>
</tr>
</table>
</div>
</div>
<!--div id="debugPage" style="display:inline;">
<textarea id="debugarea" rows="20" cols="60">
</textarea>
</div--></div>
</body>
</html>
/web/js/statusControler.js
4,6 → 4,7
chilliController.onUpdate = updateUI ;
chilliController.onError = handleError ;
chilliClock.onTick = function () { }
var isloggedout = false;
 
if (!window.queryObj) {
window.queryObj = new Object();
125,6 → 126,7
 
/* User interface pages update */
function showLoggedOutPage() {
isloggedout = true;
showPage("loggedOutPage");
hidePage("statusPage");
hidePage("waitPage");
133,6 → 135,7
}
 
function showStatusPage() {
isloggedout = false;
hidePage("loggedOutPage");
showPage("statusPage");
hidePage("waitPage");
228,4 → 231,4
}
showWaitPage();
setTimeout('chilliController.refresh()', 500);
}
}