Subversion Repositories ALCASAR

Rev

Rev 503 | Rev 528 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
475 stephane 1
<?php
2
#
3
# status.php for Alcasar captive portal
4
# by steweb57
5
# 
503 richard 6
$organisme = "";
475 stephane 7
 
8
# Choice of language
9
//reste quelques traductions à faire
10
$Language = 'en';
11
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
12
  $Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
13
  $Language = strtolower(substr(chop($Langue[0]),0,2)); }
14
if($Language == 'es'){
15
	$R_login1			= "El éxito de la autenticación.";
16
	$R_login2			= "Cierre esta ventana interrumpte la sesion.";
17
	$R_logout			= "Conexión de cierre";
523 stephane 18
	$R_logout_question	= "Are you sure you want to disconnect now?";	//à traduire
475 stephane 19
	$R_loggedout		= "Su sesión se cierra";
20
	$R_wait				= "Por favor, espere un momento ...";
21
	$R_state_label				= "State";
22
	$R_session_id_label			= "Session ID";
23
	$R_max_session_time_label	= "Max Session Time";
24
	$R_max_idle_time_label		= "Max Idle Time";
25
	$R_start_time_label			= "Start Time";
26
	$R_session_time_label		= "Tiempo de conexión";
523 stephane 27
	$R_idle_time_label			= "Idle Time";	//à traduire
28
	$R_downloaded_label			= "Downloaded";	//à traduire
29
	$R_uploaded_label			= "Uploaded";	//à traduire
30
	$R_original_url_label		= "Original URL";	//à traduire
31
	$R_not_available			= "Not available";	//à traduire
32
	$R_na						= "N/A";		//à traduire
33
	$R_error					= "error";		//à traduire
34
	$R_welcome					= "Welcome";	//à traduire
475 stephane 35
}
36
else if($Language == 'de'){
37
	$R_login1			= "Erfolgreiche Authentifizierung.";
38
	$R_login2			= "Schlißen dieses fensters unterbricht die sitzung";
39
	$R_logout			= "Beenden der Verbindung";
523 stephane 40
	$R_logout_question	= "Are you sure you want to disconnect now?";	//à traduire
475 stephane 41
	$R_loggedout		= "Ihre Sitzung ist geschlossen";
42
	$R_wait				= "Bitte warten Sie einen Moment ...";
43
	$R_state_label				= "State";
44
	$R_session_id_label			= "Session ID";
45
	$R_max_session_time_label	= "Max Session Time";
46
	$R_max_idle_time_label		= "Max Idle Time";
47
	$R_start_time_label			= "Start Time";
48
	$R_session_time_label		= "Online-zeit";
523 stephane 49
	$R_idle_time_label			= "Idle Time";	//à traduire
50
	$R_downloaded_label			= "Downloaded";	//à traduire
51
	$R_uploaded_label			= "Uploaded";	//à traduire
52
	$R_original_url_label		= "Original URL";	//à traduire
53
	$R_not_available			= "Not available";	//à traduire
54
	$R_na						= "N/A";		//à traduire
55
	$R_error					= "error";		//à traduire
56
	$R_welcome					= "Welcome"; 	//à traduire
475 stephane 57
}
58
else if($Language == 'nl'){
59
	$R_login1			= "Succesvolle authenticatie.";
60
	$R_login2			= "Dit venster te sluiten onderbreekt uw sessie.";
61
	$R_logout			= "Slotkoers verbinding";
523 stephane 62
	$R_logout_question	= "Are you sure you want to disconnect now?";	//à traduire
475 stephane 63
	$R_loggedout		= "Uw sessie is gesloten";
64
	$R_wait				= "Wacht een moment ...";
65
	$R_state_label				= "State";
66
	$R_session_id_label			= "Session ID";
67
	$R_max_session_time_label	= "Max Session Time";
68
	$R_max_idle_time_label		= "Max Idle Time";
69
	$R_start_time_label			= "Start Time";
70
	$R_session_time_label		= "Online tijd";
523 stephane 71
	$R_idle_time_label			= "Idle Time";	//à traduire
72
	$R_downloaded_label			= "Downloaded";	//à traduire
73
	$R_uploaded_label			= "Uploaded";	//à traduire
74
	$R_original_url_label		= "Original URL";	//à traduire
75
	$R_not_available			= "Not available";	//à traduire
76
	$R_na						= "N/A";		//à traduire
77
	$R_error					= "error";		//à traduire
78
	$R_welcome					= "Welcome";	//à traduire
475 stephane 79
}
80
else if($Language == 'fr'){
81
	$R_login1			= "Authentification r&eacute;ussie.";
82
	$R_login2			= "La fermeture de cette fenêtre interrompt votre session.";
83
	$R_logout			= "Fermeture de la session";
523 stephane 84
	$R_logout_question	= "Etes vous sûre de vouloir vous déconnecter?";
475 stephane 85
	$R_loggedout		= "Votre session est fermée";
86
	$R_wait				= "Patientez un instant ....";
87
	$R_state_label				= "Etat";
88
	$R_session_id_label			= "Session ID";
89
	$R_max_session_time_label	= "Temps de connexion autoris&eacute";
90
	$R_max_idle_time_label		= "Inactivit&eacute; max. autoris&eacute;e";
91
	$R_start_time_label			= "D&eacute;but de connexion";
92
	$R_session_time_label		= "Dur&eacute;e de connexion";
93
	$R_idle_time_label			= "Inactivit&eacute;";
94
	$R_downloaded_label			= "Donn&eacute;es t&eacute;l&eacute;charg&eacute;es";
95
	$R_uploaded_label			= "Donn&eacute;es envoy&eacute;es";
96
	$R_original_url_label		= "URL demand&eacute;";
523 stephane 97
	$R_not_available			= "Not available";	//à traduire
98
	$R_na						= "N/A";	//à traduire
484 stephane 99
	$R_error					= "erreur";
523 stephane 100
	$R_welcome					= "Bienvenue";
475 stephane 101
}
102
else {
103
	$R_login1			= "Successful authentication.";
104
	$R_login2			= "Closing this window interrupts your session.";
105
	$R_logout			= "Closing connection";
523 stephane 106
	$R_logout_question	= "Are you sure you want to disconnect now?";
475 stephane 107
	$R_loggedout		= "Your session is closed";
108
	$R_wait				= "Please wait a moment ...";
109
	$R_state_label				= "State";
110
	$R_session_id_label			= "Session ID";
111
	$R_max_session_time_label	= "Max Session Time";
112
	$R_max_idle_time_label		= "Max Idle Time";
113
	$R_start_time_label			= "Start Time";
114
	$R_session_time_label		= "Session Time";
115
	$R_idle_time_label			= "Idle Time";
116
	$R_downloaded_label			= "Downloaded";
117
	$R_uploaded_label			= "Uploaded";
118
	$R_original_url_label		= "Original URL";
484 stephane 119
	$R_not_available			= "Not available";
120
	$R_na						= "N/A";
121
	$R_error					= "error";
523 stephane 122
	$R_welcome					= "Welcome";
475 stephane 123
}
124
?>
125
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
126
<html lang="fr">
127
<!-- written by steweb57 -->
128
<head>
129
<title>Alcasar - <?php echo $organisme; ?></title>
484 stephane 130
<meta http-equiv="Cache-control" content="no-cache">
131
<meta http-equiv="Pragma" content="no-cache">
475 stephane 132
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
484 stephane 133
<script type="text/javascript" src="./js/ChilliLibrary.js"></script>
134
<script type="text/javascript" src="./js/statusControler.js"></script>
135
<link type="text/css" href="./css/status.css" rel="stylesheet">
136
<script language="JavaScript">
523 stephane 137
	function closePopup(){
138
		this.focus();
139
		self.opener=this;
140
		self.close();
484 stephane 141
	}
