2023-09-05 15:21:01 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This file is part of Zwii.
|
|
|
|
* For full copyright and license information, please see the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*
|
|
|
|
* @author Rémi Jean <remi.jean@outlook.com>
|
|
|
|
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
|
|
|
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
|
|
|
* @copyright Copyright (C) 2018-2023, Frédéric Tempez
|
|
|
|
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
|
|
|
|
* @link http://zwiicms.fr/
|
|
|
|
*/
|
|
|
|
|
|
|
|
class maintenance extends common
|
|
|
|
{
|
|
|
|
|
|
|
|
public static $actions = [
|
2023-09-21 21:19:39 +02:00
|
|
|
'index' => self::GROUP_VISITOR
|
2023-09-05 15:21:01 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Maintenance
|
|
|
|
*/
|
|
|
|
public function index()
|
|
|
|
{
|
|
|
|
// Redirection vers l'accueil après rafraîchissement et que la maintenance est terminée.
|
|
|
|
if ($this->getData(['config', 'maintenance']) == False) {
|
|
|
|
header('Location:' . helper::baseUrl());
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
// Page perso définie et existante
|
|
|
|
if (
|
2023-09-05 15:31:35 +02:00
|
|
|
$this->getData(['config', 'page302']) !== 'none'
|
|
|
|
and $this->getData(['page', $this->getData(['config', 'page302'])])
|
2023-09-05 15:21:01 +02:00
|
|
|
) {
|
|
|
|
$this->addOutput([
|
|
|
|
'display' => self::DISPLAY_LAYOUT_LIGHT,
|
2023-09-05 15:31:35 +02:00
|
|
|
'title' => $this->getData(['page', $this->getData(['config', 'page302']), 'hideTitle'])
|
2023-09-05 15:21:01 +02:00
|
|
|
? ''
|
2023-09-05 15:31:35 +02:00
|
|
|
: $this->getData(['page', $this->getData(['config', 'page302']), 'title']),
|
|
|
|
//'content' => $this->getdata(['page',$this->getData(['config','page302']),'content']),
|
2023-09-13 18:29:25 +02:00
|
|
|
'content' => $this->getPage($this->getData(['config', 'page302']), self::$siteContent),
|
2023-09-05 15:21:01 +02:00
|
|
|
'view' => 'index'
|
|
|
|
]);
|
|
|
|
} else {
|
|
|
|
// Valeurs en sortie
|
|
|
|
$this->addOutput([
|
|
|
|
'display' => self::DISPLAY_LAYOUT_LIGHT,
|
|
|
|
'title' => helper::translate('Maintenance en cours...'),
|
|
|
|
'view' => 'index'
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|