Subversion Repositories ALCASAR

Rev

Rev 3026 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

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