Subversion Repositories ALCASAR

Rev

Rev 2930 | Rev 3026 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

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