Subversion Repositories ALCASAR

Rev

Rev 2819 | Rev 2823 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2819 Rev 2822
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: index.php 2819 2020-05-17 21:59:10Z rexy $
2
# $Id: index.php 2822 2020-05-23 16:03:33Z rexy $
3
#
3
#
4
# index.php for ALCASAR by Rexy
4
# index.php for ALCASAR by Rexy
5
# UI & css style by stephane ERARD
5
# UI & css style by stephane ERARD
6
# The contents of this file may be used under the terms of the GNU
6
# The contents of this file may be used under the terms of the GNU
7
# General Public License Version 2, provided that the above copyright
7
# General Public License Version 2, provided that the above copyright
Line 44... Line 44...
44
fclose($file_conf);
44
fclose($file_conf);
45
 
45
 
46
$organisme = $conf["ORGANISM"];
46
$organisme = $conf["ORGANISM"];
47
$hostname  = $conf["HOSTNAME"].'.'.$conf["DOMAIN"];
47
$hostname  = $conf["HOSTNAME"].'.'.$conf["DOMAIN"];
48
$ssl_enable = ($conf['HTTPS_LOGIN'] === 'on');
48
$ssl_enable = ($conf['HTTPS_LOGIN'] === 'on');
-
 
49
$protocol = ($ssl_enable) ? 'https//' : 'http://';
49
$useHTTPS = ((isset($_SERVER['HTTPS'])) && (!empty($_SERVER['HTTPS'])) && ($_SERVER['HTTPS'] !== 'off'));
50
$useHTTPS = ((isset($_SERVER['HTTPS'])) && (!empty($_SERVER['HTTPS'])) && ($_SERVER['HTTPS'] !== 'off'));
50
$network_pb = false; // "alcasar-watchdog.sh" changes this value if a network issue is detected
51
$network_pb = false; // "alcasar-watchdog.sh" changes this value if a network issue is detected
51
$diagnostic = "can't contact the default router"; // "alcasar-watchdog.sh" changes this value if a network issue is detected
52
$diagnostic = "can't contact the default router"; // "alcasar-watchdog.sh" changes this value if a network issue is detected
52
$certCa_link = (($useHTTPS) ? 'https' : 'http')."://$hostname/certs/certificat_alcasar_ca.crt";
53
$certCa_link = (($useHTTPS) ? 'https' : 'http')."://$hostname/certs/certificat_alcasar_ca.crt";
53
$logout_link = ((($conf['HTTPS_CHILLI'] === 'on') && $useHTTPS) ? 'https://'.$hostname.':3991' : 'http://'.$hostname.':3990').'/logoff';
54
$logout_link = ((($conf['HTTPS_CHILLI'] === 'on') && $useHTTPS) ? 'https://'.$hostname.':3991' : 'http://'.$hostname.':3990').'/logoff';
Line 164... Line 165...
164
		} else {
165
		} else {
165
			$l_logout_explain = "Votre système ($user->username) est en exception d'authentication.<br><br>$nb_connection_history dernières connexions :$connection_history";
166
			$l_logout_explain = "Votre système ($user->username) est en exception d'authentication.<br><br>$nb_connection_history dernières connexions :$connection_history";
166
			$l_logout = "<a href=\"\">Information des connexions</a>";
167
			$l_logout = "<a href=\"\">Information des connexions</a>";
167
		}
168
		}
168
	}
169
	}
169
	$l_password_change = "<a href=\"https://$hostname/password.php\">Changer votre mot de passe</a>";
170
	$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">Changer votre mot de passe</a>";
170
	$l_back_page = "<a href=\"javascript:history.back()\">Page précédente</a>";
171
	$l_back_page = "<a href=\"javascript:history.back()\">Page précédente</a>";
171
	$l_explain_warn = "L'administrateur a créé une archive contenant vos journaux de connexion dans le cadre d'une affaire judiciaire.";
172
	$l_explain_warn = "L'administrateur a créé une archive contenant vos journaux de connexion dans le cadre d'une affaire judiciaire.";
