Subversion Repositories ALCASAR

Rev

Rev 2930 | Rev 3026 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
528 stephane 1
<?php
958 franck 2
# $Id: status.php 2935 2021-03-28 22:14:58Z rexy $
528 stephane 3
#
2240 tom.houday 4
# status.php for ALCASAR captive portal
847 richard 5
# by steweb57 & Rexy
528 stephane 6
# 
847 richard 7
/****************************************************************
8
*			GLOBAL FILE PATHS			*
9
*****************************************************************/
2240 tom.houday 10
define('CONF_FILE', '/usr/local/etc/alcasar.conf');
847 richard 11
 
12
/****************************************************************
2240 tom.houday 13
*			FILE reading test			*
847 richard 14
*****************************************************************/
2240 tom.houday 15
$conf_files = array(CONF_FILE);
16
foreach ($conf_files as $file) {
17
	if (!file_exists($file)) {
18
		exit("Fichier $file non présent");
19
	}
20
	if (!is_readable($file)) {
21
		exit("Vous n'avez pas les droits de lecture sur le fichier $file");
22
	}
847 richard 23
}
24
 
25
/****************************************************************
26
*			Read CONF_FILE				*
27
*****************************************************************/
2240 tom.houday 28
$file_conf = fopen(CONF_FILE, 'r');
29
if (!$file_conf) {
30
	exit('Error opening the file '.CONF_FILE);
31
}
32
while (!feof($file_conf)) {
33
	$buffer = fgets($file_conf, 4096);
34
	if ((strpos($buffer, '=') !== false) && (substr($buffer, 0, 1) !== '#')) {
2450 tom.houday 35
		$tmp = explode('=', $buffer, 2);
2346 tom.houday 36
		$conf[trim($tmp[0])] = trim($tmp[1]);
847 richard 37
	}
38
}
2240 tom.houday 39
fclose($file_conf);
847 richard 40
 
