Browse Source

Merge branch '10500' into 11000

branche_v10
fredtempez 1 year ago
parent
commit
a894628696
  1. 11
      CHANGES.md
  2. 2
      README.md
  3. 13
      core/class/helper.class.php
  4. 3
      core/core.js.php
  5. 38
      core/core.php
  6. 3
      core/layout/blank.css
  7. 3
      core/layout/common.css
  8. 3
      core/layout/light.css
  9. 190
      core/module/addon/addon.php
  10. 18
      core/module/addon/view/import/import.css
  11. 31
      core/module/addon/view/import/import.php
  12. 2
      core/module/addon/view/index/index.css
  13. 3
      core/module/addon/view/index/index.js.php
  14. 2
      core/module/addon/view/index/index.php
  15. 2
      core/module/config/config.php
  16. 2
      core/module/config/view/advanced/advanced.css
  17. 2
      core/module/config/view/advanced/advanced.js.php
  18. 2
      core/module/config/view/backup/backup.css
  19. 2
      core/module/config/view/backup/backup.js.php
  20. 2
      core/module/config/view/index/index.css
  21. 2
      core/module/config/view/manage/manage.css
  22. 2
      core/module/config/view/script/script.css
  23. 3
      core/module/install/install.php
  24. 3
      core/module/install/view/index/index.js.php
  25. 2
      core/module/install/view/update/update.css
  26. 3
      core/module/maintenance/maintenance.php
  27. 2
      core/module/page/page.php
  28. 2
      core/module/page/view/edit/edit.css
  29. 2
      core/module/page/view/edit/edit.js.php
  30. 3
      core/module/sitemap/sitemap.php
  31. 8
      core/module/theme/theme.php
  32. 2
      core/module/theme/view/admin/admin.css
  33. 2
      core/module/theme/view/advanced/advanced.css
  34. 3
      core/module/theme/view/advanced/advanced.js.php
  35. 4
      core/module/theme/view/body/body.css
  36. 3
      core/module/theme/view/body/body.js.php
  37. 2
      core/module/theme/view/footer/footer.css
  38. 2
      core/module/theme/view/footer/footer.js.php
  39. 2
      core/module/theme/view/header/header.css
  40. 2
      core/module/theme/view/header/header.js.php
  41. 3
      core/module/theme/view/index/index.css
  42. 3
      core/module/theme/view/index/index.js.php
  43. 2
      core/module/theme/view/manage/manage.css
  44. 3
      core/module/theme/view/manage/manage.js.php
  45. 2
      core/module/theme/view/menu/menu.css
  46. 3
      core/module/theme/view/menu/menu.js.php
  47. 2
      core/module/theme/view/site/site.css
  48. 3
      core/module/theme/view/site/site.js.php
  49. 3
      core/module/translate/translate.php
  50. 2
      core/module/translate/view/index/index.css
  51. 3
      core/module/user/user.php
  52. 2
      core/module/user/view/add/add.css
  53. 3
      core/module/user/view/add/add.js.php
  54. 2
      core/module/user/view/edit/edit.css
  55. 3
      core/module/user/view/edit/edit.js.php
  56. 2
      core/module/user/view/import/import.css
  57. 2
      core/module/user/view/index/index.css
  58. 3
      core/module/user/view/index/index.js.php
  59. 2
      core/module/user/view/reset/reset.css
  60. 2
      index.php
  61. 12
      module/blog/blog.php
  62. 2
      module/blog/view/add/add.css
  63. 3
      module/blog/view/add/add.js.php
  64. 3
      module/blog/view/article/article.js.php
  65. 1
      module/blog/view/article/article.php
  66. 2
      module/blog/view/comment/comment.css
  67. 3
      module/blog/view/comment/comment.js.php
  68. 2
      module/blog/view/config/config.css
  69. 3
      module/blog/view/config/config.js.php
  70. 2
      module/blog/view/edit/edit.css
  71. 3
      module/blog/view/edit/edit.js.php
  72. 12
      module/form/form.php
  73. 2
      module/form/view/config/config.css
  74. 3
      module/form/view/config/config.js.php
  75. 2
      module/form/view/data/data.css
  76. 3
      module/form/view/data/data.js.php
  77. 11
      module/gallery/gallery.php
  78. 2
      module/gallery/view/config/config.css
  79. 2
      module/gallery/view/config/config.js.php
  80. 2
      module/gallery/view/edit/edit.css
  81. 3
      module/gallery/view/edit/edit.js.php
  82. 2
      module/gallery/view/gallery/gallery.js.php
  83. 2
      module/gallery/view/theme/theme.css
  84. 12
      module/news/news.php
  85. 2
      module/news/view/add/add.css
  86. 3
      module/news/view/add/add.js.php
  87. 2
      module/news/view/config/config.css
  88. 3
      module/news/view/config/config.js.php
  89. 3
      module/news/view/edit/edit.js.php
  90. 2
      module/news/view/index/index.css
  91. 11
      module/redirection/redirection.php
  92. 2
      module/redirection/view/config/config.css
  93. 2
      module/redirection/view/index/index.css
  94. 10
      module/search/search.php
  95. 2
      module/search/view/config/config.css

