Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2743 → Rev 2766

/web/index.php
155,11 → 155,11
$l_sms_access = "<a href=\"//$hostname/autoregistrationinfo.php\">Créer votre compte par SMS</a>";
$l_install_certif = "Installer le certificat racine";
$l_install_certif_more = "Installation du certificat de l'autorité racine d'ALCASAR";
$l_certif_explain = "Permet l'échange de données sécurisées entre votre station de consultation et le portail captif ALCASAR.<BR>Si ce certificat n'est pas enregistré sur votre station de consultation, il est possible que des alertes de sécurité soient émises par votre navigateur.<br><br>";
$l_certif_explain = "Permet une communication sécurisées entre vous et ALCASAR.<br>";
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Aide complémentaire</a>";
$l_category = "catégorie :";
if (!$user->connected) {
$l_logout_explain = "Aucune session de consultation Internet n'est actuellement ouverte sur votre système.";
$l_logout_explain = "Aucune session n'est actuellement ouverte";
$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">Ouvrir une session Internet</a>";
} else {
if ($user->username != $user->mac) { // authentication exception or not
171,7 → 171,7
}
}
$l_password_change = "<a href=\"https://$hostname/password.php\">Changer votre mot de passe</a>";
$l_password_change_explain = "Vous redirige sur la page de changement du mot de passe de votre compte d'accès à Internet.<br><br>Vous devez avoir un compte internet valide.";
$l_password_change_explain = "Vous devez avoir un compte internet valide.";
$l_sms_explain = "Vous redirige vers la page explicative de l'auto enregistrement par SMS.<br><br><strong>Identifiant:</strong> votre numéro de téléphone<br><strong>Mot de passe:</strong> votre message";
$l_back_page = "<a href=\"javascript:history.back()\">Page précédente</a>";
$l_service_sms = "Service SMS actif";
351,9 → 351,57
$l_explain_warn_date = "إطّلع على سجلات الاتصال الخاصة بك في";
$l_explain_warn_reason = "السبب المسرّح به: ";
$l_uam_domain = ":المواقع المسموحة ";
} else if ($Language === 'de') { // German
$l_access_denied = "Zugangskontrolle";
$l_access_welcome = "Willkommen bei ALCASAR";
$l_access_unavailable = "ZUGANG NICHT MÖGLICH";
$l_required_domain = "Website benötigt";
$l_explain_acc_access = "Hier ist das Kontrollcenter. Sie benötigen einen Account mit Administratorrechten.";
$l_explain_access_deny = "Sie haben versucht sich mit einer Seite zu verbinden, die möglicherweise unangemessene Inhalte beinhaltet.";
$l_explain_net_pb = "Offenbar funktioniert ihr Internetzugriff nicht.";
$l_contact_access_deny = "Kontaktieren Sie ihren Sicherheitsbeauftragten wenn Sie denken dass diese Filterung unangemessen ist.";
$l_contact_net_pb = "Kontaktieren Sie Ihren Netzwerkbeauftragten oder Ihren Internetanbieter für weitere Informationen.";
$l_sms_access = "<a href=\"//$hostname/autoregistrationinfo.php\">Einen Account per SMS erstellen</a>";
$l_install_certif = "Das ALCASAR AC Zertifikat installieren";
$l_install_certif_more = "Das ALCASAR AC Zertifikat installieren";
$l_certif_explain = "Ermöglicht einen sicheren Datenaustausch zwischen Ihrem Computer und ALCASAR.<BR>Wenn dieses Zertifikat nicht in Ihrem Browser installiert ist, könnten Sicherheitswarnungen in Ihrem Browser erscheinen.<br><br>";
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Weitere Informationen</a>";
$l_category = "Kategorie:";
if (!$user->connected) {
$l_logout_explain = "Zurzeit ist keine Internetsitzung auf Ihrem System aktiv";
$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">Eine neue Internetzsitzung eröffnen</a>";
} else {
if ($user->username != $user->mac) { // authentication exception or not
$l_logout_explain = "Die Sitzung des aktuell eingeloggten Users beenden.<br> Aktuell eingeloggter User: <a href=\"$logout_link\" title=\"Ausloggen $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history letzte Verbindungen:$connection_history";
$l_logout = "<a href=\"$logout_link\">Aus dem Internet ausloggen</a>";
} else {
$l_logout_explain = "Ihr System ($user->username) ist nicht authentifiziert.<br><br>$nb_connection_history Letzte Verbindungen:$connection_history";
$l_logout = "Informationen zur Verbindung";
}
}
$l_password_change = "<a href=\"https://$hostname/password.php\">Passwort ändern</a>";
$l_password_change_explain = "Leitet Sie auf die Seite der Passwortänderung weiter.<br><br> Sie sollten bereits einen Account für den Internetzugriff haben.";
$l_sms_explain = "Leitet Sie auf die automatische Registrierungsseite weiter.<br><br><strong>Login:</strong> Ihre Telefonnummer<br><strong>Passwort:</strong> SMS content";
$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
$l_service_sms = "SMS-Service aktivieren";
$l_service_sms_n = "SMS-Service deaktivieren";
$l_acc_sms = "Automatische Registrierung per SMS";
$l_explain_warn = "Der Administrator wird ein Archiv erstellen, welches Ihre Logdaten für den Fall einer gerichtlichen Untersuchung beinhaltet.";
if (isset($_GET['url'])) {
$l_continue_link = "<a href=\"index.php?redirect=1&url=".urlencode($_GET['url'])."\" class=\"button\">Ich verstehe und möchte fortfahren.</a>";
} else {
$l_continue_link = "<a href=\"index.php\" class=\"button\">Ich verstehe und möchte fortfahren.</a>";
}
$l_title_warn="Lieber Benutzer,";
$l_explain_warn_name="Jemand namens ";
$l_explain_warn_ip="mit dieser IP: ";
$l_explain_warn_date="hat Ihre Verbindungsdaten eingesehen, für den ";
$l_explain_warn_reason="Grund: ";
$l_uam_domain = "Authorisierte Webseiten: ";
 
} else { // English
$l_access_denied = "Access control";
$l_access_welcome = "Welcome on ALCASAR";
$l_access_welcome = "Welcome to ALCASAR";
$l_access_unavailable = "ACCESS UNAVAILABLE";
$l_required_domain = "Required WEB site";
$l_explain_acc_access = "This center control the portal. You must have an administrative account.";
364,16 → 412,16
$l_sms_access = "<a href=\"//$hostname/autoregistrationinfo.php\">Create your account by SMS</a>";
$l_install_certif = "Install ALCASAR AC Certificate";
$l_install_certif_more = "Install ALCASAR AC Certificate";
$l_certif_explain = "Allow secure data exchange between your computer and ALCASAR portal.<BR>If this certificate isn't incorporated in your computer, some security alerts should appear in your browser.<br><br>";
$l_certif_explain = "This will allow secure communications for your browser and ALCASAR<br>";
$l_certif_explain_help = "<a href=\"alcasar-certificat.pdf\" target=\"_blank\">Complementary help</a>";
$l_category = "category:";
if (!$user->connected) {
$l_logout_explain = "No Internet consultation session is currently open on your system";
$l_logout_explain = "No session is currently open";
$l_logout = "<a href=\"//$hostname/index.php?url=$redirect_link\">Open an Internet session</a>";
} else {
if ($user->username != $user->mac) { // authentication exception or not
$l_logout_explain = "Close the session of the currently logged-in user.<br> User logged-on: <a href=\"$logout_link\" title=\"Disconnect user $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history last connections:$connection_history";
$l_logout = "<a href=\"$logout_link\">Logoff from the internet</a>";
$l_logout_explain = "Close the session<br> User logged-on: <a href=\"$logout_link\" title=\"Disconnect user $user->username\"><b>$user->username</b></a><br><br>$nb_connection_history last connections:$connection_history";
$l_logout = "<a href=\"$logout_link\">Logoff from the Internet</a>";
} else {
$l_logout_explain = "Your system ($user->username) is in exception of authentication.<br><br>$nb_connection_history Last logins:$connection_history";
$l_logout = "Connections information";
380,7 → 428,7
}
}
$l_password_change = "<a href=\"https://$hostname/password.php\">Change your password</a>";
$l_password_change_explain = "Redirect you on password change page.<br><br> You should already have an Internet access account.";
$l_password_change_explain = "You should already have an Internet access account.";
$l_sms_explain = "Redirect you on auto registration page.<br><br><strong>Login:</strong> your phone number<br><strong>Password:</strong> SMS content";
$l_back_page = "<a href=\"javascript:history.back()\">Previous page</a>";
$l_service_sms = "SMS service enable";
421,9 → 469,8
if ($direct_access) {
// Read the "Domain allowed" file
$domainsAllowed = [];
$fileContent = file(DOMAIN_ALLOWED_LIST);
if ($fileContent) { // the file isn't empty
foreach ($fileContent as $line) {
$fileContent = file(DOMAIN_ALLOWED_LIST); if ($fileContent) { // the file isn't empty
foreach ($fileContent as $line) {
if (!empty(trim($line))) {
$domain_fields = explode('#', $line);
if (!empty(trim($domain_fields[1]))) {
433,6 → 480,7
'name' => trim($domain_fields[1]),
'domain' => trim($domain[1])
];
}
}
}
469,7 → 517,20
$filteredUrlHtml .= "<br>$l_category ".implode(', ', $categories);
}
}
////////////////////////////////////////////////////////////////////////
/////////////////////////// TEST VARIABLES /////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
//$service_SMS_status = true;
//$direct_access = true;
//$network_pb = false;
//$domainsAllowed[] = (object) [
// 'name' => 'name_test',
// 'domain' => 'domain_test'
//];
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
 
 
// Cleaning the cache
header('Expires: Tue, 01 Jan 2000 00:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
477,140 → 538,166
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
?>
 
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ALCASAR - <?= $l_title ?></title>
<link type="text/css" href="<?= ((!$direct_access) ? "//$hostname" : '') ?>/css/style_intercept.css" rel="stylesheet">
<?php if ($direct_access): ?>
<script>
function setBoxInfoContent(param){
document.getElementById('box_info').innerHTML = document.getElementById(param).innerHTML;
}
</script>
<?php endif; ?>
<link type="text/css" href="<?= ((!$direct_access) ? "//$hostname" : '') ?>/css/bootstrap.min.css" rel="stylesheet">
<link type="text/css" href="/css/index_style.css" rel="stylesheet">
 
</head>
<body<?= (($direct_access) ? ' onload="setBoxInfoContent(\'text_conn\');"' : '') ?>>
<?php if ($direct_access): ?>
<div id="cadre_titre" class="titre_controle">
<body>
 
<div class="col-xs-12 col-md-10 col-md-offset-1" id="gui">
 
<!-- HeaderBox -->
<div class="row banner">
<!-- Logo box -->
<div id="boite_logo" class="hidden-xs col-sm-2">
<img class="img-responsive img-organisme" src="<?= ((!$direct_access) ? "//$hostname" : '') ?><?= $img_rep.$img_organisme ?>">
</div>
 
<!-- Title -->
<div id="cadre_titre" class="col-xs-12 col-sm-8">
<?php if ($direct_access): ?>
<p id="acces_controle" class="titre_controle"><?= $l_title ?></p>
<?php if ($network_pb): ?>
<span><?= $l_explain_net_pb ?></span>
<div class="explanation_net_pb"><?= $l_explain_net_pb ?></div>
<?php endif; ?>
<?php else: // the user is intercepted ?>
<?php if (isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] == '1'): // if user need to be warned that someone reads his logs ?>
<div id="cadre_titre" class="titre_refus">
<p id="acces_controle" class="titre_refus"><?= $l_title_warn ?></p>
<?php else: // the user is blacklisted (or whitelisted) ?>
<div id="cadre_titre" class="titre_refus">
<p id="acces_controle" class="titre_refus"><?= $l_title ?></p>
<?php endif; ?>
<?php endif; ?>
<?php else: // the user is intercepted ?>
 
<div id="boite_logo">
<img src="<?= ((!$direct_access) ? "//$hostname" : '') ?><?= $img_rep.$img_organisme ?>">
<?php // if user need to be warned that someone reads his logs ?>
<?php if (isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] == '1'): ?>
<div id="cadre_titre" class="titre_refus">
<p id="acces_controle" class="titre_refus"><?= $l_title_warn ?></p>
</div>
<?php else: // the user is blacklisted (or whitelisted) ?>
<div id="cadre_titre" class="titre_refus">
<p id="acces_controle" class="titre_refus"><?= $l_title ?></p>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
<div id="contenu_acces">
<div id="box_url">
<?php if ((!$direct_access) && (!$network_pb) && (!isset($_GET['warn']))): // Print blacklist categories ?>
<?= $filteredUrlHtml ?>
<?php endif; ?>
</div>
 
<?php if ($direct_access): ?>
<div class="box_menu<?= (!$network_pb) ? '' : ' box-menu-disabled' ?>" id="box_conn" <?= (!$network_pb) ? 'onmouseover="setBoxInfoContent(\'text_conn\');"' : 'title=\'Not available\'' ?>>
<span><?= $l_logout ?></span>
<img src="<?= $img_rep.$img_internet ?>">
<!-- Main content box -->
<div class="row">
<div id="contenu_acces" class="col-xs-12 col-lg-offset-1 col-lg-10">
<div id="box_url">
<?php // Print blacklist categories ?>
<?php if ((!$direct_access) && (!$network_pb) && (!isset($_GET['warn']))): ?>
<?= $filteredUrlHtml ?>
<?php endif; ?>
</div>
 
<div class="box_menu<?= ($ssl_enable) ? '' : ' box-menu-disabled' ?>" id="box_certif" <?= ($ssl_enable) ? 'onmouseover="setBoxInfoContent(\'text_certif\');"' : 'title=\'Not available\'' ?>>
<span><a href="<?= $certCa_link ?>"><?= $l_install_certif ?></a></span>
<img src="<?= $img_rep.$img_certificate ?>">
</div>
 
<div class="box_menu" id="box_mdp" onmouseover="setBoxInfoContent('text_mdp');">
<img src="<?= $img_rep.$img_pwd ?>">
<span><?= $l_password_change ?></span>
<!-- Menu -->
<div class="menu-container container col_xs_12 col-sm-7">
<?php if ($direct_access): ?>
<div class="box_menu<?= (!$network_pb) ? '' : ' box-menu-disabled' ?>" id="box_conn" <?= (!$network_pb) ? '' : 'title=\'Not available\'' ?>>
<span><?= $l_logout ?></span>
<div class="menu-image">
<img class="img-responsive" src="<?= $img_rep.$img_internet ?>">
</div>
</div>
<div class="box_menu_right box_menu<?= ($ssl_enable) ? '' : ' box-menu-disabled' ?>" id="box_certif" <?= ($ssl_enable) ? '' : 'title=\'Not available\'' ?>>
<span><a href="<?= $certCa_link ?>"><?= $l_install_certif ?></a></span>
<div class="menu-image">
<img class="img-responsive" src="<?= $img_rep.$img_certificate ?>">
</div>
</div>
 
<div class="box_menu" id="box_mdp" >
<div class="menu-image">
<img class="img-responsive" src="<?= $img_rep.$img_pwd ?>">
</div>
<span><?= $l_password_change ?></span>
</div>
 
<?php if ($service_SMS_status === true): ?>
<div class="box_menu_right box_menu" id="box_acc">
<span><?= $l_sms_access ?></span>
<div class="menu-image">
<img class="img-responsive menu-image" src="<?= $img_rep.$img_sms ?>">
</div>
</div>
<?php endif; ?>
</div>
 
<?php if ($service_SMS_status === true): ?>
<div class="box_menu" id="box_acc" onmouseover="setBoxInfoContent('text_acc');">
<span><?= $l_sms_access ?></span>
<img src="<?= $img_rep.$img_sms ?>">
</div>
<?php endif; ?>
 
<div class="div-cache" id="text_conn">
<h2><?= $l_logout ?></h2>
<p><?= $l_logout_explain ?></p>
<?php if (!empty($domainsAllowed)): ?>
<p><?= $l_uam_domain ?>
<!-- Info Box -->
<div class="info-box-container col-sm-5">
<div id="box_infos">
<h2 class="box_infos_titles"><?= $l_logout ?></h2>
<p class="box_infos_explanations"><?= $l_logout_explain ?>
<?php if (!empty($domainsAllowed)): ?>
<p class="domain_allowed_title"><?= $l_uam_domain ?></p>
<ul>
<?php foreach ($domainsAllowed as $domainAllowed): ?>
<li><a href="http://<?= $domainAllowed->domain ?>"><?= $domainAllowed->name ?></a></li>
<?php endforeach; ?>
</ul>
</p>
<?php endif; ?>
<img src="<?= $img_rep.$img_internet ?>">
</div>
<?php endif; ?>
 
<div class="div-cache" id="text_certif">
<h2><a href="<?= $certCa_link ?>"><?= $l_install_certif_more ?></a></h2>
<p><?= "$l_certif_explain $l_certif_explain_help" ?></p>
<img src="<?= $img_rep.$img_certificate ?>">
<h2 class="box_infos_titles"><?= $l_install_certif_more ?></a></h2>
<p class="box_infos_explanations"><?= "$l_certif_explain $l_certif_explain_help" ?></p>
<h2 class="box_infos_titles"><?= $l_password_change ?></h2>
<p class="box_infos_explanations"><?= $l_password_change_explain ?></p>
<?php if ($service_SMS_status === true): ?>
<h2 class="box_infos_titles"><?= $l_sms_access ?></h2>
<p class="box_infos_explanations"><?= $l_sms_explain ?></p>
<p style="color: green; text-align: center;"><?= $l_service_sms ?></p>
<?php endif; ?>
<?php else: // the user is intercepted ?>
<?php if (isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] === '1'): // user need to be warned that someone reads his logs ?>
<div id="box_refuse">
<img src="//<?= $hostname.$img_rep.$img_warning ?>">
<p><?= $l_explain_warn ?></p>
</div>
<div id="liens_redir">
<p><?= $l_continue_link ?></p>
</div>
<?php else: ?>
<div id="box_refuse">
<img src="//<?= $hostname.$img_rep.$img_false ?>">
<p><?= $l_explain ?></p>
</div>
<div id="liens_redir">
<p><?= $l_back_page ?></p>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
 
