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";
|
|
|
30 |
}
|
|
|
31 |
else if($Language == 'de'){
|
|
|
32 |
$R_login1 = "Erfolgreiche Authentifizierung.";
|
|
|
33 |
$R_login2 = "Schlißen dieses fensters unterbricht die sitzung";
|
|
|
34 |
$R_logout = "Beenden der Verbindung";
|
|
|
35 |
$R_loggedout = "Ihre Sitzung ist geschlossen";
|
|
|
36 |
$R_wait = "Bitte warten Sie einen Moment ...";
|
|
|
37 |
$R_state_label = "State";
|
|
|
38 |
$R_session_id_label = "Session ID";
|
|
|
39 |
$R_max_session_time_label = "Max Session Time";
|
|
|
40 |
$R_max_idle_time_label = "Max Idle Time";
|
|
|
41 |
$R_start_time_label = "Start Time";
|
|
|
42 |
$R_session_time_label = "Online-zeit";
|
|
|
43 |
$R_idle_time_label = "Idle Time";
|
|
|
44 |
$R_downloaded_label = "Downloaded";
|
|
|
45 |
$R_uploaded_label = "Uploaded";
|
|
|
46 |
$R_original_url_label = "Original URL";
|
|
|
47 |
}
|
|
|
48 |
else if($Language == 'nl'){
|
|
|
49 |
$R_login1 = "Succesvolle authenticatie.";
|
|
|
50 |
$R_login2 = "Dit venster te sluiten onderbreekt uw sessie.";
|
|
|
51 |
$R_logout = "Slotkoers verbinding";
|
|
|
52 |
$R_loggedout = "Uw sessie is gesloten";
|
|
|
53 |
$R_wait = "Wacht een moment ...";
|
|
|
54 |
$R_state_label = "State";
|
|
|
55 |
$R_session_id_label = "Session ID";
|
|
|
56 |
$R_max_session_time_label = "Max Session Time";
|
|
|
57 |
$R_max_idle_time_label = "Max Idle Time";
|
|
|
58 |
$R_start_time_label = "Start Time";
|
|
|
59 |
$R_session_time_label = "Online tijd";
|
|
|
60 |
$R_idle_time_label = "Idle Time";
|
|
|
61 |
$R_downloaded_label = "Downloaded";
|
|
|
62 |
$R_uploaded_label = "Uploaded";
|
|
|
63 |
$R_original_url_label = "Original URL";
|
|
|
64 |
}
|
|
|
65 |
else if($Language == 'fr'){
|
|
|
66 |
$R_login1 = "Authentification réussie.";
|
|
|
67 |
$R_login2 = "La fermeture de cette fenêtre interrompt votre session.";
|
|
|
68 |
$R_logout = "Fermeture de la session";
|
|
|
69 |
$R_loggedout = "Votre session est fermée";
|
|
|
70 |
$R_wait = "Patientez un instant ....";
|
|
|
71 |
$R_state_label = "Etat";
|
|
|
72 |
$R_session_id_label = "Session ID";
|
|
|
73 |
$R_max_session_time_label = "Temps de connexion autorisé";
|
|
|
74 |
$R_max_idle_time_label = "Inactivité max. autorisée";
|
|
|
75 |
$R_start_time_label = "Début de connexion";
|
|
|
76 |
$R_session_time_label = "Durée de connexion";
|
|
|
77 |
$R_idle_time_label = "Inactivité";
|
|
|
78 |
$R_downloaded_label = "Données téléchargées";
|
|
|
79 |
$R_uploaded_label = "Données envoyées";
|
|
|
80 |
$R_original_url_label = "URL demandé";
|
|
|
81 |
}
|
|
|
82 |
else {
|
|
|
83 |
$R_login1 = "Successful authentication.";
|
|
|
84 |
$R_login2 = "Closing this window interrupts your session.";
|
|
|
85 |
$R_logout = "Closing connection";
|
|
|
86 |
$R_loggedout = "Your session is closed";
|
|
|
87 |
$R_wait = "Please wait a moment ...";
|
|
|
88 |
$R_state_label = "State";
|
|
|
89 |
$R_session_id_label = "Session ID";
|
|
|
90 |
$R_max_session_time_label = "Max Session Time";
|
|
|
91 |
$R_max_idle_time_label = "Max Idle Time";
|
|
|
92 |
$R_start_time_label = "Start Time";
|
|
|
93 |
$R_session_time_label = "Session Time";
|
|
|
94 |
$R_idle_time_label = "Idle Time";
|
|
|
95 |
$R_downloaded_label = "Downloaded";
|
|
|
96 |
$R_uploaded_label = "Uploaded";
|
|
|
97 |
$R_original_url_label = "Original URL";
|
|
|
98 |
}
|
|
|
99 |
/*
|
|
|
100 |
Connected
|
|
|
101 |
logout
|
|
|
102 |
Connected
|
|
|
103 |
Not available
|
|
|
104 |
N/A
|
|
|
105 |
*/
|
|
|
106 |
?>
|
|
|
107 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
|
108 |
<html lang="fr">
|
|
|
109 |
<!-- written by steweb57 -->
|
|
|
110 |
<head>
|
|
|
111 |
<title>Alcasar - <?php echo $organisme; ?></title>
|
|
|
112 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
113 |
<script type="text/javascript" src="./js/ChilliLibrary.js">
|
|
|
114 |
</script>
|
|
|
115 |
<script type="text/javascript" src="./js/statusControler.js">
|
|
|
116 |
</script>
|
|
|
117 |
<link type="text/css" href="./css/status.css" rel="stylesheet">
|
|
|
118 |
</head>
|
|
|
119 |
<body>
|
|
|
120 |
<div id="Chilli">
|
|
|
121 |
<div id="locationName"></div>
|
|
|
122 |
<div id="chilliPage">
|
|
|
123 |
<div id="logonPage" class="c1">
|
|
|
124 |
<table id="disconnectTable">
|
|
|
125 |
<tr>
|
|
|
126 |
<td><img height="150" src="./images/logo-alcasar.png" alt="logo"></td>
|
|
|
127 |
<td>
|
|
|
128 |
<p class="text_auth"><?php echo $R_loggedout; ?></p>
|
|
|
129 |
</td>
|
|
|
130 |
</tr>
|
|
|
131 |
</table>
|
|
|
132 |
</div>
|
|
|
133 |
<div id="statusPage" class="c1">
|
|
|
134 |
<table border="0" id="statusTable"><!-- style="padding-top:4px;font-size:70%" -->
|
|
|
135 |
<tr>
|
|
|
136 |
<td rowspan="2" valign="top"><img height="150" src="./images/logo-alcasar.png" alt="logo"></td>
|
|
|
137 |
<td>
|
|
|
138 |
<p class="text_auth">Bienvenue <span id="userName"></span>.</p>
|
|
|
139 |
<p class="text_auth"><?php echo $R_login1; ?></p>
|
|
|
140 |
<hr>
|
|
|
141 |
<?php echo $R_login2; ?></td>
|
|
|
142 |
</tr>
|
|
|
143 |
<tr>
|
|
|
144 |
<td align="center"><br>
|
|
|
145 |
<a href="#" onclick="return disconnect();" class="lien_deco"><?php echo $R_logout; ?></a><br>
|
|
|
146 |
<br></td>
|
|
|
147 |
</tr>
|
|
|
148 |
<!--tr id="connectRow">
|
|
|
149 |
<td id="statusMessageLabel" class="chilliLabel"><strong><?php echo $R_state_label; ?></strong></td>
|
|
|
150 |
<td id="statusMessage" class="chilliValue">Connected</td>
|
|
|
151 |
</tr-->
|
|
|
152 |
<!--tr id="sessionIdRow">
|
|
|
153 |
<td id="sessionIdLabel" class="chilliLabel"><strong><?php echo $R_session_id_label; ?></strong></td>
|
|
|
154 |
<td id="sessionId" class="chilliValue">Not available</td>
|
|
|
155 |
</tr-->
|
|
|
156 |
<tr id="sessionTimeoutRow">
|
|
|
157 |
<td id="sessionTimeoutLabel" class="chilliLabel"><strong><?php echo $R_max_session_time_label; ?></strong></td>
|
|
|
158 |
<td id="sessionTimeout" class="chilliValue">Not available</td>
|
|
|
159 |
</tr>
|
|
|
160 |
<tr id="idleTimeoutRow">
|
|
|
161 |
<td id="idleTimeoutLabel" class="chilliLabel"><strong><?php echo $R_max_idle_time_label; ?></strong></td>
|
|
|
162 |
<td id="idleTimeout" class="chilliValue">Not available</td>
|
|
|
163 |
</tr>
|
|
|
164 |
<tr id="startTimeRow">
|
|
|
165 |
<td id="startTimeLabel" class="chilliLabel"><strong><?php echo $R_start_time_label; ?></strong></td>
|
|
|
166 |
<td id="startTime" class="chilliValue">Not available</td>
|
|
|
167 |
</tr>
|
|
|
168 |
<tr id="sessionTimeRow">
|
|
|
169 |
<td id="sessionTimeLabel" class="chilliLabel"><strong><?php echo $R_session_time_label; ?></strong></td>
|
|
|
170 |
<td id="sessionTime" class="chilliValue">Not available</td>
|
|
|
171 |
</tr>
|
|
|
172 |
<tr id="idleTimeRow">
|
|
|
173 |
<td id="idleTimeLabel" class="chilliLabel"><strong><?php echo $R_idle_time_label; ?></strong></td>
|
|
|
174 |
<td id="idleTime" class="chilliValue">Not available</td>
|
|
|
175 |
</tr>
|
|
|
176 |
<tr id="inputOctetsRow">
|
|
|
177 |
<td id="inputOctetsLabel" class="chilliLabel"><strong><?php echo $R_downloaded_label; ?></strong></td>
|
|
|
178 |
<td id="inputOctets" class="chilliValue">N/A</td>
|
|
|
179 |
</tr>
|
|
|
180 |
<tr id="outputOctetsRow">
|
|
|
181 |
<td id="outputOctetsLabel" class="chilliLabel"><strong><?php echo $R_uploaded_label; ?></strong></td>
|
|
|
182 |
<td id="outputOctets" class="chilliValue">N/A</td>
|
|
|
183 |
</tr>
|
|
|
184 |
<tr id="originalURLRow">
|
|
|
185 |
<td id="originalURLLabel" class="chilliLabel"><strong><?php echo $R_original_url_label; ?></strong></td>
|
|
|
186 |
<td id="originalURL" class="chilliValue">N/A</td>
|
|
|
187 |
</tr>
|
|
|
188 |
</table>
|
|
|
189 |
</div>
|
|
|
190 |
<div id="waitPage">
|
|
|
191 |
<table id="waitTable">
|
|
|
192 |
<tr>
|
|
|
193 |
<td><img height="150" src="./images/logo-alcasar.png" alt="logo"></td>
|
|
|
194 |
<td>
|
|
|
195 |
<p class="text_auth"><img src="./images/wait.gif" width="16" height="16" class="wait" alt="wait..."><?php echo $R_wait; ?></p>
|
|
|
196 |
</td>
|
|
|
197 |
</tr>
|
|
|
198 |
</table>
|
|
|
199 |
</div>
|
|
|
200 |
<div id="errorPage">
|
|
|
201 |
<table id="errorTable">
|
|
|
202 |
<tr>
|
|
|
203 |
<td><img height="150" src="./images/logo-alcasar.png" alt="logo"></td>
|
|
|
204 |
<td><span id="errorMessage">Error</span></td>
|
|
|
205 |
</tr>
|
|
|
206 |
</table>
|
|
|
207 |
</div>
|
|
|
208 |
</div>
|
|
|
209 |
<!--div id="debugPage" style="display:inline;">
|
|
|
210 |
<textarea id="debugarea" rows="20" cols="60">
|
|
|
211 |
</textarea>
|
|
|
212 |
</div--></div>
|
|
|
213 |
</body>
|
|
|
214 |
</html>
|