2240 tom.houday 41
$organisme = $conf['ORGANISM'];
42
$remote_ip = preg_match('#^([0-9]{1,3}\.){3}[0-9]{1,3}$#', $_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '';
43
$cn = '';
44
$connection_history = '';
725 stephane 45
$nb_connection_history = 3;
2346 tom.houday 46
$homepage_url = (($conf['HTTPS_LOGIN'] === 'on') ? 'https' : 'http' ).'://'.$conf['HOSTNAME'].'.'.$conf['DOMAIN'].'/';
2370 tom.houday 47
$useHTTPS = ((isset($_SERVER['HTTPS'])) && (!empty($_SERVER['HTTPS'])) && ($_SERVER['HTTPS'] !== 'off'));
2935 rexy 48
$service_wifi4eu_status = ($conf['WIFI4EU'] === 'on');
49
$service_wifi4eu_code = $conf['WIFI4EU_CODE'];
50
$service_wifi4eu_server = 'https://collection.wifi4eu.ec.europa.eu/wifi4eu.min.js';
528 stephane 51
 
2240 tom.houday 52
// Wait for chilli (update its tables)
53
sleep(1); // TODO: wait after login only?
2134 richard 54
// Retrieve user info in tab $user[]
2240 tom.houday 55
exec("sudo /usr/sbin/chilli_query list | grep 'pass' | grep -Ew '($remote_ip)'" , $tab);
56
if (isset($tab[0])) {
57
	$user = explode(' ', $tab[0]);
58
}
725 stephane 59
 
2240 tom.houday 60
// Time conversion 
61
function secondsToDuration($seconds = null) {
62
	if ($seconds === null) return '';
725 stephane 63
	$temp = $seconds % 3600;
2240 tom.houday 64
	$time[2] = $temp % 60 ;			// seconds
65
	$time[1] = ($temp - $time[2]) / 60;	// minutes
66
	$time[0] = ($seconds - $temp) / 3600 ;	// hours
67
	return $time[0].' h '.$time[1].' m '.$time[2].' s';
725 stephane 68
}
69
 
528 stephane 70
# Choice of language
2240 tom.houday 71
// TODO: reste quelques traductions à faire
528 stephane 72
$Language = 'en';
2240 tom.houday 73
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
74
	$Langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
75
	$Language = strtolower(substr(chop($Langue[0]), 0, 2));
2172 tom.houday 76
}
2240 tom.houday 77
if ($Language === 'es') {		// Spanish
2850 rexy 78
	$l_login1			= "Inicio de sesión exitoso!";
79
	$l_logout			= "Desconectarse";
80
	$l_logout_question		= "¿Seguro que desea desconectarse?";
81
	$l_loggedout			= "Su sesión ha finalizado";
528 stephane 82
	$l_wait				= "Por favor, espere un momento ...";
2066 richard 83
	$l_state_label			= "Estado";
84
	$l_session_id_label		= "Sesión ID";
85
	$l_max_session_time_label	= "Tiempo máximo de sesión";
86
	$l_max_idle_time_label		= "Tiempo de inactividad autorizado";
2850 rexy 87
	$l_start_time_label		= "Tiempo de inicio";
528 stephane 88
	$l_session_time_label		= "Tiempo de conexión";
2850 rexy 89
	$l_idle_time_label		= "Tiempo inactivo";
90
	$l_downloaded_label		= "Datos descargados";	
91
	$l_uploaded_label		= "Datos subidos";
92
	$l_original_url_label		= "URL original";
93
	$l_not_available		= "No disponible";	
94
	$l_error			= "error";
95
	$l_welcome			= "Bienvenido";	
96
	$l_conn_history			= "Últimas $nb_connection_history conexiones";
97
	$l_connected 			= "conectado";
98
	$l_a_connection			= "Tiene";
99
	$l_a_connection_time		= "conexiones activas en la red";
2172 tom.houday 100
	$l_close_warning		= "Advertencia: se desconectará si cierra esta ventana";
2346 tom.houday 101
	$l_back_homepage		= "Volver a la página de inicio";
2240 tom.houday 102
} else if ($Language === 'zh') {	// Chinese
2066 richard 103
	$l_login1			= "验证通过";
104
	$l_logout			= "关闭连接";
105
	$l_logout_question		= "您确定需要断开连接吗?";
106
	$l_loggedout			= "您已登出";
107
	$l_wait				= "请等待 ...";
108
	$l_state_label			= "连接状态";
109
	$l_session_id_label		= "连接ID";
110
	$l_max_session_time_label	= "最大连接时间";
111
	$l_max_idle_time_label		= "最大闲置时间";
112
	$l_start_time_label		= "起始连接时间";
113
	$l_session_time_label		= "连接时间";
114
	$l_idle_time_label		= "闲置时间";
115
	$l_downloaded_label		= "数据下载";
116
	$l_uploaded_label		= "数据上传";
117
	$l_original_url_label		= "初始网址";
118
	$l_not_available		= "不可用";
119
	$l_error			= "出错";
120
	$l_welcome			= "欢迎";
2172 tom.houday 121
	$l_conn_history			= "您最近的{$nb_connection_history}次连接";
2066 richard 122
	$l_connected 			= "已登录";  
123
	$l_a_connection			= "您已经有";
124
	$l_a_connection_time		= "在线时间";
2172 tom.houday 125
	$l_close_warning		= "警告: 您将会断开连接如果您在关闭此窗口";
2346 tom.houday 126
	$l_back_homepage		= "回到主页";
2240 tom.houday 127
} else if ($Language === 'ar') {	// Arabic
2086 richard 128
	$l_login1			= "نجاح المصادقة";
129
	$l_logout			= "إغلاق الدورة";
130
	$l_logout_question		= "هل تريد فعلاً قطع الاتصال؟";
131
	$l_loggedout			= "دورتكَ مُغلَقة";
132
	$l_wait				= "...إنتظر بعض اللحظات";
133
	$l_state_label			= "وَضْع";
134
	$l_session_id_label		= "معرف الدورة";
135
	$l_max_session_time_label	= "الوقت المسموح للإتصال";
136
	$l_max_idle_time_label		= "الحد الأقصى لعدم التنشيط";
137
	$l_start_time_label		= "بداية الإتصال";
138
	$l_session_time_label		= "مدة الإتصال";
139
	$l_idle_time_label		= "انعدام التنشيط";
140
	$l_downloaded_label		= "تم تحميل المعطيات";
141
	$l_uploaded_label		= "تم إرسال المعطيات";
142
	$l_original_url_label		= "تم طلب URL";
143
	$l_not_available		= "غير متوفّر";
144
	$l_na				= "N/D";
145
	$l_error			= "خطأ";
146
	$l_welcome			= "مرحباً بك";
147
	$l_conn_history			= "($nb_connection_history) سِجِل اتصالاتك الاخيرة";
148
	$l_connected 			= "دورة ناشطة";  
149
	$l_a_connection			= "لديك";
150
	$l_a_connection_time		= "اتصالات ناشطة على الشبكة";
2172 tom.houday 151
	$l_close_warning		= "تحذير: سيتم قطع الاتصال إذا قمت بإغلاق هذه النافذة";
2346 tom.houday 152
	$l_back_homepage		= "الرجوع إلى الصفحة الرئيسية";
2240 tom.houday 153
} else if ($Language === 'pt') {	// Portuguese
912 richard 154
	$l_login1			= "Autenticação bem sucedida.";
155
	$l_logout			= "Fechando a conexão";
955 richard 156
	$l_logout_question		= "Tem certeza de que deseja desconectar agora?";
971 richard 157
	$l_loggedout			= "Sua conexão será fechada";
912 richard 158
	$l_wait				= "Por favor, aguarde um momento ...";
971 richard 159
	$l_state_label			= "Estado da conexão";
955 richard 160
	$l_session_id_label		= "Sessão ID";
971 richard 161
	$l_max_session_time_label	= "Restante em horas da conexão";
162
	$l_max_idle_time_label		= "Restante máximo liberado por dia";
163
	$l_start_time_label		= "Dia, mês, ano e hora da conexão";
955 richard 164
	$l_session_time_label		= "Duração da conexão";
165
	$l_idle_time_label		= "Tempo de Espera";
971 richard 166
	$l_downloaded_label		= "Recebidos";
167
	$l_uploaded_label		= "Enviados";
912 richard 168
	$l_original_url_label		= "URL Original";
955 richard 169
	$l_not_available		= "Não disponível";
170
	$l_error			= "Erro";
971 richard 171
	$l_welcome			= "Bem-vindo(a)";
172
	$l_conn_history			= "Suas últimos conexões : $nb_connection_history";
955 richard 173
	$l_connected 			= "Conectado"; 
971 richard 174
	$l_a_connection			= "Conexão ativa já detectada para essa LAN";
912 richard 175
	$l_a_connection_time		= "Tempo (s)";
2172 tom.houday 176
	$l_close_warning		= "Aviso: você será desconectado se fechar esta janela";
2346 tom.houday 177
	$l_back_homepage		= "Voltar à página inicial";
2240 tom.houday 178
} else if ($Language === 'de') {	// German
734 richard 179
	$l_login1			= "Erfolgreiche Authentifizierung";
528 stephane 180
	$l_logout			= "Beenden der Verbindung";
2766 rexy 181
	$l_logout_question		= "Möchten Sie die Sitzung wirklich beenden?";
2064 richard 182
	$l_loggedout			= "Ihre Sitzung ist geschlossen";
528 stephane 183
	$l_wait				= "Bitte warten Sie einen Moment ...";
2766 rexy 184
	$l_state_label			= "Status";	
185
	$l_session_id_label		= "Sitzungs-ID";
186
	$l_max_session_time_label	= "Maximale Sitzungszeit";
187
	$l_max_idle_time_label		= "Maximale Leerlaufzeit";
188
	$l_start_time_label		= "Startzeit";
189
	$l_session_time_label		= "Online-Zeit";
190
	$l_idle_time_label		= "Leerlaufzeit";
191
	$l_downloaded_label		= "Heruntergeladen";
192
	$l_uploaded_label		= "Hochgeladen";
193
	$l_original_url_label		= "Angefragze URL";
194
	$l_not_available		= "Nicht verfügbar";
195
	$l_error			= "Fehler";
196
	$l_welcome			= "Willkommen"; 
197
	$l_conn_history			= "Ihre letzten $nb_connection_history Verbindungen";
198
	$l_connected 			= "gespeichert"; 
199
	$l_a_connection			= "Sie haben";
200
	$l_a_connection_time		= "aktive Sitzungen auf dem Netzwerk";
2172 tom.houday 201
	$l_close_warning		= "Warnung: Sie werden getrennt, wenn Sie dieses Fenster schließen";
2346 tom.houday 202
	$l_back_homepage		= "Zurück zur Startseite";
2240 tom.houday 203
} else if ($Language === 'nl') {	// Dutch
734 richard 204
	$l_login1			= "Succesvolle authenticatie";
528 stephane 205
	$l_logout			= "Slotkoers verbinding";
2073 richard 206
	$l_logout_question		= "Bent u zeker dat u wilt nu los te koppelen?";
2064 richard 207
	$l_loggedout			= "Uw sessie is gesloten";
528 stephane 208
	$l_wait				= "Wacht een moment ...";
2064 richard 209
	$l_state_label			= "State";		// to translate
210
	$l_session_id_label		= "Session ID";	// to translate
211
	$l_max_session_time_label	= "Max Session Time";	// to translate
212
	$l_max_idle_time_label		= "Max Idle Time";		// to translate
213
	$l_start_time_label		= "Start Time";	// to translate
528 stephane 214
	$l_session_time_label		= "Online tijd";
2064 richard 215
	$l_idle_time_label		= "Idle Time";	// to translate
216
	$l_downloaded_label		= "Downloaded";	// to translate
217
	$l_uploaded_label		= "Uploaded";	// to translate
218
	$l_original_url_label		= "Original URL";	// to translate
219
	$l_not_available		= "Not available";	// to translate
220
	$l_error			= "error";		// to translate
221
	$l_welcome			= "Welcome";	// to translate
222
	$l_conn_history			= "Your last $nb_connection_history connections";	// to translate
223
	$l_connected 			= "logged"; // to translate 
224
	$l_a_connection			= "You have"; // to translate
225
	$l_a_connection_time		= "active connections on the network"; // to translate
2172 tom.houday 226
	$l_close_warning		= "Waarschuwing: u zal worden afgebroken als u dit venster sluiten";
2346 tom.houday 227
	$l_back_homepage		= "Terug naar de homepage";
2240 tom.houday 228
} else if ($Language === 'fr') {	// French
2064 richard 229
	$l_login1			= "Authentification réussie";
528 stephane 230
	$l_logout			= "Fermeture de la session";
2066 richard 231
	$l_logout_question		= "Êtes vous sûr de vouloir vous déconnecter?";
2064 richard 232
	$l_loggedout			= "Votre session est fermée";
528 stephane 233
	$l_wait				= "Patientez un instant ....";
2066 richard 234
	$l_state_label			= "État";
2064 richard 235
	$l_session_id_label		= "Session ID";
236
	$l_max_session_time_label	= "Temps de connexion autorisé";
2066 richard 237
	$l_max_idle_time_label		= "Temps d'inactivité autorisé";
2064 richard 238
	$l_start_time_label		= "Début de connexion";
239
	$l_session_time_label		= "Durée de connexion";
240
	$l_idle_time_label		= "Inactivité";
241
	$l_downloaded_label		= "Données téléchargées";
242
	$l_uploaded_label		= "Données envoyées";
243
	$l_original_url_label		= "URL demandée";
244
	$l_not_available		= "Non disponible";
245
	$l_error			= "erreur";
246
	$l_welcome			= "Bienvenue";
247
	$l_conn_history			= "Vos $nb_connection_history dernières connexions";
737 franck 248
	$l_connected 			= "session active";  
1708 richard 249
	$l_a_connection			= "Vous avez";
250
	$l_a_connection_time		= "connexions actives sur le réseau";
2172 tom.houday 251
	$l_close_warning		= "Attention : vous serez déconnecté si vous fermez cette fenêtre";
2346 tom.houday 252
	$l_back_homepage		= "Revenir à la page d'accueil";
2240 tom.houday 253
} else {				// English
528 stephane 254
	$l_login1			= "Successful authentication.";
255
	$l_logout			= "Closing connection";
2064 richard 256
	$l_logout_question		= "Are you sure you want to disconnect now?";
257
	$l_loggedout			= "Your session is closed";
528 stephane 258
	$l_wait				= "Please wait a moment ...";
2064 richard 259
	$l_state_label			= "State";
260
	$l_session_id_label		= "Session ID";
528 stephane 261
	$l_max_session_time_label	= "Max Session Time";
262
	$l_max_idle_time_label		= "Max Idle Time";
2064 richard 263
	$l_start_time_label		= "Start Time";
528 stephane 264
	$l_session_time_label		= "Session Time";
2064 richard 265
	$l_idle_time_label		= "Idle Time";
266
	$l_downloaded_label		= "Downloaded";
267
	$l_uploaded_label		= "Uploaded";
528 stephane 268
	$l_original_url_label		= "Original URL";
2064 richard 269
	$l_not_available		= "Not available";
270
	$l_error			= "error";
271
	$l_welcome			= "Welcome";
272
	$l_conn_history			= "Your last $nb_connection_history connections";
734 richard 273
	$l_connected 			= "logged"; 
2064 richard 274
	$l_a_connection			= "You have";
275
	$l_a_connection_time		= "active connections on the network";
2172 tom.houday 276
	$l_close_warning		= "Warning: you will be disconnected if you close this window";
2346 tom.houday 277
	$l_back_homepage		= "Back to homepage";
528 stephane 278
}
734 richard 279
 