523 stephane 142
 
143
	var isloggedout = false;
144
 
145
  	function alcasarLogoff(){
146
	//pb sous Safari et Opera (OnbeforeUnload)
147
		if (isloggedout === false){
148
	  		chilliClock.stop();
149
			chilliController.logoff();
150
			showWaitPage(5000);	
151
			alert("<?php echo $R_loggedout; ?>");
152
		}
153
		isloggedout = true;
154
	}
484 stephane 155
	function logout() {
156
		alcasarLogoff();
157
		window.setTimeout("closePopup()",1000);
158
	}
159
	function logoutWithConfirmation(msg) {//"Are you sure you want to disconnect now?"
160
		if (confirm(msg)) {
161
			logout();
162
		}
163
		return false;
164
	}
475 stephane 165
</script>
166
</head>
484 stephane 167
<body OnbeforeUnload="javascript:alcasarLogoff();">
475 stephane 168
<div id="Chilli">
169
<div id="locationName"></div>
170
<div id="chilliPage">
484 stephane 171
<div id="loggedOutPage" class="c1">
475 stephane 172
<table id="disconnectTable">
173
<tr>
174
<td><img height="150" src="./images/logo-alcasar.png" alt="logo"></td>
175
<td>
176
<p class="text_auth"><?php echo $R_loggedout; ?></p>
177
</td>
178
</tr>
179
</table>
180
</div>
181
<div id="statusPage" class="c1">
182
<table border="0" id="statusTable"><!-- style="padding-top:4px;font-size:70%" -->
183
<tr>
184
<td rowspan="2" valign="top"><img height="150" src="./images/logo-alcasar.png" alt="logo"></td>
185
<td>
523 stephane 186
<p class="text_auth"><?php echo $R_welcome; ?> <span id="userName"></span>.</p>
475 stephane 187
<p class="text_auth"><?php echo $R_login1; ?></p>
188
<hr>
189
<?php echo $R_login2; ?></td>
190
</tr>
191
<tr>
192
<td align="center"><br>
523 stephane 193
<a href="#" onclick="return logoutWithConfirmation('<?php echo $R_logout_question;?>');" class="lien_deco"><?php echo $R_logout; ?></a><br>
475 stephane 194
<br></td>
195
</tr>
196
<!--tr id="connectRow">
197
<td id="statusMessageLabel" class="chilliLabel"><strong><?php echo $R_state_label; ?></strong></td>
198
<td id="statusMessage" class="chilliValue">Connected</td>
199
</tr-->
200
<!--tr id="sessionIdRow">
201
<td id="sessionIdLabel" class="chilliLabel"><strong><?php echo $R_session_id_label; ?></strong></td>
484 stephane 202
<td id="sessionId" class="chilliValue"><?php echo $R_not_available; ?></td>
475 stephane 203
</tr-->
204
<tr id="sessionTimeoutRow">
205
<td id="sessionTimeoutLabel" class="chilliLabel"><strong><?php echo $R_max_session_time_label; ?></strong></td>
484 stephane 206
<td id="sessionTimeout" class="chilliValue"><?php echo $R_not_available; ?></td>
475 stephane 207
</tr>
208
<tr id="idleTimeoutRow">
209
<td id="idleTimeoutLabel" class="chilliLabel"><strong><?php echo $R_max_idle_time_label; ?></strong></td>
484 stephane 210
<td id="idleTimeout" class="chilliValue"><?php echo $R_not_available; ?></td>
475 stephane 211
</tr>
212
<tr id="startTimeRow">
213
<td id="startTimeLabel" class="chilliLabel"><strong><?php echo $R_start_time_label; ?></strong></td>
484 stephane 214
<td id="startTime" class="chilliValue"><?php echo $R_not_available; ?></td>
475 stephane 215
</tr>
216
<tr id="sessionTimeRow">
217
<td id="sessionTimeLabel" class="chilliLabel"><strong><?php echo $R_session_time_label; ?></strong></td>
484 stephane 218
<td id="sessionTime" class="chilliValue"><?php echo $R_not_available; ?></td>
475 stephane 219
</tr>
220
<tr id="idleTimeRow">
221
<td id="idleTimeLabel" class="chilliLabel"><strong><?php echo $R_idle_time_label; ?></strong></td>
484 stephane 222
<td id="idleTime" class="chilliValue"><?php echo $R_not_available; ?></td>
475 stephane 223
</tr>
224
<tr id="inputOctetsRow">
225
<td id="inputOctetsLabel" class="chilliLabel"><strong><?php echo $R_downloaded_label; ?></strong></td>
484 stephane 226
<td id="inputOctets" class="chilliValue"><?php echo $R_na; ?></td>
475 stephane 227
</tr>
228
<tr id="outputOctetsRow">
229
<td id="outputOctetsLabel" class="chilliLabel"><strong><?php echo $R_uploaded_label; ?></strong></td>
484 stephane 230
<td id="outputOctets" class="chilliValue"><?php echo $R_na; ?></td>
475 stephane 231
</tr>
232
<tr id="originalURLRow">
233
<td id="originalURLLabel" class="chilliLabel"><strong><?php echo $R_original_url_label; ?></strong></td>
484 stephane 234
<td id="originalURL" class="chilliValue"><?php echo $R_na; ?></td>
475 stephane 235
</tr>
236
</table>
237
</div>
238
<div id="waitPage">
239
<table id="waitTable">
240
<tr>
241
<td><img height="150" src="./images/logo-alcasar.png" alt="logo"></td>
242
<td>
523 stephane 243
<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>
475 stephane 244
</td>
245
</tr>
246
</table>
247
</div>
248
<div id="errorPage">
249
<table id="errorTable">
250
<tr>
251
<td><img height="150" src="./images/logo-alcasar.png" alt="logo"></td>
484 stephane 252
<td><span id="errorMessage"><?php echo $R_error; ?></span></td>
475 stephane 253
</tr>
254
</table>
255
</div>
256
</div>
257
<!--div id="debugPage" style="display:inline;">
258
<textarea id="debugarea" rows="20" cols="60">
259
</textarea>
260
</div--></div>
261
</body>
262
</html>