Rev 484 | Rev 528 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log
<?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_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";
$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";
}
else if($Language == 'de'){
$R_login1 = "Erfolgreiche Authentifizierung.";
$R_login2 = "Schlißen dieses fensters unterbricht die sitzung";
$R_logout = "Beenden der Verbindung";
$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";
$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";
}
else if($Language == 'nl'){
$R_login1 = "Succesvolle authenticatie.";
$R_login2 = "Dit venster te sluiten onderbreekt uw sessie.";
$R_logout = "Slotkoers verbinding";
$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";
$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";
}
else if($Language == 'fr'){
$R_login1 = "Authentification réussie.";
$R_login2 = "La fermeture de cette fenêtre interrompt votre session.";
$R_logout = "Fermeture de la session";
$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é";
$R_max_idle_time_label = "Inactivité max. autorisée";
$R_start_time_label = "Début de connexion";
$R_session_time_label = "Durée de connexion";
$R_idle_time_label = "Inactivité";
$R_downloaded_label = "Données téléchargées";
$R_uploaded_label = "Données envoyées";
$R_original_url_label = "URL demandé";
$R_not_available = "Not available";
$R_na = "N/A";
$R_error = "erreur";
}
else {
$R_login1 = "Successful authentication.";
$R_login2 = "Closing this window interrupts your session.";
$R_logout = "Closing connection";
$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";
}
?>
<!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">
var blur = 0;
var starttime = new Date();
var startclock = starttime.getTime();
var mytimeleft = 0;
function closePopup(){
this.focus();
self.opener=this;
self.close();
}
function alcasarLogoff(){
chilliClock.stop();
chilliController.logoff();
//showWaitPage(5000);
}
function logout() {
alcasarLogoff();
window.setTimeout("closePopup()",1000);
}
function logoutWithConfirmation(msg) {//"Are you sure you want to disconnect now?"
if (confirm(msg)) {
logout();
}
return false;
}
function logoutWithAlert(msg) {//"Are you sure you want to disconnect now?"
alert(msg);
logout();
}
function doTime() {
window.setTimeout( "doTime()", 1000 );
t = new Date();
time = Math.round((t.getTime() - starttime.getTime())/1000);
if (mytimeleft) {
time = mytimeleft - time;
if (time <= 0) {
alert("Votre session est terminée");
}
}
if (time < 0) time = 0;
hours = (time - (time % 3600)) / 3600;
time = time - (hours * 3600);
mins = (time - (time % 60)) / 60;
secs = time - (mins * 60);
if (hours < 10) hours = "0" + hours;
if (mins < 10) mins = "0" + mins;
if (secs < 10) secs = "0" + secs;
title = "$R_online_time : " + hours + ":" + mins + ":" + secs;
if (mytimeleft) {
title = "$R_remaining_time : " + hours + ":" + mins + ":" + secs;
}
if(document.all || document.getElementById){
document.title = title;
}
else {
self.status = title;
}
}
</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">Bienvenue <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('Are you sure you want to disconnect now?');" 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="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>