Deltacms/core/module/config/view/connect/connect.php

175 lines
6.5 KiB
PHP

<?php
// Lexique
$text = [];
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Sécurité de la connexion';
$text[1] = 'Captcha à la connexion';
$text[2] = 'Captcha complexe';
$text[3] = 'Option recommandée pour sécuriser la connexion. S\'applique à tous les captchas du site. Le captcha simple se limite à une addition de nombres de 0 à 10. Le captcha complexe utilise quatre opérations de nombres de 0 à 20. Activation recommandée.';
$text[4] = 'Type de captcha';
$text[5] = 'Déconnexion automatique';
$text[6] = 'Déconnecte les sessions ouvertes précédemment sur d\'autres navigateurs ou terminaux. Activation recommandée.';
$text[7] = 'Connexions successives';
$text[8] = 'Blocage après échecs';
$text[9] = 'La liste noire énumère les tentatives de connexion à partir de comptes inexistants. Sont stockés : la date, l\'heure, le nom du compte et l\'IP. Après le nombre de tentatives autorisées, l\'IP et le compte sont bloqués.';
$text[10] = 'Liste noire :';
$text[11] = 'Télécharger la liste';
$text[12] = 'Réinitialiser la liste';
$text[13] = 'Journalisation';
$text[14] = 'Activer la journalisation';
$text[15] = 'Anonymat des adresses IP';
$text[16] = 'La réglementation française impose un anonymat de niveau 2';
$text[17] = 'Télécharger le journal';
$text[18] = 'Réinitialiser le journal';
$text[19] ='Captcha complexe';
$captchaTypes = $module::$captchaTypes;
$connectAttempt = $module::$connectAttempt;
$connectTimeout = $module::$connectTimeout;
$anonIP = $module::$anonIP;
break;
case 'en' :
$text[0] = 'Login security';
$text[1] = 'Captcha at login';
$text[2] = 'Complex captcha';
$text[3] = 'Recommended option to secure the connection. Applies to all captchas on the site. The simple captcha is limited to adding numbers from 0 to 10. The complex captcha uses four number operations from 0 to 20. Activation recommended.';
$text[4] = 'Captcha type';
$text[5] = 'Automatic logout';
$text[6] = 'Disconnects previously opened sessions on other browsers or terminals. Activation recommended.';
$text[7] = 'Successive logins';
$text[8] = 'Block after failures';
$text[9] = 'The blacklist lists login attempts from non-existent accounts. The date, time, account name and IP are stored. After the allowed number of attempts, the IP and account are blocked';
$text[10] = 'Blacklist:';
$text[11] = 'Download list';
$text[12] = 'Reset list';
$text[13] = 'Logging';
$text[14] = 'Enable logging';
$text[15] = 'Anonymise IP addresses';
$text[16] = 'French regulations require level 2 anonymity';
$text[17] = 'Download log';
$text[18] = 'Reset log';
$text[19] ='Complex captcha';
$captchaTypes = $module::$captchaTypes_en;
$connectAttempt = $module::$connectAttempt_en;
$connectTimeout = $module::$connectTimeout_en;
$anonIP = $module::$anonIP_en;
break;
}
?>
<div id="connectContainer">
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo $text[0]; ?>
<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/connexion" target="_blank">
<?php echo template::ico('help', 'left');?>
</a>
</span>
</h4>
<div class="row">
<div class="col3">
<?php echo template::checkbox('connectCaptcha', true, $text[1], [
'checked' => $this->getData(['config', 'connect','captcha'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('connectCaptchaStrong', true, $text[19], [
'checked' => $this->getData(['config', 'connect', 'captchaStrong']),
'help' => $text[3]
]); ?>
</div>
<div class="col3">
<?php echo template::select('connectCaptchaType', $captchaTypes , [
'label' => $text[4],
'selected' => $this->getData(['config', 'connect', 'captchaType'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('connectAutoDisconnect', true, $text[5], [
'checked' => $this->getData(['config','connect', 'autoDisconnect']),
'help' => $text[6]
]); ?>
</div>
</div>
<div class="row">
<div class="col3">
<?php echo template::select('connectAttempt', $connectAttempt , [
'label' => $text[7],
'selected' => $this->getData(['config', 'connect', 'attempt'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('connectTimeout', $connectTimeout , [
'label' => $text[8],
'selected' => $this->getData(['config', 'connect', 'timeout'])
]); ?>
</div>
<div class="col3 verticalAlignBottom">
<label id="helpBlacklist"><?php echo $text[10]; ?>
<?php echo template::help($text[9]);
?>
</label>
<?php echo template::button('ConnectBlackListDownload', [
'href' => helper::baseUrl() . 'config/blacklistDownload',
'value' => $text[11],
'ico' => 'download'
]); ?>
</div>
<div class="col3 verticalAlignBottom">
<?php echo template::button('CnnectBlackListReset', [
'class' => 'buttonRed',
'href' => helper::baseUrl() . 'config/blacklistReset',
'value' => $text[12],
'ico' => 'cancel'
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo $text[13];?>
<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.deltacms.fr/connexion#journalisation" target="_blank">
<?php echo template::ico('help', 'left');?>
</a>
</span>
</h4>
<div class="row">
<div class="col3">
<?php echo template::checkbox('connectLog', true, $text[14], [
'checked' => $this->getData(['config', 'connect', 'log'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('connectAnonymousIp', $anonIP, [
'label' => $text[15],
'selected' => $this->getData(['config', 'connect', 'anonymousIp']),
'help' => $text[16]
]); ?>
</div>
<div class="col3 verticalAlignBottom">
<?php echo template::button('ConfigLogDownload', [
'href' => helper::baseUrl() . 'config/logDownload',
'value' => $text[17],
'ico' => 'download'
]); ?>
</div>
<div class="col3 verticalAlignBottom">
<?php echo template::button('ConnectLogReset', [
'class' => 'buttonRed',
'href' => helper::baseUrl() . 'config/logReset',
'value' => $text[18],
'ico' => 'cancel'
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>