2240 tom.houday 280
if (isset($user[5])) {
281
	if ((is_file('acc/manager/lib/sql/drivers/mysql/functions.php')) && (is_file('/etc/freeradius-web/config.php'))) {
282
		require_once('/etc/freeradius-web/config.php');
283
		require_once('acc/manager/lib/sql/drivers/mysql/functions.php');
2134 richard 284
		$link = @da_sql_pconnect($config);
2240 tom.houday 285
		if ($link) {
286
			// Retrieve the last connections
287
			$sql = "SELECT UserName, AcctStartTime, AcctStopTime, acctsessiontime FROM radacct WHERE UserName='$user[5]' ORDER BY AcctStartTime DESC LIMIT 0, $nb_connection_history";
288
			$res = @da_sql_query($link, $config, $sql);
289
			if ($res) {
290
				$connection_history = '<ul>';
291
				while (($row = @da_sql_fetch_array($res,$config))) {
872 richard 292
					$start_conn = date_create($row['acctstarttime']);
2240 tom.houday 293
					if (empty($row['acctstoptime'])) {
737 franck 294
						$connected = $l_connected;
2240 tom.houday 295
					} else {
872 richard 296
						$connected = secondsToDuration($row['acctsessiontime']);
737 franck 297
					}
2766 rexy 298
					$connection_history .= '<li>'.date_format($start_conn, 'd M Y - H:i:s').'</li>';//." - ($connected)</>";
734 richard 299
				}
2240 tom.houday 300
				$connection_history .= '</ul>';
737 franck 301
			}
2240 tom.houday 302
 
2413 tom.houday 303
			// Retrieve number of open session
304
			$sql = "SELECT COUNT(*) AS nb_open FROM radacct WHERE username = '$user[5]' AND acctstoptime IS NULL;";
305
			$res = @da_sql_query($link, $config, $sql);
306
			if ($res) {
2535 tom.houday 307
				$row = @da_sql_fetch_array($res, $config);
2413 tom.houday 308
				$nb_open_session = $row['nb_open'];
309
			}
310
 
2240 tom.houday 311
			// Retrieve first name & last name
312
			$sql = "SELECT Name FROM userinfo WHERE UserName='$user[5]'";
313
			$res = @da_sql_query($link, $config, $sql);
314
			if ($res) {
2137 richard 315
				$row = @da_sql_fetch_array($res,$config);
2240 tom.houday 316
				$cn = (!empty($row['name'])) ? $row['name'] : $user[5];
2137 richard 317
			}
318
		}
734 richard 319
	}
2418 tom.houday 320
 
2841 rexy 321
	$filename = '/tmp/current_users.txt';
2418 tom.houday 322
	$user_needKeepOpen = (preg_match("/^$remote_ip:PERM/m", file_get_contents($filename)) === 0);
734 richard 323
}
2240 tom.houday 324
 