172
	if (isset($_GET['url'])) {
173
	if (isset($_GET['url'])) {
173
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">Je comprends et je souhaite continuer ma navigation.</a>";
174
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">Je comprends et je souhaite continuer ma navigation.</a>";
174
	} else {
175
	} else {
Line 203... Line 204...
203
		} else {
204
		} else {
204
			$l_logout_explain = "O sistema ($user->username) detctou exesso de autenticação.<br><br>$nb_connection_history logins últimos :$connection_history";
205
			$l_logout_explain = "O sistema ($user->username) detctou exesso de autenticação.<br><br>$nb_connection_history logins últimos :$connection_history";
205
			$l_logout = "<a href=\"\">Informações de conexões</a>";
206
			$l_logout = "<a href=\"\">Informações de conexões</a>";
206
		}
207
		}
207
	}
208
	}
208
	$l_password_change = "<a href=\"https://$hostname/password.php\">Mudar sua senha</a>";
209
	$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">Mudar sua senha</a>";
209
	$l_back_page = "<a href=\"javascript:history.back()\">Página anterior</a>";
210
	$l_back_page = "<a href=\"javascript:history.back()\">Página anterior</a>";
210
	$l_explain_warn = "El administrador ha creado un archivo que contiene los periódicos de inicio de sesión como parte de un proceso judicial.";
211
	$l_explain_warn = "El administrador ha creado un archivo que contiene los periódicos de inicio de sesión como parte de un proceso judicial.";
211
	if (isset($_GET['url'])) {
212
	if (isset($_GET['url'])) {
212
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">Lo comprendo y deseo continuar mi navegación.</a>";
213
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">Lo comprendo y deseo continuar mi navegación.</a>";
213
	} else {
214
	} else {
Line 242... Line 243...
242
		} else {
243
		} else {
243
			$l_logout_explain = "您的系统($user->username)验证例外<br><br>$nb_connection_history 最后连接: $connection_history";
244
			$l_logout_explain = "您的系统($user->username)验证例外<br><br>$nb_connection_history 最后连接: $connection_history";
244
			$l_logout = "<a href=\"\">连接信息</a>";
245
			$l_logout = "<a href=\"\">连接信息</a>";
245
		}
246
		}
246
	}
247
	}
247
	$l_password_change = "<a href=\"https://$hostname/password.php\">更改您的密码</a>";
248
	$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">更改您的密码</a>";
248
	$l_back_page = "<a href=\"javascript:history.back()\">上一页</a>";
249
	$l_back_page = "<a href=\"javascript:history.back()\">上一页</a>";
249
	$l_explain_warn = "管理员创建了一份可用于司法调查的连接日志文档。";
250
	$l_explain_warn = "管理员创建了一份可用于司法调查的连接日志文档。";
250
	if (isset($_GET['url'])) {
251
	if (isset($_GET['url'])) {
251
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">我明白并希望继续浏览。</a>";
252
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">我明白并希望继续浏览。</a>";
252
	} else {
253
	} else {
Line 291... Line 292...
291
			$l_logout_explain = "$connection_history :$last_conn_text $nb_connection_history<br><br>$auth_except_text ($user->username) $your_system_text";
292
			$l_logout_explain = "$connection_history :$last_conn_text $nb_connection_history<br><br>$auth_except_text ($user->username) $your_system_text";
292
			$l_logout = "<a href=\"\">معلومات على الاتصالات </a>";
293
			$l_logout = "<a href=\"\">معلومات على الاتصالات </a>";
293
		}
294
		}
294
	}
295
	}
295
	$change_pass_text = "غير كلمتك السرية";
296
	$change_pass_text = "غير كلمتك السرية";
296
	$l_password_change = "<a href=\"https://$hostname/password.php\">$change_pass_text</a>";
297
	$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">$change_pass_text</a>";
297
	$redirect_sms_text = "يوجهك على الصفحة التفسيرية للتسجيل الذاتي بطريقة";
298
	$redirect_sms_text = "يوجهك على الصفحة التفسيرية للتسجيل الذاتي بطريقة";
298
	$login_text = "تسجيل الدخول";
299
	$login_text = "تسجيل الدخول";
