Compare commits
274 Commits
master
...
10.0.126.d
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ae7a7a66a7 | ||
![]() |
76a91ccdeb | ||
![]() |
226761c3a5 | ||
![]() |
0f03ac4ebf | ||
![]() |
31e6c24ead | ||
![]() |
ab8070ebe9 | ||
![]() |
80404a46ca | ||
![]() |
cec74473a0 | ||
![]() |
e2c4b0d919 | ||
![]() |
4923ec53c0 | ||
![]() |
f1d53735be | ||
![]() |
5c3d127746 | ||
![]() |
5ca0cb7d53 | ||
![]() |
25dfb13f00 | ||
![]() |
2e2b90a0ae | ||
![]() |
682a7a6e80 | ||
![]() |
becc17055c | ||
![]() |
f1486adb13 | ||
![]() |
d7cf6ba1e2 | ||
![]() |
5356eea8f7 | ||
![]() |
564ff0424d | ||
![]() |
b2fc224cee | ||
![]() |
9fd5e035de | ||
![]() |
640081f8d3 | ||
![]() |
2cc58e38da | ||
![]() |
c19642628e | ||
![]() |
53f23d2b9a | ||
![]() |
33a6a691c6 | ||
![]() |
4538dda64a | ||
![]() |
9083228e5a | ||
![]() |
7633fdf7f4 | ||
![]() |
ed3e276610 | ||
![]() |
8ef190477b | ||
![]() |
a08c5fc661 | ||
![]() |
f94f78ba77 | ||
![]() |
d970a8b823 | ||
![]() |
b6c01048fb | ||
![]() |
a477653d9d | ||
![]() |
8043b139a4 | ||
![]() |
b16cf245a0 | ||
![]() |
35aef499c5 | ||
![]() |
15d002d8c2 | ||
![]() |
26715c9e13 | ||
![]() |
f33b3ee192 | ||
![]() |
b272db745f | ||
![]() |
a077d408db | ||
![]() |
e0a75d4d00 | ||
![]() |
5c93617f73 | ||
![]() |
b59ca1f458 | ||
![]() |
79f1c18458 | ||
![]() |
f3adbe0c87 | ||
![]() |
4cefb749ac | ||
![]() |
e9535987a7 | ||
![]() |
2d4855d97e | ||
![]() |
5836ce8c50 | ||
![]() |
c46e8b74de | ||
![]() |
4627d726f4 | ||
![]() |
2e148f2231 | ||
![]() |
74bd91c8a3 | ||
![]() |
3499c2d268 | ||
![]() |
353c29a4be | ||
![]() |
3476366cce | ||
![]() |
3736852d80 | ||
![]() |
9076eb3325 | ||
![]() |
8b8ce715ed | ||
![]() |
b8f680e228 | ||
![]() |
c9d7c228fb | ||
![]() |
e338f7ca2b | ||
![]() |
9f79daf5ca | ||
![]() |
a99b91f63c | ||
![]() |
c914d45c5d | ||
![]() |
9d3f487d27 | ||
![]() |
36d847c5c6 | ||
![]() |
1db71f1751 | ||
![]() |
d2ddb4bf32 | ||
![]() |
958355e5ba | ||
![]() |
a1df57b24b | ||
![]() |
56c2ecece1 | ||
![]() |
4f97509e0d | ||
![]() |
4ea76eb239 | ||
![]() |
922c653a86 | ||
![]() |
87158e0e91 | ||
![]() |
211af18863 | ||
![]() |
b214a35a6f | ||
![]() |
b4a1d5fc68 | ||
![]() |
c12bc4003f | ||
![]() |
9995073aeb | ||
![]() |
b120b4fcc7 | ||
![]() |
57e32d9ccf | ||
![]() |
2d085f0c11 | ||
![]() |
21e67ea452 | ||
![]() |
c5f1d228ec | ||
![]() |
d9e0dba109 | ||
![]() |
da53df9b03 | ||
![]() |
1c10eca976 | ||
![]() |
89f2231026 | ||
![]() |
2b7fee953b | ||
![]() |
95b327888e | ||
![]() |
ec15740d23 | ||
![]() |
96d16b5f7b | ||
![]() |
a499cc8248 | ||
![]() |
704fe30735 | ||
![]() |
5e87551c04 | ||
![]() |
5a05f92c6e | ||
![]() |
82f40008f9 | ||
![]() |
b1e5058698 | ||
![]() |
c3d396ea4b | ||
![]() |
6930a2093c | ||
![]() |
51020a8a86 | ||
![]() |
0015a07e35 | ||
![]() |
8cd0b8dc61 | ||
![]() |
1e417a7316 | ||
![]() |
5001f3fd63 | ||
![]() |
9fdc645bb5 | ||
![]() |
400b088f08 | ||
![]() |
5330e1bd5f | ||
![]() |
987eff3bd5 | ||
![]() |
324cbd8fde | ||
![]() |
59cc5383ba | ||
![]() |
70bb0c90a9 | ||
![]() |
489980fd0d | ||
![]() |
dfb75a2952 | ||
![]() |
d3219f6754 | ||
![]() |
c3bfe2107f | ||
![]() |
b3285c4cf6 | ||
![]() |
755db23dd0 | ||
![]() |
85b4b178ca | ||
![]() |
9f97d9e5e6 | ||
![]() |
400b83ac4e | ||
![]() |
b063a53a29 | ||
![]() |
2a1a0a4d06 | ||
![]() |
ee0e159edf | ||
![]() |
623b5d0395 | ||
![]() |
b03bb7b857 | ||
![]() |
9f6620b50b | ||
![]() |
2e5918d483 | ||
![]() |
76b96a1548 | ||
![]() |
33c8fe2f88 | ||
![]() |
e813837888 | ||
![]() |
e95396d581 | ||
![]() |
1082fc4e3b | ||
![]() |
7b30f1f361 | ||
![]() |
5b6395a912 | ||
![]() |
5a56f83fbd | ||
![]() |
73cdf7e945 | ||
![]() |
fee7a974e4 | ||
![]() |
d07f5984f2 | ||
![]() |
3a9bea0f87 | ||
![]() |
4079334ba4 | ||
![]() |
00b2ab8b32 | ||
![]() |
63a0a2e2bf | ||
![]() |
10e4667349 | ||
![]() |
0ef4ac1b08 | ||
![]() |
16fe83021e | ||
![]() |
82aff35714 | ||
![]() |
d47c47824a | ||
![]() |
4e1175adde | ||
![]() |
8555a07b9e | ||
![]() |
208702dd65 | ||
![]() |
d77e3ac6e2 | ||
![]() |
97acc63b83 | ||
![]() |
8142b1d68f | ||
![]() |
a732b0294f | ||
![]() |
6b9ccbaae6 | ||
![]() |
545b57d989 | ||
![]() |
1605a852e8 | ||
![]() |
4956a3a9b4 | ||
![]() |
901d9b9e00 | ||
![]() |
70b90e20ee | ||
![]() |
2f9f61c5a3 | ||
![]() |
5d880fa2da | ||
![]() |
ad970c0f3b | ||
![]() |
448c6833c2 | ||
![]() |
6a8c0d27a1 | ||
![]() |
c6aa384f12 | ||
![]() |
0ec345a8b4 | ||
![]() |
5fe9730a90 | ||
![]() |
e3156423b7 | ||
![]() |
25a1facf1a | ||
![]() |
e1d3743676 | ||
![]() |
0e6511f06a | ||
![]() |
09021e81f7 | ||
![]() |
3e5e0c9d4e | ||
![]() |
b0fef81518 | ||
![]() |
355ddf2169 | ||
![]() |
67ba108118 | ||
![]() |
94e700bf43 | ||
![]() |
78b42e1e9a | ||
![]() |
ff361dde03 | ||
![]() |
0830244567 | ||
![]() |
1236951cd4 | ||
![]() |
c78484d4b3 | ||
![]() |
c1a6401def | ||
![]() |
019f1ceea0 | ||
![]() |
92b0fabf2d | ||
![]() |
ff245af7c3 | ||
![]() |
e78752b764 | ||
![]() |
af755d0c58 | ||
![]() |
fd11691f14 | ||
![]() |
d5a39fe7eb | ||
![]() |
7a90458a3c | ||
![]() |
758313376d | ||
![]() |
7bea8e03e7 | ||
![]() |
68d52a7f68 | ||
![]() |
7a0a680e70 | ||
![]() |
eb47c9a509 | ||
![]() |
68aff93b70 | ||
![]() |
bcb19fd01d | ||
![]() |
21c63e337c | ||
![]() |
9526ac1e57 | ||
![]() |
c59bb0bc78 | ||
![]() |
eb4f257c5d | ||
![]() |
7c46f16c3e | ||
![]() |
86b8d0fefe | ||
![]() |
4bd6a831b5 | ||
![]() |
9944b9110d | ||
![]() |
3ed6da19a6 | ||
![]() |
313d23bf2b | ||
![]() |
9283d7a1b4 | ||
![]() |
e03bfd90ad | ||
![]() |
c88ab3e5e9 | ||
![]() |
0c59bda365 | ||
![]() |
f33d26b285 | ||
![]() |
7bae64a422 | ||
![]() |
faf0c674c9 | ||
![]() |
b071810a52 | ||
![]() |
90f2c176c5 | ||
![]() |
833d88919a | ||
![]() |
9b90dfcf9b | ||
![]() |
864cfd4ab3 | ||
![]() |
1129081d10 | ||
![]() |
79e8471306 | ||
![]() |
afd0a6d35d | ||
![]() |
716b37e2db | ||
![]() |
e1e741db65 | ||
![]() |
bb867dbe63 | ||
![]() |
a5d72705e0 | ||
![]() |
007514bf33 | ||
![]() |
e496e5f322 | ||
![]() |
4b3790fb39 | ||
![]() |
8197cf4686 | ||
![]() |
ed0123a14a | ||
![]() |
baeb55522b | ||
![]() |
60688117f6 | ||
![]() |
1e1b86365d | ||
![]() |
d6c0d000b2 | ||
![]() |
7e3ce76e4c | ||
![]() |
4886a8e371 | ||
![]() |
263ca87d83 | ||
![]() |
2dd10e0c58 | ||
![]() |
2084dca548 | ||
![]() |
377975fc47 | ||
![]() |
6dc022947d | ||
![]() |
9bd981566e | ||
![]() |
48bfeec661 | ||
![]() |
fed86ec6c0 | ||
![]() |
67f377ec48 | ||
![]() |
f63ee3e13a | ||
![]() |
5617ab6558 | ||
![]() |
6bce09f1e2 | ||
![]() |
093d8cf651 | ||
![]() |
bd7febd038 | ||
![]() |
70c647ac97 | ||
![]() |
586fa44e76 | ||
![]() |
b1c04577c1 | ||
![]() |
9b5ed2eb0d | ||
![]() |
c8a99a64f0 | ||
![]() |
860e33d423 | ||
![]() |
18cd6a0382 | ||
![]() |
a0b202d368 | ||
![]() |
4e1d38d7ec | ||
![]() |
d181895cef | ||
![]() |
543d34bb02 | ||
![]() |
2325fc7f1c |
7
.gitignore
vendored
@ -27,5 +27,8 @@ site/file/thumb/*
|
||||
core/vendor/tinymce/link_list.json
|
||||
site/tmp/.htaccess
|
||||
.vscode/*
|
||||
|
||||
|
||||
site/data/body.inc.html
|
||||
site/data/head.inc.html
|
||||
sitemap.xml.gz
|
||||
sitemap.xml
|
||||
robots.txt
|
||||
|
58
CHANGES.md
@ -1,5 +1,41 @@
|
||||
# Changelog
|
||||
|
||||
## Version 10.0.00
|
||||
- Améliorations :
|
||||
- Architecture de stockage des données.
|
||||
- Les données sont désormais stockées dans des fichiers distincts (core, config, theme, user, page et module).
|
||||
- Les données relatives aux pages et aux modules sont stockées dans un dossier localisé fr par défaut.
|
||||
- Procédures internes de gestion des données.
|
||||
- Le système ne conserve plus en mémoire l'intégralité des données de site comme dans les versions précédentes.
|
||||
- Les données du site sont chargées à la demande au lieu d'être lues dans leur intégralité.
|
||||
- Les mises à jour et effacement sont appliquées en direct sur le disque.
|
||||
- Multilinguisme :
|
||||
- Site publiable en différentes versions de langues européennes.
|
||||
- Un nouveau menu affiche l'écran de gestion des langues disponibles.
|
||||
- Le changement de la langue courante dans l'interface d'administration ainsi que dans le menu utilisateur.
|
||||
- En mode déconnecté, la langue affichée est celle du navigateur ou choix de la langue dans la barre de menu.
|
||||
- Les drapeaux affichés dans le menu ne font pas référence à un pays mais à une langue, sont proposés des langues européennes et régionales nationales.
|
||||
- Thème menu :
|
||||
- Lorsque le menu est réduit, le titre du site peut être inséré à la gauche du menu burger.
|
||||
|
||||
- Modifications :
|
||||
- Procédure d'installation :
|
||||
- Les données manquantes sont installées au cas par cas, les données présentes ne sont plus écrasées par l'installation.
|
||||
- Une notification est affichée quand un fichier de données manquant a été réinstallé.
|
||||
- La suppression de user.json entraîne le déclenchement de la procédure d'installation
|
||||
- Procédure d'importation :
|
||||
- L'importation des données est possible uniquement à partir d'une version 9 et non des version ultérieures.
|
||||
- Les données de site précédentes sont écrasées, les données localisées effacées.
|
||||
- Les données relatives aux comptes des utilisateurs déjà installés peuvent être conservées.
|
||||
- Une notification est affichée après l'importation.
|
||||
- Procédure d'installation :
|
||||
- En cas d'effacement d'un des fichiers de données sauf user.json, une version par défaut est installée.
|
||||
- Configuration du site :
|
||||
- Ecran dédié à la sauvegarde automatique, à l'import et à l'export.
|
||||
- Fonction d'import des données provenant d'autres version de ZwiiCMS, avec option de préservation des données utilisateurs
|
||||
- Le nom des fichiers de sauvegarde contient l'adresse de base du site
|
||||
|
||||
|
||||
## version 9.2.11
|
||||
- Corrections :
|
||||
- Marge du pied de page par défaut 5px
|
||||
@ -163,11 +199,11 @@
|
||||
|
||||
## Version 9.1.05
|
||||
- Correction :
|
||||
- Site par défaut : lien Zwii masqué du menu horizontal
|
||||
- Site par défaut : lien ZwiiCMS masqué du menu horizontal
|
||||
- Modifications :
|
||||
- Présentation de l'édition des pages
|
||||
- Largeur dynamique du bouton envoyer dans le formulaire
|
||||
- Lien dans le footer vers le site Zwii
|
||||
- Lien dans le footer vers le site ZwiiCMS
|
||||
- Redirection, écran de confirmation
|
||||
|
||||
## Version 9.1.04
|
||||
@ -263,12 +299,12 @@
|
||||
## Version 9.0.13
|
||||
- Modifications :
|
||||
- Paramètre Tippy : ajouter area[title]
|
||||
- SimpleLightbox : bug d'affichage sous Edge, erreur signalée mais corrigée dans Zwii
|
||||
- SimpleLightbox : bug d'affichage sous Edge, erreur signalée mais corrigée dans ZwiiCMS
|
||||
|
||||
## Version 9.0.12
|
||||
- Corrections :
|
||||
- Configuration de Tippy pour l'utilisation de l'argument title dans les balises a et img. Data-tippy-content reste un argument reconnu
|
||||
- Bug de la redirection lorsqu'un dossier porte le nom d'une page, le contrôle de cohérence est déplacé dans page.
|
||||
- Bug de la redirection lorsque un dossier porte le nom d'une page, le contrôle de cohérence est déplacé dans page.
|
||||
|
||||
## Version 9.0.11
|
||||
- Corrections :
|
||||
@ -403,7 +439,7 @@ Mise à jour :
|
||||
- Thème : aperçu de la modification de la barre de menu au-dessus du site
|
||||
* Modification :
|
||||
- Mise à jour RFM 9.14
|
||||
- Amélioration de la contre mesure CRSF
|
||||
- Amélioration de la contre mesure CSRF
|
||||
- Libellé dans TinyMCE (gabarit)
|
||||
- Setlocal modification des paramètres FR
|
||||
|
||||
@ -419,7 +455,7 @@ Mise à jour :
|
||||
* Correction :
|
||||
- Faille CSRF lors de l'effacement d'une page
|
||||
|
||||
## Verison 8.5.3
|
||||
## Version 8.5.3
|
||||
* Modification :
|
||||
- Config bouton de génération de la capture de l'écran OpenGraph
|
||||
* Correction :
|
||||
@ -481,7 +517,7 @@ Mise à jour :
|
||||
* Correction :
|
||||
- URL incorrecte dans Metaimage
|
||||
- Erreur dans la génération du sitemap
|
||||
- Taille du texte de la bannnière maximale relative (vmax)
|
||||
- Taille du texte de la bannière maximale relative (vmax)
|
||||
- Préfixe des en-têtes html pour OpenGraph
|
||||
- Balise Titre dans Socials
|
||||
- Conformité W3C des URL dans socials
|
||||
@ -538,14 +574,14 @@ Mise à jour :
|
||||
- bug des commentaires non déposés quand connecté
|
||||
- bug présent depuis au moins la version 8.1 et qui faisait boucler l'édition d'une page avec un module de redirection; Après édition, un clic sur retour ou enregistrer renvoie vers la page d'accueil en édition.
|
||||
- affichage d'une erreur 404 si le contenu d'une page est supprimé
|
||||
- erreur deans le filemanger si une seule extension demandée
|
||||
- erreur deans le FileManager si une seule extension demandée
|
||||
- corrige les droits sur la rédaction des commentaires
|
||||
- nouvelles icones d'exemple pour les menus
|
||||
- nouvelles icônes d'exemple pour les menus
|
||||
## 8.2.9
|
||||
* Correction : filemanger : erreur dans la navigation du filemanager dans la sélection de la favicon
|
||||
* Correction : FileManager : erreur dans la navigation du FileManager dans la sélection de la favicon
|
||||
* Modification : on peut effacer le contenu d'une page sans provoquer d'erreur 404
|
||||
## 8.2.8
|
||||
* Correction : filemanager problème de lecture d'une seule extension
|
||||
* Correction : FileManager problème de lecture d'une seule extension
|
||||
## 8.2.7
|
||||
* Correction : gestion des droits sur les commentaires du blog
|
||||
* Correction : une option en double dans TinyMCE
|
||||
|
13
README.md
@ -1,7 +1,7 @@
|
||||
![](https://img.shields.io/github/last-commit/fredtempez/ZwiiCMS/master) ![](https://img.shields.io/github/release-date/fredtempez/ZwiiCMS)
|
||||
|
||||
|
||||
# ZwiiCMS 9.2
|
||||
# ZwiiCMS 10.0 dev
|
||||
|
||||
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.
|
||||
|
||||
@ -66,10 +66,15 @@ Pour revenir à la version 8, renommez ce fichier "data.json".
|
||||
[R] site Contenu du site
|
||||
[R] backup Sauvegardes automatiques
|
||||
[R] data Répertoire des données
|
||||
[F] core.json Contenu
|
||||
[F] theme.json Thème
|
||||
[F] custom.css Feuille de style de la personnalisation avancée
|
||||
[R] fr Données localisées
|
||||
[F] page.json Contenu des pages
|
||||
[F] module.json Contenu des modules
|
||||
[F] core.json Paramètre du noyau
|
||||
[F] config.json Configuration du site
|
||||
[F] theme.json Donnes du Thème
|
||||
[F] theme.css Thème compilé en CSS
|
||||
[F] custom.css Feuille de style de la personnalisation avancée
|
||||
[F] user.json Données de connexion
|
||||
[R] file Répertoire d'upload du gestionnaire de fichiers
|
||||
[R] source Ressources diverses
|
||||
[R] thumb Miniatures des images
|
||||
|
0
core/vendor/phpmailer/.htaccess → core/class/.htaccess
Executable file → Normal file
11
core/class/autoload.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
class autoload {
|
||||
public static function autoloader () {
|
||||
require 'core/class/helper.class.php';
|
||||
require 'core/class/template.class.php';
|
||||
require 'core/class/SitemapGenerator.class.php';
|
||||
require 'core/class/phpmailer/phpmailer.class.php';
|
||||
require 'core/class/phpmailer/exception.class.php';
|
||||
}
|
||||
}
|
385
core/class/helper.class.php
Normal file
@ -0,0 +1,385 @@
|
||||
<?php
|
||||
class helper {
|
||||
|
||||
/** Statut de la réécriture d'URL (pour éviter de lire le contenu du fichier .htaccess à chaque self::baseUrl()) */
|
||||
public static $rewriteStatus = null;
|
||||
|
||||
/** Filtres personnalisés */
|
||||
const FILTER_BOOLEAN = 1;
|
||||
const FILTER_DATETIME = 2;
|
||||
const FILTER_FLOAT = 3;
|
||||
const FILTER_ID = 4;
|
||||
const FILTER_INT = 5;
|
||||
const FILTER_MAIL = 6;
|
||||
const FILTER_PASSWORD = 7;
|
||||
const FILTER_STRING_LONG = 8;
|
||||
const FILTER_STRING_SHORT = 9;
|
||||
const FILTER_TIMESTAMP = 10;
|
||||
const FILTER_URL = 11;
|
||||
|
||||
/**
|
||||
* Retourne les valeurs d'une colonne du tableau de données
|
||||
* @param array $array Tableau cible
|
||||
* @param string $column Colonne à extraire
|
||||
* @param string $sort Type de tri à appliquer au tableau (SORT_ASC, SORT_DESC, ou null)
|
||||
* @return array
|
||||
*/
|
||||
public static function arrayCollumn($array, $column, $sort = null) {
|
||||
$newArray = [];
|
||||
if(empty($array) === false) {
|
||||
$newArray = array_map(function($element) use($column) {
|
||||
return $element[$column];
|
||||
}, $array);
|
||||
switch($sort) {
|
||||
case 'SORT_ASC':
|
||||
asort($newArray);
|
||||
break;
|
||||
case 'SORT_DESC':
|
||||
arsort($newArray);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $newArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne l'URL de base du site
|
||||
* @param bool $queryString Affiche ou non le point d'interrogation
|
||||
* @param bool $host Affiche ou non l'host
|
||||
* @return string
|
||||
*/
|
||||
public static function baseUrl($queryString = true, $host = true) {
|
||||
// Protocol
|
||||
if(
|
||||
(empty($_SERVER['HTTPS']) === false AND $_SERVER['HTTPS'] !== 'off')
|
||||
OR $_SERVER['SERVER_PORT'] === 443
|
||||
) {
|
||||
$protocol = 'https://';
|
||||
}
|
||||
else {
|
||||
$protocol = 'http://';
|
||||
}
|
||||
// Host
|
||||
if($host) {
|
||||
$host = $protocol . $_SERVER['HTTP_HOST'];
|
||||
}
|
||||
// Pathinfo
|
||||
$pathInfo = pathinfo($_SERVER['PHP_SELF']);
|
||||
// Querystring
|
||||
if($queryString AND helper::checkRewrite() === false) {
|
||||
$queryString = '?';
|
||||
}
|
||||
else {
|
||||
$queryString = '';
|
||||
}
|
||||
return $host . rtrim($pathInfo['dirname'], ' /') . '/' . $queryString;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check le statut de l'URL rewriting
|
||||
* @return bool
|
||||
*/
|
||||
public static function checkRewrite() {
|
||||
if(self::$rewriteStatus === null) {
|
||||
// Ouvre et scinde le fichier .htaccess
|
||||
$htaccess = explode('# URL rewriting', file_get_contents('.htaccess'));
|
||||
// Retourne un boolean en fonction du contenu de la partie réservée à l'URL rewriting
|
||||
self::$rewriteStatus = (empty($htaccess[1]) === false);
|
||||
}
|
||||
return self::$rewriteStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoie le numéro de version de Zwii est en ligne
|
||||
* @return string
|
||||
*/
|
||||
public static function getOnlineVersion() {
|
||||
return (@file_get_contents('http://zwiicms.com/update/version'));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check si une nouvelle version de Zwii est disponible
|
||||
* @return bool
|
||||
*/
|
||||
public static function checkNewVersion() {
|
||||
if($version = helper::getOnlineVersion()) {
|
||||
//return (trim($version) !== common::ZWII_VERSION);
|
||||
return ((version_compare(common::ZWII_VERSION,$version)) === -1);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Génère des variations d'une couleur
|
||||
* @param string $rgba Code rgba de la couleur
|
||||
* @return array
|
||||
*/
|
||||
public static function colorVariants($rgba) {
|
||||
preg_match('#\(+(.*)\)+#', $rgba, $matches);
|
||||
$rgba = explode(', ', $matches[1]);
|
||||
return [
|
||||
'normal' => 'rgba(' . $rgba[0] . ',' . $rgba[1] . ',' . $rgba[2] . ',' . $rgba[3] . ')',
|
||||
'darken' => 'rgba(' . max(0, $rgba[0] - 15) . ',' . max(0, $rgba[1] - 15) . ',' . max(0, $rgba[2] - 15) . ',' . $rgba[3] . ')',
|
||||
'veryDarken' => 'rgba(' . max(0, $rgba[0] - 20) . ',' . max(0, $rgba[1] - 20) . ',' . max(0, $rgba[2] - 20) . ',' . $rgba[3] . ')',
|
||||
'text' => self::relativeLuminanceW3C($rgba) > .22 ? "inherit" : "white"
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Supprime un cookie
|
||||
* @param string $cookieKey Clé du cookie à supprimer
|
||||
*/
|
||||
public static function deleteCookie($cookieKey) {
|
||||
unset($_COOKIE[$cookieKey]);
|
||||
setcookie($cookieKey, '', time() - 3600, helper::baseUrl(false, false));
|
||||
}
|
||||
|
||||
/**
|
||||
* Filtre une chaîne en fonction d'un tableau de données
|
||||
* @param string $text Chaîne à filtrer
|
||||
* @param int $filter Type de filtre à appliquer
|
||||
* @return string
|
||||
*/
|
||||
public static function filter($text, $filter) {
|
||||
$text = trim($text);
|
||||
switch($filter) {
|
||||
case self::FILTER_BOOLEAN:
|
||||
$text = (bool) $text;
|
||||
break;
|
||||
case self::FILTER_DATETIME:
|
||||
$timezone = new DateTimeZone(core::$timezone);
|
||||
$date = new DateTime($text);
|
||||
$date->setTimezone($timezone);
|
||||
$text = (int) $date->format('U');
|
||||
break;
|
||||
case self::FILTER_FLOAT:
|
||||
$text = filter_var($text, FILTER_SANITIZE_NUMBER_FLOAT);
|
||||
$text = (float) $text;
|
||||
break;
|
||||
case self::FILTER_ID:
|
||||
$text = mb_strtolower($text, 'UTF-8');
|
||||
$text = strip_tags(str_replace(
|
||||
explode(',', 'á,à,â,ä,ã,å,ç,é,è,ê,ë,í,ì,î,ï,ñ,ó,ò,ô,ö,õ,ú,ù,û,ü,ý,ÿ,\',", '),
|
||||
explode(',', 'a,a,a,a,a,a,c,e,e,e,e,i,i,i,i,n,o,o,o,o,o,u,u,u,u,y,y,-,-,-'),
|
||||
$text
|
||||
));
|
||||
$text = preg_replace('/([^a-z0-9-])/', '', $text);
|
||||
// Cas où un identifiant est vide
|
||||
if (empty($text)) {
|
||||
$text = uniqid('');
|
||||
}
|
||||
// Un ID ne peut pas être un entier, pour éviter les conflits avec le système de pagination
|
||||
if(intval($text) !== 0) {
|
||||
$text = 'i' . $text;
|
||||
}
|
||||
break;
|
||||
case self::FILTER_INT:
|
||||
$text = (int) filter_var($text, FILTER_SANITIZE_NUMBER_INT);
|
||||
break;
|
||||
case self::FILTER_MAIL:
|
||||
$text = filter_var($text, FILTER_SANITIZE_EMAIL);
|
||||
break;
|
||||
case self::FILTER_PASSWORD:
|
||||
$text = password_hash($text, PASSWORD_BCRYPT);
|
||||
break;
|
||||
case self::FILTER_STRING_LONG:
|
||||
$text = mb_substr(filter_var($text, FILTER_SANITIZE_STRING), 0, 500000);
|
||||
break;
|
||||
case self::FILTER_STRING_SHORT:
|
||||
$text = mb_substr(filter_var($text, FILTER_SANITIZE_STRING), 0, 500);
|
||||
break;
|
||||
case self::FILTER_TIMESTAMP:
|
||||
$text = date('Y-m-d H:i:s', $text);
|
||||
break;
|
||||
case self::FILTER_URL:
|
||||
$text = filter_var($text, FILTER_SANITIZE_URL);
|
||||
break;
|
||||
}
|
||||
return get_magic_quotes_gpc() ? stripslashes($text) : $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Incrémente une clé en fonction des clés ou des valeurs d'un tableau
|
||||
* @param mixed $key Clé à incrémenter
|
||||
* @param array $array Tableau à vérifier
|
||||
* @return string
|
||||
*/
|
||||
public static function increment($key, $array = []) {
|
||||
// Pas besoin d'incrémenter si la clef n'existe pas
|
||||
if($array === []) {
|
||||
return $key;
|
||||
}
|
||||
// Incrémente la clef
|
||||
else {
|
||||
// Si la clef est numérique elle est incrémentée
|
||||
if(is_numeric($key)) {
|
||||
$newKey = $key;
|
||||
while(array_key_exists($newKey, $array) OR in_array($newKey, $array)) {
|
||||
$newKey++;
|
||||
}
|
||||
}
|
||||
// Sinon l'incrémentation est ajoutée après la clef
|
||||
else {
|
||||
$i = 2;
|
||||
$newKey = $key;
|
||||
while(array_key_exists($newKey, $array) OR in_array($newKey, $array)) {
|
||||
$newKey = $key . '-' . $i;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
return $newKey;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Minimise du css
|
||||
* @param string $css Css à minimiser
|
||||
* @return string
|
||||
*/
|
||||
public static function minifyCss($css) {
|
||||
// Supprime les commentaires
|
||||
$css = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css);
|
||||
// Supprime les tabulations, espaces, nouvelles lignes, etc...
|
||||
$css = str_replace(["\r\n", "\r", "\n" ,"\t", ' ', ' ', ' '], '', $css);
|
||||
$css = preg_replace(['(( )+{)', '({( )+)'], '{', $css);
|
||||
$css = preg_replace(['(( )+})', '(}( )+)', '(;( )*})'], '}', $css);
|
||||
$css = preg_replace(['(;( )+)', '(( )+;)'], ';', $css);
|
||||
// Retourne le css minifié
|
||||
return $css;
|
||||
}
|
||||
|
||||
/**
|
||||
* Minimise du js
|
||||
* @param string $js Js à minimiser
|
||||
* @return string
|
||||
*/
|
||||
public static function minifyJs($js) {
|
||||
// Supprime les commentaires
|
||||
$js = preg_replace('/\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\/|\s*(?<![\:\=])\/\/.*/', '', $js);
|
||||
// Supprime les tabulations, espaces, nouvelles lignes, etc...
|
||||
$js = str_replace(["\r\n", "\r", "\t", "\n", ' ', ' ', ' '], '', $js);
|
||||
$js = preg_replace(['(( )+\))', '(\)( )+)'], ')', $js);
|
||||
// Retourne le js minifié
|
||||
return $js;
|
||||
}
|
||||
|
||||
/**
|
||||
* Crée un système de pagination (retourne un tableau contenant les informations sur la pagination (first, last, pages))
|
||||
* @param array $array Tableau de donnée à utiliser
|
||||
* @param string $url URL à utiliser, la dernière partie doit correspondre au numéro de page, par défaut utiliser $this->getUrl()
|
||||
* @param string $item pagination nombre d'éléments par page
|
||||
* @param null|int $sufix Suffixe de l'url
|
||||
* @return array
|
||||
*/
|
||||
public static function pagination($array, $url, $item, $sufix = null) {
|
||||
// Scinde l'url
|
||||
$url = explode('/', $url);
|
||||
// Url de pagination
|
||||
$urlPagination = is_numeric($url[count($url) - 1]) ? array_pop($url) : 1;
|
||||
// Url de la page courante
|
||||
$urlCurrent = implode('/', $url);
|
||||
// Nombre d'éléments à afficher
|
||||
$nbElements = count($array);
|
||||
// Nombre de page
|
||||
$nbPage = ceil($nbElements / $item);
|
||||
// Page courante
|
||||
$currentPage = is_numeric($urlPagination) ? self::filter($urlPagination, self::FILTER_INT) : 1;
|
||||
// Premier élément de la page
|
||||
$firstElement = ($currentPage - 1) * $item;
|
||||
// Dernier élément de la page
|
||||
$lastElement = $firstElement + $item;
|
||||
$lastElement = ($lastElement > $nbElements) ? $nbElements : $lastElement;
|
||||
// Mise en forme de la liste des pages
|
||||
$pages = '';
|
||||
if($nbPage > 1) {
|
||||
for($i = 1; $i <= $nbPage; $i++) {
|
||||
$disabled = ($i === $currentPage) ? ' class="disabled"' : false;
|
||||
$pages .= '<a href="' . helper::baseUrl() . $urlCurrent . '/' . $i . $sufix . '"' . $disabled . '>' . $i . '</a>';
|
||||
}
|
||||
$pages = '<div class="pagination">' . $pages . '</div>';
|
||||
}
|
||||
// Retourne un tableau contenant les informations sur la pagination
|
||||
return [
|
||||
'first' => $firstElement,
|
||||
'last' => $lastElement,
|
||||
'pages' => $pages
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Calcul de la luminance relative d'une couleur
|
||||
*/
|
||||
public static function relativeLuminanceW3C($rgba) {
|
||||
// Conversion en sRGB
|
||||
$RsRGB = $rgba[0] / 255;
|
||||
$GsRGB = $rgba[1] / 255;
|
||||
$BsRGB = $rgba[2] / 255;
|
||||
// Ajout de la transparence
|
||||
$RsRGBA = $rgba[3] * $RsRGB + (1 - $rgba[3]);
|
||||
$GsRGBA = $rgba[3] * $GsRGB + (1 - $rgba[3]);
|
||||
$BsRGBA = $rgba[3] * $BsRGB + (1 - $rgba[3]);
|
||||
// Calcul de la luminance
|
||||
$R = ($RsRGBA <= .03928) ? $RsRGBA / 12.92 : pow(($RsRGBA + .055) / 1.055, 2.4);
|
||||
$G = ($GsRGBA <= .03928) ? $GsRGBA / 12.92 : pow(($GsRGBA + .055) / 1.055, 2.4);
|
||||
$B = ($BsRGBA <= .03928) ? $BsRGBA / 12.92 : pow(($BsRGBA + .055) / 1.055, 2.4);
|
||||
return .2126 * $R + .7152 * $G + .0722 * $B;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne les attributs d'une balise au bon format
|
||||
* @param array $array Liste des attributs ($key => $value)
|
||||
* @param array $exclude Clés à ignorer ($key)
|
||||
* @return string
|
||||
*/
|
||||
public static function sprintAttributes(array $array = [], array $exclude = []) {
|
||||
$exclude = array_merge(
|
||||
[
|
||||
'before',
|
||||
'classWrapper',
|
||||
'help',
|
||||
'label'
|
||||
],
|
||||
$exclude
|
||||
);
|
||||
$attributes = [];
|
||||
foreach($array as $key => $value) {
|
||||
if(($value OR $value === 0) AND in_array($key, $exclude) === false) {
|
||||
// Désactive le message de modifications non enregistrées pour le champ
|
||||
if($key === 'noDirty') {
|
||||
$attributes[] = 'data-no-dirty';
|
||||
}
|
||||
// Disabled
|
||||
// Readonly
|
||||
elseif(in_array($key, ['disabled', 'readonly'])) {
|
||||
$attributes[] = sprintf('%s', $key);
|
||||
}
|
||||
// Autres
|
||||
else {
|
||||
$attributes[] = sprintf('%s="%s"', $key, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return implode(' ', $attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne un segment de chaîne sans couper de mot
|
||||
* @param string $text Texte à scinder
|
||||
* @param int $start (voir substr de PHP pour fonctionnement)
|
||||
* @param int $length (voir substr de PHP pour fonctionnement)
|
||||
* @return string
|
||||
*/
|
||||
public static function subword($text, $start, $length) {
|
||||
$text = trim($text);
|
||||
if(strlen($text) > $length) {
|
||||
$text = mb_substr($text, $start, $length);
|
||||
$text = mb_substr($text, 0, min(mb_strlen($text), mb_strrpos($text, ' ')));
|
||||
}
|
||||
return $text;
|
||||
}
|
||||
|
||||
}
|
3
core/class/phpmailer/.htaccess
Normal file
@ -0,0 +1,3 @@
|
||||
# Bloque l'accès à la librairie
|
||||
Order deny,allow
|
||||
Deny from all
|
745
core/class/template.class.php
Normal file
@ -0,0 +1,745 @@
|
||||
<?php
|
||||
|
||||
class template {
|
||||
|
||||
/**
|
||||
* Crée un bouton
|
||||
* @param string $nameId Nom et id du champ
|
||||
* @param array $attributes Attributs ($key => $value)
|
||||
* @return string
|
||||
*/
|
||||
public static function button($nameId, array $attributes = []) {
|
||||
// Attributs par défaut
|
||||
$attributes = array_merge([
|
||||
'class' => '',
|
||||
'disabled' => false,
|
||||
'href' => 'javascript:void(0);',
|
||||
'ico' => '',
|
||||
'id' => $nameId,
|
||||
'name' => $nameId,
|
||||
'target' => '',
|
||||
'uniqueSubmission' => false,
|
||||
'value' => 'Bouton'
|
||||
], $attributes);
|
||||
// Retourne le html
|
||||
return sprintf(
|
||||
'<a %s class="button %s %s %s">%s</a>',
|
||||
helper::sprintAttributes($attributes, ['class', 'disabled', 'ico', 'value']),
|
||||
$attributes['disabled'] ? 'disabled' : '',
|
||||
$attributes['class'],
|
||||
$attributes['uniqueSubmission'] ? 'uniqueSubmission' : '',
|
||||
($attributes['ico'] ? template::ico($attributes['ico'], 'right') : '') . $attributes['value']
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Crée un champ capcha
|
||||
* @param string $nameId Nom et id du champ
|
||||
* @param array $attributes Attributs ($key => $value)
|
||||
* @return string
|
||||
*/
|
||||
public static function capcha($nameId, array $attributes = []) {
|
||||
// Attributs par défaut
|
||||
$attributes = array_merge([
|
||||
'class' => '',
|
||||
'classWrapper' => '',
|
||||
'help' => '',
|
||||
'id' => $nameId,
|
||||
'name' => $nameId,
|
||||
'value' => ''
|
||||
], $attributes);
|
||||
// Génère deux nombres pour le capcha
|
||||
$firstNumber = mt_rand(1, 15);
|
||||
$secondNumber = mt_rand(1, 15);
|
||||
// Début du wrapper
|
||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
||||
// Label
|
||||
$html .= self::label($attributes['id'], $firstNumber . ' + ' . $secondNumber . ' = ?', [
|
||||
'help' => $attributes['help']
|
||||
]);
|
||||
// Notice
|
||||
$notice = '';
|
||||
if(array_key_exists($attributes['id'], common::$inputNotices)) {
|
||||
$notice = common::$inputNotices[$attributes['id']];
|
||||
$attributes['class'] .= ' notice';
|
||||
}
|
||||
$html .= self::notice($attributes['id'], $notice);
|
||||
// Capcha
|
||||
$html .= sprintf(
|
||||
'<input type="text" %s>',
|
||||
helper::sprintAttributes($attributes)
|
||||
);
|
||||
// Champs cachés contenant les nombres
|
||||
$html .= self::hidden($attributes['id'] . 'FirstNumber', [
|
||||
'value' => $firstNumber,
|
||||
'before' => false
|
||||
]);
|
||||
$html .= self::hidden($attributes['id'] . 'SecondNumber', [
|
||||
'value' => $secondNumber,
|
||||
'before' => false
|
||||
]);
|
||||
// Fin du wrapper
|
||||
$html .= '</div>';
|
||||
// Retourne le html
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Crée une case à cocher à sélection multiple
|
||||
* @param string $nameId Nom et id du champ
|
||||
* @param string $value Valeur de la case à cocher
|
||||
* @param string $label Label de la case à cocher
|
||||
* @param array $attributes Attributs ($key => $value)
|
||||
* @return string
|
||||
*/
|
||||
public static function checkbox($nameId, $value, $label, array $attributes = []) {
|
||||
// Attributs par défaut
|
||||
$attributes = array_merge([
|
||||
'before' => true,
|
||||
'checked' => '',
|
||||
'class' => '',
|
||||
'classWrapper' => '',
|
||||
'disabled' => false,
|
||||
'help' => '',
|
||||
'id' => $nameId,
|
||||
'name' => $nameId
|
||||
], $attributes);
|
||||
// Sauvegarde des données en cas d'erreur
|
||||
if($attributes['before'] AND array_key_exists($attributes['id'], common::$inputBefore)) {
|
||||
$attributes['checked'] = (bool) common::$inputBefore[$attributes['id']];
|
||||
}
|
||||
// Début du wrapper
|
||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
||||
// Notice
|
||||
$notice = '';
|
||||
if(array_key_exists($attributes['id'], common::$inputNotices)) {
|
||||
$notice = common::$inputNotices[$attributes['id']];
|
||||
$attributes['class'] .= ' notice';
|
||||
}
|
||||
$html .= self::notice($attributes['id'], $notice);
|
||||
// Case à cocher
|
||||
$html .= sprintf(
|
||||
'<input type="checkbox" value="%s" %s>',
|
||||
$value,
|
||||
helper::sprintAttributes($attributes)
|
||||
);
|
||||
// Label
|
||||
$html .= self::label($attributes['id'], '<span>' . $label . '</span>', [
|
||||
'help' => $attributes['help']
|
||||
]);
|
||||
// Fin du wrapper
|
||||
$html .= '</div>';
|
||||
// Retourne le html
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Crée un champ date
|
||||
* @param string $nameId Nom et id du champ
|
||||
* @param array $attributes Attributs ($key => $value)
|
||||
* @return string
|
||||
*/
|
||||
public static function date($nameId, array $attributes = []) {
|
||||
// Attributs par défaut
|
||||
$attributes = array_merge([
|
||||
'autocomplete' => 'on',
|
||||
'before' => true,
|
||||
'class' => '',
|
||||
'classWrapper' => '',
|
||||
'noDirty' => false,
|
||||
'disabled' => false,
|
||||
'help' => '',
|
||||
'id' => $nameId,
|
||||
'label' => '',
|
||||
'name' => $nameId,
|
||||
'placeholder' => '',
|
||||
'readonly' => true,
|
||||
'value' => ''
|
||||
], $attributes);
|
||||
// Sauvegarde des données en cas d'erreur
|
||||
if($attributes['before'] AND array_key_exists($attributes['id'], common::$inputBefore)) {
|
||||
$attributes['value'] = common::$inputBefore[$attributes['id']];
|
||||
}
|
||||
else {
|
||||
$attributes['value'] = ($attributes['value'] ? helper::filter($attributes['value'], helper::FILTER_TIMESTAMP) : '');
|
||||
}
|
||||
// Début du wrapper
|
||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
||||
// Label
|
||||
if($attributes['label']) {
|
||||
$html .= self::label($attributes['id'], $attributes['label'], [
|
||||
'help' => $attributes['help']
|
||||
]);
|
||||
}
|
||||
// Notice
|
||||
$notice = '';
|
||||
if(array_key_exists($attributes['id'], common::$inputNotices)) {
|
||||
$notice = common::$inputNotices[$attributes['id']];
|
||||
$attributes['class'] .= ' notice';
|
||||
}
|
||||
$html .= self::notice($attributes['id'], $notice);
|
||||
// Date visible
|
||||
$html .= sprintf(
|
||||
'<input type="text" class="datepicker %s" value="%s" %s>',
|
||||
$attributes['class'],
|
||||
$attributes['value'],
|
||||
helper::sprintAttributes($attributes, ['class', 'value'])
|
||||
);
|
||||
// Fin du wrapper
|
||||
$html .= '</div>';
|
||||
// Retourne le html
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Crée un champ d'upload de fichier
|
||||
* @param string $nameId Nom et id du champ
|
||||
* @param array $attributes Attributs ($key => $value)
|
||||
* @return string
|
||||
*/
|
||||
public static function file($nameId, array $attributes = []) {
|
||||
// Attributs par défaut
|
||||
$attributes = array_merge([
|
||||
'before' => true,
|
||||
'class' => '',
|
||||
'classWrapper' => '',
|
||||
'noDirty' => false,
|
||||
'disabled' => false,
|
||||
'extensions' => '',
|
||||
'help' => '',
|
||||
'id' => $nameId,
|
||||
'label' => '',
|
||||
'maxlength' => '500',
|
||||
'name' => $nameId,
|
||||
'type' => 2,
|
||||
'value' => ''
|
||||
], $attributes);
|
||||
// Sauvegarde des données en cas d'erreur
|
||||
if($attributes['before'] AND array_key_exists($attributes['id'], common::$inputBefore)) {
|
||||
$attributes['value'] = common::$inputBefore[$attributes['id']];
|
||||
}
|
||||
// Début du wrapper
|
||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
||||
// Label
|
||||
if($attributes['label']) {
|
||||
$html .= self::label($attributes['id'], $attributes['label'], [
|
||||
'help' => $attributes['help']
|
||||
]);
|
||||
}
|
||||
// Notice
|
||||
$notice = '';
|
||||
if(array_key_exists($attributes['id'], common::$inputNotices)) {
|
||||
$notice = common::$inputNotices[$attributes['id']];
|
||||
$attributes['class'] .= ' notice';
|
||||
}
|
||||
$html .= self::notice($attributes['id'], $notice);
|
||||
// Champ caché contenant l'url de la page
|
||||
$html .= self::hidden($attributes['id'], [
|
||||
'class' => 'inputFileHidden',
|
||||
'disabled' => $attributes['disabled'],
|
||||
'maxlength' => $attributes['maxlength'],
|
||||
'value' => $attributes['value']
|
||||
]);
|
||||
// Champ d'upload
|
||||
$html .= '<div>';
|
||||
$html .= sprintf(
|
||||
'<a
|
||||
href="' .
|
||||
helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php' .
|
||||
'?relative_url=1' .
|
||||
'&field_id=' . $attributes['id'] .
|
||||
'&type=' . $attributes['type'] .
|
||||
//'&akey=' . md5_file('site/data/'.'core.json') .
|
||||
'&akey=' . md5_file(core::DATA_DIR.'core.json') .
|
||||
($attributes['extensions'] ? '&extensions=' . $attributes['extensions'] : '')
|
||||
. '"
|
||||
class="inputFile %s %s"
|
||||
%s
|
||||
data-lity
|
||||
>
|
||||
' . self::ico('upload', 'right') . '
|
||||
<span class="inputFileLabel"></span>
|
||||
</a>',
|
||||
$attributes['class'],
|
||||
$attributes['disabled'] ? 'disabled' : '',
|
||||
helper::sprintAttributes($attributes, ['class', 'extensions', 'type', 'maxlength'])
|
||||
|
||||
);
|
||||
$html .= self::button($attributes['id'] . 'Delete', [
|
||||
'class' => 'inputFileDelete',
|
||||
'value' => self::ico('cancel')
|
||||
]);
|
||||
$html .= '</div>';
|
||||
// Fin du wrapper
|
||||
$html .= '</div>';
|
||||
// Retourne le html
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ferme un formulaire
|
||||
* @return string
|
||||
*/
|
||||
public static function formClose() {
|
||||
return '</form>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Ouvre un formulaire protégé par CSRF
|
||||
* @param string $id Id du formulaire
|
||||
* @return string
|
||||
*/
|
||||
public static function formOpen($id) {
|
||||
// Ouverture formulaire
|
||||
$html = '<form id="' . $id . '" method="post">';
|
||||
// Stock le token CSRF
|
||||
$html .= self::hidden('csrf', [
|
||||
'value' => $_SESSION['csrf']
|
||||
]);
|
||||
// Retourne le html
|
||||
return $html;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Crée une aide qui s'affiche au survole
|
||||
* @param string $text Texte de l'aide
|
||||
* @return string
|
||||
*/
|
||||
public static function help($text) {
|
||||
return '<span class="helpButton" data-tippy-content="' . $text . '">' . self::ico('help') . '<!----></span>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Crée un champ caché
|
||||
* @param string $nameId Nom et id du champ
|
||||
* @param array $attributes Attributs ($key => $value)
|
||||
* @return string
|
||||
*/
|
||||
public static function hidden($nameId, array $attributes = []) {
|
||||
// Attributs par défaut
|
||||
$attributes = array_merge([
|
||||
'before' => true,
|
||||
'class' => '',
|
||||
'noDirty' => false,
|
||||
'id' => $nameId,
|
||||
//'maxlength' => '500',
|
||||
'name' => $nameId,
|
||||
'value' => ''
|
||||
], $attributes);
|
||||
// Sauvegarde des données en cas d'erreur
|
||||
if($attributes['before'] AND array_key_exists($attributes['id'], common::$inputBefore)) {
|
||||
$attributes['value'] = common::$inputBefore[$attributes['id']];
|
||||
}
|
||||
// Texte
|
||||
$html = sprintf('<input type="hidden" %s>', helper::sprintAttributes($attributes, ['before']));
|
||||
// Retourne le html
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Crée un icône
|
||||
* @param string $ico Classe de l'icône
|
||||
* @param string $margin Ajoute un margin autour de l'icône (choix : left, right, all)
|
||||
* @param bool $animate Ajoute une animation à l'icône
|
||||
* @param string $fontSize Taille de la police
|
||||
* @return string
|
||||
*/
|
||||
public static function ico($ico, $margin = '', $animate = false, $fontSize = '1em') {
|
||||
return '<span class="zwiico-' . $ico . ($margin ? ' zwiico-margin-' . $margin : '') . ($animate ? ' animate-spin' : '') . '" style="font-size:' . $fontSize . '"><!----></span>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Crée un label
|
||||
* @param string $for For du label
|
||||
* @param array $attributes Attributs ($key => $value)
|
||||
* @param string $text Texte du label
|
||||
* @return string
|
||||
*/
|
||||
public static function label($for, $text, array $attributes = []) {
|
||||
// Attributs par défaut
|
||||
$attributes = array_merge([
|
||||
'class' => '',
|
||||
'for' => $for,
|
||||
'help' => ''
|
||||
], $attributes);
|
||||
// Ajout d'une aide
|
||||
if($attributes['help'] !== '') {
|
||||
$text = $text . self::help($attributes['help']);
|
||||
}
|
||||
// Retourne le html
|
||||
return sprintf(
|
||||
'<label %s>%s</label>',
|
||||
helper::sprintAttributes($attributes),
|
||||
$text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Crée un champ mail
|
||||
* @param string $nameId Nom et id du champ
|
||||
* @param array $attributes Attributs ($key => $value)
|
||||
* @return string
|
||||
*/
|
||||
public static function mail($nameId, array $attributes = []) {
|
||||
// Attributs par défaut
|
||||
$attributes = array_merge([
|
||||
'autocomplete' => 'on',
|
||||
'before' => true,
|
||||
'class' => '',
|
||||
'classWrapper' => '',
|
||||
'noDirty' => false,
|
||||
'disabled' => false,
|
||||
'help' => '',
|
||||
'id' => $nameId,
|
||||
'label' => '',
|
||||
//'maxlength' => '500',
|
||||
'name' => $nameId,
|
||||
'placeholder' => '',
|
||||
'readonly' => false,
|
||||
'value' => ''
|
||||
], $attributes);
|
||||
// Sauvegarde des données en cas d'erreur
|
||||
if($attributes['before'] AND array_key_exists($attributes['id'], common::$inputBefore)) {
|
||||
$attributes['value'] = common::$inputBefore[$attributes['id']];
|
||||
}
|
||||
// Début du wrapper
|
||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
||||
// Label
|
||||
if($attributes['label']) {
|
||||
$html .= self::label($attributes['id'], $attributes['label'], [
|
||||
'help' => $attributes['help']
|
||||
]);
|
||||
}
|
||||
// Notice
|
||||
$notice = '';
|
||||
if(array_key_exists($attributes['id'], common::$inputNotices)) {
|
||||
$notice = common::$inputNotices[$attributes['id']];
|
||||
$attributes['class'] .= ' notice';
|
||||
}
|
||||
$html .= self::notice($attributes['id'], $notice);
|
||||
// Texte
|
||||
$html .= sprintf(
|
||||
'<input type="email" %s>',
|
||||
helper::sprintAttributes($attributes)
|
||||
);
|
||||
// Fin du wrapper
|
||||
$html .= '</div>';
|
||||
// Retourne le html
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Crée une notice
|
||||
* @param string $id Id du champ
|
||||
* @param string $notice Notice
|
||||
* @return string
|
||||
*/
|
||||
public static function notice($id, $notice) {
|
||||
return ' <span id="' . $id . 'Notice" class="notice ' . ($notice ? '' : 'displayNone') . '">' . $notice . '</span>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Crée un champ mot de passe
|
||||
* @param string $nameId Nom et id du champ
|
||||
* @param array $attributes Attributs ($key => $value)
|
||||
* @return string
|
||||
*/
|
||||
public static function password($nameId, array $attributes = []) {
|
||||
// Attributs par défaut
|
||||
$attributes = array_merge([
|
||||
'autocomplete' => 'on',
|
||||
'class' => '',
|
||||
'classWrapper' => '',
|
||||
'noDirty' => false,
|
||||
'disabled' => false,
|
||||
'help' => '',
|
||||
'id' => $nameId,
|
||||
'label' => '',
|
||||
//'maxlength' => '500',
|
||||
'name' => $nameId,
|
||||
'placeholder' => '',
|
||||
'readonly' => false
|
||||
], $attributes);
|
||||
// Début du wrapper
|
||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
||||
// Label
|
||||
if($attributes['label']) {
|
||||
$html .= self::label($attributes['id'], $attributes['label'], [
|
||||
'help' => $attributes['help']
|
||||
]);
|
||||
}
|
||||
// Notice
|
||||
$notice = '';
|
||||
if(array_key_exists($attributes['id'], common::$inputNotices)) {
|
||||
$notice = common::$inputNotices[$attributes['id']];
|
||||
$attributes['class'] .= ' notice';
|
||||
}
|
||||
$html .= self::notice($attributes['id'], $notice);
|
||||
// Mot de passe
|
||||
$html .= sprintf(
|
||||
'<input type="password" %s>',
|
||||
helper::sprintAttributes($attributes)
|
||||
);
|
||||
// Fin du wrapper
|
||||
$html .= '</div>';
|
||||
// Retourne le html
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Crée un champ sélection
|
||||
* @param string $nameId Nom et id du champ
|
||||
* @param array $options Liste des options du champ de sélection ($value => $text)
|
||||
* @param array $attributes Attributs ($key => $value)
|
||||
* @return string
|
||||
*/
|
||||
public static function select($nameId, array $options, array $attributes = []) {
|
||||
// Attributs par défaut
|
||||
$attributes = array_merge([
|
||||
'before' => true,
|
||||
'class' => '',
|
||||
'classWrapper' => '',
|
||||
'noDirty' => false,
|
||||
'disabled' => false,
|
||||
'help' => '',
|
||||
'id' => $nameId,
|
||||
'label' => '',
|
||||
'name' => $nameId,
|
||||
'selected' => ''
|
||||
], $attributes);
|
||||
// Sauvegarde des données en cas d'erreur
|
||||
if($attributes['before'] AND array_key_exists($attributes['id'], common::$inputBefore)) {
|
||||
$attributes['selected'] = common::$inputBefore[$attributes['id']];
|
||||
}
|
||||
// Début du wrapper
|
||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
||||
// Label
|
||||
if($attributes['label']) {
|
||||
$html .= self::label($attributes['id'], $attributes['label'], [
|
||||
'help' => $attributes['help']
|
||||
]);
|
||||
}
|
||||
// Notice
|
||||
$notice = '';
|
||||
if(array_key_exists($attributes['id'], common::$inputNotices)) {
|
||||
$notice = common::$inputNotices[$attributes['id']];
|
||||
$attributes['class'] .= ' notice';
|
||||
}
|
||||
$html .= self::notice($attributes['id'], $notice);
|
||||
// Début sélection
|
||||
$html .= sprintf('<select %s>',
|
||||
helper::sprintAttributes($attributes)
|
||||
);
|
||||
foreach($options as $value => $text) {
|
||||
$html .= sprintf(
|
||||
'<option value="%s"%s>%s</option>',
|
||||
$value,
|
||||
$attributes['selected'] == $value ? ' selected' : '', // Double == pour ignorer le type de variable car $_POST change les types en string
|
||||
$text
|
||||
);
|
||||
}
|
||||
// Fin sélection
|
||||
$html .= '</select>';
|
||||
// Fin du wrapper
|
||||
$html .= '</div>';
|
||||
// Retourne le html
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Crée une bulle de dialogue
|
||||
* @param string $text Texte de la bulle
|
||||
* @return string
|
||||
*/
|
||||
public static function speech($text) {
|
||||
return '<div class="speech"><div class="speechBubble">' . $text . '</div>' . template::ico('mimi speechMimi', '', false, '7em') . '</div>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Crée un bouton validation
|
||||
* @param string $nameId Nom & id du bouton validation
|
||||
* @param array $attributes Attributs ($key => $value)
|
||||
* @return string
|
||||
*/
|
||||
public static function submit($nameId, array $attributes = []) {
|
||||
// Attributs par défaut
|
||||
$attributes = array_merge([
|
||||
'class' => '',
|
||||
'disabled' => false,
|
||||
'ico' => 'check',
|
||||
'id' => $nameId,
|
||||
'name' => $nameId,
|
||||
'uniqueSubmission' => false, //true avant 9.1.08
|
||||
'value' => 'Enregistrer'
|
||||
], $attributes);
|
||||
// Retourne le html
|
||||
return sprintf(
|
||||
'<button type="submit" class="%s%s" %s>%s</button>',
|
||||
$attributes['class'],
|
||||
$attributes['uniqueSubmission'] ? 'uniqueSubmission' : '',
|
||||
helper::sprintAttributes($attributes, ['class', 'ico', 'value']),
|
||||
($attributes['ico'] ? template::ico($attributes['ico'], 'right') : '') . $attributes['value']
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Crée un tableau
|
||||
* @param array $cols Cols des colonnes (format: [col colonne1, col colonne2, etc])
|
||||
* @param array $body Contenu (format: [[contenu1, contenu2, etc], [contenu1, contenu2, etc]])
|
||||
* @param array $head Entêtes (format : [[titre colonne1, titre colonne2, etc])
|
||||
* @param array $attributes Attributs ($key => $value)
|
||||
* @return string
|
||||
*/
|
||||
public static function table(array $cols = [], array $body = [], array $head = [], array $attributes = []) {
|
||||
// Attributs par défaut
|
||||
$attributes = array_merge([
|
||||
'class' => '',
|
||||
'classWrapper' => '',
|
||||
'id' => ''
|
||||
], $attributes);
|
||||
// Début du wrapper
|
||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="tableWrapper ' . $attributes['classWrapper']. '">';
|
||||
// Début tableau
|
||||
$html .= '<table id="' . $attributes['id'] . '" class="table ' . $attributes['class']. '">';
|
||||
// Entêtes
|
||||
if($head) {
|
||||
// Début des entêtes
|
||||
$html .= '<thead>';
|
||||
$html .= '<tr>';
|
||||
$i = 0;
|
||||
foreach($head as $th) {
|
||||
$html .= '<th class="col' . $cols[$i++] . '">' . $th . '</th>';
|
||||
}
|
||||
// Fin des entêtes
|
||||
$html .= '</tr>';
|
||||
$html .= '</thead>';
|
||||
}
|
||||
// Début contenu
|
||||
$html .= '<tbody>';
|
||||
foreach($body as $tr) {
|
||||
$html .= '<tr>';
|
||||
$i = 0;
|
||||
foreach($tr as $td) {
|
||||
$html .= '<td class="col' . $cols[$i++] . '">' . $td . '</td>';
|
||||
}
|
||||
$html .= '</tr>';
|
||||
}
|
||||
// Fin contenu
|
||||
$html .= '</tbody>';
|
||||
// Fin tableau
|
||||
$html .= '</table>';
|
||||
// Fin container
|
||||
$html .= '</div>';
|
||||
// Retourne le html
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Crée un champ texte court
|
||||
* @param string $nameId Nom et id du champ
|
||||
* @param array $attributes Attributs ($key => $value)
|
||||
* @return string
|
||||
*/
|
||||
public static function text($nameId, array $attributes = []) {
|
||||
// Attributs par défaut
|
||||
$attributes = array_merge([
|
||||
'autocomplete' => 'on',
|
||||
'before' => true,
|
||||
'class' => '',
|
||||
'classWrapper' => '',
|
||||
'noDirty' => false,
|
||||
'disabled' => false,
|
||||
'help' => '',
|
||||
'id' => $nameId,
|
||||
'label' => '',
|
||||
//'maxlength' => '500',
|
||||
'name' => $nameId,
|
||||
'placeholder' => '',
|
||||
'readonly' => false,
|
||||
'value' => ''
|
||||
], $attributes);
|
||||
// Sauvegarde des données en cas d'erreur
|
||||
if($attributes['before'] AND array_key_exists($attributes['id'], common::$inputBefore)) {
|
||||
$attributes['value'] = common::$inputBefore[$attributes['id']];
|
||||
}
|
||||
// Début du wrapper
|
||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
||||
// Label
|
||||
if($attributes['label']) {
|
||||
$html .= self::label($attributes['id'], $attributes['label'], [
|
||||
'help' => $attributes['help']
|
||||
]);
|
||||
}
|
||||
// Notice
|
||||
$notice = '';
|
||||
if(array_key_exists($attributes['id'], common::$inputNotices)) {
|
||||
$notice = common::$inputNotices[$attributes['id']];
|
||||
$attributes['class'] .= ' notice';
|
||||
}
|
||||
$html .= self::notice($attributes['id'], $notice);
|
||||
// Texte
|
||||
$html .= sprintf(
|
||||
'<input type="text" %s>',
|
||||
helper::sprintAttributes($attributes)
|
||||
);
|
||||
// Fin du wrapper
|
||||
$html .= '</div>';
|
||||
// Retourne le html
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Crée un champ texte long
|
||||
* @param string $nameId Nom et id du champ
|
||||
* @param array $attributes Attributs ($key => $value)
|
||||
* @return string
|
||||
*/
|
||||
public static function textarea($nameId, array $attributes = []) {
|
||||
// Attributs par défaut
|
||||
$attributes = array_merge([
|
||||
'before' => true,
|
||||
'class' => '', // editorWysiwyg et editorCss possible pour utiliser le éditeurs (il faut également instancier les librairies)
|
||||
'classWrapper' => '',
|
||||
'disabled' => false,
|
||||
'noDirty' => false,
|
||||
'help' => '',
|
||||
'id' => $nameId,
|
||||
'label' => '',
|
||||
//'maxlength' => '500',
|
||||
'name' => $nameId,
|
||||
'readonly' => false,
|
||||
'value' => ''
|
||||
], $attributes);
|
||||
// Sauvegarde des données en cas d'erreur
|
||||
if($attributes['before'] AND array_key_exists($attributes['id'], common::$inputBefore)) {
|
||||
$attributes['value'] = common::$inputBefore[$attributes['id']];
|
||||
}
|
||||
// Début du wrapper
|
||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
||||
// Label
|
||||
if($attributes['label']) {
|
||||
$html .= self::label($attributes['id'], $attributes['label'], [
|
||||
'help' => $attributes['help']
|
||||
]);
|
||||
}
|
||||
// Notice
|
||||
$notice = '';
|
||||
if(array_key_exists($attributes['id'], common::$inputNotices)) {
|
||||
$notice = common::$inputNotices[$attributes['id']];
|
||||
$attributes['class'] .= ' notice';
|
||||
}
|
||||
$html .= self::notice($attributes['id'], $notice);
|
||||
// Texte long
|
||||
$html .= sprintf(
|
||||
'<textarea %s>%s</textarea>',
|
||||
helper::sprintAttributes($attributes, ['value']),
|
||||
$attributes['value']
|
||||
);
|
||||
// Fin du wrapper
|
||||
$html .= '</div>';
|
||||
// Retourne le html
|
||||
return $html;
|
||||
}
|
||||
}
|
@ -250,6 +250,15 @@ core.start = function() {
|
||||
$(location).attr("href", pageUrl);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Choix de la langue dans la barre de membre
|
||||
*/
|
||||
$("#barSelectLanguage").on("change", function(){
|
||||
$(" #barFormSelectLanguage").submit();
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Champs d'upload de fichiers
|
||||
*/
|
||||
|
2071
core/core.php
@ -313,7 +313,7 @@ td > .col12 {
|
||||
line-height: 45px;
|
||||
}
|
||||
|
||||
#bar li {
|
||||
#bar li, form {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
@ -323,20 +323,27 @@ td > .col12 {
|
||||
color: #FFF;
|
||||
-webkit-transition: background .3s ease-out;
|
||||
transition: background .3s ease-out;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
#bar a:hover {
|
||||
background: #191A1A;
|
||||
text-decoration: none;
|
||||
color: lightblue;
|
||||
}
|
||||
#bar a:active {
|
||||
background: #111112;
|
||||
}
|
||||
#bar select {
|
||||
width: 250px;
|
||||
#bar select{
|
||||
border: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 769px) {
|
||||
#bar #barSelectPage {
|
||||
width: 180px;
|
||||
}
|
||||
#bar #barSelectLanguage {
|
||||
width: 120px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
@media (min-width: 950px) {
|
||||
#bar #barLeft {
|
||||
float: left;
|
||||
}
|
||||
@ -346,7 +353,7 @@ td > .col12 {
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
@media (max-width: 950px) {
|
||||
#bar {
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
@ -356,8 +363,12 @@ td > .col12 {
|
||||
height: auto;
|
||||
}
|
||||
#bar #barSelectPage {
|
||||
width: 50% ;
|
||||
font-size: 0.6em;
|
||||
width: 40% ;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
#bar #barSelectLanguage {
|
||||
width: 30% ;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
#bar #barLeft {
|
||||
font-size: 1.6em;
|
||||
@ -371,6 +382,25 @@ td > .col12 {
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 550px) {
|
||||
#bar #barSelectPage {
|
||||
width: 30% ;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
#bar #barSelectLanguage {
|
||||
width: 30% ;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
#bar #barLeft {
|
||||
font-size: 1.2em;
|
||||
float : none;
|
||||
}
|
||||
#bar #barRight {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Site */
|
||||
#site {
|
||||
@ -430,6 +460,12 @@ nav #toggle span {
|
||||
display: block;
|
||||
}
|
||||
|
||||
nav #burgerText {
|
||||
float: left;
|
||||
font-size: 1.4em;
|
||||
margin: 15px 0 0 10px;
|
||||
}
|
||||
|
||||
nav ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
@ -452,6 +488,13 @@ nav li ul {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
/*
|
||||
nav #i18nUserSelect {
|
||||
text-align: right;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
nav li ul li {
|
||||
display: block;
|
||||
text-align: left;
|
||||
@ -471,7 +514,8 @@ nav a {
|
||||
nav a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
@media (min-width: 769px) {
|
||||
|
||||
@media (min-width: 768px) {
|
||||
nav #menu {
|
||||
display: block;
|
||||
}
|
||||
@ -479,7 +523,7 @@ nav a:hover {
|
||||
|
||||
@media (max-width: 768px) {
|
||||
body > nav {
|
||||
margin:0;
|
||||
margin:0;
|
||||
}
|
||||
nav #toggle {
|
||||
display: block;
|
||||
@ -488,7 +532,7 @@ nav a:hover {
|
||||
display: none;
|
||||
text-align: left;
|
||||
}
|
||||
nav li {
|
||||
nav li, .flag {
|
||||
display: block;
|
||||
}
|
||||
nav li ul {
|
||||
@ -497,11 +541,19 @@ nav a:hover {
|
||||
position: static;
|
||||
min-width: inherit;
|
||||
width: auto;
|
||||
margin: 15px;
|
||||
|
||||
}
|
||||
|
||||
/* Taille du menu hamburger */
|
||||
nav .zwiico-menu {
|
||||
font-size:1.5em;
|
||||
}
|
||||
}
|
||||
|
||||
nav .flag {
|
||||
margin: 20px 10px 20px 10px;
|
||||
font-size: calc(100% * 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -537,6 +589,43 @@ ul .menuSideChild, li .menuSideChild {
|
||||
padding-left:10px;
|
||||
}
|
||||
|
||||
/* Icones de langues du menu */
|
||||
.flag {
|
||||
margin: 0px 5px 0 5px;
|
||||
font-size: calc(100% * 1.1);
|
||||
}
|
||||
|
||||
/* Emplacement des conditions d'utilisation */
|
||||
#googTransLogo {
|
||||
float: right;
|
||||
}
|
||||
#googTransLogo img {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
/* Paramètres du menu et de la barre de langue */
|
||||
|
||||
#menuBar {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
#i18nBar {
|
||||
display: inline-flex ;
|
||||
/*float: right; Dans le thème*/
|
||||
}
|
||||
/* fin barre de menu */
|
||||
nav::after {
|
||||
content: " ";
|
||||
clear: both;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
nav::before {
|
||||
content: " ";
|
||||
clear: left;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
|
||||
/* Corps */
|
||||
@media (min-width:769px) {
|
||||
@ -1261,3 +1350,19 @@ th.col12 {
|
||||
.colorOrange {
|
||||
color: #F39C12;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Supprimer Le tooltip Google
|
||||
*/
|
||||
.goog-tooltip {
|
||||
display: none !important;
|
||||
}
|
||||
.goog-tooltip:hover {
|
||||
display: none !important;
|
||||
}
|
||||
.goog-text-highlight {
|
||||
background-color: transparent !important;
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php $layout = new layout($this); ?>
|
||||
<!DOCTYPE html>
|
||||
<html prefix="og: http://ogp.me/ns#" lang="fr">
|
||||
<html prefix="og: http://ogp.me/ns#" lang="<?php echo $this->geti18n(); ?>">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
@ -19,30 +19,35 @@
|
||||
include('site/data/head.inc.html');
|
||||
}?>
|
||||
</head>
|
||||
<body>
|
||||
<body class="notranslate">
|
||||
<?php $layout->showBar(); ?>
|
||||
<?php $layout->showNotification(); ?>
|
||||
<?php $layout->showNotification(); ?>
|
||||
<?php if($this->getData(['theme', 'menu', 'position']) === 'body-first' || $this->getData(['theme', 'menu', 'position']) === 'top' ): ?>
|
||||
<!-- Menu dans le fond du site avant la bannière -->
|
||||
<nav
|
||||
<?php
|
||||
// Détermine si le menu est fixe en haut de page lorsque l'utilisateur n'est pas connecté
|
||||
//
|
||||
if($this->getData(['theme', 'menu', 'position']) === 'top' &&
|
||||
$this->getData(['theme', 'menu', 'fixed']) === true) {
|
||||
if ($this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD'))
|
||||
{echo 'id="navfixedlogout"';}
|
||||
elseif ($this->getUrl(0) !== 'theme')
|
||||
{echo 'id="navfixedconnected"';}
|
||||
}
|
||||
?>
|
||||
>
|
||||
<div id="toggle"><?php echo template::ico('menu',null,null,'2em'); ?></div>
|
||||
<div id="menu" class="
|
||||
<?php if($this->getData(['theme', 'menu', 'position']) === 'top'){echo 'container-large';}else{echo'container';}
|
||||
?>">
|
||||
|
||||
<?php $layout->showMenu(); ?>
|
||||
<?php
|
||||
// Détermine si le menu est fixe en haut de page lorsque l'utilisateur n'est pas connecté
|
||||
if($this->getData(['theme', 'menu', 'position']) === 'top' &&
|
||||
$this->getData(['theme', 'menu', 'fixed']) === true) {
|
||||
if ($this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD'))
|
||||
{echo 'id="navfixedlogout"';}
|
||||
elseif ($this->getUrl(0) !== 'theme')
|
||||
{echo 'id="navfixedconnected"';}
|
||||
}
|
||||
?>>
|
||||
<div id="toggle">
|
||||
<?php if ($this->getData(['theme','menu','burgerTitle']) === true ): ?>
|
||||
<div id="burgerText"><?php echo $this->getData(['config','title']);?></div>
|
||||
<?php endif; ?>
|
||||
<?php echo template::ico('menu',null,null,'2em'); ?>
|
||||
</div> <!-- fin burger -->
|
||||
<div id="menu" class="<?php if($this->getData(['theme', 'menu', 'position']) === 'top'){echo 'container-large';}else{echo'container';}?>">
|
||||
<div id="menuBar">
|
||||
<?php $layout->showMenu(); ?>
|
||||
</div>
|
||||
<div id="i18nBar">
|
||||
<?php $layout->showi18nUserSelect(); ?>
|
||||
</div>
|
||||
</div> <!--fin menu -->
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
@ -72,8 +77,20 @@
|
||||
<?php if($this->getData(['theme', 'menu', 'position']) === 'body-second'): ?>
|
||||
<!-- Menu dans le fond du site après la bannière -->
|
||||
<nav>
|
||||
<div id="toggle"><?php echo template::ico('menu',null,null,'2em'); ?></div>
|
||||
<div id="menu" class="container"><?php $layout->showMenu(); ?></div>
|
||||
<div id="toggle">
|
||||
<?php if ($this->getData(['theme','menu','burgerTitle']) === true ): ?>
|
||||
<div id="burgerText"><?php echo $this->getData(['config','title']);?></div>
|
||||
<?php endif; ?>
|
||||
<?php echo template::ico('menu',null,null,'2em'); ?>
|
||||
</div> <!-- fin burger -->
|
||||
<div id="menu" class="container">
|
||||
<div id="menuBar">
|
||||
<?php $layout->showMenu(); ?>
|
||||
</div>
|
||||
<div id="i18nBar">
|
||||
<?php $layout->showi18nUserSelect(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<!-- Site -->
|
||||
@ -81,8 +98,20 @@
|
||||
<?php if($this->getData(['theme', 'menu', 'position']) === 'site-first'): ?>
|
||||
<!-- Menu dans le site avant la bannière -->
|
||||
<nav>
|
||||
<div id="toggle"><?php echo template::ico('menu',null,null,'2em'); ?></div>
|
||||
<div id="menu" class="container"><?php $layout->showMenu(); ?></div>
|
||||
<div id="toggle">
|
||||
<?php if ($this->getData(['theme','menu','burgerTitle']) === true ): ?>
|
||||
<div id="burgerText"><?php echo $this->getData(['config','title']);?></div>
|
||||
<?php endif; ?>
|
||||
<?php echo template::ico('menu',null,null,'2em'); ?>
|
||||
</div> <!-- fin burger -->
|
||||
<div id="menu" class="container">
|
||||
<div id="menuBar">
|
||||
<?php $layout->showMenu(); ?>
|
||||
</div>
|
||||
<div id="i18nBar">
|
||||
<?php $layout->showi18nUserSelect(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<?php if(
|
||||
@ -124,8 +153,20 @@
|
||||
): ?>
|
||||
<!-- Menu dans le site après la bannière -->
|
||||
<nav <?php if($this->getData(['theme', 'menu', 'position']) === 'hide'): ?>class="displayNone"<?php endif; ?>>
|
||||
<div id="toggle"><?php echo template::ico('menu',null,null,'2em'); ?></div>
|
||||
<div id="menu" class="container"><?php $layout->showMenu(); ?></div>
|
||||
<div id="toggle">
|
||||
<?php if ($this->getData(['theme','menu','burgerTitle']) === true ): ?>
|
||||
<div id="burgerText"><?php echo $this->getData(['config','title']);?></div>
|
||||
<?php endif; ?>
|
||||
<?php echo template::ico('menu',null,null,'2em'); ?>
|
||||
</div> <!-- fin burger -->
|
||||
<div id="menu" class="container">
|
||||
<div id="menuBar">
|
||||
<?php $layout->showMenu(); ?>
|
||||
</div>
|
||||
<div id="i18nBar">
|
||||
<?php $layout->showi18nUserSelect(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<!-- Corps de page -->
|
||||
|
@ -19,7 +19,9 @@ class config extends common {
|
||||
'configMetaImage' => self::GROUP_ADMIN,
|
||||
'generateFiles' => self::GROUP_ADMIN,
|
||||
'updateRobots' => self::GROUP_ADMIN,
|
||||
'index' => self::GROUP_ADMIN
|
||||
'index' => self::GROUP_ADMIN,
|
||||
'manage' => self::GROUP_ADMIN,
|
||||
'updateBaseUrl' => self::GROUP_ADMIN
|
||||
];
|
||||
|
||||
public static $timezones = [
|
||||
@ -148,7 +150,7 @@ class config extends common {
|
||||
|
||||
public function generateFiles() {
|
||||
// Mettre à jour le site map
|
||||
$successSitemap=$this->createSitemap('all');
|
||||
$successSitemap=$this->createSitemap();
|
||||
|
||||
// Creer un fichier robots.txt
|
||||
$successRobots=$this->updateRobots();
|
||||
@ -199,16 +201,17 @@ class config extends common {
|
||||
* Sauvegarde des données
|
||||
*/
|
||||
public function backup() {
|
||||
|
||||
// Creation du ZIP
|
||||
$fileName = date('Y-m-d-h-i-s', time()) . '.zip';
|
||||
$fileName = str_replace('/','',helper::baseUrl(false,false)) . '-'. date('Y-m-d-h-i-s', time()) . '.zip';
|
||||
$zip = new ZipArchive();
|
||||
if($zip->open(self::TEMP_DIR . $fileName, ZipArchive::CREATE) === TRUE){
|
||||
foreach(configHelper::scanDir('site/') as $file) {
|
||||
foreach(core::scanDir(self::DATA_DIR) as $file) {
|
||||
$zip->addFile($file);
|
||||
}
|
||||
}
|
||||
$zip->close();
|
||||
// Enregistre la date de backup manuel
|
||||
$this->setData(['core', 'lastBackup', mktime(0, 0, 0)]);
|
||||
// Téléchargement du ZIP
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
header('Content-Disposition: attachment; filename="' . $fileName . '"');
|
||||
@ -255,7 +258,114 @@ class config extends common {
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Procédure d'importation
|
||||
*/
|
||||
public function manage() {
|
||||
// Soumission du formulaire
|
||||
if($this->isPost()) {
|
||||
//if ($this->getInput('configManageImportFile'))
|
||||
$fileZip = $this->getInput('configManageImportFile');
|
||||
$file_parts = pathinfo($fileZip);
|
||||
$folder = date('Y-m-d-h-i-s', time());
|
||||
$zip = new ZipArchive();
|
||||
if ($file_parts['extension'] !== 'zip') {
|
||||
// Valeurs en sortie erreur
|
||||
$this->addOutput([
|
||||
'notification' => 'Le fichier n\'est pas une archive valide',
|
||||
'redirect' => helper::baseUrl() . 'config/manage',
|
||||
'state' => false
|
||||
]);
|
||||
}
|
||||
$successOpen = $zip->open(self::FILE_DIR . 'source/' . $fileZip);
|
||||
if ($successOpen === FALSE) {
|
||||
// Valeurs en sortie erreur
|
||||
$this->addOutput([
|
||||
'notification' => 'Impossible de lire l\'archive',
|
||||
'redirect' => helper::baseUrl() . 'config/manage',
|
||||
'state' => false
|
||||
]);
|
||||
}
|
||||
// Lire le contenu de l'archive dans le tableau files
|
||||
for( $i = 0; $i < $zip->numFiles; $i++ ){
|
||||
$stat = $zip->statIndex( $i );
|
||||
$files [] = ( basename( $stat['name'] ));
|
||||
}
|
||||
|
||||
// Détermination de la version à installer
|
||||
if (in_array('theme.json',$files) === true &&
|
||||
in_array('core.json',$files) === true &&
|
||||
in_array ('user.json', $files) === false ) {
|
||||
// V9 pas de fichier user dans l'archive
|
||||
// Stocker le choix de conserver les users installées
|
||||
$version = '9';
|
||||
|
||||
} elseif (in_array('theme.json',$files) === true &&
|
||||
in_array('core.json',$files) === true &&
|
||||
in_array ('user.json', $files) === true &&
|
||||
in_array ('config.json', $files) === true ) {
|
||||
// V10 valide
|
||||
$version = '10';
|
||||
// Option active, les users sont stockées
|
||||
if ($this->getInput('configManageImportUser', helper::FILTER_BOOLEAN) === true ) {
|
||||
$users = $this->getData(['user']);
|
||||
}
|
||||
// Nettoyage des dossiers de langue
|
||||
foreach (self::$i18nList as $itemKey => $item) {
|
||||
// Le dossier existe ?
|
||||
if (is_dir(self::DATA_DIR . $itemKey) === true) {
|
||||
unlink (self::DATA_DIR . $itemKey . '/module.json');
|
||||
unlink (self::DATA_DIR . $itemKey . '/page.json');
|
||||
rmdir (self::DATA_DIR . $itemKey);
|
||||
}
|
||||
}
|
||||
|
||||
} else { // Version invalide
|
||||
// Valeurs en sortie erreur
|
||||
$this->addOutput([
|
||||
'notification' => 'Cette archive n\'est pas une sauvegarde valide',
|
||||
'redirect' => helper::baseUrl() . 'config/manage',
|
||||
'state' => false
|
||||
]);
|
||||
}
|
||||
|
||||
// Extraire le zip
|
||||
$success = $zip->extractTo( '.' );
|
||||
// Fermer l'archive
|
||||
$zip->close();
|
||||
|
||||
// Restaurer les users originaux d'une v10 si option cochée
|
||||
if (!empty($users) &&
|
||||
$version === '10' &&
|
||||
$this->getInput('configManageImportUser', helper::FILTER_BOOLEAN) === true) {
|
||||
$this->setData(['user',$users]);
|
||||
}
|
||||
|
||||
if ($version === '9' ) {
|
||||
$this->importData($this->getInput('configManageImportUser', helper::FILTER_BOOLEAN));
|
||||
$this->setData(['core','dataVersion',0]);
|
||||
}
|
||||
|
||||
// Met à jours les URL dans les contenus de page
|
||||
|
||||
// Message de notification
|
||||
$notification = $success === true ? 'Sauvegarde importée avec succès' : 'Erreur d\'extraction';
|
||||
$redirect = $this->getInput('configManageImportUser', helper::FILTER_BOOLEAN) === true ? helper::baseUrl() . 'config/manage' : helper::baseUrl() . 'user/login/';
|
||||
// Valeurs en sortie erreur
|
||||
$this->addOutput([
|
||||
'notification' => $notification,
|
||||
'redirect' =>$redirect,
|
||||
'state' => $success
|
||||
]);
|
||||
}
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => 'Sauvegarder / Restaurer',
|
||||
'view' => 'manage'
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Configuration
|
||||
@ -268,6 +378,7 @@ class config extends common {
|
||||
} else {
|
||||
$legalPageId = '';
|
||||
}
|
||||
|
||||
$this->setData([
|
||||
'config',
|
||||
[
|
||||
@ -276,8 +387,6 @@ class config extends common {
|
||||
'maintenance' => $this->getInput('configMaintenance', helper::FILTER_BOOLEAN),
|
||||
'cookieConsent' => $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN),
|
||||
'favicon' => $this->getInput('configFavicon'),
|
||||
'homePageId' => $this->getInput('configHomePageId', helper::FILTER_ID, true),
|
||||
'metaDescription' => $this->getInput('configMetaDescription', helper::FILTER_STRING_LONG, true),
|
||||
'social' => [
|
||||
'facebookId' => $this->getInput('configSocialFacebookId'),
|
||||
'linkedinId' => $this->getInput('configSocialLinkedinId'),
|
||||
@ -288,12 +397,17 @@ class config extends common {
|
||||
'githubId' => $this->getInput('configSocialGithubId')
|
||||
],
|
||||
'timezone' => $this->getInput('configTimezone', helper::FILTER_STRING_SHORT, true),
|
||||
'title' => $this->getInput('configTitle', helper::FILTER_STRING_SHORT, true),
|
||||
'itemsperPage' => $this->getInput('itemsperPage', helper::FILTER_INT,true),
|
||||
'legalPageId' => $this->getInput('configLegalPageId'),
|
||||
'metaDescription' => $this->getInput('configMetaDescription', helper::FILTER_STRING_LONG, true),
|
||||
'title' => $this->getInput('configTitle', helper::FILTER_STRING_SHORT, true),
|
||||
'disablei18n' => sizeof($this->i18nInstalled() ) === 1 ? $this->getInput('configdisablei18n', helper::FILTER_BOOLEAN) : false,
|
||||
'googTransLogo' => $this->getInput('configdGoogTransLogo', helper::FILTER_BOOLEAN),
|
||||
'i18n' => $this->getData(['config','i18n']),
|
||||
'autoUpdate' => $this->getInput('configAutoUpdate', helper::FILTER_BOOLEAN)
|
||||
]
|
||||
]);
|
||||
|
||||
if(self::$inputNotices === []) {
|
||||
// Ecrire les fichiers de script
|
||||
file_put_contents(self::DATA_DIR . 'head.inc.html',$this->getInput('configScriptHead',null));
|
||||
@ -351,31 +465,28 @@ class config extends common {
|
||||
'view' => 'index'
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class configHelper extends helper {
|
||||
|
||||
|
||||
/**
|
||||
* Scan le contenu d'un dossier et de ses sous-dossiers
|
||||
* @param string $dir Dossier à scanner
|
||||
* @return array
|
||||
* Met à jour les données de site avec l'adresse trannsmise
|
||||
*/
|
||||
public static function scanDir($dir) {
|
||||
$dirContent = [];
|
||||
$iterator = new DirectoryIterator($dir);
|
||||
foreach($iterator as $fileInfos) {
|
||||
if(in_array($fileInfos->getFilename(), ['.', '..', 'backup'])) {
|
||||
continue;
|
||||
}
|
||||
elseif($fileInfos->isDir()) {
|
||||
$dirContent = array_merge($dirContent, self::scanDir($fileInfos->getPathname()));
|
||||
}
|
||||
else {
|
||||
$dirContent[] = $fileInfos->getPathname();
|
||||
public function updateBaseUrl () {
|
||||
$old = $this->getInput('configManageBaseURLToConvert');
|
||||
$new = $this->getInput('configManageCurrentURL');
|
||||
foreach($this->getHierarchy(null,null,null) as $parentId => $childIds) {
|
||||
$content = $this->getData(['page',$parentId,'content']);
|
||||
$replace = str_replace( $old . '/site/' , $new . 'site/', $content) ;
|
||||
$this->setData(['page',$parentId,'content', $replace ]);
|
||||
foreach($childIds as $childId) {
|
||||
$content = $this->getData(['page',$childId,'content']);
|
||||
$replace = str_replace( $old . '/site/' , $new . 'site/', $content) ;
|
||||
$this->setData(['page',$childId,'content', $replace ]);
|
||||
}
|
||||
}
|
||||
return $dirContent;
|
||||
$this->setData(['core','baseUrl',helper::baseUrl(false,false)]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => 'Sauvegarder / Restaurer',
|
||||
'view' => 'manage'
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
25
core/module/config/view/index/index.js.php
Normal file
@ -0,0 +1,25 @@
|
||||
/**
|
||||
* 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 Frédéric Tempez <frederic.tempez@outlook.com>
|
||||
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
|
||||
* @license GNU General Public License, version 3
|
||||
* @link http://zwiicms.com/
|
||||
*/
|
||||
|
||||
/**
|
||||
* Modification de l'affichage de l'icône de langues
|
||||
*/
|
||||
|
||||
|
||||
var configdisablei18nDOM = $("#configdisablei18n");
|
||||
configdisablei18nDOM.on("change", function() {
|
||||
if ($("input[name=configdisablei18n]").is(':checked')) {
|
||||
$(".zwiico-flag").css('display','none');
|
||||
} else {
|
||||
$(".zwiico-flag").css('display','block');
|
||||
}
|
||||
});
|
@ -1,4 +1,5 @@
|
||||
<?php echo template::formOpen('configForm'); ?>
|
||||
<div class="notranslate">
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('configBack', [
|
||||
@ -8,7 +9,13 @@
|
||||
'value' => 'Accueil'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset8">
|
||||
<div class="col3 offset5">
|
||||
<?php echo template::button('configManageButton', [
|
||||
'href' => helper::baseUrl() . 'config/manage',
|
||||
'value' => 'Sauvegarder / Restaurer'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::submit('configSubmit'); ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -20,7 +27,9 @@
|
||||
<div class="col4">
|
||||
<?php echo template::select('configHomePageId', helper::arrayCollumn($this->getData(['page']), 'title', 'SORT_ASC'), [
|
||||
'label' => 'Page d\'accueil',
|
||||
'selected' => $this->getData(['config', 'homePageId'])
|
||||
'selected' => $this->getHomePageId(),
|
||||
'disabled' => true,
|
||||
'help' => 'La page d\'accueil doit être définie dans une des pages de la langue sélectionnée'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col8">
|
||||
@ -40,7 +49,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Réglages</h4>
|
||||
<div class="row">
|
||||
@ -77,67 +86,96 @@
|
||||
'help' => 'Les mentions légales sont obligatoires en France'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col12">
|
||||
<div class="row">
|
||||
<?php echo template::checkbox('configCookieConsent', true, 'Message de consentement aux cookies', [
|
||||
'checked' => $this->getData(['config', 'cookieConsent'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col12">
|
||||
<div class="row">
|
||||
<?php echo template::checkbox('rewrite', true, 'Réécriture d\'URL', [
|
||||
'checked' => helper::checkRewrite(),
|
||||
'help' => 'Vérifiez d\'abord que votre serveur l\'autorise : ce n\'est pas le cas chez Free.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('configCookieConsent', true, 'Message de consentement aux cookies', [
|
||||
'checked' => $this->getData(['config', 'cookieConsent'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('rewrite', true, 'Réécriture d\'URL', [
|
||||
'checked' => helper::checkRewrite(),
|
||||
'help' => 'Vérifiez d\'abord que votre serveur l\'autorise : ce n\'est pas le cas chez Free.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('configdisablei18n', true, 'Désactivation de la gestion des langues', [
|
||||
'checked' => $this->getData(['config', 'disablei18n']),
|
||||
'disabled' => sizeof($this->i18nInstalled() ) > 1 ? true : false,
|
||||
'help' => 'L\'option n\'est pas modifiable quand une langue est installée.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('configdGoogTransLogo', true, 'Conditions d\'utilisation Google Traduction', [
|
||||
'checked' => $this->getData(['config', 'googTransLogo']),
|
||||
'help' => 'Affiche les conditions d\'utilisation de Google Translation en bas des pages traduites automatiquement. Si vous ne traduisez pas vous-même vos pages, cette option est vivement recommandée.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('configMaintenance', true, 'Site en maintenance', [
|
||||
'checked' => $this->getData(['config', 'maintenance'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('configAutoUpdate', true, 'Sauvegarde automatique', [
|
||||
'checked' => $this->getData(['config', 'autoUpdate']),
|
||||
'help' => 'Vérifie une fois par jour l\'existence d\'une mise à jour.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="block">
|
||||
<h4>Réseaux sociaux</h4>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<div class="col6">
|
||||
<?php echo template::text('configSocialFacebookId', [
|
||||
'help' => 'Saisissez votre ID : https://www.facebook.com/[ID].',
|
||||
'label' => 'Facebook',
|
||||
'value' => $this->getData(['config', 'social', 'facebookId'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<div class="col6">
|
||||
<?php echo template::text('configSocialInstagramId', [
|
||||
'help' => 'Saisissez votre ID : https://www.instagram.com/[ID].',
|
||||
'label' => 'Instagram',
|
||||
'value' => $this->getData(['config', 'social', 'instagramId'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::text('configSocialYoutubeId', [
|
||||
'help' => 'Saisissez votre ID : https://www.youtube.com/channel/[ID].',
|
||||
'label' => 'Youtube',
|
||||
'value' => $this->getData(['config', 'social', 'youtubeId'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php echo template::text('configSocialTwitterId', [
|
||||
'help' => 'Saisissez votre ID : https://twitter.com/[ID].',
|
||||
'label' => 'Twitter',
|
||||
<div class="col6">
|
||||
<?php echo template::text('configSocialYoutubeId', [
|
||||
'help' => 'Saisissez votre ID : https://www.youtube.com/channel/[ID].',
|
||||
'label' => 'Youtube',
|
||||
'value' => $this->getData(['config', 'social', 'youtubeId'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::text('configSocialTwitterId', [
|
||||
'help' => 'Saisissez votre ID : https://twitter.com/[ID].',
|
||||
'label' => 'Twitter',
|
||||
'value' => $this->getData(['config', 'social', 'twitterId'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::text('configSocialPinterestId', [
|
||||
'help' => 'Saisissez votre ID : https://pinterest.com/[ID].',
|
||||
'label' => 'Pinterest',
|
||||
'value' => $this->getData(['config', 'social', 'pinterestId'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<div class="col6">
|
||||
<?php echo template::text('configSocialLinkedinId', [
|
||||
'help' => 'Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].',
|
||||
'label' => 'Linkedin',
|
||||
@ -146,7 +184,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col4 offset4">
|
||||
<div class="col6 offset3">
|
||||
<?php echo template::text('configSocialGithubId', [
|
||||
'help' => 'Saisissez votre ID Github : https://github.com/[ID].',
|
||||
'label' => 'Github',
|
||||
@ -156,58 +194,30 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="block">
|
||||
<h4>Gestion et sauvegarde</h4>
|
||||
<div class="col12">
|
||||
<div class="row">
|
||||
<?php echo template::checkbox('configMaintenance', true, 'Site en maintenance', [
|
||||
'checked' => $this->getData(['config', 'maintenance'])
|
||||
]); ?>
|
||||
<?php echo template::checkbox('configAutoUpdate', true, 'Mise à jour automatique', [
|
||||
'checked' => $this->getData(['config', 'autoUpdate']),
|
||||
'help' => 'Vérifie une fois par jour l\'existence d\'une mise à jour.'
|
||||
]); ?>
|
||||
<?php echo template::checkbox('configAutoBackup', true, 'Sauvegarde automatique', [
|
||||
'checked' => $this->getData(['config', 'autoBackup']),
|
||||
'help' => 'Le fichier de données est copié quotidiennement dans le dossier \'site/backup\'. La sauvegarde est conservée pendant 30 jours.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col10 offset1">
|
||||
<?php echo template::button('configExport', [
|
||||
'href' => helper::baseUrl() . 'config/backup',
|
||||
'value' => 'Exporter une copie du site<br>(données, thème et fichiers)'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--</div>
|
||||
<div class="row">-->
|
||||
<div class="col6">
|
||||
<div class="block">
|
||||
<h4>Référencement</h4>
|
||||
<div class="row">
|
||||
<div class="col5 ">
|
||||
<?php echo template::button('configMetaImage', [
|
||||
'href' => helper::baseUrl() . 'config/configMetaImage',
|
||||
'value' => 'Rafraîchir la capture d\'écran Open Graph',
|
||||
'help' => 'bb'
|
||||
]); ?>
|
||||
<div class="col5">
|
||||
<?php echo template::button('configMetaImage', [
|
||||
'href' => helper::baseUrl() . 'config/configMetaImage',
|
||||
'value' => 'Rafraîchir la capture d\'écran Open Graph'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col7">
|
||||
<img src="<?php echo helper::baseUrl(false) . self::FILE_DIR.'source/screenshot.png';?>" data-tippy-content="Cette capture d'écran est nécessaire aux partages sur les réseaux sociaux. Elle est régénérée lorsque le fichier 'screenshot.png' est effacé du gestionnaire de fichiers." />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col10 offset1">
|
||||
<div class="col5 offset2">
|
||||
<?php echo template::button('configSiteMap', [
|
||||
'href' => helper::baseUrl() . 'config/generateFiles',
|
||||
'value' => 'Générer sitemap.xml et robots.txt'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12 textAlignCenter">
|
||||
<img src="<?php echo helper::baseUrl(false) . self::FILE_DIR.'source/screenshot.png';?>" data-tippy-content="Cette capture d'écran est nécessaire aux partages sur les réseaux sociaux. Elle est régénérée lorsque le fichier 'screenshot.png' est effacé du gestionnaire de fichiers." />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -304,4 +314,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
||||
|
100
core/module/config/view/manage/manage.php
Normal file
@ -0,0 +1,100 @@
|
||||
<?php echo template::formOpen('configManageForm'); ?>
|
||||
<div class="notranslate">
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('configManageBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'config',
|
||||
'ico' => 'left',
|
||||
'value' => 'Retour'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset8">
|
||||
<?php echo template::submit('configManageSubmit',[
|
||||
'value' => 'Enregister'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="block">
|
||||
<h4>Sauvegarde du site (données et thème)</h4>
|
||||
<div class="row">
|
||||
<div class="col10 offset1">
|
||||
<?php echo template::button('configManageButton', [
|
||||
'href' => helper::baseUrl() . 'config/backup',
|
||||
'value' => 'Générer et télécharger <br />une archive des données de site',
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<?php echo template::checkbox('configExportAutoBackup', true, 'Sauvegarde automatique quotidienne', [
|
||||
'checked' => $this->getData(['config', 'autoBackup']),
|
||||
'help' => '<p>Une archive contenant le dossier /site/data est copiée dans le dossier \'site/backup\'. La sauvegarde est conservée pendant 30 jours.</p><p>Les fichiers du site ne sont pas sauvegardés automatiquement.</p>'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<div class="block">
|
||||
<h4>Restauration ou transfert d'un site</h4>
|
||||
<div class="row">
|
||||
<?php echo template::file('configManageImportFile', [
|
||||
'label' => 'Sélectionnez une archive au format ZIP',
|
||||
'type' => 2,
|
||||
'help' => 'L\'archive a été déposée dans le gestionaire de fichiers. Les archives inférieures à la version 9 ne sont pas acceptées.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="row">
|
||||
<?php echo template::checkbox('configManageImportUser', true, 'Préserver les comptes des utilisateurs déjà installés', [
|
||||
'checked' => true
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Conversion des URL après transfert de site</h4>
|
||||
<div class="row">
|
||||
<div class="col5">
|
||||
<?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 = $this->getData(['core', 'baseUrl']);
|
||||
$buttonClass = (helper::baseUrl(false,false) !== $this->getData(['core', 'baseUrl']) ) ? '' : 'disabled';
|
||||
}
|
||||
echo template::text('configManageBaseURLToConvert', [
|
||||
'label' => 'Dossier d\'installation de l\'archive' ,
|
||||
'value' => $baseUrlValue,
|
||||
'readonly' => true,
|
||||
'help' => 'Lors de la restauration d\'un backup d\'une version 9.2.10 ou supérieure, l\'URL de base est stockée dans la configuration sinon cette donnée est vide.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col5">
|
||||
<?php echo template::text('configManageCurrentURL', [
|
||||
'label' => 'Dossier du site actuel',
|
||||
'value' => helper::baseUrl(false,false),
|
||||
'readonly' => true,
|
||||
'help' => 'Dossier du site installé.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 verticalAlignBottom">
|
||||
<?php echo template::button('configManageUpdateBaseURLButton', [
|
||||
'href' => helper::baseUrl() . 'config/updateBaseUrl',
|
||||
'class' => $buttonClass,
|
||||
'value' => 'convertir'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
167
core/module/i18n/i18n.php
Normal file
@ -0,0 +1,167 @@
|
||||
<?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 Frédéric Tempez <frederic.tempez@outlook.com>
|
||||
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
|
||||
* @license GNU General Public License, version 3
|
||||
* @link http://zwiicms.com/
|
||||
*/
|
||||
|
||||
class i18n extends common {
|
||||
|
||||
public static $actions = [
|
||||
'index' => self::GROUP_MODERATOR,
|
||||
'delete' => self::GROUP_MODERATOR,
|
||||
'lang' => self::GROUP_VISITOR
|
||||
];
|
||||
public static $languages = [];
|
||||
|
||||
|
||||
/**
|
||||
* Config : gestion des langues
|
||||
*/
|
||||
public function index() {
|
||||
if ($this->isPost()) {
|
||||
// Mode ajout de langue
|
||||
// Récupérer les données du formulaire
|
||||
if (!empty ($this->getInput('i18nLanguageAdd'))) { // Formulaire valide
|
||||
$create = $this->getInput('i18nLanguageAdd');
|
||||
$copyFrom = $this->getInput('i18nLanguageCopyFrom');
|
||||
// Mode création de langue
|
||||
// La langue est déja créée ?
|
||||
if (in_array($create,$this->i18nInstalled()) === false) { // La langue n'est pas installée ?
|
||||
//Déterminer l'origine des données copiées
|
||||
$copyFrom = $copyFrom === '' ? 'core/module/i18n/ressource/' : self::DATA_DIR . $copyFrom . '/';
|
||||
// Créer le dossier
|
||||
if (is_dir(self::DATA_DIR . $create) === false ) { // Si le dossier est déjà créé
|
||||
$success = mkdir (self::DATA_DIR . $create);
|
||||
} else {
|
||||
$success = true;
|
||||
}
|
||||
// Copier les données par défaut avec gestion des erreurs
|
||||
$success = (copy ($copyFrom . 'module.json', self::DATA_DIR . $this->getInput('i18nLanguageAdd') . '/module.json') === true && $success === true) ? true : false;
|
||||
$success = (copy ($copyFrom . 'page.json', self::DATA_DIR . $this->getInput('i18nLanguageAdd') . '/page.json') === true && $success === true) ? true : false;
|
||||
// Enregistrement des données de langue dans la config
|
||||
// Chemin des images
|
||||
$this->setData(['config','i18n',$create,'flagFolder',$this->geti18nFlagFolder($create)]);
|
||||
$this->setData(['config','i18n',$create,'autoTranslate',$this->getInput('i18AutoTranslation',helper::FILTER_BOOLEAN)]);
|
||||
} else {
|
||||
$notification = $create . ' est déjà ajoutée.';
|
||||
$success = false;
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$notification = $success === true ? self::$i18nList[$this->getInput('i18nLanguageAdd')] . ' ajouté' : self::$i18nList[create] . ' déjà ajouté.' ;
|
||||
} else {
|
||||
$notification = 'Veuillez choisir une langue.';
|
||||
$success = false;
|
||||
}
|
||||
$this->addOutput([
|
||||
'notification' => $notification,
|
||||
'title' => 'Gestion des langues',
|
||||
'view' => 'index',
|
||||
'state' => $success
|
||||
]);
|
||||
// Fin traitement du formulaire
|
||||
}
|
||||
// Affichage par défaut
|
||||
$langIds = $this->i18nInstalled();
|
||||
asort($langIds);
|
||||
foreach($langIds as $itemKeyLang => $itemLang) {
|
||||
self::$languages[] = [
|
||||
$itemLang,
|
||||
stripslashes($this->getData(['config','i18n',$itemKeyLang,'flagFolder'])),
|
||||
$this->getData(['config','i18n',$itemKeyLang,'autoTranslate']) === true ? 'Oui' : 'Non',
|
||||
template::button('i18nDelete' . $itemKeyLang, [
|
||||
'class' => 'i18nDelete buttonRed',
|
||||
'href' => helper::baseUrl() . 'i18n/delete/' . $itemKeyLang. '/' . $_SESSION['csrf'],
|
||||
'value' => template::ico('cancel')
|
||||
])
|
||||
];
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => 'Gestion des langues',
|
||||
'view' => 'index'
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
/* Effacer une langue
|
||||
*
|
||||
*/
|
||||
public function delete() {
|
||||
// Jeton incorrect
|
||||
if ($this->getUrl(3) !== $_SESSION['csrf']) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'i18n',
|
||||
'notification' => 'Action non autorisée'
|
||||
]);
|
||||
} elseif ( $this->getUrl(2) === $this->geti18n()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'i18n',
|
||||
'notification' => 'Vous ne pouvez pas supprimer la langue courante.'
|
||||
]);
|
||||
} elseif ( $this->getUrl(2) === 'fr') {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'i18n',
|
||||
'notification' => 'Vous ne pouvez pas supprimer la langue par défaut.'
|
||||
]);
|
||||
} else {
|
||||
// Le dossier existe ?
|
||||
if (is_dir(self::DATA_DIR . $this->getUrl(2)) === true) {
|
||||
$success = unlink (self::DATA_DIR . $this->getUrl(2) . '/module.json');
|
||||
$success = (unlink (self::DATA_DIR . $this->getUrl(2) . '/page.json') && $success === true) ? true : false ;
|
||||
$success = (rmdir (self::DATA_DIR . $this->getUrl(2)) === true && $success === true) ? true : false ;
|
||||
// Effacer les données de config
|
||||
$this->deleteData(['config','i18n',$this->getUrl(2)]);
|
||||
|
||||
} else {
|
||||
$success = false;
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$notification = $success === true ? self::$i18nList[$this->getUrl(2)] .' supprimé' : self::$i18nList[$this->getUrl(2)] . ' n\'existe pas.' ;
|
||||
$this->addOutput([
|
||||
'notification' => $notification,
|
||||
'redirect' => helper::baseUrl() . 'i18n',
|
||||
'state' => $success
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Traitement du changement de langues
|
||||
*/
|
||||
public function lang() {
|
||||
if ( isset($_POST)) {
|
||||
// Clic dans le menu par l'utilisateur
|
||||
if (strlen(array_keys($_POST)[0]) === 4) {
|
||||
$lan = substr(array_keys($_POST)[0],0,2);
|
||||
// Clic dans le menu de la barre d'administration
|
||||
} elseif ( isset($_POST['i18nSelect'])) {
|
||||
$lan = $_POST['i18nSelect'];
|
||||
}
|
||||
}
|
||||
// Traitement du changement de langue
|
||||
if (isset($lan)) {
|
||||
$this->seti18n($lan);
|
||||
// Valeurs en sortie sans post
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl(false),
|
||||
'state' => true
|
||||
]);
|
||||
} else {
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl(false)
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
BIN
core/module/i18n/ressource/googtrans.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
6
core/module/i18n/ressource/help.css
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
body {
|
||||
color: black;
|
||||
background-color: white;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
31
core/module/i18n/ressource/help.html
Normal file
@ -0,0 +1,31 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="help.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Aide à la gestion des langues</h1>
|
||||
<h2>1- Installer une langue disponible</h2>
|
||||
<p>L'installation d'une nouvelle langue provoque la création d'une nouveau jeu de pages.</p>
|
||||
<p>Deux possibilités sont proposées :</p>
|
||||
<ol>
|
||||
<li>Commencez par choisir une langue. A ce stade, votre nouveau site ne comprendra que la page d'accueil. Vous aurez à créer de nouvelles pages et à les traduire.</li>
|
||||
<li>Pour vous éviter un fastidieux travail de mise en page, vous avez la possibilité de dupliquer un jeu de pages existant, il restera à traduire les textes dans la nouvelle langue.</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h2>2 - Installation d'une langue non prévue et de son drapeau :</h2>
|
||||
<ol>
|
||||
<li>Soit la langue est disponible dans la liste prédéfinie, il suffit alors de supprimer les commentaires représentés par des barres obliques (//)</li>
|
||||
<li>Soit la langue n'est pas disponible, complétez le tableau en ajoutant</li>
|
||||
<ol>
|
||||
<p>Téléchargez sur le forum (rubrique téléchargement) une archive contenant une structure de données.</p>
|
||||
<p>Copiez et décompressez cette archive à la racine de votre stockage dans le gestionnaire de fichiers</p>
|
||||
<p>Un dossier i18n est créé, elle contient un fichier i18n.json, un dossier avec des drapeaux. Des langues supplémentaires sont proposées vous pouvez les modifier :</p>
|
||||
<li>Le code iso sur deux caractères en vous référant à cette page https://fr.wikipedia.org/wiki/Liste_des_codes_ISO_639-1 </li>
|
||||
<li>Le nom de la langue en texte en clair, le rappel du code iso est facultatif. Le dernier élément de la liste ne doit pas se terminer par une virgule.</li>
|
||||
<li>Enfin, créez dans le dossier des drapeaux celui de la langue au format png avec les dimensions 30 pixels de large pour 20 pixels de haut. Le nom de l'image en minuscules correspond au code iso de la langue.</li>
|
||||
<li>Sans l'image du drapeau, la langue n'est pas affichée.</li>
|
||||
</ol>
|
||||
</ol>
|
||||
</ol>
|
||||
</body>
|
||||
</html>
|
4
core/module/i18n/ressource/module.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"module": {
|
||||
}
|
||||
}
|
29
core/module/i18n/ressource/page.json
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"page": {
|
||||
"home": {
|
||||
"typeMenu": "text",
|
||||
"iconUrl": "",
|
||||
"disable": false,
|
||||
"content": "<h3>Welcome to ZwiiCMS!</h3><h3>Willkommen bei ZwiiCMS</h3><h3>Bienvenido a ZwiiCMS</h3>",
|
||||
"hideTitle": false,
|
||||
"breadCrumb": false,
|
||||
"metaDescription": "",
|
||||
"metaTitle": "",
|
||||
"moduleId": "",
|
||||
"modulePosition": "bottom",
|
||||
"parentPageId": "",
|
||||
"position": 1,
|
||||
"group": 0,
|
||||
"targetBlank": false,
|
||||
"title": "Home Page",
|
||||
"block": "12",
|
||||
"barLeft": "",
|
||||
"barRight": "",
|
||||
"displayMenu": "none",
|
||||
"hideMenuSide": false,
|
||||
"hideMenuHead": false,
|
||||
"hideMenuChildren": false,
|
||||
"homePageId": true
|
||||
}
|
||||
}
|
||||
}
|
21
core/module/i18n/view/index/index.js.php
Normal file
@ -0,0 +1,21 @@
|
||||
/**
|
||||
* 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 Frédéric Tempez <frederic.tempez@outlook.com>
|
||||
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
|
||||
* @license GNU General Public License, version 3
|
||||
* @link http://zwiicms.com/
|
||||
*/
|
||||
|
||||
/**
|
||||
* Confirmation de suppression
|
||||
*/
|
||||
$(".i18nDelete").on("click", function() {
|
||||
var _this = $(this);
|
||||
return core.confirm("Êtes-vous sûr de vouloir supprimer cette langue et le site correspondant ?", function() {
|
||||
$(location).attr("href", _this.attr("href"));
|
||||
});
|
||||
});
|
50
core/module/i18n/view/index/index.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php echo template::formOpen('i18nIndexForm'); ?>
|
||||
<div class="notranslate">
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('i18nBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl(false),
|
||||
'ico' => 'home',
|
||||
'value' => 'Accueil'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset8">
|
||||
<?php echo template::submit('galleryEditSubmit'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Ajouter une langue <a href="./core/module/i18n/ressource/help.html" data-lity data-tippy-content="Aide en ligne"<?php echo template::ico('help'); ?></a></h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="row">
|
||||
<?php
|
||||
$available = array ('' => 'Sélectionner');
|
||||
$available = array_merge ($available, array_diff(self::$i18nList,$this->i18nInstalled()));
|
||||
echo template::select('i18nLanguageAdd', $available, [
|
||||
'label' => 'Nouvelle langue'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::select('i18nLanguageCopyFrom', $this->i18nInstalled(true), [
|
||||
'label' => 'Site à dupliquer',
|
||||
'selected' => -1
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php echo template::checkbox('i18AutoTranslation', true, 'Traduction automatique par '); ?>
|
||||
<a href="//policies.google.com/terms#toc-content" data-lity><img src="core/module/i18n/ressource/googtrans.png" /></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo template::table([5,2,2,1], $module::$languages, ['Langues installées', 'Chemins des drapeaux', 'Traduction automatique' ,'']); ?>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
@ -12,6 +12,7 @@
|
||||
* @link http://zwiicms.com/
|
||||
*/
|
||||
|
||||
|
||||
class install extends common {
|
||||
|
||||
public static $actions = [
|
||||
@ -33,13 +34,14 @@ class install extends common {
|
||||
if($this->getData(['user']) !== []) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
'access' => false
|
||||
]);
|
||||
}
|
||||
// Accès autorisé
|
||||
else {
|
||||
// Soumission du formulaire
|
||||
if($this->isPost()) {
|
||||
//$sent = $success = false;
|
||||
// Double vérification pour le mot de passe
|
||||
if($this->getInput('installPassword', helper::FILTER_STRING_SHORT, true) !== $this->getInput('installConfirmPassword', helper::FILTER_STRING_SHORT, true)) {
|
||||
self::$inputNotices['installConfirmPassword'] = 'Incorrect';
|
||||
@ -50,35 +52,15 @@ class install extends common {
|
||||
$userMail = $this->getInput('installMail', helper::FILTER_MAIL, true);
|
||||
$userId = $this->getInput('installId', helper::FILTER_ID, true);
|
||||
// Configure certaines données par défaut
|
||||
if ($this->getInput('installDefaultData',helper::FILTER_BOOLEAN) === FALSE) {
|
||||
foreach($this->getHierarchy(null, false) as $parentPageId => $childrenPageIds) {
|
||||
if ( $parentPageId !== 'accueil') {
|
||||
if ($this->getdata(['page',$parentPageId,'moduleId'])) {
|
||||
$this->deleteData(['page',$parentPageId]);
|
||||
}
|
||||
}
|
||||
foreach($childrenPageIds as $childKey) {
|
||||
$this->deleteData(['page', $childKey]);
|
||||
}
|
||||
}
|
||||
// Effacer les barres
|
||||
$this->deleteData(['page', 'barre']);
|
||||
$this->deleteData(['page', 'barrelateraleavecmenu']);
|
||||
// Effacer les modules
|
||||
$this->deleteData(['module']);
|
||||
// Ajouter ici la liste des pages privées qui ne sont pas vues lors de l'installation.
|
||||
$this->deleteData(['page', 'privee']);
|
||||
// Effacer les fichiers par défaut
|
||||
if (is_dir(self::FILE_DIR.'source/galerie')) {
|
||||
$this->removeAll(self::FILE_DIR.'source/galerie');
|
||||
$this->removeAll(self::FILE_DIR.'thumb/galerie');
|
||||
}
|
||||
if ($this->getInput('installDefaultData',helper::FILTER_BOOLEAN) === TRUE) {
|
||||
$this->initData('page','fr',true);
|
||||
$this->initData('module','fr',true);
|
||||
} else {
|
||||
$this->setData(['module', 'blog', 'mon-premier-article', 'userId', $userId]);
|
||||
$this->setData(['module', 'blog', 'mon-deuxieme-article', 'userId', $userId]);
|
||||
$this->setData(['module', 'blog', 'mon-troisieme-article', 'userId', $userId]);
|
||||
}
|
||||
$this->setData([
|
||||
$success = $this->setData([
|
||||
'user',
|
||||
$userId,
|
||||
[
|
||||
@ -89,28 +71,32 @@ class install extends common {
|
||||
'mail' => $userMail,
|
||||
'password' => $this->getInput('installPassword', helper::FILTER_PASSWORD, true)
|
||||
]
|
||||
]);
|
||||
// Envoie le mail
|
||||
$sent = $this->sendMail(
|
||||
$userMail,
|
||||
'Installation de votre site',
|
||||
'Bonjour' . ' <strong>' . $userFirstname . ' ' . $userLastname . '</strong>,<br><br>' .
|
||||
'Voici les détails de votre installation.<br><br>' .
|
||||
'<strong>URL du site :</strong> <a href="' . helper::baseUrl(false) . '" target="_blank">' . helper::baseUrl(false) . '</a><br>' .
|
||||
'<strong>Identifiant du compte :</strong> ' . $this->getInput('installId') . '<br>'
|
||||
);
|
||||
// Générer un fichier robots.txt
|
||||
$this->createRobots();
|
||||
// Créer sitemap
|
||||
$this->createSitemap('all');
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl(false),
|
||||
'notification' => ($sent === true ? 'Installation terminée' : $sent),
|
||||
'state' => ($sent === true ? true : null)
|
||||
]);
|
||||
if ($success === true) { // Formulaire complété envoi du mail
|
||||
// Envoie le mail
|
||||
$sent = $this->sendMail(
|
||||
$userMail,
|
||||
'Installation de votre site',
|
||||
'Bonjour' . ' <strong>' . $userFirstname . ' ' . $userLastname . '</strong>,<br><br>' .
|
||||
'Voici les détails de votre installation.<br><br>' .
|
||||
'<strong>URL du site :</strong> <a href="' . helper::baseUrl(false) . '" target="_blank">' . helper::baseUrl(false) . '</a><br>' .
|
||||
'<strong>Identifiant du compte :</strong> ' . $this->getInput('installId') . '<br>'
|
||||
);
|
||||
// Stocker le dossier d'installation
|
||||
$this->setData(['core', 'baseUrl', helper::baseUrl(false,false) ]);
|
||||
// Générer un fichier robots.txt
|
||||
$this->createRobots();
|
||||
// Créer sitemap
|
||||
$this->createSitemap();
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl(false),
|
||||
'notification' => ($sent === true ? 'Installation terminée' : $sent),
|
||||
'state' => ($sent === true ? true : null)
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'display' => self::DISPLAY_LAYOUT_LIGHT,
|
||||
|
@ -1,15 +1,13 @@
|
||||
<?php
|
||||
class install extends common {
|
||||
class init extends common {
|
||||
|
||||
public static $defaultData = [
|
||||
public static $defaultData = [
|
||||
'config' => [
|
||||
'analyticsId' => '',
|
||||
'autoBackup' => true,
|
||||
'cookieConsent' => true,
|
||||
'favicon' => 'favicon.ico',
|
||||
'homePageId' => 'accueil',
|
||||
'maintenance' => false,
|
||||
'metaDescription' => 'Zwii est un CMS sans base de données qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.',
|
||||
'maintenance' => false,
|
||||
'social' => [
|
||||
'facebookId' => 'facebook',
|
||||
'instagramId' => '',
|
||||
@ -19,26 +17,35 @@ class install extends common {
|
||||
'githubId' => ''
|
||||
],
|
||||
'timezone' => 'Europe/Paris',
|
||||
'title' => 'Zwii, votre site en quelques clics !',
|
||||
'itemsperPage' => 10,
|
||||
'legalPageId' => ''
|
||||
'legalPageId' => '',
|
||||
'metaDescription' => 'Zwii est un CMS sans base de données qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.',
|
||||
'title' => 'Zwii, votre site en quelques clics !',
|
||||
'disablei18n' => false,
|
||||
'i18n' => [
|
||||
'fr' => [
|
||||
'flagFolder' => "core/vendor/i18n/png/",
|
||||
'autoTranslate' => false
|
||||
]
|
||||
]
|
||||
],
|
||||
'core' => [
|
||||
'dataVersion' => 0,
|
||||
'dataVersion' => 10000,
|
||||
'lastBackup' => 0,
|
||||
'lastClearTmp' => 0,
|
||||
'baseUrl' => ''
|
||||
],
|
||||
'page' => [
|
||||
'page' => [
|
||||
'accueil' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => '<h3>Bienvenue sur votre nouveau site Zwii !</h3>
|
||||
<p><strong>Un email contenant le récapitulatif de votre installation vient de vous être envoyé.</strong></p>
|
||||
<p>Connectez-vous dès maintenant à votre espace membre afin de créer un site à votre image ! Vous pourrez personnaliser le thème, créer des pages, ajouter des utilisateurs et bien plus encore !</p>
|
||||
<p>Si vous avez besoin d\'aide ou si vous cherchez des informations sur Zwii, n\'hésitez pas à jeter un œil à notre <a title="Forum" href="https://forum.zwiicms.com/">forum</a>.</p>',
|
||||
'hideTitle' => false,
|
||||
'homePageId' => true,
|
||||
'breadCrumb' => false,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
@ -55,357 +62,9 @@ class install extends common {
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
'enfant' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => '<p>Vous pouvez assigner des parents à vos pages afin de mieux organiser votre menu !</p>
|
||||
<div class="row">
|
||||
<div class="col4"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.</p></div>
|
||||
<div class="col4"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.</p></div>
|
||||
<div class="col4"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.</p></div>
|
||||
</div>',
|
||||
'hideTitle' => false,
|
||||
'breadCrumb' => true,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => '',
|
||||
'modulePosition' => 'bottom',
|
||||
'parentPageId' => 'accueil',
|
||||
'position' => 1,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Enfant',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
'privee' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => '<p>Cette page n\'est visible que des membres de votre site !</p>
|
||||
<div class="row">
|
||||
<div class="col6"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.</p></div>
|
||||
<div class="col6"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.</p></div>
|
||||
</div>',
|
||||
'hideTitle' => false,
|
||||
'breadCrumb' => true,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => '',
|
||||
'parentPageId' => '',
|
||||
'modulePosition' => 'bottom',
|
||||
'position' => 2,
|
||||
'group' => self::GROUP_MEMBER,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Privée',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
'mise-en-page' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => '<p>Vous pouvez ajouter une ou deux barres latérales aux pages de votre site. Cette mise en page se définit dans les paramètres de page et peut s\'appliquer à l\'ensemble du site ou à certaines pages en particulier, au gré de vos désirs.</p>
|
||||
<p>Pour créer une barre latérale à partir d\'une "Nouvelle page" ou transformer une page existante en barre latérale, sélectionnez l\'option dans la liste des gabarits. On peut bien sûr définir autant de barres latérales qu\'on le souhaite.</p>
|
||||
<p>Cette nouvelle fonctionnalité autorise toutes sortes d\'utilisations : texte, encadrés, images, vidéos... ou simple marge blanche. Seule restriction : on ne peut pas installer un module dans une barre latérale.</p>
|
||||
<p>La liste des barres disponibles et leur emplacement s\'affichent en fonction du gabarit que vous aurez choisi.',
|
||||
'hideTitle' => false,
|
||||
'breadCrumb' => true,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => '',
|
||||
'parentPageId' => 'accueil',
|
||||
'modulePosition' => 'bottom',
|
||||
'position' => 3,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Mise en page',
|
||||
'block' => '4-8',
|
||||
'barLeft' => 'barre',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
'menu-lateral' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => '<p>Cette page illustre la possibilité d\'ajouter un menu dans les barres latérales.<br>
|
||||
Deux types de menus sont disponibles : l\'un reprenant les rubriques du menu principal comme celui-ci, l\'autre listant les pages d\'une même rubrique. Le choix du type de menu se fait dans la page de configuration d\'une barre latérale.</p>
|
||||
<p>Pour ajouter un menu à une page, choisissez une barre latérale avec menu dans la page de configuration. Les bulles d\'aide de la rubrique "Menu" expliquent comment masquer une page.</p>',
|
||||
'hideTitle' => false,
|
||||
'breadCrumb' => true,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => '',
|
||||
'parentPageId' => 'accueil',
|
||||
'modulePosition' => 'bottom',
|
||||
'position' => 3,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Menu latéral',
|
||||
'block' => '9-3',
|
||||
'barLeft' => '',
|
||||
'barRight' => 'barrelateraleavecmenu',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
'blog' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => '<p>Cette page contient une instance du module de blog. Cliquez sur un article afin de le lire et de poster des commentaires.</p>',
|
||||
'hideTitle' => false,
|
||||
'breadCrumb' => false,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => 'blog',
|
||||
'modulePosition' => 'bottom',
|
||||
'parentPageId' => '',
|
||||
'position' => 4,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Blog',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
'galeries' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => '<p>Cette page contient une instance du module de galeries photos. Cliquez sur la galerie ci-dessous afin de voir les photos qu\'elle contient.</p>',
|
||||
'hideTitle' => false,
|
||||
'breadCrumb' => false,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => 'gallery',
|
||||
'modulePosition' => 'bottom',
|
||||
'parentPageId' => '',
|
||||
'position' => 5,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Galeries',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
'site-de-zwii' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => "",
|
||||
'hideTitle' => false,
|
||||
'breadCrumb' => false,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => 'redirection',
|
||||
'modulePosition' => 'bottom',
|
||||
'parentPageId' => '',
|
||||
'position' => 6,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => true,
|
||||
'title' => 'Site de Zwii',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
'contact' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => '<p>Cette page contient un exemple de formulaire conçu à partir du module de génération de formulaires. Il est configuré pour envoyer les données saisies par mail aux administrateurs du site.</p>',
|
||||
'hideTitle' => false,
|
||||
'breadCrumb' => false,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => 'form',
|
||||
'modulePosition' => 'bottom',
|
||||
'parentPageId' => '',
|
||||
'position' => 7,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Contact',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
'barre' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => '<div class="block"><h4>ZwiiCMS</h4><h3>Le CMS sans base de données à l\'installation simple et rapide</h3></div>',
|
||||
'hideTitle' => false,
|
||||
'breadCrumb' => false,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => '',
|
||||
'modulePosition' => 'bottom',
|
||||
'parentPageId' => '',
|
||||
'position' => 0 ,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Barre latérale',
|
||||
'block' => 'bar',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => "none",
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
'barrelateraleavecmenu' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => '<p> </p>',
|
||||
'hideTitle' => false,
|
||||
'breadCrumb' => false,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => '',
|
||||
'modulePosition' => 'bottom',
|
||||
'parentPageId' => '',
|
||||
'position' => 0 ,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Barre latérale avec menu',
|
||||
'block' => 'bar',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => "parents",
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
],
|
||||
'module' => [
|
||||
'blog' => [
|
||||
'mon-premier-article' => [
|
||||
'closeComment' => false,
|
||||
'comment' => [
|
||||
'58e11d09e5aff' => [
|
||||
'author' => 'Rémi',
|
||||
'content' => 'Article bien rédigé et très pertinent, bravo !',
|
||||
'createdOn' => 1421748000,
|
||||
'userId' => ''
|
||||
]
|
||||
],
|
||||
'content' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In a placerat metus. Morbi luctus laoreet dolor et euismod. Phasellus eget eros ac eros pretium tincidunt. Sed maximus magna lectus, non vestibulum sapien pretium maximus. Donec convallis leo tortor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras convallis lacus eu risus gravida varius. Etiam mattis massa vitae eros placerat bibendum.</p><p>Vivamus tempus magna augue, in bibendum quam blandit at. Morbi felis tortor, suscipit ut ipsum ut, volutpat consectetur orci. Nulla tincidunt quis ligula non viverra. Sed pretium dictum blandit. Donec fringilla, nunc at dictum pretium, arcu massa viverra leo, et porta turpis ipsum eget risus. Quisque quis maximus purus, in elementum arcu. Donec nisi orci, aliquam non luctus non, congue volutpat massa. Curabitur sed risus congue, porta arcu vel, tincidunt nisi. Duis tincidunt quam ut velit maximus ornare. Nullam sagittis, ante quis pharetra hendrerit, lorem massa dapibus mi, a hendrerit dolor odio nec augue. Nunc sem nisl, tincidunt vitae nunc et, viverra tristique diam. In eget dignissim lectus. Nullam volutpat lacus id ex dapibus viverra. Pellentesque ultricies lorem ut nunc elementum volutpat. Cras id ultrices justo.</p><p>Phasellus nec erat leo. Praesent at sem nunc. Vestibulum quis condimentum turpis. Cras semper diam vitae enim fringilla, ut fringilla mauris efficitur. In nec porttitor urna. Nam eros leo, vehicula eget lobortis sed, gravida id mauris. Nulla bibendum nunc tortor, non bibendum justo consectetur vel. Phasellus nec risus diam. In commodo tellus nec nulla fringilla, nec feugiat nunc consectetur. Etiam non eros sodales, sodales lacus vel, finibus leo. Quisque hendrerit tristique congue. Phasellus nec augue vitae libero elementum facilisis. Mauris pretium ornare nisi, non scelerisque velit consectetur sit amet.</p>',
|
||||
'picture' => 'galerie/landscape/meadow.jpg',
|
||||
'hidePicture' => false,
|
||||
'publishedOn' => 1548790902,
|
||||
'state' => true,
|
||||
'title' => 'Mon premier article',
|
||||
'userId' => '' // Géré au moment de l'installation
|
||||
],
|
||||
'mon-deuxieme-article' => [
|
||||
'closeComment' => false,
|
||||
'comment' => [],
|
||||
'content' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam lobortis eros pharetra metus rutrum pretium et sagittis mauris. Donec commodo venenatis sem nec suscipit. In tempor sollicitudin scelerisque. Etiam quis nibh eleifend, congue nisl quis, ultricies ipsum. Integer at est a eros vulputate pellentesque eu vitae tellus. Nullam suscipit quam nisl. Vivamus dui odio, luctus ac fringilla ultrices, eleifend vel sapien. Integer sem ex, lobortis eu mattis eu, condimentum non libero. Aliquam non porttitor elit, eu hendrerit neque. Praesent tortor urna, tincidunt sed dictum id, rutrum tempus sapien.</p><p>Donec accumsan ante ac odio laoreet porttitor. Pellentesque et leo a leo scelerisque mattis id vel elit. Quisque egestas congue enim nec semper. Morbi mollis nibh sapien. Nunc quis fringilla lorem. Donec vel venenatis nunc. Donec lectus velit, tempor sit amet dui sed, consequat commodo enim. Nam porttitor neque semper, dapibus nunc bibendum, lobortis urna. Morbi ullamcorper molestie lectus a elementum. Curabitur eu cursus orci, sed tristique justo. In massa lacus, imperdiet eu elit quis, consectetur maximus magna. Integer suscipit varius ante vitae egestas. Morbi scelerisque fermentum ipsum, euismod faucibus mi tincidunt id. Sed at consectetur velit. Ut fermentum nunc nibh, at commodo felis lacinia nec.</p><p>Nullam a justo quis lectus facilisis semper eget quis sem. Morbi suscipit erat sem, non fermentum nunc luctus vel. Proin venenatis quam ut arcu luctus efficitur. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nam sollicitudin tristique nunc nec convallis. Maecenas id tortor semper, tempus nisl laoreet, cursus lacus. Aliquam sagittis est in leo congue, a pharetra felis aliquet. Nulla gravida lobortis sapien, quis viverra enim ullamcorper sed. Donec ultrices sem eu volutpat dapibus. Nam euismod, tellus eu congue mollis, massa nisi finibus odio, vitae porta arcu urna ac lorem. Sed faucibus dignissim pretium. Pellentesque eget ante tellus. Pellentesque a elementum odio, sit amet vulputate diam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In hendrerit consequat dolor, malesuada pellentesque tellus molestie non. Aenean quis purus a lectus pellentesque laoreet.</p>',
|
||||
'picture' => 'galerie/landscape/desert.jpg',
|
||||
'hidePicture' => false,
|
||||
'publishedOn' => 1550432502,
|
||||
'state' => true,
|
||||
'title' => 'Mon deuxième article',
|
||||
'userId' => '' // Géré au moment de l'installation
|
||||
],
|
||||
'mon-troisieme-article' => [
|
||||
'closeComment' => true,
|
||||
'comment' => [],
|
||||
'content' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ut tempus nibh. Cras eget iaculis justo, ac laoreet lacus. Nunc tellus nulla, auctor id hendrerit eu, pellentesque in sapien. In hac habitasse platea dictumst. Aliquam leo urna, hendrerit id nunc eget, finibus maximus dolor. Sed rutrum sapien consectetur, tincidunt nulla at, blandit quam. Duis ex enim, vehicula vel nisi vitae, lobortis volutpat nisl. Vivamus enim libero, euismod nec risus vel, interdum placerat elit. In cursus sapien condimentum dui imperdiet, sed lobortis ante consectetur. Maecenas hendrerit eget felis non consequat.</p><p>Nullam nec risus non velit efficitur tempus eget tincidunt mauris. Etiam venenatis leo id justo sagittis, commodo dignissim sapien tristique. Vivamus finibus augue malesuada sapien gravida rutrum. Integer mattis lectus ac pulvinar scelerisque. Integer suscipit feugiat metus, ac molestie odio suscipit eget. Fusce at elit in tellus venenatis finibus id sit amet magna. Integer sodales luctus neque blandit posuere. Cras pellentesque dictum lorem eget vestibulum. Quisque vitae metus non nisi efficitur rhoncus ut vitae ipsum. Donec accumsan massa at est faucibus lacinia. Quisque imperdiet luctus neque eu vestibulum. Phasellus pellentesque felis ligula, id imperdiet elit ultrices eu.</p>',
|
||||
'picture' => 'galerie/landscape/iceberg.jpg',
|
||||
'hidePicture' => false,
|
||||
'publishedOn' => 1550864502,
|
||||
'state' => true,
|
||||
'title' => 'Mon troisième article',
|
||||
'userId' => '' // Géré au moment de l'installation
|
||||
]
|
||||
],
|
||||
'galeries' => [
|
||||
'beaux-paysages' => [
|
||||
'config' => [
|
||||
'name' => 'Beaux paysages',
|
||||
'directory' => self::FILE_DIR.'source/galerie/landscape'
|
||||
],
|
||||
'legend' => [
|
||||
'desert.jpg' => 'Un désert',
|
||||
'iceberg.jpg' => 'Un iceberg',
|
||||
'meadow.jpg' => 'Une prairie'
|
||||
]
|
||||
],
|
||||
'espace' => [
|
||||
'config' => [
|
||||
'name' => 'Espace',
|
||||
'directory' => self::FILE_DIR.'source/galerie/space'
|
||||
],
|
||||
'legend' => [
|
||||
'earth.jpg' => 'La Terre et la Lune',
|
||||
'cosmos.jpg' => 'Le cosmos',
|
||||
'nebula.jpg' => 'Une nébuleuse'
|
||||
]
|
||||
]
|
||||
],
|
||||
'site-de-zwii' => [
|
||||
'url' => 'https://zwiicms.com/',
|
||||
'count' => 0
|
||||
],
|
||||
'contact' => [
|
||||
'config' => [
|
||||
'button' => '',
|
||||
'capcha' => true,
|
||||
'group' => self::GROUP_ADMIN,
|
||||
'pageId' => '',
|
||||
'subject' => ''
|
||||
],
|
||||
'data' => [],
|
||||
'input' => [
|
||||
[
|
||||
'name' => 'Adresse mail',
|
||||
'position' => 1,
|
||||
'required' => true,
|
||||
'type' => 'mail',
|
||||
'values' => ''
|
||||
],
|
||||
[
|
||||
'name' => 'Sujet',
|
||||
'position' => 2,
|
||||
'required' => true,
|
||||
'type' => 'text',
|
||||
'values' => ''
|
||||
],
|
||||
[
|
||||
'name' => 'Message',
|
||||
'position' => 3,
|
||||
'required' => true,
|
||||
'type' => 'textarea',
|
||||
'values' => ''
|
||||
]
|
||||
]
|
||||
]
|
||||
],
|
||||
'module' => [],
|
||||
'user' => [],
|
||||
'theme' => [
|
||||
'body' => [
|
||||
@ -473,12 +132,14 @@ class install extends common {
|
||||
'fontWeight' => 'normal',
|
||||
'height' => '15px 10px',
|
||||
'loginLink' => true,
|
||||
'burgerTitle' => true,
|
||||
'margin' => false,
|
||||
'position' => 'site-second',
|
||||
'textAlign' => 'left',
|
||||
'textColor' => 'rgba(255, 255, 255, 1)',
|
||||
'textTransform' => 'none',
|
||||
'fixed' => false
|
||||
'fixed' => false,
|
||||
'i18nPosition' => 'right'
|
||||
],
|
||||
'site' => [
|
||||
'backgroundColor' => 'rgba(255, 255, 255, 1)',
|
||||
@ -500,4 +161,396 @@ class install extends common {
|
||||
'version' => 0,
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
public static $siteData = [
|
||||
'page' => [
|
||||
'accueil' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => '<h3>Bienvenue sur votre nouveau site Zwii !</h3>
|
||||
<p><strong>Un email contenant le récapitulatif de votre installation vient de vous être envoyé.</strong></p>
|
||||
<p>Connectez-vous dès maintenant à votre espace membre afin de créer un site à votre image ! Vous pourrez personnaliser le thème, créer des pages, ajouter des utilisateurs et bien plus encore !</p>
|
||||
<p>Si vous avez besoin d\'aide ou si vous cherchez des informations sur Zwii, n\'hésitez pas à jeter un œil à notre <a title="Forum" href="https://forum.zwiicms.com/">forum</a>.</p>',
|
||||
'hideTitle' => false,
|
||||
'homePageId' => true,
|
||||
'breadCrumb' => false,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => '',
|
||||
'modulePosition' => 'bottom',
|
||||
'parentPageId' => '',
|
||||
'position' => 1,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Accueil',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
'enfant' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => '<p>Vous pouvez assigner des parents à vos pages afin de mieux organiser votre menu !</p>
|
||||
<div class="row">
|
||||
<div class="col4"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.</p></div>
|
||||
<div class="col4"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.</p></div>
|
||||
<div class="col4"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.</p></div>
|
||||
</div>',
|
||||
'hideTitle' => false,
|
||||
'homePageId' => false,
|
||||
'breadCrumb' => true,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => '',
|
||||
'modulePosition' => 'bottom',
|
||||
'parentPageId' => 'accueil',
|
||||
'position' => 1,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Enfant',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
'privee' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => '<p>Cette page n\'est visible que des membres de votre site !</p>
|
||||
<div class="row">
|
||||
<div class="col6"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.</p></div>
|
||||
<div class="col6"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum, neque non vulputate hendrerit, arcu turpis dapibus nisl, id scelerisque metus lectus vitae nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec feugiat dolor et turpis finibus condimentum. Cras sit amet ligula sagittis justo.</p></div>
|
||||
</div>',
|
||||
'hideTitle' => false,
|
||||
'homePageId' => false,
|
||||
'breadCrumb' => true,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => '',
|
||||
'parentPageId' => '',
|
||||
'modulePosition' => 'bottom',
|
||||
'position' => 2,
|
||||
'group' => self::GROUP_MEMBER,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Privée',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
'mise-en-page' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => '<p>Vous pouvez ajouter une ou deux barres latérales aux pages de votre site. Cette mise en page se définit dans les paramètres de page et peut s\'appliquer à l\'ensemble du site ou à certaines pages en particulier, au gré de vos désirs.</p>
|
||||
<p>Pour créer une barre latérale à partir d\'une "Nouvelle page" ou transformer une page existante en barre latérale, sélectionnez l\'option dans la liste des gabarits. On peut bien sûr définir autant de barres latérales qu\'on le souhaite.</p>
|
||||
<p>Cette nouvelle fonctionnalité autorise toutes sortes d\'utilisations : texte, encadrés, images, vidéos... ou simple marge blanche. Seule restriction : on ne peut pas installer un module dans une barre latérale.</p>
|
||||
<p>La liste des barres disponibles et leur emplacement s\'affichent en fonction du gabarit que vous aurez choisi.',
|
||||
'hideTitle' => false,
|
||||
'homePageId' => false,
|
||||
'breadCrumb' => true,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => '',
|
||||
'parentPageId' => 'accueil',
|
||||
'modulePosition' => 'bottom',
|
||||
'position' => 3,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Mise en page',
|
||||
'block' => '4-8',
|
||||
'barLeft' => 'barre',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
'menu-lateral' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => '<p>Cette page illustre la possibilité d\'ajouter un menu dans les barres latérales.<br>
|
||||
Deux types de menus sont disponibles : l\'un reprenant les rubriques du menu principal comme celui-ci, l\'autre listant les pages d\'une même rubrique. Le choix du type de menu se fait dans la page de configuration d\'une barre latérale.</p>
|
||||
<p>Pour ajouter un menu à une page, choisissez une barre latérale avec menu dans la page de configuration. Les bulles d\'aide de la rubrique "Menu" expliquent comment masquer une page.</p>',
|
||||
'hideTitle' => false,
|
||||
'homePageId' => false,
|
||||
'breadCrumb' => true,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => '',
|
||||
'parentPageId' => 'accueil',
|
||||
'modulePosition' => 'bottom',
|
||||
'position' => 3,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Menu latéral',
|
||||
'block' => '9-3',
|
||||
'barLeft' => '',
|
||||
'barRight' => 'barrelateraleavecmenu',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
'blog' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => '<p>Cette page contient une instance du module de blog. Cliquez sur un article afin de le lire et de poster des commentaires.</p>',
|
||||
'hideTitle' => false,
|
||||
'homePageId' => false,
|
||||
'breadCrumb' => false,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => 'blog',
|
||||
'modulePosition' => 'bottom',
|
||||
'parentPageId' => '',
|
||||
'position' => 4,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Blog',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
'galeries' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => '<p>Cette page contient une instance du module de galeries photos. Cliquez sur la galerie ci-dessous afin de voir les photos qu\'elle contient.</p>',
|
||||
'hideTitle' => false,
|
||||
'homePageId' => false,
|
||||
'breadCrumb' => false,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => 'gallery',
|
||||
'modulePosition' => 'bottom',
|
||||
'parentPageId' => '',
|
||||
'position' => 5,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Galeries',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
'site-de-zwii' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => "",
|
||||
'hideTitle' => false,
|
||||
'homePageId' => false,
|
||||
'breadCrumb' => false,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => 'redirection',
|
||||
'modulePosition' => 'bottom',
|
||||
'parentPageId' => '',
|
||||
'position' => 6,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => true,
|
||||
'title' => 'Site de Zwii',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
'contact' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => '<p>Cette page contient un exemple de formulaire conçu à partir du module de génération de formulaires. Il est configuré pour envoyer les données saisies par mail aux administrateurs du site.</p>',
|
||||
'hideTitle' => false,
|
||||
'homePageId' => false,
|
||||
'breadCrumb' => false,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => 'form',
|
||||
'modulePosition' => 'bottom',
|
||||
'parentPageId' => '',
|
||||
'position' => 7,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Contact',
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
'barre' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => '<div class="block"><h4>ZwiiCMS</h4><h3>Le CMS sans base de données à l\'installation simple et rapide</h3></div>',
|
||||
'hideTitle' => false,
|
||||
'homePageId' => false,
|
||||
'breadCrumb' => false,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => '',
|
||||
'modulePosition' => 'bottom',
|
||||
'parentPageId' => '',
|
||||
'position' => 0 ,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Barre latérale',
|
||||
'block' => 'bar',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => "none",
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
'barrelateraleavecmenu' => [
|
||||
'typeMenu' => 'text',
|
||||
'iconUrl' => '',
|
||||
'disable' => false,
|
||||
'content' => '<p> </p>',
|
||||
'hideTitle' => false,
|
||||
'homePageId' => false,
|
||||
'breadCrumb' => false,
|
||||
'metaDescription' => '',
|
||||
'metaTitle' => '',
|
||||
'moduleId' => '',
|
||||
'modulePosition' => 'bottom',
|
||||
'parentPageId' => '',
|
||||
'position' => 0 ,
|
||||
'group' => self::GROUP_VISITOR,
|
||||
'targetBlank' => false,
|
||||
'title' => 'Barre latérale avec menu',
|
||||
'block' => 'bar',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => "parents",
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuChildren' =>false
|
||||
],
|
||||
],
|
||||
'module' => [
|
||||
'blog' => [
|
||||
'mon-premier-article' => [
|
||||
'closeComment' => false,
|
||||
'comment' => [
|
||||
'58e11d09e5aff' => [
|
||||
'author' => 'Rémi',
|
||||
'content' => 'Article bien rédigé et très pertinent, bravo !',
|
||||
'createdOn' => 1421748000,
|
||||
'userId' => ''
|
||||
]
|
||||
],
|
||||
'content' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In a placerat metus. Morbi luctus laoreet dolor et euismod. Phasellus eget eros ac eros pretium tincidunt. Sed maximus magna lectus, non vestibulum sapien pretium maximus. Donec convallis leo tortor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras convallis lacus eu risus gravida varius. Etiam mattis massa vitae eros placerat bibendum.</p><p>Vivamus tempus magna augue, in bibendum quam blandit at. Morbi felis tortor, suscipit ut ipsum ut, volutpat consectetur orci. Nulla tincidunt quis ligula non viverra. Sed pretium dictum blandit. Donec fringilla, nunc at dictum pretium, arcu massa viverra leo, et porta turpis ipsum eget risus. Quisque quis maximus purus, in elementum arcu. Donec nisi orci, aliquam non luctus non, congue volutpat massa. Curabitur sed risus congue, porta arcu vel, tincidunt nisi. Duis tincidunt quam ut velit maximus ornare. Nullam sagittis, ante quis pharetra hendrerit, lorem massa dapibus mi, a hendrerit dolor odio nec augue. Nunc sem nisl, tincidunt vitae nunc et, viverra tristique diam. In eget dignissim lectus. Nullam volutpat lacus id ex dapibus viverra. Pellentesque ultricies lorem ut nunc elementum volutpat. Cras id ultrices justo.</p><p>Phasellus nec erat leo. Praesent at sem nunc. Vestibulum quis condimentum turpis. Cras semper diam vitae enim fringilla, ut fringilla mauris efficitur. In nec porttitor urna. Nam eros leo, vehicula eget lobortis sed, gravida id mauris. Nulla bibendum nunc tortor, non bibendum justo consectetur vel. Phasellus nec risus diam. In commodo tellus nec nulla fringilla, nec feugiat nunc consectetur. Etiam non eros sodales, sodales lacus vel, finibus leo. Quisque hendrerit tristique congue. Phasellus nec augue vitae libero elementum facilisis. Mauris pretium ornare nisi, non scelerisque velit consectetur sit amet.</p>',
|
||||
'picture' => 'galerie/landscape/meadow.jpg',
|
||||
'hidePicture' => false,
|
||||
'publishedOn' => 1548790902,
|
||||
'state' => true,
|
||||
'title' => 'Mon premier article',
|
||||
'userId' => '' // Géré au moment de l'installation
|
||||
],
|
||||
'mon-deuxieme-article' => [
|
||||
'closeComment' => false,
|
||||
'comment' => [],
|
||||
'content' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam lobortis eros pharetra metus rutrum pretium et sagittis mauris. Donec commodo venenatis sem nec suscipit. In tempor sollicitudin scelerisque. Etiam quis nibh eleifend, congue nisl quis, ultricies ipsum. Integer at est a eros vulputate pellentesque eu vitae tellus. Nullam suscipit quam nisl. Vivamus dui odio, luctus ac fringilla ultrices, eleifend vel sapien. Integer sem ex, lobortis eu mattis eu, condimentum non libero. Aliquam non porttitor elit, eu hendrerit neque. Praesent tortor urna, tincidunt sed dictum id, rutrum tempus sapien.</p><p>Donec accumsan ante ac odio laoreet porttitor. Pellentesque et leo a leo scelerisque mattis id vel elit. Quisque egestas congue enim nec semper. Morbi mollis nibh sapien. Nunc quis fringilla lorem. Donec vel venenatis nunc. Donec lectus velit, tempor sit amet dui sed, consequat commodo enim. Nam porttitor neque semper, dapibus nunc bibendum, lobortis urna. Morbi ullamcorper molestie lectus a elementum. Curabitur eu cursus orci, sed tristique justo. In massa lacus, imperdiet eu elit quis, consectetur maximus magna. Integer suscipit varius ante vitae egestas. Morbi scelerisque fermentum ipsum, euismod faucibus mi tincidunt id. Sed at consectetur velit. Ut fermentum nunc nibh, at commodo felis lacinia nec.</p><p>Nullam a justo quis lectus facilisis semper eget quis sem. Morbi suscipit erat sem, non fermentum nunc luctus vel. Proin venenatis quam ut arcu luctus efficitur. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nam sollicitudin tristique nunc nec convallis. Maecenas id tortor semper, tempus nisl laoreet, cursus lacus. Aliquam sagittis est in leo congue, a pharetra felis aliquet. Nulla gravida lobortis sapien, quis viverra enim ullamcorper sed. Donec ultrices sem eu volutpat dapibus. Nam euismod, tellus eu congue mollis, massa nisi finibus odio, vitae porta arcu urna ac lorem. Sed faucibus dignissim pretium. Pellentesque eget ante tellus. Pellentesque a elementum odio, sit amet vulputate diam. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In hendrerit consequat dolor, malesuada pellentesque tellus molestie non. Aenean quis purus a lectus pellentesque laoreet.</p>',
|
||||
'picture' => 'galerie/landscape/desert.jpg',
|
||||
'hidePicture' => false,
|
||||
'publishedOn' => 1550432502,
|
||||
'state' => true,
|
||||
'title' => 'Mon deuxième article',
|
||||
'userId' => '' // Géré au moment de l'installation
|
||||
],
|
||||
'mon-troisieme-article' => [
|
||||
'closeComment' => true,
|
||||
'comment' => [],
|
||||
'content' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ut tempus nibh. Cras eget iaculis justo, ac laoreet lacus. Nunc tellus nulla, auctor id hendrerit eu, pellentesque in sapien. In hac habitasse platea dictumst. Aliquam leo urna, hendrerit id nunc eget, finibus maximus dolor. Sed rutrum sapien consectetur, tincidunt nulla at, blandit quam. Duis ex enim, vehicula vel nisi vitae, lobortis volutpat nisl. Vivamus enim libero, euismod nec risus vel, interdum placerat elit. In cursus sapien condimentum dui imperdiet, sed lobortis ante consectetur. Maecenas hendrerit eget felis non consequat.</p><p>Nullam nec risus non velit efficitur tempus eget tincidunt mauris. Etiam venenatis leo id justo sagittis, commodo dignissim sapien tristique. Vivamus finibus augue malesuada sapien gravida rutrum. Integer mattis lectus ac pulvinar scelerisque. Integer suscipit feugiat metus, ac molestie odio suscipit eget. Fusce at elit in tellus venenatis finibus id sit amet magna. Integer sodales luctus neque blandit posuere. Cras pellentesque dictum lorem eget vestibulum. Quisque vitae metus non nisi efficitur rhoncus ut vitae ipsum. Donec accumsan massa at est faucibus lacinia. Quisque imperdiet luctus neque eu vestibulum. Phasellus pellentesque felis ligula, id imperdiet elit ultrices eu.</p>',
|
||||
'picture' => 'galerie/landscape/iceberg.jpg',
|
||||
'hidePicture' => false,
|
||||
'publishedOn' => 1550864502,
|
||||
'state' => true,
|
||||
'title' => 'Mon troisième article',
|
||||
'userId' => '' // Géré au moment de l'installation
|
||||
]
|
||||
],
|
||||
'galeries' => [
|
||||
'beaux-paysages' => [
|
||||
'config' => [
|
||||
'name' => 'Beaux paysages',
|
||||
'directory' => self::FILE_DIR.'source/galerie/landscape'
|
||||
],
|
||||
'legend' => [
|
||||
'desertjpg' => 'Un désert',
|
||||
'icebergjpg' => 'Un iceberg',
|
||||
'meadowjpg' => 'Une prairie'
|
||||
]
|
||||
],
|
||||
'espace' => [
|
||||
'config' => [
|
||||
'name' => 'Espace',
|
||||
'directory' => self::FILE_DIR.'source/galerie/space'
|
||||
],
|
||||
'legend' => [
|
||||
'earthjpg' => 'La Terre et la Lune',
|
||||
'cosmosjpg' => 'Le cosmos',
|
||||
'nebulajpg' => 'Une nébuleuse'
|
||||
]
|
||||
]
|
||||
],
|
||||
'site-de-zwii' => [
|
||||
'url' => 'https://zwiicms.com/',
|
||||
'count' => 0
|
||||
],
|
||||
'contact' => [
|
||||
'config' => [
|
||||
'button' => '',
|
||||
'capcha' => true,
|
||||
'group' => self::GROUP_ADMIN,
|
||||
'pageId' => '',
|
||||
'subject' => ''
|
||||
],
|
||||
'data' => [],
|
||||
'input' => [
|
||||
[
|
||||
'name' => 'Adresse mail',
|
||||
'position' => 1,
|
||||
'required' => true,
|
||||
'type' => 'mail',
|
||||
'values' => ''
|
||||
],
|
||||
[
|
||||
'name' => 'Sujet',
|
||||
'position' => 2,
|
||||
'required' => true,
|
||||
'type' => 'text',
|
||||
'values' => ''
|
||||
],
|
||||
[
|
||||
'name' => 'Message',
|
||||
'position' => 3,
|
||||
'required' => true,
|
||||
'type' => 'textarea',
|
||||
'values' => ''
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
<p><strong>Mise à jour de Zwii <?php echo self::ZWII_VERSION; ?> vers Zwii <?php echo $module::$newVersion; ?>.</strong></p>
|
||||
<p>Afin d'assurer le bon fonctionnement de Zwii, veuillez ne pas fermer cette page avant la fin de l'opération.</p>
|
||||
<div class="row">
|
||||
<div class="row notranslate">
|
||||
<div class="col9 verticalAlignMiddle">
|
||||
<div id="installUpdateProgress">
|
||||
<?php echo template::ico('spin', '', true); ?>
|
||||
|
@ -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-2019, Frédéric Tempez
|
||||
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
|
||||
* @license GNU General Public License, version 3
|
||||
* @link http://zwiicms.com/
|
||||
*/
|
||||
@ -85,14 +85,14 @@ class page extends common {
|
||||
'block' => '12',
|
||||
'barLeft' => '',
|
||||
'barRight' => '',
|
||||
'displayMenu' => '0',
|
||||
'displayMenu' => 'none',
|
||||
'hideMenuSide' => false,
|
||||
'hideMenuHead' => false,
|
||||
'hideMenuChildren' => false
|
||||
]
|
||||
]);
|
||||
// Met à jour le site map
|
||||
$this->createSitemap('all');
|
||||
$this->createSitemap();
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . $pageId,
|
||||
@ -148,7 +148,7 @@ class page extends common {
|
||||
// Suppression
|
||||
else {
|
||||
// Met à jour le site map
|
||||
$this->createSitemap('all');
|
||||
$this->createSitemap();
|
||||
// Effacer la page
|
||||
$this->deleteData(['page', $url[0]]);
|
||||
$this->deleteData(['module', $url[0]]);
|
||||
@ -196,9 +196,9 @@ class page extends common {
|
||||
$this->setData(['module', $pageId, $this->getData(['module', $this->getUrl(2)])]);
|
||||
$this->deleteData(['module', $this->getUrl(2)]);
|
||||
// Si la page correspond à la page d'accueil, change l'id dans la configuration du site
|
||||
if($this->getData(['config', 'homePageId']) === $this->getUrl(2)) {
|
||||
$this->setData(['config', 'homePageId', $pageId]);
|
||||
}
|
||||
//if($this->getData(['config', 'homePageId']) === $this->getUrl(2)) {
|
||||
// $this->setData(['config', 'homePageId', $pageId]);
|
||||
//}
|
||||
}
|
||||
// Supprime les données du module en cas de changement de module
|
||||
if($this->getInput('pageEditModuleId') !== $this->getData(['page', $this->getUrl(2), 'moduleId'])) {
|
||||
@ -239,6 +239,16 @@ class page extends common {
|
||||
$position = 0;
|
||||
$hideTitle = true;
|
||||
}
|
||||
// Contrôle de la HomePage
|
||||
|
||||
// Gestion de la Page d'accueil
|
||||
if ($this->getinput('pageHomePageId', helper::FILTER_BOOLEAN) === true ) {
|
||||
// Effacer l'ancienne hompage
|
||||
$this->setData(['page',$this->getHomePageId(),'homePageId',false]);
|
||||
// Positionner la nouvelle homepage
|
||||
$this->setData(['page',$pageId,'homePageId',true]);
|
||||
}
|
||||
|
||||
// Modifie la page ou en crée une nouvelle si l'id a changé
|
||||
$this->setData([
|
||||
'page',
|
||||
@ -266,8 +276,11 @@ class page extends common {
|
||||
'hideMenuSide' => $this->getinput('pageEditHideMenuSide', helper::FILTER_BOOLEAN),
|
||||
'hideMenuHead' => $this->getinput('pageEditHideMenuHead', helper::FILTER_BOOLEAN),
|
||||
'hideMenuChildren' => $this->getinput('pageEditHideMenuChildren', helper::FILTER_BOOLEAN),
|
||||
'homePageId' => $this->getinput('pageHomePageId', helper::FILTER_BOOLEAN)
|
||||
]
|
||||
]);
|
||||
// Aucune homepage, sélection par défaut
|
||||
$this->getHomePageId();
|
||||
// Barre renommée : changement le nom de la barre dans les pages mères
|
||||
if ($this->getinput('pageEditBlock') === 'bar') {
|
||||
foreach ($this->getHierarchy() as $eachPageId=>$parentId) {
|
||||
@ -288,7 +301,7 @@ class page extends common {
|
||||
}
|
||||
}
|
||||
// Met à jour le site map
|
||||
$this->createSitemap('all');
|
||||
$this->createSitemap();
|
||||
// Redirection vers la configuration
|
||||
if($this->getInput('pageEditModuleRedirect', helper::FILTER_BOOLEAN)) {
|
||||
// Valeurs en sortie
|
||||
@ -341,5 +354,4 @@ class page extends common {
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
// Mise à jour de la liste des pages pour TinyMCE
|
||||
$this->pages2Json();
|
||||
echo template::formOpen('pageEditForm'); ?>
|
||||
<div class="notranslate">
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php $href = helper::baseUrl() . $this->getUrl(2); ?>
|
||||
@ -55,7 +56,7 @@ echo template::formOpen('pageEditForm'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php echo template::select('pageTypeMenu', $module::$typeMenu,[
|
||||
@ -77,7 +78,14 @@ echo template::formOpen('pageEditForm'); ?>
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'modulePosition'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::checkbox('pageHomePageId', true, 'Page d\'accueil', [
|
||||
'checked' => $this->getData(['page', $this->getUrl(2), 'homePageId'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -11,7 +11,7 @@
|
||||
* @license GNU General Public License, version 3
|
||||
* @link http://zwiicms.com/
|
||||
* @copyright : Frédéric Tempez <frederic.tempez@outlook.com>
|
||||
* @copyright Copyright (C) 2018-2019, Frédéric Tempez
|
||||
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
|
||||
*/
|
||||
|
||||
class theme extends common {
|
||||
@ -170,6 +170,11 @@ class theme extends common {
|
||||
'site' => 'Dans le site',
|
||||
'hide' => 'Caché'
|
||||
];
|
||||
public static $menui18nPosition = [
|
||||
'right' => 'À droite de la barre de menu',
|
||||
'left' => 'À gauche de la barre de menu',
|
||||
'none' => 'Après le menu'
|
||||
];
|
||||
public static $radius = [
|
||||
'0px' => 'Aucun',
|
||||
'5px' => 'Très léger',
|
||||
@ -437,12 +442,14 @@ class theme extends common {
|
||||
'fontWeight' => $this->getInput('themeMenuFontWeight'),
|
||||
'height' => $this->getInput('themeMenuHeight'),
|
||||
'loginLink' => $this->getInput('themeMenuLoginLink', helper::FILTER_BOOLEAN),
|
||||
'burgerTitle' => $this->getInput('themeMenuBurgerTitle', helper::FILTER_BOOLEAN),
|
||||
'margin' => $this->getInput('themeMenuMargin', helper::FILTER_BOOLEAN),
|
||||
'position' => $this->getInput('themeMenuPosition'),
|
||||
'textAlign' => $this->getInput('themeMenuTextAlign'),
|
||||
'textColor' => $this->getInput('themeMenuTextColor'),
|
||||
'textTransform' => $this->getInput('themeMenuTextTransform'),
|
||||
'fixed' => $this->getInput('themeMenuFixed', helper::FILTER_BOOLEAN)
|
||||
'fixed' => $this->getInput('themeMenuFixed', helper::FILTER_BOOLEAN),
|
||||
'i18nPosition' => $this->getInput('themeMenui18nPosition')
|
||||
]]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php echo template::formOpen('themeAdvancedForm'); ?>
|
||||
<div class="notranslate">
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeAdvancedBack', [
|
||||
@ -28,4 +29,5 @@
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
@ -1,4 +1,5 @@
|
||||
<?php echo template::formOpen('themeBodyForm'); ?>
|
||||
<div class="notranslate">
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeBodyBack', [
|
||||
@ -67,4 +68,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
@ -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-2019, Frédéric Tempez
|
||||
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
|
||||
* @link http://zwiicms.com/
|
||||
*/
|
||||
|
||||
|
@ -1,200 +1,202 @@
|
||||
<?php echo template::formOpen('themeFooterForm'); ?>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeFooterBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'theme',
|
||||
'ico' => 'left',
|
||||
'value' => 'Retour'
|
||||
]); ?>
|
||||
<div class="notranslate">
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeFooterBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'theme',
|
||||
'ico' => 'left',
|
||||
'value' => 'Retour'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset8">
|
||||
<?php echo template::submit('themeFooterSubmit'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col2 offset8">
|
||||
<?php echo template::submit('themeFooterSubmit'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="block">
|
||||
<h4>Couleurs</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::text('themeFooterBackgroundColor', [
|
||||
'class' => 'colorPicker',
|
||||
'label' => 'Fond',
|
||||
'value' => $this->getData(['theme', 'footer', 'backgroundColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::text('themeFooterTextColor', [
|
||||
'class' => 'colorPicker',
|
||||
'label' => 'Texte',
|
||||
'value' => $this->getData(['theme', 'footer', 'textColor'])
|
||||
]); ?>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="block">
|
||||
<h4>Couleurs</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::text('themeFooterBackgroundColor', [
|
||||
'class' => 'colorPicker',
|
||||
'label' => 'Fond',
|
||||
'value' => $this->getData(['theme', 'footer', 'backgroundColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::text('themeFooterTextColor', [
|
||||
'class' => 'colorPicker',
|
||||
'label' => 'Texte',
|
||||
'value' => $this->getData(['theme', 'footer', 'textColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<div class="block">
|
||||
<h4>Informations</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="row">
|
||||
<?php echo template::checkbox('themefooterDisplayCopyright', true, 'Motorisé par', [
|
||||
'checked' => $this->getData(['theme', 'footer','displayCopyright'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="row">
|
||||
<?php echo template::checkbox('themefooterDisplayVersion', true, 'Numéro de version', [
|
||||
'checked' => $this->getData(['theme', 'footer','displayVersion'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="row">
|
||||
<?php echo template::checkbox('themeFooterDisplayLegal', true, 'Mentions légales', [
|
||||
'checked' => $this->getData(['config', 'legalPageId']) === '' ? false : $this->getData(['theme', 'footer', 'displayLegal']),
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<div class="row">
|
||||
<?php echo template::checkbox('themefooterDisplaySiteMap', true, 'Plan du site', [
|
||||
'checked' => $this->getData(['theme', 'footer', 'displaySiteMap']),
|
||||
'help' => 'Un plan du site permet un meilleur référencement.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="row">
|
||||
<?php echo template::checkbox('themeFooterLoginLink', true, 'Lien de connexion', [
|
||||
'checked' => $this->getData(['theme', 'footer', 'loginLink'])
|
||||
<div class="col6">
|
||||
<div class="block">
|
||||
<h4>Informations</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="row">
|
||||
<?php echo template::checkbox('themefooterDisplayCopyright', true, 'Motorisé par', [
|
||||
'checked' => $this->getData(['theme', 'footer','displayCopyright'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="row">
|
||||
<?php echo template::checkbox('themefooterDisplayVersion', true, 'Numéro de version', [
|
||||
'checked' => $this->getData(['theme', 'footer','displayVersion'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="row">
|
||||
<?php echo template::checkbox('themeFooterDisplayLegal', true, 'Mentions légales', [
|
||||
'checked' => $this->getData(['config', 'legalPageId']) === '' ? false : $this->getData(['theme', 'footer', 'displayLegal']),
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<?php echo template::checkbox('themeFooterDisplaySearch', true, 'Rechercher', [
|
||||
'checked' => $this->getData(['theme', 'footer', 'displaySearch']),
|
||||
<div class="col6">
|
||||
<div class="row">
|
||||
<?php echo template::checkbox('themefooterDisplaySiteMap', true, 'Plan du site', [
|
||||
'checked' => $this->getData(['theme', 'footer', 'displaySiteMap']),
|
||||
'help' => 'Un plan du site permet un meilleur référencement.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="row">
|
||||
<?php echo template::checkbox('themeFooterLoginLink', true, 'Lien de connexion', [
|
||||
'checked' => $this->getData(['theme', 'footer', 'loginLink'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="row">
|
||||
<?php echo template::checkbox('themeFooterDisplaySearch', true, 'Rechercher', [
|
||||
'checked' => $this->getData(['theme', 'footer', 'displaySearch']),
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col12">
|
||||
<em>Le paramétrage des mentions légales s'effectue dans la configuration du site.</em>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Contenu personnalisé</h4>
|
||||
<?php echo template::textarea('themeFooterText', [
|
||||
'label' => '<strong>Texte ou HTML</strong>',
|
||||
'value' => $this->getData(['theme', 'footer', 'text']),
|
||||
'class' => 'editorWysiwyg'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Mise en forme du texte</h4>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeFooterFont', $module::$fonts, [
|
||||
'label' => 'Police',
|
||||
'selected' => $this->getData(['theme', 'footer', 'font'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeFooterFontSize', $module::$footerFontSizes, [
|
||||
'label' => 'Taille',
|
||||
'help' => 'Proportionnelle à celle définie dans le site.',
|
||||
'selected' => $this->getData(['theme', 'footer', 'fontSize'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeFooterFontWeight', $module::$fontWeights, [
|
||||
'label' => 'Style',
|
||||
'selected' => $this->getData(['theme', 'footer', 'fontWeight'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeFooterTextTransform', $module::$textTransforms, [
|
||||
'label' => 'Casse',
|
||||
'selected' => $this->getData(['theme', 'footer', 'textTransform'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col12">
|
||||
<em>Le paramétrage des mentions légales s'effectue dans la configuration du site.</em>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Contenu personnalisé</h4>
|
||||
<?php echo template::textarea('themeFooterText', [
|
||||
'label' => '<strong>Texte ou HTML</strong>',
|
||||
'value' => $this->getData(['theme', 'footer', 'text']),
|
||||
'class' => 'editorWysiwyg'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Mise en forme du texte</h4>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeFooterFont', $module::$fonts, [
|
||||
'label' => 'Police',
|
||||
'selected' => $this->getData(['theme', 'footer', 'font'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeFooterFontSize', $module::$footerFontSizes, [
|
||||
'label' => 'Taille',
|
||||
'help' => 'Proportionnelle à celle définie dans le site.',
|
||||
'selected' => $this->getData(['theme', 'footer', 'fontSize'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeFooterFontWeight', $module::$fontWeights, [
|
||||
'label' => 'Style',
|
||||
'selected' => $this->getData(['theme', 'footer', 'fontWeight'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeFooterTextTransform', $module::$textTransforms, [
|
||||
'label' => 'Casse',
|
||||
'selected' => $this->getData(['theme', 'footer', 'textTransform'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Configuration</h4>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php $footerBlockPosition = $module::$footerblocks [$this->getData(['theme', 'footer', 'template'])]; ?>
|
||||
<?php echo template::select('themeFooterTemplate', $module::$footerTemplate, [
|
||||
'label' => 'Disposition',
|
||||
'selected' => $this->getData(['theme', 'footer', 'template'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::select('themeFooterPosition', $module::$footerPositions, [
|
||||
'label' => 'Position',
|
||||
'selected' => $this->getData(['theme', 'footer', 'position'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::select('themeFooterHeight', $module::$footerHeights, [
|
||||
'label' => 'Marges verticales',
|
||||
'selected' => $this->getData(['theme', 'footer', 'height'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<p><strong>Contenu personnalisé</strong></p>
|
||||
<?php echo template::select('themeFooterTextPosition', $footerBlockPosition, [
|
||||
'label' => 'Emplacement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'textPosition']),
|
||||
'class' => 'themeFooterContent'
|
||||
]); ?>
|
||||
<?php echo template::select('themeFooterTextAlign', $module::$aligns, [
|
||||
'label' => 'Alignement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'textAlign'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<p><strong>Réseaux sociaux</strong></p>
|
||||
<?php echo template::select('themeFooterSocialsPosition', $footerBlockPosition, [
|
||||
'label' => 'Emplacement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'socialsPosition']),
|
||||
'class' => 'themeFooterContent'
|
||||
]); ?>
|
||||
<?php echo template::select('themeFooterSocialsAlign', $module::$aligns, [
|
||||
'label' => 'Alignement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'socialsAlign'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<p><strong>Informations</strong></p>
|
||||
<?php echo template::select('themeFooterCopyrightPosition', $footerBlockPosition, [
|
||||
'label' => 'Emplacement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'copyrightPosition']),
|
||||
'class' => 'themeFooterContent'
|
||||
]); ?>
|
||||
<?php echo template::select('themeFooterCopyrightAlign', $module::$aligns, [
|
||||
'label' => 'Alignement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'copyrightAlign'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<div id="themeFooterPositionOptions">
|
||||
<?php echo template::checkbox('themeFooterMargin', true, 'Alignement avec le contenu', [
|
||||
'checked' => $this->getData(['theme', 'footer', 'margin'])
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Configuration</h4>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php $footerBlockPosition = $module::$footerblocks [$this->getData(['theme', 'footer', 'template'])]; ?>
|
||||
<?php echo template::select('themeFooterTemplate', $module::$footerTemplate, [
|
||||
'label' => 'Disposition',
|
||||
'selected' => $this->getData(['theme', 'footer', 'template'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::select('themeFooterPosition', $module::$footerPositions, [
|
||||
'label' => 'Position',
|
||||
'selected' => $this->getData(['theme', 'footer', 'position'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::select('themeFooterHeight', $module::$footerHeights, [
|
||||
'label' => 'Marges verticales',
|
||||
'selected' => $this->getData(['theme', 'footer', 'height'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<p><strong>Contenu personnalisé</strong></p>
|
||||
<?php echo template::select('themeFooterTextPosition', $footerBlockPosition, [
|
||||
'label' => 'Emplacement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'textPosition']),
|
||||
'class' => 'themeFooterContent'
|
||||
]); ?>
|
||||
<?php echo template::select('themeFooterTextAlign', $module::$aligns, [
|
||||
'label' => 'Alignement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'textAlign'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<p><strong>Réseaux sociaux</strong></p>
|
||||
<?php echo template::select('themeFooterSocialsPosition', $footerBlockPosition, [
|
||||
'label' => 'Emplacement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'socialsPosition']),
|
||||
'class' => 'themeFooterContent'
|
||||
]); ?>
|
||||
<?php echo template::select('themeFooterSocialsAlign', $module::$aligns, [
|
||||
'label' => 'Alignement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'socialsAlign'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<p><strong>Informations</strong></p>
|
||||
<?php echo template::select('themeFooterCopyrightPosition', $footerBlockPosition, [
|
||||
'label' => 'Emplacement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'copyrightPosition']),
|
||||
'class' => 'themeFooterContent'
|
||||
]); ?>
|
||||
<?php echo template::select('themeFooterCopyrightAlign', $module::$aligns, [
|
||||
'label' => 'Alignement',
|
||||
'selected' => $this->getData(['theme', 'footer', 'copyrightAlign'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<div id="themeFooterPositionOptions">
|
||||
<?php echo template::checkbox('themeFooterMargin', true, 'Alignement avec le contenu', [
|
||||
'checked' => $this->getData(['theme', 'footer', 'margin'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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-2019, Frédéric Tempez
|
||||
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
|
||||
* @link http://zwiicms.com/
|
||||
*/
|
||||
|
||||
@ -20,7 +20,7 @@ $(document).ready(function(){
|
||||
/**
|
||||
* Aperçu en direct
|
||||
*/
|
||||
$("input, select").on("change", function() {
|
||||
$("input, select").not("#barSelectLanguage").on("change", function() {
|
||||
|
||||
// Récupérer la taille de l'image
|
||||
|
||||
|
@ -1,165 +1,167 @@
|
||||
<?php echo template::formOpen('themeHeaderForm'); ?>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeHeaderBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'theme',
|
||||
'ico' => 'left',
|
||||
'value' => 'Retour'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset8">
|
||||
<?php echo template::submit('themeHeaderSubmit'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<div class="block">
|
||||
<h4>Couleurs</h4>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::text('themeHeaderBackgroundColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => 'Le curseur horizontal règle le niveau de transparence.',
|
||||
'label' => 'Fond',
|
||||
'value' => $this->getData(['theme', 'header', 'backgroundColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::text('themeHeaderTextColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => 'Le curseur horizontal règle le niveau de transparence.',
|
||||
'label' => 'Texte',
|
||||
'value' => $this->getData(['theme', 'header', 'textColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="notranslate">
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeHeaderBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'theme',
|
||||
'ico' => 'left',
|
||||
'value' => 'Retour'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset8">
|
||||
<?php echo template::submit('themeHeaderSubmit'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col8">
|
||||
<div class="block">
|
||||
<h4>Image</h4>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php
|
||||
$imageFile = file_exists(self::FILE_DIR.'source/'.$this->getData(['theme', 'header', 'image'])) ?
|
||||
$this->getData(['theme', 'header', 'image']) : "";
|
||||
echo template::file('themeHeaderImage', [
|
||||
'label' => 'Fond',
|
||||
'type' => 1,
|
||||
'value' => $imageFile
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="themeHeaderImageOptions" class="displayNone">
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<div class="block">
|
||||
<h4>Couleurs</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::select('themeHeaderImageRepeat', $module::$repeats, [
|
||||
'label' => 'Répétition',
|
||||
'selected' => $this->getData(['theme', 'header', 'imageRepeat'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::select('themeHeaderImagePosition', $module::$imagePositions, [
|
||||
'label' => 'Position',
|
||||
'selected' => $this->getData(['theme', 'header', 'imagePosition'])
|
||||
]); ?>
|
||||
<div class="col12">
|
||||
<?php echo template::text('themeHeaderBackgroundColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => 'Le curseur horizontal règle le niveau de transparence.',
|
||||
'label' => 'Fond',
|
||||
'value' => $this->getData(['theme', 'header', 'backgroundColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php echo template::checkbox('themeHeaderTextHide', true, 'Masquer le titre du site', [
|
||||
'checked' => $this->getData(['theme', 'header', 'textHide'])
|
||||
]); ?>
|
||||
<div class="col12">
|
||||
<?php echo template::text('themeHeaderTextColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => 'Le curseur horizontal règle le niveau de transparence.',
|
||||
'label' => 'Texte',
|
||||
'value' => $this->getData(['theme', 'header', 'textColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div id="themeHeaderShow" class="col4">
|
||||
<?php echo template::checkbox('themeHeaderlinkHomePage', true, 'Bannière cliquable', [
|
||||
'checked' => $this->getData(['theme', 'header', 'linkHomePage'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<em>(largeur:<span id="themeHeaderImageWidth"></span> ; hauteur:<span id="themeHeaderImageHeight"></span>)</em>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Configuration</h4>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeHeaderPosition', $module::$headerPositions, [
|
||||
'label' => 'Position',
|
||||
'selected' => $this->getData(['theme', 'header', 'position'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeHeaderImageContainer', $module::$headerWide, [
|
||||
'label' => 'Adaptation',
|
||||
'selected' => $this->getData(['theme', 'header', 'imageContainer']),
|
||||
'help' => 'Les modes responsives permettent de conserver des dimensions proportionnelles.<br />
|
||||
Cover pour une image plus grande que la bannière, Contain pour une image plus petite.
|
||||
Les modes Auto et Etiré ne provoquent pas de modification de la hauteur de la bannière.'
|
||||
<div class="col8">
|
||||
<div class="block">
|
||||
<h4>Image</h4>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php
|
||||
$imageFile = file_exists(self::FILE_DIR.'source/'.$this->getData(['theme', 'header', 'image'])) ?
|
||||
$this->getData(['theme', 'header', 'image']) : "";
|
||||
echo template::file('themeHeaderImage', [
|
||||
'label' => 'Fond',
|
||||
'type' => 1,
|
||||
'value' => $imageFile
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeHeaderHeight', $module::$headerHeights, [
|
||||
'label' => 'Hauteur maximale',
|
||||
'selected' => $this->getData(['theme', 'header', 'height']),
|
||||
'help' => 'La hauteur maximale est de 600 pixels, même si les dimensions de l\'image sélectionnée sont supérieures. <br />Lorsque l\'adaptation est positionnée sur Responsive, la hauteur diminue proportionnellement à la largeur.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeHeaderTextAlign', $module::$aligns, [
|
||||
'label' => 'Alignement du contenu',
|
||||
'selected' => $this->getData(['theme', 'header', 'textAlign'])
|
||||
]); ?>
|
||||
<div id="themeHeaderImageOptions" class="displayNone">
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::select('themeHeaderImageRepeat', $module::$repeats, [
|
||||
'label' => 'Répétition',
|
||||
'selected' => $this->getData(['theme', 'header', 'imageRepeat'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::select('themeHeaderImagePosition', $module::$imagePositions, [
|
||||
'label' => 'Position',
|
||||
'selected' => $this->getData(['theme', 'header', 'imagePosition'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php echo template::checkbox('themeHeaderTextHide', true, 'Masquer le titre du site', [
|
||||
'checked' => $this->getData(['theme', 'header', 'textHide'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div id="themeHeaderShow" class="col4">
|
||||
<?php echo template::checkbox('themeHeaderlinkHomePage', true, 'Bannière cliquable', [
|
||||
'checked' => $this->getData(['theme', 'header', 'linkHomePage'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<em>(largeur:<span id="themeHeaderImageWidth"></span> ; hauteur:<span id="themeHeaderImageHeight"></span>)</em>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="themeHeaderPositionOptions" class="displayNone">
|
||||
<?php echo template::checkbox('themeHeaderMargin', true, 'Aligner la bannière avec le contenu', [
|
||||
'checked' => $this->getData(['theme', 'header', 'margin'])
|
||||
]); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Mise en forme du texte</h4>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeHeaderFont', $module::$fonts, [
|
||||
'label' => 'Police',
|
||||
'selected' => $this->getData(['theme', 'header', 'font'])
|
||||
]); ?>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Configuration</h4>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeHeaderPosition', $module::$headerPositions, [
|
||||
'label' => 'Position',
|
||||
'selected' => $this->getData(['theme', 'header', 'position'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeHeaderImageContainer', $module::$headerWide, [
|
||||
'label' => 'Adaptation',
|
||||
'selected' => $this->getData(['theme', 'header', 'imageContainer']),
|
||||
'help' => 'Les modes responsives permettent de conserver des dimensions proportionnelles.<br />
|
||||
Cover pour une image plus grande que la bannière, Contain pour une image plus petite.
|
||||
Les modes Auto et Etiré ne provoquent pas de modification de la hauteur de la bannière.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeHeaderHeight', $module::$headerHeights, [
|
||||
'label' => 'Hauteur maximale',
|
||||
'selected' => $this->getData(['theme', 'header', 'height']),
|
||||
'help' => 'La hauteur maximale est de 600 pixels, même si les dimensions de l\'image sélectionnée sont supérieures. <br />Lorsque l\'adaptation est positionnée sur Responsive, la hauteur diminue proportionnellement à la largeur.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeHeaderTextAlign', $module::$aligns, [
|
||||
'label' => 'Alignement du contenu',
|
||||
'selected' => $this->getData(['theme', 'header', 'textAlign'])
|
||||
]); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeHeaderFontSize', $module::$headerFontSizes, [
|
||||
'label' => 'Taille',
|
||||
'help' => 'Proportionnelle à celle définie dans le site.',
|
||||
'selected' => $this->getData(['theme', 'header', 'fontSize'])
|
||||
]); ?>
|
||||
<div id="themeHeaderPositionOptions" class="displayNone">
|
||||
<?php echo template::checkbox('themeHeaderMargin', true, 'Aligner la bannière avec le contenu', [
|
||||
'checked' => $this->getData(['theme', 'header', 'margin'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeHeaderFontWeight', $module::$fontWeights, [
|
||||
'label' => 'Style',
|
||||
'selected' => $this->getData(['theme', 'header', 'fontWeight'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeHeaderTextTransform', $module::$textTransforms, [
|
||||
'label' => 'Casse',
|
||||
'selected' => $this->getData(['theme', 'header', 'textTransform'])
|
||||
]); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Mise en forme du texte</h4>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeHeaderFont', $module::$fonts, [
|
||||
'label' => 'Police',
|
||||
'selected' => $this->getData(['theme', 'header', 'font'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeHeaderFontSize', $module::$headerFontSizes, [
|
||||
'label' => 'Taille',
|
||||
'help' => 'Proportionnelle à celle définie dans le site.',
|
||||
'selected' => $this->getData(['theme', 'header', 'fontSize'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeHeaderFontWeight', $module::$fontWeights, [
|
||||
'label' => 'Style',
|
||||
'selected' => $this->getData(['theme', 'header', 'fontWeight'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeHeaderTextTransform', $module::$textTransforms, [
|
||||
'label' => 'Casse',
|
||||
'selected' => $this->getData(['theme', 'header', 'textTransform'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,63 +1,66 @@
|
||||
<?php if(
|
||||
$this->getData(['theme', 'header', 'position']) === 'hide'
|
||||
OR $this->getData(['theme', 'menu', 'position']) === 'hide'
|
||||
OR $this->getData(['theme', 'footer', 'position']) === 'hide'
|
||||
): ?>
|
||||
<div class="notranslate">
|
||||
<?php if(
|
||||
$this->getData(['theme', 'header', 'position']) === 'hide'
|
||||
OR $this->getData(['theme', 'menu', 'position']) === 'hide'
|
||||
OR $this->getData(['theme', 'footer', 'position']) === 'hide'
|
||||
): ?>
|
||||
<?php echo template::speech('Cliquez sur une zone afin d\'accéder à ses options de personnalisation. Vous pouvez également afficher les zones cachées à l\'aide du bouton ci-dessous.'); ?>
|
||||
<div class="row">
|
||||
<div class="col2 offset2">
|
||||
<?php echo template::button('themeBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl(false),
|
||||
'ico' => 'home',
|
||||
'value' => 'Accueil'
|
||||
]); ?>
|
||||
<div class="row">
|
||||
<div class="col2 offset2">
|
||||
<?php echo template::button('themeBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl(false),
|
||||
'ico' => 'home',
|
||||
'value' => 'Accueil'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeManage', [
|
||||
'ico' => 'upload',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/manage',
|
||||
'value' => 'Thèmes'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeAdvanced', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/advanced',
|
||||
'value' => 'Éditeur CSS',
|
||||
'ico' => 'code'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeShowAll', [
|
||||
'ico' => 'eye',
|
||||
'value' => 'Zones cachées'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeManage', [
|
||||
'ico' => 'upload',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/manage',
|
||||
'value' => 'Thèmes'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeAdvanced', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/advanced',
|
||||
'value' => 'Éditeur CSS',
|
||||
'ico' => 'code'
|
||||
]); ?>
|
||||
<?php else: ?>
|
||||
<?php echo template::speech('Cliquez sur une zone afin d\'accéder à ses options de personnalisation.'); ?>
|
||||
<div class="row">
|
||||
<div class="col2 offset3">
|
||||
<?php echo template::button('themeBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl(false),
|
||||
'ico' => 'home',
|
||||
'value' => 'Accueil'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeManage', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/manage',
|
||||
'ico' => 'upload',
|
||||
'value' => 'Thèmes'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeAdvanced', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/advanced',
|
||||
'value' => 'Éditeur CSS',
|
||||
'ico' => 'code'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeShowAll', [
|
||||
'ico' => 'eye',
|
||||
'value' => 'Zones cachées'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php echo template::speech('Cliquez sur une zone afin d\'accéder à ses options de personnalisation.'); ?>
|
||||
<div class="row">
|
||||
<div class="col2 offset3">
|
||||
<?php echo template::button('themeBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl(false),
|
||||
'ico' => 'home',
|
||||
'value' => 'Accueil'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeManage', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/manage',
|
||||
'ico' => 'upload',
|
||||
'value' => 'Thèmes'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeAdvanced', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/advanced',
|
||||
'value' => 'Éditeur CSS',
|
||||
'ico' => 'code'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php echo template::formOpen('themeManageForm'); ?>
|
||||
<div class="notranslate">
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeManageBack', [
|
||||
@ -48,4 +49,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
||||
|
@ -23,10 +23,13 @@ $("input, select").on("change", function() {
|
||||
css += "nav a,#toggle span,nav a:hover{color:" + $("#themeMenuTextColor").val() + "}";
|
||||
css += "nav a:hover{background-color:" + colors.darken + "}";
|
||||
css += "nav a.active{background-color:" + colors.veryDarken + "}";
|
||||
css += "#i18nBar {padding:" + $("#themeMenuHeight").val() + "}";
|
||||
css += ".flag {height: " + $("#themeMenuFontSize").val() + "}";
|
||||
css += "#i18nBar {float: " + $("#themeMenui18nPosition").val() + "}";
|
||||
// Taille, hauteur, épaisseur et capitalisation de caractères du menu
|
||||
css += "#toggle span,#menu a{padding:" + $("#themeMenuHeight").val() + ";font-family:'" + menuFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeMenuFontWeight").val() + ";font-size:" + $("#themeMenuFontSize").val() + ";text-transform:" + $("#themeMenuTextTransform").val() + "}";
|
||||
// Alignement du menu
|
||||
css += "#menu{text-align:" + $("#themeMenuTextAlign").val() + "}";
|
||||
css += "#menu{text-align:" + $("#themeMenuTextAlign").val() + "}";
|
||||
// Marge
|
||||
if($("#themeMenuMargin").is(":checked")) {
|
||||
if(
|
||||
|
@ -1,127 +1,138 @@
|
||||
<?php echo template::formOpen('themeMenuForm'); ?>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeMenuBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'theme',
|
||||
'ico' => 'left',
|
||||
'value' => 'Retour'
|
||||
]); ?>
|
||||
<div class="notranslate">
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeMenuBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'theme',
|
||||
'ico' => 'left',
|
||||
'value' => 'Retour'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset8">
|
||||
<?php echo template::submit('themeMenuSubmit'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col2 offset8">
|
||||
<?php echo template::submit('themeMenuSubmit'); ?>
|
||||
<div class="row">
|
||||
<div class="col7">
|
||||
<div class="block">
|
||||
<h4>Couleurs</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::text('themeMenuBackgroundColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => 'Le curseur horizontal règle le niveau de transparence.',
|
||||
'label' => 'Fond',
|
||||
'value' => $this->getData(['theme', 'menu', 'backgroundColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::text('themeMenuTextColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => 'Le curseur horizontal règle le niveau de transparence.',
|
||||
'label' => 'Texte',
|
||||
'value' => $this->getData(['theme', 'menu', 'textColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col5">
|
||||
<div class="block">
|
||||
<h4>Contenus</h4>
|
||||
<?php echo template::checkbox('themeMenuLoginLink', true, 'Lien de connexion', [
|
||||
'checked' => $this->getData(['theme', 'menu', 'loginLink'])
|
||||
]); ?>
|
||||
<?php echo template::checkbox('themeMenuBurgerTitle', true, 'Titre du site dans le menu réduit', [
|
||||
'checked' => $this->getData(['theme', 'menu', 'burgerTitle']),
|
||||
'help' => 'Le menu burger remplace le menu complet lorsque la largeur de l\'écran n\'est pas suffisante.'
|
||||
]); ?>
|
||||
<?php echo template::select('themeMenui18nPosition', $module::$menui18nPosition, [
|
||||
'label' => 'Position de la barre de langues',
|
||||
'selected' => $this->getData(['theme', 'menu', 'i18nPosition'])
|
||||
]); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col8">
|
||||
<div class="block">
|
||||
<h4>Couleur</h4>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Mise en forme du texte</h4>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeMenuFont', $module::$fonts, [
|
||||
'label' => 'Police',
|
||||
'selected' => $this->getData(['theme', 'menu', 'font'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeMenuFontSize', $module::$menuFontSizes, [
|
||||
'label' => 'Taille',
|
||||
'help' => 'Proportionnelle à celle définie dans le site',
|
||||
'selected' => $this->getData(['theme', 'menu', 'fontSize'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeMenuFontWeight', $module::$fontWeights, [
|
||||
'label' => 'Style',
|
||||
'selected' => $this->getData(['theme', 'menu', 'fontWeight'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeMenuTextTransform', $module::$textTransforms, [
|
||||
'label' => 'Casse',
|
||||
'selected' => $this->getData(['theme', 'menu', 'textTransform'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::text('themeMenuBackgroundColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => 'Le curseur horizontal règle le niveau de transparence.',
|
||||
'label' => 'Fond',
|
||||
'value' => $this->getData(['theme', 'menu', 'backgroundColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::text('themeMenuTextColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => 'Le curseur horizontal règle le niveau de transparence.',
|
||||
'label' => 'Texte',
|
||||
'value' => $this->getData(['theme', 'menu', 'textColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<div class="block">
|
||||
<h4>Contenu</h4>
|
||||
<?php echo template::checkbox('themeMenuLoginLink', true, 'Lien de connexion', [
|
||||
'checked' => $this->getData(['theme', 'menu', 'loginLink'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Mise en forme du texte</h4>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeMenuFont', $module::$fonts, [
|
||||
'label' => 'Police',
|
||||
'selected' => $this->getData(['theme', 'menu', 'font'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeMenuFontSize', $module::$menuFontSizes, [
|
||||
'label' => 'Taille',
|
||||
'help' => 'Proportionnelle à celle définie dans le site',
|
||||
'selected' => $this->getData(['theme', 'menu', 'fontSize'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeMenuFontWeight', $module::$fontWeights, [
|
||||
'label' => 'Style',
|
||||
'selected' => $this->getData(['theme', 'menu', 'fontWeight'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeMenuTextTransform', $module::$textTransforms, [
|
||||
'label' => 'Casse',
|
||||
'selected' => $this->getData(['theme', 'menu', 'textTransform'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Configuration</h4>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php
|
||||
if ( $this->getData(['theme', 'header', 'position']) == "site")
|
||||
{ echo template::select('themeMenuPosition', $module::$menuPositionsSite, [
|
||||
'label' => 'Position',
|
||||
'selected' => $this->getData(['theme', 'menu', 'position'])
|
||||
]);
|
||||
}else{
|
||||
echo template::select('themeMenuPosition', $module::$menuPositionsBody, [
|
||||
'label' => 'Position',
|
||||
'selected' => $this->getData(['theme', 'menu', 'position'])
|
||||
]); }
|
||||
?>
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Configuration</h4>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php
|
||||
if ( $this->getData(['theme', 'header', 'position']) == "site")
|
||||
{ echo template::select('themeMenuPosition', $module::$menuPositionsSite, [
|
||||
'label' => 'Position',
|
||||
'selected' => $this->getData(['theme', 'menu', 'position'])
|
||||
]);
|
||||
}else{
|
||||
echo template::select('themeMenuPosition', $module::$menuPositionsBody, [
|
||||
'label' => 'Position',
|
||||
'selected' => $this->getData(['theme', 'menu', 'position'])
|
||||
]); }
|
||||
?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::select('themeMenuHeight', $module::$menuHeights, [
|
||||
'label' => 'Hauteur',
|
||||
'selected' => $this->getData(['theme', 'menu', 'height'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::select('themeMenuTextAlign', $module::$aligns, [
|
||||
'label' => 'Alignement du contenu',
|
||||
'selected' => $this->getData(['theme', 'menu', 'textAlign'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::select('themeMenuHeight', $module::$menuHeights, [
|
||||
'label' => 'Hauteur',
|
||||
'selected' => $this->getData(['theme', 'menu', 'height'])
|
||||
]); ?>
|
||||
<div id="themeMenuPositionOptions" class="displayNone">
|
||||
<?php echo template::checkbox('themeMenuMargin', true, 'Aligner le menu avec le contenu', [
|
||||
'checked' => $this->getData(['theme', 'menu', 'margin'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::select('themeMenuTextAlign', $module::$aligns, [
|
||||
'label' => 'Alignement du contenu',
|
||||
'selected' => $this->getData(['theme', 'menu', 'textAlign'])
|
||||
]); ?>
|
||||
<div id="themeMenuPositionFixed" class="displayNone">
|
||||
<?php echo template::checkbox('themeMenuFixed', true, 'Menu fixe', [
|
||||
'checked' => $this->getData(['theme', 'menu', 'fixed'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="themeMenuPositionOptions" class="displayNone">
|
||||
<?php echo template::checkbox('themeMenuMargin', true, 'Aligner le menu avec le contenu', [
|
||||
'checked' => $this->getData(['theme', 'menu', 'margin'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div id="themeMenuPositionFixed" class="displayNone">
|
||||
<?php echo template::checkbox('themeMenuFixed', true, 'Menu fixe', [
|
||||
'checked' => $this->getData(['theme', 'menu', 'fixed'])
|
||||
]); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php echo template::formOpen('themeSiteForm'); ?>
|
||||
<div class="notranslate">
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeSiteBack', [
|
||||
@ -137,4 +138,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
@ -12,6 +12,7 @@
|
||||
* @link http://zwiicms.com/
|
||||
*/
|
||||
|
||||
|
||||
class user extends common {
|
||||
|
||||
public static $actions = [
|
||||
@ -72,7 +73,7 @@ class user extends common {
|
||||
}
|
||||
// Envoie le mail
|
||||
$sent = true;
|
||||
if($this->getInput('userAddSendMail', helper::FILTER_BOOLEAN) && $check === true) {
|
||||
if($this->getInput('userAddSendMail', helper::FILTER_BOOLEAN) && $check === true) {
|
||||
$sent = $this->sendMail(
|
||||
$userMail,
|
||||
'Compte créé sur ' . $this->getData(['config', 'title']),
|
||||
@ -260,7 +261,7 @@ class user extends common {
|
||||
// Enregistre la date de la demande dans le compte utilisateur
|
||||
$this->setData(['user', $userId, 'forgot', time()]);
|
||||
// Crée un id unique pour la réinitialisation
|
||||
$uniqId = md5(json_encode($this->getData(['user', $userId])));
|
||||
$uniqId = md5(json_encode($this->getData(['user', $userId])));
|
||||
// Envoi le mail
|
||||
$sent = $this->sendMail(
|
||||
$this->getData(['user', $userId, 'mail']),
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php echo template::formOpen('userAddForm'); ?>
|
||||
<div class="notranslate">
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('userAddBack', [
|
||||
@ -78,4 +79,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
@ -1,4 +1,5 @@
|
||||
<?php echo template::formOpen('userEditForm'); ?>
|
||||
<div class="notranslate">
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php if($this->getUrl(3)): ?>
|
||||
@ -98,4 +99,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
@ -1,4 +1,5 @@
|
||||
<?php echo template::formOpen('userForgotForm'); ?>
|
||||
<div class="notranslate">
|
||||
<?php echo template::text('userForgotId', [
|
||||
'label' => 'Identifiant'
|
||||
]); ?>
|
||||
@ -17,4 +18,5 @@
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
@ -1,4 +1,4 @@
|
||||
<div class="row">
|
||||
<div class="row notranslate">
|
||||
<div class="col2">
|
||||
<?php echo template::button('userAddBack', [
|
||||
'class' => 'buttonGrey',
|
||||
|
@ -5,7 +5,7 @@
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @authorFrédéric Tempez <frederic.tempez@outlook.com>
|
||||
* @copyright Copyright (C) 2018-2019, Frédéric Tempez
|
||||
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
|
||||
* @license GNU General Public License, version 3
|
||||
* @link http://zwiicms.com/
|
||||
*/
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php echo template::formOpen('userLoginForm'); ?>
|
||||
<div class="notranslate">
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::text('userLoginId', [
|
||||
@ -36,4 +37,5 @@
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
@ -1,4 +1,5 @@
|
||||
<?php echo template::formOpen('userResetForm'); ?>
|
||||
<div class="notranslate">
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::password('userResetNewPassword', [
|
||||
@ -18,4 +19,5 @@
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
2
core/vendor/filemanager/a_lire.txt
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
Version 9.14.0 ajax_calls.php changer la ligne 200
|
||||
$zip->extractTo($base_folder , $FullFileName['name']);
|
4
core/vendor/filemanager/config/config.php
vendored
@ -347,7 +347,7 @@ $config = array(
|
||||
// you can create these type of files if $config['create_text_files'] is true (only text based files)
|
||||
// if you want you can add html,css etc.
|
||||
// but for security reasons it's NOT RECOMMENDED!
|
||||
'editable_text_file_exts' => array( 'txt', 'log', 'xml', 'html', 'css', 'htm', 'js','' ),
|
||||
'editable_text_file_exts' => array( 'txt', 'log', 'xml', 'html', 'css', 'htm', 'js', '' ),
|
||||
|
||||
'jplayer_exts' => array("mp4","flv","webmv","webma","webm","m4a","m4v","ogv","oga","mp3","midi","mid","ogg","wav"),
|
||||
|
||||
@ -369,7 +369,7 @@ $config = array(
|
||||
//Allowed extensions (lowercase insert)
|
||||
//**********************
|
||||
'ext_img' => array( 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff','svg', 'ico' ), //Images
|
||||
'ext_file' => array( 'doc', 'docx', 'rtf', 'pdf', 'xls', 'xlsx', 'txt', 'csv', 'html', 'xhtml', 'psd', 'sql', 'log', 'fla', 'xml', 'ade', 'adp', 'mdb', 'accdb', 'ppt', 'pptx', 'odt', 'ots', 'ott', 'odb', 'odg', 'otp', 'otg', 'odf', 'ods', 'odp', 'css', 'ai', 'kmz','dwg', 'dxf', 'hpgl', 'plt', 'spl', 'step', 'stp', 'iges', 'igs', 'sat', 'cgm', 'tiff',''), //Files
|
||||
'ext_file' => array( 'doc', 'docx', 'rtf', 'pdf', 'xls', 'xlsx', 'txt', 'csv', 'html', 'xhtml', 'psd', 'sql', 'log', 'fla', 'xml', 'ade', 'adp', 'mdb', 'accdb', 'ppt', 'pptx', 'odt', 'ots', 'ott', 'odb', 'odg', 'otp', 'otg', 'odf', 'ods', 'odp', 'css', 'ai', 'kmz','dwg', 'dxf', 'hpgl', 'plt', 'spl', 'step', 'stp', 'iges', 'igs', 'sat', 'cgm', 'tiff', 'json', ''), //Files
|
||||
'ext_video' => array( 'mov', 'mpeg', 'm4v', 'mp4', 'avi', 'mpg', 'wma', "flv", "webm" ), //Video
|
||||
'ext_music' => array( 'mp3', 'mpga', 'm4a', 'ac3', 'aiff', 'mid', 'ogg', 'wav' ), //Audio
|
||||
'ext_misc' => array( 'zip', 'rar', 'gz', 'tar', 'iso', 'dmg' ), //Archives
|
||||
|
BIN
core/vendor/i18n/png/de.png
vendored
Normal file
After Width: | Height: | Size: 119 B |
BIN
core/vendor/i18n/png/en.png
vendored
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
core/vendor/i18n/png/es.png
vendored
Normal file
After Width: | Height: | Size: 287 B |
BIN
core/vendor/i18n/png/fr.png
vendored
Normal file
After Width: | Height: | Size: 96 B |
BIN
core/vendor/i18n/png/it.png
vendored
Normal file
After Width: | Height: | Size: 96 B |
BIN
core/vendor/i18n/png/nl.png
vendored
Normal file
After Width: | Height: | Size: 108 B |
BIN
core/vendor/i18n/png/pt.png
vendored
Normal file
After Width: | Height: | Size: 395 B |
316
core/vendor/jsondb/Dot.php
vendored
Normal file
@ -0,0 +1,316 @@
|
||||
<?php
|
||||
|
||||
namespace Prowebcraft;
|
||||
|
||||
use ArrayAccess;
|
||||
|
||||
/**
|
||||
* Dot Notation
|
||||
*
|
||||
* This class provides dot notation access to arrays, so it's easy to handle
|
||||
* multidimensional data in a clean way.
|
||||
*/
|
||||
class Dot implements ArrayAccess
|
||||
{
|
||||
|
||||
/** @var array Data */
|
||||
protected $data = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array|null $data Data
|
||||
*/
|
||||
public function __construct(array $data = null)
|
||||
{
|
||||
if (is_array($data)) {
|
||||
$this->data = $data;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get value of path, default value if path doesn't exist or all data
|
||||
*
|
||||
* @param array $array Source Array
|
||||
* @param mixed|null $key Path
|
||||
* @param mixed|null $default Default value
|
||||
* @return mixed Value of path
|
||||
*/
|
||||
public static function getValue($array, $key, $default = null)
|
||||
{
|
||||
if (is_string($key)) {
|
||||
// Iterate path
|
||||
$keys = explode('.', $key);
|
||||
foreach ($keys as $key) {
|
||||
if (!isset($array[$key])) {
|
||||
return $default;
|
||||
}
|
||||
$array = &$array[$key];
|
||||
}
|
||||
// Get value
|
||||
return $array;
|
||||
} elseif (is_null($key)) {
|
||||
// Get all data
|
||||
return $array;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set value or array of values to path
|
||||
*
|
||||
* @param array $array Target array with data
|
||||
* @param mixed $key Path or array of paths and values
|
||||
* @param mixed|null $value Value to set if path is not an array
|
||||
*/
|
||||
public static function setValue(&$array, $key, $value)
|
||||
{
|
||||
if (is_string($key)) {
|
||||
// Iterate path
|
||||
$keys = explode('.', $key);
|
||||
foreach ($keys as $key) {
|
||||
if (!isset($array[$key]) || !is_array($array[$key])) {
|
||||
$array[$key] = [];
|
||||
}
|
||||
$array = &$array[$key];
|
||||
}
|
||||
// Set value to path
|
||||
$array = $value;
|
||||
} elseif (is_array($key)) {
|
||||
// Iterate array of paths and values
|
||||
foreach ($key as $k => $v) {
|
||||
self::setValue($array, $k, $v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add value or array of values to path
|
||||
*
|
||||
* @param array $array Target array with data
|
||||
* @param mixed $key Path or array of paths and values
|
||||
* @param mixed|null $value Value to set if path is not an array
|
||||
* @param boolean $pop Helper to pop out last key if value is an array
|
||||
*/
|
||||
public static function addValue(&$array, $key, $value = null, $pop = false)
|
||||
{
|
||||
if (is_string($key)) {
|
||||
// Iterate path
|
||||
$keys = explode('.', $key);
|
||||
if ($pop === true) {
|
||||
array_pop($keys);
|
||||
}
|
||||
foreach ($keys as $key) {
|
||||
if (!isset($array[$key]) || !is_array($array[$key])) {
|
||||
$array[$key] = [];
|
||||
}
|
||||
$array = &$array[$key];
|
||||
}
|
||||
// Add value to path
|
||||
$array[] = $value;
|
||||
} elseif (is_array($key)) {
|
||||
// Iterate array of paths and values
|
||||
foreach ($key as $k => $v) {
|
||||
self::addValue($array, $k, $v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete path or array of paths
|
||||
*
|
||||
* @param array $array Target array with data
|
||||
* @param mixed $key Path or array of paths to delete
|
||||
*/
|
||||
public static function deleteValue(&$array, $key)
|
||||
{
|
||||
if (is_string($key)) {
|
||||
// Iterate path
|
||||
$keys = explode('.', $key);
|
||||
$last = array_pop($keys);
|
||||
foreach ($keys as $key) {
|
||||
if (!isset($array[$key])) {
|
||||
return;
|
||||
}
|
||||
$array = &$array[$key];
|
||||
}
|
||||
if (isset($array[$last])) {
|
||||
// Detele path
|
||||
unset($array[$last]);
|
||||
}
|
||||
} elseif (is_array($key)) {
|
||||
// Iterate array of paths
|
||||
foreach ($key as $k) {
|
||||
self::delete($k);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get value of path, default value if path doesn't exist or all data
|
||||
*
|
||||
* @param mixed|null $key Path
|
||||
* @param mixed|null $default Default value
|
||||
* @return mixed Value of path
|
||||
*/
|
||||
public function get($key = null, $default = null)
|
||||
{
|
||||
return self::getValue($this->data, $key, $default);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set value or array of values to path
|
||||
*
|
||||
* @param mixed $key Path or array of paths and values
|
||||
* @param mixed|null $value Value to set if path is not an array
|
||||
*/
|
||||
public function set($key, $value = null)
|
||||
{
|
||||
return self::setValue($this->data, $key, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add value or array of values to path
|
||||
*
|
||||
* @param mixed $key Path or array of paths and values
|
||||
* @param mixed|null $value Value to set if path is not an array
|
||||
* @param boolean $pop Helper to pop out last key if value is an array
|
||||
*/
|
||||
public function add($key, $value = null, $pop = false)
|
||||
{
|
||||
return self::addValue($this->data, $key, $value, $pop);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if path exists
|
||||
*
|
||||
* @param string $key Path
|
||||
* @return boolean
|
||||
*/
|
||||
public function has($key)
|
||||
{
|
||||
$keys = explode('.', (string)$key);
|
||||
$data = &$this->data;
|
||||
foreach ($keys as $key) {
|
||||
if (!isset($data[$key])) {
|
||||
return false;
|
||||
}
|
||||
$data = &$data[$key];
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete path or array of paths
|
||||
*
|
||||
* @param mixed $key Path or array of paths to delete
|
||||
*/
|
||||
public function delete($key)
|
||||
{
|
||||
return self::deleteValue($this->data, $key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete all data, data from path or array of paths and
|
||||
* optionally format path if it doesn't exist
|
||||
*
|
||||
* @param mixed|null $key Path or array of paths to clean
|
||||
* @param boolean $format Format option
|
||||
*/
|
||||
public function clear($key = null, $format = false)
|
||||
{
|
||||
if (is_string($key)) {
|
||||
// Iterate path
|
||||
$keys = explode('.', $key);
|
||||
$data = &$this->data;
|
||||
foreach ($keys as $key) {
|
||||
if (!isset($data[$key]) || !is_array($data[$key])) {
|
||||
if ($format === true) {
|
||||
$data[$key] = [];
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
$data = &$data[$key];
|
||||
}
|
||||
// Clear path
|
||||
$data = [];
|
||||
} elseif (is_array($key)) {
|
||||
// Iterate array
|
||||
foreach ($key as $k) {
|
||||
$this->clear($k, $format);
|
||||
}
|
||||
} elseif (is_null($key)) {
|
||||
// Clear all data
|
||||
$this->data = [];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set data
|
||||
*
|
||||
* @param array $data
|
||||
*/
|
||||
public function setData(array $data)
|
||||
{
|
||||
$this->data = $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set data as a reference
|
||||
*
|
||||
* @param array $data
|
||||
*/
|
||||
public function setDataAsRef(array &$data)
|
||||
{
|
||||
$this->data = &$data;
|
||||
}
|
||||
|
||||
/**
|
||||
* ArrayAccess abstract methods
|
||||
*/
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
$this->set($offset, $value);
|
||||
}
|
||||
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return $this->has($offset);
|
||||
}
|
||||
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->get($offset);
|
||||
}
|
||||
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
$this->delete($offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic methods
|
||||
*/
|
||||
public function __set($key, $value = null)
|
||||
{
|
||||
$this->set($key, $value);
|
||||
}
|
||||
|
||||
public function __get($key)
|
||||
{
|
||||
return $this->get($key);
|
||||
}
|
||||
|
||||
public function __isset($key)
|
||||
{
|
||||
return $this->has($key);
|
||||
}
|
||||
|
||||
public function __unset($key)
|
||||
{
|
||||
$this->delete($key);
|
||||
}
|
||||
}
|
138
core/vendor/jsondb/JsonDb.php
vendored
Normal file
@ -0,0 +1,138 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Andrey Mistulov
|
||||
* Company: Aristos
|
||||
* Date: 14.03.2017
|
||||
* Time: 15:25
|
||||
*/
|
||||
|
||||
namespace Prowebcraft;
|
||||
|
||||
/**
|
||||
* Class Data
|
||||
* @package Aristos
|
||||
*/
|
||||
class JsonDb extends \Prowebcraft\Dot
|
||||
{
|
||||
protected $db = '';
|
||||
protected $data = null;
|
||||
protected $config = [];
|
||||
|
||||
public function __construct($config = [])
|
||||
{
|
||||
$this->config = array_merge([
|
||||
'name' => 'data.json',
|
||||
'backup' => 5,
|
||||
'dir' => getcwd(),
|
||||
'template' => getcwd() . DIRECTORY_SEPARATOR . 'data.template.json'
|
||||
], $config);
|
||||
$this->loadData();
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set value or array of values to path
|
||||
*
|
||||
* @param mixed $key Path or array of paths and values
|
||||
* @param mixed|null $value Value to set if path is not an array
|
||||
* @param bool $save Сохранить данные в базу
|
||||
* @return $this
|
||||
*/
|
||||
public function set($key, $value = null, $save = true)
|
||||
{
|
||||
parent::set($key, $value);
|
||||
if ($save) $this->save();
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add value or array of values to path
|
||||
*
|
||||
* @param mixed $key Path or array of paths and values
|
||||
* @param mixed|null $value Value to set if path is not an array
|
||||
* @param boolean $pop Helper to pop out last key if value is an array
|
||||
* @param bool $save Сохранить данные в базу
|
||||
* @return $this
|
||||
*/
|
||||
public function add($key, $value = null, $pop = false, $save = true)
|
||||
{
|
||||
parent::add($key, $value, $pop);
|
||||
if ($save) $this->save();
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete path or array of paths
|
||||
*
|
||||
* @param mixed $key Path or array of paths to delete
|
||||
* @param bool $save Сохранить данные в базу
|
||||
* @return $this
|
||||
*/
|
||||
public function delete($key, $save = true)
|
||||
{
|
||||
parent::delete($key);
|
||||
if ($save) $this->save();
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete all data, data from path or array of paths and
|
||||
* optionally format path if it doesn't exist
|
||||
*
|
||||
* @param mixed|null $key Path or array of paths to clean
|
||||
* @param boolean $format Format option
|
||||
* @param bool $save Сохранить данные в базу
|
||||
* @return $this
|
||||
*/
|
||||
public function clear($key = null, $format = false, $save = true)
|
||||
{
|
||||
parent::clear($key, $format);
|
||||
if ($save) $this->save();
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Загрузка локальной базы данных
|
||||
* @param bool $reload
|
||||
* Перезагрузить данные?
|
||||
* @return array|mixed|null
|
||||
*/
|
||||
protected function loadData($reload = false) {
|
||||
if ($this->data === null || $reload) {
|
||||
$this->db = $this->config['dir'] . DIRECTORY_SEPARATOR . $this->config['name'];
|
||||
if (!file_exists($this->db)) {
|
||||
$templateFile = $this->config['template'];
|
||||
if (file_exists($templateFile)) {
|
||||
copy($templateFile, $this->db);
|
||||
} else {
|
||||
file_put_contents($this->db, '{}');
|
||||
}
|
||||
} else {
|
||||
if ($this->config['backup']) {
|
||||
try {
|
||||
//todo make backup of database
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->data = json_decode(file_get_contents($this->db), true);
|
||||
if (!$this->data === null) {
|
||||
throw new \InvalidArgumentException('Database file ' . $this->db
|
||||
. ' contains invalid json object. Please validate or remove file');
|
||||
}
|
||||
}
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Сохранение в локальную базу
|
||||
*/
|
||||
public function save() {
|
||||
file_put_contents($this->db, json_encode($this->data, JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT));
|
||||
}
|
||||
|
||||
|
||||
}
|
8
core/vendor/simplelightbox/init.js
vendored
@ -1,10 +1,8 @@
|
||||
// Paramètres d'initialisation
|
||||
$(document).ready(function() {
|
||||
// Ajouter la classe Gallery afin de faire la liaison avec simplelightbox
|
||||
// Ajouter la classe Gallery afin de faire la liaison avec simplelightbox
|
||||
$("a[rel='gallery']").addClass("gallery translate");
|
||||
|
||||
|
||||
$("a[rel='gallery']").addClass(
|
||||
"gallery",""
|
||||
);
|
||||
$('.gallery').simpleLightbox({closeText:"×",captionsData:'alt'});
|
||||
|
||||
});
|
7
core/vendor/tinymce/init.js
vendored
@ -71,6 +71,8 @@ tinymce.init({
|
||||
statusbar: false,
|
||||
// Autorise l'ajout de script
|
||||
extended_valid_elements: "script[language|type|src]",
|
||||
// Autorise les styles dans le code source,
|
||||
valid_children : "+body[style]",
|
||||
// Bloque le dimensionnement des médias (car automatiquement en fullsize avec fitvids pour le responsive)
|
||||
media_dimensions: false,
|
||||
// Désactiver la dimension des images
|
||||
@ -166,6 +168,11 @@ tinymce.init({
|
||||
title: "Grille asymétrique : 10 - 2",
|
||||
url: baseUrl + "core/vendor/tinymce/templates/col10-2.html",
|
||||
description: "Grille adaptative sur 12 colonnes, sur mobile elles passent les unes en dessous des autres."
|
||||
},
|
||||
{
|
||||
title: "Paragraphe non traduit",
|
||||
url: baseUrl + "core/vendor/tinymce/templates/googtrans.html",
|
||||
description: "Empêche la traduction automatique par Google Traduction."
|
||||
}
|
||||
]
|
||||
});
|
||||
|
4
core/vendor/tinymce/templates/googtrans.html
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<div class="notranslate">
|
||||
<p>Saisissez ou copiez le passage à préserver.</p>
|
||||
</div>
|
||||
<style type="text/css">#googTransLogo {display:None;}</style>
|
986
core/vendor/translate/css/translateelement.css
vendored
Normal file
@ -0,0 +1,986 @@
|
||||
/* Copyright 2019 Google Inc. All Rights Reserved. */
|
||||
|
||||
body {
|
||||
top: 0px !important;
|
||||
}
|
||||
|
||||
.goog-te-banner-frame {
|
||||
left: 0px;
|
||||
top: -50px !important;
|
||||
height: 39px;
|
||||
width: 100%;
|
||||
z-index: 10000001;
|
||||
position: fixed;
|
||||
border: none !important;
|
||||
border-bottom: 1px solid #6b90da;
|
||||
margin: 0;
|
||||
-moz-box-shadow: 0 0 8px 1px #999999;
|
||||
-webkit-box-shadow: 0 0 8px 1px #999999;
|
||||
box-shadow: 0 0 8px 1px #999999;
|
||||
_position: absolute;
|
||||
}
|
||||
|
||||
.goog-te-menu-frame {
|
||||
z-index: 10000002;
|
||||
position: fixed;
|
||||
border: none;
|
||||
-moz-box-shadow: 0 3px 8px 2px #999999;
|
||||
-webkit-box-shadow: 0 3px 8px 2px #999999;
|
||||
box-shadow: 0 3px 8px 2px #999999;
|
||||
_position: absolute;
|
||||
}
|
||||
|
||||
.goog-te-ftab-frame {
|
||||
z-index: 10000000;
|
||||
border: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.goog-te-gadget {
|
||||
font-family: arial;
|
||||
font-size: 0px !important;
|
||||
color: transparent !important;
|
||||
white-space: nowrap;
|
||||
margin-right: 0px !important;
|
||||
margin-top: 2px !important;
|
||||
margin-bottom: 0px !important;
|
||||
width: 160px;
|
||||
margin-left: 15px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.goog-te-gadget img {
|
||||
vertical-align: middle;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.goog-te-gadget-simple {
|
||||
background-color: #fff;
|
||||
border-left: 1px solid #d5d5d5;
|
||||
border-top: 1px solid #9b9b9b;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
border-right: 1px solid #d5d5d5;
|
||||
font-size: 10pt;
|
||||
display: inline-block;
|
||||
padding-top: 1px;
|
||||
padding-bottom: 2px;
|
||||
cursor: pointer;
|
||||
zoom: 1;
|
||||
*display: inline;
|
||||
}
|
||||
|
||||
.goog-te-gadget-icon {
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
border: none;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.goog-te-combo {
|
||||
margin-left: 4px;
|
||||
margin-right: 4px;
|
||||
vertical-align: baseline;
|
||||
*vertical-align: middle;
|
||||
}
|
||||
|
||||
.goog-te-gadget .goog-te-combo {
|
||||
margin: 4px 0;
|
||||
margin-left: 4px;
|
||||
background-color: #d8d8d8;
|
||||
}
|
||||
|
||||
.goog-logo-link,
|
||||
.goog-logo-link:link,
|
||||
.goog-logo-link:visited,
|
||||
.goog-logo-link:hover,
|
||||
.goog-logo-link:active {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
color: #444;
|
||||
text-decoration: none;
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.goog-te-banner .goog-logo-link,
|
||||
.goog-close-link {
|
||||
display: block;
|
||||
margin: 0px 10px;
|
||||
}
|
||||
|
||||
.goog-te-banner .goog-logo-link {
|
||||
padding-top: 2px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.goog-te-combo,
|
||||
.goog-te-banner *,
|
||||
.goog-te-ftab *,
|
||||
.goog-te-menu *,
|
||||
.goog-te-menu2 *,
|
||||
.goog-te-balloon * {
|
||||
font-family: arial;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
.goog-te-banner {
|
||||
margin: 0;
|
||||
background-color: #e4effb;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.goog-te-banner img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.goog-te-banner-content {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.goog-te-banner-content img {
|
||||
vertical-align: middle
|
||||
}
|
||||
|
||||
.goog-te-banner-info {
|
||||
color: #666;
|
||||
vertical-align: top;
|
||||
margin-top: 0px;
|
||||
font-size: 7pt;
|
||||
}
|
||||
|
||||
.goog-te-banner-margin {
|
||||
width: 8px;
|
||||
}
|
||||
|
||||
.goog-te-button {
|
||||
border-color: #e7e7e7;
|
||||
border-style: none solid solid none;
|
||||
border-width: 0 1px 1px 0;
|
||||
}
|
||||
|
||||
.goog-te-button div {
|
||||
border-color: #cccccc #999999 #999999 #cccccc;
|
||||
border-right: 1px solid #999999;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.goog-te-button button {
|
||||
background: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
height: 20px;
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
vertical-align: top;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.goog-te-button button:active {
|
||||
background: none repeat scroll 0 0 #cccccc;
|
||||
}
|
||||
|
||||
.goog-te-ftab {
|
||||
margin: 0px;
|
||||
background-color: #fff;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.goog-te-ftab-link {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
font-size: 10pt;
|
||||
border: 1px outset #888;
|
||||
padding: 6px 10px;
|
||||
white-space: nowrap;
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
.goog-te-ftab-link img {
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
border: none;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.goog-te-ftab-link span {
|
||||
text-decoration: underline;
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.goog-float-top .goog-te-ftab-link {
|
||||
padding: 2px 2px;
|
||||
border-top-width: 0px;
|
||||
}
|
||||
|
||||
.goog-float-bottom .goog-te-ftab-link {
|
||||
padding: 2px 2px;
|
||||
border-bottom-width: 0px;
|
||||
}
|
||||
|
||||
.goog-te-menu-value {
|
||||
text-decoration: none;
|
||||
color: #0000cc;
|
||||
white-space: nowrap;
|
||||
margin-left: 4px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.goog-te-menu-value span {
|
||||
text-decoration: underline
|
||||
}
|
||||
|
||||
.goog-te-menu-value img {
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.goog-te-gadget-simple .goog-te-menu-value {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.goog-te-gadget-simple .goog-te-menu-value span {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.goog-te-menu {
|
||||
background-color: #ffffff;
|
||||
text-decoration: none;
|
||||
border: 2px solid #c3d9ff;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.goog-te-menu-item {
|
||||
padding: 3px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.goog-te-menu-item,
|
||||
.goog-te-menu-item:link {
|
||||
color: #0000cc;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.goog-te-menu-item:visited {
|
||||
color: #551a8b;
|
||||
}
|
||||
|
||||
.goog-te-menu-item:hover {
|
||||
background: #c3d9ff;
|
||||
}
|
||||
|
||||
.goog-te-menu-item:active {
|
||||
color: #0000cc;
|
||||
}
|
||||
|
||||
.goog-te-menu2 {
|
||||
background-color: #ffffff;
|
||||
text-decoration: none;
|
||||
border: 1px solid #6b90da;
|
||||
overflow: hidden;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.goog-te-menu2-colpad {
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.goog-te-menu2-separator {
|
||||
margin: 6px 0;
|
||||
height: 1px;
|
||||
background-color: #aaa;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.goog-te-menu2-item div,
|
||||
.goog-te-menu2-item-selected div {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.goog-te-menu2-item .indicator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.goog-te-menu2-item-selected .indicator {
|
||||
display: auto;
|
||||
}
|
||||
|
||||
.goog-te-menu2-item-selected .text {
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
.goog-te-menu2-item,
|
||||
.goog-te-menu2-item-selected {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.goog-te-menu2-item div,
|
||||
.goog-te-menu2-item:link div,
|
||||
.goog-te-menu2-item:visited div,
|
||||
.goog-te-menu2-item:active div {
|
||||
color: #0000cc;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.goog-te-menu2-item:hover div {
|
||||
color: #ffffff;
|
||||
background: #3366cc;
|
||||
}
|
||||
|
||||
.goog-te-menu2-item-selected div,
|
||||
.goog-te-menu2-item-selected:link div,
|
||||
.goog-te-menu2-item-selected:visited div,
|
||||
.goog-te-menu2-item-selected:hover div,
|
||||
.goog-te-menu2-item-selected:active div {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.goog-te-balloon {
|
||||
background-color: #ffffff;
|
||||
overflow: hidden;
|
||||
padding: 8px;
|
||||
border: none;
|
||||
-moz-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.goog-te-balloon-frame {
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #6b90da;
|
||||
-moz-box-shadow: 0 3px 8px 2px #999999;
|
||||
-webkit-box-shadow: 0 3px 8px 2px #999999;
|
||||
box-shadow: 0 3px 8px 2px #999999;
|
||||
-moz-border-radius: 8px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.goog-te-balloon img {
|
||||
border: none
|
||||
}
|
||||
|
||||
.goog-te-balloon-text {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.goog-te-balloon-zippy {
|
||||
margin-top: 6px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.goog-te-balloon-zippy * {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.goog-te-balloon-zippy .minus {
|
||||
background-image: url(//www.google.com/images/zippy_minus_sm.gif);
|
||||
}
|
||||
|
||||
.goog-te-balloon-zippy .plus {
|
||||
background-image: url(//www.google.com/images/zippy_plus_sm.gif);
|
||||
}
|
||||
|
||||
.goog-te-balloon-zippy span {
|
||||
color: #00c;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
.goog-te-balloon-form {
|
||||
margin: 6px 0 0 0;
|
||||
}
|
||||
|
||||
.goog-te-balloon-form form {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.goog-te-balloon-form form textarea {
|
||||
margin-bottom: 4px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.goog-te-balloon-footer {
|
||||
margin: 6px 0 4px 0;
|
||||
}
|
||||
|
||||
.goog-te-spinner-pos {
|
||||
z-index: 1000;
|
||||
position: fixed;
|
||||
transition-delay: 0.6s;
|
||||
left: -1000px;
|
||||
top: -1000px;
|
||||
}
|
||||
|
||||
.goog-te-spinner-animation {
|
||||
background: #ccc;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 104px;
|
||||
height: 104px;
|
||||
border-radius: 50px;
|
||||
background: #fff url(//www.gstatic.com/images/branding/product/2x/translate_24dp.png) 50% 50% no-repeat;
|
||||
transition: all 0.6s ease-in-out;
|
||||
transform: scale(0.4);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.goog-te-spinner-animation-show {
|
||||
transform: scale(0.5);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.goog-te-spinner {
|
||||
margin: 2px 0 0 2px;
|
||||
animation: goog-te-spinner-rotator 1.4s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes goog-te-spinner-rotator {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(270deg);
|
||||
}
|
||||
}
|
||||
|
||||
.goog-te-spinner-path {
|
||||
stroke-dasharray: 187;
|
||||
stroke-dashoffset: 0;
|
||||
stroke: #4285f4;
|
||||
transform-origin: center;
|
||||
animation: goog-te-spinner-dash 1.4s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes goog-te-spinner-dash {
|
||||
0% {
|
||||
stroke-dashoffset: 187;
|
||||
}
|
||||
50% {
|
||||
stroke-dashoffset: 46.75;
|
||||
transform: rotate(135deg)
|
||||
}
|
||||
100% {
|
||||
stroke-dashoffset: 187;
|
||||
transform: rotate(450deg)
|
||||
}
|
||||
}
|
||||
|
||||
#goog-gt-tt html,
|
||||
#goog-gt-tt body,
|
||||
#goog-gt-tt div,
|
||||
#goog-gt-tt span,
|
||||
#goog-gt-tt iframe,
|
||||
#goog-gt-tt h1,
|
||||
#goog-gt-tt h2,
|
||||
#goog-gt-tt h3,
|
||||
#goog-gt-tt h4,
|
||||
#goog-gt-tt h5,
|
||||
#goog-gt-tt h6,
|
||||
#goog-gt-tt p,
|
||||
#goog-gt-tt a,
|
||||
#goog-gt-tt img,
|
||||
#goog-gt-tt ol,
|
||||
#goog-gt-tt ul,
|
||||
#goog-gt-tt li,
|
||||
#goog-gt-tt table,
|
||||
#goog-gt-tt form,
|
||||
#goog-gt-tt tbody,
|
||||
#goog-gt-tt tr,
|
||||
#goog-gt-tt td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
text-align: left;
|
||||
line-height: normal;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#goog-gt-tt ol,
|
||||
#goog-gt-tt ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#goog-gt-tt table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
#goog-gt-tt caption,
|
||||
#goog-gt-tt th,
|
||||
#goog-gt-tt td {
|
||||
text-align: left;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#goog-gt-tt input::-moz-focus-inner {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#goog-gt-tt .original-text,
|
||||
.gt-hl-layer {
|
||||
clear: both;
|
||||
font-size: 10pt;
|
||||
position: relative;
|
||||
text-align: justify;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#goog-gt-tt .title {
|
||||
color: #999;
|
||||
font-family: arial, sans-serif;
|
||||
margin: 4px 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#goog-gt-tt .close-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#goog-gt-tt .logo {
|
||||
float: left;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
#goog-gt-tt .activity-links {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#goog-gt-tt .started-activity-container {
|
||||
display: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#goog-gt-tt .activity-root {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#goog-gt-tt .left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#goog-gt-tt .right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#goog-gt-tt .bottom {
|
||||
min-height: 15px;
|
||||
position: relative;
|
||||
height: 1%;
|
||||
}
|
||||
|
||||
#goog-gt-tt .status-message {
|
||||
background: -moz-linear-gradient(top, #29910d 0%, #20af0e 100%);
|
||||
background: -webkit-linear-gradient(top, #29910d 0%, #20af0e 100%);
|
||||
background: -o-linear-gradient(top, #29910d 0%, #20af0e 100%);
|
||||
background: -ms-linear-gradient(top, #29910d 0%, #20af0e 100%);
|
||||
background: linear-gradient(top, #29910d 0%, #20af0e 100%);
|
||||
background: #29910d;
|
||||
border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
box-shadow: inset 0px 2px 2px #1e6609;
|
||||
-moz-box-shadow: inset 0px 2px 2px #1e6609;
|
||||
-webkit-box-shadow: inset 0px 2px 2px #1e6609;
|
||||
color: white;
|
||||
font-size: 9pt;
|
||||
font-weight: bolder;
|
||||
margin-top: 12px;
|
||||
padding: 6px;
|
||||
text-shadow: 1px 1px 1px #1e6609;
|
||||
}
|
||||
|
||||
#goog-gt-tt .activity-link {
|
||||
color: #1155cc;
|
||||
cursor: pointer;
|
||||
font-family: arial;
|
||||
font-size: 11px;
|
||||
margin-right: 15px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#goog-gt-tt textarea {
|
||||
font-family: arial;
|
||||
resize: vertical;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
-webkit-border-radius: 1px;
|
||||
-moz-border-radius: 1px;
|
||||
border-radius: 1px;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-top: 1px solid silver;
|
||||
font-size: 13px;
|
||||
height: auto;
|
||||
overflow-y: auto;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
#goog-gt-tt textarea:focus {
|
||||
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
|
||||
-moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
|
||||
border: 1px solid #4d90fe;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#goog-gt-tt .activity-cancel {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#goog-gt-tt .translate-form {
|
||||
min-height: 25px;
|
||||
vertical-align: middle;
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
#goog-gt-tt .translate-form .activity-form {
|
||||
margin-bottom: 5px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
#goog-gt-tt .translate-form .activity-form input {
|
||||
display: inline-block;
|
||||
min-width: 54px;
|
||||
*min-width: 70px;
|
||||
border: 1px solid #dcdcdc;
|
||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||
text-align: center;
|
||||
color: #444;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
height: 27px;
|
||||
outline: 0;
|
||||
padding: 0 8px;
|
||||
vertical-align: middle;
|
||||
line-height: 27px;
|
||||
margin: 0 16px 0 0;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
|
||||
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
|
||||
-webkit-border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
-webkit-transition: all 0.218s;
|
||||
-moz-transition: all 0.218s;
|
||||
-o-transition: all 0.218s;
|
||||
transition: all 0.218s;
|
||||
background-color: #f5f5f5;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#f1f1f1));
|
||||
background-image: -webkit-linear-gradient(top, #f5f5f5, #f1f1f1);
|
||||
background-image: -moz-linear-gradient(top, #f5f5f5, #f1f1f1);
|
||||
background-image: -ms-linear-gradient(top, #f5f5f5, #f1f1f1);
|
||||
background-image: -o-linear-gradient(top, #f5f5f5, #f1f1f1);
|
||||
background-image: linear-gradient(top, #f5f5f5, #f1f1f1);
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
#goog-gt-tt .translate-form .activity-form input:hover {
|
||||
border: 1px solid #c6c6c6;
|
||||
color: #222;
|
||||
-webkit-transition: all 0.0s;
|
||||
-moz-transition: all 0.0s;
|
||||
-o-transition: all 0.0s;
|
||||
transition: all 0.0s;
|
||||
background-color: #f8f8f8;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f8f8f8), to(#f1f1f1));
|
||||
background-image: -webkit-linear-gradient(top, #f8f8f8, #f1f1f1);
|
||||
background-image: -moz-linear-gradient(top, #f8f8f8, #f1f1f1);
|
||||
background-image: -ms-linear-gradient(top, #f8f8f8, #f1f1f1);
|
||||
background-image: -o-linear-gradient(top, #f8f8f8, #f1f1f1);
|
||||
background-image: linear-gradient(top, #f8f8f8, #f1f1f1);
|
||||
}
|
||||
|
||||
#goog-gt-tt .translate-form .activity-form input:active {
|
||||
border: 1px solid #c6c6c6;
|
||||
color: #333;
|
||||
background-color: #f6f6f6;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#f1f1f1));
|
||||
background-image: -webkit-linear-gradient(top, #f6f6f6, #f1f1f1);
|
||||
background-image: -moz-linear-gradient(top, #f6f6f6, #f1f1f1);
|
||||
background-image: -ms-linear-gradient(top, #f6f6f6, #f1f1f1);
|
||||
background-image: -o-linear-gradient(top, #f6f6f6, #f1f1f1);
|
||||
background-image: linear-gradient(top, #f6f6f6, #f1f1f1);
|
||||
}
|
||||
|
||||
#goog-gt-tt .translate-form .activity-form input:focus #goog-gt-tt .translate-form .activity-form input.focus #goog-gt-tt .translate-form .activity-form input:active,
|
||||
#goog-gt-tt .translate-form .activity-form input:focus:active,
|
||||
#goog-gt-tt .translate-form .activity-form input:.focus:active {
|
||||
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
|
||||
-webkit-box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
|
||||
-moz-box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
#goog-gt-tt .translate-form .activity-form input:focus,
|
||||
#goog-gt-tt .translate-form .activity-form input.focus {
|
||||
outline: none;
|
||||
border: 1px solid #4d90fe;
|
||||
z-index: 4!important;
|
||||
}
|
||||
|
||||
#goog-gt-tt .translate-form .activity-form input.selected {
|
||||
background-color: #eeeeee;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), to(#e0e0e0));
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee, #e0e0e0);
|
||||
background-image: -moz-linear-gradient(top, #eeeeee, #e0e0e0);
|
||||
background-image: -ms-linear-gradient(top, #eeeeee, #e0e0e0);
|
||||
background-image: -o-linear-gradient(top, #eeeeee, #e0e0e0);
|
||||
background-image: linear-gradient(top, #eeeeee, #e0e0e0);
|
||||
-webkit-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.1);
|
||||
-moz-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.1);
|
||||
border: 1px solid #ccc;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#goog-gt-tt .translate-form .activity-form input.activity-submit {
|
||||
color: white;
|
||||
border-color: #3079ed;
|
||||
background-color: #4d90fe;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#4d90fe), to(#4787ed));
|
||||
background-image: -webkit-linear-gradient(top, #4d90fe, #4787ed);
|
||||
background-image: -moz-linear-gradient(top, #4d90fe, #4787ed);
|
||||
background-image: -ms-linear-gradient(top, #4d90fe, #4787ed);
|
||||
background-image: -o-linear-gradient(top, #4d90fe, #4787ed);
|
||||
background-image: linear-gradient(top, #4d90fe, #4787ed);
|
||||
}
|
||||
|
||||
#goog-gt-tt .translate-form .activity-form input.activity-submit:hover #goog-gt-tt .translate-form .activity-form input.activity-submit:focus,
|
||||
#goog-gt-tt .translate-form .activity-form input.activity-submit.focus #goog-gt-tt .translate-form .activity-form input.activity-submit:active {
|
||||
border-color: #3079ed;
|
||||
background-color: #357ae8;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#4d90fe), to(#357ae8));
|
||||
background-image: -webkit-linear-gradient(top, #4d90fe, #357ae8);
|
||||
background-image: -moz-linear-gradient(top, #4d90fe, #357ae8);
|
||||
background-image: -ms-linear-gradient(top, #4d90fe, #357ae8);
|
||||
background-image: -o-linear-gradient(top, #4d90fe, #357ae8);
|
||||
background-image: linear-gradient(top, #4d90fe, #357ae8);
|
||||
}
|
||||
|
||||
#goog-gt-tt .translate-form .activity-form input.activity-submit:hover {
|
||||
box-shadow: inset 0 0 0 1px #fff, 0px 1px 1px rgba(0, 0, 0, 0.1);
|
||||
-webkit-box-shadow: inset 0 0 0 1px #fff, 0px 1px 1px rgba(0, 0, 0, 0.1);
|
||||
-moz-box-shadow: inset 0 0 0 1px #fff, 0px 1px 1px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
#goog-gt-tt .translate-form .activity-form input:focus,
|
||||
#goog-gt-tt .translate-form .activity-form input.focus,
|
||||
#goog-gt-tt .translate-form .activity-form input:active,
|
||||
#goog-gt-tt .translate-form .activity-form input:hover,
|
||||
#goog-gt-tt .translate-form .activity-form input.activity-submit:focus,
|
||||
#goog-gt-tt .translate-form .activity-form input.activity-submit.focus,
|
||||
#goog-gt-tt .translate-form .activity-form input.activity-submit:active,
|
||||
#goog-gt-tt .translate-form .activity-form input.activity-submit:hover {
|
||||
border-color: #3079ed;
|
||||
}
|
||||
|
||||
#goog-gt-tt .gray {
|
||||
color: #999;
|
||||
font-family: arial, sans-serif
|
||||
}
|
||||
|
||||
#goog-gt-tt .alt-helper-text {
|
||||
color: #999;
|
||||
font-size: 11px;
|
||||
font-family: arial, sans-serif;
|
||||
margin: 15px 0px 5px 0px;
|
||||
}
|
||||
|
||||
#goog-gt-tt .alt-error-text {
|
||||
color: #800;
|
||||
display: none;
|
||||
font-size: 9pt;
|
||||
}
|
||||
|
||||
.goog-text-highlight {
|
||||
background-color: #c9d7f1;
|
||||
-webkit-box-shadow: 2px 2px 4px #9999aa;
|
||||
-moz-box-shadow: 2px 2px 4px #9999aa;
|
||||
box-shadow: 2px 2px 4px #9999aa;
|
||||
box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#goog-gt-tt .alt-menu.goog-menu {
|
||||
background: #ffffff;
|
||||
border: 1px solid #dddddd;
|
||||
-webkit-box-shadow: 0px 3px 3px #888;
|
||||
-moz-box-shadow: 0px 2px 20px #888;
|
||||
box-shadow: 0px 2px 4px #99a;
|
||||
min-width: 0;
|
||||
outline: none;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
z-index: 2000;
|
||||
}
|
||||
|
||||
#goog-gt-tt .alt-menu .goog-menuitem {
|
||||
cursor: pointer;
|
||||
padding: 2px 5px 5px;
|
||||
margin-right: 0px;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
#goog-gt-tt .alt-menu div.goog-menuitem:hover {
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
#goog-gt-tt .alt-menu .goog-menuitem h1 {
|
||||
font-size: 100%;
|
||||
font-weight: bold;
|
||||
margin: 4px 0px;
|
||||
}
|
||||
|
||||
#goog-gt-tt .alt-menu .goog-menuitem strong {
|
||||
color: #345aad
|
||||
}
|
||||
|
||||
#goog-gt-tt .goog-submenu-arrow {
|
||||
text-align: right;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
#goog-gt-tt .goog-menuitem-rtl .goog-submenu-arrow {
|
||||
text-align: left;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
#goog-gt-tt .gt-hl-text,
|
||||
#goog-gt-tt .trans-target-highlight {
|
||||
background-color: #f1ea00;
|
||||
border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
-moz-box-shadow: rgba(0, 0, 0, .5) 3px 3px 4px;
|
||||
-webkit-box-shadow: rgba(0, 0, 0, .5) 3px 3px 4px;
|
||||
box-shadow: rgba(0, 0, 0, .5) 3px 3px 4px;
|
||||
box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
color: #f1ea00;
|
||||
cursor: pointer;
|
||||
margin: -2px -2px -2px -3px;
|
||||
padding: 2px 2px 2px 3px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#goog-gt-tt .trans-target-highlight {
|
||||
color: #222;
|
||||
}
|
||||
|
||||
#goog-gt-tt .gt-hl-layer {
|
||||
color: white;
|
||||
position: absolute!important;
|
||||
}
|
||||
|
||||
#goog-gt-tt .trans-target,
|
||||
#goog-gt-tt .trans-target .trans-target-highlight {
|
||||
background-color: #c9d7f1;
|
||||
border-radius: 4px 4px 0px 0px;
|
||||
-webkit-border-radius: 4px 4px 0px 0px;
|
||||
-moz-border-radius: 4px 4px 0px 0px;
|
||||
-moz-box-shadow: rgba(0, 0, 0, .5) 3px 3px 4px;
|
||||
-webkit-box-shadow: rgba(0, 0, 0, .5) 3px 3px 4px;
|
||||
box-shadow: rgba(0, 0, 0, .5) 3px 3px 4px;
|
||||
box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
margin: -2px -2px -2px -3px;
|
||||
padding: 2px 2px 3px 3px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#goog-gt-tt span:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#goog-gt-tt .trans-edit {
|
||||
background-color: transparent;
|
||||
border: 1px solid #4d90fe;
|
||||
border-radius: 0em;
|
||||
-webkit-border-radius: 0em;
|
||||
-moz-border-radius: 0em;
|
||||
margin: -2px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
#goog-gt-tt .gt-trans-highlight-l {
|
||||
border-left: 2px solid red;
|
||||
margin-left: -2px
|
||||
}
|
||||
|
||||
#goog-gt-tt .gt-trans-highlight-r {
|
||||
border-right: 2px solid red;
|
||||
margin-right: -2px;
|
||||
}
|
||||
|
||||
#goog-gt-tt #alt-input {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#goog-gt-tt #alt-input-text {
|
||||
font-size: 11px;
|
||||
padding: 2px 2px 3px;
|
||||
margin: 0;
|
||||
background-color: #fff;
|
||||
color: #333;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-top: 1px solid #c0c0c0;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
height: 21px;
|
||||
box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-border-radius: 1px;
|
||||
}
|
||||
|
||||
#goog-gt-tt #alt-input-text:hover {
|
||||
border: 1px solid #b9b9b9;
|
||||
border-top: 1px solid #a0a0a0;
|
||||
-webkit-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.1);
|
||||
-moz-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
#goog-gt-tt #alt-input-text:focus {
|
||||
-webkit-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.3);
|
||||
-moz-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.3);
|
||||
outline: none;
|
||||
border: 1px solid #4d90fe;
|
||||
}
|
||||
|
||||
#goog-gt-tt #alt-input-submit {
|
||||
font-size: 11px;
|
||||
padding: 2px 6px 3px;
|
||||
margin: 0 0 0 2px;
|
||||
height: 21px;
|
||||
}
|
5
core/vendor/translate/inc.json
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
[
|
||||
"translate.js",
|
||||
"translation.js",
|
||||
"css/translateelement.css"
|
||||
]
|
68
core/vendor/translate/translate.js
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
(function () {
|
||||
var gtConstEvalStartTime = new Date();
|
||||
|
||||
function d(b) {
|
||||
var a = document.getElementsByTagName("head")[0];
|
||||
a || (a = document.body.parentNode.appendChild(document.createElement("head")));
|
||||
a.appendChild(b)
|
||||
}
|
||||
|
||||
function _loadJs(b) {
|
||||
var a = document.createElement("script");
|
||||
a.type = "text/javascript";
|
||||
a.charset = "UTF-8";
|
||||
a.src = b;
|
||||
d(a)
|
||||
}
|
||||
|
||||
function _loadCss(b) {
|
||||
var a = document.createElement("link");
|
||||
a.type = "text/css";
|
||||
a.rel = "stylesheet";
|
||||
a.charset = "UTF-8";
|
||||
a.href = b;
|
||||
d(a)
|
||||
}
|
||||
|
||||
function _isNS(b) {
|
||||
b = b.split(".");
|
||||
for (var a = window, c = 0; c < b.length; ++c)
|
||||
if (!(a = a[b[c]])) return !1;
|
||||
return !0
|
||||
}
|
||||
|
||||
function _setupNS(b) {
|
||||
b = b.split(".");
|
||||
for (var a = window, c = 0; c < b.length; ++c) a.hasOwnProperty ? a.hasOwnProperty(b[c]) ? a = a[b[c]] : a = a[b[c]] = {} : a = a[b[c]] || (a[b[c]] = {});
|
||||
return a
|
||||
}
|
||||
window.addEventListener && "undefined" == typeof document.readyState && window.addEventListener("DOMContentLoaded", function () {
|
||||
document.readyState = "complete"
|
||||
}, !1);
|
||||
if (_isNS('google.translate.Element')) {
|
||||
return
|
||||
}(function () {
|
||||
var c = _setupNS('google.translate._const');
|
||||
c._cest = gtConstEvalStartTime;
|
||||
gtConstEvalStartTime = undefined;
|
||||
c._cl = 'fr';
|
||||
c._cuc = 'googleTranslateElementInit';
|
||||
c._cac = '';
|
||||
c._cam = '';
|
||||
c._ctkk = '433074.3898829376';
|
||||
var h = 'translate.googleapis.com';
|
||||
var s = (true ? 'https' : window.location.protocol == 'https:' ? 'https' : 'http') + '://';
|
||||
var b = s + h;
|
||||
c._pah = h;
|
||||
c._pas = s;
|
||||
c._pbi = b + '/translate_static/img/te_bk.gif';
|
||||
c._pci = b + '/translate_static/img/te_ctrl3.gif';
|
||||
c._pli = b + '/translate_static/img/loading.gif';
|
||||
c._plla = h + '/translate_a/l';
|
||||
c._pmi = b + '/translate_static/img/mini_google.png';
|
||||
c._ps = b + '/translate_static/css/translateelement.css';
|
||||
c._puh = 'translate.google.com';
|
||||
_loadCss(c._ps);
|
||||
_loadJs(b + '/translate_static/js/element/main_fr.js');
|
||||
})();
|
||||
})();
|
5
core/vendor/translate/translation.js
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
function googleTranslateElementInit() {
|
||||
new google.translate.TranslateElement({
|
||||
pageLanguage: 'fr'
|
||||
}, 'google_translate_element');
|
||||
}
|
@ -23,12 +23,16 @@ if(version_compare(PHP_VERSION, '5.6.0', '<')) {
|
||||
|
||||
/* Set locale to French */
|
||||
date_default_timezone_set('Europe/Paris');
|
||||
setlocale (LC_TIME, 'fr_FR', 'french');
|
||||
setlocale (LC_TIME, 'fra_FRA', 'french');
|
||||
|
||||
/**
|
||||
* Initialisation de Zwii
|
||||
*/
|
||||
session_start();
|
||||
// Chargement des classes
|
||||
require 'core/class/autoload.php';
|
||||
autoload::autoloader();
|
||||
// Chargement du coeur
|
||||
require 'core/core.php';
|
||||
$core = new core;
|
||||
spl_autoload_register('core::autoload');
|
||||
|
@ -12,6 +12,8 @@
|
||||
* @link http://zwiicms.com/
|
||||
*/
|
||||
|
||||
|
||||
|
||||
class blog extends common {
|
||||
|
||||
public static $actions = [
|
||||
@ -348,7 +350,7 @@ class blog extends common {
|
||||
}
|
||||
}
|
||||
// Envoi du mail $sent code d'erreur ou de réusssite
|
||||
if ($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'mailNotification']) === true) {
|
||||
if ($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'mailNotification']) === true) {
|
||||
$sent = $this->sendMail(
|
||||
$to,
|
||||
'Nouveau commentaire',
|
||||
|
@ -9,11 +9,12 @@
|
||||
* @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-2019, Frédéric Tempez
|
||||
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
|
||||
* @license GNU General Public License, version 3
|
||||
* @link http://zwiicms.com/
|
||||
*/
|
||||
|
||||
|
||||
class form extends common {
|
||||
|
||||
public static $actions = [
|
||||
@ -166,7 +167,7 @@ class form extends common {
|
||||
/**
|
||||
* Export CSV
|
||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||
* @copyright Copyright (C) 2018-2019, Frédéric Tempez
|
||||
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
|
||||
*/
|
||||
public function export2csv() {
|
||||
// Jeton incorrect
|
||||
@ -292,6 +293,7 @@ class form extends common {
|
||||
// Préparation le contenu du mail
|
||||
$data = [];
|
||||
$content = '';
|
||||
$sent = false;
|
||||
foreach($this->getData(['module', $this->getUrl(0), 'input']) as $index => $input) {
|
||||
// Filtre la valeur
|
||||
switch($input['type']) {
|
||||
@ -317,52 +319,54 @@ class form extends common {
|
||||
$content .= '<strong>' . $this->getData(['module', $this->getUrl(0), 'input', $index, 'name']) . ' :</strong> ' . $value . '<br>';
|
||||
}
|
||||
// Crée les données
|
||||
$this->setData(['module', $this->getUrl(0), 'data', helper::increment(1, $this->getData(['module', $this->getUrl(0), 'data'])), $data]);
|
||||
$success = $this->setData(['module', $this->getUrl(0), 'data', helper::increment(1, $this->getData(['module', $this->getUrl(0), 'data'])), $data]);
|
||||
// Envoi du mail
|
||||
// Rechercher l'adresse en fonction du mail
|
||||
$sent = true;
|
||||
$singleuser = $this->getData(['user',
|
||||
$this->getData(['module', $this->getUrl(0), 'config', 'user']),
|
||||
'mail']);
|
||||
$singlemail = $this->getData(['module', $this->getUrl(0), 'config', 'mail']);
|
||||
$group = $this->getData(['module', $this->getUrl(0), 'config', 'group']);
|
||||
// Verification si le mail peut être envoyé
|
||||
if(
|
||||
self::$inputNotices === [] && (
|
||||
$group > 0 ||
|
||||
$singleuser !== '' ||
|
||||
$singlemail !== '' )
|
||||
) {
|
||||
// Utilisateurs dans le groupe
|
||||
$to = [];
|
||||
if ($group > 0){
|
||||
foreach($this->getData(['user']) as $userId => $user) {
|
||||
if($user['group'] >= $group) {
|
||||
$to[] = $user['mail'];
|
||||
if ($success === true) {
|
||||
// Rechercher l'adresse en fonction du mail
|
||||
$singleuser = $this->getData(['user',
|
||||
$this->getData(['module', $this->getUrl(0), 'config', 'user']),
|
||||
'mail']);
|
||||
$singlemail = $this->getData(['module', $this->getUrl(0), 'config', 'mail']);
|
||||
$group = $this->getData(['module', $this->getUrl(0), 'config', 'group']);
|
||||
// Verification si le mail peut être envoyé
|
||||
if(
|
||||
self::$inputNotices === [] && (
|
||||
$group > 0 ||
|
||||
$singleuser !== '' ||
|
||||
$singlemail !== '' )
|
||||
) {
|
||||
// Utilisateurs dans le groupe
|
||||
$to = [];
|
||||
if ($group > 0){
|
||||
foreach($this->getData(['user']) as $userId => $user) {
|
||||
if($user['group'] >= $group) {
|
||||
$to[] = $user['mail'];
|
||||
}
|
||||
}
|
||||
}
|
||||
// Utilisateur désigné
|
||||
if (!empty($singleuser)) {
|
||||
$to[] = $singleuser;
|
||||
}
|
||||
}
|
||||
// Utilisateur désigné
|
||||
if (!empty($singleuser)) {
|
||||
$to[] = $singleuser;
|
||||
}
|
||||
// Mail désigné
|
||||
if (!empty($singlemail)) {
|
||||
$to[] = $singlemail;
|
||||
}
|
||||
if($to) {
|
||||
// Sujet du mail
|
||||
$subject = $this->getData(['module', $this->getUrl(0), 'config', 'subject']);
|
||||
if($subject === '') {
|
||||
$subject = 'Nouveau message en provenance de votre site';
|
||||
// Mail désigné
|
||||
if (!empty($singlemail)) {
|
||||
$to[] = $singlemail;
|
||||
}
|
||||
if($to) {
|
||||
// Sujet du mail
|
||||
$subject = $this->getData(['module', $this->getUrl(0), 'config', 'subject']);
|
||||
if($subject === '') {
|
||||
$subject = 'Nouveau message en provenance de votre site';
|
||||
}
|
||||
|
||||
// Envoi le mail
|
||||
$sent = $this->sendMail(
|
||||
$to,
|
||||
$subject,
|
||||
'Nouveau message en provenance de la page "' . $this->getData(['page', $this->getUrl(0), 'title']) . '" :<br><br>' .
|
||||
$content
|
||||
);
|
||||
}
|
||||
// Envoi le mail
|
||||
$sent = $this->sendMail(
|
||||
$to,
|
||||
$subject,
|
||||
'Nouveau message en provenance de la page "' . $this->getData(['page', $this->getUrl(0), 'title']) . '" :<br><br>' .
|
||||
$content
|
||||
);
|
||||
}
|
||||
}
|
||||
// Redirection
|
||||
|
@ -303,4 +303,4 @@ class galleriesHelper extends helper {
|
||||
}
|
||||
return $dirContent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,4 +18,10 @@ $(".galleryGalleryPicture").simpleLightbox({
|
||||
captionType: "data",
|
||||
captionsData: "caption",
|
||||
closeText: "×"
|
||||
});
|
||||
});
|
||||
|
||||
// Traduite les légendes
|
||||
$(".galleryGalleryPicture").on("click", function() {
|
||||
$('body').removeClass("notranslate");
|
||||
});
|
||||
|
||||
|