2766 rexy 325
////////////////////////////////////////////////////////////////////////////////////////
326
/////////////////////// TEST VARIABLES ///////////////////////
327
//////////////////////////////////////////////////////////////
328
//$nb_open_session = 2;      // >2
329
//$user_needKeepOpen = true;      // true/false
330
////////////////////////////////////////////////////////////////////////////////////////
331
 
2240 tom.houday 332
// Cleaning the cache
333
header('Expires: Tue, 01 Jan 2000 00:00:00 GMT');
334
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
335
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
336
header('Cache-Control: post-check=0, pre-check=0', false);
337
header('Pragma: no-cache');
528 stephane 338
?>
2240 tom.houday 339
<!DOCTYPE html>
2137 richard 340
<html>
734 richard 341
	<head>
2240 tom.houday 342
		<meta charset="UTF-8">
343
		<title>ALCASAR - <?= $organisme ?></title>
2766 rexy 344
		<link rel="stylesheet" href="/css/bootstrap.min.css" type="text/css">
345
		<link type="text/css" href="/css/status.css" rel="stylesheet">
2930 rexy 346
		<link rel="icon" href="/images/favicon-48.ico" type="image/ico">
2935 rexy 347
<? if ($service_wifi4eu_status): ?>
348
		<script type="text/javascript">
