Virer advanced et unifier la fonction index

This commit is contained in:
Fred Tempez 2021-10-30 12:48:29 +02:00
parent 716495c9e2
commit 650d57b7cb
8 changed files with 170 additions and 251 deletions

View File

@ -22,10 +22,6 @@ class config extends common {
'configMetaImage' => self::GROUP_ADMIN,
'generateFiles' => self::GROUP_ADMIN,
'index' => self::GROUP_ADMIN,
'locale' => self::GROUP_ADMIN,
'social' => self::GROUP_ADMIN,
'safety' => self::GROUP_ADMIN,
'network' => self::GROUP_ADMIN,
'restore' => self::GROUP_ADMIN,
'updateBaseUrl' => self::GROUP_ADMIN,
'script' => self::GROUP_ADMIN,
@ -388,35 +384,110 @@ class config extends common {
]);
}
/** *
* Configuration de base
/**
* Configuration
*/
public function index() {
// Soumission du formulaire
if($this->isPost()) {
// Basculement en mise à jour auto
// Remise à 0 du compteur
// Basculement en mise à jour auto, remise à 0 du compteur
if ($this->getData(['config','autoUpdate']) === false &&
$this->getInput('configAdvancedAutoUpdate', helper::FILTER_BOOLEAN) === true) {
$this->getInput('configAutoUpdate', helper::FILTER_BOOLEAN) === true) {
$this->setData(['core','lastAutoUpdate',0]);
}
// Eviter déconnexion automatique après son activation
if ( $this->getData(['config','autoDisconnect']) === false
AND $this->getInput('configAdvancedAutoDisconnect',helper::FILTER_BOOLEAN) === true ) {
AND $this->getInput('configAutoDisconnect',helper::FILTER_BOOLEAN) === true ) {
$this->setData(['user',$this->getuser('id'),'accessCsrf',$_SESSION['csrf']]);
}
// Sauvegarder
$this->setData(['config', 'autoBackup', $this->getInput('configAdvancedAutoBackup', helper::FILTER_BOOLEAN)]);
$this->setData(['config', 'maintenance', $this->getInput('configAdvancedMaintenance', helper::FILTER_BOOLEAN)]);
$this->setData(['config', 'cookieConsent', $this->getInput('configAdvancedCookieConsent', helper::FILTER_BOOLEAN)]);
$this->setData(['config', 'favicon', $this->getInput('configAdvancedFavicon')]);
$this->setData(['config', 'faviconDark', $this->getInput('configAdvancedFaviconDark')]);
$this->setData(['config', 'timezone', $this->getInput('configAdvancedTimezone', helper::FILTER_STRING_SHORT, true)]);
$this->setData(['config', 'autoUpdate', $this->getInput('configAdvancedAutoUpdate', helper::FILTER_BOOLEAN)]);
$this->setData(['config', 'autoUpdateHtaccess', $this->getInput('configAdvancedAutoUpdateHtaccess', helper::FILTER_BOOLEAN)]);
// Répercuter la suppression de la page dans la configuration du footer
if ( $this->getData(['theme','footer','displaySearch']) === true
AND $this->getInput('configSearchPageId') === 'none'
){
$this->setData(['theme', 'footer', 'displaySearch', false]);
}
if ( $this->getData(['theme','footer','displayLegal']) === true
AND $this->getInput('configLegalPageId') === 'none'
){
$this->setData(['theme', 'footer', 'displayLegal', false]);
}
// Sauvegarder les locales
$this->setData([
'locale',
[
'homePageId' => $this->getInput('configHomePageId', helper::FILTER_ID, true),
'page404' => $this->getInput('configPage404'),
'page403' => $this->getInput('configPage403'),
'page302' => $this->getInput('configPage302'),
'legalPageId' => $this->getInput('configLegalPageId'),
'searchPageId' => $this->getInput('configSearchPageId'),
'searchPageLabel' => empty($this->getInput('configSearchPageLabel', helper::FILTER_STRING_SHORT)) ? 'Rechercher' : $this->getInput('configSearchPageLabel', helper::FILTER_STRING_SHORT),
'legalPageLabel' => empty($this->getInput('configLegalPageLabel', helper::FILTER_STRING_SHORT)) ? 'Mentions légales' : $this->getInput('configLegalPageLabel', helper::FILTER_STRING_SHORT),
'sitemapPageLabel' => empty($this->getInput('configSitemapPageLabel', helper::FILTER_STRING_SHORT)) ? 'Plan du site' : $this->getInput('configSitemapPageLabel', helper::FILTER_STRING_SHORT),
'metaDescription' => $this->getInput('configMetaDescription', helper::FILTER_STRING_LONG, true),
'title' => $this->getInput('configTitle', helper::FILTER_STRING_SHORT, true)
]
]);
// Sauvegarder la configuration
$this->setData([
'config',
[
'analyticsId' => $this->getInput('configAnalyticsId'),
'autoBackup' => $this->getInput('configAutoBackup', helper::FILTER_BOOLEAN),
'maintenance' => $this->getInput('configMaintenance', helper::FILTER_BOOLEAN),
'cookieConsent' => $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN),
'favicon' => $this->getInput('configFavicon'),
'faviconDark' => $this->getInput('configFaviconDark'),
'social' => [
'facebookId' => $this->getInput('configSocialFacebookId'),
'linkedinId' => $this->getInput('configSocialLinkedinId'),
'instagramId' => $this->getInput('configSocialInstagramId'),
'pinterestId' => $this->getInput('configSocialPinterestId'),
'twitterId' => $this->getInput('configSocialTwitterId'),
'youtubeId' => $this->getInput('configSocialYoutubeId'),
'youtubeUserId' => $this->getInput('configSocialYoutubeUserId'),
'githubId' => $this->getInput('configSocialGithubId')
],
'timezone' => $this->getInput('configTimezone', helper::FILTER_STRING_SHORT, true),
'autoUpdate' => $this->getInput('configAutoUpdate', helper::FILTER_BOOLEAN),
'autoUpdateHtaccess' => $this->getInput('configAutoUpdateHtaccess', helper::FILTER_BOOLEAN),
'proxyType' => $this->getInput('configProxyType'),
'proxyUrl' => $this->getInput('configProxyUrl'),
'proxyPort' => $this->getInput('configProxyPort',helper::FILTER_INT),
'captchaStrong' => $this->getInput('configCaptchaStrong',helper::FILTER_BOOLEAN),
'autoDisconnect' => $this->getInput('configAutoDisconnect',helper::FILTER_BOOLEAN),
'smtp' => [
'enable' => $this->getInput('configSmtpEnable',helper::FILTER_BOOLEAN),
'host' => $this->getInput('configSmtpHost',helper::FILTER_STRING_SHORT),
'port' => $this->getInput('configSmtpPort',helper::FILTER_INT),
'auth' => $this->getInput('configSmtpAuth',helper::FILTER_BOOLEAN),
'secure' => $this->getInput('configSmtpSecure'),
'username' => $this->getInput('configSmtpUsername',helper::FILTER_STRING_SHORT),
'password' =>helper::encrypt($this->getData(['config','smtp','username']),$this->getInput('configSmtpPassword')),
'sender' => $this->getInput('configSmtpSender',helper::FILTER_MAIL)
],
'seo' => [
'robots' => $this->getInput('configSeoRobots',helper::FILTER_BOOLEAN)
],
'connect' => [
'attempt' => $this->getInput('configConnectAttempt',helper::FILTER_INT),
'timeout' => $this->getInput('configConnectTimeout',helper::FILTER_INT),
'log' => $this->getInput('configConnectLog',helper::FILTER_BOOLEAN),
'anonymousIp' => $this->getInput('configConnectAnonymousIp',helper::FILTER_INT),
'captcha' => $this->getInput('configConnectCaptcha',helper::FILTER_BOOLEAN),
],
'i18n' => [
'enable' => $this->getData(['config', 'i18n', 'enable'])
]
]
]);
// Efface les fichiers de backup lorsque l'option est désactivée
if ($this->getInput('configAdvancedFileBackup', helper::FILTER_BOOLEAN) === false) {
if ($this->getInput('configFileBackup', helper::FILTER_BOOLEAN) === false) {
$path = realpath('site/data');
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)) as $filename)
{
@ -477,61 +548,7 @@ class config extends common {
'state' => true
]);
}
// Valeurs en sortie
$this->addOutput([
'title' => 'Configuration de base',
'view' => 'index'
]);
}
/**
* Configuration
*/
public function locale() {
// Soumission du formulaire
if($this->isPost()) {
// Répercuter la suppression de la page dans la configuration du footer
if ( $this->getData(['theme','footer','displaySearch']) === true
AND $this->getInput('configSearchPageId') === 'none'
){
$this->setData(['theme', 'footer', 'displaySearch', false]);
}
if ( $this->getData(['theme','footer','displayLegal']) === true
AND $this->getInput('configLegalPageId') === 'none'
){
$this->setData(['theme', 'footer', 'displayLegal', false]);
}
// Sauvegarder
$this->setData([
'locale',
[
'homePageId' => $this->getInput('configHomePageId', helper::FILTER_ID, true),
'page404' => $this->getInput('configPage404'),
'page403' => $this->getInput('configPage403'),
'page302' => $this->getInput('configPage302'),
'legalPageId' => $this->getInput('configLegalPageId'),
'searchPageId' => $this->getInput('configSearchPageId'),
'searchPageLabel' => empty($this->getInput('configSearchPageLabel', helper::FILTER_STRING_SHORT)) ? 'Rechercher' : $this->getInput('configSearchPageLabel', helper::FILTER_STRING_SHORT),
'legalPageLabel' => empty($this->getInput('configLegalPageLabel', helper::FILTER_STRING_SHORT)) ? 'Mentions légales' : $this->getInput('configLegalPageLabel', helper::FILTER_STRING_SHORT),
'sitemapPageLabel' => empty($this->getInput('configSitemapPageLabel', helper::FILTER_STRING_SHORT)) ? 'Plan du site' : $this->getInput('configSitemapPageLabel', helper::FILTER_STRING_SHORT),
'metaDescription' => $this->getInput('configMetaDescription', helper::FILTER_STRING_LONG, true),
'title' => $this->getInput('configTitle', helper::FILTER_STRING_SHORT, true)
],
]);
$this->setData(['config', 'i18n', 'enable', $this->getInput('configI18n',helper::FILTER_BOOLEAN) ]);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(),
'notification' => 'Modifications enregistrées',
'state' => true
]);
}
// Liste des pages
// Générer la list des pages disponibles
self::$pagesList = $this->getData(['page']);
foreach(self::$pagesList as $page => $pageId) {
if ($this->getData(['page',$page,'block']) === 'bar' ||
@ -548,112 +565,14 @@ class config extends common {
unset(self::$orphansList[$page]);
}
}
// Valeurs en sortie
$this->addOutput([
'title' => 'Localisation',
'view' => 'locale'
'title' => 'Configuration',
'view' => 'index'
]);
}
/**
* Sécurité de la connexion
**/
public function safety() {
// Soumission du formulaire
if($this->isPost()) {
$this->setData([ 'config', 'captchaStrong', $this->getInput('configAdvancedCaptchaStrong',helper::FILTER_BOOLEAN)]);
$this->setData([ 'config', 'autoDisconnect', $this->getInput('configAdvancedAutoDisconnect',helper::FILTER_BOOLEAN)]);
$this->setData([ 'config', 'connect' => [
'attempt' => $this->getInput('configAdvancedConnectAttempt',helper::FILTER_INT),
'timeout' => $this->getInput('configAdvancedConnectTimeout',helper::FILTER_INT),
'log' => $this->getInput('configAdvancedConnectLog',helper::FILTER_BOOLEAN),
'anonymousIp' => $this->getInput('configAdvancedConnectAnonymousIp',helper::FILTER_INT),
'captcha' => $this->getInput('configAdvancedConnectCaptcha',helper::FILTER_BOOLEAN)
]]);
}
// Valeurs en sortie
$this->addOutput([
'title' => 'Configuration avancée',
'view' => 'safety'
]);
}
/**
* Configuration
*/
public function social() {
// Soumission du formulaire
if($this->isPost()) {
// Sauvegarder
$this->setData([ 'config', 'analyticsId', $this->getInput('configAdvancedAnalyticsId')]);
$this->setData([ 'config', 'social' => [
'facebookId' => $this->getInput('configAdvancedSocialFacebookId'),
'linkedinId' => $this->getInput('configAdvancedSocialLinkedinId'),
'instagramId' => $this->getInput('configAdvancedSocialInstagramId'),
'pinterestId' => $this->getInput('configAdvancedSocialPinterestId'),
'twitterId' => $this->getInput('configAdvancedSocialTwitterId'),
'youtubeId' => $this->getInput('configAdvancedSocialYoutubeId'),
'youtubeUserId' => $this->getInput('configAdvancedSocialYoutubeUserId'),
'githubId' => $this->getInput('configAdvancedSocialGithubId')
]]);
$this->setData([ 'config', 'seo' => [
'robots' => $this->getInput('configAdvancedSeoRobots',helper::FILTER_BOOLEAN)
]]);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(),
'notification' => 'Modifications enregistrées ' ,
'state' => true
]);
}
// Valeurs en sortie
$this->addOutput([
'title' => 'Référencement',
'view' => 'social'
]);
}
/**
* Configuration avancée
*/
public function network() {
// Soumission du formulaire
if($this->isPost()) {
// Sauvegarder
$this->setData([ 'config', 'proxyType', $this->getInput('configAdvancedProxyType')]);
$this->setData([ 'config', 'proxyUrl', $this->getInput('configAdvancedProxyUrl')]);
$this->setData([ 'config', 'proxyUrl', $this->getInput('configAdvancedProxyUrl')]);
$this->setData([ 'config', 'smtp' => [
'enable' => $this->getInput('configAdvancedSmtpEnable',helper::FILTER_BOOLEAN),
'host' => $this->getInput('configAdvancedSmtpHost',helper::FILTER_STRING_SHORT),
'port' => $this->getInput('configAdvancedSmtpPort',helper::FILTER_INT),
'auth' => $this->getInput('configAdvancedSmtpAuth',helper::FILTER_BOOLEAN),
'secure' => $this->getInput('configAdvancedSmtpSecure'),
'username' => $this->getInput('configAdvancedSmtpUsername',helper::FILTER_STRING_SHORT),
'password' =>helper::encrypt($this->getData(['config','smtp','username']),$this->getInput('configAdvancedSmtpPassword')),
'sender' => $this->getInput('configAdvancedSmtpSender',helper::FILTER_MAIL)
]]);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(),
'notification' => 'Modifications enregistrées ' ,
'state' => true
]);
}
// Valeurs en sortie
$this->addOutput([
'title' => 'Reseau et scripts',
'view' => 'network'
]);
}
public function script() {
// Soumission du formulaire
if($this->isPost()) {

View File

@ -14,24 +14,24 @@ $( document).ready(function() {
/**
* Afficher et masquer options SMTP
*/
if ($("input[name=configAdvancedSmtpEnable]").is(':checked')) {
$("#configAdvancedSmtpParam").addClass("disabled");
$("#configAdvancedSmtpParam").slideDown();
if ($("input[name=SmtpEnable]").is(':checked')) {
$("#SmtpParam").addClass("disabled");
$("#SmtpParam").slideDown();
} else {
$("#configAdvancedSmtpParam").removeClass("disabled");
$("#configAdvancedSmtpParam").slideUp();
$("#SmtpParam").removeClass("disabled");
$("#SmtpParam").slideUp();
}
/**
* Afficher et masquer options Auth
*/
if ($("select[name=configAdvancedSmtpEnable]").val() == true) {
$("#configAdvancedSmtpAuthParam").addClass("disabled");
$("#configAdvancedSmtpAuthParam").slideDown();
if ($("select[name=SmtpEnable]").val() == true) {
$("#SmtpAuthParam").addClass("disabled");
$("#SmtpAuthParam").slideDown();
} else {
$("#configAdvancedSmtpAuthParam").removeClass("disabled");
$("#configAdvancedSmtpAuthParam").slideUp();
$("#SmtpAuthParam").removeClass("disabled");
$("#SmtpAuthParam").slideUp();
}
@ -40,13 +40,13 @@ $( document).ready(function() {
/**
* Afficher et masquer options SMTP
*/
$("input[name=configAdvancedSmtpEnable]").on("change", function() {
if ($("input[name=configAdvancedSmtpEnable]").is(':checked')) {
$("#configAdvancedSmtpParam").addClass("disabled");
$("#configAdvancedSmtpParam").slideDown();
$("input[name=SmtpEnable]").on("change", function() {
if ($("input[name=SmtpEnable]").is(':checked')) {
$("#SmtpParam").addClass("disabled");
$("#SmtpParam").slideDown();
} else {
$("#configAdvancedSmtpParam").removeClass("disabled");
$("#configAdvancedSmtpParam").slideUp();
$("#SmtpParam").removeClass("disabled");
$("#SmtpParam").slideUp();
}
});
@ -54,13 +54,13 @@ $( document).ready(function() {
* Afficher et masquer options Auth
*/
$("select[name=configAdvancedSmtpAuth]").on("change", function() {
if ($("select[name=configAdvancedSmtpAuth]").val() == true) {
$("#configAdvancedSmtpAuthParam").addClass("disabled");
$("#configAdvancedSmtpAuthParam").slideDown();
$("select[name=SmtpAuth]").on("change", function() {
if ($("select[name=SmtpAuth]").val() == true) {
$("#SmtpAuthParam").addClass("disabled");
$("#SmtpAuthParam").slideDown();
} else {
$("#configAdvancedSmtpAuthParam").removeClass("disabled");
$("#configAdvancedSmtpAuthParam").slideUp();
$("#SmtpAuthParam").removeClass("disabled");
$("#SmtpAuthParam").slideUp();
}
});

View File

@ -9,45 +9,45 @@
]); ?>
</div>
<div class="col2">
<?php echo template::button('configAdvancedHelp', [
<?php echo template::button('Help', [
'class' => 'buttonHelp',
'ico' => 'help',
'value' => 'Aide'
]); ?>
</div>
<div class="col2 offset6">
<?php echo template::submit('configAdvancedSubmit'); ?>
<?php echo template::submit('Submit'); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="row textAlignCenter">
<div class="col2">
<?php echo template::button('configAdvancedButton', [
<?php echo template::button('Button', [
'href' => helper::baseUrl() . 'config/index',
'value' => 'Paramètres'
]); ?>
</div>
<div class="col2">
<?php echo template::button('configAdvancedButton', [
<?php echo template::button('Button', [
'href' => helper::baseUrl() . 'config/locale',
'value' => 'Localisation'
]); ?>
</div>
<div class="col2">
<?php echo template::button('configAdvancedButton', [
<?php echo template::button('Button', [
'href' => helper::baseUrl() . 'config/social',
'value' => 'Référencement'
]); ?>
</div>
<div class="col2">
<?php echo template::button('configAdvancedButton', [
<?php echo template::button('Button', [
'href' => helper::baseUrl() . 'config/safety',
'value' => 'Sécurité'
]); ?>
</div>
<div class="col2">
<?php echo template::button('configAdvancedButton', [
<?php echo template::button('Button', [
'href' => helper::baseUrl() . 'config/network',
'value' => 'Réseau'
]); ?>

View File

@ -5,20 +5,20 @@
<h4>Réseau</h4>
<div class="row">
<div class="col2">
<?php echo template::select('configAdvancedProxyType', $module::$proxyType, [
<?php echo template::select('ProxyType', $module::$proxyType, [
'label' => 'Type de proxy',
'selected' => $this->getData(['config', 'proxyType'])
]); ?>
</div>
<div class="col8">
<?php echo template::text('configAdvancedProxyUrl', [
<?php echo template::text('ProxyUrl', [
'label' => 'Adresse du proxy',
'placeholder' => 'cache.proxy.fr',
'value' => $this->getData(['config', 'proxyUrl'])
]); ?>
</div>
<div class="col2">
<?php echo template::text('configAdvancedProxyPort', [
<?php echo template::text('ProxyPort', [
'label' => 'Port du proxy',
'placeholder' => '6060',
'value' => $this->getData(['config', 'proxyPort'])
@ -34,52 +34,52 @@
<h4>SMTP</h4>
<div class="row">
<div class="col12">
<?php echo template::checkbox('configAdvancedSmtpEnable', true, 'Activer SMTP', [
<?php echo template::checkbox('SmtpEnable', true, 'Activer SMTP', [
'checked' => $this->getData(['config', 'smtp','enable']),
'help' => 'Paramètres à utiliser lorsque votre hébergeur ne propose pas la fonctionnalité d\'envoi de mail.'
]); ?>
</div>
</div>
<div id="configAdvancedSmtpParam">
<div id="SmtpParam">
<div class="row">
<div class="col8">
<?php echo template::text('configAdvancedSmtpHost', [
<?php echo template::text('SmtpHost', [
'label' => 'Adresse SMTP',
'placeholder' => 'smtp.fr',
'value' => $this->getData(['config', 'smtp','host'])
]); ?>
</div>
<div class="col2">
<?php echo template::text('configAdvancedSmtpPort', [
<?php echo template::text('SmtpPort', [
'label' => 'Port SMTP',
'placeholder' => '589',
'value' => $this->getData(['config', 'smtp','port'])
]); ?>
</div>
<div class="col2">
<?php echo template::select('configAdvancedSmtpAuth', $module::$SMTPauth, [
<?php echo template::select('SmtpAuth', $module::$SMTPauth, [
'label' => 'Authentification',
'selected' => $this->getData(['config', 'smtp','auth'])
]); ?>
</div>
</div>
<div id="configAdvancedSmtpAuthParam">
<div id="SmtpAuthParam">
<div class="row">
<div class="col5">
<?php echo template::text('configAdvancedSmtpUsername', [
<?php echo template::text('SmtpUsername', [
'label' => 'Nom utilisateur',
'value' => $this->getData(['config', 'smtp','username' ])
]); ?>
</div>
<div class="col5">
<?php echo template::password('configAdvancedSmtpPassword', [
<?php echo template::password('SmtpPassword', [
'label' => 'Mot de passe',
'autocomplete' => 'off',
'value' => $this->getData(['config', 'smtp','username' ]) ? helper::decrypt ($this->getData(['config', 'smtp','username' ]),$this->getData(['config','smtp','password'])) : ''
]); ?>
</div>
<div class="col2">
<?php echo template::select('configAdvancedSmtpSecure', $module::$SMTPEnc , [
<?php echo template::select('SmtpSecure', $module::$SMTPEnc , [
'label' => 'Sécurité',
'selected' => $this->getData(['config', 'smtp','secure'])
]); ?>

View File

@ -5,18 +5,18 @@
<h4>Sécurité de la connexion</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('configAdvancedConnectCaptcha', true, 'Captcha à la connexion', [
<?php echo template::checkbox('ConnectCaptcha', true, 'Captcha à la connexion', [
'checked' => $this->getData(['config', 'connect','captcha'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('configAdvancedCaptchaStrong', true, 'Captcha complexe', [
<?php echo template::checkbox('CaptchaStrong', true, 'Captcha complexe', [
'checked' => $this->getData(['config','captchaStrong']),
'help' => '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.'
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('configAdvancedAutoDisconnect', true, 'Déconnexion automatique', [
<?php echo template::checkbox('AutoDisconnect', true, 'Déconnexion automatique', [
'checked' => $this->getData(['config','autoDisconnect']),
'help' => 'Déconnecte les sessions ouvertes précédemment sur d\'autres navigateurs ou terminaux. Activation recommandée.'
]); ?>
@ -24,13 +24,13 @@
</div>
<div class="row">
<div class="col3">
<?php echo template::select('configAdvancedConnectAttempt', $module::$connectAttempt , [
<?php echo template::select('ConnectAttempt', $module::$connectAttempt , [
'label' => 'Connexions successives',
'selected' => $this->getData(['config', 'connect', 'attempt'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('configAdvancedConnectTimeout', $module::$connectTimeout , [
<?php echo template::select('ConnectTimeout', $module::$connectTimeout , [
'label' => 'Blocage après échecs',
'selected' => $this->getData(['config', 'connect', 'timeout'])
]); ?>
@ -42,14 +42,14 @@
Après le nombre de tentatives autorisées, l\'IP et le compte sont bloqués.');
?>
</label>
<?php echo template::button('configAdvancedConnectblacListDownload', [
<?php echo template::button('ConnectblacListDownload', [
'href' => helper::baseUrl() . 'config/blacklistDownload',
'value' => 'Télécharger la liste',
'ico' => 'download'
]); ?>
</div>
<div class="col3 verticalAlignBottom">
<?php echo template::button('configAdvancedConnectReset', [
<?php echo template::button('ConnectReset', [
'class' => 'buttonRed',
'href' => helper::baseUrl() . 'config/blacklistReset',
'value' => 'Réinitialiser la liste',
@ -66,26 +66,26 @@
<h4>Journalisation</h4>
<div class="row">
<div class="col3">
<?php echo template::checkbox('configAdvancedConnectLog', true, 'Activer la journalisation', [
<?php echo template::checkbox('ConnectLog', true, 'Activer la journalisation', [
'checked' => $this->getData(['config', 'connect', 'log'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('configAdvancedConnectAnonymousIp', $module::$anonIP, [
<?php echo template::select('ConnectAnonymousIp', $module::$anonIP, [
'label' => 'Anonymat des adresses IP',
'selected' => $this->getData(['config', 'connect', 'anonymousIp']),
'help' => 'La réglementation française impose un anonymat de niveau 2'
]); ?>
</div>
<div class="col3 verticalAlignBottom">
<?php echo template::button('configAdvancedLogDownload', [
<?php echo template::button('LogDownload', [
'href' => helper::baseUrl() . 'config/logDownload',
'value' => 'Télécharger le journal',
'ico' => 'download'
]); ?>
</div>
<div class="col3 verticalAlignBottom">
<?php echo template::button('configAdvancedLogReset', [
<?php echo template::button('LogReset', [
'class' => 'buttonRed',
'href' => helper::baseUrl() . 'config/logReset',
'value' => 'Réinitialiser le journal',

View File

@ -5,7 +5,7 @@
<h4>Paramètres</h4>
<div class="row">
<div class="col4">
<?php echo template::file('configAdvancedFavicon', [
<?php echo template::file('Favicon', [
'type' => 1,
'help' => 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
'label' => 'Favicon',
@ -13,7 +13,7 @@
]); ?>
</div>
<div class="col4">
<?php echo template::file('configAdvancedFaviconDark', [
<?php echo template::file('FaviconDark', [
'type' => 1,
'help' => 'Sélectionnez une icône adaptée à un thème sombre.<br>Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
'label' => 'Favicon thème sombre',
@ -21,7 +21,7 @@
]); ?>
</div>
<div class="col4">
<?php echo template::select('configAdvancedTimezone', $module::$timezones, [
<?php echo template::select('Timezone', $module::$timezones, [
'label' => 'Fuseau horaire',
'selected' => $this->getData(['config', 'timezone']),
'help' => 'Le fuseau horaire est utile au bon référencement'
@ -30,7 +30,7 @@
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('configAdvancedCookieConsent', true, 'Message de consentement aux cookies', [
<?php echo template::checkbox('CookieConsent', true, 'Message de consentement aux cookies', [
'checked' => $this->getData(['config', 'cookieConsent']),
'help' => 'Activation obligatoire selon les lois françaises sauf si vous utilisez votre propre système de consentement.'
]); ?>
@ -52,21 +52,21 @@
<?php $updateError = helper::urlGetContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/version');?>
<div class="row">
<div class="col4">
<?php echo template::checkbox('configAdvancedAutoUpdate', true, 'Rechercher une mise à jour en ligne', [
<?php echo template::checkbox('AutoUpdate', true, 'Rechercher une mise à jour en ligne', [
'checked' => $this->getData(['config', 'autoUpdate']),
'help' => 'La vérification est quotidienne. Option désactivée si la configuration du serveur ne le permet pas.',
'disabled' => !$updateError
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('configAdvancedAutoUpdateHtaccess', true, 'Préserver le fichier htaccess racine', [
<?php echo template::checkbox('AutoUpdateHtaccess', true, 'Préserver le fichier htaccess racine', [
'checked' => $this->getData(['config', 'autoUpdateHtaccess']),
'help' => 'Lors d\'une mise à jour automatique, conserve le fichier htaccess de la racine du site.',
'disabled' => !$updateError
]); ?>
</div>
<div class="col4">
<?php echo template::button('configAdvancedUpdateForced', [
<?php echo template::button('UpdateForced', [
'ico' => 'download-cloud',
'href' => helper::baseUrl() . 'install/update',
'value' => 'Mise à jour manuelle',
@ -84,13 +84,13 @@
<h4>Maintenance</h4>
<div class="row">
<div class="col6">
<?php echo template::checkbox('configAdvancedAutoBackup', true, 'Sauvegarde automatique quotidienne du site', [
<?php echo template::checkbox('AutoBackup', true, 'Sauvegarde automatique quotidienne du site', [
'checked' => $this->getData(['config', 'autoBackup']),
'help' => 'Une archive contenant le dossier /site/data est copiée dans le dossier \'site/backup\'. La sauvegarde est conservée pendant 30 jours.</p><p>Les fichiers du site ne sont pas sauvegardés automatiquement. Activation recommandée.'
]); ?>
</div>
<div class="col6">
<?php echo template::checkbox('configAdvancedMaintenance', true, 'Site en maintenance', [
<?php echo template::checkbox('Maintenance', true, 'Site en maintenance', [
'checked' => $this->getData(['config', 'maintenance'])
]); ?>
</div>

View File

@ -7,7 +7,7 @@
<div class="col4 offset1">
<div class="row">
<div class="col12">
<?php echo template::button('configAdvancedMetaImage', [
<?php echo template::button('MetaImage', [
'href' => helper::baseUrl() . 'config/configMetaImage',
'value' => 'Générer une capture Open Graph'
]); ?>
@ -15,7 +15,7 @@
</div>
<div class="row">
<div class="col12">
<?php echo template::button('configAdvancedSiteMap', [
<?php echo template::button('SiteMap', [
'href' => helper::baseUrl() . 'config/generateFiles',
'value' => 'Générer sitemap.xml et robots.txt'
]); ?>
@ -23,7 +23,7 @@
</div>
<div class="row">
<div class="col12">
<?php echo template::checkbox('configAdvancedSeoRobots', true, 'Autoriser les robots à référencer le site', [
<?php echo template::checkbox('SeoRobots', true, 'Autoriser les robots à référencer le site', [
'checked' => $this->getData(['config', 'seo','robots'])
]); ?>
</div>
@ -48,28 +48,28 @@
<h4>Réseaux sociaux</h4>
<div class="row">
<div class="col3">
<?php echo template::text('configAdvancedSocialFacebookId', [
<?php echo template::text('SocialFacebookId', [
'help' => 'Saisissez votre ID : https://www.facebook.com/[ID].',
'label' => 'Facebook',
'value' => $this->getData(['config', 'social', 'facebookId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('configAdvancedSocialInstagramId', [
<?php echo template::text('SocialInstagramId', [
'help' => 'Saisissez votre ID : https://www.instagram.com/[ID].',
'label' => 'Instagram',
'value' => $this->getData(['config', 'social', 'instagramId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('configAdvancedSocialYoutubeId', [
<?php echo template::text('SocialYoutubeId', [
'help' => 'ID de la chaîne : https://www.youtube.com/channel/[ID].',
'label' => 'Chaîne Youtube',
'value' => $this->getData(['config', 'social', 'youtubeId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('configAdvancedSocialYoutubeUserId', [
<?php echo template::text('SocialYoutubeUserId', [
'help' => 'Saisissez votre ID Utilisateur : https://www.youtube.com/user/[ID].',
'label' => 'Youtube',
'value' => $this->getData(['config', 'social', 'youtubeUserId'])
@ -78,28 +78,28 @@
</div>
<div class="row">
<div class="col3">
<?php echo template::text('configAdvancedSocialTwitterId', [
<?php echo template::text('SocialTwitterId', [
'help' => 'Saisissez votre ID : https://twitter.com/[ID].',
'label' => 'Twitter',
'value' => $this->getData(['config', 'social', 'twitterId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('configAdvancedSocialPinterestId', [
<?php echo template::text('SocialPinterestId', [
'help' => 'Saisissez votre ID : https://pinterest.com/[ID].',
'label' => 'Pinterest',
'value' => $this->getData(['config', 'social', 'pinterestId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('configAdvancedSocialLinkedinId', [
<?php echo template::text('SocialLinkedinId', [
'help' => 'Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].',
'label' => 'Linkedin',
'value' => $this->getData(['config', 'social', 'linkedinId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('configAdvancedSocialGithubId', [
<?php echo template::text('SocialGithubId', [
'help' => 'Saisissez votre ID Github : https://github.com/[ID].',
'label' => 'Github',
'value' => $this->getData(['config', 'social', 'githubId'])
@ -115,7 +115,7 @@
<h4>Scripts externes</h4>
<div class="row">
<div class="col3">
<?php echo template::text('configAdvancedAnalyticsId', [
<?php echo template::text('AnalyticsId', [
'help' => 'Saisissez l\'ID de suivi.',
'label' => 'Google Analytics',
'placeholder' => 'UA-XXXXXXXX-X',
@ -123,14 +123,14 @@
]); ?>
</div>
<div class="col3 offset3 verticalAlignBottom">
<?php echo template::button('configAdvancedScriptHead', [
<?php echo template::button('ScriptHead', [
'href' => helper::baseUrl() . 'config/script/head',
'value' => 'Script dans head',
'ico' => 'pencil'
]); ?>
</div>
<div class="col3 verticalAlignBottom">
<?php echo template::button('configAdvancedScriptBody', [
<?php echo template::button('ScriptBody', [
'href' => helper::baseUrl() . 'config/script/body',
'value' => 'Script dans body',
'ico' => 'pencil'

View File

@ -16,7 +16,7 @@
]); ?>
</div>
<div class="col3 offset3">
<?php echo template::button('configAdvancedButton', [
<?php echo template::button('translateButton', [
'href' => helper::baseUrl() . 'translate/copy',
'value' => 'Utilitaire de copie',
'ico' => 'cog-alt',