Subversion Repositories ALCASAR

Rev

Rev 523 | Rev 533 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

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