349
			var wifi4euTimerStart = Date.now();
350
			var wifi4euNetworkIdentifier = '<?= $service_wifi4eu_code ?>';
351
			var wifi4euLanguage = '<?= $Language ?>';
352
			//var selftestModus = true;
353
		</script>
354
		<script type="text/javascript" src="<?= $service_wifi4eu_server ?>"></script>
355
<? endif; ?>
2240 tom.houday 356
		<script src="js/ChilliLibrary.js"></script>
2370 tom.houday 357
		<script>
358
			chilliController.host = '<?= $conf['HOSTNAME'].'.'.$conf['DOMAIN'] ?>';
359
			chilliController.port = <?= (($useHTTPS) ? 3991 : 3990) ?>;
360
			chilliController.ssl  = <?= (($useHTTPS) ? 'true' : 'false') ?>;
361
		</script>
2240 tom.houday 362
		<script src="js/statusControler.js"></script>
734 richard 363
	</head>
364
	<body>
2766 rexy 365
	<div id="Chilli" class="col-xs-12 col-sm-12">
366
		<div id="chilliPage" class="row">
367
			<div id="loggedOutPage" class="c1 col-xs-12 col-sm-12">
368
				<div id="disconnectTable" class="row logout_box">
369
					<div class="col-xs-3 col-sm-3 logout_msg">
