Browse Source

Récupération extra

12_dev
Fred Tempez 4 months ago
parent
commit
b49c7b5bf5
  1. 6
      core/class/template.class.php
  2. 20
      core/core.js.php
  3. 184
      core/core.php
  4. 63
      core/include/update.inc.php
  5. 16
      core/layout/common.css
  6. 83
      core/module/config/config.php
  7. 7
      core/module/config/view/backup/backup.php
  8. 84
      core/module/config/view/index/index.js.php
  9. 13
      core/module/config/view/index/index.php
  10. 42
      core/module/config/view/restore/restore.php
  11. 26
      core/module/config/view/setup/setup.php
  12. 33
      core/module/page/view/edit/edit.php
  13. 4
      core/module/theme/view/fontAdd/fontAdd.php
  14. 11
      core/module/translate/view/copy/copy.php
  15. 21
      core/module/translate/view/index/index.php
  16. 6
      core/module/user/user.php
  17. 7
      core/module/user/view/add/add.php
  18. 12
      core/module/user/view/edit/edit.php
  19. 5
      core/module/user/view/forgot/forgot.php
  20. 17
      core/module/user/view/import/import.php
  21. 25
      core/module/user/view/index/index.php
  22. 4
      core/vendor/tinymce/init.js
  23. 175
      module/blog/blog.php
  24. 2
      module/blog/changes.md
  25. 9
      module/blog/view/add/add.php
  26. 50
      module/blog/view/config/config.php
  27. 9
      module/blog/view/edit/edit.php
  28. 2
      module/blog/view/index/index.php
  29. 18
      module/blog/view/option/option.css
  30. 46
      module/blog/view/option/option.php
  31. 3
      module/form/changes.md
  32. 126
      module/form/form.php
  33. 93
      module/form/view/config/config.js.php
  34. 164
      module/form/view/config/config.php
  35. 17
      module/form/view/data/data.php
  36. 122
      module/form/view/index/index.php
  37. 18
      module/form/view/option/option.css
  38. 72
      module/form/view/option/option.js.php
  39. 157
      module/form/view/option/option.php
  40. 2
      module/gallery/changes.md
  41. 8
      module/gallery/gallery.php
  42. 10
      module/gallery/view/config/config.php
  43. 7
      module/gallery/view/edit/edit.php
  44. 5
      module/gallery/view/gallery/gallery.php
  45. 7
      module/gallery/view/theme/theme.php
  46. 6
      module/news/changes.md
  47. 127
      module/news/news.php
  48. 9
      module/news/view/add/add.php
  49. 100
      module/news/view/config/config.php
  50. 7
      module/news/view/edit/edit.php
  51. 18
      module/news/view/option/option.css
  52. 95
      module/news/view/option/option.php
  53. 7
      module/redirection/view/config/config.php
  54. 7
      module/search/view/config/config.php

6
core/class/template.class.php

@ -19,15 +19,17 @@ class template {
'name' => $nameId,
'target' => '',
'uniqueSubmission' => false,
'value' => 'Bouton'
'value' => 'Bouton',
'help' => ''
], $attributes);
// Retourne le html
return sprintf(
'<a %s class="button %s %s %s">%s</a>',
'<a %s class="button %s %s %s" %s>%s</a>',
helper::sprintAttributes($attributes, ['class', 'disabled', 'ico', 'value']),
$attributes['disabled'] ? 'disabled' : '',
$attributes['class'],
$attributes['uniqueSubmission'] ? 'uniqueSubmission' : '',
$attributes['help'] ? ' title="' . $attributes['help'] . '" ': '',
($attributes['ico'] ? template::ico($attributes['ico'], 'right') : '') . $attributes['value']
);
}

20
core/core.js.php