11
CHANGES.md

@ -9,6 +9,17 @@
- Traduction selon la langue navigateur
- Configuration du site :
- Activation et désactivation de la déconnexion automatique empêchant plusieurs sessions avec le même compte.
## version 10.5.00
- Modifications :
- Gestion des module dans l'interface d'administration.
- à compléter..
## version 10.4.04
- Correction :
- Module Blog : balise non fermée dans les commentaires.
- Modifications :
-Constantes de modules.
## version 10.4.03
- Corrections :

2
README.md

@ -1,5 +1,5 @@
# ZwiiCMS 10.4.03
# ZwiiCMS 10.4.04
Zwii est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.

13
core/class/helper.class.php

@ -161,19 +161,22 @@ class helper {
if (array_key_exists('UPDATE', $class_constants)) {
$update = $value::UPDATE;
} else {
$update = false;
$update = true;
}
// Constante DELETE
if (array_key_exists('DELETE', $class_constants)) {
$delete = $value::DELETE;
} else {
$delete = false;
$delete = true;
}
// Constante DATADIRECTORY
if (array_key_exists('DATADIRECTORY', $class_constants)) {
$dataDirectory= $value::DATADIRECTORY;
if ( array_key_exists('DATADIRECTORY', $class_constants)
&& $class_constants['DATADIRECTORY'] !== []
&& is_array($class_constants['DATADIRECTORY'])
) {
$dataDirectory = $value::DATADIRECTORY;
} else {
$dataDirectory = '';
$dataDirectory = ['fr/module.json'];
}
// Affection
$modules [$value] = [

3
core/core.js.php

@ -1,11 +1,12 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

38
core/core.php

@ -1,15 +1,15 @@
<?php
/**
* This file is part of Zwii. *
* 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
* @license GNU General Public License, version 3
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
@ -1050,6 +1050,38 @@ class common {
return ( rmdir($path) );
}
/**
* Génère une archive d'un dossier et des sous-dossiers
* @param string fileName path et nom de l'archive
* @param string folder path à zipper
* @param array filter dossiers à exclure
*/
public function makeZip ($fileName, $folder, $filter ) {
$zip = new ZipArchive();
$zip->open($fileName, ZipArchive::CREATE | ZipArchive::OVERWRITE);
//$directory = 'site/';
$files = new RecursiveIteratorIterator(
new RecursiveCallbackFilterIterator(
new RecursiveDirectoryIterator(
$folder,
RecursiveDirectoryIterator::SKIP_DOTS
),
function ($fileInfo, $key, $iterator) use ($filter) {
return $fileInfo->isFile() || !in_array($fileInfo->getBaseName(), $filter);
}
)
);
foreach ($files as $name => $file) {
if (!$file->isDir()) {
$filePath = $file->getRealPath();
$relativePath = substr($filePath, strlen(realpath($folder)) + 1);
$zip->addFile($filePath, $relativePath);
}
}
$zip->close();
}
/**
* Mises à jour
*/

3
core/layout/blank.css

@ -1,11 +1,12 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

3
core/layout/common.css

@ -1,11 +1,12 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

3
core/layout/light.css

@ -1,11 +1,12 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

190
core/module/addon/addon.php

@ -9,7 +9,9 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @author Sylvain Lelièvre <lelievresylvain@free.fr>
* @copyright Copyright (C) 2020-2021, Sylvain Lelièvre
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
@ -18,7 +20,9 @@ class addon extends common {
public static $actions = [
'index' => self::GROUP_ADMIN,
'moduleDelete' => self::GROUP_ADMIN
'moduleDelete' => self::GROUP_ADMIN,
'export' => self::GROUP_ADMIN,
'import' => self::GROUP_ADMIN
];
// Gestion des modules
@ -43,9 +47,23 @@ class addon extends common {
}
else{
// Suppression des dossiers
if( $this->removeDir('./module/'.$this->getUrl(2) ) === true){
$infoModules = helper::getModules();
$module = $this->getUrl(2);
//Liste des dossiers associés au module non effacés
$list = '';
foreach( $infoModules[$module]['dataDirectory'] as $moduleId){
if (strpos($moduleId,'module.json') === false && strpos($moduleId,'page.json') === false) {
$list === '' ? $list = self::DATA_DIR.$moduleId : $list .= ', '.self::DATA_DIR. $moduleId;
}
}
if( $this->removeDir('./module/'.$module ) === true){
$success = true;
$notification = 'Module '.$this->getUrl(2) .' effacé du dossier /module/, il peut rester des données dans d\'autres dossiers';
if( $list === ''){
$notification = 'Module '.$module .' désinstallé';
}
else{
$notification = 'Module '.$module .' désinstallé, il reste des données dans '.$list;
}
}
else{
$success = false;
@ -84,17 +102,25 @@ class addon extends common {
$infoModules[$key]['realName'],
$infoModules[$key]['version'],
implode(', ', array_keys($inPagesTitle,$key)),
array_key_exists('delete',$infoModules[$key]) && $infoModules[$key]['delete'] === true && implode(', ',array_keys($inPages,$key)) ===''
//array_key_exists('delete',$infoModules[$key]) && $infoModules[$key]['delete'] === true && implode(', ',array_keys($inPages,$key)) === ''
$infoModules[$key]['delete'] === true && implode(', ',array_keys($inPages,$key)) === ''
? template::button('moduleDelete' . $key, [
'class' => 'moduleDelete buttonRed',
'href' => helper::baseUrl() . $this->getUrl(0) . '/moduleDelete/' . $key . '/' . $_SESSION['csrf'],
'value' => template::ico('cancel')
])
: '',
array_key_exists('dataDirectory',$infoModules[$key]) && $infoModules[$key]['dataDirectory'] !== ''
is_array($infoModules[$key]['dataDirectory']) && implode(', ',array_keys($inPages,$key)) !== ''
? template::button('moduleExport' . $key, [
'class' => 'buttonBlue',
'href' => helper::baseUrl(false).$this->exportZip( $key ),
'href' => helper::baseUrl(). $this->getUrl(0) . '/export/' . $key,// appel de fonction vaut exécution, utiliser un paramètre
'value' => template::ico('download')
])
: '',
is_array($infoModules[$key]['dataDirectory']) && implode(', ',array_keys($inPages,$key)) !== ''
? template::button('moduleExport' . $key, [
'class' => 'buttonBlue',
'href' => helper::baseUrl(). $this->getUrl(0) . '/import/' . $key,// appel de fonction vaut exécution, utiliser un paramètre
'value' => template::ico('upload')
])
: ''
@ -130,9 +156,10 @@ class addon extends common {
// Module normalisé ?
if( is_file( $moduleDir.'/'.$moduleName.'/'.$moduleName.'.php' ) AND is_file( $moduleDir.'/'.$moduleName.'/view/index/index.php' ) ){
// Lecture de la version du module pour validation de la mise à jour
// Lecture de la version et de la validation d'update du module pour validation de la mise à jour
// Pour une version <= version installée l'utilisateur doit cocher 'Mise à jour forcée'
$version = '0.0';
$update = false;
$file = file_get_contents( $moduleDir.'/'.$moduleName.'/'.$moduleName.'.php');
$file = str_replace(' ','',$file);
$file = str_replace("\t",'',$file);
@ -142,6 +169,15 @@ class addon extends common {
$posend = strpos($file, "'", $posdeb + 1);
$version = substr($file, $posdeb + 1, $posend - $posdeb - 1);
}
$pos1 = strpos($file, 'constUPDATE');
if( $pos1 !== false){
$posdeb = strpos($file, "=", $pos1);
$posend = strpos($file, ";", $posdeb + 1);
$strUpdate = substr($file, $posdeb + 1, $posend - $posdeb - 1);
if( strpos( $strUpdate,"true",0) !== false){
$update = true;
}
}
// Module déjà installé ?
$moduleInstal = false;
@ -157,7 +193,7 @@ class addon extends common {
$valInstalVersion = floatval( $infoModules[$moduleName]['version'] );
$newVersion = false;
if( $valNewVersion > $valInstalVersion ) $newVersion = true;
$validMaj = $infoModules[$moduleName]['update'] && ( $newVersion || $checkValidMaj);
$validMaj = $update && ( $newVersion || $checkValidMaj);
// Nouvelle installation ou mise à jour du module
if( ! $moduleInstal || $validMaj ){
@ -179,7 +215,7 @@ class addon extends common {
else{
$notification = ' Version détectée '.$version.' < à celle installée '.$infoModules[$moduleName]['version'];
}
if( $infoModules[$moduleName]['update'] === false){
if( $update === false){
$notification = ' Mise à jour par ce procédé interdite par le concepteur du module';
}
}
@ -236,56 +272,114 @@ class addon extends common {
closedir($dir);
}
/*
* Création récursive d'un zip
* https://makitweb.com/how-to-create-and-download-a-zip-file-with-php/
* Export des données d'un module externes ou interne à module.json
*/
private function createZip($zip,$dir){
if (is_dir($dir)){
if ($dh = opendir($dir)){
while (($file = readdir($dh)) !== false){
// If file
if (is_file($dir.$file)) {
if($file != '' && $file != '.' && $file != '..'){
$zip->addFile($dir.$file);
}
public function export(){
// Lire les données du module
$infoModules = helper::getModules();
// Créer un dossier par défaut
$tmpFolder = self::TEMP_DIR . uniqid();
//$tmpFolder = self::TEMP_DIR . 'test';
if (!is_dir($tmpFolder)) {
mkdir($tmpFolder);
}
// Clés moduleIds dans les pages
$inPages = helper::arrayCollumn($this->getData(['page']),'moduleId', 'SORT_DESC');
// Parcourir les pages utilisant le module
foreach (array_keys($inPages,$this->getUrl(2)) as $pageId) {
foreach ($infoModules[$this->getUrl(2)]['dataDirectory'] as $moduleId) {
// Export des pages hébergeant le module
$pageContent[$pageId] = $this->getData(['page',$pageId]);
/**
* Données module.json ?
*/
if (strpos($moduleId,'module.json')) {
// Création de l'arborescence des langues
// Pas de nom dossier de langue - dossier par défaut
$t = explode ('/',$moduleId);
if ( is_array($t)) {
$lang = 'fr';
} else {
$lang = $t[0];
}
else{
// If directory
if(is_dir($dir.$file) ){
if($file != '' && $file != '.' && $file != '..'){
// Add empty directory
$zip->addEmptyDir($dir.$file);
$folder = $dir.$file.'/';
// Read data of the folder
$this->createZip($zip,$folder);
}
}
// Créer le dossier si inexistant
if (!is_dir($tmpFolder . '/' . $lang)) {
mkdir ($tmpFolder . '/' . $lang);
}
// Sauvegarde si données non vides
$tmpData [$pageId] = $this->getData(['module',$pageId ]);
if ($tmpData [$pageId] !== null) {
file_put_contents($tmpFolder . '/' . $moduleId, json_encode($tmpData));
}
} else {
/**
* Données dans un json personnalisé, le sauvegarder
* Dossier non localisé
*/
if ( file_exists(self::DATA_DIR . '/' . $moduleId)
&& !file_exists($tmpFolder . '/' . $moduleId ) ) {
$this->custom_copy ( self::DATA_DIR . '/' . $moduleId, $tmpFolder . '/' . $moduleId );
}
}
closedir($dh);
}
}
// Enregistrement des pages dans le dossier de langue identique à module
if (!file_exists($tmpFolder . '/' . $lang . '/page.json')) {
file_put_contents($tmpFolder . '/' . $lang . '/page.json', json_encode($pageContent));
}
// création du zip
$fileName = $this->getUrl(2) . '.zip';
$this->makeZip ($fileName, $tmpFolder, []);
if (file_exists($fileName)) {
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="' . $fileName . '"');
header('Content-Length: ' . filesize($fileName));
readfile( $fileName);
// Valeurs en sortie
$this->addOutput([
'display' => self::DISPLAY_RAW
]);
unlink($fileName);
$this->removeDir($tmpFolder);
exit();
} else {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'addon',
'notification' => 'Quelque chose s\'est mal passé',
'state' => false
]);
}
}
/*
* Export des données d'un module externes à module.json
* Importer des données d'un module externes ou interne à module.json
*/
private function exportZip( $exportModule ){
$infoModules = helper::getModules();
// création du zip
public function import(){
// Soumission du formulaire
if($this->isPost()) {
// Récupérer le fichier et le décompacter
$zipFilename = $this->getInput('addonImportFile', helper::FILTER_STRING_SHORT, true);
$tempFolder = uniqid();
mkdir (self::TEMP_DIR . $tempFolder);
echo $zipFilename;
$zip = new ZipArchive();
if( ! is_dir('tmp/exportDataModules')) mkdir('tmp/exportDataModules',0777, true);
$filename = 'tmp/exportDataModules/'.$exportModule.'dataExport.zip';
if( is_file( $filename )) unlink( $filename);
$directory = $infoModules[$exportModule]['dataDirectory'].'/';
if($zip->open( $filename, ZipArchive::CREATE) !== TRUE){
exit;
}
else{
$this->createZip($zip,$directory);
$zip->close();
if ($zip->open(self::FILE_DIR . 'source/' . $zipFilename) === TRUE) {
$zip->extractTo(self::TEMP_DIR . $tempFolder );
}
return( $filename );
// Supprimer le dossier temporaire même si le thème est invalide
//$this->removeDir(self::TEMP_DIR . $tempFolder);
$zip->close();
}
// Valeurs en sortie
$this->addOutput([
'title' => 'Importer des données de module',
'view' => 'import'
]);
}
}

18
core/module/addon/view/import/import.css vendored

@ -0,0 +1,18 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
/** NE PAS EFFACER
* admin.css
*/

31
core/module/addon/view/import/import.php

@ -0,0 +1,31 @@
<?php echo template::formOpen('addonImportForm'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('addonImportBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'addon',
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col2 offset8">
<?php echo template::submit('addonImportSubmit', [
'value' => 'Appliquer'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Installer des données de module</h4>
<div class="row">
<div class="col6 offset3">
<?php echo template::file('addonImportFile', [
'label' => 'Archive ZIP :',
'type' => 2
]); ?>
</div>
</div>
</div>
</div>
</div>

2
core/module/addon/view/index/index.css

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

3
core/module/addon/view/index/index.js.php

@ -1,11 +1,12 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/addon/view/index/index.php

@ -40,7 +40,7 @@
</div>
<?php echo template::formClose(); ?>
<?php if($module::$modInstal): ?>
<?php echo template::table([2, 3, 2, 3, 1, 1], $module::$modInstal, ['Module installé', 'Alias', 'Version', 'Page(s)', 'Supprimer', 'Exporter']); ?>
<?php echo template::table([2, 2, 2, 2, 1, 1, 1, 1], $module::$modInstal, ['Module installé', 'Alias', 'Version', 'Page(s)', 'Supprimer', 'Exporter', 'Importer']); ?>
<?php else: ?>
<?php echo template::speech('Aucun module installé.'); ?>
<?php endif; ?>

2
core/module/config/config.php

@ -9,7 +9,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/config/view/advanced/advanced.css

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/config/view/advanced/advanced.js.php

@ -5,7 +5,7 @@
* file that was distributed with this source code.
*
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/config/view/backup/backup.css

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/config/view/backup/backup.js.php

@ -5,7 +5,7 @@
* file that was distributed with this source code.
*
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/config/view/index/index.css

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/config/view/manage/manage.css

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/config/view/script/script.css

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

3
core/module/install/install.php

@ -2,12 +2,13 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

3
core/module/install/view/index/index.js.php

@ -1,11 +1,12 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/install/view/update/update.css

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

3
core/module/maintenance/maintenance.php

@ -2,12 +2,13 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/page/page.php

@ -9,7 +9,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/page/view/edit/edit.css

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/page/view/edit/edit.js.php

@ -7,7 +7,7 @@
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @authorFrédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

3
core/module/sitemap/sitemap.php

@ -2,12 +2,13 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

8
core/module/theme/theme.php

@ -11,7 +11,7 @@
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
* @copyright : Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
*/
class theme extends common {
@ -692,7 +692,7 @@ class theme extends common {
*/
public function export() {
// Make zip
$zipFilename = $this->makezip($this->getUrl(2));
$zipFilename = $this->zipTheme($this->getUrl(2));
// Téléchargement du ZIP
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
@ -710,7 +710,7 @@ class theme extends common {
*/
public function save() {
// Make zip
$zipFilename = $this->makezip($this->getUrl(2));
$zipFilename = $this->zipTheme($this->getUrl(2));
// Téléchargement du ZIP
if (!is_dir(self::FILE_DIR.'source/theme')) {
mkdir(self::FILE_DIR.'source/theme');
@ -772,7 +772,7 @@ class theme extends common {
* construction du zip
* @param string $modele theme ou admin
*/
private function makezip($modele) {
private function zipTheme($modele) {
// Creation du dossier
$zipFilename = $modele . ' ' .date('d m Y').' '.date('H i s ').'.zip';
$zip = new ZipArchive();

2
core/module/theme/view/admin/admin.css

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/theme/view/advanced/advanced.css

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

3
core/module/theme/view/advanced/advanced.js.php

@ -1,11 +1,12 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

4
core/module/theme/view/body/body.css

@ -1,5 +1,5 @@
/**
* This file is part of Zwii. *
* This file is part of Zwii.
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
@ -7,7 +7,7 @@
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @license GNU General Public License, version 3
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @link http://zwiicms.fr/
*/

3
core/module/theme/view/body/body.js.php

@ -1,11 +1,12 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/theme/view/footer/footer.css

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/theme/view/footer/footer.js.php

@ -8,7 +8,7 @@
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @license GNU General Public License, version 3
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @link http://zwiicms.fr/
*/

2
core/module/theme/view/header/header.css

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/theme/view/header/header.js.php

@ -8,7 +8,7 @@
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @license GNU General Public License, version 3
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @link http://zwiicms.fr/
*/

3
core/module/theme/view/index/index.css

@ -1,11 +1,12 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

3
core/module/theme/view/index/index.js.php

@ -1,11 +1,12 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/theme/view/manage/manage.css

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

3
core/module/theme/view/manage/manage.js.php

@ -1,11 +1,12 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/theme/view/menu/menu.css

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

3
core/module/theme/view/menu/menu.js.php

@ -1,11 +1,12 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/theme/view/site/site.css

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

3
core/module/theme/view/site/site.js.php

@ -1,11 +1,12 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

3
core/module/translate/translate.php

@ -2,12 +2,13 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/translate/view/index/index.css

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

3
core/module/user/user.php

@ -2,12 +2,13 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/user/view/add/add.css

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

3
core/module/user/view/add/add.js.php

@ -1,11 +1,12 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/user/view/edit/edit.css

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

3
core/module/user/view/edit/edit.js.php

@ -1,11 +1,12 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/user/view/import/import.css vendored

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/user/view/index/index.css

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

3
core/module/user/view/index/index.js.php

@ -1,11 +1,12 @@
/**
* 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-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
core/module/user/view/reset/reset.css

@ -7,7 +7,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

2
index.php

@ -9,7 +9,7 @@
* @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-2020, Frédéric Tempez
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/

12
module/blog/blog.php

@ -2,18 +2,25 @@