370
						<img height="150" src="images/logo-alcasar.png" alt="logo">
371
					</div>
372
					<div class="col-xs-6 col-sm-6 logout_msg">
373
							<p class="text_auth"><?= $l_loggedout ?></p>
374
							<p class="text_homelink"><a href="<?= $homepage_url ?>"><?= $l_back_homepage ?></a></p>
375
					</div>
2240 tom.houday 376
				</div>
2766 rexy 377
			</div>
378
			<div id="statusPage" class="col-xs-12 col-sm-12">
379
				<div class="row">
380
					<div class="col-xs-12 col-sm-12 col-md-10 col-md-offset-1">
381
						<div class="row header_background">
382
							<div class="header_img hidden-xs col-sm-2">	
2820 rexy 383
								<img class="img-responsive image-resize" src="images/organisme.png" alt="logo">
2766 rexy 384
							</div>
385
							<div class="header_title col-xs-12 col-sm-8">
2935 rexy 386
							<?php if ($service_wifi4eu_status): ?>
387
								<img id="wifi4eubanner">
388
							<?php else: ?>
2766 rexy 389
								<p class="login-status"><?= $l_login1 ?></p>
2935 rexy 390
							<?php endif; ?>
2766 rexy 391
							</div>
2820 rexy 392
							<div class="header_img hidden-xs col-sm-2">	
