Subversion Repositories ALCASAR

Rev

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

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