Subversion Repositories ALCASAR

Rev

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

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