393
								<img class="img-responsive image-resize" src="images/logo-alcasar.png" alt="logo">
394
							</div>
2766 rexy 395
						</div>
396
					</div>
2240 tom.houday 397
				</div>
2766 rexy 398
				<div class="row main_box">	
399
					<div class="col-xs-12 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2">
400
						<div class="row background-display">
401
							<div class="col-xs-12 col-sm-10 col-sm-offset-1">
402
								<div class="row">
403
									<p class="welcome-user"><?= $l_welcome ?> <?= $cn ?></p>
404
								</div>	
405
								<div class="row nb_open_session">
406
									<?= ((isset($nb_open_session) && ($nb_open_session > 1)) ? $l_a_connection.' '.$nb_open_session.' '.$l_a_connection_time : '') ?>
407
								</div>
408
								<div class="row">
409
									<table class="table table-striped" id="statusTable">
410
										<!-- 
411
										<tr id="connectRow">
412
											<td id="statusMessageLabel" class="chilliLabel"><strong><?= $l_state_label ?></strong></td>
413
											<td id="statusMessage" class="chilliValue">Connected</td>
414
										</tr>
415
										<tr id="sessionIdRow">
416
											<td id="sessionIdLabel" class="chilliLabel"><strong><?= $l_session_id_label ?></strong></td>
417
											<td id="sessionId" class="chilliValue"><?= $l_not_available ?></td>
418
										</tr>
419
			-->
420
										<tr id="sessionTimeoutRow" class="table-border">
421
											<td id="sessionTimeoutLabel" class="chilliLabel"><?= $l_max_session_time_label ?>: </td>
422
											<td id="sessionTimeout" class="chilliValue"><?= $l_not_available ?></td>
423
										</tr>
424
										<tr id="idleTimeoutRow">
425
											<td id="idleTimeoutLabel" class="chilliLabel"><?= $l_max_idle_time_label ?>: </td>
426
											<td id="idleTimeout" class="chilliValue"><?= $l_not_available ?></td>
427
										</tr>
428
										<tr id="startTimeRow">
429
											<td id="startTimeLabel" class="chilliLabel"><?= $l_start_time_label ?>: </td>
430
											<td id="startTime" class="chilliValue"><?= $l_not_available ?></td>
431
										</tr>
432
										<tr id="sessionTimeRow">
433
											<td id="sessionTimeLabel" class="chilliLabel"><?= $l_session_time_label ?>: </td>
434
											<td id="sessionTime" class="chilliValue"><?= $l_not_available ?></td>
435
										</tr>
