Subversion Repositories ALCASAR

Rev

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