forked from ZwiiCMS-Team/ZwiiCMS
initialisation
This commit is contained in:
parent
a1c2a86d5a
commit
ad275ec629
@ -1713,7 +1713,7 @@ class core extends common {
|
|||||||
// Déconnexion
|
// Déconnexion
|
||||||
$user = new user;
|
$user = new user;
|
||||||
$user->logout();
|
$user->logout();
|
||||||
// Rédirection
|
// Redirection
|
||||||
http_response_code(302);
|
http_response_code(302);
|
||||||
header('Location:' . helper::baseUrl() . 'maintenance');
|
header('Location:' . helper::baseUrl() . 'maintenance');
|
||||||
exit();
|
exit();
|
||||||
|
@ -442,6 +442,7 @@ class config extends common {
|
|||||||
'homePageId' => $this->getInput('configHomePageId', helper::FILTER_ID, true),
|
'homePageId' => $this->getInput('configHomePageId', helper::FILTER_ID, true),
|
||||||
'page404' => $this->getInput('configPage404'),
|
'page404' => $this->getInput('configPage404'),
|
||||||
'page403' => $this->getInput('configPage403'),
|
'page403' => $this->getInput('configPage403'),
|
||||||
|
'page302' => $this->getInput('configPage302'),
|
||||||
'analyticsId' => $this->getInput('configAnalyticsId'),
|
'analyticsId' => $this->getInput('configAnalyticsId'),
|
||||||
'autoBackup' => $this->getInput('configAutoBackup', helper::FILTER_BOOLEAN),
|
'autoBackup' => $this->getInput('configAutoBackup', helper::FILTER_BOOLEAN),
|
||||||
'maintenance' => $this->getInput('configMaintenance', helper::FILTER_BOOLEAN),
|
'maintenance' => $this->getInput('configMaintenance', helper::FILTER_BOOLEAN),
|
||||||
|
@ -176,7 +176,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col4 offset2">
|
<div class="col4">
|
||||||
<?php
|
<?php
|
||||||
echo template::select('configPage403', array_merge(['none' => 'Aucune'],helper::arrayCollumn($pages, 'title', 'SORT_ASC')), [
|
echo template::select('configPage403', array_merge(['none' => 'Aucune'],helper::arrayCollumn($pages, 'title', 'SORT_ASC')), [
|
||||||
'label' => 'Accès interdit, erreur 403',
|
'label' => 'Accès interdit, erreur 403',
|
||||||
@ -187,11 +187,19 @@
|
|||||||
<div class="col4">
|
<div class="col4">
|
||||||
<?php
|
<?php
|
||||||
echo template::select('configPage404', array_merge(['none' => 'Aucune'],helper::arrayCollumn($pages, 'title', 'SORT_ASC')), [
|
echo template::select('configPage404', array_merge(['none' => 'Aucune'],helper::arrayCollumn($pages, 'title', 'SORT_ASC')), [
|
||||||
'label' => 'Page inexistante, erreur 404 ',
|
'label' => 'Page inexistante, erreur 404',
|
||||||
'selected' =>$this->getData(['config', 'page404']),
|
'selected' =>$this->getData(['config', 'page404']),
|
||||||
'help' => 'Une page 404 ne doit pas apparaître dans l\'arborescence du menu. Créez et éditez une page orpheline.'
|
'help' => 'Une page 404 ne doit pas apparaître dans l\'arborescence du menu. Créez et éditez une page orpheline.'
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col4">
|
||||||
|
<?php
|
||||||
|
echo template::select('configPage302', array_merge(['none' => 'Aucune'],helper::arrayCollumn($pages, 'title', 'SORT_ASC')), [
|
||||||
|
'label' => 'Site en maintenance',
|
||||||
|
'selected' =>$this->getData(['config', 'page302']),
|
||||||
|
'help' => 'Page de maintenance personnalisable'
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -10,8 +10,9 @@ class init extends common {
|
|||||||
'favicon' => 'favicon.ico',
|
'favicon' => 'favicon.ico',
|
||||||
'faviconDark' => 'faviconDark.ico',
|
'faviconDark' => 'faviconDark.ico',
|
||||||
'homePageId' => 'accueil',
|
'homePageId' => 'accueil',
|
||||||
'page404' => 'erreur404',
|
'page302' => 'erreur302',
|
||||||
'page403' => 'erreur403',
|
'page403' => 'erreur403',
|
||||||
|
'page404' => 'erreur404',
|
||||||
'maintenance' => false,
|
'maintenance' => false,
|
||||||
'social' => [
|
'social' => [
|
||||||
'facebookId' => 'facebook',
|
'facebookId' => 'facebook',
|
||||||
@ -544,6 +545,29 @@ class init extends common {
|
|||||||
'hideMenuHead' => false,
|
'hideMenuHead' => false,
|
||||||
'hideMenuChildren' => false
|
'hideMenuChildren' => false
|
||||||
],
|
],
|
||||||
|
'erreur302' => [
|
||||||
|
'typeMenu' => 'text',
|
||||||
|
'iconUrl' => '',
|
||||||
|
'disable' => false,
|
||||||
|
'content' => '<h1 id=\"sectionTitle\">Maintenance en cours...<\/h1>\r\n<p>Notre site est actuellement en maintenance. Nous sommes désolés pour la gêne occasionnée et faisons notre possible pour être rapidement de retour.<\/p>\r\n<div class=\"row\">\r\n<div class=\"col4 offset8 textAlignCenter\"><a href=\"\/10.300\/user\/login\" id=\"maintenanceLogin\" name=\"maintenanceLogin\" class=\"button \"><span class=\"zwiico-lock zwiico-margin-right\" style=\"font-size: 1em;\"><\/span>Administration<\/a><\/div>\r\n<\/div>\r\n<p><\/p>',
|
||||||
|
'hideTitle' => false,
|
||||||
|
'breadCrumb' => false,
|
||||||
|
'metaDescription' => '',
|
||||||
|
'metaTitle' => '',
|
||||||
|
'moduleId' => '',
|
||||||
|
'modulePosition' => 'bottom',
|
||||||
|
'parentPageId' => '',
|
||||||
|
'position' => 0,
|
||||||
|
'group' => self::GROUP_VISITOR,
|
||||||
|
'targetBlank' => false,
|
||||||
|
'title' => 'Erreur 302',
|
||||||
|
'block' => '12',
|
||||||
|
'barLeft' => '',
|
||||||
|
'barRight' => '',
|
||||||
|
'displayMenu' => 'none',
|
||||||
|
'hideMenuSide' => false,
|
||||||
|
'hideMenuChildren' =>false
|
||||||
|
],
|
||||||
'erreur403' => [
|
'erreur403' => [
|
||||||
'typeMenu' => 'text',
|
'typeMenu' => 'text',
|
||||||
'iconUrl' => '',
|
'iconUrl' => '',
|
||||||
|
@ -22,6 +22,16 @@ class maintenance extends common {
|
|||||||
* Maintenance
|
* Maintenance
|
||||||
*/
|
*/
|
||||||
public function index() {
|
public function index() {
|
||||||
|
// Page perso définie et existante
|
||||||
|
if ($this->getData(['config','page302']) !== 'none'
|
||||||
|
AND $this->getData(['page',$this->getData(['config','page302'])]) ) {
|
||||||
|
$this->addOutput([
|
||||||
|
'display' => self::DISPLAY_LAYOUT_LIGHT,
|
||||||
|
'title' => $this->getData(['page',$this->getData(['config','page302']),'title']),
|
||||||
|
'content' => $this->getdata(['page',$this->getData(['config','page302']),'content']) . '<div class="col4 offset8 textAlignCenter"><a href="http://localhost/ZwiiCMS/?user/login" id="maintenanceLogin" name="maintenanceLogin" class="button"><span class="zwiico-lock zwiico-margin-right" style="font-size:1em"><!----></span>Connexion</a></div>',
|
||||||
|
'view' => 'index'
|
||||||
|
]);
|
||||||
|
} else {
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'display' => self::DISPLAY_LAYOUT_LIGHT,
|
'display' => self::DISPLAY_LAYOUT_LIGHT,
|
||||||
@ -29,5 +39,6 @@ class maintenance extends common {
|
|||||||
'view' => 'index'
|
'view' => 'index'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -2,7 +2,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col4 offset8 textAlignCenter">
|
<div class="col4 offset8 textAlignCenter">
|
||||||
<?php echo template::button('maintenanceLogin', [
|
<?php echo template::button('maintenanceLogin', [
|
||||||
'value' => 'Administration',
|
'value' => 'Connexion',
|
||||||
'href' => helper::baseUrl() . 'user/login',
|
'href' => helper::baseUrl() . 'user/login',
|
||||||
'ico' => 'lock'
|
'ico' => 'lock'
|
||||||
]); ?>
|
]); ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user