436
										<tr id="idleTimeRow">
437
											<td id="idleTimeLabel" class="chilliLabel"><?= $l_idle_time_label ?>: </td>
438
											<td id="idleTime" class="chilliValue"><?= $l_not_available ?></td>
439
										</tr>
440
										<tr id="inputOctetsRow">
441
											<td id="inputOctetsLabel" class="chilliLabel"><?= $l_downloaded_label ?>: </td>
442
											<td id="inputOctets" class="chilliValue"><?= $l_not_available ?></td>
443
										</tr>
444
										<tr id="outputOctetsRow">
445
											<td id="outputOctetsLabel" class="chilliLabel"><?= $l_uploaded_label ?>: </td>
446
											<td id="outputOctets" class="chilliValue"><?= $l_not_available ?></td>
447
										</tr>
448
			<!-- 
449
										<tr id="originalURLRow">
450
											<td id="originalURLLabel" class="chilliLabel"><?= $l_original_url_label ?></td>
451
											<td id="originalURL" class="chilliValue"><?= $l_not_available ?></td>
452
										</tr>
453
			 -->
454
										<?php if (isset($user_needKeepOpen) && ($user_needKeepOpen === true)): ?>
455
											<tr>
456
												<td colspan="2" id="close-warning">(<?= $l_close_warning ?>)</td>
457
											</tr>
458
										<?php endif; ?>
459
									</table>
460
								</div>
461
								<button onclick="return logoutWithConfirmation('<?= $l_logout_question ?>');" class="button btn btn-danger btn-md"><?= $l_logout ?></button>
462
							</div>
463
						</div>
464
					</div>
465
					<div class="hidden-xs hidden-sm hidden-md col-lg-2 history">
466
						<div class="row">
467
							<div class="hidden-xs col-lg-11 col-lg-offset-1 log-box">
468
								<div class="row log-titre">	
469
									<div class="col-lg-12">
470
									<?= $l_conn_history ?>
471
									</div>
472
								</div>
473
								<div class="row log-info">
474
									<?= $connection_history ?>
475
								</div>
476
							</div>
477
						</div>
478
					</div>
2240 tom.houday 479
				</div>
2766 rexy 480
				<div class="row">
481
					<div class="col-xs-3 hidden-sm hidden-md hidden-lg">	
482
						<img class="img-responsive image-resize-bottom" src="images/logo-alcasar.png" alt="logo">
483
					</div>
484
					<div class="col-xs-6 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 hidden-lg history_bottom">
485
						<div class="row log-titre-petit">	
486
							<?= $l_conn_history ?>
487
						</div>
488
						<div class="row log-info-petit">
489
							<?= $connection_history ?>
490
						</div>
491
					</div>
2240 tom.houday 492
				</div>
493
			</div>
2766 rexy 494
			<div id="waitPage" class="col-xs-12 col-sm-12">
495
				<div class="row waiting_box">
496
					<div class="col-xs-3 col-sm-3 waiting_msg">
497
						<img height="150" src="images/logo-alcasar.png" alt="logo">
498
					</div>
499
					<div class="col-xs-6 col-sm-6 waiting_msg">
500
						<p class="text_auth"><img src="images/wait.gif" width="16" height="16" class="wait" alt="<?= $l_wait ?>"><?= $l_wait ?></p>
501
					</div>
502
				</div>
503
			</div>
504
			<div id="errorPage" class="col-xs-12 col-sm-12">
505
				<div class="row error_box">
506
					<div class="col-xs-3 col-sm-3 error_msg">
507
						<img height="150" src="images/logo-alcasar.png" alt="logo">
508
					</div>
509
					<div class="col-xs-6 col-sm-6 error_msg">
510
						<p id="errorMessage"><?= $l_error ?></p>
511
					</div>
512
				</div>
513
			</div>
734 richard 514
		</div>
2766 rexy 515
	</div>
734 richard 516
	</body>
528 stephane 517
</html>