299
	$your_phone_text = "رقم الهاتف الخاص بك";
300
	$your_phone_text = "رقم الهاتف الخاص بك";
300
	$pass_text = "كلمة السر";
301
	$pass_text = "كلمة السر";
301
	$your_message_text = "رسالتك";
302
	$your_message_text = "رسالتك";
Line 337... Line 338...
337
		} else {
338
		} else {
338
			$l_logout_explain = "Ihr System ($user->username) ist nicht authentifiziert.<br><br>$nb_connection_history Letzte Verbindungen:$connection_history";
339
			$l_logout_explain = "Ihr System ($user->username) ist nicht authentifiziert.<br><br>$nb_connection_history Letzte Verbindungen:$connection_history";
339
			$l_logout = "<a href=\"\">Informationen zur Verbindung</a>";
340
			$l_logout = "<a href=\"\">Informationen zur Verbindung</a>";
340
		}
341
		}
341
	}
342
	}
342
	$l_password_change = "<a href=\"https://$hostname/password.php\">Passwort ändern</a>";
343
	$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">Passwort ändern</a>";
343
	$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
344
	$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
344
	$l_explain_warn = "Der Administrator wird ein Archiv erstellen, welches Ihre Logdaten für den Fall einer gerichtlichen Untersuchung beinhaltet.";
345
	$l_explain_warn = "Der Administrator wird ein Archiv erstellen, welches Ihre Logdaten für den Fall einer gerichtlichen Untersuchung beinhaltet.";
345
	if (isset($_GET['url'])) {
346
	if (isset($_GET['url'])) {
346
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">Ich verstehe und möchte fortfahren.</a>";
347
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">Ich verstehe und möchte fortfahren.</a>";
347
	} else {
348
	} else {
Line 377... Line 378...
377
		} else {
378
		} else {
378
			$l_logout_explain = "Your system ($user->username) is in exception of authentication.<br><br>$nb_connection_history Last logins:$connection_history";
379
			$l_logout_explain = "Your system ($user->username) is in exception of authentication.<br><br>$nb_connection_history Last logins:$connection_history";
379
			$l_logout = "<a href=\"\">Connections information</a>";
380
			$l_logout = "<a href=\"\">Connections information</a>";
380
		}
381
		}
381
	}
382
	}
382
	$l_password_change = "<a href=\"https://$hostname/password.php\">Change your password</a>";
383
	$l_password_change = "<a href=\"" . $protocol . "$hostname/password.php\">Change your password</a>";
383
	$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
384
	$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
384
	$l_explain_warn = "The administrator created an archive which contains your imputabilities logs for a judicial investigation.";
385
	$l_explain_warn = "The administrator created an archive which contains your imputabilities logs for a judicial investigation.";
385
	if (isset($_GET['url'])) {
386
	if (isset($_GET['url'])) {
386
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">I understand and I wish to continue.</a>";
387
		$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">I understand and I wish to continue.</a>";
387
	} else {
388
	} else {
Line 545... Line 546...
545
							<div class="menu-image">						
546
							<div class="menu-image">						
546
								<img class="img-responsive" src="<?= $img_rep.$img_internet ?>">
547
								<img class="img-responsive" src="<?= $img_rep.$img_internet ?>">
547
							</div>
548
							</div>
548
						</div>
549
						</div>
549
					
550
					
550
						<div class="box_menu_right box_menu<?= ($ssl_enable) ? '' : ' box-menu-disabled' ?>" id="box_certif" <?= ($ssl_enable) ? '' : 'title=\'Not available\'' ?>>
551
						<div class="box_menu_right box_menu" id="box_certif">
551
							<span><a href="<?= $certCa_link ?>"><?= $l_install_certif ?></a></span>
552
							<span><a href="<?= $certCa_link ?>"><?= $l_install_certif ?></a></span>
552
							<div class="menu-image">
553
							<div class="menu-image">
553
								<img class="img-responsive" src="<?= $img_rep.$img_certificate ?>">
554
								<img class="img-responsive" src="<?= $img_rep.$img_certificate ?>">
554
							</div>
555
							</div>
555
						</div>
556
						</div>