<div class="div-cache" id="text_mdp">
<h2><?= $l_password_change ?></h2>
<p><?= $l_password_change_explain ?></p>
<img src="<?= $img_rep.$img_pwd ?>">
</div>
 
<?php if ($service_SMS_status === true): ?>
<div class="div-cache" id="text_acc">
<h2><?= $l_sms_access ?></h2>
<p><?= $l_sms_explain ?></p>
<p style="color: green; text-align: center;"><?= $l_service_sms ?></p>
<img src="<?= $img_rep.$img_sms ?>">
</div>
<?php if (($network_pb) && (!$direct_access)): ?>
<span>Diagnostic : <?= $diagnostic ?></span>
<?php endif; ?>
 
<div id="box_info">
</div>
<?php else: // the user is intercepted ?>
<?php if (isset($_GET['warn']) && isset($_GET['url']) && $_GET['warn'] === '1'): // user need to be warned that someone reads his logs ?>
<div id="box_refuse">
<img src="//<?= $hostname.$img_rep.$img_warning ?>">
<p><?= $l_explain_warn ?></p>
</div>
<?php if ($direct_access): // display the admin logo (wheel) at the bottom right ?>
<div id="corner">
<div id="adm" class="corn">
<a href="<?= "https://$hostname/acc/" ?>"><img src="<?= $img_rep.$img_adm ?>"></a>
</div>
<div id="liens_redir">
<p><?= $l_continue_link ?></p>
</div>
<?php else: ?>
<div id="box_refuse">
<img src="//<?= $hostname.$img_rep.$img_false ?>">
<p><?= $l_explain ?></p>
</div>
<div id="liens_redir">
<p><?= $l_back_page ?></p>
</div>
<?php endif; ?>
<?php endif; ?>
 
<?php if (($network_pb) && (!$direct_access)): ?>
<span>Diagnostic : <?= $diagnostic ?></span>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
</div>
<div class="row col-xs-12">
<div id="boite_logo" class="col-xs-12 hidden-sm hidden-md hidden-lg">
<img class="img-responsive img-organisme" src="<?= ((!$direct_access) ? "//$hostname" : '') ?><?= $img_rep.$img_organisme ?>">
</div>
</div>
 
<?php if ($direct_access): // display the admin logo (wheel) at the bottom right ?>
<div id="corner">
<div id="adm" class="corn">
<a href="<?= "https://$hostname/acc/" ?>"><img src="<?= $img_rep.$img_adm ?>"></a>
</div>
</div>
<?php endif; ?>
 
</body>
</html>