@ -490,26 +490,6 @@ $(document).ready(function(){
};
});
/**
* Active le système d'aide interne
*
*/
$(".buttonHelp").click(function() {
$(".helpDisplayContent").slideToggle();
/**
if( $(".buttonHelp").css('opacity') > '0.75'){
$(".buttonHelp").css('opacity','0.5');
}
else{
$(".buttonHelp").css('opacity','1');
}
*/
});
$(".helpDisplayContent").click(function() {
$(".helpDisplayContent").slideToggle();
});
/**
* Remove ID Facebook from URL

184
core/core.php

@ -45,8 +45,8 @@ class common {
// Numéro de version
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/';
const ZWII_VERSION = '11.3.01';
const ZWII_UPDATE_CHANNEL = "v11";
const ZWII_VERSION = '12.0.00';
const ZWII_UPDATE_CHANNEL = "test";
public static $actions = [];
public static $coreModuleIds = [
@ -538,6 +538,8 @@ class common {
}
/**
* Effacer les données de la page
* @param string pageId
@ -547,7 +549,8 @@ class common {
return unlink(self::DATA_DIR . $lang . '/content/' . $this->getData(['page', $page, 'content']));
}
}
/**
* Sauvegarde des données
@ -1032,8 +1035,6 @@ class common {
case 'gif':
$source_image = imagecreatefromgif($src);
break;
case 'webp':
$source_image = imagecreatefromwebp($src);
}
// Image valide
if ($source_image) {
@ -1056,9 +1057,6 @@ class common {
case 'image/gif':
return (imagegif($virtual_image, $dest));
break;
case 'image/webp':
return (imagewebp($virtual_image, $dest));
break;
}
} else {
return (false);
@ -1184,13 +1182,34 @@ class common {
}
/**
* Fonction de parcours des données de module
* @param string $find donnée à rechercher
* @param string $replace donnée à remplacer
* @param array tableau à analyser
* @param int count nombres d'occurrences
* @return array avec les valeurs remplacées.
*/
public function recursive_array_replace ($find, $replace, $array, &$count) {
if (!is_array($array)) {
return str_replace($find, $replace, $array, $count);
}
$newArray = [];
foreach ($array as $key => $value) {
$newArray[$key] = $this->recursive_array_replace($find, $replace, $value,$c);
$count += $c;
}
return $newArray;
}
/**
* 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 ) {
public function makeZip ($fileName, $folder, $filter = [] ) {
$zip = new ZipArchive();
$zip->open($fileName, ZipArchive::CREATE | ZipArchive::OVERWRITE);
//$directory = 'site/';
@ -1656,65 +1675,15 @@ class common {
*/
public function showMenu() {
// Met en forme les items du menu
$itemsLeft = $this->formatMenu(false);
// Menu extra
$itemsRight = $this->formatMenu(true);
// Lien de connexion
if(
(
$this->getData(['theme', 'menu', 'loginLink'])
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
)
OR $this->getUrl(0) === 'theme'
) {
$itemsRight .= '<li id="menuLoginLink" ' .
($this->getUrl(0) === 'theme' ? 'class="displayNone"' : '') .
'><a href="' . helper::baseUrl() . 'user/login/' .
strip_tags(str_replace('/', '_', $this->getUrl())) .
'">' . template::ico('login') .'</a></li>';
}
// Commandes pour les membres simples
if($this->getUser('group') == self::GROUP_MEMBER
&& ( $this->getData(['theme','menu','memberBar']) === true
|| $this->getData(['theme','footer','displayMemberBar']) === false
)
) {
if( $this->getData(['user', $this->getUser('id') , 'files']) === true) $itemsRight .= '<li><a href="' . helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR.'core.json') .'" data-tippy-content="Gérer les fichiers" data-lity>' . template::ico('folder') . '</a></li>';
$itemsRight .= '<li><a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" data-tippy-content="Gérer mon compte">' . template::ico('user', 'right') . '</a></li>';
$itemsRight .= '<li><a id="barLogout" href="' . helper::baseUrl() . 'user/logout" data-tippy-content="Me déconnecter">' . template::ico('logout') . '</a></li>';
}
// Retourne les items du menu
echo '<ul class="navMain" id="menuLeft">' . $itemsLeft . '</ul><ul class="navMain" id="menuRight">' . $itemsRight;
if ($this->getData(['config', 'i18n', 'enable']) === true) {
echo $this->showi18n();
}
echo '</ul>';
}
/**
* Cette fonction est appelée par showMenu
* Elle permet de générer le menu selon qu'il s'agisse du menu principal ou du petit menu
* @param $menu bool false pour le menu principal, true pour le petit menu
*/
private function formatMenu($extra = false) {
$items = '';
$itemsLeft = '';
$currentPageId = $this->getData(['page', $this->getUrl(0)]) ? $this->getUrl(0) : $this->getUrl(2);
foreach($this->getHierarchy() as $parentPageId => $childrenPageIds) {
// Menu extra ou standard
if (
// Absence de la position extra, la page est toujours affichée à gauche.
($this->getData(['page',$parentPageId,'extraPosition']) !== NULL || $extra === true)
&&
$this->getData(['page',$parentPageId,'extraPosition']) !== $extra ) {
continue;
}
// Passer les entrées masquées
// Propriétés de l'item
$active = ($parentPageId === $currentPageId OR in_array($currentPageId, $childrenPageIds)) ? 'active ' : '';
$targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page de l'item
$items .= '<li id="' . $parentPageId .'">';
$itemsLeft .= '<li id="' . $parentPageId .'">';
if ( ( $this->getData(['page',$parentPageId,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
@ -1725,32 +1694,32 @@ class common {
)
){
$pageUrl = ($this->getData(['locale', 'homePageId']) === $this->getUrl(0)) ? helper::baseUrl(false) : helper::baseUrl() . $this->getUrl(0);
$items .= '<a id="' . $parentPageId . '" href="' . $pageUrl . '">';
$itemsLeft .= '<a id="' . $parentPageId . '" href="' . $pageUrl . '">';
} else {
$pageUrl = ($this->getData(['locale', 'homePageId']) === $parentPageId) ? helper::baseUrl(false) : helper::baseUrl() . $parentPageId;
$items .= '<a class="' . $active . '" id="' . $parentPageId . '" href="' . $pageUrl . '"' . $targetBlank . '>';
$itemsLeft .= '<a class="' . $active . '" id="' . $parentPageId . '" href="' . $pageUrl . '"' . $targetBlank . '>';
}
switch ($this->getData(['page', $parentPageId, 'typeMenu'])) {
case '' :
$items .= $this->getData(['page', $parentPageId, 'shortTitle']);
$itemsLeft .= $this->getData(['page', $parentPageId, 'shortTitle']);
break;
case 'text' :
$items .= $this->getData(['page', $parentPageId, 'shortTitle']);
$itemsLeft .= $this->getData(['page', $parentPageId, 'shortTitle']);
break;
case 'icon' :
if ($this->getData(['page', $parentPageId, 'iconUrl']) != "") {
$items .= '<img alt="'.$this->getData(['page', $parentPageId, 'shortTitle']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" />';
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'shortTitle']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" />';
} else {
$items .= $this->getData(['page', $parentPageId, 'shortTitle']);
$itemsLeft .= $this->getData(['page', $parentPageId, 'shortTitle']);
}
break;
case 'icontitle' :
if ($this->getData(['page', $parentPageId, 'iconUrl']) != "") {
$items .= '<img alt="'.$this->getData(['page', $parentPageId, 'titlshortTitlee']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" data-tippy-content="';
$items .= $this->getData(['page', $parentPageId, 'shortTitle']).'"/>';
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'titlshortTitlee']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" data-tippy-content="';
$itemsLeft .= $this->getData(['page', $parentPageId, 'shortTitle']).'"/>';
} else {
$items .= $this->getData(['page', $parentPageId, 'shortTitle']);
$itemsLeft .= $this->getData(['page', $parentPageId, 'shortTitle']);
}
break;
}
@ -1763,21 +1732,21 @@ class common {
}
if($childrenPageIds && $disableChild !== $totalChild &&
$this->getdata(['page',$parentPageId,'hideMenuChildren']) === false) {
$items .= template::ico('down', 'left');
$itemsLeft .= template::ico('down', 'left');
}
// ------------------------------------------------
$items .= '</a>';
$itemsLeft .= '</a>';
if ($this->getdata(['page',$parentPageId,'hideMenuChildren']) === true ||
empty($childrenPageIds)) {
continue;
}
$items .= '<ul class="navSub">';
$itemsLeft .= '<ul class="navSub">';
foreach($childrenPageIds as $childKey) {
// Propriétés de l'item
$active = ($childKey === $currentPageId) ? 'active ' : '';
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page du sous-item
$items .= '<li id=' . $childKey .'>';
$itemsLeft .= '<li id=' . $childKey .'>';
if ( ( $this->getData(['page',$childKey,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
) OR (
@ -1787,49 +1756,78 @@ class common {
)
){
$pageUrl = ($this->getData(['locale', 'homePageId']) === $this->getUrl(0)) ? helper::baseUrl(false) : helper::baseUrl() . $this->getUrl(0);
$items .= '<a id="' . $parentPageId . '" href="'. $pageUrl .'">';
$itemsLeft .= '<a id="' . $parentPageId . '" href="'. $pageUrl .'">';
} else {
$pageUrl = ($this->getData(['locale', 'homePageId']) === $childKey) ? helper::baseUrl(false) : helper::baseUrl() . $childKey;
$items .= '<a class="' . $active . ' ' . $parentPageId . '" id="' . $childKey . '" href="' . $pageUrl . '"' . $targetBlank . '>';
$itemsLeft .= '<a class="' . $active . ' ' . $parentPageId . '" id="' . $childKey . '" href="' . $pageUrl . '"' . $targetBlank . '>';
}
switch ($this->getData(['page', $childKey, 'typeMenu'])) {
case '' :
$items .= $this->getData(['page', $childKey, 'shortTitle']);
$itemsLeft .= $this->getData(['page', $childKey, 'shortTitle']);
break;
case 'text' :
$items .= $this->getData(['page', $childKey, 'shortTitle']);
$itemsLeft .= $this->getData(['page', $childKey, 'shortTitle']);
break;
case 'icon' :
if ($this->getData(['page', $childKey, 'iconUrl']) != "") {
$items .= '<img alt="'.$this->getData(['page', $parentPageId, 'shortTitle']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" />';
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'shortTitle']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" />';
} else {
$items .= $this->getData(['page', $parentPageId, 'shortTitle']);
$itemsLeft .= $this->getData(['page', $parentPageId, 'shortTitle']);
}
break;
case 'icontitle' :
if ($this->getData(['page', $childKey, 'iconUrl']) != "") {
$items .= '<img alt="'.$this->getData(['page', $parentPageId, 'shortTitle']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" data-tippy-content="';
$items .= $this->getData(['page', $childKey, 'shortTitle']).'"/>';
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'shortTitle']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" data-tippy-content="';
$itemsLeft .= $this->getData(['page', $childKey, 'shortTitle']).'"/>';
} else {
$items .= $this->getData(['page', $childKey, 'shortTitle']);
$itemsLeft .= $this->getData(['page', $childKey, 'shortTitle']);
}
break;
case 'icontext' :
if ($this->getData(['page', $childKey, 'iconUrl']) != "") {
$items .= '<img alt="'.$this->getData(['page', $parentPageId, 'shortTitle']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" />';
$items .= $this->getData(['page', $childKey, 'shortTitle']);
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'shortTitle']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" />';
$itemsLeft .= $this->getData(['page', $childKey, 'shortTitle']);
} else {
$items .= $this->getData(['page', $childKey, 'shortTitle']);
$itemsLeft .= $this->getData(['page', $childKey, 'shortTitle']);
}
break;
}
$items .= '</a></li>';
$itemsLeft .= '</a></li>';
}
$items .= '</ul>';
$itemsLeft .= '</ul>';
}
// Lien de connexion
$itemsRight = '';
if(
(
$this->getData(['theme', 'menu', 'loginLink'])
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
)
OR $this->getUrl(0) === 'theme'
) {
$itemsRight .= '<li id="menuLoginLink" ' .
($this->getUrl(0) === 'theme' ? 'class="displayNone"' : '') .
'><a href="' . helper::baseUrl() . 'user/login/' .
strip_tags(str_replace('/', '_', $this->getUrl())) .
'">' . template::ico('login') .'</a></li>';
}
return($items);
// Commandes pour les membres simples
if($this->getUser('group') == self::GROUP_MEMBER
&& ( $this->getData(['theme','menu','memberBar']) === true
|| $this->getData(['theme','footer','displayMemberBar']) === false
)
) {
if( $this->getData(['user', $this->getUser('id') , 'files']) === true) $itemsRight .= '<li><a href="' . helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR.'core.json') .'" data-tippy-content="Gérer les fichiers" data-lity>' . template::ico('folder') . '</a></li>';
$itemsRight .= '<li><a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" data-tippy-content="Gérer mon compte">' . template::ico('user', 'right') . '</a></li>';
$itemsRight .= '<li><a id="barLogout" href="' . helper::baseUrl() . 'user/logout" data-tippy-content="Me déconnecter">' . template::ico('logout') . '</a></li>';
}
// Retourne les items du menu
echo '<ul class="navMain" id="menuLeft">' . $itemsLeft . '</ul><ul class="navMain" id="menuRight">' . $itemsRight;
if ($this->getData(['config', 'i18n', 'enable']) === true) {
echo $this->showi18n();
}
echo '</ul>';
}
/**
@ -2324,7 +2322,7 @@ class core extends common {
*/
foreach ($fonts as $fontId) {
if (!array_key_exists($fontId, $localFonts) ) {
$css .= '@import url("https://fonts.cdnfonts.com/css/' . $fontId . '");';
$css .= '@import url("http://fonts.cdnfonts.com/css/' . $fontId . '");';
// Supprimer l'élément des fontes chargées en ligne
unset($fonts[$fontId]);
}
@ -2550,7 +2548,7 @@ class core extends common {
*/
foreach ($fonts as $fontId) {
if (!array_key_exists($fontId, $localFonts) ) {
$css .= '@import url("https://fonts.cdnfonts.com/css/' . $fontId . '");';
$css .= '@import url("http://fonts.cdnfonts.com/css/' . $fontId . '");';
// Supprimer l'élément des fontes chargées en ligne
unset($fonts[$fontId]);
}

63
core/include/update.inc.php

@ -714,7 +714,7 @@ if ($this->getData(['core', 'dataVersion']) < 11200) {
// Option de dévoilement du mdp
$this->setData(['config', 'connect', 'showPassword', true]);
// Mise à jour
$this->setData(['core', 'dataVersion', 11200]);
}
@ -722,7 +722,7 @@ if ($this->getData(['core', 'dataVersion']) < 11200) {
// Version 11.2.02
if ($this->getData(['core', 'dataVersion']) < 11202) {
// Renommer les champs
// Renommer les champs
$this->setData(['locale', 'cookies', 'mainLabel', $this->getData(['locale', 'cookies', 'cookiesZwiiText']) ]);
$this->setData(['locale', 'cookies', 'gaLabel', $this->getData(['locale', 'cookies', 'cookiesGaText']) ]);
$this->setData(['locale', 'cookies', 'titleLabel', $this->getData(['locale', 'cookies', 'cookiesTitleText']) ]);
@ -741,6 +741,55 @@ if ($this->getData(['core', 'dataVersion']) < 11202) {
$this->setData(['core', 'dataVersion', 11202]);
}
// Version 11.2.03
if ($this->getData(['core', 'dataVersion']) < 11203) {
// Supprimer l'information de redirection
$old = str_replace('?','',$this->getData(['core', 'baseUrl']));
$new = '';
$c3 = 0;
$success = false ;
// Boucler sur les pages
foreach($this->getHierarchy(null,null,null) as $parentId => $childIds) {
$content = $this->getPage($parentId, self::$i18n);
$titre = $this->getData(['page', $parentId, 'title']);
$content = $titre . ' ' . $content ;
$replace = str_replace( 'href="' . $old , 'href="'. $new , stripslashes($content),$c1) ;
$replace = str_replace( 'src="' . $old , 'src="'. $new , stripslashes($replace),$c2) ;
if ($c1 > 0 || $c2 > 0) {
$success = true;
$this->setPage($parentId, $replace, self::$i18n);
$c3 += $c1 + $c2;
}
foreach($childIds as $childId) {
$content = $this->getPage($childId, self::$i18n);
$content = $titre . ' ' . $content ;
$replace = str_replace( 'href="' . $old , 'href="'. $new , stripslashes($content),$c1) ;
$replace = str_replace( 'src="' . $old , 'src="'. $new , stripslashes($replace),$c2) ;
if ($c1 > 0 || $c2 > 0) {
$success = true;
$this->setPage($childId, $replace, self::$i18n);
$c3 += $c1 + $c2;
}
}
}
// Traiter les modules dont la redirection
$content = $this->getdata(['module']);
$replace = $this->recursive_array_replace('href="' . $old , 'href="'. $new, $content, $c1);
$replace = $this->recursive_array_replace('src="' . $old , 'src="'. $new, $replace, $c2);
if ($content !== $replace) {
$this->setdata(['module',$replace]);
$c3 += $c1 + $c2;
$success = true;
}
// Effacer la baseUrl
$this->deleteData(['core', 'baseUrl']);
// Mise à jour
$this->setData(['core', 'dataVersion', 11203]);
}
// Version 11.3.00
if ($this->getData(['core', 'dataVersion']) < 11300) {
@ -784,7 +833,7 @@ if ($this->getData(['core', 'dataVersion']) < 11300) {
$this->setData(['theme', 'title', 'font', $fonts[ $this->getData (['theme', 'title', 'font' ]) ] ]);
$this->setData(['admin', 'fontTitle', $fonts[ $this->getData (['admin', 'fontTitle' ]) ] ]);
$this->setData(['admin', 'fontText', $fonts[$this->getData (['admin','fontText' ]) ] ]);
unlink(self::DATA_DIR . 'admin.css');
unlink(self::DATA_DIR . 'theme.css');
@ -795,11 +844,9 @@ if ($this->getData(['core', 'dataVersion']) < 11300) {
// Version 12.0.00
if ($this->getData(['core', 'dataVersion']) < 12000) {
// Effacer le dossier
if (is_dir('core/module/addon')) {
$this->removeDir('core/module/addon');
}
// Effacer le dossier
$this->removeDir('core/module/addon');
// Mise à jour
$this->setData(['core', 'dataVersion', 12000]);
}
}

16
core/layout/common.css

@ -1744,22 +1744,6 @@ th.col12 {
width: 60%;
}
/* Système d'aide */
.helpDisplayContent {
display: none;
width: 100%;
padding: 10px 10px;
-webkit-box-shadow: 5px 5px 11px 0px #222222;
box-shadow: 5px 5px 11px 0px #222222;
border-radius: 5px;
z-index: 30;
}
.helpDisplayContent, .helpDisplayButton {
cursor: pointer;
}
/* Bannière masquable en petit écran*/
@media screen and (max-width: 768px) {
.bannerDisplay{

83
core/module/config/config.php

@ -19,6 +19,7 @@ class config extends common {
public static $actions = [
'backup' => self::GROUP_ADMIN,
'copyBackups'=> self::GROUP_ADMIN,
'delBackups'=> self::GROUP_ADMIN,
'configMetaImage' => self::GROUP_ADMIN,
'generateFiles' => self::GROUP_ADMIN,
'index' => self::GROUP_ADMIN,
@ -383,6 +384,15 @@ class config extends common {
$this->setData(['user',$users]);
}
}
// Conversion vers des Url relatives
if ($this->getData(['core', 'baseUrl'])) {
$url = str_replace('?','',$this->getData(['core', 'baseUrl']));
// Suppresion de la base Url
$this->updateBaseUrl($url);
// Effacer la baseUrl
$this->deleteData(['core', 'baseUrl']);
}
// Message de notification
$notification = $success === true ? 'Restaurer effectuée avec succès' : 'Erreur inconnue';
$redirect = $this->getInput('configRestoreImportUser', helper::FILTER_BOOLEAN) === true ? helper::baseUrl() . 'config/restore' : helper::baseUrl() . 'user/login/';
@ -584,7 +594,7 @@ class config extends common {
$this->generateFiles();
// Valeurs en sortie
$this->addOutput([
'title' => 'Configuration',
'title' => 'Configuration du site',
'view' => 'index',
'notification' => 'Modifications enregistrées ' ,
'state' => true
@ -616,7 +626,7 @@ class config extends common {
// Valeurs en sortie
$this->addOutput([
'title' => 'Configuration',
'title' => 'Configuration du site',
'view' => 'index'
]);
}
@ -655,10 +665,8 @@ class config extends common {
/**
* Met à jour les données de site avec l'adresse transmise
*/
public function updateBaseUrl () {
public function updateBaseUrl ($url) {
// Supprimer l'information de redirection
$old = str_replace('?','',$this->getData(['core', 'baseUrl']));
$new = helper::baseUrl(false,false);
$c3 = 0;
$success = false ;
// Boucler sur les pages
@ -666,8 +674,8 @@ class config extends common {
$content = $this->getPage($parentId, self::$i18n);
$titre = $this->getData(['page', $parentId, 'title']);
$content = $titre . ' ' . $content ;
$replace = str_replace( 'href="' . $old , 'href="'. $new , stripslashes($content),$c1) ;
$replace = str_replace( 'src="' . $old , 'src="'. $new , stripslashes($replace),$c2) ;
$replace = str_replace( 'href="' . $url , 'href="'. '' , stripslashes($content),$c1) ;
$replace = str_replace( 'src="' . $url , 'src="'. '' , stripslashes($replace),$c2) ;
if ($c1 > 0 || $c2 > 0) {
$success = true;
@ -677,8 +685,8 @@ class config extends common {
foreach($childIds as $childId) {
$content = $this->getPage($childId, self::$i18n);
$content = $titre . ' ' . $content ;
$replace = str_replace( 'href="' . $old , 'href="'. $new , stripslashes($content),$c1) ;
$replace = str_replace( 'src="' . $old , 'src="'. $new , stripslashes($replace),$c2) ;
$replace = str_replace( 'href="' . $url , 'href="'. '' , stripslashes($content),$c1) ;
$replace = str_replace( 'src="' . $url , 'src="'. '' , stripslashes($replace),$c2) ;
if ($c1 > 0 || $c2 > 0) {
$success = true;
$this->setPage($childId, $replace, self::$i18n);
@ -688,8 +696,8 @@ class config extends common {
}
// Traiter les modules dont la redirection
$content = $this->getdata(['module']);
$replace = $this->recursive_array_replace('href="' . $old , 'href="'. $new, $content, $c1);
$replace = $this->recursive_array_replace('src="' . $old , 'src="'. $new, $replace, $c2);
$replace = $this->recursive_array_replace('href="' . $url , 'href="'. '', $content, $c1);
$replace = $this->recursive_array_replace('src="' . $url , 'src="'. '', $replace, $c2);
if ($content !== $replace) {
$this->setdata(['module',$replace]);
$c3 += $c1 + $c2;
@ -718,7 +726,7 @@ class config extends common {
file_put_contents(self::DATA_DIR . 'journal.log',$d);
// Valeurs en sortie
$this->addOutput([
'title' => 'Configuration',
'title' => 'Configuration du site',
'view' => 'index',
'notification' => 'Journal réinitialisé avec succès',
'state' => true
@ -726,7 +734,7 @@ class config extends common {
} else {
// Valeurs en sortie
$this->addOutput([
'title' => 'Configuration',
'title' => 'Configuration du site',
'view' => 'index',
'notification' => 'Aucun journal à effacer',
'state' => false
@ -754,7 +762,7 @@ class config extends common {
} else {
// Valeurs en sortie
$this->addOutput([
'title' => 'Configuration',
'title' => 'Configuration du site',
'view' => 'index',
'notification' => 'Aucun fichier journal à télécharger',
'state' => false
@ -791,7 +799,7 @@ class config extends common {
} else {
// Valeurs en sortie
$this->addOutput([
'title' => 'Configuration',
'title' => 'Configuration du site',
'view' => 'index',
'notification' => 'Aucune liste noire à télécharger',
'state' => false
@ -808,7 +816,7 @@ class config extends common {
$this->setData(['blacklist',[]]);
// Valeurs en sortie
$this->addOutput([
'title' => 'Configuration',
'title' => 'Configuration du site',
'view' => 'index',
'notification' => 'Liste noire réinitialisée avec succès',
'state' => true
@ -816,7 +824,7 @@ class config extends common {
} else {
// Valeurs en sortie
$this->addOutput([
'title' => 'Configuration',
'title' => 'Configuration du site',
'view' => 'index',
'notification' => 'Pas de liste à effacer',
'state' => false
@ -835,32 +843,37 @@ class config extends common {
$this->copyDir(self::BACKUP_DIR, self::FILE_DIR . 'source/backup' );
// Valeurs en sortie
$this->addOutput([
'title' => 'Configuration',
'title' => 'Configuration du site',
'view' => 'index',
'notification' => 'Copie terminée',
'state' => true
]);
}
/**
* Fonction de parcours des données de module
* @param string $find donnée à rechercher
* @param string $replace donnée à remplacer
* @param array tableau à analyser
* @param int count nombres d'occurrences
* @return array avec les valeurs remplacées.
* Vider le dosser des sauvegardes automatisées
*/
private function recursive_array_replace ($find, $replace, $array, &$count) {
if (!is_array($array)) {
return str_replace($find, $replace, $array, $count);
}
$newArray = [];
foreach ($array as $key => $value) {
$newArray[$key] = $this->recursive_array_replace($find, $replace, $value,$c);
$count += $c;
public function delBackups() {
$path = realpath(self::BACKUP_DIR);
$success = $fail = 0;
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)) as $filename)
{
if (strpos($filename,'.zip')) {
$r = unlink($filename);
$success = $r === true ? $succes + 1 : $success;
$fail = $r === false ? $fail + 1 : $fail;
}
}
return $newArray;
// Valeurs en sortie
$this->addOutput([
'title' => 'Configuration du site',
'view' => 'index',
'notification' => 'Suppression terminée :<br />' . $success . ' fichiers effacé(s) <br />' . $fail . ' échec(s)',
'state' => true
]);
}
}

7
core/module/config/view/backup/backup.php

@ -1,14 +1,13 @@
<?php echo template::formOpen('configBackupForm'); ?>
<div class="row">
<div class="col2">
<div class="col1">
<?php echo template::button('configBackupBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'config',
'ico' => 'left',
'value' => 'Retour'
'value' => template::ico('left')
]); ?>
</div>
<div class="col2 offset8">
<div class="col2 offset9">
<?php echo template::submit('configBackupSubmit',[
'value' => 'Sauvegarder',
'uniqueSubmission' => true

84
core/module/config/view/index/index.js.php

@ -10,7 +10,17 @@
* @link http://zwiicms.fr/
*/
$( document).ready(function() {
$(document).ready(function () {
/**
* Confirmation de suppression
*/
$("#configBackupDelButton").on("click", function () {
var _this = $(this);
return core.confirm("Êtes-vous sûr de vouloir supprimer les sauvegardes automatisées ?", function () {
$(location).attr("href", _this.attr("href"));
});
});
// Positionnement inital des options
//-----------------------------------------------------------------------------------------------------
@ -45,36 +55,36 @@ $( document).ready(function() {
$("#connectCaptchaStrongWrapper").addClass("disabled");
$("#connectCaptchaStrongWrapper").slideDown();
$("#connectCaptchaTypeWrapper").addClass("disabled");
$("#connectCaptchaTypeWrapper").slideDown();
$("#connectCaptchaTypeWrapper").slideDown();
} else {
$("#connectCaptchaStrongWrapper").removeClass("disabled");
$("#connectCaptchaStrongWrapper").slideUp();
$("#connectCaptchaTypeWrapper").removeClass("disabled");
$("#connectCaptchaTypeWrapper").slideUp();
$( "#connectCaptchaStrong" ).prop( "checked", false );
$("#connectCaptchaStrong").prop("checked", false);
}
var configLayout = getCookie("configLayout");
if (configLayout == null) {
configLayout = "setup";
setCookie("configLayout","setup");
setCookie("configLayout", "setup");
}
$("#localeContainer").hide();
$("#socialContainer").hide();
$("#connectContainer").hide();
$("#networkContainer").hide();
$("#setupContainer").hide();
$("#" + configLayout + "Container" ).show();
$("#" + configLayout + "Container").show();
$("#config" + capitalizeFirstLetter(configLayout) + "Button").addClass("activeButton");
// Gestion des événements
//---------------------------------------------------------------------------------------------------------------------
/**
/**
* Afficher et masquer options smtp
*/
$("input[name=smtpEnable]").on("change", function() {
$("input[name=smtpEnable]").on("change", function () {
if ($("input[name=smtpEnable]").is(':checked')) {
$("#smtpParam").addClass("disabled");
$("#smtpParam").slideDown();
@ -88,7 +98,7 @@ $( document).ready(function() {
* Afficher et masquer options Auth
*/
$("select[name=smtpAuth]").on("change", function() {
$("select[name=smtpAuth]").on("change", function () {
if ($("select[name=smtpAuth]").val() == true) {
$("#smtpAuthParam").addClass("disabled");
$("#smtpAuthParam").slideDown();
@ -102,7 +112,7 @@ $( document).ready(function() {
* Options de blocage de connexions
* Contrôle la cohérence des sélections et interdit une seule valeur Aucune
*/
$("select[name=connectAttempt]").on("change", function() {
$("select[name=connectAttempt]").on("change", function () {
if ($("select[name=connectAttempt]").val() === "999") {
$("select[name=connectTimeout]").val(0);
} else {
@ -111,7 +121,7 @@ $( document).ready(function() {
}
}
});
$("select[name=connectTimeout]").on("change", function() {
$("select[name=connectTimeout]").on("change", function () {
if ($("select[name=connectTimeout]").val() === "0") {
$("select[name=connectAttempt]").val(999);
} else {
@ -124,20 +134,20 @@ $( document).ready(function() {
/**
* Captcha strong si captcha sélectionné
*/
$("input[name=connectCaptcha]").on("change", function() {
$("input[name=connectCaptcha]").on("change", function () {
if ($("input[name=connectCaptcha]").is(':checked')) {
$("#connectCaptchaStrongWrapper").addClass("disabled");
$("#connectCaptchaStrongWrapper").slideDown();
$("#connectCaptchaTypeWrapper").addClass("disabled");
$("#connectCaptchaTypeWrapper").slideDown();
$("#connectCaptchaTypeWrapper").slideDown();
} else {
$("#connectCaptchaStrongWrapper").removeClass("disabled");
$("#connectCaptchaStrongWrapper").slideUp();
$("#connectCaptchaTypeWrapper").removeClass("disabled");
$("#connectCaptchaTypeWrapper").slideUp();
$( "#connectCaptchaStrong" ).prop( "checked", false );
$("#connectCaptchaStrong").prop("checked", false);
}
});
@ -145,7 +155,7 @@ $( document).ready(function() {
/**
* Sélection de la page de configuration à afficher
*/
$("#configSetupButton").on("click", function() {
$("#configSetupButton").on("click", function () {
$("#localeContainer").hide();
$("#socialContainer").hide();
$("#connectContainer").hide();
@ -156,9 +166,9 @@ $( document).ready(function() {
$("#configSocialButton").removeClass("activeButton");
$("#configConnectButton").removeClass("activeButton");
$("#configNetworkButton").removeClass("activeButton");
setCookie("configLayout","setup");
setCookie("configLayout", "setup");
});
$("#configLocaleButton").on("click", function() {
$("#configLocaleButton").on("click", function () {
$("#setupContainer").hide();
$("#socialContainer").hide();
$("#connectContainer").hide();
@ -169,9 +179,9 @@ $( document).ready(function() {
$("#configSocialButton").removeClass("activeButton");
$("#configConnectButton").removeClass("activeButton");
$("#configNetworkButton").removeClass("activeButton");
setCookie("configLayout","locale");
setCookie("configLayout", "locale");
});
$("#configSocialButton").on("click", function() {
$("#configSocialButton").on("click", function () {
$("#connectContainer").hide();
$("#setupContainer").hide();
$("#localeContainer").hide();
@ -182,9 +192,9 @@ $( document).ready(function() {
$("#configSocialButton").addClass("activeButton");
$("#configConnectButton").removeClass("activeButton");
$("#configNetworkButton").removeClass("activeButton");
setCookie("configLayout","social");
setCookie("configLayout", "social");
});
$("#configConnectButton").on("click", function() {
$("#configConnectButton").on("click", function () {
$("#setupContainer").hide();
$("#localeContainer").hide();
$("#socialContainer").hide();
@ -195,9 +205,9 @@ $( document).ready(function() {
$("#configSocialButton").removeClass("activeButton");
$("#configConnectButton").addClass("activeButton");
$("#configNetworkButton").removeClass("activeButton");
setCookie("configLayout","connect");
setCookie("configLayout", "connect");
});
$("#configNetworkButton").on("click", function() {
$("#configNetworkButton").on("click", function () {
$("#setupContainer").hide();
$("#localeContainer").hide();
$("#socialContainer").hide();
@ -208,49 +218,49 @@ $( document).ready(function() {
$("#configSocialButton").removeClass("activeButton");
$("#configConnectButton").removeClass("activeButton");
$("#configNetworkButton").addClass("activeButton");
setCookie("configLayout","network");
setCookie("configLayout", "network");
});
/**
* Aspect de la souris
*/
$("#socialMetaImage, #socialSiteMap, #configBackupCopyButton").click(function(event) {
*/
$("#socialMetaImage, #socialSiteMap, #configBackupCopyButton").click(function (event) {
$('body, .button').css('cursor', 'wait');
});
// Mise en évidence des erreurs de saisie dans les boutons de sélection
var containers = ["setup", "locale", "social", "connect", "network"];
$.each( containers, function( index, value ){
$.each(containers, function (index, value) {
var a = $("div#" + value + "Container").find("input.notice").not(".displayNone");
if (a.length > 0) {
$("#config" + capitalizeFirstLetter(value) + "Button").addClass("buttonNotice");
$("#config" + capitalizeFirstLetter(value) + "Button").addClass("buttonNotice");
} else {
$("#config" + capitalizeFirstLetter(value) + "Button").removeClass("buttonNotice");
$("#config" + capitalizeFirstLetter(value) + "Button").removeClass("buttonNotice");
}
});
});
function setCookie(name,value,days) {
function setCookie(name, value, days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days*24*60*60*1000));
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + "; path=/; samesite=lax";
document.cookie = name + "=" + (value || "") + expires + "; path=/; samesite=lax";
}
function getCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
}
return null;
}

13
core/module/config/view/index/index.php

@ -1,23 +1,22 @@
<?php echo template::formOpen('configForm');?>
<div class="row">
<div class="col2">
<div class="col1">
<?php echo template::button('configBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl(false),
'ico' => 'home',
'value' => 'Accueil'
'value' => template::ico('home')
]); ?>
</div>
<div class="col2 ">
<div class="col1">
<?php echo template::button('configHelp', [
'class' => 'buttonHelp',
'href' => 'https://doc.zwiicms.fr/configuration-du-site',
'target' => '_blank',
'ico' => 'help',
'value' => 'Aide'
'value' => template::ico('help'),
'help' => 'Consulter l\'aide en ligne'
]); ?>
</div>
<div class="col2 offset6">
<div class="col2 offset8">
<?php echo template::submit('Submit'); ?>
</div>
</div>

42
core/module/config/view/restore/restore.php

@ -38,46 +38,4 @@
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Conversion après la restauration<?php echo template::help('Conversion des URL des ressources multimédia entre deux sites aux arborescences différentes.');?></h4>
<div class="row">
<div class="col4 offset1">
<?php
if (is_null($this->getData(['core', 'baseUrl'])) ) {
$baseUrlValue = 'Pas de donnée dans la sauvegarde';
$buttonClass = 'disabled';
} elseif ($this->getData(['core', 'baseUrl']) === '') {
$baseUrlValue = '/';
$buttonClass = helper::baseUrl(false,false) !== $this->getData(['core', 'baseUrl']) ? '' : 'disabled';
} else {
$baseUrlValue = str_replace('?','',$this->getData(['core', 'baseUrl']));
$buttonClass = helper::baseUrl(false,false) !== $baseUrlValue ? '' : 'disabled';
}
echo template::text('configRestoreBaseURLToConvert', [
'label' => 'Dossier de l\'archive' ,
'value' => $baseUrlValue,
'readonly' => true,
'help' => 'Le dossier de base du site est stockée dans la sauvegarde.'
]); ?>
</div>
<div class="col4">
<?php echo template::text('configRestoreCurrentURL', [
'label' => 'Dossier du site actuel',
'value' => helper::baseUrl(false,false),
'readonly' => true
]); ?>
</div>
<div class="col2 verticalAlignMiddle">
<?php echo template::button('configRestoreUpdateBaseURLButton', [
'href' => helper::baseUrl() . 'config/updateBaseUrl',
'class' => $buttonClass,
'value' => 'convertir'
]); ?>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>

26
core/module/config/view/setup/setup.php

@ -118,26 +118,36 @@
]); ?>
</div>
</div>
<div class="rows textAlignCenter">
<div class="col3">
<div class="row">
<div class="col4 offset1">
<?php echo template::button('configBackupButton', [
'href' => helper::baseUrl() . 'config/backup',
'value' => 'Sauvegarder',
'value' => 'Sauvegarder les données du site',
'ico' => 'download-cloud'
]); ?>
</div>
<div class="col3">
<div class="col4 offset1">
<?php echo template::button('configRestoreButton', [
'href' => helper::baseUrl() . 'config/restore',
'value' => 'Restaurer',
'value' => 'Restaurer les données du site',
'ico' => 'upload-cloud'
]); ?>
</div>
<div class="col3">
</div>
<div class="row">
<div class="col4 offset1">
<?php echo template::button('configBackupCopyButton', [
'href' => helper::baseUrl() . 'config/copyBackups',
'value' => 'Copie sauvegardes auto',
'ico' => 'download-cloud'
'value' => 'Copier sauvegardes auto',
'ico' => 'docs'
]); ?>
</div>
<div class="col4 offset1">
<?php echo template::button('configBackupDelButton', [
'href' => helper::baseUrl() . 'config/delBackups',
'value' => 'Vider dossier sauvegardes auto',
'ico' => 'cancel',
'class' => 'buttonRed'
]); ?>
</div>
</div>

33
core/module/page/view/edit/edit.php

@ -1,37 +1,36 @@
<?php echo template::formOpen('pageEditForm'); ?>
<div class="row">
<div class="col2">
<div class="col1">
<?php $href = helper::baseUrl() . $this->getUrl(2); ?>
<?php if ($this->getData(['page', $this->getUrl(2), 'moduleId']) === 'redirection' || 'code')$href = helper::baseUrl(); ?>
<?php echo template::button('pageEditBack', [
'class' => 'buttonGrey',
'href' => $href,
'ico' => 'left',
'value' => 'Retour'
'value' => template::ico('home')
]); ?>
</div>
<div class="col2">
<div class="col1">
<?php echo template::button('pageEditHelp', [
'href' => 'https://doc.zwiicms.fr/edition-des-pages',
'target' => '_blank',
'ico' => 'help',
'value' => 'Aide',
'class' => 'buttonHelp'
]); ?>
</div>
<div class="col2 offset2">
<?php echo template::button('pageEditDuplicate', [
'href' => helper::baseUrl() . 'page/duplicate/' . $this->getUrl(2) . '&csrf=' . $_SESSION['csrf'],
'value' => 'Dupliquer',
'ico' => 'clone'
'value' => template::ico('help'),
'class' => 'buttonHelp',
'help' => 'Consulter l\'aide en ligne'
]); ?>
</div>
<div class="col2">
<div class="col1 offset6">
<?php echo template::button('pageEditDelete', [
'class' => 'buttonRed',
'href' => helper::baseUrl() . 'page/delete/' . $this->getUrl(2) . '&csrf=' . $_SESSION['csrf'],
'value' => 'Supprimer',
'ico' => 'cancel'
'value' => template::ico('cancel'),
'help' => 'Effacer la page'
]); ?>
</div>
<div class="col1">
<?php echo template::button('pageEditDuplicate', [
'href' => helper::baseUrl() . 'page/duplicate/' . $this->getUrl(2) . '&csrf=' . $_SESSION['csrf'],
'value' => template::ico('clone'),
'help' => 'Dupliquer la page'
]); ?>
</div>
<div class="col2">

4
core/module/theme/view/fontAdd/fontAdd.php

@ -21,13 +21,13 @@
<h4>Identité de la fonte</h4>
<div class="row">
<div class="col6">
<?php echo template::checkbox('fontAddFontImported', true, 'Fonte téléchargée sur <a href="https://cdnfonts.com" target="_blank">cdnFonts</a>', [
<?php echo template::checkbox('fontAddFontImported', true, 'Fonte téléchargée sur cdnFonts', [
'help' => 'Police utilisée en ligne, se connecter sur cdnFonts pour récupérer les informations nécessaires.'
]); ?>
</div>
<div class="col6">
<?php echo template::checkbox('fontAddFontFile', true,'Fonte installée', [
'help' => 'Sélectionnez un fichier de fonte au format WOFF.'
'help' => '<br/>Sélectionnez un fichier de fonte au format WOFF.'
]); ?>
</div>
</div>

11
core/module/translate/view/copy/copy.php

@ -1,15 +1,16 @@
<?php echo template::formOpen('translateFormCopy'); ?>
<div class="row">
<div class="col2">
<div class="col1">
<?php echo template::button('translateFormCopyBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'translate',
'ico' => 'left',
'value' => 'Retour'
'value' => template::ico('left')
]); ?>
</div>
<div class="col2 offset8">
<?php echo template::submit('translateFormCopySubmit'); ?>
<div class="col2 offset9">
<?php echo template::submit('translateFormCopySubmit', [
'value' => 'Copier'
]); ?>
</div>
</div>
<div class="row">

21
core/module/translate/view/index/index.php

@ -1,28 +1,27 @@
<?php echo template::formOpen('translateForm'); ?>
<div class="row">
<div class="col2">
<div class="col1">
<?php echo template::button('translateFormBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl(),
'ico' => 'left',
'value' => 'Retour'
'value' => template::ico('left')
]); ?>
</div>
<div class="col2">
<div class="col1">
<?php echo template::button('translateHelp', [
'href' => 'https://doc.zwiicms.fr/prise-en-charge-des-langues-etrangeres',
'target' => '_blank',
'ico' => 'help',
'value' => 'Aide',
'class' => 'buttonHelp'
'value' => template::ico('help'),
'class' => 'buttonHelp',
'help' => 'Consulter l\'aide en ligne'
]); ?>
</div>
<div class="col3 offset3">
<div class="col1 offset7">
<?php echo template::button('translateButton', [
'href' => helper::baseUrl() . 'translate/copy',
'value' => 'Utilitaire de copie',
'ico' => 'cog-alt',
'disabled' => $module::$siteTranslate
'value' => template::ico('docs'),
'disabled' => $module::$siteTranslate,
'help' => 'Copie de sites inter-langues'
]); ?>
</div>
<div class="col2">

6
core/module/user/user.php

@ -346,12 +346,14 @@ class user extends common {
self::$groups[$this->getData(['user', $userId, 'group'])],
template::button('userEdit' . $userId, [
'href' => helper::baseUrl() . 'user/edit/' . $userId . '/back/'. $_SESSION['csrf'],
'value' => template::ico('pencil')
'value' => template::ico('pencil'),
'help' => 'Editer ' . $userId
]),
template::button('userDelete' . $userId, [
'class' => 'userDelete buttonRed',
'href' => helper::baseUrl() . 'user/delete/' . $userId. '/' . $_SESSION['csrf'],
'value' => template::ico('cancel')
'value' => template::ico('cancel'),
'help' => 'Supprimer ' . $userId
])
];
}

7
core/module/user/view/add/add.php

@ -1,14 +1,13 @@
<?php echo template::formOpen('userAddForm'); ?>
<div class="row">
<div class="col2">
<div class="col1">
<?php echo template::button('userAddBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'user',
'ico' => 'left',
'value' => 'Retour'
'value' => template::ico('left')
]); ?>
</div>
<div class="col2 offset8">
<div class="col2 offset9">
<?php echo template::submit('userAddSubmit'); ?>
</div>
</div>

12
core/module/user/view/edit/edit.php

@ -1,23 +1,21 @@
<?php echo template::formOpen('userEditForm'); ?>
<div class="row">
<div class="col2">
<?php if($this->getUser('group') === self::GROUP_ADMIN): ?>
<div class="col1">
<?php if($this->getUser('group') === self::GROUP_ADMIN): ?>
<?php echo template::button('userEditBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'user',
'ico' => 'left',
'value' => 'Retour'
'value' => template::ico('left')
]); ?>
<?php else: ?>
<?php echo template::button('userEditBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl(false),
'ico' => 'home',
'value' => 'Accueil'
'value' => template::ico('home')
]); ?>
<?php endif; ?>
</div>
<div class="col2 offset8">
<div class="col2 offset9">
<?php echo template::submit('userEditSubmit'); ?>
</div>
</div>

5
core/module/user/view/forgot/forgot.php

@ -3,11 +3,10 @@
'label' => 'Identifiant'
]); ?>
<div class="row">
<div class="col3 offset6">
<div class="col1 offset9">
<?php echo template::button('userForgotBack', [
'href' => helper::baseUrl() . 'user/login/' . $this->getUrl(2),
'ico' => 'left',
'value' => 'Retour'
'value' => template::ico('left')
]); ?>
</div>
<div class="col3">

17
core/module/user/view/import/import.php

@ -1,23 +1,22 @@
<?php echo template::formOpen('userImportForm'); ?>
<div class="row">
<div class="col2">
<div class="col1">
<?php echo template::button('userImportBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'user',
'ico' => 'left',
'value' => 'Retour'
'value' => template::ico('left')
]); ?>
</div>
<div class="col2">
<div class="col1">
<?php echo template::button('userHelp', [
'href' => 'https://doc.zwiicms.fr/importation-d-une-liste-d-utilisateurs',
'target' => '_blank',
'ico' => 'help',
'value' => 'Aide',
'class' => 'buttonHelp'
'value' => template::ico('help'),
'class' => 'buttonHelp',