Compare commits

...

354 Commits

Author SHA1 Message Date
lapervenche 674c98d9d4 Merge pull request '10400' (#3) from ZwiiCMS-Team/ZwiiCMS:10400 into 10400
Reviewed-on: #3
2021-02-09 20:02:49 +01:00
fredtempez 418f5d74d2 Faille csrf : réinitialisation du custom.css 2021-02-06 20:01:10 +01:00
fredtempez 9367721d99 bug de présentation login 2021-02-06 19:05:46 +01:00
Prof Langues e9c3c2ba22 Changes 2021-02-05 11:28:58 +01:00
Prof Langues 17a7b63761 Bug sélecteur de fichier label de type block plutôt que inline-block 2021-02-05 11:23:08 +01:00
Prof Langues 2935a4dd8e Active la position fixe sur contain ou cover dans l'image d'arrière plan 2021-02-05 10:07:58 +01:00
Prof Langues f6c1e2a9f3 Form numéro de version 2021-02-04 16:55:29 +01:00
Prof Langues 3facabaeca Form 2.6 Caractères spéciaux mal affichés dans les noms des champs du formulaire lors de l'édition 2021-02-04 16:52:37 +01:00
Prof Langues 3b8b09df59 015 Effets d'agrandissements de l'image en arrière plan lorsque la page s'étire 2021-02-04 16:41:54 +01:00
fredtempez 0f85512bb8 Bug page null dans les modules 2021-01-30 12:25:03 +01:00
fredtempez da87070418 Nettoyage des codes i18n 2021-01-16 19:09:21 +01:00
fredtempez 2b8466428d data htaccess 2021-01-14 14:48:00 +01:00
fredtempez d4d8f0eab5 Neutraliser cookie langue 2021-01-13 19:08:28 +01:00
fredtempez 668fda3d1d Supprimer la clé 'keywordColor' 2021-01-13 19:03:37 +01:00
fredtempez 9b8d8c603f supprimer un test 2021-01-13 18:47:30 +01:00
fredtempez 0feee84a23 Blog 1.4 initialisation et couleur des mots clés par instance 2021-01-13 18:45:39 +01:00
fredtempez f86eee254c remove getUrl fix 2021-01-09 13:49:25 +01:00
fredtempez 29a2524231 remove htaccess fix 2021-01-09 13:46:33 +01:00
fredtempez 2ad68ca01d changes 2021-01-09 11:32:44 +01:00
lapervenche 992681568f Merge pull request '10400' (#1) from ZwiiCMS-Team/ZwiiCMS:10400 into 10400
Reviewed-on: #1
2021-01-08 16:19:45 +01:00
fredtempez d6f97b03bb fbclid dans htaccess avec la réécriture 2021-01-08 15:21:15 +01:00
fredtempez 78e6dd7adc Remove Facebook fbclid 2021-01-08 15:13:16 +01:00
fredtempez f22eda7e6d Blog notification 2021-01-08 10:49:31 +01:00
fredtempez beff8b1012 marqueur filebackup pas dans les données de site mais un fichier .backup 2021-01-08 10:37:56 +01:00
fredtempez 29036af835 mail de notification nom erroné 2021-01-07 09:49:57 +01:00
fredtempez f8683cc9e6 .backup marqueur du backup 2021-01-07 09:48:53 +01:00
fredtempez 7be1dff6aa Option d'activation ou de suppression des fichiers back.json qui deviennent backup.json 2021-01-06 19:31:55 +01:00
fredtempez 6d184fb0e4 Merge branch 'master' into 10400 2021-01-06 14:40:08 +01:00
Fred Tempez 37278e626f Mise à jour de 'README.md' 2021-01-06 14:39:08 +01:00
fredtempez c8a313687f change 2021-01-06 14:33:52 +01:00
fredtempez 3a637cc9fb Merge branch '10313' into 10400 2021-01-04 17:58:36 +01:00
fredtempez bb782a7e8f Nom des fichiers de backup + htaccess 2021-01-04 17:54:47 +01:00
fredtempez ba7ceaa2cf Merge branch '10313' into 10400 2021-01-04 17:44:45 +01:00
fredtempez b9864fbfb8 login message erroné 2021-01-04 17:33:38 +01:00
fredtempez 18bfadec1f Préfixe _ 2021-01-03 18:52:36 +01:00
fredtempez aa2bfa5ddb Amélioration journalisation 2021-01-03 18:41:25 +01:00
fredtempez e7bd96af39 Merge branch '10313' into 10400 2021-01-03 15:12:26 +01:00
fredtempez 03b9ee2094 Ajout de script dans Tinymce 2021-01-03 15:09:53 +01:00
fredtempez 7699120fe1 Merge branch '10313' into 10400 2021-01-02 17:24:30 +01:00
fredtempez 31981a39e6 Blog version 2021-01-02 17:21:38 +01:00
fredtempez 0e00d64620 Blog mail notification : nom de l'article plutôt que la page. 2021-01-02 17:16:29 +01:00
fredtempez a082bb130e Interdire le téléchargement des backup 2020-12-31 18:02:08 +01:00
fredtempez b2700fc989 Merge branch '10313' into 10400 2020-12-31 17:57:22 +01:00
fredtempez 7dd83edb4c change 2020-12-31 17:57:12 +01:00
fredtempez 5deec55290 Merge branch '10313' into 10400 2020-12-31 17:56:13 +01:00
fredtempez 6c2074ca70 Thème couleur texte bouton standard 2020-12-31 17:56:02 +01:00
fredtempez 4121504f60 Merge branch '10313' into 10400 2020-12-31 17:47:27 +01:00
fredtempez 1d9e6ddee4 Message blocage 2020-12-31 17:39:36 +01:00
fredtempez b57d87859c Merge branch '10313' into 10400 2020-12-31 17:19:32 +01:00
fredtempez c57b176f20 change 2020-12-31 17:19:02 +01:00
fredtempez aaf0e1c459 merge 10313 2020-12-30 17:41:27 +01:00
fredtempez 92b78bc7a9 Merge branch '10313' of https://github.com/fredtempez/ZwiiCMS into 10313 2020-12-30 17:31:33 +01:00
fredtempez 1eeb8fcac7 change 2020-12-30 17:30:57 +01:00
fredtempez 4535c05dd2 change 2020-12-30 17:30:35 +01:00
fredtempez 1cf8ff5ca1 Message de bienvenue 2020-12-30 17:27:45 +01:00
fredtempez 258ebce4a1 RAZ données de blocage 2020-12-28 21:08:33 +01:00
fredtempez 8e64e6637e Merge branch '10313' into 10400 2020-12-27 16:17:29 +01:00
fredtempez 8efafd9683 Coquille 2020-12-27 16:15:08 +01:00
fredtempez 8b2d09ed61 Merge branch '10313' into 10400 2020-12-27 11:04:10 +01:00
fredtempez 47e6121567 Blog 212 notification par email, pas de nom de page 2020-12-27 10:56:23 +01:00
fredtempez 44c0eda419 Merge branch '10313' into 10400 2020-12-27 10:12:46 +01:00
fredtempez 945f45609c Nouveau fichier json 2020-12-27 10:10:50 +01:00
fredtempez bb7481aabe Merge branch '10313' into 10400 2020-12-25 20:18:55 +01:00
fredtempez 1fc11e26b7 Version finale de la classe jsondb 2020-12-25 20:15:56 +01:00
fredtempez 23fdca6c52 gestion d'erreur par exception 2020-12-23 17:33:57 +01:00
fredtempez 72e12e17c0 nombre d'essais en cas de fichier verrouillé 2020-12-22 22:29:25 +01:00
fredtempez 311deabfb4 gtag anonymous 2020-12-22 22:15:02 +01:00
fredtempez 94e65e92aa verrouillage des fchiers ouverts 2020-12-22 22:01:10 +01:00
fredtempez db9cb1f6ab Merge branch 'master' into 10400 2020-12-19 22:57:00 +01:00
fredtempez 73cc7c0a91 Merge branch '10312' into 10400 2020-12-18 15:45:15 +01:00
fredtempez b74073645a Merge branch 'master' into 10400 2020-12-14 12:42:56 +01:00
fredtempez 3fe2e76741 Merge branch 'master' into 10400 2020-12-13 17:37:12 +01:00
fredtempez cd73ac6996 Message cookie 2020-12-12 18:34:07 +01:00
fredtempez 812ad68832 dirdata devient datapath 2020-12-10 14:04:30 +01:00
fredtempez 59354b4556 user original 2020-12-04 20:57:02 +01:00
fredtempez c0643c03a0 bouton importation 2020-12-04 20:53:10 +01:00
fredtempez d641d9d673 Erreur de mise en forme 2020-12-04 20:51:46 +01:00
fredtempez a78db57ef5 Merge branch '10400' into 10400-import 2020-12-04 17:09:02 +01:00
fredtempez 043df9922d Merge branch '10310' into 10400 2020-12-04 17:07:09 +01:00
fredtempez e3749b8fc7 Merge branch '10310' into 10400 2020-12-04 13:03:00 +01:00
fredtempez b8c3e7a266 prism dans le module de Roger 2020-12-03 15:02:44 +01:00
fredtempez 1a201d127a espace + inversion de logique 2020-12-03 14:28:14 +01:00
fredtempez 1d404290c3 modifs Jean 2 2020-12-03 14:10:57 +01:00
fredtempez 53a2b8c270 modifs jean 1 2020-12-03 14:06:12 +01:00
fredtempez 384c620ae7 bug installation 2020-12-02 19:08:07 +01:00
fredtempez 9541002a39 Gestion blacklist + liens 2020-11-25 14:31:43 +01:00
fredtempez b0272b4761 Désactivation temporaire des langues 2020-11-25 14:04:04 +01:00
fredtempez 6b329558dd pb config 2020-11-25 13:58:59 +01:00
fredtempez 1c2e2d2d85 ajout / supp fichiers de langue traduits WIP 2020-11-25 10:01:13 +01:00
fredtempez 6f257433a5 Nom de variable 2020-11-25 08:21:52 +01:00
Fred Tempez 0eafd2edfa fonction update 2020-11-24 19:06:49 +01:00
Fred Tempez 19039a8eb2 Préparation traduction rédigée 2020-11-24 19:00:23 +01:00
Fred Tempez 07b7c5350f Bug translate UI 2020-11-24 15:29:47 +01:00
Fred Tempez b85fdfcd9e Merge branch '10309' into 10400 2020-11-24 14:33:14 +01:00
Fred Tempez 9dcc5a28a6 Affichage crédits 2020-11-24 13:59:25 +01:00
Fred Tempez 51361afc12 Options pages admin + choix et position des drapeux 2020-11-24 13:44:31 +01:00
Fred Tempez 949e4468c5 Priorité du choix 2020-11-24 11:22:51 +01:00
Fred Tempez 21d649946f Position des drapeaux 2020-11-24 11:12:33 +01:00
Fred Tempez 89c86300d4 fix merge completed 2020-11-24 10:09:03 +01:00
Fred Tempez bb59346027 Merge branch '10400' into drapeaux 2020-11-24 09:19:26 +01:00
Fred Tempez 1251f247d3 defaut data correction sylvain + emplacement translate dans config 2020-11-24 09:13:49 +01:00
Fred Tempez 639fa7c85f Bug user 2020-11-24 08:29:53 +01:00
Fred Tempez 86830a4c9b Merge branch '10400' into drapeaux 2020-11-22 19:03:03 +01:00
Fred Tempez 68eb2cc061 Merge branch '10309' into 10400 2020-11-22 19:01:15 +01:00
Fred Tempez dc31fc3ee6 Paramètres du module WIP 2020-11-22 13:32:20 +01:00
Fred Tempez 41ae0e18e1 init WIP 2020-11-21 17:49:24 +01:00
Fred Tempez 7d6a46c9b5 Nouveaux écran de config 2020-11-21 16:51:06 +01:00
Fred Tempez 55bead4f4f bloc maintenance 2020-11-21 15:26:41 +01:00
Fred Tempez 1a5a163d4f fix config titre récupération 2020-11-21 15:18:47 +01:00
Fred Tempez 5577b1b9b0 Merge branch '10400' into Localisation-config 2020-11-21 15:17:30 +01:00
Fred Tempez 6f48ed51bd Merge branch '10309' into 10400 2020-11-21 15:15:09 +01:00
Fred Tempez 8a7503a7c1 Déplacer dans locale identité et choix des pages 2020-11-21 15:09:10 +01:00
Fred Tempez 6f9f447763 Merge branch 'master' into 10400 2020-11-21 12:56:53 +01:00
Fred Tempez 9b53b55682 Merge branch '10.3.08' into 10400 2020-11-21 04:37:20 +01:00
Fred Tempez a83d577f66 Backup Bug modal css 2020-11-21 04:29:17 +01:00
Fred Tempez 47e8016c51 Versions 2020-11-21 03:58:02 +01:00
Fred Tempez 30c3196460 RSS news add anchor 2020-11-21 03:57:27 +01:00
Fred Tempez d20bd6d14f RSS Images intégrées 2020-11-20 20:14:19 +01:00
Fred Tempez c0df60b319 Enclosure 2020-11-20 19:52:44 +01:00
Fred Tempez 44fd79e3b2 version 2020-11-20 19:07:36 +01:00
Fred Tempez 4107cb0df0 correctif format xml 2020-11-20 17:32:38 +01:00
Fred Tempez f56790516e Support intégré RSS 2020-11-20 17:08:19 +01:00
Fred Tempez b02326f0cc Amélioration flux RSS 2020-11-20 13:44:32 +01:00
Fred Tempez b8366f34cb changes 2020-11-19 09:09:47 +01:00
Fred Tempez 4215eb06b4 supprimer module traduction 2020-11-19 08:41:19 +01:00
Fred Tempez b35d48bdc2 Merge branch 'master' into 10400 2020-11-18 22:40:18 +01:00
Fred Tempez b5640310b7 init 10400 2020-11-18 22:26:46 +01:00
Fred Tempez 9a26cf73d6 Merge 10307 2020-11-18 21:45:36 +01:00
Fred Tempez a9ee02d1bc Merge branch 'master' into 10400 2020-11-18 21:45:14 +01:00
Fred Tempez 0af5e5663d Merge branch '10400' of https://github.com/ZwiiCMS-team/ZwiiCMS into 10400 2020-11-14 16:26:32 +01:00
Fred Tempez 7397630165 aide traduction 2020-11-14 16:26:27 +01:00
Fred Tempez f41811a861 Merge branch '10306' into 10400 2020-11-14 16:20:29 +01:00
Fred Tempez 135df50a66 merge 10400 fix 2020-11-14 16:16:51 +01:00
Fred Tempez 3c4e1f1294 Merge branch '10400' into module_i18n 2020-11-14 16:09:57 +01:00
Fred Tempez d36a2048a6 Zwiico update 2020-11-14 16:04:30 +01:00
Fred Tempez ea8fd8e097 Traduction auto 2020-11-14 15:49:01 +01:00
Fred Tempez 784d3b9cb8 Merge branch '10306' into module_i18n 2020-11-14 14:52:28 +01:00
Fred Tempez 34a26ea4ab trad auto hors connexion 2020-11-14 14:52:18 +01:00
Fred Tempez 972b86676e premier commit 2020-11-11 19:48:07 +01:00
Fred Tempez dd00425e33 Merge branch 'master' into 10400 2020-11-07 17:50:37 +01:00
Fred Tempez d486674d73 Réinitialisation des thèmes 2020-11-07 17:48:10 +01:00
Fred Tempez 159c7f82e2 Captcha simple : addition simple 2020-11-04 20:56:23 +01:00
Fred Tempez 7a31eb4ff1 Merge branch '10400' into data_engine 2020-11-04 20:40:22 +01:00
Fred Tempez 8fce54024e view light top margin 5% 2020-11-04 20:39:39 +01:00
Fred Tempez 747d0455f1 Merge branch '10400' into data_engine 2020-11-04 20:35:35 +01:00
Fred Tempez 8d089a0dc5 captcha form 2020-11-04 20:34:07 +01:00
Fred Tempez 01bffadc87 Merge branch '10400' into data_engine 2020-11-04 14:37:13 +01:00
Fred Tempez f4048cfb4e Merge branch 'master' into 10400 2020-11-04 14:36:08 +01:00
Fred Tempez 3f23765791 Merge branch 'master' into 10400 2020-11-04 14:21:01 +01:00
Fred Tempez 13b70d499c Merge branch '10400' into data_engine 2020-11-04 14:07:45 +01:00
Fred Tempez a7b7512ed5 Merge branch '10304' into 10400 2020-11-04 14:07:33 +01:00
Fred Tempez 20c2858c36 Merge branch '10304' into 10400 2020-11-03 17:33:28 +01:00
Fred Tempez 8eed8d73fb Merge branch '10400' into data_engine 2020-11-03 17:11:10 +01:00
Fred Tempez 5e43d6fd21 Merge branch '10304' into 10400 2020-11-03 17:10:29 +01:00
Fred Tempez 0a755dc1fa Merge branch '10400' into data_engine 2020-11-03 08:31:26 +01:00
Fred Tempez 66c2546b7a Merge branch '10304' into 10400 2020-11-03 08:31:07 +01:00
Fred Tempez 6634e99569 Merge branch '10400' into data_engine 2020-11-02 13:45:12 +01:00
Fred Tempez 31987f4066 Merge branch '10304' into 10400 2020-11-02 13:44:47 +01:00
Fred Tempez 3508f3a6cf Merge branch '10400' into data_engine 2020-11-01 08:29:04 +01:00
Fred Tempez 507912926d Merge branch '10304' into 10400 2020-11-01 08:28:03 +01:00
Fred Tempez 746163e0d1 Merge branch '10400' into data_engine 2020-11-01 07:59:02 +01:00
Fred Tempez ae98d2f1ae Merge branch '10304' into 10400 localisation alignement menu 2020-11-01 07:57:20 +01:00
Fred Tempez b192070782 Merge branch '10400' into data_engine 2020-10-31 17:57:02 +01:00
Fred Tempez 23fa96a2b6 table des très petits écrans 2020-10-31 17:56:18 +01:00
Fred Tempez 6fae1187e3 installation et ajout d'un user 2020-10-31 17:55:54 +01:00
Fred Tempez 2f27ca0235 Merge branch '10400' into data_engine 2020-10-31 17:40:57 +01:00
Fred Tempez bbc727d400 captcha évolué suite et fin 2020-10-31 17:37:39 +01:00
fredtempez 4f6f4139bb Merge branch '10400' into data_engine 2020-10-29 22:07:34 +01:00
fredtempez cd39cfe53c supprimer commentaires inutiles 2020-10-29 22:06:37 +01:00
fredtempez 17890bc81d table responsive 2020-10-29 22:06:13 +01:00
fredtempez b5532c8662 encodage fr 2020-10-29 22:05:55 +01:00
fredtempez 71e12a5ada Merge branch '10400' into data_engine 2020-10-29 19:14:35 +01:00
fredtempez 567a70d909 espaces 2020-10-29 19:14:19 +01:00
Fred 3fefff219d
Update init.js 2020-10-29 15:44:03 +01:00
Fred 1915f554b7
Update template.class.php 2020-10-29 13:50:10 +01:00
fredtempez aff90ba298 Merge branch '10400' into data_engine 2020-10-28 19:36:59 +01:00
fredtempez 5de144f947 Optimisation captcha 2020-10-28 19:36:23 +01:00
fredtempez 8833dca44f Merge branch '10304' into 10400 2020-10-28 19:28:44 +01:00
fredtempez 7b40871927 Merge branch '10400' into data_engine 2020-10-28 19:26:16 +01:00
fredtempez cf6b37f49d Merge branch '10304' into 10400 2020-10-28 19:25:10 +01:00
fredtempez 1a97c3b477 Merge branch '10400' into data_engine 2020-10-28 19:06:08 +01:00
fredtempez f615a37473 Merge branch '10400' of https://github.com/fredtempez/ZwiiCMS into 10400 2020-10-28 19:04:50 +01:00
fredtempez e7c19df92e Merge branch '10304' into 10400 2020-10-28 19:04:43 +01:00
Fred e5d838b345
Update template.class.php 2020-10-28 08:21:58 +01:00
fredtempez fc1ac0c5e7 Merge branch '10400' into data_engine 2020-10-28 06:30:22 +01:00
fredtempez 27e4b9db3b Validation d'un commentaire 2020-10-28 06:29:49 +01:00
fredtempez d1d0a485d7 Merge branch '10400' into data_engine 2020-10-27 21:38:28 +01:00
fredtempez dc3d7dbe7c message de confrmation et de rejet 2020-10-27 21:37:56 +01:00
fredtempez c88fbe4092 blacklist non créé + une seule variable des description des données 2020-10-27 21:21:30 +01:00
fredtempez cff5837d41 Merge branch '10400' into data_engine 2020-10-27 20:56:19 +01:00
fredtempez c46907396c changes 2020-10-26 21:05:48 +01:00
fredtempez 3355e0311e Captcha arithmétique 2020-10-26 20:59:54 +01:00
Fred Tempez 772bda27e6 Merge branch '10304' into 10400 2020-10-25 09:48:11 +01:00
Fred Tempez 34aac7834a merge 10304 2020-10-25 09:47:33 +01:00
Fred Tempez f6cf9c107a Merge branch 'master' into data_engine 2020-10-22 19:21:21 +02:00
Fred Tempez 2fd69d0950 Merge branch 'master' into 10400 2020-10-22 19:20:42 +02:00
Prof Langues 05f64946a6 Merge branch 'master' into 10400 2020-10-22 08:50:27 +02:00
Fred Tempez f5a31309b9 Merge branch 'master' into data_engine 2020-10-21 17:08:35 +02:00
Fred Tempez 2d41fad30d Merge branch 'master' into 10400 2020-10-21 17:07:19 +02:00
Fred Tempez 1d4e9a1862 Merge branch '10400' into data_engine 2020-10-20 19:19:38 +02:00
Fred Tempez d2f643634e Bouton vert 2020-10-20 19:19:21 +02:00
Fred Tempez 8c8d42344d Merge branch 'master' into data_engine 2020-10-20 18:45:53 +02:00
Fred Tempez 9596ca9932 Merge branch 'master' into 10400 2020-10-20 18:45:31 +02:00
Fred Tempez a741f0ddcd Merge branch 'master' into data_engine 2020-10-20 18:33:54 +02:00
Fred Tempez cde72fe1ce Merge branch 'master' into 10400 2020-10-20 18:33:12 +02:00
Prof Langues e07285259b Merge branch '10400' into data_engine 2020-10-20 09:58:35 +02:00
Prof Langues 1cfdd115bb Jeu d'icônes 2020-10-20 09:58:14 +02:00
Prof Langues 00ad2cc3a4 Merge branch '10303' into data_engine 2020-10-20 09:29:50 +02:00
Prof Langues fcd20f61e5 Merge branch '10303' into 10400 2020-10-20 09:28:01 +02:00
Fred Tempez 2c7f2b6c96 Revert "Revert "Jeu d'icônes""
This reverts commit 024f7451e6.
2020-10-19 19:11:39 +02:00
Fred Tempez 024f7451e6 Revert "Jeu d'icônes"
This reverts commit f17161f9e9.
2020-10-19 19:11:04 +02:00
Fred Tempez f17161f9e9 Jeu d'icônes 2020-10-19 19:08:26 +02:00
Fred Tempez 22dfce63b9 Merge branch '10400' into data_engine 2020-10-19 18:21:36 +02:00
Fred Tempez 8abe700c42 Merge branch '10303' into 10400 2020-10-19 18:20:55 +02:00
Fred Tempez 5427853357 Revert "captcha simple par défaut - changement de structure de stockage"
This reverts commit 87d8f2a22a.
2020-10-19 18:20:23 +02:00
Prof Langues 87d8f2a22a captcha simple par défaut - changement de structure de stockage 2020-10-19 17:07:37 +02:00
Prof Langues 01cd75cfd0 Revert "Erreur d'icônes sous Win ?"
This reverts commit 0952e597e4.
2020-10-19 15:38:20 +02:00
Prof Langues 0952e597e4 Erreur d'icônes sous Win ? 2020-10-19 15:20:10 +02:00
Fred Tempez f382a5a16b Vérification de la valeur groupe 2020-10-19 09:53:28 +02:00
Fred Tempez 96425a116f version 2020-10-19 09:24:43 +02:00
Fred Tempez fdd52d206c Aide connexion menu 2020-10-19 09:24:28 +02:00
Fred Tempez 23757e3fbc Champ d'import manquant 2020-10-19 09:22:56 +02:00
Fred Tempez 7e310da9c2 Merge branch '10400' into data_engine 2020-10-18 17:30:27 +02:00
Fred Tempez f80db3cacf icone mail au lieu de comment 2020-10-18 17:27:20 +02:00
Fred Tempez c535d7560a Merge branch '10400' into data_engine 2020-10-18 17:20:28 +02:00
Fred Tempez cd41906adf Notification mail : icone dans la liste 2020-10-18 17:19:20 +02:00
Fred Tempez 97110dd032 Merge branch '10400' into data_engine 2020-10-18 13:24:21 +02:00
Fred Tempez dac78b6c02 pas d'options selected 2020-10-18 13:23:47 +02:00
Fred Tempez 4b296ff48f Modif sélect 2020-10-18 09:03:50 +02:00
Fred Tempez b6023ede0f engine ok 2020-10-18 08:51:02 +02:00
Fred Tempez 617351290d init 2020-10-17 17:18:41 +02:00
Fred Tempez 0562fbe33c correctif sylvain 2020-10-17 16:45:30 +02:00
Fred Tempez fa0323141b Modifs Sylvain 2020-10-16 16:59:13 +02:00
Fred Tempez 4be16c87e8 Modif Sylvain 2020-10-15 21:13:48 +02:00
Prof Langues ccc5041dad erreur de variables 2020-10-15 16:12:20 +02:00
Fred Tempez 5c6a90c0ac Version module blog 2020-10-14 19:17:37 +02:00
Fred Tempez d4321076fc EDITOR devient MODERATOR 2020-10-14 19:17:13 +02:00
Fred Tempez f9eb28f6f3 Permissions du blog 2020-10-14 11:07:38 +02:00
Fred Tempez 174e087fc3 filtrage config du blog 2020-10-14 10:36:27 +02:00
Fred Tempez e6f75275f2 Limite au groupe éditeur 2020-10-14 10:29:44 +02:00
Fred Tempez 1749b1265f Merge branch '10303' into 10400 barre de membre 2020-10-14 09:50:50 +02:00
Fred Tempez a4a2973dc4 coquilles 2020-10-13 19:07:10 +02:00
Fred Tempez 63f1c6844f permission accordée à l'autorité 2020-10-12 19:27:53 +02:00
Fred Tempez 6477265a8a Permissions en test 2020-10-12 19:12:38 +02:00
Prof Langues 1e2f6b9a6b syntaxte getUser 2020-10-12 16:47:35 +02:00
Fred Tempez 2384367a68 Merge branch '10303' into 10400 2020-10-12 09:58:17 +02:00
Fred Tempez f8fa03e7de Données par défaut et update 2020-10-11 19:10:42 +02:00
Fred Tempez 5c35bd3c1d Permissions + correction nbre commentaires + noms des variables 2020-10-11 18:36:20 +02:00
Fred Tempez 1051fa0731 Merge branch '10303' into 10400 2020-10-11 05:07:53 +02:00
Fred Tempez 93e2dd40e3 Merge branch 'master' into 10400 2020-10-10 20:15:29 +02:00
Fred Tempez a056755826 merge 10302 2020-10-09 08:45:03 +02:00
Fred Tempez 62c0e29b44 modif Sylvain + gitignore png dans tmp 2020-10-09 08:37:34 +02:00
Fred Tempez b9bc252979 Erreur de notification 2020-10-08 21:16:28 +02:00
Prof Langues 96d2fc2e0d Merge branch 'import_user' into blog_v3 2020-10-08 15:37:50 +02:00
Prof Langues d0c14aaa49 merge 10302 2020-10-08 15:21:10 +02:00
Prof Langues 332127401f Notifications 2020-10-08 12:55:19 +02:00
Prof Langues 50fd8a3c9d Notifications en cours 2020-10-08 12:49:09 +02:00
Prof Langues 5dfbe9a60d modif alogo de check + notification à revoir 2020-10-08 10:33:53 +02:00
Fred Tempez a2b2896d80 envoi email en test 2020-10-07 19:39:31 +02:00
Fred Tempez 680af4c652 3.04.dev 2020-10-07 19:06:40 +02:00
Fred Tempez 643a60ddd5 données lors de l'ajout du user 2020-10-07 19:03:35 +02:00
Fred Tempez 2c3124b462 Merge branch 'import_user' of https://github.com/fredtempez/ZwiiCMS into import_user 2020-10-07 19:02:02 +02:00
Fred Tempez 5a151c577c bug changement de mot de passe 2020-10-07 19:01:57 +02:00
Fred Tempez fe2425bf5d bug changement de mot de passe 2020-10-07 18:53:40 +02:00
Fred Tempez fe7a6f3ca0 Merge branch '10302' into import_user 2020-10-06 18:36:09 +02:00
Prof Langues 2f97898e6e déclaration notification et success 2020-10-06 15:56:49 +02:00
Prof Langues 61fb84d594 libellé 2020-10-06 15:55:17 +02:00
Prof Langues 29a41a8d99 amélioration messages 2020-10-06 15:25:12 +02:00
Prof Langues 97c820c7d6 aide 2020-10-06 10:24:56 +02:00
Prof Langues afeb66fd7d désactiver mime extension 2020-10-06 09:57:32 +02:00
Prof Langues 5291f058a7 Import focntionnel avec vérification 2020-10-06 08:29:14 +02:00
Prof Langues 72b82aa071 3.03 2020-10-05 17:09:49 +02:00
Prof Langues 03568f6641 verif et tableau de confirmation 2020-10-05 16:56:30 +02:00
Fred Tempez 2171f1b6d6 indentation 2020-10-05 09:50:57 +02:00
Fred Tempez 7772b25d6a t manquant 2020-10-05 09:45:30 +02:00
Fred Tempez 7aad2deb53 module ok reste les tests et les notifications 2020-10-04 18:34:34 +02:00
Fred Tempez 3d140e1a36 Init 2020-10-04 17:14:15 +02:00
Fred Tempez 25f22f4ff2 Merge branch '10302' into blog_v3 2020-10-04 16:52:33 +02:00
Fred Tempez 0b66f0ab2e blog 3.02.dev 2020-10-04 12:21:46 +02:00
Fred Tempez e181178a54 Merge branch '10302' into blog_v3 2020-10-04 12:17:59 +02:00
Fred Tempez 323042f563 Merge 3.01 SL 2020-10-03 14:48:00 +02:00
Fred Tempez b676ed401e merge 10302 2020-10-03 14:14:02 +02:00
Fred Tempez f8430c9745 Merge branch '10302' into blog_v3 2020-10-03 14:13:27 +02:00
Fred Tempez 52f69a2b37 Merge branch 'master' into blog_v3 2020-10-03 05:14:03 +02:00
Fred Tempez a66a2c516d update 2020-09-29 18:31:12 +02:00
Prof Langues 303455aec5 Merge branch 'beta' of https://github.com/fredtempez/ZwiiCMS into beta 2020-09-29 09:19:40 +02:00
Prof Langues 975c702d2c version 2020-09-29 09:19:35 +02:00
Prof Langues 5d2bde567f erreur de nom de fonction 2020-09-29 09:18:37 +02:00
fredtempez cde9187b0d update change 2020-09-28 20:03:07 +02:00
Prof Langues da4e8fc46c GROUP_MODERATOR devient GROUP_EDITOR 2020-09-28 16:45:22 +02:00
Prof Langues e222a7ded2 Editer l'auteur d'un article : limiter la liste aux éditeurs et admins 2020-09-28 16:44:01 +02:00
Prof Langues cda2d93812 approbation de commentaire notification inversée 2020-09-28 16:21:04 +02:00
Prof Langues 02951c7c66 fic test fonction update 2020-09-28 16:20:43 +02:00
Fred f08650f148
Update index.php 2020-09-28 15:48:03 +02:00
Fred Tempez 62f58b16a0 Merge branch 'master' into beta 2020-09-27 19:38:26 +02:00
Fred Tempez bd43bf0e85 Merge branch 'master' into beta 2020-09-27 19:31:21 +02:00
Fred Tempez 6f228d168d Merge branch 'blog_v3' into beta 2020-09-27 18:05:20 +02:00
Fred Tempez 6f82ddc1a2 Merge branch 'master' into blog_v3 2020-09-27 17:52:03 +02:00
Fred Tempez dc65a8e618 Merge branch 'beta' of https://github.com/fredtempez/ZwiiCMS into beta 2020-09-25 08:02:52 +02:00
Fred Tempez d5beaec9d7 merge 2020-09-24 18:01:51 +02:00
Fred Tempez 78259f3da6 Merge branch 'master' into blog_v3 2020-09-24 18:01:34 +02:00
fredtempez 092c4053b2 Merge branch 'blog_v3' of https://github.com/fredtempez/ZwiiCMS into blog_v3 2020-09-02 09:08:40 +02:00
fredtempez 0ffe4f7b40 ajoute balise <article> 2020-09-02 09:08:27 +02:00
Fred Tempez a049fcb269 Changes 2020-08-08 14:44:45 +02:00
Fred Tempez 7938ba7645 Merge branch 'master' into dev 2020-08-08 14:44:30 +02:00
Fred Tempez d62ccb442f Merge branch 'master' into dev 2020-08-08 14:29:31 +02:00
Fred Tempez 38d80dab96 changes 2020-08-07 08:20:01 +02:00
Fred Tempez a4c077db0b changes 2020-08-07 08:18:57 +02:00
Fred Tempez 299f936f64 Merge branch 'master' into blog_v3 2020-08-02 09:59:00 +02:00
Fred Tempez 83d9980486 merge function login 2020-07-17 17:27:34 +02:00
Fred Tempez 0d7b674e0f Merge branch 'dev' into blog_v3 2020-07-17 17:24:48 +02:00
Fred Tempez 6dd3f034cb Compatibilité anciens blogs et correction de bugs (décompte) 2020-07-17 10:05:24 +02:00
Fred Tempez ad73150bc4 Merge branch 'dev' into blog_v3 2020-07-16 19:23:28 +02:00
Fred Tempez a7efdbf6c5 Approbation des commentaires 2020-07-16 18:50:57 +02:00
Fred Tempez d6b2dc7e20 Notification commentaire en attente d'approbation 2020-07-16 13:59:04 +02:00
Fred Tempez 90d281b483 Article link in config screen 2020-07-16 12:24:52 +02:00
Fred Tempez 4387390dbc Comment approve : filtering missing 2020-07-16 12:10:20 +02:00
Fred Tempez dca8fb57ab Comment approve : filtering missing 2020-07-16 12:06:51 +02:00
Fred Tempez 4a599c513c Merge branch 'dev' into blog_v3 2020-07-16 11:07:12 +02:00
Fred Tempez 2e35c1fa2c Approbation des commentaires WIP 2020-07-16 10:33:37 +02:00
Fred Tempez ce610b2d0a Variables names 2020-07-16 09:21:57 +02:00
Fred Tempez 529f495f3d Numérotation + changes.md 2020-07-16 09:18:58 +02:00
Fred Tempez 01b83cd0f8 Merge branch 'master' into blog_v3 2020-07-15 18:28:45 +02:00
Fred Tempez 2899195ef8 Merge branch 'dev' into blog_v3 2020-07-13 10:27:45 +02:00
Fred Tempez f96e7377f8 Constantes 2020-07-12 18:05:33 +02:00
Fred Tempez e7ffeeefbd Merge branch 'dev' into blog_v3 2020-07-12 18:04:46 +02:00
Fred Tempez 29ef8f06f5 Comments Approval WIP 2020-07-11 20:00:31 +02:00
Fred Tempez 125378ec93 blog config layout + jquery 2020-07-11 19:44:02 +02:00
Fred Tempez a94d0b4433 Merge branch 'dev' into blog_v3 2020-07-11 18:44:17 +02:00
Fred Tempez c38766258a Merge branch 'dev' into blog_v3 2020-07-11 18:39:06 +02:00
Fred Tempez 550a9c6462 Merge branch 'dev' into blog_v3 2020-07-11 17:18:54 +02:00
Fred Tempez 0c9aadd621 Merge branch 'dev' into blog_v3 2020-07-10 18:11:00 +02:00
Fred Tempez c8ec4a7c77 Merge branch 'dev' into blog_v3 2020-07-10 17:25:09 +02:00
Fred Tempez 42fd538ccb Signatures : noms d'objets 2020-07-10 16:57:21 +02:00
Fred Tempez a371a3770e changes 2020-07-09 19:47:08 +02:00
Fred Tempez f1d1413314 Merge branch 'dev' into blog_v3 2020-07-09 19:44:23 +02:00
Fred Tempez 91accd2c0d Edit user retour ou accueil selon droits 2020-07-09 19:25:24 +02:00
Fred Tempez 0f2bba19d2 Merge branch 'dev' into blog_v3 2020-07-09 19:22:14 +02:00
Fred Tempez 4e3263b5fe changes + listes d'objectifs à réaliser 2020-07-09 14:40:48 +02:00
Fred Tempez fe8d473a76 Initialisation des champs lors d'une mise à jour 2020-07-07 15:31:57 +02:00
Fred Tempez a4ac385577 Empêcher l'édition nom prenom par un membre simple -optimisation écriture 2020-07-07 15:17:48 +02:00
Fred Tempez 4c348e44f0 Initialiser la signature avec le pseudo, le prénom par défaut 2020-07-07 15:04:19 +02:00
Fred Tempez a28419225a Version 10.3 2020-07-06 19:53:33 +02:00
Fred Tempez 43f2ccca4f Merge branch 'dev' into blog_v3 2020-07-06 19:51:16 +02:00
Fred Tempez 52a22f5717 blocage annulation saisie commentaire 2020-07-06 12:24:06 +02:00
Fred Tempez e44575d0ae Message effacement + court et nom de l'article 2020-07-06 12:20:46 +02:00
Fred Tempez 3ea30e9268 Messages de confirmation de suppression 2020-07-06 12:14:13 +02:00
Fred Tempez ef141d72bf Ajout de la classe editorWysiwygComment 2020-07-06 11:46:34 +02:00
Fred Tempez 249e173b3e Merge branch 'master' into blog_v3 2020-07-06 11:41:24 +02:00
Fred f32dbfc52d merge install pseudo 2020-07-02 19:58:35 +02:00
Fred ef3e9db7f5 Merge module user 2020-07-02 19:53:52 +02:00
Fred 457b536fca Merge blog folder 2020-07-02 19:48:47 +02:00
Fred 23a1e929a3 Revert "init"
This reverts commit 329f252d82.
2020-07-02 19:38:52 +02:00
Fred 329f252d82 init 2020-07-02 19:35:51 +02:00
104 changed files with 4449 additions and 1708 deletions

17
.gitignore vendored
View File

@ -10,6 +10,8 @@ site/backup/*
site/data/*.json
site/data/*.css
site/data/fr/*.json
site/data/fr/*.back
site/data/*.back
# Fichiers uploadés
@ -36,9 +38,12 @@ site/data/journal.log
.DS_Store
site/.DS_Store
site/file/.DS_Store
site/tmp/5f7f5e998762c.png
site/tmp/5f7f5e9987628.png
site/tmp/5f7f5ea3e983b.png
site/tmp/5f7f5ea3e9837.png
site/tmp/5f7f5ea20d5eb.png
site/tmp/5f7f5ea20d5ee.png
site/data/es/locale.json
site/data/es/module.json
site/data/es/page.json
site/data/en/locale.json
site/data/en/module.json
site/data/en/page.json
site/data/de/locale.json
site/data/de/module.json
site/data/de/page.json

View File

@ -1,5 +1,44 @@
# Changelog
## version 10.4.00
Corrections :
- Bug de pages non accessibles dans le menu suite à la création d'entrées fantômes dans le fichier de données de modules.
- Nettoyage du fichiers des données de modules des entrées fantômes.
- Thème : déformation des images en arrière-plan dans les modes responsives cover et contain lorsque la longueur de la page change. L'image en arrière-plan est désormais placée dans la balise html et l'option fixe s'active lorsque cover ou contain sont sélectionnés.
- Thème : déformation du sélecteur de fichiers dans certains formats de page.
- Module Form : mauvais affichage du guillemet et de l'apostrophe dans les noms des champs lors de l'édition.
- Thème : faille CSRF, protection de la réinitialisation des fichiers de thème.
- Modifications :
- Filtrage des URL générées par facebook (FBCLID) occasionnant une erreur 404
- Captcha arithmétique, activation recommandée dans la configuration.
- Module User
- Pour les articles de blog et de news, choix de la signature, nom+prenom ; nom+prenom ; id ; pseudo
- Importation d'un liste d'utilisateur dans un fichier plat (CSV).
- Module Blog :
- Texte du commentaire enrichi.
- Nombre maximal de caractère par commentaire.
- Gestion des commentaires article par article.
- Suppression des commentaires en masse.
- Limiter l'édition des articles et des commentaires à l'id de l'éditeur
- Approbation des commentaires
- Gestion des thèmes :
- Bouton de réinitialisation avec confirmation
- Amélioration de la structure du flux RSS.
## Version 10.3.13
Modifications :
- Système de données (JsonDB) :
- Verrouillage des fichiers de données ouverts en écriture.
- Message d'erreur littéral.
- Sauvegarde des fichiers de données après un effacement et une écriture.
- Identifiant des noms de ressources (id de page , d'utilisateur, etc..) composés de nombres , remplacement du caractère de préfixe "i" par "_".
- Google Analytics, option d'anonymisation.
- Procédure de connexion : les erreurs de captcha sont comptabilisées comme des échecs, allégement des messages d'information. Echecs de connexion, informations plus précises dans le journal de connexion.
- TinyMCE : ajout des scripts possibles.
Corrections :
- Notification de commentaire, remplacement du nom de la page par le titre de l'article.
- Thème : couleur du texte au survol d'un bouton standard.
## Version 10.3.12
Correction :
@ -23,7 +62,7 @@ Modification :
Corrections :
- Configuration : persistance de l'ouverture des blocs.
- Réinitialisation du mot de passe :
- Remise à zéro du timer après renouvellement du mot de passe.
- Remise à zéro du timer après renouvèlement du mot de passe.
- Affichage de le fenêtre "Nouveau mot de passe" allégée.
- Redirection sur la page d'accueil.
- Modules news et blog : transparence icône RSS.
@ -40,7 +79,7 @@ Corrections :
## version 10.3.06
- Correction :
- Edition de page avec module, le changement de mise en page désactive le bouton d'option du module.
- Édition de page avec module, le changement de mise en page désactive le bouton d'option du module.
- Modification :
- Modules News et Blog : ajout de l'option flux RSS. L'option est activée par défaut.
@ -80,11 +119,13 @@ Corrections :
- Barre de membre déplacée à droite de la barre de menu.
## version 10.3.02
- Correction :
- Corrections :
- Icône de pied de page github manquante.
- Mauvaise redirection après changement de mot de passe d'un membre.
- Modifications :
- Nouvelles images de captcha.
- Option de configuration, captcha demandé à la connexion.
- Méthode d'encodage UTF8.
## version 10.3.01
@ -100,7 +141,7 @@ Corrections :
## version 10.3.00
- Corrections :
- Bloquage de l'incrémentation de l'id de page lorsque deux pages ont le même nom.
- Incrémentation de l'id de page bloquée lorsque deux pages ont le même nom.
- Login : l'option "Se souvenir de moi" est fonctionnelle.
- Menu : déplacement de la classe "active".
- Le titre dans la configuration du module non affiché si le titre de la page est masqué.
@ -117,7 +158,7 @@ Corrections :
- Configuration du site :
- Pages 403 (accès interdit), 404 (page introuvable) et site en maintenance personnalisables
- Sauvegarde du site dans une archive : animation d'attente avec message de confirmation ou d'erreur ; le nom de l'archive prend le nom du sous-domaine s'il existe.
- Captcha : addition présentée en lettres sous la forme d'images, réponse en chiffres ; correction du nom de la fonction (capcha en captcha).
- Captcha : addition présentée en lettres sous la forme d'images, réponse en chiffres ; correction du nom de la fonction (captcha en captcha).
- Page :
- Duplication d'une page.
- Mise à jour :
@ -156,7 +197,7 @@ Corrections :
## version 10.2.03
- Corrections :
- Les entrées de menu disposent d'une classe par groupe de parent en lieu et place des ids.
- Edition du compte de l'utilisateur, empêcher le préremplissage de l'ancien mot de passe.
- Édition du compte de l'utilisateur, empêcher le pré-remplissage de l'ancien mot de passe.
- Reformulation du mail de confirmation d'inscription.
- Champ de sélection de fichiers, suppression de la couleur des URL lors d'un survol
- Modifications :
@ -173,7 +214,7 @@ Corrections :
- Optimisation et correction de l'algorithme de contrôle d'accès.
- Erreur des noms de champ barre des membres dans le pied de page.
- Génération de l'image tag, amélioration du code et du message d'erreur.
- Edition de page, erreur lors de la sélection d'une icône de menu.
- Édition de page, erreur lors de la sélection d'une icône de menu.
- Problème lors de l'installation, impossibilité d'obtenir l'écran de configuration.
## version 10.2.00
@ -181,11 +222,11 @@ Corrections :
- jQuery v3.5.1
- Nouveautés :
- Gestion des accès concurrents :
- deux utilisateurs ne peuvent accèder en modification à la même page du site ou de configuration
- deux utilisateurs ne peuvent accéder en modification à la même page du site ou de configuration
- la connexion d'un utilisateur sur un autre poste ou navigateur déconnecte la session précédente.
- sécurisation du login
- journalisation de l'utilisation du site
- Ecran de configuration et d'édition des pages, les blocs sont pliables et dépliables afin d'alléger l'occupation sur l'écran. Le statut des blocs (fermés ; ouverts) est persistante au cours de la session.
- Écran de configuration et d'édition des pages, les blocs sont pliables et dépliables afin d'alléger l'occupation sur l'écran. Le statut des blocs (fermés ; ouverts) est persistante au cours de la session.
- Modifications :
- Thème, les sélecteurs de couleur affiche la valeur RGBa d'une couleur différente de celle de la sélection.
- Thème de l'administration, amélioration du rendu.
@ -259,16 +300,16 @@ Corrections :
- 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 en préaration de la version multilangues.
- Les données relatives aux pages et aux modules sont stockées dans un dossier localisé fr par défaut en préparation de la version multi-langues.
- 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 effacements sont appliquées en direct sur le disque.
- Modifications :
- Module gallery optimisé, tri dynamique, choix du thème.
- Module blog présentation optimisée avec options de position de l'image, la métadescription est le contenu de l'article.
- Module blog présentation optimisée avec options de position de l'image, la méta-description est le contenu de l'article.
- Chargement paresseux des images.
- Edition de page : suppression de l'option d'ouverture dans une lity.
- Édition de page : suppression de l'option d'ouverture dans une lity.
- Protection des données des modules en cas de changement lors de l'édition d'une page.
Corrections de bug :
- Mise à jour automatique : procédure modifiée, désactivée si allow_url_fopen = off sur le serveur
@ -393,7 +434,7 @@ Corrections de bug :
- L'effet de couleur de fond personnalisé d'une page sélectionnée dans le menu est limité aux pages parents.
- Améliorations :
- Affichage du contenu seul d'une page du site dans une popup Lity sans menu, bannière et pied de page.
- Editeur de texte ; effet accordéon, les accordéons peuvent être tous refermés.
- Éditeur de texte ; effet accordéon, les accordéons peuvent être tous refermés.
- Thème ; menu : lorsque le menu est réduit, le titre du site peut être inséré à la gauche du menu burger.
## version 9.2.14
@ -425,7 +466,7 @@ Corrections de bug :
- Supprimer le forçage de l'affichage des médias à 100%
- Activer le dimensionnement des médias
- Module Form :
- Etiquette de séparation
- Étiquette de séparation
- Checkbox retourne un astérisque plutôt que 1
- Thème - Menu :
- Couleur de fond de la page sélectionnée
@ -435,7 +476,7 @@ Corrections de bug :
- Corrections :
- Marge du pied de page par défaut 5px
- Installation sans site exemple : suppression des barres latérales
- Edition de page :
- Édition de page :
- Affichage de l'option Fil d'ariane alors que le titre est masqué.
- Page parente, l'option "ne pas afficher les pages enfants dans le menu horizontal" est incompatible avec une page désactivée : désactivation et masquage lorsque la page est désactivée.
- Mauvais encodage des titres de pages perturbant l'affichage des caractères spéciaux ( ex: apostrophes ).
@ -465,7 +506,7 @@ Corrections de bug :
## Version 9.2.08
- Correction :
- Edition de page : bug empêchant le paramétrage d'un module après un changement de gabarit.
- Édition de page : bug empêchant le paramétrage d'un module après un changement de gabarit.
- Modification :
- Aide de l'édition des pages
@ -505,7 +546,7 @@ Corrections de bug :
## Version 9.2.01
- Corrections :
- Sauvegarde du thème : prise en compte du fichier custom.css
- Edition de page : libellés
- Édition de page : libellés
- Thème ; footer : marges du pied de page placé hors du site
- Thème ; footer : aperçu du texte personnalisé
@ -571,7 +612,7 @@ Corrections de bug :
- Réécriture activée après chaque mise à jour auto.
- Modifications :
- Thème 100% fluide sans marge
- Ecran de smartphone (ex : iPhone 6) : adaptation de la barre d'administration : le username est masqué et la taille des icônes est augmentée
- Écran de smartphone (ex : iPhone 6) : adaptation de la barre d'administration : le username est masqué et la taille des icônes est augmentée
- Chemins vers les données dans des constantes
- Modèles de bannières de plusieurs dimensions
- Hauteur de police par défaut 13px
@ -661,7 +702,7 @@ Corrections de bug :
## Version 9.0.18
- Correction :
- Etat par défaut du numéro de version mal récupéré
- État par défaut du numéro de version mal récupéré
## Version 9.0.17
- Mises à jour :
@ -676,7 +717,7 @@ Corrections de bug :
## Version 9.0.16
- Correction :
- Nom de page constitué de caractères filtrés empchant la création d'un Id valide.
- Nom de page constitué de caractères filtrés empêchant la création d'un Id valide.
- Module Gallery : bouton de fermeture sous Edge
## Version 9.0.15
@ -701,7 +742,7 @@ Corrections de bug :
## 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 :
@ -751,7 +792,7 @@ Corrections de bug :
- Thème :
- nouvelle position du menu dans le site quand la bannière est au-dessus.
- Simplification et ordre des libellés position du menu par rapport à la bannière
- Editeur de texte, scrolle lorsque l'éditeur est ouvert, la barre d'outil se colle sous la barre d'administration.
- Éditeur de texte, scrolle lorsque l'éditeur est ouvert, la barre d'outil se colle sous la barre d'administration.
- TinyMCE :
- liste des pages du site dans la fenêtre des liens
- option lightbox pour l'affichage d'images ou de liens

View File

@ -1,10 +1,9 @@
![](https://img.shields.io/github/last-commit/fredtempez/ZwiiCMS/master) ![](https://img.shields.io/github/release-date/fredtempez/ZwiiCMS)
# ZwiiCMS 10.3.12
# ZwiiCMS 10.4.00
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.
ZwiiCMS a été créé par un développeur de talent, [Rémi Jean](https://remijean.fr/). Il est désormais maintenu par Fred Tempez aidé de la communauté.
ZwiiCMS a été créé par un développeur de talent, [Rémi Jean](https://remijean.fr/). Il est désormais maintenu par Frédéric Tempez.
[Site](http://zwiicms.fr/) - [Forum](http://forum.zwiicms.com/) - [Version initiale](https://github.com/remijean/ZwiiCMS/) - [GitHub](https://github.com/fredtempez/ZwiiCMS)
@ -75,9 +74,9 @@ Pour revenir à la version 8, renommez ce fichier "data.json".
[R] fr Dossier localisé
[F] page.json Données des pages
[F] module.json Données des modules de pages
[F] admin.css Thème de la partie administration
[F] admin.json Données de la partie administration
[F] blacklist.json Données de connexion des comptes inconnus
[F] admin.css Thème des pages d'administration
[F] admin.json Données de thème des pages d'administration
[F] blacklist.json Journalisation des tentatives de connexion avec des comptes inconnus
[F] config.json Configuration du site
[F] core.json Configuration du noyau
[F] custom.css Feuille de style de la personnalisation avancée
@ -85,6 +84,7 @@ Pour revenir à la version 8, renommez ce fichier "data.json".
[F] theme.css Thème du site
[F] theme.json Données du site
[F] user.json Données des utilisateurs
[F] .backup Marqueur de la sauvegarde des fichiers si présent
[R] file Répertoire d'upload du gestionnaire de fichiers
[R] source Ressources diverses
[R] thumb Miniatures des images

View File

@ -273,7 +273,7 @@ class helper {
}
// 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;
$text = '_' . $text;
}
break;
case self::FILTER_INT:

View File

@ -22,10 +22,10 @@ class JsonDb extends \Prowebcraft\Dot
public function __construct($config = [])
{
$this->config = array_merge([
'name' => 'data.json',
'backup' => 5,
'dir' => getcwd(),
'template' => getcwd() . DIRECTORY_SEPARATOR . 'data.template.json'
'name' => 'data.json',
'backup' => false,
'dir' => getcwd()
//'template' => getcwd() . DIRECTORY_SEPARATOR . 'data.template.json'
], $config);
$this->loadData();
parent::__construct();
@ -106,10 +106,17 @@ class JsonDb extends \Prowebcraft\Dot
if (!file_exists($this->db)) {
return null;
} else {
$this->data = json_decode(file_get_contents($this->db), true);
// 3 essais
for($i = 0; $i <3; $i++) {
if ($this->data = json_decode(@file_get_contents($this->db), true) ) {
break;
}
// Pause de 10 millisecondes
usleep(10000);
}
// Gestion de l'erreur
if (!$this->data === null) {
throw new \InvalidArgumentException('Database file ' . $this->db
. ' contains invalid json object. Please validate or remove file');
exit ('JsonDB : Erreur de lecture du fichier de données ' . $this->db .'. Aucune donnée lisible, essayez dans quelques instants ou vérifiez le système de fichiers.');
}
}
}
@ -120,6 +127,29 @@ class JsonDb extends \Prowebcraft\Dot
* Saving to local database
*/
public function save() {
file_put_contents($this->db, json_encode($this->data, JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT));
// Fichier inexistant, le créer
if ( !file_exists($this->db) ) {
touch($this->db);
}
// Backup file
if ($this->config['backup'] === true) {
copy ($this->db, str_replace('json' , 'backup.json', $this->db));
}
if ( is_writable($this->db) ) {
// 3 essais
for($i = 0; $i < 3; $i++) {
if( @file_put_contents($this->db, json_encode($this->data, JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT|LOCK_EX)) !== false) {
break;
}
// Pause de 10 millisecondes
usleep(10000);
}
if ($i === 2) {
exit ('Jsondb : Erreur d\'écriture dans le fichier de données ' . $this->db . '. Vérifiez le système de fichiers.' );
}
} else {
exit ('Jsondb : Écriture interdite dans le fichier de données ' . $this->db .'. Vérifiez les permissions.' );
}
}
}

View File

@ -32,7 +32,7 @@ class template {
);
}
/**
/**
* Crée un champ captcha
* @param string $nameId Nom et id du champ
* @param array $attributes Attributs ($key => $value)
@ -47,29 +47,84 @@ class template {
'id' => $nameId,
'name' => $nameId,
'value' => '',
'limit' => false
'limit' => false // captcha simple
], $attributes);
// Génère deux nombres pour le captcha
$numbers = array(0,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20);
$letters = array('u','t','s','r','q','p','o','n','m','l','k','j','i','h','g','f','e','d','c','b','a');
$limit = $attributes['limit'] ? count($letters)-1 : 10 ;
mt_srand((float) microtime()*1000000);
$firstNumber = mt_rand ( 0 , $limit );
$secondNumber = mt_rand ( 0 , $limit );
$result = $firstNumber + $secondNumber;
// Captcha quatre opérations
// Limite addition et soustraction selon le type de captcha
$numbers = [0,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20];
$letters = ['u','t','s','r','q','p','o','n','m','l','k','j','i','h','g','f','e','d','c','b','a'];
$limit = $attributes['limit'] ? count($letters)-1 : 10;
// Tirage de l'opération
mt_srand((float) microtime()*1000000);
// Captcha simple limité à l'addition
$operator = $attributes['limit'] ? mt_rand (1, 4) : 1;
// Limite si multiplication ou division
if ($operator > 2) {
$limit = 10;
}
// Tirage des nombres
mt_srand((float) microtime()*1000000);
$firstNumber = mt_rand (1, $limit);
mt_srand((float) microtime()*1000000);
$secondNumber = mt_rand (1, $limit);
// Permutation si addition ou soustraction
if (($operator < 3) and ($firstNumber < $secondNumber)) {
$temp = $firstNumber;
$firstNumber = $secondNumber;
$secondNumber = $temp;
}
// Icône de l'opérateur et calcul du résultat
switch ($operator) {
case 1:
$operator = template::ico('plus');
$result = $firstNumber + $secondNumber;
break;
case 2:
$operator = template::ico('minus');
$result = $firstNumber - $secondNumber;
break;
case 3:
$operator = template::ico('cancel');
$result = $firstNumber * $secondNumber;
break;
case 4:
$operator = template::ico('divide');
$limit2 = [10, 10, 6, 5, 4, 3, 2, 2, 2, 2];
for ($i = 1; $i <= $firstNumber; $i++) {
$limit = $limit2[$i-1];
}
mt_srand((float) microtime()*1000000);
$secondNumber = mt_rand(1, $limit);
$firstNumber = $firstNumber * $secondNumber;
$result = $firstNumber / $secondNumber;
break;
}
// Hashage du résultat
$result = password_hash($result, PASSWORD_BCRYPT);
// Codage des valeurs de l'opération
$firstLetter = uniqid();
$secondLetter = uniqid();
// Masquage image source
// Masquage image source pour éviter un décodage
copy ('core/vendor/zwiico/png/'.$letters[$firstNumber] . '.png', 'site/tmp/' . $firstLetter . '.png');
copy ('core/vendor/zwiico/png/'.$letters[$secondNumber] . '.png', 'site/tmp/' . $secondLetter . '.png');
// Début du wrapper
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="captcha inputWrapper ' . $attributes['classWrapper'] . '">';
// Label
$html .= self::label($attributes['id'],
'<img src="' . helper::baseUrl(false) . 'site/tmp/' . $firstLetter . '.png" />' . template::ico('plus') . '<img class="captchaNumber" src="' . helper::baseUrl(false) . 'site/tmp/' . $secondLetter . '.png" /> en chiffres ?', [
'<img src="' . helper::baseUrl(false) . 'site/tmp/' . $firstLetter . '.png" />&nbsp;<strong>' . $operator . '</strong>&nbsp;<img class="captchaNumber" src="' . helper::baseUrl(false) . 'site/tmp/' . $secondLetter . '.png" /> en chiffres ?', [
'help' => $attributes['help']
]);
// Notice
$notice = '';
if(array_key_exists($attributes['id'], common::$inputNotices)) {
@ -77,29 +132,22 @@ class template {
$attributes['class'] .= ' notice';
}
$html .= self::notice($attributes['id'], $notice);
// captcha
$html .= sprintf(
'<input type="text" %s>',
helper::sprintAttributes($attributes)
);
// Champ résultat caché
// Champ résultat codé
$html .= self::hidden($attributes['id'] . 'Result', [
'value' => $result,
'before' => false
]);
// 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;
}

View File

@ -472,4 +472,11 @@ $(document).ready(function(){
$(changeIcon).addClass('zwiico-menu');
};
});
/**
* Remove ID Facebook from URL
*/
if(/^\?fbclid=/.test(location.search))
location.replace(location.href.replace(/\?fbclid.+/, ""));
});

View File

@ -26,6 +26,10 @@ class common {
const GROUP_MEMBER = 1;
const GROUP_MODERATOR = 2;
const GROUP_ADMIN = 3;
const SIGNATURE_ID = 1;
const SIGNATURE_PSEUDO = 2;
const SIGNATURE_FIRSTLASTNAME = 3;
const SIGNATURE_LASTFIRSTNAME = 4;
// Dossier de travail
const BACKUP_DIR = 'site/backup/';
const DATA_DIR = 'site/data/';
@ -40,7 +44,7 @@ class common {
const ACCESS_TIMER = 1800;
// Numéro de version
const ZWII_VERSION = '10.3.12';
const ZWII_VERSION = '10.4.00.015';
const ZWII_UPDATE_CHANNEL = "v10";
public static $actions = [];
@ -51,23 +55,16 @@ class common {
'page',
'sitemap',
'theme',
'user'
];
public static $dataStage = [
'config',
'core',
'module',
'page',
'user',
'theme',
'admin'
'translate'
];
public static $accessList = [
'user',
'theme',
'config',
'edit',
'config'
'config',
'translate'
];
public static $accessExclude = [
'login',
@ -86,6 +83,7 @@ class common {
public static $inputBefore = [];
public static $inputNotices = [];
public static $importNotices = [];
public static $captchaNotices = [];
public static $coreNotices = [];
public $output = [
'access' => true,
@ -144,13 +142,43 @@ class common {
self::GROUP_MODERATOR => 'Éditeur',
self::GROUP_ADMIN => 'Administrateur'
];
// Langues proposées
public static $i18nList = [
'fr' => 'Français (fr)',
'de' => 'Allemand (de)',
'en' => 'Anglais (en)',
'es' => 'Espagnol (es)',
'it' => 'Italien (it)',
'nl' => 'Néerlandais (nl)',
'pt' => 'Portugais (pt)',
];
// Langue courante
public static $i18nCurrent = 'fr';
public static $timezone;
private $url = '';
// Données de site
private $user = [];
private $core = [];
private $config = [];
// Dossier localisé
private $page = [];
private $module = [];
private $locale = [];
// Descripteur de données Entrées / Sorties
// Liste ici tous les fichiers de données
private $dataFiles = [
'config' => '',
'page' => '',
'module' => '',
'core' => '',
'page' => '',
'user' => '',
'theme' => '',
'admin' => '',
'blacklist' => '',
'locale' => ''
];
/**
* Constructeur commun
@ -164,23 +192,37 @@ class common {
$this->input['_COOKIE'] = $_COOKIE;
}
// Instanciation de la classe des entrées / sorties
// Récupère les descripteurs
foreach ($this->dataFiles as $keys => $value) {
// Constructeur JsonDB
$this->dataFiles[$keys] = new \Prowebcraft\JsonDb([
'name' => $keys . '.json',
'dir' => $this->dataPath ($keys,self::$i18nCurrent),
'backup' => file_exists('site/data/.backup')
]);;
}
// Import version 9
if (file_exists(self::DATA_DIR . 'core.json') === true &&
$this->getData(['core','dataVersion']) < 10000) {
$keepUsers = isset($_SESSION['KEEP_USERS']) ? $_SESSION['KEEP_USERS'] : false;
$this->importData($keepUsers);
unset ($_SESSION['KEEP_USERS']);
// Réinstaller htaccess
copy('core/module/install/ressource/.htaccess', self::DATA_DIR . '.htaccess');
common::$importNotices [] = "Importation réalisée avec succès" ;
//echo '<script>window.location.replace("' . helper::baseUrl() . $this->getData(['config','homePageId']) . '")</script>';
$this->getData(['core','dataVersion']) < 10000) {
$keepUsers = isset($_SESSION['KEEP_USERS']) ? $_SESSION['KEEP_USERS'] : false;
$this->importData($keepUsers);
unset ($_SESSION['KEEP_USERS']);
// Réinstaller htaccess
copy('core/module/install/ressource/.htaccess', self::DATA_DIR . '.htaccess');
common::$importNotices [] = "Importation réalisée avec succès" ;
//echo '<script>window.location.replace("' . helper::baseUrl() . $this->getData(['config','homePageId']) . '")</script>';
}
// Installation fraîche, initialisation des modules manquants
// La langue d'installation par défaut est fr
foreach (self::$dataStage as $stageId) {
$folder = $this->dirData ($stageId, 'fr');
foreach ($this->dataFiles as $stageId => $item) {
$folder = $this->dataPath ($stageId, self::$i18nCurrent);
if (file_exists($folder . $stageId .'.json') === false) {
$this->initData($stageId,'fr');
$this->initData($stageId,self::$i18nCurrent);
common::$coreNotices [] = $stageId ;
}
}
@ -190,10 +232,6 @@ class common {
$this->user = $this->getData(['user', $this->getInput('ZWII_USER_ID')]);
}
// Mise en cache des pages et des modules
$this->page = $this->getCache('page');
$this->module = $this->getCache('module');
// Construit la liste des pages parents/enfants
if($this->hierarchy['all'] === []) {
$pages = helper::arrayCollumn($this->getData(['page']), 'position', 'SORT_ASC');
@ -254,7 +292,7 @@ class common {
$this->url = $url;
}
else {
$this->url = $this->getData(['config', 'homePageId']);
$this->url = $this->getData(['locale', 'homePageId']);
}
}
@ -320,41 +358,30 @@ class common {
* @param array $keys Clé(s) des données
*/
public function deleteData($keys) {
//Retourne une chaine contenant le dossier à créer
$folder = $this->dirData ($keys[0],'fr');
// Constructeur JsonDB
$db = new \Prowebcraft\JsonDb([
'name' => $keys[0] . '.json',
'dir' => $folder
]);
// Descripteur
$db = $this->dataFiles[$keys[0]];
// Aiguillage
switch(count($keys)) {
case 1:
$db->delete($keys[0]);
$db->save();
$db->delete($keys[0], true);
break;
case 2:
$db->delete($keys[0].'.'.$keys[1]);
$db->save();
$db->delete($keys[0].'.'.$keys[1],true);
break;
case 3:
$db->delete($keys[0].'.'.$keys[1].'.'.$keys[2]);
$db->save();
$db->delete($keys[0].'.'.$keys[1].'.'.$keys[2], true);
break;
case 4:
$db->delete($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3]);
$db->save();
$db->delete($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3], true);
break;
case 5:
$db->delete($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4]);
$db->save();
$db->delete($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4], true);
break;
case 6:
$db->delete($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4].'.'.$keys[5]);
$db->save();
$db->delete($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4].'.'.$keys[5], true);
break;
case 7:
$db->delete($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4].'.'.$keys[5].'.'.$keys[6]);
$db->save();
$db->delete($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4].'.'.$keys[5].'.'.$keys[6], true);
break;
}
}
@ -367,38 +394,10 @@ class common {
public function getData($keys = []) {
if (count($keys) >= 1) {
/**
* Lecture dans le cache, page et module
*/
if ($keys[0] === 'page' ||
$keys[0] === 'module' ) {
// Décent dans les niveaux de la variable $data
$data = array_merge ($this->page , $this->module);
foreach($keys as $key) {
// Si aucune donnée n'existe retourne null
if(isset($data[$key]) === false) {
return null;
}
// Sinon décent dans les niveaux
else {
$data = $data[$key];
}
}
// Retourne les données
return $data;
}
/**
* Lecture directe
*/
//Retourne une chaine contenant le dossier à créer
$folder = $this->dirData ($keys[0],'fr');
// Constructeur JsonDB
$db = new \Prowebcraft\JsonDb([
'name' => $keys[0] . '.json',
'dir' => $folder
]);
$db = $this->dataFiles[$keys[0]];
switch(count($keys)) {
case 1:
$tempData = $db->get($keys[0]);
@ -421,27 +420,14 @@ class common {
case 7:
$tempData = $db->get($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4].'.'.$keys[5].'.'.$keys[6]);
break;
case 8:
$tempData = $db->get($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4].'.'.$keys[5].'.'.$keys[6].'.'.$keys[7]);
break;
}
return $tempData;
}
}
/**
* Lecture des fichiers de données de page et mise ne cache
* @param @return string données des pages
*/
public function getCache($data) {
$folder = $this->dirData ($data,'fr');
// Constructeur JsonDB
$db = new \Prowebcraft\JsonDb([
'name' => $data . '.json',
'dir' => $folder
]);
$tempData = $db->get($data);
return [$data => $tempData];
}
/*
* Dummy function
* Compatibilité des modules avec v8 et v9
@ -617,7 +603,8 @@ class common {
$this->setData(['theme',$tempData['theme']]);
// Import des users sauvegardés si option active
if ($keepUsers === false) {
if ($keepUsers === false
AND $tempData['user'] !== NULL) {
$this->setData(['user',$tempData['user']]);
}
@ -695,10 +682,11 @@ class common {
* @param $lang langue des pages
* @return string du dossier à créer
*/
public function dirData($id, $lang) {
public function dataPath($id, $lang) {
// Sauf pour les pages et les modules
if ($id === 'page' ||
$id === 'module') {
$id === 'module' ||
$id === 'locale' ) {
$folder = self::DATA_DIR . $lang . '/' ;
} else {
$folder = self::DATA_DIR;
@ -912,9 +900,9 @@ class common {
// Fin SMTP
} else {
$host = str_replace('www.', '', $_SERVER['HTTP_HOST']);
$mail->setFrom('no-reply@' . $host, $this->getData(['config', 'title']));
$mail->setFrom('no-reply@' . $host, $this->getData(['locale', 'title']));
if (is_null($replyTo)) {
$mail->addReplyTo('no-reply@' . $host, $this->getData(['config', 'title']));
$mail->addReplyTo('no-reply@' . $host, $this->getData(['locale', 'title']));
} else {
$mail->addReplyTo($replyTo);
}
@ -960,37 +948,31 @@ class common {
return false;
}
//Retourne une chaine contenant le dossier à créer
$folder = $this->dirData ($keys[0],'fr');
// Constructeur JsonDB
$db = new \Prowebcraft\JsonDb([
'name' => $keys[0] . '.json',
'dir' => $folder
]);
// Descripteur
$db = $this->dataFiles[$keys[0]];
// Aiguillage
switch(count($keys)) {
case 2:
$db->set($keys[0],$keys[1]);
$db->save();
$db->set($keys[0],$keys[1], true);
break;
case 3:
$db->set($keys[0].'.'.$keys[1],$keys[2]);
$db->save();
$db->set($keys[0].'.'.$keys[1],$keys[2], true);
break;
case 4:
$db->set($keys[0].'.'.$keys[1].'.'.$keys[2],$keys[3]);
$db->save();
$db->set($keys[0].'.'.$keys[1].'.'.$keys[2],$keys[3], true);
break;
case 5:
$db->set($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3],$keys[4]);
$db->save();
$db->set($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3],$keys[4], true);
break;
case 6:
$db->set($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4],$keys[5]);
$db->save();
$db->set($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4],$keys[5], true);
break;
case 7:
$db->set($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4].'.'.$keys[5],$keys[6]);
$db->set($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4].'.'.$keys[5],$keys[6], true);
break;
case 8:
$db->set($keys[0].'.'.$keys[1].'.'.$keys[2].'.'.$keys[3].'.'.$keys[4].'.'.$keys[5].'.'.$keys[6],$keys[7] );
$db->save();
break;
}
@ -1012,12 +994,7 @@ class common {
if (!file_exists(self::DATA_DIR . '/' . $lang)) {
mkdir (self::DATA_DIR . '/' . $lang);
}
$folder = $this->dirData ($module,$lang);
// Constructeur JsonDB
$db = new \Prowebcraft\JsonDb([
'name' => $module . '.json',
'dir' => $folder
]);
$db = $this->dataFiles[$module];
if ($sampleSite === true) {
$db->set($module,init::$siteData[$module]);
} else {
@ -1492,12 +1469,105 @@ class common {
}
$this->setData(['core', 'dataVersion', 10306]);
}
// Version 10.3.08
if ($this->getData(['core', 'dataVersion']) < 10308) {
// RAZ la mise à jour auto bug 10.3.07
$this->setData(['core','updateAvailable', false]);
$this->setData(['core', 'dataVersion', 10308]);
}
// Version 10.4.00
if ($this->getData(['core', 'dataVersion']) < 10400) {
// Ajouter le prénom comme pseudo et le pseudo comme signature
foreach($this->getData(['user']) as $userId => $userIds){
$this->setData(['user',$userId,'pseudo',$this->getData(['user',$userId,'firstname'])]);
$this->setData(['user',$userId,'signature',2]);
}
// Ajouter les champs de blog v3
// Liste des pages dans pageList
$pageList = array();
foreach ($this->getHierarchy(null,null,null) as $parentKey=>$parentValue) {
$pageList [] = $parentKey;
foreach ($parentValue as $childKey) {
$pageList [] = $childKey;
}
}
// Parcourir pageList et rechercher les modules de blog
foreach ($pageList as $parentKey => $parent) {
//La page est un blog
if ($this->getData(['page',$parent,'moduleId']) === 'blog' ) {
$articleIds = array_keys(helper::arrayCollumn($this->getData(['module', $parent, 'posts']), 'publishedOn', 'SORT_DESC'));
foreach ($articleIds as $key => $article) {
// Droits les deux groupes
$this->setData(['module', $parent, 'posts', $article,'editConsent', 3]);
// Limite de taille 500
$this->setData(['module', $parent, 'posts', $article,'commentMaxlength', '500']);
// Pas d'approbation des commentaires
$this->setData(['module', $parent, 'posts', $article,'commentApproved', false ]);
// pas de notification
$this->setData(['module', $parent, 'posts', $article,'commentNotification', false ]);
// groupe de notification
$this->setData(['module', $parent, 'posts', $article,'commentGroupNotification', 3 ]);
}
// Traitement des commentaires
if ( is_array($this->getData(['module', $parent, 'posts', $article,'comment'])) ) {
foreach($this->getData(['module', $parent, 'posts', $article,'comment']) as $commentId => $comment) {
// Approbation
$this->setData(['module', $parent, 'posts', $article,'comment', $commentId, 'approval', true ]);
}
}
}
}
// Création du fichier locale.json
$this->setData(['locale','homePageId',$this->getData(['config','homePageId'])]);
$this->setData(['locale','page404',$this->getData(['config','page404'])]);
$this->setData(['locale','page403',$this->getData(['config','page403'])]);
$this->setData(['locale','page302',$this->getData(['config','page302'])]);
$this->setData(['locale','legalPageId',$this->getData(['config','legalPageId'])]);
$this->setData(['locale','searchPageId',$this->getData(['config','searchPageId'])]);
$this->setData(['locale','metaDescription',$this->getData(['config','metaDescription'])]);
$this->setData(['locale','title',$this->getData(['config','title'])]);
// Renommer les fichier de backup
if ($this->getInput('configAdvancedFileBackup', helper::FILTER_BOOLEAN) === false) {
$path = realpath('site/data');
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)) as $filename)
{
if (strpos($filename,'back.json')) {
rename($filename, str_replace('back.json','backup.json',$filename));
}
}
}
// Supprimer les fichiers CSS devenus inutiles du module search
if (file_exists('module/search/ressource/theme.css') )
unlink('module/search/ressource/theme.css');
if (file_exists('module/search/ressource/vartheme.css') )
unlink('module/search/ressource/vartheme.css');
$this->deleteData(['theme','search','keywordColor']);
// Nettoyer les modules avec des données null
$modules = $this->getData(['module']);
foreach($modules as $key => $value) {
if (is_null($value) ) {
unset($modules[$key]);
}
}
$this->setData (['module',$modules]);
$this->setData(['core', 'dataVersion', 10400]);
/**
* mettre à jour defaultdata
*/
}
}
}
@ -1577,21 +1647,28 @@ class core extends common {
$css = '/*' . md5(json_encode($this->getData(['theme']))) . '*/';
// Import des polices de caractères
$css .= '@import url("https://fonts.googleapis.com/css?family=' . $this->getData(['theme', 'text', 'font']) . '|' . $this->getData(['theme', 'title', 'font']) . '|' . $this->getData(['theme', 'header', 'font']) . '|' . $this->getData(['theme', 'menu', 'font']) . '");';
// Fond du site
// Fond du body
$colors = helper::colorVariants($this->getData(['theme', 'body', 'backgroundColor']));
$css .= 'body,div.mce-edit-area{background-color:' . $colors['normal'] . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'text', 'font'])) . '",sans-serif}';
// Fond TinyMCe
$css .= 'div.mce-edit-area{background-color:' . $colors['normal'] . ' !important}';
// Body
$css .= 'body{font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'text', 'font'])) . '",sans-serif}';
if($themeBodyImage = $this->getData(['theme', 'body', 'image'])) {
$css .= 'body,div.mce-edit-area{background-image:url("../file/source/' . $themeBodyImage . '");background-position:' . $this->getData(['theme', 'body', 'imagePosition']) . ';background-attachment:' . $this->getData(['theme', 'body', 'imageAttachment']) . ';background-size:' . $this->getData(['theme', 'body', 'imageSize']) . ';background-repeat:' . $this->getData(['theme', 'body', 'imageRepeat']) . '}';
$css .= 'div.mce-edit-area{background-image:url("../file/source/' . $themeBodyImage . '") !important;background-position:' . $this->getData(['theme', 'body', 'imagePosition']) . ';background-attachment:' . $this->getData(['theme', 'body', 'imageAttachment']) . ';background-size:' . $this->getData(['theme', 'body', 'imageSize']) . ';background-repeat:' . $this->getData(['theme', 'body', 'imageRepeat']) . '}';
// Image dans html pour éviter les déformations.
$css .= 'html{background-image:url("../file/source/' . $themeBodyImage . '");background-position:' . $this->getData(['theme', 'body', 'imagePosition']) . ';background-attachment:' . $this->getData(['theme', 'body', 'imageAttachment']) . ';background-size:' . $this->getData(['theme', 'body', 'imageSize']) . ';background-repeat:' . $this->getData(['theme', 'body', 'imageRepeat']) . '}';
// Couleur du body transparente
$css .= 'body{background-color: rgba(0,0,0,0)}';
} else {
// Pas d'image couleur du body
$css .= 'html{background-color:' . $colors['normal'] . ';}';
}
// Icône BacktoTop
$css .= '#backToTop {background-color:' .$this->getData(['theme', 'body', 'toTopbackgroundColor']). ';color:'.$this->getData(['theme', 'body', 'toTopColor']).';}';
// Site
$colors = helper::colorVariants($this->getData(['theme', 'text', 'linkColor']));
$css .= 'a{color:' . $colors['normal'] . '}';
$css .= 'a:hover:not(.inputFile, button){color:' . $colors['darken'] . '}';
// Fond TinyMCe
$css .= 'div.mce-edit-area{background-color:' . $colors['normal'] . ' !important}';
$css .= 'div.mce-edit-area{background-color:' . $colors['normal'] . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'text', 'font'])) . '",sans-serif}';
//$css .= 'a:hover:not(.inputFile, button){color:' . $colors['darken'] . '}';
$css .= 'body,.row > div{font-size:' . $this->getData(['theme', 'text', 'fontSize']) . '}';
$css .= 'body{color:' . $this->getData(['theme', 'text', 'textColor']) . '}';
$css .= 'select,input[type=\'password\'],input[type=\'email\'],input[type=\'text\'],.inputFile,select,textarea{color:' . $this->getData(['theme', 'text', 'textColor']) .';background-color:'.$this->getData(['theme', 'site', 'backgroundColor']).';}';
@ -1601,7 +1678,7 @@ class core extends common {
//$css .= '.button.buttonGrey,.button.buttonGrey:hover{color:' . $this->getData(['theme', 'text', 'textColor']) . '}';
$css .= '.container{max-width:' . $this->getData(['theme', 'site', 'width']) . '}';
$margin = $this->getData(['theme', 'site', 'margin']) ? '0' : '20px';
$css .= $this->getData(['theme', 'site', 'width']) === '100%' ? '#site.light{margin:60px auto !important;}#site{margin:0 auto !important;} body{margin:0 auto !important;} #bar{margin:0 auto !important;} body > header{margin:0 auto !important;} body > nav {margin: 0 auto !important;} body > footer {margin:0 auto !important;}': "#site.light{margin: 60px auto !important;}#site{margin: " . $margin . " auto !important;} body{margin:0px 10px;} #bar{margin: 0 -10px;} body > header{margin: 0 -10px;} body > nav {margin: 0 -10px;} body > footer {margin: 0 -10px;} ";
$css .= $this->getData(['theme', 'site', 'width']) === '100%' ? '#site.light{margin:5% auto !important;}#site{margin:0 auto !important;} body{margin:0 auto !important;} #bar{margin:0 auto !important;} body > header{margin:0 auto !important;} body > nav {margin: 0 auto !important;} body > footer {margin:0 auto !important;}': "#site.light{margin: 5% auto !important;}#site{margin: " . $margin . " auto !important;} body{margin:0px 10px;} #bar{margin: 0 -10px;} body > header{margin: 0 -10px;} body > nav {margin: 0 -10px;} body > footer {margin: 0 -10px;} ";
$css .= $this->getData(['theme', 'site', 'width']) === '750px' ? '.button, button{font-size:0.8em;}' : '';
$css .= '#site{background-color:' . $this->getData(['theme', 'site', 'backgroundColor']) . ';border-radius:' . $this->getData(['theme', 'site', 'radius']) . ';box-shadow:' . $this->getData(['theme', 'site', 'shadow']) . ' #212223;}';
$css .= '.editorWysiwyg {background-color:' . $this->getData(['theme', 'site', 'backgroundColor']) . ';}';
@ -1735,7 +1812,7 @@ class core extends common {
$colors = helper::colorVariants($this->getData(['admin','backgroundColorButtonRed']));
$css .= '.button.buttonRed {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}.button.buttonRed:hover {background-color:' . $colors['darken'] . ';color:' . $colors['text'] . ';}.button.buttonRed:active {background-color:' . $colors['veryDarken'] . ';color:' . $colors['text'] . ';}';
$colors = helper::colorVariants($this->getData(['admin','backgroundColorButtonGreen']));
$css .= 'button[type=submit] {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}button[type=submit]:hover {background-color: ' . $colors['darken'] . ';color: ' . $colors['text'] .';}button[type=submit]:active {background-color: ' . $colors['darken'] . ';color: ' .$colors['text'] .';}';
$css .= '.button.buttonGreen, button[type=submit] {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}.button.buttonGreen:hover, button[type=submit]:hover {background-color: ' . $colors['darken'] . ';color: ' . $colors['text'] .';}.button.buttonGreen:active, button[type=submit]:active {background-color: ' . $colors['darken'] . ';color: ' .$colors['text'] .';}';
$colors = helper::colorVariants($this->getData(['admin','backgroundBlockColor']));
$css .= '.block {border: 1px solid ' . $this->getData(['admin','borderBlockColor']) . ';}.block h4 {background-color: ' . $colors['normal'] . ';color:' . $colors['text'] . ';}';
$css .= 'table tr,input[type=email],input[type=text],input[type=password],select:not(#barSelectPage),textarea:not(.editorWysiwyg),.inputFile{background-color: ' . $colors['normal'] . ';color:' . $colors['text'] . ';border: 1px solid ' . $this->getData(['admin','borderBlockColor']) . ';}';
@ -1835,14 +1912,14 @@ class core extends common {
$access = true;
}
else {
if($this->getUrl(0) === $this->getData(['config', 'homePageId'])) {
if($this->getUrl(0) === $this->getData(['locale', 'homePageId'])) {
$access = 'login';
}
else {
$access = false;
}
}
// Empêcher l'accès aux page désactivée par URL directe
// Empêcher l'accès aux pages désactivées par URL directe
if ( ( $this->getData(['page', $this->getUrl(0),'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
) OR (
@ -1878,7 +1955,8 @@ class core extends common {
}
}
// Accès concurrent stocke la page visitée
if ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')) {
if ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
AND $this->getUser('id') ) {
$this->setData(['user',$this->getUser('id'),'accessUrl',$this->getUrl()]);
$this->setData(['user',$this->getUser('id'),'accessTimer',time()]);
}
@ -2071,6 +2149,7 @@ class core extends common {
'vendor' => array_merge($this->output['vendor'], $output['vendor'])
]);
}
if($output['title'] !== null) {
$this->addOutput([
'title' => $output['title']
@ -2090,6 +2169,7 @@ class core extends common {
}
}
}
// Erreurs
if($access === 'login') {
http_response_code(302);
@ -2104,10 +2184,10 @@ class core extends common {
'content' => template::speech('La page <strong>' . $accessInfo['pageId'] . '</strong> est ouverte par l\'utilisateur <strong>' . $accessInfo['userName'] . '</strong>')
]);
} else {
if ( $this->getData(['config','page403']) !== 'none'
AND $this->getData(['page',$this->getData(['config','page403'])]))
if ( $this->getData(['locale','page403']) !== 'none'
AND $this->getData(['page',$this->getData(['locale','page403'])]))
{
header('Location:' . helper::baseUrl() . $this->getData(['config','page403']));
header('Location:' . helper::baseUrl() . $this->getData(['locale','page403']));
} else {
$this->addOutput([
'title' => 'Erreur 403',
@ -2117,10 +2197,10 @@ class core extends common {
}
} elseif ($this->output['content'] === '') {
http_response_code(404);
if ( $this->getData(['config','page404']) !== 'none'
AND $this->getData(['page',$this->getData(['config','page404'])]))
if ( $this->getData(['locale','page404']) !== 'none'
AND $this->getData(['page',$this->getData(['locale','page404'])]))
{
header('Location:' . helper::baseUrl() . $this->getData(['config','page404']));
header('Location:' . helper::baseUrl() . $this->getData(['locale','page404']));
} else {
$this->addOutput([
'title' => 'Erreur 404',
@ -2132,18 +2212,18 @@ class core extends common {
if($this->output['metaTitle'] === '') {
if($this->output['title']) {
$this->addOutput([
'metaTitle' => strip_tags($this->output['title']) . ' - ' . $this->getData(['config', 'title'])
'metaTitle' => strip_tags($this->output['title']) . ' - ' . $this->getData(['locale', 'title'])
]);
}
else {
$this->addOutput([
'metaTitle' => $this->getData(['config', 'title'])
'metaTitle' => $this->getData(['locale', 'title'])
]);
}
}
if($this->output['metaDescription'] === '') {
$this->addOutput([
'metaDescription' => $this->getData(['config', 'metaDescription'])
'metaDescription' => $this->getData(['locale', 'metaDescription'])
]);
}
@ -2203,7 +2283,7 @@ class layout extends common {
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag("js", new Date());
gtag("config","'. $code .'");
gtag("config","'. $code .'",{ "anonymize_ip": true });
</script>';
}
}
@ -2223,10 +2303,13 @@ class layout extends common {
) {
echo '<h1 id="sectionTitle">' . $this->core->output['title'] . '</h1>';
}
echo $this->core->output['content'];
}
/**
* Affiche le contenu de la barre gauche
*
@ -2307,15 +2390,15 @@ class layout extends common {
// Affichage du module de recherche
$items .= '<span id="footerDisplaySearch"';
$items .= $this->getData(['theme','footer','displaySearch']) === false ? ' class="displayNone" >' : '>';
if ($this->getData(['config','searchPageId']) !== 'none') {
$items .= '<wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . $this->getData(['config','searchPageId']) . '" data-tippy-content="Rechercher dans le site" >Recherche</a>';
if ($this->getData(['locale','searchPageId']) !== 'none') {
$items .= '<wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . $this->getData(['locale','searchPageId']) . '" data-tippy-content="Rechercher dans le site" >Recherche</a>';
}
$items .= '</span>';
// Affichage des mentions légales
$items .= '<span id="footerDisplayLegal"';
$items .= $this->getData(['theme','footer','displayLegal']) === false ? ' class="displayNone" >' : '>';
if ($this->getData(['config','legalPageId']) !== 'none') {
$items .= '<wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . $this->getData(['config','legalPageId']) . '" data-tippy-content="Mentions Légales">Mentions légales</a>';
if ($this->getData(['locale','legalPageId']) !== 'none') {
$items .= '<wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . $this->getData(['locale','legalPageId']) . '" data-tippy-content="Mentions Légales">Mentions légales</a>';
}
$items .= '</span>';
// Affichage du lien de connexion
@ -2719,10 +2802,6 @@ class layout extends common {
foreach (common::$coreNotices as $item) $notification .= $item . ' | ';
$notificationClass = 'notificationError';
}
if(common::$inputNotices) {
$notification = 'Impossible de soumettre le formulaire, car il contient des erreurs';
$notificationClass = 'notificationError';
}
elseif(empty($_SESSION['ZWII_NOTIFICATION_SUCCESS']) === false) {
$notification = $_SESSION['ZWII_NOTIFICATION_SUCCESS'];
$notificationClass = 'notificationSuccess';
@ -2820,6 +2899,7 @@ class layout extends common {
if($this->getUser('group') >= self::GROUP_ADMIN) {
$rightItems .= '<li><a href="' . helper::baseUrl() . 'user" data-tippy-content="Configurer les utilisateurs">' . template::ico('users') . '</a></li>';
$rightItems .= '<li><a href="' . helper::baseUrl() . 'theme" data-tippy-content="Personnaliser les thèmes">' . template::ico('brush') . '</a></li>';
//$rightItems .= '<li><a href="' . helper::baseUrl() . 'translate" data-tippy-content="Gestion des langues">' . template::ico('flag') . '</a></li>';
$rightItems .= '<li><a href="' . helper::baseUrl() . 'config" data-tippy-content="Configurer le site">' . template::ico('cog-alt') . '</a></li>';
// Mise à jour automatique
$today = mktime(0, 0, 0);
@ -2914,5 +2994,4 @@ class layout extends common {
}
}
}
}
}

View File

@ -1,6 +1,7 @@
<?php $layout = new layout($this); ?>
<?php $layout = new layout($this);
$lan = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); ?>
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" lang="fr">
<html prefix="og: http://ogp.me/ns#" lang="<?php echo $lan;?>">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,7 @@
<?php $layout = new layout($this); ?>
<?php $layout = new layout($this);
$lan = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); ?>
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" lang="fr">
<html prefix="og: http://ogp.me/ns#" lang="<?php echo $lan;?>">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

View File

@ -83,7 +83,7 @@
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td style="border-bottom: 1px solid #EBEEF2; padding: 20px; font-family: 'Open Sans', sans-serif; font-size: 19px; line-height: 24px; text-align: center; color: #212223;">
<?php echo $this->getData(['config', 'title']); ?>
<?php echo $this->getData(['locale', 'title']); ?>
</td>
</tr>
</table>
@ -109,7 +109,7 @@
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td style="border-top: 1px solid #EBEEF2; padding: 20px; text-align: center; font-family: 'Open Sans', sans-serif; font-size: 12px; line-height: 17px; color: #212223;">
<a href="<?php echo helper::baseUrl(false); ?>" target="_blank"><?php echo $this->getData(['config', 'title']); ?></a>
<a href="<?php echo helper::baseUrl(false); ?>" target="_blank"><?php echo $this->getData(['locale', 'title']); ?></a>
</td>
</tr>
</table>

View File

@ -1,6 +1,7 @@
<?php $layout = new layout($this); ?>
<?php $layout = new layout($this);
$lan = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); ?>
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" lang="fr">
<html prefix="og: http://ogp.me/ns#" lang="<?php echo $lan;?>">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
@ -14,6 +15,12 @@
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/common.css">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>theme.css?<?php echo md5_file(self::DATA_DIR.'theme.css'); ?>">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false) . self::DATA_DIR; ?>custom.css?<?php echo md5_file(self::DATA_DIR.'custom.css'); ?>">
<!-- Détection RSS -->
<?php if ( ( $this->getData(['page', $this->getUrl(0), 'moduleId']) === 'blog'
OR $this->getData(['page', $this->getUrl(0), 'moduleId']) === 'news' )
AND $this->getData(['module', $this->getUrl(0), 'config', 'feeds']) === TRUE ): ?>
<link rel="alternate" type="application/rss+xml" href="'<?php echo helper::baseUrl(). $this->getUrl(0) . '/rss';?>" title="fLUX rss">
<?php endif; ?>
<?php $layout->showStyle(); ?>
<?php if (file_exists(self::DATA_DIR .'head.inc.html')) {
include(self::DATA_DIR .'head.inc.html');
@ -40,7 +47,7 @@
<!-- Menu Burger -->
<div id="toggle">
<?php if ($this->getData(['theme','menu','burgerTitle']) === true ): ?>
<div id="burgerText"><?php echo $this->getData(['config','title']);?></div>
<div id="burgerText"><?php echo $this->getData(['locale','title']);?></div>
<?php endif; ?>
<?php echo template::ico('menu',null,null,'2em'); ?></div>
<div id="menu" class="
@ -53,6 +60,7 @@
<?php if($this->getData(['theme', 'header', 'position']) === 'body'): ?>
<!-- Bannière dans le fond du site -->
<header>
<?php //$layout->showi18n();?>
<?php
if ($this->getData(['theme','header','linkHomePage'])){
echo "<a href='" . helper::baseUrl(false) . "'>" ;} ?>
@ -62,7 +70,7 @@
// Affiche toujours le titre de la bannière pour l'édition du thème
OR ($this->getUrl(0) === 'theme' AND $this->getUrl(1) === 'header')
): ?>
<span id="themeHeaderTitle"><?php echo $this->getData(['config', 'title']); ?></span>
<span id="themeHeaderTitle"><?php echo $this->getData(['locale', 'title']); ?></span>
<?php else: ?>
<span id="themeHeaderTitle">&nbsp;</span>
<?php endif; ?>
@ -78,7 +86,7 @@
<nav>
<div id="toggle">
<?php if ($this->getData(['theme','menu','burgerTitle']) === true ): ?>
<div id="burgerText"><?php echo $this->getData(['config','title']);?></div>
<div id="burgerText"><?php echo $this->getData(['locale','title']);?></div>
<?php endif; ?>
<?php echo template::ico('menu',null,null,'2em'); ?></div>
<div id="menu" class="container"><?php $layout->showMenu(); ?></div>
@ -91,7 +99,7 @@
<nav>
<div id="toggle">
<?php if ($this->getData(['theme','menu','burgerTitle']) === true ): ?>
<div id="burgerText"><?php echo $this->getData(['config','title']);?></div>
<div id="burgerText"><?php echo $this->getData(['locale','title']);?></div>
<?php endif; ?>
<?php echo template::ico('menu',null,null,'2em'); ?></div>
<div id="menu" class="container"><?php $layout->showMenu(); ?></div>
@ -116,7 +124,7 @@
// Affiche toujours le titre de la bannière pour l'édition du thème
OR ($this->getUrl(0) === 'theme' AND $this->getUrl(1) === 'header')
): ?>
<span id="themeHeaderTitle"><?php echo $this->getData(['config', 'title']); ?></span>
<span id="themeHeaderTitle"><?php echo $this->getData(['locale', 'title']); ?></span>
<?php else: ?>
<span id="themeHeaderTitle">&nbsp;</span>
<?php endif; ?>
@ -138,7 +146,7 @@
<nav <?php if($this->getData(['theme', 'menu', 'position']) === 'hide'): ?>class="displayNone"<?php endif; ?>>
<div id="toggle">
<?php if ($this->getData(['theme','menu','burgerTitle']) === true ): ?>
<div id="burgerText"><?php echo $this->getData(['config','title']);?></div>
<div id="burgerText"><?php echo $this->getData(['locale','title']);?></div>
<?php endif; ?>
<?php echo template::ico('menu',null,null,'2em'); ?></div>
<div id="menu" class="container"><?php $layout->showMenu(); ?></div>
@ -146,6 +154,7 @@
<?php endif; ?>
<!-- Corps de page -->
<section>
<?php //$layout->showi18n();?>
<?php
// Gabarit :
// Récupérer la config de la page courante
@ -186,7 +195,8 @@
if ($blockleft !== "") :?>
<div class="<?php echo $blockleft; ?>" id="contentLeft"><aside><?php $layout->showBarContentLeft(); ?></aside></div>
<?php endif; ?>
<div class="<?php echo $content; ?>" id="contentSite"><?php $layout->showContent();
<div class="<?php echo $content; ?>" id="contentSite">
<?php $layout->showContent();
if (file_exists(self::DATA_DIR . 'body.inc.html')) {
include(self::DATA_DIR . 'body.inc.html');
}

View File

@ -22,6 +22,7 @@ class config extends common {
'generateFiles' => self::GROUP_ADMIN,
'updateRobots' => self::GROUP_ADMIN,
'index' => self::GROUP_ADMIN,
'advanced' => self::GROUP_ADMIN,
'manage' => self::GROUP_ADMIN,
'updateBaseUrl' => self::GROUP_ADMIN,
'script' => self::GROUP_ADMIN,
@ -172,14 +173,14 @@ class config extends common {
];
// Sécurité de la connexion - tentative max avant blocage
public static $connectAttempt = [
999 => 'Aucun',
999 => 'Sécurité désactivée',
3 => '3 tentatives',
5 => '5 tentatives',
10 => '10 tentatives'
];
// Sécurité de la connexion - durée du blocage
public static $connectTimeout = [
0 => 'Aucun',
0 => 'Sécurité désactivée',
300 => '5 minutes',
600 => '10 minutes',
900 => '15 minutes'
@ -203,7 +204,7 @@ class config extends common {
// Valeurs en sortie
$this->addOutput([
'notification' => ($successSitemap === true && $successRobots >= 100) ? 'Création réussie' : 'Echec d\'écriture',
'redirect' => helper::baseUrl() . 'config',
'redirect' => helper::baseUrl() . 'config/advanced',
'state' => ($successSitemap === true && $successRobots >=100) ? true : false
]);
}
@ -294,7 +295,7 @@ class config extends common {
// Valeurs en sortie
$this->addOutput([
'notification' => $success === false ? 'Service inaccessible ou erreur d\'écriture de l\'image' : 'Image générée avec succès',
'redirect' => helper::baseUrl() . 'config',
'redirect' => helper::baseUrl() . 'advanced',
'state' => $success === false ? false : true
]);
}
@ -409,17 +410,11 @@ class config extends common {
// Soumission du formulaire
if($this->isPost()) {
$success = true;
// Basculement en mise à jour auto
// Remise à 0 du compteur
if ($this->getData(['config','autoUpdate']) === false &&
$this->getInput('configAutoUpdate', helper::FILTER_BOOLEAN) === true) {
$this->setData(['core','lastAutoUpdate',0]);
}
// Empêcher la modification si défini dans footer
if ( $this->getData(['theme','footer','displaySearch']) === true
AND $this->getInput('configSearchPageId') === 'none'
){
$searchPageId = $this->getData(['config','searchPageId']);
$searchPageId = $this->getData(['locale','searchPageId']);
self::$inputNotices['configSearchPageId'] = 'Désactiver l\'option dans le pied de page';
$success = false;
} else {
@ -429,7 +424,7 @@ class config extends common {
if ( $this->getData(['theme','footer','displayLegal']) === true
AND $this->getInput('configLegalPageId') === 'none'
){
$legalPageId = $this->getData(['config','legalPageId']);
$legalPageId = $this->getData(['locale','legalPageId']);
self::$inputNotices['configLegalPageId'] = 'Désactiver l\'option dans le pied de page';
$success = false;
} else {
@ -437,59 +432,113 @@ class config extends common {
}
// Sauvegarder
$this->setData([
'config',
'locale',
[
'homePageId' => $this->getInput('configHomePageId', helper::FILTER_ID, true),
'page404' => $this->getInput('configPage404'),
'page403' => $this->getInput('configPage403'),
'page302' => $this->getInput('configPage302'),
'analyticsId' => $this->getInput('configAnalyticsId'),
'autoBackup' => $this->getInput('configAutoBackup', helper::FILTER_BOOLEAN),
'maintenance' => $this->getInput('configMaintenance', helper::FILTER_BOOLEAN),
'cookieConsent' => $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN),
'favicon' => $this->getInput('configFavicon'),
'faviconDark' => $this->getInput('configFaviconDark'),
'social' => [
'facebookId' => $this->getInput('configSocialFacebookId'),
'linkedinId' => $this->getInput('configSocialLinkedinId'),
'instagramId' => $this->getInput('configSocialInstagramId'),
'pinterestId' => $this->getInput('configSocialPinterestId'),
'twitterId' => $this->getInput('configSocialTwitterId'),
'youtubeId' => $this->getInput('configSocialYoutubeId'),
'youtubeUserId' => $this->getInput('configSocialYoutubeUserId'),
'githubId' => $this->getInput('configSocialGithubId')
],
'timezone' => $this->getInput('configTimezone', helper::FILTER_STRING_SHORT, true),
'itemsperPage' => $this->getInput('configItemsperPage', helper::FILTER_INT,true),
'legalPageId' => $legalPageId,
'searchPageId' => $searchPageId,
'metaDescription' => $this->getInput('configMetaDescription', helper::FILTER_STRING_LONG, true),
'title' => $this->getInput('configTitle', helper::FILTER_STRING_SHORT, true),
'autoUpdate' => $this->getInput('configAutoUpdate', helper::FILTER_BOOLEAN),
'autoUpdateHtaccess' => $this->getInput('configAutoUpdateHtaccess', helper::FILTER_BOOLEAN),
'proxyType' => $this->getInput('configProxyType'),
'proxyUrl' => $this->getInput('configProxyUrl'),
'proxyPort' => $this->getInput('configProxyPort',helper::FILTER_INT),
'captchaStrong' => $this->getInput('configCaptchaStrong',helper::FILTER_BOOLEAN),
'title' => $this->getInput('configTitle', helper::FILTER_STRING_SHORT, true)
]
]);
// Générer robots.txt et sitemap
$this->generateFiles();
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(),
'notification' => 'Modifications enregistrées',
'state' => $success
]);
}
// Initialisation du screen - APPEL AUTO DESACTIVE POUR EVITER UN RALENTISSEMENT
/*
if (!file_exists(self::FILE_DIR.'source/screenshot.jpg')) {
$this->configMetaImage();
}
*/
// Valeurs en sortie
$this->addOutput([
'title' => 'Configuration',
'view' => 'index'
]);
}
/**
* Configuration avancée
*/
public function advanced() {
// Soumission du formulaire
if($this->isPost()) {
$success = true;
// Basculement en mise à jour auto
// Remise à 0 du compteur
if ($this->getData(['config','autoUpdate']) === false &&
$this->getInput('configAdvancedAutoUpdate', helper::FILTER_BOOLEAN) === true) {
$this->setData(['core','lastAutoUpdate',0]);
}
// Sauvegarder
$this->setData([
'config',
[
'analyticsId' => $this->getInput('configAdvancedAnalyticsId'),
'autoBackup' => $this->getInput('configAdvancedAutoBackup', helper::FILTER_BOOLEAN),
'maintenance' => $this->getInput('configAdvancedMaintenance', helper::FILTER_BOOLEAN),
'cookieConsent' => $this->getInput('configAdvancedCookieConsent', helper::FILTER_BOOLEAN),
'favicon' => $this->getInput('configAdvancedFavicon'),
'faviconDark' => $this->getInput('configAdvancedFaviconDark'),
'social' => [
'facebookId' => $this->getInput('configAdvancedSocialFacebookId'),
'linkedinId' => $this->getInput('configAdvancedSocialLinkedinId'),
'instagramId' => $this->getInput('configAdvancedSocialInstagramId'),
'pinterestId' => $this->getInput('configAdvancedSocialPinterestId'),
'twitterId' => $this->getInput('configAdvancedSocialTwitterId'),
'youtubeId' => $this->getInput('configAdvancedSocialYoutubeId'),
'youtubeUserId' => $this->getInput('configAdvancedSocialYoutubeUserId'),
'githubId' => $this->getInput('configAdvancedSocialGithubId')
],
'timezone' => $this->getInput('configAdvancedTimezone', helper::FILTER_STRING_SHORT, true),
'itemsperPage' => $this->getInput('configAdvancedItemsperPage', helper::FILTER_INT,true),
'autoUpdate' => $this->getInput('configAdvancedAutoUpdate', helper::FILTER_BOOLEAN),
'autoUpdateHtaccess' => $this->getInput('configAdvancedAutoUpdateHtaccess', helper::FILTER_BOOLEAN),
'proxyType' => $this->getInput('configAdvancedProxyType'),
'proxyUrl' => $this->getInput('configAdvancedProxyUrl'),
'proxyPort' => $this->getInput('configAdvancedProxyPort',helper::FILTER_INT),
'captchaStrong' => $this->getInput('configAdvancedCaptchaStrong',helper::FILTER_BOOLEAN),
'smtp' => [
'enable' => $this->getInput('configSmtpEnable',helper::FILTER_BOOLEAN),
'host' => $this->getInput('configSmtpHost',helper::FILTER_STRING_SHORT),
'port' => $this->getInput('configSmtpPort',helper::FILTER_INT),
'auth' => $this->getInput('configSmtpAuth',helper::FILTER_BOOLEAN),
'secure' => $this->getInput('configSmtpSecure'),
'username' => $this->getInput('configSmtpUsername',helper::FILTER_STRING_SHORT),
'password' =>helper::encrypt($this->getData(['config','smtp','username']),$this->getInput('configSmtpPassword')),
'sender' => $this->getInput('configSmtpSender',helper::FILTER_MAIL)
'enable' => $this->getInput('configAdvancedSmtpEnable',helper::FILTER_BOOLEAN),
'host' => $this->getInput('configAdvancedSmtpHost',helper::FILTER_STRING_SHORT),
'port' => $this->getInput('configAdvancedSmtpPort',helper::FILTER_INT),
'auth' => $this->getInput('configAdvancedSmtpAuth',helper::FILTER_BOOLEAN),
'secure' => $this->getInput('configAdvancedSmtpSecure'),
'username' => $this->getInput('configAdvancedSmtpUsername',helper::FILTER_STRING_SHORT),
'password' =>helper::encrypt($this->getData(['config','smtp','username']),$this->getInput('configAdvancedSmtpPassword')),
'sender' => $this->getInput('configAdvancedSmtpSender',helper::FILTER_MAIL)
],
'connect' => [
'attempt' => $this->getInput('configConnectAttempt',helper::FILTER_INT),
'timeout' => $this->getInput('configConnectTimeout',helper::FILTER_INT),
'log' => $this->getInput('configConnectLog',helper::FILTER_BOOLEAN),
'captcha' => $this->getInput('configConnectCaptcha',helper::FILTER_BOOLEAN),
'attempt' => $this->getInput('configAdvancedConnectAttempt',helper::FILTER_INT),
'timeout' => $this->getInput('configAdvancedConnectTimeout',helper::FILTER_INT),
'log' => $this->getInput('configAdvancedConnectLog',helper::FILTER_BOOLEAN),
'captcha' => $this->getInput('configAdvancedConnectCaptcha',helper::FILTER_BOOLEAN),
]
]
]);
// Efface les fichiers de backup lorsque l'option est désactivée
if ($this->getInput('configAdvancedFileBackup', helper::FILTER_BOOLEAN) === false) {
$path = realpath('site/data');
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)) as $filename)
{
if (strpos($filename,'backup.json')) {
unlink($filename);
}
}
if (file_exists('site/data/.backup')) unlink('site/data/.backup');
} else {
touch('site/data/.backup');
}
// Notice
if(self::$inputNotices === []) {
// Active la réécriture d'URL
$rewrite = $this->getInput('rewrite', helper::FILTER_BOOLEAN);
@ -536,16 +585,10 @@ class config extends common {
'state' => $success
]);
}
// Initialisation du screen - APPEL AUTO DESACTIVE POUR EVITER UN RALENTISSEMENT
/*
if (!file_exists(self::FILE_DIR.'source/screenshot.jpg')) {
$this->configMetaImage();
}
*/
// Valeurs en sortie
$this->addOutput([
'title' => 'Configuration',
'view' => 'index'
'title' => 'Configuration avancée',
'view' => 'advanced'
]);
}
@ -638,14 +681,14 @@ class config extends common {
file_put_contents(self::DATA_DIR . 'journal.log',$d);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'config',
'redirect' => helper::baseUrl() . 'config/advanced',
'notification' => 'Journal réinitialisé avec succès',
'state' => true
]);
} else {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'config',
'redirect' => helper::baseUrl() . 'config/advanced',
'notification' => 'Aucun journal à effacer',
'state' => false
]);
@ -677,7 +720,7 @@ class config extends common {
} else {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'config',
'redirect' => helper::baseUrl() . 'config/advanced',
'notification' => 'Aucun fichier journal à télécharger',
'state' => false
]);
@ -718,7 +761,7 @@ class config extends common {
} else {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'config',
'redirect' => helper::baseUrl() . 'config/advanced',
'notification' => 'Aucune liste noire à télécharger',
'state' => false
]);
@ -731,17 +774,17 @@ class config extends common {
public function blacklistReset() {
if ( file_exists(self::DATA_DIR . 'blacklist.json') ) {
unlink(self::DATA_DIR . 'blacklist.json');
$this->setData(['blacklist',[]]);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'config',
'redirect' => helper::baseUrl() . 'config/advanced',
'notification' => 'Liste noire réinitialisée avec succès',
'state' => true
]);
} else {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'config',
'redirect' => helper::baseUrl() . 'config/advanced',
'notification' => 'Pas de liste à effacer',
'state' => false
]);

View File

@ -0,0 +1,37 @@
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
/** NE PAS EFFACER
* admin.css
*/
.blockContainer {
display : none;
}
#info .zwiico-plus-circled {
display: inline;
}
.zwiico-minus-circled,
#info .zwiico-minus-circled {
display: none;
}
.zwiico-minus-circled,
.zwiico-plus-circled {
cursor: pointer;
}

View File

@ -0,0 +1,507 @@
<?php echo template::formOpen('configAdvancedForm'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('configAdvancedBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'config',
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col2 offset8">
<?php echo template::submit('configAdvancedSubmit'); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Maintenance</h4>
<div class="col3">
<?php echo template::checkbox('configAdvancedMaintenance', true, 'Site en maintenance', [
'checked' => $this->getData(['config', 'maintenance'])
]); ?>
</div>
<div class="col3 offset1">
<?php echo template::button('configManageButton', [
'href' => helper::baseUrl() . 'config/backup',
'value' => 'Sauvegarder',
'ico' => 'download'
]); ?>
</div>
<div class="col3 offset1">
<?php echo template::button('configManageButton', [
'href' => helper::baseUrl() . 'config/manage',
'value' => 'Restaurer',
'ico' => 'upload'
]); ?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Réglages</h4>
<?php $error = helper::urlGetContents('http://zwiicms.fr/update/' . common::ZWII_UPDATE_CHANNEL . '/version');?>
<div class="row">
<div class="col4">
<?php echo template::file('configAdvancedFavicon', [
'type' => 1,
'help' => 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
'label' => 'Favicon',
'value' => $this->getData(['config', 'favicon'])
]); ?>
</div>
<div class="col4">
<?php echo template::file('configAdvancedFaviconDark', [
'type' => 1,
'help' => 'Sélectionnez une icône adaptée à un thème sombre.<br>Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
'label' => 'Favicon thème sombre',
'value' => $this->getData(['config', 'faviconDark'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('configAdvancedItemsperPage', $module::$ItemsList, [
'label' => 'Articles par page',
'selected' => $this->getData(['config', 'itemsperPage']),
'help' => 'Modules Blog et News'
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::select('configAdvancedTimezone', $module::$timezones, [
'label' => 'Fuseau horaire',
'selected' => $this->getData(['config', 'timezone']),
'help' => 'Le fuseau horaire est utile au bon référencement'
]); ?>
</div>
<div class="col4 verticalAlignBottom">
<?php echo template::checkbox('configAdvancedCookieConsent', true, 'Consentement aux cookies', [
'checked' => $this->getData(['config', 'cookieConsent'])
]); ?>
</div>
<div class="col4 verticalAlignBottom">
<?php echo template::checkbox('configAdvancedCaptchaStrong', true, 'Captcha renforcé', [
'checked' => $this->getData(['config','captchaStrong']),
'help' => 'Option recommandée pour sécuriser la connexion. S\'applique à tous les captchas du site. Le captcha simple se limite à une addition de nombres de 0 à 10. Le captcha renforcé utilise quatre opérations de nombres de 0 à 20.'
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?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 class="col4">
<?php echo template::checkbox('configAdvancedAutoBackup', true, 'Sauvegarde 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 class="col4">
<?php echo template::checkbox('configAdvancedFileBackup', true, 'Copie de sauvegarde', [
'checked' => file_exists('site/data/.backup'),
'help' => '<p>Un fichier .backup.json est généré à chaque édition ou effacement d\'une donnée. La désactivation entraîne la suppression de ces fichiers.</p>'
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::checkbox('configAdvancedAutoUpdate', true, 'Mise à jour en ligne', [
'checked' => $this->getData(['config', 'autoUpdate']),
'help' => 'Vérifie une fois par jour l\'existence d\'une mise à jour.',
'disabled' => !$error
]); ?>
</div>
<div class="col4 ">
<?php echo template::checkbox('configAdvancedAutoUpdateHtaccess', true, 'Préserver htaccess', [
'checked' => $this->getData(['config', 'autoUpdateHtaccess']),
'help' => 'Lors d\'une mise à jour automatique, conserve le fichier htaccess de la racine du site.',
'disabled' => !$error
]); ?>
</div>
<div class="col4 ">
<?php echo template::button('configAdvancedUpdateForced', [
'ico' => 'download-cloud',
'href' => helper::baseUrl() . 'install/update',
'value' => 'Mise à jour manuelle',
'class' => 'buttonRed',
'disabled' => !$error
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block" id="social">
<h4>Réseaux sociaux
<div class="openClose">
<?php
echo template::ico('plus-circled','right');
echo template::ico('minus-circled','right');
?>
</div>
</h4>
<div class="blockContainer">
<div class="row">
<div class="col3">
<?php echo template::text('configAdvancedSocialFacebookId', [
'help' => 'Saisissez votre ID : https://www.facebook.com/[ID].',
'label' => 'Facebook',
'value' => $this->getData(['config', 'social', 'facebookId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('configAdvancedSocialInstagramId', [
'help' => 'Saisissez votre ID : https://www.instagram.com/[ID].',
'label' => 'Instagram',
'value' => $this->getData(['config', 'social', 'instagramId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('configAdvancedSocialYoutubeId', [
'help' => 'ID de la chaîne : https://www.youtube.com/channel/[ID].',
'label' => 'Chaîne Youtube',
'value' => $this->getData(['config', 'social', 'youtubeId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('configAdvancedSocialYoutubeUserId', [
'help' => 'Saisissez votre ID Utilisateur : https://www.youtube.com/user/[ID].',
'label' => 'Youtube',
'value' => $this->getData(['config', 'social', 'youtubeUserId'])
]); ?>
</div>
</div>
<div class="row">
<div class="col3">
<?php echo template::text('configAdvancedSocialTwitterId', [
'help' => 'Saisissez votre ID : https://twitter.com/[ID].',
'label' => 'Twitter',
'value' => $this->getData(['config', 'social', 'twitterId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('configAdvancedSocialPinterestId', [
'help' => 'Saisissez votre ID : https://pinterest.com/[ID].',
'label' => 'Pinterest',
'value' => $this->getData(['config', 'social', 'pinterestId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('configAdvancedSocialLinkedinId', [
'help' => 'Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].',
'label' => 'Linkedin',
'value' => $this->getData(['config', 'social', 'linkedinId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('configAdvancedSocialGithubId', [
'help' => 'Saisissez votre ID Github : https://github.com/[ID].',
'label' => 'Github',
'value' => $this->getData(['config', 'social', 'githubId'])
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block" id="ceo">
<h4>Référencement
<div class="openClose">
<?php
echo template::ico('plus-circled','right');
echo template::ico('minus-circled','right');
?>
</div>
</h4>
<div class="blockContainer">
<div class="row">
<div class="col4 offset1">
<div class="row">
<div class="col12">
<?php echo template::button('configAdvancedMetaImage', [
'href' => helper::baseUrl() . 'config/configMetaImage',
'value' => 'Capture Open Graph',
'ico' => 'pencil'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php echo template::button('configAdvancedSiteMap', [
'href' => helper::baseUrl() . 'config/generateFiles',
'value' => 'Sitemap.xml / Robots.txt',
'ico' => 'pencil'
]); ?>
</div>
</div>
</div>
<div class="col6 offset1">
<?php if (file_exists(self::FILE_DIR.'source/screenshot.jpg')): ?>
<div class="row">
<div class="col8 offset2 textAlignCenter">
<img src="<?php echo helper::baseUrl(false) . self::FILE_DIR.'source/screenshot.jpg';?>" 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.jpg' est effacé du gestionnaire de fichiers." />
</div>
</div>
<?php endif;?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block" id="login">
<h4>Sécurité de la connexion
<div class="openClose">
<?php
echo template::ico('plus-circled','right');
echo template::ico('minus-circled','right');
?>
</div>
</h4>
<div class="blockContainer">
<div class="row">
<div class="col3">
<?php echo template::select('configAdvancedConnectAttempt', $module::$connectAttempt , [
'label' => 'Connexions successives',
'selected' => $this->getData(['config', 'connect', 'attempt'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('configAdvancedConnectTimeout', $module::$connectTimeout , [
'label' => 'Blocage après échecs',
'selected' => $this->getData(['config', 'connect', 'timeout'])
]); ?>
</div>
<div class="col3 verticalAlignBottom">
<label id="helpBlacklist">Comptes inexistants
<?php echo template::help(
'La liste noire énumère les tentatives de connexion à partir de comptes inexistants. Sont stockés : la date, l\'heure, le nom du compte et l\'IP.
Après le nombre de tentatives autorisées, l\'IP et le compte sont bloqués.');
?>
</label>
<?php echo template::button('configAdvancedConnectblacListDownload', [
'href' => helper::baseUrl() . 'config/blacklistDownload',
'value' => 'Télécharger liste noire',
'ico' => 'download'
]); ?>
</div>
<div class="col3 verticalAlignBottom">
<?php echo template::button('configAdvancedConnectReset', [
'class' => 'buttonRed',
'href' => helper::baseUrl() . 'config/blacklistReset',
'value' => 'Réinitialiser liste',
'ico' => 'cancel'
]); ?>
</div>
</div>
<div class="row">
<div class="col3">
<?php echo template::checkbox('configAdvancedConnectCaptcha', true, 'Captcha à la connexion', [
'checked' => $this->getData(['config', 'connect','captcha'])
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block" id="logs">
<h4>Journalisation
<div class="openClose">
<?php
echo template::ico('plus-circled','right');
echo template::ico('minus-circled','right');
?>
</div>
</h4>
<div class="blockContainer">
<div class="row">
<div class="col4 verticalAlignBottom">
<?php echo template::checkbox('configAdvancedConnectLog', true, 'Activer la journalisation', [
'checked' => $this->getData(['config', 'connect', 'log'])
]); ?>
</div>
<div class="col3 offset2">
<?php echo template::button('configAdvancedLogDownload', [
'href' => helper::baseUrl() . 'config/logDownload',
'value' => 'Télécharger journal',
'ico' => 'download'
]); ?>
</div>
<div class="col3">
<?php echo template::button('configAdvancedLogReset', [
'class' => 'buttonRed',
'href' => helper::baseUrl() . 'config/logReset',
'value' => 'Réinitialiser journal',
'ico' => 'cancel'
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block" id="network">
<h4>Réseau
<div class="openClose">
<?php
echo template::ico('plus-circled','right');
echo template::ico('minus-circled','right');
?>
</div>
</h4>
<div class="blockContainer">
<div class="row">
<div class="col2">
<?php echo template::select('configAdvancedProxyType', $module::$proxyType, [
'label' => 'Type de proxy',
'selected' => $this->getData(['config', 'proxyType'])
]); ?>
</div>
<div class="col8">
<?php echo template::text('configAdvancedProxyUrl', [
'label' => 'Adresse du proxy',
'placeholder' => 'cache.proxy.fr',
'value' => $this->getData(['config', 'proxyUrl'])
]); ?>
</div>
<div class="col2">
<?php echo template::text('configAdvancedProxyPort', [
'label' => 'Port du proxy',
'placeholder' => '6060',
'value' => $this->getData(['config', 'proxyPort'])
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block" id="smtp">
<h4>Messagerie SMTP
<div class="openClose">
<?php
echo template::ico('plus-circled','right');
echo template::ico('minus-circled','right');
?>
</div>
</h4>
<div class="blockContainer">
<div class="row">
<div class="col12">
<?php echo template::checkbox('configAdvancedSmtpEnable', true, 'Activer SMTP', [
'checked' => $this->getData(['config', 'smtp','enable']),
'help' => 'Paramètres à utiliser lorsque votre hébergeur ne propose pas la fonctionnalité d\'envoi de mail.'
]); ?>
</div>
</div>
<div id="configSmtpParam">
<div class="row">
<div class="col8">
<?php echo template::text('configAdvancedSmtpHost', [
'label' => 'Adresse SMTP',
'placeholder' => 'smtp.fr',
'value' => $this->getData(['config', 'smtp','host'])
]); ?>
</div>
<div class="col2">
<?php echo template::text('configAdvancedSmtpPort', [
'label' => 'Port SMTP',
'placeholder' => '589',
'value' => $this->getData(['config', 'smtp','port'])
]); ?>
</div>
<div class="col2">
<?php echo template::select('configAdvancedSmtpAuth', $module::$SMTPauth, [
'label' => 'Authentification',
'selected' => $this->getData(['config', 'smtp','auth'])
]); ?>
</div>
</div>
<div id="configSmtpAuthParam">
<div class="row">
<div class="col5">
<?php echo template::text('configAdvancedSmtpUsername', [
'label' => 'Nom utilisateur',
'value' => $this->getData(['config', 'smtp','username' ])
]); ?>
</div>
<div class="col5">
<?php echo template::password('configAdvancedSmtpPassword', [
'label' => 'Mot de passe',
'autocomplete' => 'off',
'value' => $this->getData(['config', 'smtp','username' ]) ? helper::decrypt ($this->getData(['config', 'smtp','username' ]),$this->getData(['config','smtp','password'])) : ''
]); ?>
</div>
<div class="col2">
<?php echo template::select('configAdvancedSmtpSecure', $module::$SMTPEnc , [
'label' => 'Sécurité',
'selected' => $this->getData(['config', 'smtp','secure'])
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block" id="script">
<h4>Scripts
<div class="openClose">
<?php
echo template::ico('plus-circled','right');
echo template::ico('minus-circled','right');
?>
</div>
</h4>
<div class="blockContainer">
<div class="row">
<div class="col3">
<?php echo template::text('configAdvancedAnalyticsId', [
'help' => 'Saisissez l\'ID de suivi.',
'label' => 'Google Analytics',
'placeholder' => 'UA-XXXXXXXX-X',
'value' => $this->getData(['config', 'analyticsId'])
]); ?>
</div>
<div class="col3 offset3 verticalAlignBottom">
<?php echo template::button('configAdvancedScriptHead', [
'href' => helper::baseUrl() . 'config/script/head',
'value' => 'Script dans head',
'ico' => 'pencil'
]); ?>
</div>
<div class="col3 verticalAlignBottom">
<?php echo template::button('configAdvancedScriptBody', [
'href' => helper::baseUrl() . 'config/script/body',
'value' => 'Script dans body',
'ico' => 'pencil'
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>

View File

@ -12,7 +12,6 @@
* @link http://zwiicms.fr/
*/
/** NE PAS EFFACER
* admin.css
*/
@ -58,4 +57,4 @@
modal element will be visible */
body.loading .modal .alertMessage {
display: block;
}
}

View File

@ -3,7 +3,7 @@
<div class="col2">
<?php echo template::button('configBackupBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'config',
'href' => helper::baseUrl() . 'config/advanced',
'ico' => 'left',
'value' => 'Retour'
]); ?>

View File

@ -15,23 +15,4 @@
/** NE PAS EFFACER
* admin.css
*/
.blockContainer {
display : none;
}
#info .zwiico-plus-circled {
display: inline;
}
.zwiico-minus-circled,
#info .zwiico-minus-circled {
display: none;
}
.zwiico-minus-circled,
.zwiico-plus-circled {
cursor: pointer;
}
*/

View File

@ -8,16 +8,11 @@
'value' => 'Accueil'
]); ?>
</div>
<div class="col2 offset4">
<?php echo template::button('configManageButton', [
'href' => helper::baseUrl() . 'config/backup',
'value' => 'Sauvegarder'
]); ?>
</div>
<div class="col2">
<?php echo template::button('configManageButton', [
'href' => helper::baseUrl() . 'config/manage',
'value' => 'Restaurer'
<div class="col2 offset6">
<?php echo template::button('configAdvancedButton', [
'href' => helper::baseUrl() . 'config/advanced',
'value' => 'Avancée',
'ico' => 'cog-alt',
]); ?>
</div>
<div class="col2">
@ -27,12 +22,12 @@
<div class="row">
<div class="col12">
<div class="block">
<h4>Informations générales</h4>
<h4>Identité</h4>
<div class="row">
<div class="col9">
<?php echo template::text('configTitle', [
'label' => 'Titre du site',
'value' => $this->getData(['config', 'title']),
'value' => $this->getData(['locale', 'title']),
'help' => 'Il apparaît dans la barre de titre et les partages sur les réseaux sociaux.'
]); ?>
</div>
@ -48,105 +43,8 @@
<div class="col12">
<?php echo template::textarea('configMetaDescription', [
'label' => 'Description du site',
'value' => $this->getData(['config', 'metaDescription']),
'help' => 'La description participe au référencement, n\'oubliez pas de personnaliser la description de chaque page sans un copié collé.'
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Paramètres généraux</h4>
<?php $error = helper::urlGetContents('http://zwiicms.fr/update/' . common::ZWII_UPDATE_CHANNEL . '/version');?>
<div class="row">
<div class="col4">
<?php echo template::file('configFavicon', [
'type' => 1,
'help' => 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
'label' => 'Favicon',
'value' => $this->getData(['config', 'favicon'])
]); ?>
</div>
<div class="col4">
<?php echo template::file('configFaviconDark', [
'type' => 1,
'help' => 'Sélectionnez une icône adaptée à un thème sombre.<br>Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
'label' => 'Favicon thème sombre',
'value' => $this->getData(['config', 'faviconDark'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('configItemsperPage', $module::$ItemsList, [
'label' => 'Articles par page',
'selected' => $this->getData(['config', 'itemsperPage']),
'help' => 'Modules Blog et News'
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::select('configTimezone', $module::$timezones, [
'label' => 'Fuseau horaire',
'selected' => $this->getData(['config', 'timezone']),
'help' => 'Le fuseau horaire est utile au bon référencement'
]); ?>
</div>
<div class="col4 verticalAlignBottom">
<?php echo template::checkbox('configCookieConsent', true, 'Consentement aux cookies', [
'checked' => $this->getData(['config', 'cookieConsent'])
]); ?>
</div>
<div class="col4 verticalAlignBottom">
<?php echo template::checkbox('configCaptchaStrong', true, 'Captcha renforcé', [
'checked' => $this->getData(['config','captchaStrong']),
'help' => 'Option recommandée pour sécuriser la connexion. S\'applique à tous les captchas du site.'
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?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 class="col4">
<?php echo template::checkbox('configMaintenance', true, 'Site en maintenance', [
'checked' => $this->getData(['config', 'maintenance'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('configAutoBackup', true, 'Sauvegarde 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 class="row">
<div class="col4">
<?php echo template::checkbox('configAutoUpdate', true, 'Mise à jour en ligne', [
'checked' => $this->getData(['config', 'autoUpdate']),
'help' => 'Vérifie une fois par jour l\'existence d\'une mise à jour.',
'disabled' => !$error
]); ?>
</div>
<div class="col4 ">
<?php echo template::checkbox('configAutoUpdateHtaccess', true, 'Préserver htaccess', [
'checked' => $this->getData(['config', 'autoUpdateHtaccess']),
'help' => 'Lors d\'une mise à jour automatique, conserve le fichier htaccess de la racine du site.',
'disabled' => !$error
]); ?>
</div>
<div class="col4 ">
<?php echo template::button('configUpdateForced', [
'ico' => 'download-cloud',
'href' => helper::baseUrl() . 'install/update',
'value' => 'Mise à jour manuelle',
'class' => 'buttonRed',
'disabled' => !$error
'value' => $this->getData(['locale', 'metaDescription']),
'help' => 'La description d\'une page participe à son référencement, chaque page doit disposer d\'une description différente.'
]); ?>
</div>
</div>
@ -177,21 +75,21 @@
}
echo template::select('configHomePageId', helper::arrayCollumn($pages, 'title', 'SORT_ASC'), [
'label' => 'Accueil du site',
'selected' =>$this->getData(['config', 'homePageId']),
'selected' =>$this->getData(['locale', 'homePageId']),
'help' => 'La première page que vos visiteurs verront.'
]); ?>
</div>
<div class="col4">
<?php echo template::select('configLegalPageId', array_merge(['none' => 'Aucune'] , helper::arrayCollumn($pages, 'title', 'SORT_ASC') ) , [
'label' => 'Mentions légales',
'selected' => $this->getData(['config', 'legalPageId']),
'selected' => $this->getData(['locale', 'legalPageId']),
'help' => 'Les mentions légales sont obligatoires en France. Une option du pied de page ajoute un lien discret vers cette page.'
]); ?>
</div>
<div class="col4">
<?php echo template::select('configSearchPageId', array_merge(['none' => 'Aucune'] , helper::arrayCollumn($pages, 'title', 'SORT_ASC') ) , [
'label' => 'Recherche dans le site',
'selected' => $this->getData(['config', 'searchPageId']),
'selected' => $this->getData(['locale', 'searchPageId']),
'help' => 'Sélectionner la page "Recherche" ou une page contenant le module "Recherche" permet d\'activer un lien dans le pied de page. '
]); ?>
</div>
@ -201,7 +99,7 @@
<?php
echo template::select('configPage403', array_merge(['none' => 'Page par défaut'],helper::arrayCollumn($orphans, 'title', 'SORT_ASC')), [
'label' => 'Accès interdit, erreur 403',
'selected' =>$this->getData(['config', 'page403']),
'selected' =>$this->getData(['locale', 'page403']),
'help' => 'Cette page ne doit pas apparaître dans l\'arborescence du menu. Créez une page orpheline.'
]); ?>
</div>
@ -209,7 +107,7 @@
<?php
echo template::select('configPage404', array_merge(['none' => 'Page par défaut'],helper::arrayCollumn($orphans, 'title', 'SORT_ASC')), [
'label' => 'Page inexistante, erreur 404',
'selected' =>$this->getData(['config', 'page404']),
'selected' =>$this->getData(['locale', 'page404']),
'help' => 'Cette page ne doit pas apparaître dans l\'arborescence du menu. Créez une page orpheline.'
]); ?>
</div>
@ -217,7 +115,7 @@
<?php
echo template::select('configPage302', array_merge(['none' => 'Page par défaut'],helper::arrayCollumn($orphans, 'title', 'SORT_ASC')), [
'label' => 'Site en maintenance',
'selected' =>$this->getData(['config', 'page302']),
'selected' =>$this->getData(['locale', 'page302']),
'help' => 'Cette page ne doit pas apparaître dans l\'arborescence du menu. Créez une page orpheline.'
]); ?>
</div>
@ -225,373 +123,4 @@
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block" id="social">
<h4>Réseaux sociaux
<div class="openClose">
<?php
echo template::ico('plus-circled','right');
echo template::ico('minus-circled','right');
?>
</div>
</h4>
<div class="blockContainer">
<div class="row">
<div class="col3">
<?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="col3">
<?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="col3">
<?php echo template::text('configSocialYoutubeId', [
'help' => 'ID de la chaîne : https://www.youtube.com/channel/[ID].',
'label' => 'Chaîne Youtube',
'value' => $this->getData(['config', 'social', 'youtubeId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('configSocialYoutubeUserId', [
'help' => 'Saisissez votre ID Utilisateur : https://www.youtube.com/user/[ID].',
'label' => 'Youtube',
'value' => $this->getData(['config', 'social', 'youtubeUserId'])
]); ?>
</div>
</div>
<div class="row">
<div class="col3">
<?php echo template::text('configSocialTwitterId', [
'help' => 'Saisissez votre ID : https://twitter.com/[ID].',
'label' => 'Twitter',
'value' => $this->getData(['config', 'social', 'twitterId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('configSocialPinterestId', [
'help' => 'Saisissez votre ID : https://pinterest.com/[ID].',
'label' => 'Pinterest',
'value' => $this->getData(['config', 'social', 'pinterestId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('configSocialLinkedinId', [
'help' => 'Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].',
'label' => 'Linkedin',
'value' => $this->getData(['config', 'social', 'linkedinId'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('configSocialGithubId', [
'help' => 'Saisissez votre ID Github : https://github.com/[ID].',
'label' => 'Github',
'value' => $this->getData(['config', 'social', 'githubId'])
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block" id="ceo">
<h4>Référencement
<div class="openClose">
<?php
echo template::ico('plus-circled','right');
echo template::ico('minus-circled','right');
?>
</div>
</h4>
<div class="blockContainer">
<div class="row">
<div class="col4 offset1">
<div class="row">
<div class="col12">
<?php echo template::button('configMetaImage', [
'href' => helper::baseUrl() . 'config/configMetaImage',
'value' => 'Capture Open Graph',
'ico' => 'pencil'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php echo template::button('configSiteMap', [
'href' => helper::baseUrl() . 'config/generateFiles',
'value' => 'Sitemap.xml / Robots.txt',
'ico' => 'pencil'
]); ?>
</div>
</div>
</div>
<div class="col6 offset1">
<?php if (file_exists(self::FILE_DIR.'source/screenshot.jpg')): ?>
<div class="row">
<div class="col8 offset2 textAlignCenter">
<img src="<?php echo helper::baseUrl(false) . self::FILE_DIR.'source/screenshot.jpg';?>" 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.jpg' est effacé du gestionnaire de fichiers." />
</div>
</div>
<?php endif;?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block" id="login">
<h4>Sécurité de la connexion
<div class="openClose">
<?php
echo template::ico('plus-circled','right');
echo template::ico('minus-circled','right');
?>
</div>
</h4>
<div class="blockContainer">
<div class="row">
<div class="col3">
<?php echo template::select('configConnectAttempt', $module::$connectAttempt , [
'label' => 'Connexions successives',
'selected' => $this->getData(['config', 'connect', 'attempt'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('configConnectTimeout', $module::$connectTimeout , [
'label' => 'Blocage après échecs',
'selected' => $this->getData(['config', 'connect', 'timeout'])
]); ?>
</div>
<div class="col3 verticalAlignBottom">
<label id="helpBlacklist">Comptes inexistants
<?php echo template::help(
'La liste noire énumère les tentatives de connexion à partir de comptes inexistants. Sont stockés : la date, l\'heure, le nom du compte et l\'IP.
Après le nombre de tentatives autorisées, l\'IP et le compte sont bloqués.');
?>
</label>
<?php echo template::button('configConnectblacListDownload', [
'href' => helper::baseUrl() . 'config/blacklistDownload',
'value' => 'Télécharger liste noire',
'ico' => 'download'
]); ?>
</div>
<div class="col3 verticalAlignBottom">
<?php echo template::button('ConfigConnectReset', [
'class' => 'buttonRed',
'href' => helper::baseUrl() . 'config/blacklistReset',
'value' => 'Réinitialiser liste',
'ico' => 'cancel'
]); ?>
</div>
</div>
<div class="row">
<div class="col3">
<?php echo template::checkbox('configConnectCaptcha', true, 'Captcha à la connexion', [
'checked' => $this->getData(['config', 'connect','captcha'])
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block" id="logs">
<h4>Journalisation
<div class="openClose">
<?php
echo template::ico('plus-circled','right');
echo template::ico('minus-circled','right');
?>
</div>
</h4>
<div class="blockContainer">
<div class="row">
<div class="col4 verticalAlignBottom">
<?php echo template::checkbox('configConnectLog', true, 'Activer la journalisation', [
'checked' => $this->getData(['config', 'connect', 'log'])
]); ?>
</div>
<div class="col3 offset2">
<?php echo template::button('ConfigLogDownload', [
'href' => helper::baseUrl() . 'config/logDownload',
'value' => 'Télécharger journal',
'ico' => 'download'
]); ?>
</div>
<div class="col3">
<?php echo template::button('ConfigLogReset', [
'class' => 'buttonRed',
'href' => helper::baseUrl() . 'config/logReset',
'value' => 'Réinitialiser journal',
'ico' => 'cancel'
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block" id="network">
<h4>Réseau
<div class="openClose">
<?php
echo template::ico('plus-circled','right');
echo template::ico('minus-circled','right');
?>
</div>
</h4>
<div class="blockContainer">
<div class="row">
<div class="col2">
<?php echo template::select('configProxyType', $module::$proxyType, [
'label' => 'Type de proxy',
'selected' => $this->getData(['config', 'proxyType'])
]); ?>
</div>
<div class="col8">
<?php echo template::text('configProxyUrl', [
'label' => 'Adresse du proxy',
'placeholder' => 'cache.proxy.fr',
'value' => $this->getData(['config', 'proxyUrl'])
]); ?>
</div>
<div class="col2">
<?php echo template::text('configProxyPort', [
'label' => 'Port du proxy',
'placeholder' => '6060',
'value' => $this->getData(['config', 'proxyPort'])
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block" id="smtp">
<h4>Messagerie SMTP
<div class="openClose">
<?php
echo template::ico('plus-circled','right');
echo template::ico('minus-circled','right');
?>
</div>
</h4>
<div class="blockContainer">
<div class="row">
<div class="col12">
<?php echo template::checkbox('configSmtpEnable', true, 'Activer SMTP', [
'checked' => $this->getData(['config', 'smtp','enable']),
'help' => 'Paramètres à utiliser lorsque votre hébergeur ne propose pas la fonctionnalité d\'envoi de mail.'
]); ?>
</div>
</div>
<div id="configSmtpParam">
<div class="row">
<div class="col8">
<?php echo template::text('configSmtpHost', [
'label' => 'Adresse SMTP',
'placeholder' => 'smtp.fr',
'value' => $this->getData(['config', 'smtp','host'])
]); ?>
</div>
<div class="col2">
<?php echo template::text('configSmtpPort', [
'label' => 'Port SMTP',
'placeholder' => '589',
'value' => $this->getData(['config', 'smtp','port'])
]); ?>
</div>
<div class="col2">
<?php echo template::select('configSmtpAuth', $module::$SMTPauth, [
'label' => 'Authentification',
'selected' => $this->getData(['config', 'smtp','auth'])
]); ?>
</div>
</div>
<div id="configSmtpAuthParam">
<div class="row">
<div class="col5">
<?php echo template::text('configSmtpUsername', [
'label' => 'Nom utilisateur',
'value' => $this->getData(['config', 'smtp','username' ])
]); ?>
</div>
<div class="col5">
<?php echo template::password('configSmtpPassword', [
'label' => 'Mot de passe',
'autocomplete' => 'off',
'value' => $this->getData(['config', 'smtp','username' ]) ? helper::decrypt ($this->getData(['config', 'smtp','username' ]),$this->getData(['config','smtp','password'])) : ''
]); ?>
</div>
<div class="col2">
<?php echo template::select('configSmtpSecure', $module::$SMTPEnc , [
'label' => 'Sécurité',
'selected' => $this->getData(['config', 'smtp','secure'])
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block" id="script">
<h4>Scripts
<div class="openClose">
<?php
echo template::ico('plus-circled','right');
echo template::ico('minus-circled','right');
?>
</div>
</h4>
<div class="blockContainer">
<div class="row">
<div class="col3">
<?php echo template::text('configAnalyticsId', [
'help' => 'Saisissez l\'ID de suivi.',
'label' => 'Google Analytics',
'placeholder' => 'UA-XXXXXXXX-X',
'value' => $this->getData(['config', 'analyticsId'])
]); ?>
</div>
<div class="col3 offset3 verticalAlignBottom">
<?php echo template::button('configScriptHead', [
'href' => helper::baseUrl() . 'config/script/head',
'value' => 'Script dans head',
'ico' => 'pencil'
]); ?>
</div>
<div class="col3 verticalAlignBottom">
<?php echo template::button('ConfigScriptBody', [
'href' => helper::baseUrl() . 'config/script/body',
'value' => 'Script dans body',
'ico' => 'pencil'
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>

View File

@ -3,7 +3,7 @@
<div class="col2">
<?php echo template::button('configManageBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'config',
'href' => helper::baseUrl() . 'config/advanced',
'ico' => 'left',
'value' => 'Retour'
]); ?>

View File

@ -3,7 +3,7 @@
<div class="col2">
<?php echo template::button('configManageBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'config',
'href' => helper::baseUrl() . 'config/advanced',
'ico' => 'left',
'value' => 'Retour'
]); ?>

View File

@ -61,6 +61,8 @@ class install extends common {
'forgot' => 0,
'group' => self::GROUP_ADMIN,
'lastname' => $userLastname,
'pseudo' => 'Admin',
'signature' => 1,
'mail' => $userMail,
'password' => $this->getInput('installPassword', helper::FILTER_PASSWORD, true)
]

View File

@ -9,12 +9,6 @@ class init extends common {
'cookieConsent' => true,
'favicon' => 'favicon.ico',
'faviconDark' => 'faviconDark.ico',
'homePageId' => 'accueil',
'page302' => 'erreur302',
'page403' => 'erreur403',
'page404' => 'erreur404',
'legalPageId' => 'mentions-legales',
'searchPageId' => 'recherche',
'maintenance' => false,
'captchaStrong' => false,
'social' => [
@ -28,8 +22,6 @@ class init extends common {
],
'timezone' => 'Europe/Paris',
'itemsperPage' => 10,
'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' => 'Votre site en quelques clics !',
'proxyUrl' => '',
'proxyPort' => '',
'proxyType' => 'tcp://',
@ -41,16 +33,26 @@ class init extends common {
'attempt' => 3,
'log' => false,
'captcha' => true
]
],
],
'core' => [
'dataVersion' => 10306,
'dataVersion' => 10400,
'lastBackup' => 0,
'lastClearTmp' => 0,
'lastAutoUpdate' => 0,
'updateAvailable' => false,
'baseUrl' => ''
],
'locale' => [
'homePageId' => 'accueil',
'page302' => 'none',
'page403' => 'none',
'page404' => 'none',
'legalPageId' => 'none',
'searchPageId' => 'none',
'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' => 'Votre site en quelques clics !'
],
'page' => [
'accueil' => [
'typeMenu' => 'text',
@ -199,6 +201,7 @@ class init extends common {
'backgroundBlockColor' => 'rgba(236, 239, 241, 1)',
'borderBlockColor' => 'rgba(190, 202, 209, 1)'
],
'blacklist' => []
];
@ -647,7 +650,13 @@ class init extends common {
'blog' => [
'config' => [
'feeds' => true,
'feedsLabel' => "Syndication RSS"
'feedsLabel' => "Syndication RSS",
"editConsent" => "all",
"commentMaxlength" => "500",
"commentApproved" => false,
"commentClose" => false,
"commentNotification" => false,
"commentGroupNotification" => 1
],
'posts' => [
'mon-premier-article' => [
@ -657,7 +666,8 @@ class init extends common {
'author' => 'Rémi',
'content' => 'Article bien rédigé et très pertinent, bravo !',
'createdOn' => 1421748000,
'userId' => ''
'userId' => '',
'approval' => true
]
],
'content' => '<p>Et eodem impetu Domitianum praecipitem per scalas itidem funibus constrinxerunt, eosque coniunctos per ampla spatia civitatis acri raptavere discursu. iamque artuum et membrorum divulsa conpage superscandentes corpora mortuorum ad ultimam truncata deformitatem velut exsaturati mox abiecerunt in flumen.</p><p>Ex his quidam aeternitati se commendari posse per statuas aestimantes eas ardenter adfectant quasi plus praemii de figmentis aereis sensu carentibus adepturi, quam ex conscientia honeste recteque factorum, easque auro curant inbracteari, quod Acilio Glabrioni delatum est primo, cum consiliis armisque regem superasset Antiochum. quam autem sit pulchrum exigua haec spernentem et minima ad ascensus verae gloriae tendere longos et arduos, ut memorat vates Ascraeus, Censorius Cato monstravit. qui interrogatus quam ob rem inter multos... statuam non haberet malo inquit ambigere bonos quam ob rem id non meruerim, quam quod est gravius cur inpetraverim mussitare.</p><p>Latius iam disseminata licentia onerosus bonis omnibus Caesar nullum post haec adhibens modum orientis latera cuncta vexabat nec honoratis parcens nec urbium primatibus nec plebeiis.</p>',

View File

@ -28,12 +28,12 @@ class maintenance extends common {
exit();
}
// Page perso définie et existante
if ($this->getData(['config','page302']) !== 'none'
AND $this->getData(['page',$this->getData(['config','page302'])]) ) {
if ($this->getData(['locale','page302']) !== 'none'
AND $this->getData(['page',$this->getData(['locale','page302'])]) ) {
$this->addOutput([
'display' => self::DISPLAY_LAYOUT_LIGHT,
'title' => $this->getData(['page',$this->getData(['config','page302']),'title']),
'content' => $this->getdata(['page',$this->getData(['config','page302']),'content']),
'title' => $this->getData(['page',$this->getData(['locale','page302']),'title']),
'content' => $this->getdata(['page',$this->getData(['locale','page302']),'content']),
'view' => 'index'
]);
} else {

View File

@ -194,7 +194,7 @@ class page extends common {
]);
}
// Impossible de supprimer la page d'accueil
elseif($url[0] === $this->getData(['config', 'homePageId'])) {
elseif($url[0] === $this->getData(['locale', 'homePageId'])) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'config',
@ -202,7 +202,7 @@ class page extends common {
]);
}
// Impossible de supprimer la page de recherche affectée
elseif($url[0] === $this->getData(['config', 'searchPageId'])) {
elseif($url[0] === $this->getData(['locale', 'searchPageId'])) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'config',
@ -210,7 +210,7 @@ class page extends common {
]);
}
// Impossible de supprimer la page des mentions légales affectée
elseif($url[0] === $this->getData(['config', 'legalPageId'])) {
elseif($url[0] === $this->getData(['locale', 'legalPageId'])) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'config',
@ -218,7 +218,7 @@ class page extends common {
]);
}
// Impossible de supprimer la page des mentions légales affectée
elseif($url[0] === $this->getData(['config', 'page404'])) {
elseif($url[0] === $this->getData(['locale', 'page404'])) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'config',
@ -226,7 +226,7 @@ class page extends common {
]);
}
// Impossible de supprimer la page des mentions légales affectée
elseif($url[0] === $this->getData(['config', 'page403'])) {
elseif($url[0] === $this->getData(['locale', 'page403'])) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'config',
@ -234,7 +234,7 @@ class page extends common {
]);
}
// Impossible de supprimer la page des mentions légales affectée
elseif($url[0] === $this->getData(['config', 'page302'])) {
elseif($url[0] === $this->getData(['locale', 'page302'])) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'config',
@ -317,11 +317,13 @@ class page extends common {
$this->setData(['page', $childrenPageId, 'parentPageId', $pageId]);
}
// Change l'id de page dans les données des modules
$this->setData(['module', $pageId, $this->getData(['module', $this->getUrl(2)])]);
$this->deleteData(['module', $this->getUrl(2)]);
if ($this->getData(['module', $this->getUrl(2)]) !== null ) {
$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(['locale', 'homePageId']) === $this->getUrl(2)) {
$this->setData(['locale', 'homePageId', $pageId]);
}
}
// Supprime les données du module en cas de changement de module
@ -333,20 +335,20 @@ class page extends common {
$this->deleteData(['page', $this->getUrl(2)]);
}
// Traitement des pages spéciales affectées dans la config :
if ($this->getUrl(2) === $this->getData(['config', 'legalPageId']) ) {
$this->setData(['config','legalPageId', $pageId]);
if ($this->getUrl(2) === $this->getData(['locale', 'legalPageId']) ) {
$this->setData(['locale','legalPageId', $pageId]);
}
if ($this->getUrl(2) === $this->getData(['config', 'searchPageId']) ) {
$this->setData(['config','searchPageId', $pageId]);
if ($this->getUrl(2) === $this->getData(['locale', 'searchPageId']) ) {
$this->setData(['locale','searchPageId', $pageId]);
}
if ($this->getUrl(2) === $this->getData(['config', 'page404']) ) {
$this->setData(['config','page404', $pageId]);
if ($this->getUrl(2) === $this->getData(['locale', 'page404']) ) {
$this->setData(['locale','page404', $pageId]);
}
if ($this->getUrl(2) === $this->getData(['config', 'page403']) ) {
$this->setData(['config','page403', $pageId]);
if ($this->getUrl(2) === $this->getData(['locale', 'page403']) ) {
$this->setData(['locale','page403', $pageId]);
}
if ($this->getUrl(2) === $this->getData(['config', 'page302']) ) {
$this->setData(['config','page302', $pageId]);
if ($this->getUrl(2) === $this->getData(['locale', 'page302']) ) {
$this->setData(['locale','page302', $pageId]);
}
// Si la page est une page enfant, actualise les positions des autres enfants du parent, sinon actualise les pages sans parents
$lastPosition = 1;

View File

@ -24,7 +24,6 @@ class theme extends common {
'index' => self::GROUP_ADMIN,
'menu' => self::GROUP_ADMIN,
'reset' => self::GROUP_ADMIN,
'resetAdmin' => self::GROUP_ADMIN,
'site' => self::GROUP_ADMIN,
'admin' => self::GROUP_ADMIN,
'manage' => self::GROUP_ADMIN,
@ -534,30 +533,45 @@ class theme extends common {
* Réinitialisation de la personnalisation avancée
*/
public function reset() {
// Supprime le fichier de personnalisation avancée
unlink(self::DATA_DIR.'custom.css');
// Valeurs en sortie
$this->addOutput([
'notification' => 'Personnalisation avancée réinitialisée',
'redirect' => helper::baseUrl() . 'theme/advanced',
'state' => true
]);
// $url prend l'adresse sans le token
$url = explode('&',$this->getUrl(2));
if ( isset($_GET['csrf'])
AND $_GET['csrf'] === $_SESSION['csrf']
) {
// Réinitialisation
$redirect ='';
switch ($url[0]) {
case 'admin':
$this->initData('admin');
$redirect = helper::baseUrl() . 'theme/admin';
break;
case 'manage':
$this->initData('theme');
$redirect = helper::baseUrl() . 'theme/manage';
break;
case 'custom':
unlink(self::DATA_DIR.'custom.css');
$redirect = helper::baseUrl() . 'theme/advanced';
break;
default :
$redirect = helper::baseUrl() . 'theme';
}
// Valeurs en sortie
$this->addOutput([
'notification' => 'Réinitialisation effectuée',
'redirect' => $redirect,
'state' => true
]);
} else {
// Valeurs en sortie
$this->addOutput([
'notification' => 'Jeton incorrect'
]);
}
}
/**
* Réinitialisation de la personnalisation avancée
*/
public function resetAdmin() {
// Supprime le fichier de personnalisation avancée
//unlink(self::DATA_DIR.'admin.json');
$this->initData('admin');
// Valeurs en sortie
$this->addOutput([
'notification' => 'Thème réinitialisé',
'redirect' => helper::baseUrl() . 'theme/admin',
'state' => true
]);
}
/**
* Options du site
@ -635,7 +649,7 @@ class theme extends common {
) {
$modele = 'admin';
}
if (!empty($modele)
if (!empty($modele)
) {
// traiter l'archive
$success = $zip->extractTo('.');

View File

@ -32,7 +32,7 @@ $("input, select").on("change", function() {
var colors = core.colorVariants($("#adminColorRed").val());
css += ".button.buttonRed {background-color: " + colors.normal + ";color:" + colors.text + ";}.button.buttonRed:hover {background-color:" + colors.darken + ";color:" + colors.text + "}.button.buttonRed:active {background-color:" + colors.veryDarken + ";color:" + colors.text + "}";
var colors = core.colorVariants($("#adminColorGreen").val());
css += "button[type=submit] {background-color: " + colors.normal + ";color: " + ";color:" + colors.text + "}button[type=submit]:hover {background-color: " + colors.darken + ";color:" + colors.text + ";}button[type=submit]:active {background-color:" + colors.veryDarken + ";color:" + colors.text + "}";
css += ".button.buttonGreen, button[type=submit] {background-color: " + colors.normal + ";color: " + ";color:" + colors.text + "}.button.buttonGreen:hover, button[type=submit]:hover {background-color: " + colors.darken + ";color:" + colors.text + ";}.button.buttonGreen:active, button[type=submit]:active {background-color:" + colors.veryDarken + ";color:" + colors.text + "}";
var colors = core.colorVariants($("#adminBackGroundBlockColor").val());
css += ".block {border: 1px solid " + $("#adminBorderBlockColor").val() + ";}.block h4 {background-color: " + colors.normal + ";color:" + colors.text + ";}";
css += "input[type=email],input[type=text],input[type=password],select:not(#barSelectPage),textarea:not(.editorWysiwyg),.inputFile{background-color: " + colors.normal + ";color:" + colors.text + ";border: 1px solid " + $("#adminBorderBlockColor").val() + ";}";
@ -46,3 +46,13 @@ $("input, select").on("change", function() {
.appendTo("head");
});
/**
* Confirmation de réinitialisation
*/
$("#configAdminReset").on("click", function() {
var _this = $(this);
return core.confirm("Êtes-vous sûr de vouloir réinitialiser à son état d'origine le thème de l\'administration ?", function() {
$(location).attr("href", _this.attr("href"));
});
});

View File

@ -16,7 +16,7 @@
<div class="col2 offset">
<?php echo template::button('configAdminReset', [
'class' => 'buttonRed',
'href' => helper::baseUrl() . 'theme/resetAdmin',
'href' => helper::baseUrl() . 'theme/reset/admin' . '&csrf=' . $_SESSION['csrf'],
'value' => 'Réinitialiser',
'ico' => 'cancel'
]); ?>

View File

@ -10,7 +10,7 @@
</div>
<div class="col2 offset6">
<?php echo template::button('themeAdvancedReset', [
'href' => helper::baseUrl() . 'theme/reset',
'href' => helper::baseUrl() . 'theme/reset/custom' . '&csrf=' . $_SESSION['csrf'],
'class' => 'buttonRed',
'ico' => 'cancel',
'value' => 'Réinitialiser'

View File

@ -21,15 +21,25 @@ $(document).ready(function(){
* Aperçu en direct
*/
$("input, select").on("change", function() {
// Option fixe pour contain et cover
var themeBodyImageSize = $("#themeBodyImageSize").val();
if(themeBodyImageSize === "cover" ||
themeBodyImageSize === "contain" ) {
$("#themeBodyImageAttachment").val("fixed");
}
// Couleur du fond
var css = "body{background-color:" + $("#themeBodyBackgroundColor").val() + "}";
var css = "html{background-color:" + $("#themeBodyBackgroundColor").val() + "}";
// Image du fond
var themeBodyImage = $("#themeBodyImage").val();
if(themeBodyImage) {
css += "body{background-image:url('<?php echo helper::baseUrl(false); ?>site/file/source/" + themeBodyImage + "');background-repeat:" + $("#themeBodyImageRepeat").val() + ";background-position:" + $("#themeBodyImagePosition").val() + ";background-attachment:" + $("#themeBodyImageAttachment").val() + ";background-size:" + $("#themeBodyImageSize").val() + "}";
css += "html{background-image:url('<?php echo helper::baseUrl(false); ?>site/file/source/" + themeBodyImage + "');background-repeat:" + $("#themeBodyImageRepeat").val() + ";background-position:" + $("#themeBodyImagePosition").val() + ";background-attachment:" + $("#themeBodyImageAttachment").val() + ";background-size:" + $("#themeBodyImageSize").val() + "}";
css += "html{background-color:rgba(0,0,0,0);}";
}
else {
css += "body{background-image:none}";
css += "html{background-image:none}";
}
css += '#backToTop {background-color:' + $("#themeBodyToTopBackground").val() + ';color:' + $("#themeBodyToTopColor").val() + ';}';

View File

@ -79,16 +79,16 @@
<div class="row">
<div class="col6">
<?php echo template::checkbox('themeFooterDisplayLegal', true, 'Mentions légales', [
'checked' => $this->getData(['config', 'legalPageId']) === 'none' ? false : $this->getData(['theme', 'footer', 'displayLegal']),
'disabled' => $this->getData(['config', 'legalPageId']) === 'none' ? true : false,
'help' => $this->getData(['config', 'legalPageId']) === 'none' ? 'Pour activer cette option, sélectionnez la page contenant les mentions légales dans la configuration du site' : ''
'checked' => $this->getData(['locale', 'legalPageId']) === 'none' ? false : $this->getData(['theme', 'footer', 'displayLegal']),
'disabled' => $this->getData(['locale', 'legalPageId']) === 'none' ? true : false,
'help' => $this->getData(['locale', 'legalPageId']) === 'none' ? 'Pour activer cette option, sélectionnez la page contenant les mentions légales dans la configuration du site' : ''
]); ?>
</div>
<div class="col6">
<?php echo template::checkbox('themeFooterDisplaySearch', true, 'Rechercher dans le site', [
'checked' => $this->getData(['config', 'searchPageId']) === 'none' ? false : $this->getData(['theme', 'footer', 'displaySearch']),
'disabled' => $this->getData(['config', 'searchPageId']) === 'none' ? true : false,
'help' => $this->getData(['config', 'searchPageId']) === 'none' ? 'Pour activer cette option, sélectionnez la page contenant un module de recherche dans la configuration du site' : ''
'checked' => $this->getData(['locale', 'searchPageId']) === 'none' ? false : $this->getData(['theme', 'footer', 'displaySearch']),
'disabled' => $this->getData(['locale', 'searchPageId']) === 'none' ? true : false,
'help' => $this->getData(['locale', 'searchPageId']) === 'none' ? 'Pour activer cette option, sélectionnez la page contenant un module de recherche dans la configuration du site' : ''
]); ?>
</div>
</div>

View 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 Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
/**
* Confirmation de réinitialisation
*/
$("#configManageReset").on("click", function() {
var _this = $(this);
return core.confirm("Êtes-vous sûr de vouloir réinitialiser à son état d'origine le thème du site ?", function() {
$(location).attr("href", _this.attr("href"));
});
});

View File

@ -8,53 +8,59 @@
'value' => 'Retour'
]); ?>
</div>
<div class="col2 offset6">
<?php echo template::button('configManageReset', [
'class' => 'buttonRed',
'href' => helper::baseUrl() . 'theme/reset/manage' . '&csrf=' . $_SESSION['csrf'],
'value' => 'Réinitialiser',
'ico' => 'cancel'
]); ?>
</div>
<div class="col2">
<?php echo template::submit('themeImportSubmit', [
'value' => 'Appliquer'
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<div class="col12">
<div class="block">
<h4>Installer un thème archivé</h4>
<h4>Installer un thème archivé (site ou administration)</h4>
<div class="row">
<div class="col12">
<div class="col6 offset3">
<?php echo template::file('themeManageImport', [
'label' => 'Archive ZIP :',
'type' => 2
]); ?>
</div>
</div>
<div class="row">
<div class="col5 offset3">
<?php echo template::submit('themeImportSubmit', [
'value' => 'Appliquer'
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col6">
<div class="block">
<h4>Sauvegarder le thème</h4>
<h4>Sauvegarde du thème dans les <a href="<?php echo helper::baseUrl(false); ?>core/vendor/filemanager/dialog.php?fldr=theme&type=0&akey=<?php echo md5_file(self::DATA_DIR.'core.json'); ?>" data-lity>fichiers</a> du site</h4>
<div class="row">
<div class="col6">
<?php echo template::button('themeSave', [
'href' => helper::baseUrl() . 'theme/save/theme',
'ico' => 'download-cloud',
'value' => 'Thème site'
'value' => 'Thème du site'
]); ?>
</div>
<div class="col6">
<?php echo template::button('themeSaveAdmin', [
'href' => helper::baseUrl() . 'theme/save/admin',
'ico' => 'download-cloud',
'value' => 'Thème administration'
'value' => 'Thème de l\'administration'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<em>Le fichier de sauvegarde est généré dans <a href="<?php echo helper::baseUrl(false); ?>core/vendor/filemanager/dialog.php?fldr=theme&type=0&akey=<?php echo md5_file(self::DATA_DIR.'core.json'); ?>" data-lity>le dossier Thème</a> du gestionnaire de fichiers.</em>
</div>
</div>
</div>
</div>
<div class="col6">
<div class="block">
<h4>Télécharger le thème</h4>
<div class="row">
@ -62,14 +68,14 @@
<?php echo template::button('themeExport', [
'href' => helper::baseUrl() . 'theme/export/theme',
'ico' => 'download',
'value' => 'Thème site'
'value' => 'Thème du site'
]); ?>
</div>
<div class="col6">
<?php echo template::button('themeExport', [
'href' => helper::baseUrl() . 'theme/export/admin',
'ico' => 'download',
'value' => 'Thème administration'
'value' => 'Thème de l\'administration'
]); ?>
</div>
</div>

View File

@ -178,8 +178,7 @@
<div class="row">
<div class="col4">
<?php echo template::checkbox('themeMenuLoginLink', true, 'Lien de connexion', [
'checked' => $this->getData(['theme', 'menu', 'loginLink']),
'help' => 'L\'activation de cette option n\'est pas recommandée'
'checked' => $this->getData(['theme', 'menu', 'loginLink'])
]); ?>
</div>
<div class="col4">

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

View File

@ -0,0 +1,109 @@
<?php
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
class translate extends common {
public static $actions = [
/*'config' => self::GROUP_MODERATOR,*/
'index' => self::GROUP_MODERATOR,
'language' => self::GROUP_VISITOR
];
/**
* Configuration
*/
public function index() {
// Soumission du formulaire
if($this->isPost()) {
// Edtion des langues
foreach (self::$i18nList as $keyi18n => $value) {
if ($keyi18n === 'fr') {continue;}
// Effacement d'une langue installée (dossier plus option désactivée précédemment)
if ( is_dir( self::DATA_DIR . $keyi18n ) === true
AND $this->getInput('translateSiteFlag' . strtoupper($keyi18n) , helper::FILTER_BOOLEAN) === false )
{
$this->removeDir( self::DATA_DIR . $keyi18n);
}
// Installation d'une langue
if ( $this->getInput('translateSiteFlag' . strtoupper($keyi18n) , helper::FILTER_BOOLEAN) === true )
{
// Créer le dossier
if (is_dir( self::DATA_DIR . $keyi18n ) === false ) {
mkdir( self::DATA_DIR . $keyi18n);
}
// Charger les modèles
require_once('core/module/install/ressource/defaultdata.php');
// Nouvelle instance des pages, module, locale
$files = ['page','module','locale'];
foreach ($files as $keyFile) {
echo $keyFile;
$e = new \Prowebcraft\JsonDb([
'name' => $keyFile . '.json',
'dir' => $this->dataPath ($keyFile,$keyi18n)
]);;
$e->set($keyFile, init::$defaultData[$keyFile]);
$e->save();
}
}
}
// Enregistrement des données
$this->setData(['config','translate', [
'scriptGoogle' => $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN),
'showCredits' => $this->getInput('translateCredits', helper::FILTER_BOOLEAN) ? $this->getInput('translateCredits', helper::FILTER_BOOLEAN) : false,
'autoDetect' => $this->getInput('translateAutoDetect', helper::FILTER_BOOLEAN),
'admin' => $this->getInput('translateAdmin', helper::FILTER_BOOLEAN),
'scriptFR' => $this->getInput('translateScriptFlagFR', helper::FILTER_BOOLEAN),
'scriptDE' => $this->getInput('translateScriptFlagDE', helper::FILTER_BOOLEAN),
'scriptEN' => $this->getInput('translateScriptFlagEN', helper::FILTER_BOOLEAN),
'scriptES' => $this->getInput('translateScriptFlagES', helper::FILTER_BOOLEAN),
'scriptIT' => $this->getInput('translateScriptFlagIT', helper::FILTER_BOOLEAN),
'scriptNL' => $this->getInput('translateScriptFlagNL', helper::FILTER_BOOLEAN),
'scriptPT' => $this->getInput('translateScriptFlagPT', helper::FILTER_BOOLEAN),
'site' => $this->getInput('translateSite', helper::FILTER_BOOLEAN),
'siteFR' => $this->getInput('translateSiteFlagFR', helper::FILTER_BOOLEAN),
'siteDE' => $this->getInput('translateSiteFlagDE', helper::FILTER_BOOLEAN),
'siteEN' => $this->getInput('translateSiteFlagEN', helper::FILTER_BOOLEAN),
'siteES' => $this->getInput('translateSiteFlagES', helper::FILTER_BOOLEAN),
'siteIT' => $this->getInput('translateSiteFlagIT', helper::FILTER_BOOLEAN),
'siteNL' => $this->getInput('translateSiteFlagNL', helper::FILTER_BOOLEAN),
'sitePT' => $this->getInput('translateSiteFlagPT', helper::FILTER_BOOLEAN)
]]);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(),
'notification' => 'Modifications enregistrées',
'state' => true
]);
}
// Valeurs en sortie
$this->addOutput([
'title' => 'Paramètres',
'view' => 'index'
]);
}
/*
* Traitement du changement de langues
*/
public function language() {
// Transmettre le choix au noyau
setcookie('ZWII_USER_I18N', $this->getUrl(2), time() + 3600, helper::baseUrl(false, false) , '', helper::isHttps(), true);
// Valeurs en sortie sans post
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(3)
]);
}
}

View File

@ -0,0 +1,20 @@
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
/** @import url("site/data/admin.css"); */
/** NE PAS EFFACER
* admin.css
*/

View File

@ -0,0 +1,124 @@
<?php echo template::formOpen('translateForm'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('translateFormBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl(),
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col2 offset8">
<?php echo template::submit('translateFormSubmit'); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Langues supportées</h4>
<div class="row">
<div class="col6">
<b>Traduction automatique :</b>
<div class="col12">
<?php echo template::checkbox('translateScriptFlagDE', true, 'Allemand', [
'checked' => $this->getData(['config','translate', 'scriptDE'])
]); ?>
</div>
<div class="col12">
<?php echo template::checkbox('translateScriptFlagEN', true, 'Anglais', [
'checked' => $this->getData(['config','translate', 'scriptEN'])
]); ?>
</div>
<div class="col12">
<?php echo template::checkbox('translateScriptFlagES', true, 'Espagnol', [
'checked' => $this->getData(['config','translate', 'scriptES'])
]); ?>
</div>
<div class="col12">
<?php echo template::checkbox('translateScriptFlagIT', true, 'Italien', [
'checked' => $this->getData(['config','translate', 'scriptIT'])
]); ?>
</div>
<div class="col12">
<?php echo template::checkbox('translateScriptFlagNL', true, 'Néerlandais', [
'checked' => $this->getData(['config','translate', 'scriptNL'])
]); ?>
</div>
<div class="col12">
<?php echo template::checkbox('translateScriptFlagPT', true, 'Portugais', [
'checked' => $this->getData(['config','translate', 'scriptPT'])
]); ?>
</div>
<div class="col12">
<?php echo template::checkbox('translateAutoDetect', true, 'Détection automatique', [
'checked' => $this->getData(['config','translate', 'autoDetect']),
'help' => 'Détecte la langue du navigateur.'
]); ?>
</div>
</div>
<div class="col6">
<b>Traduction rédigée :</b>
<div class="col12">
<?php echo template::checkbox('translateSiteFlagEN', true, 'Anglais', [
'checked' => $this->getData(['config', 'translate', 'siteEN'])
]); ?>
</div>
<div class="col12">
<?php echo template::checkbox('translateSiteFlagDE', true, 'Allemand', [
'checked' => $this->getData(['config', 'translate', 'siteDE'])
]); ?>
</div>
<div class="col12">
<?php echo template::checkbox('translateSiteFlagES', true, 'Espagnol', [
'checked' => $this->getData(['config', 'translate', 'siteES'])
]); ?>
</div>
<div class="col12">
<?php echo template::checkbox('translateSiteFlagIT', true, 'Italien', [
'checked' => $this->getData(['config', 'translate', 'siteIT'])
]); ?>
</div>
<div class="col12">
<?php echo template::checkbox('translateSiteFlagNL', true, 'Néerlandais', [
'checked' => $this->getData(['config', 'translate', 'siteNL'])
]); ?>
</div>
<div class="col12">
<?php echo template::checkbox('translateSiteFlagPT', true, 'Portugais', [
'checked' => $this->getData(['config', 'translate', 'sitePT'])
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Paramètres de traduction automatique</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('translateScriptGoogle', true, 'Active le script de traduction automatique', [
'checked' => $this->getData(['config','translate', 'scriptGoogle'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('translateAdmin', true, 'Mode connexion', [
'checked' => $this->getData(['config','translate', 'admin']),
'help' => 'Traduction automatique du site et de l\'interface du CMS'
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('translateCredits', true, 'Afficher les crédits du script Google', [
'checked' => $this->getData(['config','translate', 'showCredits']),
'help' => 'Option vivement recommandée pour le respect du droit d\'auteur'
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>

View File

@ -0,0 +1,8 @@
# Bloque l'accès aux données
Order deny,allow
Deny from all
# Sauf l'accès au modèle csv
<Files template.csv>
Order Allow,Deny
Allow from all
</Files>

View File

@ -0,0 +1,2 @@
id;nom;prenom;email;groupe
jbon;Bon;Jean;jean.bon@email.fr;1
1 id nom prenom email groupe
2 jbon Bon Jean jean.bon@email.fr 1

View File

@ -17,20 +17,35 @@ class user extends common {
public static $actions = [
'add' => self::GROUP_ADMIN,
'delete' => self::GROUP_ADMIN,
'edit' => self::GROUP_MEMBER,
'forgot' => self::GROUP_VISITOR,
'import' => self::GROUP_ADMIN,
'index' => self::GROUP_ADMIN,
'login' => self::GROUP_VISITOR,
'edit' => self::GROUP_MEMBER,
'logout' => self::GROUP_MEMBER,
'forgot' => self::GROUP_VISITOR,
'login' => self::GROUP_VISITOR,
'reset' => self::GROUP_VISITOR
];
public static $users = [];
//Paramètres pour choix de la signature
public static $signature = [
self::SIGNATURE_ID => 'Identifiant',
self::SIGNATURE_PSEUDO => 'Pseudo',
self::SIGNATURE_FIRSTLASTNAME => 'Prénom Nom',
self::SIGNATURE_LASTFIRSTNAME => 'Nom Prénom'
];
public static $userId = '';
public static $userLongtime = false;
public static $separators = [
';' => ';',
',' => ',',
':' => ':'
];
/**
* Ajout
*/
@ -63,8 +78,15 @@ class user extends common {
'forgot' => 0,
'group' => $this->getInput('userAddGroup', helper::FILTER_INT, true),
'lastname' => $userLastname,
'pseudo' => $this->getInput('userAddPseudo', helper::FILTER_STRING_SHORT, true),
'signature' => $this->getInput('userAddSignature', helper::FILTER_INT, true),
'mail' => $userMail,
'password' => $this->getInput('userAddPassword', helper::FILTER_PASSWORD, true),
"connectFail" => null,
"connectTimeout" => null,
"accessUrl" => null,
"accessTimer" => null,
"accessCsrf" => null
]
]);
@ -73,11 +95,10 @@ class user extends common {
if($this->getInput('userAddSendMail', helper::FILTER_BOOLEAN) && $check === true) {
$sent = $this->sendMail(
$userMail,
'Compte créé sur ' . $this->getData(['config', 'title']),
'Compte créé sur ' . $this->getData(['locale', 'title']),
'Bonjour <strong>' . $userFirstname . ' ' . $userLastname . '</strong>,<br><br>' .
'Un administrateur vous a créé un compte sur le site ' . $this->getData(['config', 'title']) . '. Vous trouverez ci-dessous les détails de votre compte.<br><br>' .
'Un administrateur vous a créé un compte sur le site ' . $this->getData(['locale', 'title']) . '. Vous trouverez ci-dessous les détails de votre compte.<br><br>' .
'<strong>Identifiant du compte :</strong> ' . $this->getInput('userAddId') . '<br>' .
'<strong>Mot de passe du compte :</strong> ' . $this->getInput('userAddPassword') . '<br><br>' .
'<small>Nous ne conservons pas les mots de passe, en conséquence nous vous conseillons de conserver ce message tant que vous ne vous êtes pas connecté. Vous pourrez modifier votre mot de passe après votre première connexion.</small>',
null
);
@ -208,15 +229,26 @@ class user extends common {
else {
$newGroup = $this->getData(['user', $this->getUrl(2), 'group']);
}
// Modification de nom Prénom
if($this->getUser('group') === self::GROUP_ADMIN){
$newfirstname = $this->getInput('userEditFirstname', helper::FILTER_STRING_SHORT, true);
$newlastname = $this->getInput('userEditLastname', helper::FILTER_STRING_SHORT, true);
}
else{
$newfirstname = $this->getData(['user', $this->getUrl(2), 'firstname']);
$newlastname = $this->getData(['user', $this->getUrl(2), 'lastname']);
}
// Modifie l'utilisateur
$this->setData([
'user',
$this->getUrl(2),
[
'firstname' => $this->getInput('userEditFirstname', helper::FILTER_STRING_SHORT, true),
'firstname' => $newfirstname,
'forgot' => 0,
'group' => $newGroup,
'lastname' => $this->getInput('userEditLastname', helper::FILTER_STRING_SHORT, true),
'lastname' => $newlastname,
'pseudo' => $this->getInput('userEditPseudo', helper::FILTER_STRING_SHORT, true),
'signature' => $this->getInput('userEditSignature', helper::FILTER_INT, true),
'mail' => $this->getInput('userEditMail', helper::FILTER_MAIL, true),
'password' => $newPassword,
'connectFail' => $this->getData(['user',$this->getUrl(2),'connectFail']),
@ -231,12 +263,12 @@ class user extends common {
$redirect = helper::baseUrl() . 'user/login/' . str_replace('/', '_', $this->getUrl());
}
// Redirection si retour en arrière possible
elseif($this->getUrl(3)) {
elseif($this->getUser('group') === 3) {
$redirect = helper::baseUrl() . 'user';
}
// Redirection normale
else {
$redirect = helper::baseUrl() . $this->getUrl();
$redirect = helper::baseUrl();
}
// Valeurs en sortie
$this->addOutput([
@ -333,125 +365,137 @@ class user extends common {
*/
public function login() {
// Soumission du formulaire
$logStatus = '';
if($this->isPost()) {
// Check la captcha
// Lire Id du compte
$userId = $this->getInput('userLoginId', helper::FILTER_ID, true);
// Check le captcha
if(
$this->getData(['config','connect','captcha'])
AND password_verify($this->getInput('userLoginCaptcha', helper::FILTER_INT), $this->getInput('userLoginCaptchaResult') ) === false )
{
self::$inputNotices['userLoginCaptcha'] = 'Incorrect';
$captcha = false;
} else {
// Lire Id du compte
$userId = $this->getInput('userLoginId', helper::FILTER_ID, true);
/**
* Aucun compte existant
*/
if ( !$this->getData(['user', $userId])) {
//Stockage de l'IP
$this->setData([
'blacklist',
$userId,
[
'connectFail' => $this->getData(['blacklist',$userId,'connectFail']) + 1,
'lastFail' => time(),
'ip' => helper::getIp()
]
$captcha = true;
}
/**
* Aucun compte existant
*/
if ( !$this->getData(['user', $userId])) {
$logStatus = 'Compte inconnu';
//Stockage de l'IP
$this->setData([
'blacklist',
$userId,
[
'connectFail' => $this->getData(['blacklist',$userId,'connectFail']) + 1,
'lastFail' => time(),
'ip' => helper::getIp()
]
]);
// Verrouillage des IP
$ipBlackList = helper::arrayCollumn($this->getData(['blacklist']), 'ip');
if ( $this->getData(['blacklist',$userId,'connectFail']) >= $this->getData(['config', 'connect', 'attempt'])
AND in_array($this->getData(['blacklist',$userId,'ip']),$ipBlackList) ) {
$logStatus = 'Compte inconnu verrouillé';
// Valeurs en sortie
$this->addOutput([
'notification' => 'Compte verrouillé',
'redirect' => helper::baseUrl(),
'state' => false
]);
// Verrouillage des IP
$ipBlackList = helper::arrayCollumn($this->getData(['blacklist']), 'ip');
if ( $this->getData(['blacklist',$userId,'connectFail']) >= $this->getData(['config', 'connect', 'attempt'])
AND in_array($this->getData(['blacklist',$userId,'ip']),$ipBlackList) ) {
// Valeurs en sortie
} else {
// Valeurs en sortie
$this->addOutput([
'notification' => 'Captcha, identifiant ou mot de passe incorrects'
]);
}
/**
* Le compte existe
*/
} else {
// Cas 4 : le délai de blocage est dépassé et le compte est au max - Réinitialiser
if ($this->getData(['user',$userId,'connectTimeout']) + $this->getData(['config', 'connect', 'timeout']) < time()
AND $this->getData(['user',$userId,'connectFail']) === $this->getData(['config', 'connect', 'attempt']) ) {
$this->setData(['user',$userId,'connectFail',0 ]);
$this->setData(['user',$userId,'connectTimeout',0 ]);
}
// Check la présence des variables et contrôle du blocage du compte si valeurs dépassées
// Vérification du mot de passe et du groupe
if (
( $this->getData(['user',$userId,'connectTimeout']) + $this->getData(['config', 'connect', 'timeout']) ) < time()
AND $this->getData(['user',$userId,'connectFail']) < $this->getData(['config', 'connect', 'attempt'])
AND password_verify($this->getInput('userLoginPassword', helper::FILTER_STRING_SHORT, true), $this->getData(['user', $userId, 'password']))
AND $this->getData(['user', $userId, 'group']) >= self::GROUP_MEMBER
AND $captcha === true
) {
// RAZ
$this->setData(['user',$userId,'connectFail',0 ]);
$this->setData(['user',$userId,'connectTimeout',0 ]);
// Expiration
$expire = $this->getInput('userLoginLongTime') ? strtotime("+1 year") : 0;
$c = $this->getInput('userLoginLongTime', helper::FILTER_BOOLEAN) === true ? 'true' : 'false';
setcookie('ZWII_USER_ID', $userId, $expire, helper::baseUrl(false, false) , '', helper::isHttps(), true);
setcookie('ZWII_USER_PASSWORD', $this->getData(['user', $userId, 'password']), $expire, helper::baseUrl(false, false), '', helper::isHttps(), true);
setcookie('ZWII_USER_LONGTIME', $c, $expire, helper::baseUrl(false, false), '', helper::isHttps(), true);
// Accès multiples avec le même compte
$this->setData(['user',$userId,'accessCsrf',$_SESSION['csrf']]);
// Valeurs en sortie lorsque le site est en maintenance et que l'utilisateur n'est pas administrateur
if(
$this->getData(['config', 'maintenance'])
AND $this->getData(['user', $userId, 'group']) < self::GROUP_ADMIN
) {
$this->addOutput([
'notification' => 'Trop de tentatives, compte verrouillé',
'notification' => 'Seul un administrateur peut se connecter lors d\'une maintenance',
'redirect' => helper::baseUrl(),
'state' => false
]);
} else {
$logStatus = 'Connexion réussie';
// Valeurs en sortie
$this->addOutput([
'notification' => 'Identifiant ou mot de passe incorrect'
'notification' => 'Bienvenue ' . $this->getData(['user',$userId,'firstname']) . ' ' . $this->getData(['user',$userId,'lastname']) ,
'redirect' => helper::baseUrl() . str_replace('_', '/', str_replace('__', '#', $this->getUrl(2))),
'state' => true
]);
}
/**
* Le compte existe
*/
} else {
// Cas 4 : le délai de blocage est dépassé et le compte est au max - Réinitialiser
if ($this->getData(['user',$userId,'connectTimeout']) + $this->getData(['config', 'connect', 'timeout']) < time()
AND $this->getData(['user',$userId,'connectFail']) === $this->getData(['config', 'connect', 'attempt']) ) {
$this->setData(['user',$userId,'connectFail',0 ]);
$this->setData(['user',$userId,'connectTimeout',0 ]);
// Sinon notification d'échec
} else {
$notification = 'Captcha, identifiant ou mot de passe incorrects';
$logStatus = $captcha === true ? 'Erreur de mot de passe' : 'Erreur de captcha';
// Cas 1 le nombre de connexions est inférieur aux tentatives autorisées : incrément compteur d'échec
if ($this->getData(['user',$userId,'connectFail']) < $this->getData(['config', 'connect', 'attempt'])) {
$this->setData(['user',$userId,'connectFail',$this->getdata(['user',$userId,'connectFail']) + 1 ]);
}
// Check la présence des variables et contrôle du blocage du compte si valeurs dépassées
// Vérification du mot de passe et du groupe
if (
( $this->getData(['user',$userId,'connectTimeout']) + $this->getData(['config', 'connect', 'timeout']) ) < time()
AND $this->getData(['user',$userId,'connectFail']) < $this->getData(['config', 'connect', 'attempt'])
AND password_verify($this->getInput('userLoginPassword', helper::FILTER_STRING_SHORT, true), $this->getData(['user', $userId, 'password']))
AND $this->getData(['user', $userId, 'group']) >= self::GROUP_MEMBER
) {
// Expiration
$expire = $this->getInput('userLoginLongTime') ? strtotime("+1 year") : 0;
$c = $this->getInput('userLoginLongTime', helper::FILTER_BOOLEAN) === true ? 'true' : 'false';
setcookie('ZWII_USER_ID', $userId, $expire, helper::baseUrl(false, false) , '', helper::isHttps(), true);
setcookie('ZWII_USER_PASSWORD', $this->getData(['user', $userId, 'password']), $expire, helper::baseUrl(false, false), '', helper::isHttps(), true);
setcookie('ZWII_USER_LONGTIME', $c, $expire, helper::baseUrl(false, false), '', helper::isHttps(), true);
// Accès multiples avec le même compte
$this->setData(['user',$userId,'accessCsrf',$_SESSION['csrf']]);
// Valeurs en sortie lorsque le site est en maintenance et que l'utilisateur n'est pas administrateur
if(
$this->getData(['config', 'maintenance'])
AND $this->getData(['user', $userId, 'group']) < self::GROUP_ADMIN
) {
$this->addOutput([
'notification' => 'Seul un administrateur peut se connecter lors d\'une maintenance',
'redirect' => helper::baseUrl(),
'state' => false
]);
} else {
// Valeurs en sortie
$this->addOutput([
'notification' => 'Connexion réussie',
'redirect' => helper::baseUrl() . str_replace('_', '/', str_replace('__', '#', $this->getUrl(2))),
'state' => true
]);
}
// Sinon notification d'échec
} else {
$notification = 'Identifiant ou mot de passe incorrect';
// Cas 1 le nombre de connexions est inférieur aux tentatives autorisées : incrément compteur d'échec
if ($this->getData(['user',$userId,'connectFail']) < $this->getData(['config', 'connect', 'attempt'])) {
$this->setData(['user',$userId,'connectFail',$this->getdata(['user',$userId,'connectFail']) + 1 ]);
}
// Cas 2 la limite du nombre de connexion est atteinte : placer le timer
if ( $this->getdata(['user',$userId,'connectFail']) == $this->getData(['config', 'connect', 'attempt']) ) {
$this->setData(['user',$userId,'connectTimeout', time()]);
}
// Cas 3 le délai de bloquage court
if ($this->getData(['user',$userId,'connectTimeout']) + $this->getData(['config', 'connect', 'timeout']) > time() ) {
$notification = 'Trop de tentatives, accès bloqué durant ' . ($this->getData(['config', 'connect', 'timeout']) / 60) . ' minutes.';
}
// Journalisation
$dataLog = mb_detect_encoding(strftime('%d/%m/%y',time()), 'UTF-8', true)
? strftime('%d/%m/%y',time()) . ';' . strftime('%R',time()) . ';'
: utf8_encode(strftime('%d/%m/%y',time())) . ';' . utf8_encode(strftime('%R',time())) . ';' ;
$dataLog .= helper::getIp() . ';';
$dataLog .= $userId . ';' ;
$dataLog .= $this->getUrl() .';' ;
$dataLog .= 'échec de connexion' ;
$dataLog .= PHP_EOL;
if ($this->getData(['config','connect','log'])) {
file_put_contents(self::DATA_DIR . 'journal.log', $dataLog, FILE_APPEND);
}
// Valeurs en sortie
$this->addOutput([
'notification' => $notification
]);
// Cas 2 la limite du nombre de connexion est atteinte : placer le timer
if ( $this->getdata(['user',$userId,'connectFail']) == $this->getData(['config', 'connect', 'attempt']) ) {
$this->setData(['user',$userId,'connectTimeout', time()]);
}
// Cas 3 le délai de bloquage court
if ($this->getData(['user',$userId,'connectTimeout']) + $this->getData(['config', 'connect', 'timeout']) > time() ) {
$notification = 'Accès bloqué ' . ($this->getData(['config', 'connect', 'timeout']) / 60) . ' minutes.';
}
// Valeurs en sortie
$this->addOutput([
'notification' => $notification
]);
}
}
}
// Journalisation
$dataLog = mb_detect_encoding(strftime('%d/%m/%y',time()), 'UTF-8', true)
? strftime('%d/%m/%y',time()) . ';' . strftime('%R',time()) . ';'
: utf8_encode(strftime('%d/%m/%y',time())) . ';' . utf8_encode(strftime('%R',time())) . ';' ;
$dataLog .= helper::getIp() . ';';
$dataLog .= $this->getInput('userLoginId', helper::FILTER_ID) . ';' ;
$dataLog .= $this->getUrl() .';' ;
$dataLog .= $logStatus ;
$dataLog .= PHP_EOL;
if ($this->getData(['config','connect','log'])) {
file_put_contents(self::DATA_DIR . 'journal.log', $dataLog, FILE_APPEND);
}
// Stockage des cookies
if (!empty($_COOKIE['ZWII_USER_ID'])) {
self::$userId = $_COOKIE['ZWII_USER_ID'];
}
@ -542,4 +586,131 @@ class user extends common {
]);
}
}
/**
* Importation CSV d'utilisateurs
*/
public function import() {
// Soumission du formulaire
$notification = '';
$success = true;
if($this->isPost()) {
// Lecture du CSV et construction du tableau
$file = $this->getInput('userImportCSVFile',helper::FILTER_STRING_SHORT, true);
$filePath = self::FILE_DIR . 'source/' . $file;
if ($file AND file_exists($filePath)) {
// Analyse et extraction du CSV
$rows = array_map(function($row) { return str_getcsv($row, $this->getInput('userImportSeparator') ); }, file($filePath));
$header = array_shift($rows);
$csv = array();
foreach($rows as $row) {
$csv[] = array_combine($header, $row);
}
// Traitement des données
foreach($csv as $item ) {
// Données valides
if( array_key_exists('id', $item)
AND array_key_exists('prenom',$item)
AND array_key_exists('nom',$item)
AND array_key_exists('groupe',$item)
AND array_key_exists('email',$item)
AND $item['nom']
AND $item['prenom']
AND $item['id']
AND $item['email']
AND $item['groupe']
) {
// Validation du groupe
$item['groupe'] = (int) $item['groupe'];
$item['groupe'] = ( $item['groupe'] >= self::GROUP_BANNED AND $item['groupe'] <= self::GROUP_ADMIN )
? $item['groupe'] : 1;
// L'utilisateur existe
if ( $this->getData(['user',helper::filter($item['id'] , helper::FILTER_ID)]))
{
// Notification du doublon
$item['notification'] = template::ico('cancel');
// Création du tableau de confirmation
self::$users[] = [
helper::filter($item['id'] , helper::FILTER_ID),
$item['nom'],
$item['prenom'],
self::$groups[$item['groupe']],
$item['prenom'],
helper::filter($item['email'] , helper::FILTER_MAIL),
$item['notification']
];
// L'utilisateur n'existe pas
} else {
// Nettoyage de l'identifiant
$userId = helper::filter($item['id'] , helper::FILTER_ID);
// Enregistre le user
$create = $this->setData([
'user',
$userId, [
'firstname' => $item['prenom'],
'forgot' => 0,
'group' => $item['groupe'] ,
'lastname' => $item['nom'],
'mail' => $item['email'],
'pseudo' => $item['prenom'],
'signature' => 1, // Pseudo
'password' => uniqid(), // A modifier à la première connexion
"connectFail" => null,
"connectTimeout" => null,
"accessUrl" => null,
"accessTimer" => null,
"accessCsrf" => null
]]);
// Icône de notification
$item['notification'] = $create ? template::ico('check') : template::ico('cancel');
// Envoi du mail
if ($create
AND $this->getInput('userImportNotification',helper::FILTER_BOOLEAN) === true) {
$sent = $this->sendMail(
$item['email'],
'Compte créé sur ' . $this->getData(['locale', 'title']),
'Bonjour <strong>' . $item['prenom'] . ' ' . $item['nom'] . '</strong>,<br><br>' .
'Un administrateur vous a créé un compte sur le site ' . $this->getData(['locale', 'title']) . '. Vous trouverez ci-dessous les détails de votre compte.<br><br>' .
'<strong>Identifiant du compte :</strong> ' . $userId . '<br>' .
'<small>Un mot de passe provisoire vous été attribué, à la première connexion cliquez sur Mot de passe Oublié.</small>'
);
if ($sent === true) {
// Mail envoyé changement de l'icône
$item['notification'] = template::ico('mail') ;
}
}
// Création du tableau de confirmation
self::$users[] = [
$userId,
$item['nom'],
$item['prenom'],
self::$groups[$item['groupe']],
$item['prenom'],
$item['email'],
$item['notification']
];
}
}
}
if (empty(self::$users)) {
$notification = 'Rien à importer, erreur de format ou fichier incorrect' ;
$success = false;
} else {
$notification = 'Importation effectuée' ;
$success = true;
}
} else {
$notification = 'Erreur de lecture, vérifiez les permissions';
$success = false;
}
}
// Valeurs en sortie
$this->addOutput([
'title' => 'Importation',
'view' => 'import',
'notification' => $notification,
'state' => $success
]);
}
}

View File

@ -30,6 +30,14 @@
]); ?>
</div>
</div>
<?php echo template::text('userAddPseudo', [
'autocomplete' => 'off',
'label' => 'Pseudo'
]); ?>
<?php echo template::select('userAddSignature', $module::$signature, [
'label' => 'Signature',
'selected' => 1
]); ?>
<?php echo template::mail('userAddMail', [
'autocomplete' => 'off',
'label' => 'Adresse mail'
@ -73,9 +81,9 @@
'label' => 'Confirmation'
]); ?>
<?php echo template::checkbox('userAddSendMail', true,
'Prévenir l\'utilisateur par mail');
?>
'Prévenir l\'utilisateur par mail');
?>
</div>
</div>
</div>
<?php echo template::formClose(); ?>
<?php echo template::formClose(); ?>

View File

@ -1,7 +1,7 @@
<?php echo template::formOpen('userEditForm'); ?>
<div class="row">
<div class="col2">
<?php if($this->getUser('group') === self::GROUP_ADMIN): ?>
<?php if($this->getUser('group') === self::GROUP_ADMIN): ?>
<?php echo template::button('userEditBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'user',
@ -29,6 +29,7 @@
<div class="col6">
<?php echo template::text('userEditFirstname', [
'autocomplete' => 'off',
'disabled' => $this->getUser('group') > 2 ? false : true,
'label' => 'Prénom',
'value' => $this->getData(['user', $this->getUrl(2), 'firstname'])
]); ?>
@ -36,11 +37,21 @@
<div class="col6">
<?php echo template::text('userEditLastname', [
'autocomplete' => 'off',
'disabled' => $this->getUser('group') > 2 ? false : true,
'label' => 'Nom',
'value' => $this->getData(['user', $this->getUrl(2), 'lastname'])
]); ?>
</div>
</div>
<?php echo template::text('userEditPseudo', [
'autocomplete' => 'off',
'label' => 'Pseudo',
'value' => $this->getData(['user', $this->getUrl(2), 'pseudo'])
]); ?>
<?php echo template::select('userEditSignature', $module::$signature, [
'label' => 'Signature',
'selected' => $this->getData(['user', $this->getUrl(2), 'signature'])
]); ?>
<?php echo template::mail('userEditMail', [
'autocomplete' => 'off',
'label' => 'Adresse mail',
@ -98,4 +109,4 @@
</div>
</div>
</div>
<?php echo template::formClose(); ?>
<?php echo template::formClose(); ?>

View File

@ -5,7 +5,6 @@
<div class="row">
<div class="col3 offset6">
<?php echo template::button('userForgotBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'user/login/' . $this->getUrl(2),
'ico' => 'left',
'value' => 'Retour'

16
core/module/user/view/import/import.css vendored Executable file
View File

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

View File

@ -0,0 +1,62 @@
<?php echo template::formOpen('userImportForm'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('userImportBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'user',
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col2 offset8">
<?php echo template::submit('userImportSubmit', [
'value' => 'Importer'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Importation de fichier plat CSV</h4>
<div class="row">
<div class="col6">
<?php echo template::file('userImportCSVFile', [
'label' => 'Liste d\'utilisateurs :'
]); ?>
</div>
<div class="col2">
<?php echo template::select('userImportSeparator', $module::$separators, [
'label' => 'Séparateur'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php echo template::checkbox('userImportNotification', true, 'Envoyer un message de confirmation', [
'checked' => false
]); ?>
</div>
</div>
<div class="row">
<div class="col1">
<p>Aide :</p>
</div>
<div class="col11">
<p>Les en-têtes obligatoires sont : id, nom, prenom, email et groupe
( 1 : membre - 2 : éditeur - 3 : administrateur )
<p>Voir ce <a href="core/module/user/ressource/template.csv">modèle</a> à compléter avec un tableur.
Enregistrement au format CSV, séparateur ; ou , ou :</p>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>
<?php if ($module::$users): ?>
<div class="row">
<div class="col12 textAlignCenter">
<?php echo template::table([1, 3, 3, 1, 1, 2, 1], $module::$users, ['Id', 'Nom', 'Prénom','Groupe', 'Pseudo', 'eMail', '']); ?>
<?php echo template::ico('check');?> Compte créé | <?php echo template::ico('mail');?> Compte créé et notifié | <?php echo template::ico('cancel');?> Erreur dans le fichier, compte non créé.
</div>
</div>
<?php endif;?>

View File

@ -7,7 +7,14 @@
'value' => 'Accueil'
]); ?>
</div>
<div class="col2 offset8">
<div class="col2 offset6">
<?php echo template::button('userImport', [
'href' => helper::baseUrl() . 'user/import',
'ico' => 'plus',
'value' => 'Importation'
]); ?>
</div>
<div class="col2">
<?php echo template::button('userAdd', [
'href' => helper::baseUrl() . 'user/add',
'ico' => 'plus',

View File

@ -119,7 +119,7 @@ $config = array(
| If you want to be forced to assign the extension starting from the mime type
|
*/
'mime_extension_rename' => true,
'mime_extension_rename' => false,
/*

986
core/vendor/i18n/css/translateelement.css vendored Executable file
View 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/i18n/inc.json vendored Executable file
View File

@ -0,0 +1,5 @@
[
"translate.js",
"translation.js",
"css/translateelement.css"
]

BIN
core/vendor/i18n/png/de.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

BIN
core/vendor/i18n/png/en.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
core/vendor/i18n/png/es.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

BIN
core/vendor/i18n/png/fr.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

BIN
core/vendor/i18n/png/it.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

BIN
core/vendor/i18n/png/nl.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 B

BIN
core/vendor/i18n/png/pt.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

68
core/vendor/i18n/translate.js vendored Executable file
View 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 = 'scriptGoogleElementInit';
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/i18n/translation.js vendored Executable file
View File

@ -0,0 +1,5 @@
function scriptGoogleElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'fr'
}, 'google_translate_element');
}

View File

@ -2,7 +2,5 @@
"tinymce.min.js",
"jquery.tinymce.min.js",
"init.js",
"init.css",
"plugins/codesample/js/prism.fr",
"plugins/codesample/css/prism.css"
"init.css"
]

View File

@ -4,6 +4,13 @@
*/
/**
* Quand tinyMCE est invoqué hors connexion, initialiser privateKey
*/
if ( typeof(privateKey) == 'undefined') {
var privateKey = null;
};
tinymce.init({
// Classe où appliquer l'éditeur
selector: ".editorWysiwyg",
@ -97,8 +104,12 @@ tinymce.init({
images_dataimg_filter: function(img) {
return img.hasAttribute('internal-blob');
},*/
// Autoriser tous les éléments
valid_elements : '*[*]',
// Autorise l'ajout de script
// extended_valid_elements: "script[language|type|src]",
extended_valid_elements: "script[language|type|src]",
// Conserver les styles
keep_styles: false,
// Bloque le dimensionnement des médias (car automatiquement en fullsize avec fitvids pour le responsive)
media_dimensions: true,
// Désactiver la dimension des images
@ -115,12 +126,6 @@ tinymce.init({
external_plugins: {
"filemanager": baseUrl + "core/vendor/filemanager/plugin.min.js"
},
// Thème mobile
// mobile: {
// theme: "mobile",
// plugins: [ 'autosave', 'lists', 'autolink' ],
// toolbar: [ 'undo', 'bold', 'italic', 'styleselect' ]
//},
// Contenu du bouton insérer
insert_button_items: "anchor hr table",
// Contenu du bouton formats
@ -203,6 +208,139 @@ tinymce.init({
]
});
tinymce.init({
// Classe où appliquer l'éditeur
selector: ".editorWysiwygComment",
setup:function(ed) {
// Aperçu dans le pied de page
ed.on('change', function(e) {
if (ed.id === 'themeFooterText') {
$("#footerText").html(tinyMCE.get('themeFooterText').getContent());
}
});
// Limitation du nombre de caractères des commentaires à maxlength
var alarmCaraMin = 200; // alarme sur le nombre de caractères restants à partir de...
var maxlength = parseInt($("#" + (ed.id)).attr("maxlength"));
var id_alarm = "#blogArticleContentAlarm"
var contentLength = 0;
ed.on("keydown", function(e) {
contentLength = ed.getContent({format : 'text'}).length;
if (contentLength > maxlength) {
$(id_alarm).html("Vous avez atteint le maximum de " + maxlength + " caractères ! ");
if(e.keyCode != 8 && e.keyCode != 46){
e.preventDefault();
e.stopPropagation();
return false;
}
}
else{
if(maxlength - contentLength < alarmCaraMin){
$(id_alarm).html((maxlength - contentLength) + " caractères restants");
}
else{
$(id_alarm).html(" ");
}
}
});
// Limitation y compris lors d'un copier/coller
ed.on("paste", function(e){
contentLeng = ed.getContent({format : 'text'}).length - 16;
var data = e.clipboardData.getData('Text');
if (data.length > (maxlength - contentLeng)) {
$(id_alarm).html("Vous alliez dépasser le maximum de " + maxlength + " caractères ! ");
return false;
} else {
if(maxlength - contentLeng < alarmCaraMin){
$(id_alarm).html((maxlength - contentLeng - data.length) + " caractères restants");
}
else{
$(id_alarm).html(" ");
}
return true;
}
});
},
// Langue
language: "fr_FR",
// Plugins
plugins: "advlist anchor autolink autoresize autosave colorpicker contextmenu fullscreen hr lists paste searchreplace stickytoolbar tabfocus template textcolor visualblocks emoticons",
// Contenu de la barre d'outils
toolbar: "restoredraft | undo redo | formatselect bold italic forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist emoticons | visualblocks fullscreen",
// Emoticons
emoticons_append: {
custom_mind_explode: {
keywords: ["brain", "mind", "explode", "blown"],
char: "🤯"
}
},
// Titre des images
image_title: true,
// Pages internes
link_list: baseUrl + "core/vendor/tinymce/links.php",
// Contenu du menu contextuel
contextmenu: "cut copy paste pastetext | selectall searchreplace ",
// Fichiers CSS à intégrer à l'éditeur
content_css: [
baseUrl + "core/layout/common.css",
baseUrl + "core/vendor/tinymce/content.css",
baseUrl + "site/data/theme.css",
baseUrl + "site/data/custom.css"
],
// Classe à ajouter à la balise body dans l'iframe
body_class: "editorWysiwyg",
// Cache les menus
menubar: false,
// URL menu contextuel
link_context_toolbar: true,
// Cache la barre de statut
statusbar: false,
// Autorise le copié collé à partir du web
paste_data_images: true,
// Bloque le dimensionnement des médias (car automatiquement en fullsize avec fitvids pour le responsive)
media_dimensions: true,
// Désactiver la dimension des images
image_dimensions: true,
// Active l'onglet avancé lors de l'ajout d'une image
image_advtab: true,
// Urls absolues
relative_urls: false,
// Url de base
document_base_url: baseUrl,
// Contenu du bouton formats
style_formats: [
{title: "Headers", items: [
{title: "Header 1", format: "h1"},
{title: "Header 2", format: "h2"},
{title: "Header 3", format: "h3"},
{title: "Header 4", format: "h4"}
]},
{title: "Inline", items: [
{title: "Bold", icon: "bold", format: "bold"},
{title: "Italic", icon: "italic", format: "italic"},
{title: "Underline", icon: "underline", format: "underline"},
{title: "Strikethrough", icon: "strikethrough", format: "strikethrough"},
{title: "Superscript", icon: "superscript", format: "superscript"},
{title: "Subscript", icon: "subscript", format: "subscript"},
{title: "Code", icon: "code", format: "code"}
]},
{title: "Blocks", items: [
{title: "Paragraph", format: "p"},
{title: "Blockquote", format: "blockquote"},
{title: "Div", format: "div"},
{title: "Pre", format: "pre"}
]},
{title: "Alignment", items: [
{title: "Left", icon: "alignleft", format: "alignleft"},
{title: "Center", icon: "aligncenter", format: "aligncenter"},
{title: "Right", icon: "alignright", format: "alignright"},
{title: "Justify", icon: "alignjustify", format: "alignjustify"}
]}
]
});
tinymce.PluginManager.add('stickytoolbar', function(editor, url) {
editor.on('init', function() {
setSticky();

View File

@ -1,138 +0,0 @@
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
direction: ltr;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
code[class*="language-"]::selection, code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #a67f59;
background: hsla(0, 0%, 100%, .5);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function {
color: #DD4A68;
}
.token.regex,
.token.important,
.token.variable {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}

View File

@ -1,50 +1,54 @@
.zwiico-plus-circled:before { content: '\2191'; } /* '↑' */
.zwiico-flag:before { content: '\2691'; } /* '⚑' */
.zwiico-mail:before { content: '\2709'; } /* '✉' */
.zwiico-divide:before { content: '\e05b'; } /* '' */
.zwiico-logout:before { content: '\e800'; } /* '' */
.zwiico-check:before { content: '\e801'; } /* '' */
.zwiico-plus:before { content: '\e801'; } /* '' */
.zwiico-cancel:before { content: '\e802'; } /* '' */
.zwiico-plus:before { content: '\e803'; } /* '' */
.zwiico-help:before { content: '\e803'; } /* '' */
.zwiico-minus:before { content: '\e804'; } /* '' */
.zwiico-help:before { content: '\e805'; } /* '' */
.zwiico-gear:before { content: '\e805'; } /* '' */
.zwiico-pencil:before { content: '\e806'; } /* '' */
.zwiico-gear:before { content: '\e807'; } /* '' */
.zwiico-up:before { content: '\e807'; } /* '' */
.zwiico-eye:before { content: '\e808'; } /* '' */
.zwiico-up:before { content: '\e809'; } /* '' */
.zwiico-download:before { content: '\e809'; } /* '' */
.zwiico-folder:before { content: '\e80a'; } /* '' */
.zwiico-download:before { content: '\e80b'; } /* '' */
.zwiico-users:before { content: '\e80b'; } /* '' */
.zwiico-left:before { content: '\e80c'; } /* '' */
.zwiico-users:before { content: '\e80d'; } /* '' */
.zwiico-user:before { content: '\e80e'; } /* '' */
.zwiico-comment:before { content: '\e80f'; } /* '' */
.zwiico-update:before { content: '\e80f'; } /* '' */
.zwiico-home:before { content: '\e810'; } /* '' */
.zwiico-mimi:before { content: '\e811'; } /* '' */
.zwiico-trash:before { content: '\e811'; } /* '' */
.zwiico-down:before { content: '\e812'; } /* '' */
.zwiico-lock:before { content: '\e813'; } /* '' */
.zwiico-comment:before { content: '\e813'; } /* '' */
.zwiico-chat:before { content: '\e814'; } /* '' */
.zwiico-eye-off:before { content: '\e815'; } /* '' */
.zwiico-update:before { content: '\e816'; } /* '' */
.zwiico-down-open:before { content: '\e816'; } /* '' */
.zwiico-upload:before { content: '\e817'; } /* '' */
.zwiico-down-open:before { content: '\e818'; } /* '' */
.zwiico-cogs:before { content: '\e818'; } /* '' */
.zwiico-left-open:before { content: '\e819'; } /* '' */
.zwiico-cogs:before { content: '\e81a'; } /* '' */
.zwiico-down-big:before { content: '\e81a'; } /* '' */
.zwiico-cog-alt:before { content: '\e81b'; } /* '' */
.zwiico-trash:before { content: '\e81c'; } /* '' */
.zwiico-plus-circled:before { content: '\e81d'; } /* '' */
.zwiico-up-big:before { content: '\e81c'; } /* '' */
.zwiico-clone:before { content: '\e81d'; } /* '' */
.zwiico-minus-circled:before { content: '\e81e'; } /* '' */
.zwiico-login:before { content: '\e81f'; } /* '' */
.zwiico-down-big:before { content: '\e820'; } /* '' */
.zwiico-up-big:before { content: '\e821'; } /* '' */
.zwiico-check:before { content: '\e81f'; } /* '' */
.zwiico-github:before { content: '\e820'; } /* '' */
.zwiico-login:before { content: '\e821'; } /* '' */
.zwiico-lock:before { content: '\e822'; } /* '' */
.zwiico-mimi:before { content: '\e823'; } /* '' */
.zwiico-spin:before { content: '\e831'; } /* '' */
.zwiico-twitter:before { content: '\f099'; } /* '' */
.zwiico-facebook:before { content: '\f09a'; } /* '' */
.zwiico-menu:before { content: '\f0c9'; } /* '' */
.zwiico-sort:before { content: '\f0dc'; } /* '' */
.zwiico-mail-alt:before { content: '\f0e0'; } /* '' */
.zwiico-linkedin:before { content: '\f0e1'; } /* '' */
.zwiico-download-cloud:before { content: '\f0ed'; } /* '' */
.zwiico-upload-cloud:before { content: '\f0ee'; } /* '' */
.zwiico-github:before { content: '\f113'; } /* '' */
.zwiico-code:before { content: '\f121'; } /* '' */
.zwiico-youtube:before { content: '\f167'; } /* '' */
.zwiico-instagram:before { content: '\f16d'; } /* '' */
.zwiico-brush:before { content: '\f1fc'; } /* '' */
.zwiico-pinterest:before { content: '\f231'; } /* '' */
.zwiico-clone:before { content: '\f24d'; } /* '' */
.zwiico-pinterest:before { content: '\f231'; } /* '' */

File diff suppressed because one or more lines are too long

View File

@ -1,50 +1,54 @@
.zwiico-plus-circled { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#x2191;&nbsp;'); }
.zwiico-flag { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#x2691;&nbsp;'); }
.zwiico-mail { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#x2709;&nbsp;'); }
.zwiico-divide { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe05b;&nbsp;'); }
.zwiico-logout { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe800;&nbsp;'); }
.zwiico-check { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe801;&nbsp;'); }
.zwiico-plus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe801;&nbsp;'); }
.zwiico-cancel { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe802;&nbsp;'); }
.zwiico-plus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe803;&nbsp;'); }
.zwiico-help { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe803;&nbsp;'); }
.zwiico-minus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe804;&nbsp;'); }
.zwiico-help { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe805;&nbsp;'); }
.zwiico-gear { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe805;&nbsp;'); }
.zwiico-pencil { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe806;&nbsp;'); }
.zwiico-gear { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe807;&nbsp;'); }
.zwiico-up { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe807;&nbsp;'); }
.zwiico-eye { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe808;&nbsp;'); }
.zwiico-up { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe809;&nbsp;'); }
.zwiico-download { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe809;&nbsp;'); }
.zwiico-folder { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80a;&nbsp;'); }
.zwiico-download { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80b;&nbsp;'); }
.zwiico-users { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80b;&nbsp;'); }
.zwiico-left { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80c;&nbsp;'); }
.zwiico-users { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80d;&nbsp;'); }
.zwiico-user { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80e;&nbsp;'); }
.zwiico-comment { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80f;&nbsp;'); }
.zwiico-update { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80f;&nbsp;'); }
.zwiico-home { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe810;&nbsp;'); }
.zwiico-mimi { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe811;&nbsp;'); }
.zwiico-trash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe811;&nbsp;'); }
.zwiico-down { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe812;&nbsp;'); }
.zwiico-lock { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe813;&nbsp;'); }
.zwiico-comment { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe813;&nbsp;'); }
.zwiico-chat { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe814;&nbsp;'); }
.zwiico-eye-off { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe815;&nbsp;'); }
.zwiico-update { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe816;&nbsp;'); }
.zwiico-down-open { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe816;&nbsp;'); }
.zwiico-upload { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe817;&nbsp;'); }
.zwiico-down-open { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe818;&nbsp;'); }
.zwiico-cogs { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe818;&nbsp;'); }
.zwiico-left-open { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe819;&nbsp;'); }
.zwiico-cogs { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81a;&nbsp;'); }
.zwiico-down-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81a;&nbsp;'); }
.zwiico-cog-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81b;&nbsp;'); }
.zwiico-trash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81c;&nbsp;'); }
.zwiico-plus-circled { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81d;&nbsp;'); }
.zwiico-up-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81c;&nbsp;'); }
.zwiico-clone { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81d;&nbsp;'); }
.zwiico-minus-circled { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81e;&nbsp;'); }
.zwiico-login { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81f;&nbsp;'); }
.zwiico-down-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe820;&nbsp;'); }
.zwiico-up-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe821;&nbsp;'); }
.zwiico-check { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81f;&nbsp;'); }
.zwiico-github { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe820;&nbsp;'); }
.zwiico-login { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe821;&nbsp;'); }
.zwiico-lock { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe822;&nbsp;'); }
.zwiico-mimi { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe823;&nbsp;'); }
.zwiico-spin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe831;&nbsp;'); }
.zwiico-twitter { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf099;&nbsp;'); }
.zwiico-facebook { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09a;&nbsp;'); }
.zwiico-menu { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c9;&nbsp;'); }
.zwiico-sort { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0dc;&nbsp;'); }
.zwiico-mail-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e0;&nbsp;'); }
.zwiico-linkedin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e1;&nbsp;'); }
.zwiico-download-cloud { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ed;&nbsp;'); }
.zwiico-upload-cloud { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ee;&nbsp;'); }
.zwiico-github { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf113;&nbsp;'); }
.zwiico-code { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf121;&nbsp;'); }
.zwiico-youtube { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf167;&nbsp;'); }
.zwiico-instagram { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16d;&nbsp;'); }
.zwiico-brush { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf1fc;&nbsp;'); }
.zwiico-pinterest { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf231;&nbsp;'); }
.zwiico-clone { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf24d;&nbsp;'); }
.zwiico-pinterest { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf231;&nbsp;'); }

View File

@ -10,52 +10,56 @@
/* font-size: 120%; */
}
.zwiico-plus-circled { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#x2191;&nbsp;'); }
.zwiico-flag { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#x2691;&nbsp;'); }
.zwiico-mail { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#x2709;&nbsp;'); }
.zwiico-divide { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe05b;&nbsp;'); }
.zwiico-logout { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe800;&nbsp;'); }
.zwiico-check { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe801;&nbsp;'); }
.zwiico-plus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe801;&nbsp;'); }
.zwiico-cancel { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe802;&nbsp;'); }
.zwiico-plus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe803;&nbsp;'); }
.zwiico-help { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe803;&nbsp;'); }
.zwiico-minus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe804;&nbsp;'); }
.zwiico-help { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe805;&nbsp;'); }
.zwiico-gear { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe805;&nbsp;'); }
.zwiico-pencil { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe806;&nbsp;'); }
.zwiico-gear { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe807;&nbsp;'); }
.zwiico-up { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe807;&nbsp;'); }
.zwiico-eye { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe808;&nbsp;'); }
.zwiico-up { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe809;&nbsp;'); }
.zwiico-download { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe809;&nbsp;'); }
.zwiico-folder { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80a;&nbsp;'); }
.zwiico-download { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80b;&nbsp;'); }
.zwiico-users { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80b;&nbsp;'); }
.zwiico-left { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80c;&nbsp;'); }
.zwiico-users { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80d;&nbsp;'); }
.zwiico-user { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80e;&nbsp;'); }
.zwiico-comment { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80f;&nbsp;'); }
.zwiico-update { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe80f;&nbsp;'); }
.zwiico-home { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe810;&nbsp;'); }
.zwiico-mimi { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe811;&nbsp;'); }
.zwiico-trash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe811;&nbsp;'); }
.zwiico-down { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe812;&nbsp;'); }
.zwiico-lock { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe813;&nbsp;'); }
.zwiico-comment { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe813;&nbsp;'); }
.zwiico-chat { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe814;&nbsp;'); }
.zwiico-eye-off { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe815;&nbsp;'); }
.zwiico-update { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe816;&nbsp;'); }
.zwiico-down-open { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe816;&nbsp;'); }
.zwiico-upload { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe817;&nbsp;'); }
.zwiico-down-open { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe818;&nbsp;'); }
.zwiico-cogs { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe818;&nbsp;'); }
.zwiico-left-open { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe819;&nbsp;'); }
.zwiico-cogs { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81a;&nbsp;'); }
.zwiico-down-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81a;&nbsp;'); }
.zwiico-cog-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81b;&nbsp;'); }
.zwiico-trash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81c;&nbsp;'); }
.zwiico-plus-circled { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81d;&nbsp;'); }
.zwiico-up-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81c;&nbsp;'); }
.zwiico-clone { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81d;&nbsp;'); }
.zwiico-minus-circled { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81e;&nbsp;'); }
.zwiico-login { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81f;&nbsp;'); }
.zwiico-down-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe820;&nbsp;'); }
.zwiico-up-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe821;&nbsp;'); }
.zwiico-check { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81f;&nbsp;'); }
.zwiico-github { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe820;&nbsp;'); }
.zwiico-login { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe821;&nbsp;'); }
.zwiico-lock { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe822;&nbsp;'); }
.zwiico-mimi { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe823;&nbsp;'); }
.zwiico-spin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe831;&nbsp;'); }
.zwiico-twitter { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf099;&nbsp;'); }
.zwiico-facebook { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf09a;&nbsp;'); }
.zwiico-menu { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0c9;&nbsp;'); }
.zwiico-sort { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0dc;&nbsp;'); }
.zwiico-mail-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e0;&nbsp;'); }
.zwiico-linkedin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0e1;&nbsp;'); }
.zwiico-download-cloud { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ed;&nbsp;'); }
.zwiico-upload-cloud { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf0ee;&nbsp;'); }
.zwiico-github { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf113;&nbsp;'); }
.zwiico-code { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf121;&nbsp;'); }
.zwiico-youtube { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf167;&nbsp;'); }
.zwiico-instagram { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf16d;&nbsp;'); }
.zwiico-brush { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf1fc;&nbsp;'); }
.zwiico-pinterest { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf231;&nbsp;'); }
.zwiico-clone { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf24d;&nbsp;'); }
.zwiico-pinterest { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xf231;&nbsp;'); }

View File

@ -1,11 +1,11 @@
@font-face {
font-family: 'zwiico';
src: url('../font/zwiico.eot?21777250');
src: url('../font/zwiico.eot?21777250#iefix') format('embedded-opentype'),
url('../font/zwiico.woff2?21777250') format('woff2'),
url('../font/zwiico.woff?21777250') format('woff'),
url('../font/zwiico.ttf?21777250') format('truetype'),
url('../font/zwiico.svg?21777250#zwiico') format('svg');
src: url('../font/zwiico.eot?96515118');
src: url('../font/zwiico.eot?96515118#iefix') format('embedded-opentype'),
url('../font/zwiico.woff2?96515118') format('woff2'),
url('../font/zwiico.woff?96515118') format('woff'),
url('../font/zwiico.ttf?96515118') format('truetype'),
url('../font/zwiico.svg?96515118#zwiico') format('svg');
font-weight: normal;
font-style: normal;
}
@ -15,7 +15,7 @@
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'zwiico';
src: url('../font/zwiico.svg?21777250#zwiico') format('svg');
src: url('../font/zwiico.svg?96515118#zwiico') format('svg');
}
}
*/
@ -55,52 +55,56 @@
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
}
.zwiico-plus-circled:before { content: '\2191'; } /* '↑' */
.zwiico-flag:before { content: '\2691'; } /* '⚑' */
.zwiico-mail:before { content: '\2709'; } /* '✉' */
.zwiico-divide:before { content: '\e05b'; } /* '' */
.zwiico-logout:before { content: '\e800'; } /* '' */
.zwiico-check:before { content: '\e801'; } /* '' */
.zwiico-plus:before { content: '\e801'; } /* '' */
.zwiico-cancel:before { content: '\e802'; } /* '' */
.zwiico-plus:before { content: '\e803'; } /* '' */
.zwiico-help:before { content: '\e803'; } /* '' */
.zwiico-minus:before { content: '\e804'; } /* '' */
.zwiico-help:before { content: '\e805'; } /* '' */
.zwiico-gear:before { content: '\e805'; } /* '' */
.zwiico-pencil:before { content: '\e806'; } /* '' */
.zwiico-gear:before { content: '\e807'; } /* '' */
.zwiico-up:before { content: '\e807'; } /* '' */
.zwiico-eye:before { content: '\e808'; } /* '' */
.zwiico-up:before { content: '\e809'; } /* '' */
.zwiico-download:before { content: '\e809'; } /* '' */
.zwiico-folder:before { content: '\e80a'; } /* '' */
.zwiico-download:before { content: '\e80b'; } /* '' */
.zwiico-users:before { content: '\e80b'; } /* '' */
.zwiico-left:before { content: '\e80c'; } /* '' */
.zwiico-users:before { content: '\e80d'; } /* '' */
.zwiico-user:before { content: '\e80e'; } /* '' */
.zwiico-comment:before { content: '\e80f'; } /* '' */
.zwiico-update:before { content: '\e80f'; } /* '' */
.zwiico-home:before { content: '\e810'; } /* '' */
.zwiico-mimi:before { content: '\e811'; } /* '' */
.zwiico-trash:before { content: '\e811'; } /* '' */
.zwiico-down:before { content: '\e812'; } /* '' */
.zwiico-lock:before { content: '\e813'; } /* '' */
.zwiico-comment:before { content: '\e813'; } /* '' */
.zwiico-chat:before { content: '\e814'; } /* '' */
.zwiico-eye-off:before { content: '\e815'; } /* '' */
.zwiico-update:before { content: '\e816'; } /* '' */
.zwiico-down-open:before { content: '\e816'; } /* '' */
.zwiico-upload:before { content: '\e817'; } /* '' */
.zwiico-down-open:before { content: '\e818'; } /* '' */
.zwiico-cogs:before { content: '\e818'; } /* '' */
.zwiico-left-open:before { content: '\e819'; } /* '' */
.zwiico-cogs:before { content: '\e81a'; } /* '' */
.zwiico-down-big:before { content: '\e81a'; } /* '' */
.zwiico-cog-alt:before { content: '\e81b'; } /* '' */
.zwiico-trash:before { content: '\e81c'; } /* '' */
.zwiico-plus-circled:before { content: '\e81d'; } /* '' */
.zwiico-up-big:before { content: '\e81c'; } /* '' */
.zwiico-clone:before { content: '\e81d'; } /* '' */
.zwiico-minus-circled:before { content: '\e81e'; } /* '' */
.zwiico-login:before { content: '\e81f'; } /* '' */
.zwiico-down-big:before { content: '\e820'; } /* '' */
.zwiico-up-big:before { content: '\e821'; } /* '' */
.zwiico-check:before { content: '\e81f'; } /* '' */
.zwiico-github:before { content: '\e820'; } /* '' */
.zwiico-login:before { content: '\e821'; } /* '' */
.zwiico-lock:before { content: '\e822'; } /* '' */
.zwiico-mimi:before { content: '\e823'; } /* '' */
.zwiico-spin:before { content: '\e831'; } /* '' */
.zwiico-twitter:before { content: '\f099'; } /* '' */
.zwiico-facebook:before { content: '\f09a'; } /* '' */
.zwiico-menu:before { content: '\f0c9'; } /* '' */
.zwiico-sort:before { content: '\f0dc'; } /* '' */
.zwiico-mail-alt:before { content: '\f0e0'; } /* '' */
.zwiico-linkedin:before { content: '\f0e1'; } /* '' */
.zwiico-download-cloud:before { content: '\f0ed'; } /* '' */
.zwiico-upload-cloud:before { content: '\f0ee'; } /* '' */
.zwiico-github:before { content: '\f113'; } /* '' */
.zwiico-code:before { content: '\f121'; } /* '' */
.zwiico-youtube:before { content: '\f167'; } /* '' */
.zwiico-instagram:before { content: '\f16d'; } /* '' */
.zwiico-brush:before { content: '\f1fc'; } /* '' */
.zwiico-pinterest:before { content: '\f231'; } /* '' */
.zwiico-clone:before { content: '\f24d'; } /* '' */
.zwiico-pinterest:before { content: '\f231'; } /* '' */

Binary file not shown.

View File

@ -6,73 +6,83 @@
<font id="zwiico" horiz-adv-x="1000" >
<font-face font-family="zwiico" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
<missing-glyph horiz-adv-x="1000" />
<glyph glyph-name="plus-circled" unicode="&#x2191;" d="M420 770q174 0 297-123t123-297-123-297-297-123-297 123-123 297 123 297 297 123z m52-470l200 0 0 102-200 0 0 202-102 0 0-202-202 0 0-102 202 0 0-202 102 0 0 202z" horiz-adv-x="840" />
<glyph glyph-name="flag" unicode="&#x2691;" d="M179 707q0-40-36-61v-707q0-7-5-12t-13-6h-36q-7 0-12 6t-6 12v707q-35 21-35 61 0 30 21 51t50 21 51-21 21-51z m821-36v-425q0-14-7-22t-22-15q-120-65-206-65-34 0-69 12t-60 27-65 27-79 12q-107 0-259-81-10-5-19-5-14 0-25 10t-10 25v415q0 17 17 30 12 8 44 24 132 67 235 67 60 0 112-16t122-49q21-11 49-11 30 0 65 12t62 26 49 26 30 12q15 0 25-10t11-26z" horiz-adv-x="1000" />
<glyph glyph-name="mail" unicode="&#x2709;" d="M929 11v428q-18-20-39-36-149-115-238-189-28-24-46-37t-48-28-57-13h-2q-26 0-57 13t-48 28-46 37q-88 74-238 189-21 16-39 36v-428q0-7 6-13t12-5h822q7 0 12 5t6 13z m0 586v14t-1 7-1 7-3 5-5 4-8 2h-822q-7 0-12-6t-6-12q0-94 83-159 107-84 223-176 4-3 20-17t25-21 25-17 28-16 24-5h2q11 0 24 5t28 16 25 17 25 21 20 17q116 92 224 176 30 24 56 65t26 73z m71 21v-607q0-37-26-63t-63-27h-822q-36 0-63 27t-26 63v607q0 37 26 63t63 26h822q37 0 63-26t26-63z" horiz-adv-x="1000" />
<glyph glyph-name="divide" unicode="&#xe05b;" d="M300 663q0 117 116 117 118 0 118-117t-118-118q-116 0-116 118z m0-625q0 117 116 117 118 0 118-117t-118-118q-116 0-116 118z m-300 312q0 43 30 73t74 31l625 0q44 0 74-31t31-73-31-73-74-31l-625 0q-44 0-74 31t-30 73z" horiz-adv-x="834" />
<glyph glyph-name="logout" unicode="&#xe800;" d="M357 46q0-2 1-11t0-14-2-14-5-11-12-3h-178q-67 0-114 47t-47 114v392q0 67 47 114t114 47h178q8 0 13-5t5-13q0-2 1-11t0-15-2-13-5-11-12-3h-178q-37 0-63-26t-27-64v-392q0-37 27-63t63-27h174t6 0 7-2 4-3 4-5 1-8z m518 304q0-14-11-25l-303-304q-11-10-25-10t-25 10-11 25v161h-250q-14 0-25 11t-11 25v214q0 15 11 25t25 11h250v161q0 14 11 25t25 10 25-10l303-304q11-10 11-25z" horiz-adv-x="928.6" />
<glyph glyph-name="check" unicode="&#xe801;" d="M933 534q0-22-16-38l-404-404-76-76q-16-15-38-15t-38 15l-76 76-202 202q-15 16-15 38t15 38l76 76q16 16 38 16t38-16l164-165 366 367q16 16 38 16t38-16l76-76q16-15 16-38z" horiz-adv-x="1000" />
<glyph glyph-name="plus" unicode="&#xe801;" d="M786 439v-107q0-22-16-38t-38-15h-232v-233q0-22-16-37t-38-16h-107q-22 0-38 16t-15 37v233h-232q-23 0-38 15t-16 38v107q0 23 16 38t38 16h232v232q0 22 15 38t38 16h107q23 0 38-16t16-38v-232h232q23 0 38-16t16-38z" horiz-adv-x="785.7" />
<glyph glyph-name="cancel" unicode="&#xe802;" d="M724 112q0-22-15-38l-76-76q-16-15-38-15t-38 15l-164 165-164-165q-16-15-38-15t-38 15l-76 76q-16 16-16 38t16 38l164 164-164 164q-16 16-16 38t16 38l76 76q16 16 38 16t38-16l164-164 164 164q16 16 38 16t38-16l76-76q15-15 15-38t-15-38l-164-164 164-164q15-15 15-38z" horiz-adv-x="785.7" />
<glyph glyph-name="plus" unicode="&#xe803;" d="M786 439v-107q0-22-16-38t-38-15h-232v-233q0-22-16-37t-38-16h-107q-22 0-38 16t-15 37v233h-232q-23 0-38 15t-16 38v107q0 23 16 38t38 16h232v232q0 22 15 38t38 16h107q23 0 38-16t16-38v-232h232q23 0 38-16t16-38z" horiz-adv-x="785.7" />
<glyph glyph-name="help" unicode="&#xe803;" d="M500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-13 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-15-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
<glyph glyph-name="minus" unicode="&#xe804;" d="M786 439v-107q0-22-16-38t-38-15h-678q-23 0-38 15t-16 38v107q0 23 16 38t38 16h678q23 0 38-16t16-38z" horiz-adv-x="785.7" />
<glyph glyph-name="help" unicode="&#xe805;" d="M500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-13 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-15-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
<glyph glyph-name="gear" unicode="&#xe805;" d="M571 350q0 59-41 101t-101 42-101-42-42-101 42-101 101-42 101 42 41 101z m286 61v-124q0-7-4-13t-11-7l-104-16q-10-30-21-51 19-27 59-77 6-6 6-13t-5-13q-15-21-55-61t-53-39q-7 0-14 5l-77 60q-25-13-51-21-9-76-16-104-4-16-20-16h-124q-8 0-14 5t-6 12l-16 103q-27 9-50 21l-79-60q-6-5-14-5-8 0-14 6-70 64-92 94-4 5-4 13 0 6 5 12 8 12 28 37t30 40q-15 28-23 55l-102 15q-7 1-11 7t-5 13v124q0 7 5 13t10 7l104 16q8 25 22 51-23 32-60 77-6 7-6 14 0 5 5 12 15 20 55 60t53 40q7 0 15-5l77-60q24 13 50 21 9 76 17 104 3 16 20 16h124q7 0 13-5t7-12l15-103q28-9 51-20l79 59q5 5 13 5 7 0 14-5 72-67 92-95 4-5 4-12 0-7-4-13-9-12-29-37t-30-40q15-28 23-54l102-16q7-1 12-7t4-13z" horiz-adv-x="857.1" />
<glyph glyph-name="pencil" unicode="&#xe806;" d="M203-7l50 51-131 131-51-51v-60h72v-71h60z m291 518q0 12-12 12-5 0-9-4l-303-302q-4-4-4-10 0-12 13-12 5 0 9 4l303 302q3 4 3 10z m-30 107l232-232-464-465h-232v233z m381-54q0-29-20-50l-93-93-232 233 93 92q20 21 50 21 29 0 51-21l131-131q20-22 20-51z" horiz-adv-x="857.1" />
<glyph glyph-name="gear" unicode="&#xe807;" d="M571 350q0 59-41 101t-101 42-101-42-42-101 42-101 101-42 101 42 41 101z m286 61v-124q0-7-4-13t-11-7l-104-16q-10-30-21-51 19-27 59-77 6-6 6-13t-5-13q-15-21-55-61t-53-39q-7 0-14 5l-77 60q-25-13-51-21-9-76-16-104-4-16-20-16h-124q-8 0-14 5t-6 12l-16 103q-27 9-50 21l-79-60q-6-5-14-5-8 0-14 6-70 64-92 94-4 5-4 13 0 6 5 12 8 12 28 37t30 40q-15 28-23 55l-102 15q-7 1-11 7t-5 13v124q0 7 5 13t10 7l104 16q8 25 22 51-23 32-60 77-6 7-6 14 0 5 5 12 15 20 55 60t53 40q7 0 15-5l77-60q24 13 50 21 9 76 17 104 3 16 20 16h124q7 0 13-5t7-12l15-103q28-9 51-20l79 59q5 5 13 5 7 0 14-5 72-67 92-95 4-5 4-12 0-7-4-13-9-12-29-37t-30-40q15-28 23-54l102-16q7-1 12-7t4-13z" horiz-adv-x="857.1" />
<glyph glyph-name="up" unicode="&#xe807;" d="M939 107l-92-92q-11-10-26-10t-25 10l-296 297-296-297q-11-10-25-10t-25 10l-93 92q-11 11-11 26t11 25l414 414q11 10 25 10t25-10l414-414q11-11 11-25t-11-26z" horiz-adv-x="1000" />
<glyph glyph-name="eye" unicode="&#xe808;" d="M929 314q-85 132-213 197 34-58 34-125 0-103-73-177t-177-73-177 73-73 177q0 67 34 125-128-65-213-197 75-114 187-182t242-68 243 68 186 182z m-402 215q0 11-8 19t-19 7q-70 0-120-50t-50-119q0-11 8-19t19-8 19 8 8 19q0 48 34 82t82 34q11 0 19 8t8 19z m473-215q0-19-11-38-78-129-210-206t-279-77-279 77-210 206q-11 19-11 38t11 39q78 128 210 205t279 78 279-78 210-205q11-20 11-39z" horiz-adv-x="1000" />
<glyph glyph-name="up" unicode="&#xe809;" d="M939 107l-92-92q-11-10-26-10t-25 10l-296 297-296-297q-11-10-25-10t-25 10l-93 92q-11 11-11 26t11 25l414 414q11 10 25 10t25-10l414-414q11-11 11-25t-11-26z" horiz-adv-x="1000" />
<glyph glyph-name="download" unicode="&#xe809;" d="M714 100q0 15-10 25t-25 11-25-11-11-25 11-25 25-11 25 11 10 25z m143 0q0 15-10 25t-26 11-25-11-10-25 10-25 25-11 26 11 10 25z m72 125v-179q0-22-16-37t-38-16h-821q-23 0-38 16t-16 37v179q0 22 16 38t38 16h259l75-76q33-32 76-32t76 32l76 76h259q22 0 38-16t16-38z m-182 318q10-23-8-39l-250-250q-10-11-25-11t-25 11l-250 250q-17 16-8 39 10 21 33 21h143v250q0 15 11 25t25 11h143q14 0 25-11t10-25v-250h143q24 0 33-21z" horiz-adv-x="928.6" />
<glyph glyph-name="folder" unicode="&#xe80a;" d="M1049 319q0-17-18-37l-187-221q-24-28-67-48t-81-20h-607q-19 0-33 7t-15 24q0 17 17 37l188 221q24 28 67 48t80 20h607q19 0 34-7t15-24z m-192 192v-90h-464q-53 0-110-26t-92-67l-188-221-2-3q0 2-1 7t0 7v536q0 51 37 88t88 37h179q51 0 88-37t37-88v-18h303q52 0 88-37t37-88z" horiz-adv-x="1071.4" />
<glyph glyph-name="download" unicode="&#xe80b;" d="M714 100q0 15-10 25t-25 11-25-11-11-25 11-25 25-11 25 11 10 25z m143 0q0 15-10 25t-26 11-25-11-10-25 10-25 25-11 26 11 10 25z m72 125v-179q0-22-16-37t-38-16h-821q-23 0-38 16t-16 37v179q0 22 16 38t38 16h259l75-76q33-32 76-32t76 32l76 76h259q22 0 38-16t16-38z m-182 318q10-23-8-39l-250-250q-10-11-25-11t-25 11l-250 250q-17 16-8 39 10 21 33 21h143v250q0 15 11 25t25 11h143q14 0 25-11t10-25v-250h143q24 0 33-21z" horiz-adv-x="928.6" />
<glyph glyph-name="users" unicode="&#xe80b;" d="M331 350q-90-3-148-71h-75q-45 0-77 22t-31 66q0 197 69 197 4 0 25-11t54-24 66-12q38 0 75 13-3-21-3-37 0-78 45-143z m598-356q0-66-41-105t-108-39h-488q-68 0-108 39t-41 105q0 30 2 58t8 61 14 61 24 54 35 45 48 30 62 11q6 0 24-12t41-26 59-27 76-12 75 12 60 27 41 26 24 12q34 0 62-11t47-30 35-45 24-54 15-61 8-61 2-58z m-572 713q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m393-214q0-89-63-152t-151-62-152 62-63 152 63 151 152 63 151-63 63-151z m321-126q0-43-31-66t-77-22h-75q-57 68-147 71 45 65 45 143 0 16-3 37 37-13 74-13 33 0 67 12t54 24 24 11q69 0 69-197z m-71 340q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z" horiz-adv-x="1071.4" />
<glyph glyph-name="left" unicode="&#xe80c;" d="M357 600v-500q0-14-10-25t-26-11-25 11l-250 250q-10 11-10 25t10 25l250 250q11 11 25 11t26-11 10-25z" horiz-adv-x="357.1" />
<glyph glyph-name="users" unicode="&#xe80d;" d="M331 350q-90-3-148-71h-75q-45 0-77 22t-31 66q0 197 69 197 4 0 25-11t54-24 66-12q38 0 75 13-3-21-3-37 0-78 45-143z m598-356q0-66-41-105t-108-39h-488q-68 0-108 39t-41 105q0 30 2 58t8 61 14 61 24 54 35 45 48 30 62 11q6 0 24-12t41-26 59-27 76-12 75 12 60 27 41 26 24 12q34 0 62-11t47-30 35-45 24-54 15-61 8-61 2-58z m-572 713q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m393-214q0-89-63-152t-151-62-152 62-63 152 63 151 152 63 151-63 63-151z m321-126q0-43-31-66t-77-22h-75q-57 68-147 71 45 65 45 143 0 16-3 37 37-13 74-13 33 0 67 12t54 24 24 11q69 0 69-197z m-71 340q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z" horiz-adv-x="1071.4" />
<glyph glyph-name="user" unicode="&#xe80e;" d="M714 69q0-60-35-104t-84-44h-476q-49 0-84 44t-35 104q0 48 5 90t17 85 33 73 52 50 76 19q73-72 174-72t175 72q42 0 75-19t52-50 33-73 18-85 4-90z m-143 495q0-88-62-151t-152-63-151 63-63 151 63 152 151 63 152-63 62-152z" horiz-adv-x="714.3" />
<glyph glyph-name="comment" unicode="&#xe80f;" d="M0 96l0 713 1000 0 0-713-473 0-320-205 0 205-207 0z" horiz-adv-x="1000" />
<glyph glyph-name="update" unicode="&#xe80f;" d="M843 261q0-3 0-4-36-150-150-243t-267-93q-81 0-157 31t-136 88l-72-72q-11-11-25-11t-25 11-11 25v250q0 14 11 25t25 11h250q14 0 25-11t10-25-10-25l-77-77q40-36 90-57t105-20q74 0 139 37t104 99q6 10 30 66 4 13 16 13h107q8 0 13-6t5-12z m14 446v-250q0-14-10-25t-26-11h-250q-14 0-25 11t-10 25 10 25l77 77q-82 77-194 77-75 0-140-37t-104-99q-6-10-29-66-5-13-17-13h-111q-7 0-13 6t-5 12v4q36 150 151 243t268 93q81 0 158-31t137-88l72 72q11 11 25 11t26-11 10-25z" horiz-adv-x="857.1" />
<glyph glyph-name="home" unicode="&#xe810;" d="M786 296v-267q0-15-11-25t-25-11h-214v214h-143v-214h-214q-15 0-25 11t-11 25v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-3-7 1-12 6l-35 41q-4 6-3 13t6 12l401 334q18 15 42 15t43-15l136-113v108q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q6-4 6-12t-4-13z" horiz-adv-x="928.6" />
<glyph glyph-name="mimi" unicode="&#xe811;" d="M909 286c0-241-203-436-454-436s-455 195-455 436 204 564 455 564 454-324 454-564z m-454 396c-141 0-255-114-255-254s114-255 255-255 254 114 254 255-114 254-254 254z m91-254c0-51-41-91-91-91s-91 40-91 91 40 90 91 90 91-40 91-90z" horiz-adv-x="909" />
<glyph glyph-name="trash" unicode="&#xe811;" d="M50 458q122-70 330-70t330 70l-54-486q-2-14-35-36t-100-43-141-21-140 21-100 43-36 36z m488 300q94-18 158-55t64-71l0-10q0-58-112-99t-268-41-268 41-112 99l0 10q0 34 64 71t158 55l42 48q22 26 70 26l92 0q52 0 70-26z m-54-112l84 0q-92 110-104 126-14 16-32 16l-102 0q-22 0-32-16l-106-126 84 0 64 66 82 0z" horiz-adv-x="760" />
<glyph glyph-name="down" unicode="&#xe812;" d="M571 457q0-14-10-25l-250-250q-11-11-25-11t-25 11l-250 250q-11 11-11 25t11 25 25 11h500q14 0 25-11t10-25z" horiz-adv-x="571.4" />
<glyph glyph-name="lock" unicode="&#xe813;" d="M179 421h285v108q0 59-42 101t-101 41-101-41-41-101v-108z m464-53v-322q0-22-16-37t-38-16h-535q-23 0-38 16t-16 37v322q0 22 16 38t38 15h17v108q0 102 74 176t176 74 177-74 73-176v-108h18q23 0 38-15t16-38z" horiz-adv-x="642.9" />
<glyph glyph-name="comment" unicode="&#xe813;" d="M0 96l0 713 1000 0 0-713-473 0-320-205 0 205-207 0z" horiz-adv-x="1000" />
<glyph glyph-name="chat" unicode="&#xe814;" d="M786 421q0-77-53-143t-143-104-197-38q-48 0-98 9-70-49-155-72-21-5-48-9h-2q-6 0-12 5t-6 12q-1 1-1 3t1 4 1 3l1 3t2 3 2 3 3 3 2 2q3 3 13 14t15 16 12 17 14 21 11 25q-69 40-108 98t-40 125q0 78 53 144t143 104 197 38 197-38 143-104 53-144z m214-142q0-67-40-126t-108-98q5-14 11-25t14-21 13-16 14-17 13-14q0 0 2-2t3-3 2-3 2-3l1-3t1-3 1-4-1-3q-2-8-7-13t-12-4q-28 4-48 9-86 23-156 72-50-9-98-9-151 0-263 74 32-3 49-3 90 0 172 25t148 72q69 52 107 119t37 141q0 43-13 85 72-39 114-99t42-128z" horiz-adv-x="1000" />
<glyph glyph-name="eye-off" unicode="&#xe815;" d="M310 105l43 79q-48 35-76 88t-27 114q0 67 34 125-128-65-213-197 94-144 239-209z m217 424q0 11-8 19t-19 7q-70 0-120-50t-50-119q0-11 8-19t19-8 19 8 8 19q0 48 34 82t82 34q11 0 19 8t8 19z m202 106q0-4 0-5-59-105-176-316t-176-316l-28-50q-5-9-15-9-7 0-75 39-9 6-9 16 0 7 25 49-80 36-147 96t-117 137q-11 17-11 38t11 39q86 131 212 207t277 76q50 0 100-10l31 54q5 9 15 9 3 0 10-3t18-9 18-10 18-10 10-7q9-5 9-15z m21-249q0-78-44-142t-117-91l157 280q4-25 4-47z m250-72q0-19-11-38-22-36-61-81-84-96-194-149t-234-53l41 74q119 10 219 76t169 171q-65 100-158 164l35 63q53-36 102-85t81-103q11-19 11-39z" horiz-adv-x="1000" />
<glyph glyph-name="update" unicode="&#xe816;" d="M843 261q0-3 0-4-36-150-150-243t-267-93q-81 0-157 31t-136 88l-72-72q-11-11-25-11t-25 11-11 25v250q0 14 11 25t25 11h250q14 0 25-11t10-25-10-25l-77-77q40-36 90-57t105-20q74 0 139 37t104 99q6 10 30 66 4 13 16 13h107q8 0 13-6t5-12z m14 446v-250q0-14-10-25t-26-11h-250q-14 0-25 11t-10 25 10 25l77 77q-82 77-194 77-75 0-140-37t-104-99q-6-10-29-66-5-13-17-13h-111q-7 0-13 6t-5 12v4q36 150 151 243t268 93q81 0 158-31t137-88l72 72q11 11 25 11t26-11 10-25z" horiz-adv-x="857.1" />
<glyph glyph-name="down-open" unicode="&#xe816;" d="M939 399l-414-413q-10-11-25-11t-25 11l-414 413q-11 11-11 26t11 25l93 92q10 11 25 11t25-11l296-296 296 296q11 11 25 11t26-11l92-92q11-11 11-25t-11-26z" horiz-adv-x="1000" />
<glyph glyph-name="upload" unicode="&#xe817;" d="M714 29q0 14-10 25t-25 10-25-10-11-25 11-25 25-11 25 11 10 25z m143 0q0 14-10 25t-26 10-25-10-10-25 10-25 25-11 26 11 10 25z m72 125v-179q0-22-16-38t-38-16h-821q-23 0-38 16t-16 38v179q0 22 16 38t38 15h238q12-31 39-51t62-20h143q34 0 61 20t40 51h238q22 0 38-15t16-38z m-182 361q-9-22-33-22h-143v-250q0-15-10-25t-25-11h-143q-15 0-25 11t-11 25v250h-143q-23 0-33 22-9 22 8 39l250 250q10 10 25 10t25-10l250-250q18-17 8-39z" horiz-adv-x="928.6" />
<glyph glyph-name="down-open" unicode="&#xe818;" d="M939 399l-414-413q-10-11-25-11t-25 11l-414 413q-11 11-11 26t11 25l93 92q10 11 25 11t25-11l296-296 296 296q11 11 25 11t26-11l92-92q11-11 11-25t-11-26z" horiz-adv-x="1000" />
<glyph glyph-name="cogs" unicode="&#xe818;" d="M0 245l0 97 94 8q8 30 23 55l-60 74 68 69 74-61q26 16 55 23l8 94 97 0 10-94q29-7 55-23l74 61 68-69-60-74q16-25 23-55l94-8 0-97-94-10q-7-29-23-55l60-72-68-70-74 60q-26-15-55-23l-10-94-97 0-8 94q-29 8-55 23l-74-60-68 70 60 72q-15 26-23 55z m221 49q0-37 26-64t64-26 63 26 26 64-26 63-63 26-64-26-26-63z m318 238l8 72 70-2q8 22 20 39l-37 57 54 45 49-49q20 10 41 14l14 66 72-8-2-68q22-8 39-22l57 39 45-54-49-49q10-20 12-43l68-14-8-70-68 0q-8-20-22-37l39-59-56-45-47 49q-22-8-43-12l-14-66-70 6 0 70q-20 8-37 20l-59-37-45 54 49 49q-8 20-12 41z m31-445l6 50 49 0q6 16 14 28l-26 43 37 33 36-37q13 8 29 10l10 48 48-5 0-49q16-6 28-16l41 27 31-41-35-35q6-13 10-29l47-12-6-51-49 0q-4-15-14-27l28-43-40-33-35 37q-13-8-29-10l-10-49-49 6 0 51q-13 4-27 14l-41-28-31 41 35 36q-6 13-8 29z m118 13q-4-21 8-36t32-17 34 9 17 34-10 35-31 18l-6 0q-17 0-31-12t-13-31z m17 451q-4-27 14-48t45-25 48 15 23 45-14 48-44 24l-7 0q-26 0-44-17t-21-42z" horiz-adv-x="1000" />
<glyph glyph-name="left-open" unicode="&#xe819;" d="M654 682l-297-296 297-297q10-10 10-25t-10-25l-93-93q-11-10-25-10t-25 10l-414 415q-11 10-11 25t11 25l414 414q10 11 25 11t25-11l93-93q10-10 10-25t-10-25z" horiz-adv-x="714.3" />
<glyph glyph-name="cogs" unicode="&#xe81a;" d="M0 245l0 97 94 8q8 30 23 55l-60 74 68 69 74-61q26 16 55 23l8 94 97 0 10-94q29-7 55-23l74 61 68-69-60-74q16-25 23-55l94-8 0-97-94-10q-7-29-23-55l60-72-68-70-74 60q-26-15-55-23l-10-94-97 0-8 94q-29 8-55 23l-74-60-68 70 60 72q-15 26-23 55z m221 49q0-37 26-64t64-26 63 26 26 64-26 63-63 26-64-26-26-63z m318 238l8 72 70-2q8 22 20 39l-37 57 54 45 49-49q20 10 41 14l14 66 72-8-2-68q22-8 39-22l57 39 45-54-49-49q10-20 12-43l68-14-8-70-68 0q-8-20-22-37l39-59-56-45-47 49q-22-8-43-12l-14-66-70 6 0 70q-20 8-37 20l-59-37-45 54 49 49q-8 20-12 41z m31-445l6 50 49 0q6 16 14 28l-26 43 37 33 36-37q13 8 29 10l10 48 48-5 0-49q16-6 28-16l41 27 31-41-35-35q6-13 10-29l47-12-6-51-49 0q-4-15-14-27l28-43-40-33-35 37q-13-8-29-10l-10-49-49 6 0 51q-13 4-27 14l-41-28-31 41 35 36q-6 13-8 29z m118 13q-4-21 8-36t32-17 34 9 17 34-10 35-31 18l-6 0q-17 0-31-12t-13-31z m17 451q-4-27 14-48t45-25 48 15 23 45-14 48-44 24l-7 0q-26 0-44-17t-21-42z" horiz-adv-x="1000" />
<glyph glyph-name="down-big" unicode="&#xe81a;" d="M899 386q0-30-21-50l-363-364q-22-21-51-21-29 0-50 21l-363 364q-21 20-21 50 0 29 21 51l41 41q22 21 51 21 29 0 50-21l164-164v393q0 29 21 50t51 22h71q29 0 50-22t21-50v-393l165 164q20 21 50 21 29 0 51-21l41-41q21-22 21-51z" horiz-adv-x="928.6" />
<glyph glyph-name="cog-alt" unicode="&#xe81b;" d="M500 350q0 59-42 101t-101 42-101-42-42-101 42-101 101-42 101 42 42 101z m429-286q0 29-22 51t-50 21-50-21-21-51q0-29 21-50t50-21 51 21 21 50z m0 572q0 29-22 50t-50 21-50-21-21-50q0-30 21-51t50-21 51 21 21 51z m-215-235v-103q0-6-4-11t-8-6l-87-14q-6-19-18-42 19-27 50-64 4-6 4-11 0-7-4-11-12-17-46-50t-43-33q-7 0-12 4l-64 50q-21-11-43-17-6-60-13-87-4-13-17-13h-104q-6 0-11 4t-5 10l-13 85q-19 6-42 18l-66-50q-4-4-11-4-6 0-12 4-80 75-80 90 0 5 4 10 5 8 23 30t26 34q-13 24-20 46l-85 13q-5 1-9 5t-4 11v104q0 5 4 10t9 6l86 14q7 19 18 42-19 27-50 64-4 6-4 11 0 7 4 12 12 16 46 49t44 33q6 0 12-4l64-50q19 10 43 18 6 60 13 86 3 13 16 13h104q6 0 11-4t6-10l13-85q19-6 42-17l65 49q5 4 12 4 6 0 11-4 81-75 81-90 0-4-4-10-7-9-24-30t-25-34q13-27 19-46l85-12q6-2 9-6t4-11z m357-298v-78q0-9-83-17-6-15-16-29 28-63 28-77 0-2-2-4-68-40-69-40-5 0-26 27t-29 37q-11-1-17-1t-17 1q-7-11-29-37t-25-27q-1 0-69 40-3 2-3 4 0 14 29 77-10 14-17 29-83 8-83 17v78q0 9 83 18 7 16 17 29-29 63-29 77 0 2 3 4 2 1 19 11t33 19 17 9q4 0 25-26t29-38q12 1 17 1t17-1q28 40 51 63l4 1q2 0 69-39 2-2 2-4 0-14-28-77 9-13 16-29 83-9 83-18z m0 572v-78q0-9-83-18-6-15-16-29 28-63 28-77 0-2-2-4-68-39-69-39-5 0-26 26t-29 38q-11-1-17-1t-17 1q-7-12-29-38t-25-26q-1 0-69 39-3 2-3 4 0 14 29 77-10 14-17 29-83 9-83 18v78q0 9 83 17 7 16 17 29-29 63-29 77 0 2 3 4 2 1 19 11t33 19 17 9q4 0 25-26t29-37q12 1 17 1t17-1q28 39 51 62l4 1q2 0 69-39 2-2 2-4 0-14-28-77 9-13 16-29 83-8 83-17z" horiz-adv-x="1071.4" />
<glyph glyph-name="trash" unicode="&#xe81c;" d="M50 458q122-70 330-70t330 70l-54-486q-2-14-35-36t-100-43-141-21-140 21-100 43-36 36z m488 300q94-18 158-55t64-71l0-10q0-58-112-99t-268-41-268 41-112 99l0 10q0 34 64 71t158 55l42 48q22 26 70 26l92 0q52 0 70-26z m-54-112l84 0q-92 110-104 126-14 16-32 16l-102 0q-22 0-32-16l-106-126 84 0 64 66 82 0z" horiz-adv-x="760" />
<glyph glyph-name="up-big" unicode="&#xe81c;" d="M899 308q0-28-21-50l-41-42q-22-21-51-21-30 0-50 21l-165 164v-393q0-29-20-47t-51-19h-71q-30 0-51 19t-21 47v393l-164-164q-20-21-50-21t-50 21l-42 42q-21 21-21 50 0 30 21 51l363 363q20 21 50 21 30 0 51-21l363-363q21-22 21-51z" horiz-adv-x="928.6" />
<glyph glyph-name="plus-circled" unicode="&#xe81d;" d="M420 770q174 0 297-123t123-297-123-297-297-123-297 123-123 297 123 297 297 123z m52-470l200 0 0 102-200 0 0 202-102 0 0-202-202 0 0-102 202 0 0-202 102 0 0 202z" horiz-adv-x="840" />
<glyph glyph-name="clone" unicode="&#xe81d;" d="M929-61v607q0 8-6 13t-12 5h-607q-8 0-13-5t-5-13v-607q0-7 5-12t13-6h607q7 0 12 6t6 12z m71 607v-607q0-37-26-63t-63-26h-607q-37 0-63 26t-27 63v607q0 37 27 64t63 26h607q37 0 63-26t26-64z m-214 215v-90h-72v90q0 7-5 12t-13 6h-607q-7 0-12-6t-6-12v-607q0-8 6-13t12-5h90v-72h-90q-36 0-63 27t-26 63v607q0 37 26 63t63 26h607q37 0 64-26t26-63z" horiz-adv-x="1000" />
<glyph glyph-name="minus-circled" unicode="&#xe81e;" d="M420 770q174 0 297-123t123-297-123-297-297-123-297 123-123 297 123 297 297 123z m252-368l-504 0 0-102 504 0 0 102z" horiz-adv-x="840" />
<glyph glyph-name="login" unicode="&#xe81f;" d="M661 350q0-14-11-25l-303-304q-11-10-26-10t-25 10-10 25v161h-250q-15 0-25 11t-11 25v214q0 15 11 25t25 11h250v161q0 14 10 25t25 10 26-10l303-304q11-10 11-25z m196 196v-392q0-67-47-114t-114-47h-178q-7 0-13 5t-5 13q0 2-1 11t0 15 2 13 5 11 12 3h178q37 0 64 27t26 63v392q0 37-26 64t-64 26h-174t-6 0-6 2-5 3-4 5-1 8q0 2-1 11t0 15 2 13 5 11 12 3h178q67 0 114-47t47-114z" horiz-adv-x="857.1" />
<glyph glyph-name="check" unicode="&#xe81f;" d="M933 534q0-22-16-38l-404-404-76-76q-16-15-38-15t-38 15l-76 76-202 202q-15 16-15 38t15 38l76 76q16 16 38 16t38-16l164-165 366 367q16 16 38 16t38-16l76-76q16-15 16-38z" horiz-adv-x="1000" />
<glyph glyph-name="down-big" unicode="&#xe820;" d="M899 386q0-30-21-50l-363-364q-22-21-51-21-29 0-50 21l-363 364q-21 20-21 50 0 29 21 51l41 41q22 21 51 21 29 0 50-21l164-164v393q0 29 21 50t51 22h71q29 0 50-22t21-50v-393l165 164q20 21 50 21 29 0 51-21l41-41q21-22 21-51z" horiz-adv-x="928.6" />
<glyph glyph-name="github" unicode="&#xe820;" d="M357 171q0-22-7-45t-24-43-40-19-41 19-24 43-7 45 7 46 24 43 41 19 40-19 24-43 7-46z m357 0q0-22-7-45t-24-43-40-19-41 19-24 43-7 45 7 46 24 43 41 19 40-19 24-43 7-46z m90 0q0 67-39 114t-104 47q-23 0-109-12-40-6-88-6t-87 6q-85 12-109 12-66 0-104-47t-39-114q0-49 18-85t45-58 68-33 78-17 83-4h94q46 0 83 4t78 17 69 33 45 58 18 85z m125 99q0-116-34-185-22-43-59-74t-79-48-95-27-96-12-93-3q-43 0-79 2t-82 7-85 17-77 29-67 45-48 64q-35 69-35 185 0 132 76 221-15 45-15 95 0 64 28 121 61 0 106-22t106-69q82 20 172 20 83 0 157-18 58 46 104 67t105 22q29-57 29-121 0-49-15-94 76-89 76-222z" horiz-adv-x="928.6" />
<glyph glyph-name="up-big" unicode="&#xe821;" d="M899 308q0-28-21-50l-41-42q-22-21-51-21-30 0-50 21l-165 164v-393q0-29-20-47t-51-19h-71q-30 0-51 19t-21 47v393l-164-164q-20-21-50-21t-50 21l-42 42q-21 21-21 50 0 30 21 51l363 363q20 21 50 21 30 0 51-21l363-363q21-22 21-51z" horiz-adv-x="928.6" />
<glyph glyph-name="login" unicode="&#xe821;" d="M661 350q0-14-11-25l-303-304q-11-10-26-10t-25 10-10 25v161h-250q-15 0-25 11t-11 25v214q0 15 11 25t25 11h250v161q0 14 10 25t25 10 26-10l303-304q11-10 11-25z m196 196v-392q0-67-47-114t-114-47h-178q-7 0-13 5t-5 13q0 2-1 11t0 15 2 13 5 11 12 3h178q37 0 64 27t26 63v392q0 37-26 64t-64 26h-174t-6 0-6 2-5 3-4 5-1 8q0 2-1 11t0 15 2 13 5 11 12 3h178q67 0 114-47t47-114z" horiz-adv-x="857.1" />
<glyph glyph-name="lock" unicode="&#xe822;" d="M179 421h285v108q0 59-42 101t-101 41-101-41-41-101v-108z m464-53v-322q0-22-16-37t-38-16h-535q-23 0-38 16t-16 37v322q0 22 16 38t38 15h17v108q0 102 74 176t176 74 177-74 73-176v-108h18q23 0 38-15t16-38z" horiz-adv-x="642.9" />
<glyph glyph-name="mimi" unicode="&#xe823;" d="M909 286c0-241-203-436-454-436s-455 195-455 436 204 564 455 564 454-324 454-564z m-454 396c-141 0-255-114-255-254s114-255 255-255 254 114 254 255-114 254-254 254z m91-254c0-51-41-91-91-91s-91 40-91 91 40 90 91 90 91-40 91-90z" horiz-adv-x="909" />
<glyph glyph-name="spin" unicode="&#xe831;" d="M46 144l0 0c0 0-1 0-1 0-8 18-15 37-21 55-6 19-11 38-15 58-19 99-8 203 35 298 3 6 10 8 15 5 1 0 2 0 2-1l0 0 80-59c5-3 6-9 4-14-5-12-9-25-12-37-4-13-7-26-9-40-11-67-3-137 23-201 2-5 0-10-4-13l0 0-80-56c-5-4-12-2-16 3-1 0-1 1-1 2l0 0z m120 574l0 0c0 1 0 1 0 1 15 13 30 25 46 37 16 11 33 22 51 31 89 50 192 72 297 60 6-1 10-6 10-13 0-1-1-1-1-2l0 0-31-94c-2-5-8-8-13-7-13 0-27 0-40 0-14-1-27-2-40-4-68-11-133-40-186-84-4-3-10-3-14 0l0 0-79 58c-5 3-6 11-2 16 0 0 1 1 2 1l0 0z m588 65l0 0c0 0 1 0 1 0 17-10 34-21 50-32 16-12 31-25 46-38 74-69 127-160 148-262 2-6-2-12-9-13-1 0-1 0-2 0l0 0-100 1c-5 0-10 4-11 9-3 13-8 26-12 38-5 12-10 25-17 36-31 61-78 113-137 150-5 3-6 8-5 13l0 0 31 92c2 6 9 9 15 7 1 0 2-1 2-1l0 0z m244-535l0 0c0 0 0 0 0 0-4-20-9-39-15-57-7-19-14-37-22-55-44-92-114-170-205-221-6-3-13-1-16 4 0 1-1 2-1 2l0 0-30 94c-2 6 1 12 6 14 11 7 22 15 32 23 11 9 21 18 30 27 49 48 84 109 101 176 2 5 6 8 11 8l0 0 98-1c6 0 11-5 11-11 0-1 0-2 0-3l0 0z m-438-395l0 0c0 0 0 0 0 0-20-2-40-3-60-3-20 0-40 1-59 4-102 12-198 54-276 125-5 4-5 11 0 16 0 0 1 1 1 1l0 0 81 58c5 3 12 2 16-2 10-8 20-16 32-23 11-7 22-14 34-20 62-31 131-45 200-41 6 0 10-3 12-8l0 0 29-92c2-6-1-12-7-14-1-1-2-1-3-1l0 0z" horiz-adv-x="1000" />
@ -84,14 +94,14 @@
<glyph glyph-name="sort" unicode="&#xf0dc;" d="M571 243q0-15-10-25l-250-250q-11-11-25-11t-25 11l-250 250q-11 10-11 25t11 25 25 11h500q14 0 25-11t10-25z m0 214q0-14-10-25t-25-11h-500q-15 0-25 11t-11 25 11 25l250 250q10 11 25 11t25-11l250-250q10-10 10-25z" horiz-adv-x="571.4" />
<glyph glyph-name="mail-alt" unicode="&#xf0e0;" d="M1000 454v-443q0-37-26-63t-63-27h-822q-36 0-63 27t-26 63v443q25-27 56-49 202-137 278-192 32-24 51-37t53-27 61-13h2q28 0 61 13t53 27 51 37q95 68 278 192 32 22 56 49z m0 164q0-44-27-84t-68-69q-210-146-262-181-5-4-23-17t-30-22-29-18-32-15-28-5h-2q-12 0-27 5t-32 15-30 18-30 22-23 17q-51 35-147 101t-114 80q-35 23-65 64t-31 77q0 43 23 72t66 29h822q36 0 63-26t26-63z" horiz-adv-x="1000" />
<glyph glyph-name="linkedin" unicode="&#xf0e1;" d="M195 501v-553h-184v553h184z m12 171q0-41-29-68t-75-27h-1q-46 0-74 27t-28 68q0 41 29 68t75 27 74-27 29-68z m650-407v-317h-183v296q0 59-23 92t-71 33q-35 0-58-19t-36-48q-6-17-6-45v-309h-184q1 223 1 361t0 165l-1 27h184v-80h-1q11 18 23 31t31 29 49 24 64 9q95 0 153-63t58-186z" horiz-adv-x="857.1" />
<glyph glyph-name="download-cloud" unicode="&#xf0ed;" d="M714 332q0 8-5 13t-13 5h-125v196q0 8-5 13t-12 5h-108q-7 0-12-5t-5-13v-196h-125q-8 0-13-5t-5-13q0-8 5-13l196-196q5-5 13-5t13 5l196 196q5 6 5 13z m357-125q0-89-62-151t-152-63h-607q-103 0-177 73t-73 177q0 72 39 134t105 92q-1 17-1 24 0 118 84 202t202 84q87 0 159-49t105-129q40 35 93 35 59 0 101-42t42-101q0-43-23-77 72-17 119-76t46-133z" horiz-adv-x="1071.4" />
<glyph glyph-name="upload-cloud" unicode="&#xf0ee;" d="M714 368q0 8-5 13l-196 196q-5 5-13 5t-13-5l-196-196q-5-6-5-13 0-8 5-13t13-5h125v-196q0-8 5-13t12-5h108q7 0 12 5t5 13v196h125q8 0 13 5t5 13z m357-161q0-89-62-151t-152-63h-607q-103 0-177 73t-73 177q0 72 39 134t105 92q-1 17-1 24 0 118 84 202t202 84q87 0 159-49t105-129q40 35 93 35 59 0 101-42t42-101q0-43-23-77 72-17 119-76t46-133z" horiz-adv-x="1071.4" />
<glyph glyph-name="github" unicode="&#xf113;" d="M357 171q0-22-7-45t-24-43-40-19-41 19-24 43-7 45 7 46 24 43 41 19 40-19 24-43 7-46z m357 0q0-22-7-45t-24-43-40-19-41 19-24 43-7 45 7 46 24 43 41 19 40-19 24-43 7-46z m90 0q0 67-39 114t-104 47q-23 0-109-12-40-6-88-6t-87 6q-85 12-109 12-66 0-104-47t-39-114q0-49 18-85t45-58 68-33 78-17 83-4h94q46 0 83 4t78 17 69 33 45 58 18 85z m125 99q0-116-34-185-22-43-59-74t-79-48-95-27-96-12-93-3q-43 0-79 2t-82 7-85 17-77 29-67 45-48 64q-35 69-35 185 0 132 76 221-15 45-15 95 0 64 28 121 61 0 106-22t106-69q82 20 172 20 83 0 157-18 58 46 104 67t105 22q29-57 29-121 0-49-15-94 76-89 76-222z" horiz-adv-x="928.6" />
<glyph glyph-name="code" unicode="&#xf121;" d="M344 69l-28-28q-5-5-12-5t-13 5l-260 261q-6 5-6 12t6 13l260 260q5 6 13 6t12-6l28-28q6-5 6-13t-6-12l-219-220 219-219q6-6 6-13t-6-13z m330 596l-208-721q-2-7-9-11t-13-1l-34 9q-8 3-11 9t-2 14l209 720q2 8 8 11t13 2l35-10q7-2 11-9t1-13z m367-363l-260-261q-6-5-13-5t-13 5l-28 28q-5 6-5 13t5 13l219 219-219 220q-5 5-5 12t5 13l28 28q6 6 13 6t13-6l260-260q5-5 5-13t-5-12z" horiz-adv-x="1071.4" />
<glyph glyph-name="youtube" unicode="&#xf167;" d="M542 156v-118q0-37-22-37-13 0-25 12v168q12 12 25 12 22 0 22-37z m189-1v-25h-51v25q0 38 25 38t26-38z m-540 122h60v52h-174v-52h59v-318h55v318z m161-318h50v276h-50v-211q-17-23-32-23-10 0-11 11-1 2-1 20v203h-50v-218q0-28 5-41 7-21 32-21 27 0 57 34v-30z m240 83v110q0 41-5 55-10 31-40 31-28 0-52-30v121h-50v-370h50v27q25-31 52-31 30 0 40 31 5 15 5 56z m188 6v7h-51q0-29-1-34-4-20-22-20-26 0-26 38v49h100v57q0 44-15 65-22 28-59 28-38 0-60-28-15-21-15-65v-96q0-44 16-65 22-29 60-29 40 0 60 30 10 15 12 30 1 5 1 33z m-339 509v117q0 39-24 39t-24-39v-117q0-39 24-39t24 39z m401-419q0-131-14-195-8-33-33-56t-57-25q-102-12-309-12t-310 12q-32 3-57 25t-32 56q-15 62-15 195 0 131 15 195 7 33 32 56t57 26q103 11 310 11t309-11q33-4 58-26t32-56q14-62 14-195z m-557 712h57l-67-223v-151h-56v151q-8 42-34 119-21 57-37 104h60l39-147z m207-186v-97q0-46-16-66-21-29-59-29-37 0-59 29-15 21-15 66v97q0 45 15 66 22 28 59 28 38 0 59-28 16-21 16-66z m187 91v-279h-51v31q-30-35-58-35-25 0-33 21-4 13-4 42v220h51v-205q0-19 0-20 2-12 12-12 15 0 32 24v213h51z" horiz-adv-x="857.1" />
@ -101,8 +111,6 @@
<glyph glyph-name="brush" unicode="&#xf1fc;" d="M901 850q39 0 69-26t29-65q0-35-25-84-185-351-260-420-54-51-121-51-71 0-121 52t-51 123q0 71 52 118l356 323q33 30 72 30z m-507-577q22-42 59-73t84-42l1-40q2-118-72-193t-195-75q-68 0-121 26t-85 71-49 102-16 123q4-3 23-17t35-25 32-20 26-9q23 0 31 20 14 37 32 63t39 42 49 27 57 14 70 6z" horiz-adv-x="1000" />
<glyph glyph-name="pinterest" unicode="&#xf231;" d="M0 517q0 60 21 113t58 93 85 69 103 44 113 14q88 0 164-37t123-108 47-160q0-54-10-105t-34-99-56-83-80-58-106-21q-38 0-75 18t-54 49q-5-22-15-63t-14-53-11-40-15-39-17-35-26-44-35-48l-7-3-5 6q-9 88-9 105 0 51 12 115t37 161 29 113q-18 36-18 94 0 47 29 87t74 41q34 0 53-23t19-57q0-37-24-106t-25-105q0-35 25-58t61-23q31 0 57 14t44 38 31 53 21 61 11 62 4 56q0 96-61 150t-160 54q-111 0-186-72t-75-183q0-25 7-48t15-36 15-26 7-17q0-15-8-40t-21-25q-1 0-9 1-29 9-51 31t-34 53-18 60-6 60z" horiz-adv-x="714.3" />
<glyph glyph-name="clone" unicode="&#xf24d;" d="M929-61v607q0 8-6 13t-12 5h-607q-8 0-13-5t-5-13v-607q0-7 5-12t13-6h607q7 0 12 6t6 12z m71 607v-607q0-37-26-63t-63-26h-607q-37 0-63 26t-27 63v607q0 37 27 64t63 26h607q37 0 63-26t26-64z m-214 215v-90h-72v90q0 7-5 12t-13 6h-607q-7 0-12-6t-6-12v-607q0-8 6-13t12-5h90v-72h-90q-36 0-63 27t-26 63v607q0 37 26 63t63 26h607q37 0 64-26t26-63z" horiz-adv-x="1000" />
</font>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -14,10 +14,16 @@
class blog extends common {
const EDIT_OWNER = 'owner';
const EDIT_GROUP = 'group';
const EDIT_ALL = 'all';
public static $actions = [
'add' => self::GROUP_MODERATOR,
'comment' => self::GROUP_MODERATOR,
'commentApprove' => self::GROUP_MODERATOR,
'commentDelete' => self::GROUP_MODERATOR,
'commentDeleteAll' => self::GROUP_MODERATOR,
'config' => self::GROUP_MODERATOR,
'delete' => self::GROUP_MODERATOR,
'edit' => self::GROUP_MODERATOR,
@ -27,8 +33,21 @@ class blog extends common {
public static $articles = [];
// Signature de l'article
public static $articleSignature = '';
// Signature du commentaire
public static $editCommentSignature = '';
public static $comments = [];
public static $nbCommentsApproved = 0;
public static $commentsDelete;
// Signatures des commentaires déjà saisis
public static $commentsSignature = [];
public static $pages;
public static $states = [
@ -49,12 +68,28 @@ class blog extends common {
'right' => 'À droite ',
];
//Paramètre longueur maximale des commentaires en nb de caractères
public static $commentLength = [
'500' => '500',
'1000' => '1000',
'2000' => '2000',
'5000' => '5000',
'10000' => '10000'
];
// Permissions d'un article
public static $articleConsent = [
self::EDIT_ALL => 'Tous les groupes',
self::EDIT_GROUP => 'Groupe du propriétaire',
self::EDIT_OWNER => 'Propriétaire'
];
public static $users = [];
const BLOG_VERSION = '2.11';
const BLOG_VERSION = '4.2';
/**
/**
* Flux RSS
*/
public function rss() {
@ -68,11 +103,11 @@ class blog extends common {
$feeds = new \FeedWriter\RSS2();
// En-tête
$feeds->setTitle($this->getData (['page', $this->getUrl(0), 'posts','title']));
$feeds->setTitle($this->getData (['page', $this->getUrl(0), 'title']));
$feeds->setLink(helper::baseUrl() . $this->getUrl(0));
$feeds->setDescription(html_entity_decode(strip_tags($this->getData (['page', $this->getUrl(0), 'metaDescription']))));
$feeds->setDescription($this->getData (['page', $this->getUrl(0), 'metaDescription']));
$feeds->setChannelElement('language', 'fr-FR');
$feeds->setDate(time());
$feeds->setDate(date('r',time()));
$feeds->addGenerator();
// Corps des articles
$articleIdsPublishedOns = helper::arrayCollumn($this->getData(['module', $this->getUrl(0), 'posts']), 'publishedOn', 'SORT_DESC');
@ -84,12 +119,25 @@ class blog extends common {
$thumb = str_replace ($parts[(count($parts)-1)],'mini_' . $parts[(count($parts)-1)], $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'picture']));
// Créer les articles du flux
$newsArticle = $feeds->createNewItem();
// Signature de l'article
$author = $this->signature($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'userId']));
$newsArticle->addElementArray([
'title' => strip_tags($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'title']) ),
'link' => helper::baseUrl() .$this->getUrl(0) . '/' . $articleId,
'description' => html_entity_decode(strip_tags($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'content']))),
'addEnclosure' => helper::baseUrl() . self::FILE_DIR . $thumb
'title' => $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'title']),
'link' => helper::baseUrl() .$this->getUrl(0) . '/' . $articleId,
'description' => '<img src="' . helper::baseUrl() . self::FILE_DIR . $thumb
. '" alt="' . $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'title'])
. '" title="' . $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'title'])
. '" />' .
$this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'content']),
]);
$newsArticle->setAuthor($author,'no@mail.com');
$newsArticle->setId(helper::baseUrl() .$this->getUrl(0) . '/' . $articleId);
$newsArticle->setDate(date('r', $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn'])));
$imageData = getimagesize(helper::baseUrl(false) . self::FILE_DIR . 'thumb/' . $thumb);
$newsArticle->addEnclosure( helper::baseUrl(false) . self::FILE_DIR . 'thumb/' . $thumb,
$imageData[0] * $imageData[1],
$imageData['mime']
);
$feeds->addItem($newsArticle);
}
}
@ -108,26 +156,40 @@ class blog extends common {
public function add() {
// Soumission du formulaire
if($this->isPost()) {
// Modification de l'userId
if($this->getUser('group') === self::GROUP_ADMIN){
$newuserid = $this->getInput('blogAddUserId', helper::FILTER_STRING_SHORT, true);
}
else{
$newuserid = $this->getUser('id');
}
// Incrémente l'id de l'article
$articleId = helper::increment($this->getInput('blogAddTitle', helper::FILTER_ID), $this->getData(['page']));
$articleId = helper::increment($articleId, (array) $this->getData(['module', $this->getUrl(0)]));
$articleId = helper::increment($articleId, array_keys(self::$actions));
// Crée l'article
$this->setData(['module', $this->getUrl(0), 'posts', $articleId, [
'closeComment' => $this->getInput('blogAddCloseComment', helper::FILTER_BOOLEAN),
'mailNotification' => $this->getInput('blogAddMailNotification', helper::FILTER_BOOLEAN),
'groupNotification' => $this->getInput('blogAddGroupNotification', helper::FILTER_INT),
'comment' => [],
'content' => $this->getInput('blogAddContent', null),
'picture' => $this->getInput('blogAddPicture', helper::FILTER_STRING_SHORT, true),
'hidePicture' => $this->getInput('blogAddHidePicture', helper::FILTER_BOOLEAN),
'pictureSize' => $this->getInput('blogAddPictureSize', helper::FILTER_STRING_SHORT),
'picturePosition' => $this->getInput('blogAddPicturePosition', helper::FILTER_STRING_SHORT),
'publishedOn' => $this->getInput('blogAddPublishedOn', helper::FILTER_DATETIME, true),
'state' => $this->getInput('blogAddState', helper::FILTER_BOOLEAN),
'title' => $this->getInput('blogAddTitle', helper::FILTER_STRING_SHORT, true),
'userId' => $this->getInput('blogAddUserId', helper::FILTER_ID, true)
]]);
$this->setData(['module',
$this->getUrl(0),
'posts',
$articleId, [
'comment' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'comment']),
'content' => $this->getInput('blogAddContent', null),
'picture' => $this->getInput('blogAddPicture', helper::FILTER_STRING_SHORT, true),
'hidePicture' => $this->getInput('blogAddHidePicture', helper::FILTER_BOOLEAN),
'pictureSize' => $this->getInput('blogAddPictureSize', helper::FILTER_STRING_SHORT),
'picturePosition' => $this->getInput('blogAddPicturePosition', helper::FILTER_STRING_SHORT),
'publishedOn' => $this->getInput('blogAddPublishedOn', helper::FILTER_DATETIME, true),
'state' => $this->getInput('blogAddState', helper::FILTER_BOOLEAN),
'title' => $this->getInput('blogAddTitle', helper::FILTER_STRING_SHORT, true),
'userId' => $newuserid,
'editConsent' => $this->getInput('blogAddConsent') === self::EDIT_GROUP ? $this->getUser('group') : $this->getInput('blogAddConsent'),
'commentMaxlength' => $this->getInput('blogAddCommentMaxlength'),
'commentApproved' => $this->getInput('blogAddCommentApproved', helper::FILTER_BOOLEAN),
'commentClose' => $this->getInput('blogAddCommentClose', helper::FILTER_BOOLEAN),
'commentNotification' => $this->getInput('blogAddCommentNotification', helper::FILTER_BOOLEAN),
'commentGroupNotification' => $this->getInput('blogAddCommentGroupNotification', helper::FILTER_INT)
]
]);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config',
@ -157,14 +219,13 @@ class blog extends common {
* Liste des commentaires
*/
public function comment() {
// Liste les commentaires
$comments = [];
foreach((array) $this->getData(['module', $this->getUrl(0), 'posts']) as $articleId => $article) {
foreach($article['comment'] as &$comment) {
$comment['articleId'] = $articleId;
}
$comments += $article['comment'];
}
$comments = $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2),'comment']);
self::$commentsDelete = template::button('blogCommentDeleteAll', [
'class' => 'blogCommentDeleteAll buttonRed',
'href' => helper::baseUrl() . $this->getUrl(0) . '/commentDeleteAll/' . $this->getUrl(2).'/' . $_SESSION['csrf'] ,
'ico' => 'cancel',
'value' => 'Tout effacer'
]);
// Ids des commentaires par ordre de création
$commentIds = array_keys(helper::arrayCollumn($comments, 'createdOn', 'SORT_DESC'));
// Pagination
@ -175,22 +236,34 @@ class blog extends common {
for($i = $pagination['first']; $i < $pagination['last']; $i++) {
// Met en forme le tableau
$comment = $comments[$commentIds[$i]];
// Bouton d'approbation
$buttonApproval = '';
// Compatibilité avec les commentaires des versions précédentes, les valider
$comment['approval'] = array_key_exists('approval', $comment) === false ? true : $comment['approval'] ;
if ( $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2),'commentApproved']) === true) {
$buttonApproval = template::button('blogCommentApproved' . $commentIds[$i], [
'class' => $comment['approval'] === true ? 'blogCommentRejected buttonGreen' : 'blogCommentApproved buttonRed' ,
'href' => helper::baseUrl() . $this->getUrl(0) . '/commentApprove/' . $this->getUrl(2) . '/' . $commentIds[$i] . '/' . $_SESSION['csrf'] ,
'value' => $comment['approval'] === true ? 'A' : 'R'
]);
}
self::$comments[] = [
mb_detect_encoding(strftime('%d %B %Y - %H:%M', $comment['createdOn']), 'UTF-8', true)
? strftime('%d %B %Y - %H:%M', $comment['createdOn'])
: utf8_encode(strftime('%d %B %Y - %H:%M', $comment['createdOn'])),
$comment['content'],
$comment['userId'] ? $this->getData(['user', $comment['userId'], 'firstname']) . ' ' . $this->getData(['user', $comment['userId'], 'lastname']) : $comment['author'],
$buttonApproval,
template::button('blogCommentDelete' . $commentIds[$i], [
'class' => 'blogCommentDelete buttonRed',
'href' => helper::baseUrl() . $this->getUrl(0) . '/comment-delete/' . $comment['articleId'] . '/' . $commentIds[$i] . '/' . $_SESSION['csrf'] ,
'href' => helper::baseUrl() . $this->getUrl(0) . '/commentDelete/' . $this->getUrl(2) . '/' . $commentIds[$i] . '/' . $_SESSION['csrf'] ,
'value' => template::ico('cancel')
])
];
}
// Valeurs en sortie
$this->addOutput([
'title' => 'Gestion des commentaires',
'title' => 'Gestion des commentaires : '. $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'title']),
'view' => 'comment'
]);
}
@ -219,13 +292,76 @@ class blog extends common {
$this->deleteData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'comment', $this->getUrl(3)]);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/comment',
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/comment/'.$this->getUrl(2),
'notification' => 'Commentaire supprimé',
'state' => true
]);
}
}
/**
* Suppression de tous les commentaires de l'article $this->getUrl(2)
*/
public function commentDeleteAll() {
// Jeton incorrect
if ($this->getUrl(3) !== $_SESSION['csrf']) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config',
'notification' => 'Action non autorisée'
]);
}
// Suppression
else {
$this->setData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'comment',[] ]);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/comment',
'notification' => 'Commentaires supprimés',
'state' => true
]);
}
}
/**
* Approbation oou désapprobation de commentaire
*/
public function commentApprove() {
// Le commentaire n'existe pas
if($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'comment', $this->getUrl(3)]) === null) {
// Valeurs en sortie
$this->addOutput([
'access' => false
]);
}
// Jeton incorrect
elseif ($this->getUrl(4) !== $_SESSION['csrf']) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config',
'notification' => 'Action non autorisée'
]);
}
// Inversion du statut
else {
$approved = !$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'comment', $this->getUrl(3), 'approval']) ;
$this->setData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'comment', $this->getUrl(3), [
'author' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'comment', $this->getUrl(3), 'author']),
'content' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'comment', $this->getUrl(3), 'content']),
'createdOn' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'comment', $this->getUrl(3), 'createdOn']),
'userId' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'comment', $this->getUrl(3), 'userId']),
'approval' => $approved
]]);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/comment/'.$this->getUrl(2),
'notification' => $approved ? 'Commentaire approuvé' : 'Commentaire rejeté',
'state' => $approved
]);
}
}
/**
* Configuration
*/
@ -244,25 +380,66 @@ class blog extends common {
]);
} else {
// Ids des articles par ordre de publication
$articleIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0),'posts']), 'publishedOn', 'SORT_DESC'));
// Supprimer le bloc config
$articleIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0), 'posts']), 'publishedOn', 'SORT_DESC'));
// Gestion des droits d'accès
$filterData=[];
foreach ($articleIds as $key => $value) {
if (
( // Propriétaire
$this->getData(['module', $this->getUrl(0), 'posts', $value,'editConsent']) === self::EDIT_OWNER
AND ( $this->getData(['module', $this->getUrl(0), 'posts', $value,'userId']) === $this->getUser('id')
OR $this->getUser('group') === self::GROUP_ADMIN )
)
OR (
// Groupe
$this->getData(['module', $this->getUrl(0), 'posts', $value,'editConsent']) !== self::EDIT_OWNER
AND $this->getUser('group') >= $this->getData(['module',$this->getUrl(0), 'posts', $value,'editConsent'])
)
OR (
// Tout le monde
$this->getData(['module', $this->getUrl(0), 'posts', $value,'editConsent']) === self::EDIT_ALL
)
) {
$filterData[] = $value;
}
}
$articleIds = $filterData;
// Pagination
$pagination = helper::pagination($articleIds, $this->getUrl(),$this->getData(['config','itemsperPage']));
// Liste des pages
self::$pages = $pagination['pages'];
// Articles en fonction de la pagination
for($i = $pagination['first']; $i < $pagination['last']; $i++) {
// Nombre de commentaires à approuver et approuvés
$approvals = helper::arrayCollumn($this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'comment' ]),'approval', 'SORT_DESC');
if ( is_array($approvals) ) {
$a = array_values($approvals);
$toApprove = count(array_keys($a,false));
$approved = count(array_keys($a,true));
} else {
$toApprove = 0;
$approved = count($this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i],'comment']));
}
// Met en forme le tableau
$date = mb_detect_encoding(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn'])), 'UTF-8', true)
$date = mb_detect_encoding(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn'])), 'UTF-8', true)
? strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn']))
: utf8_encode(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn'])));
$heure = mb_detect_encoding(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn'])), 'UTF-8', true)
? strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn']))
: utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'publishedOn'])));
self::$articles[] = [
$this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'title']),
'<a href="' . helper::baseurl() . $this->getUrl(0) . '/' . $articleIds[$i] . '" target="_blank" >' .
$this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'title']) .
'</a>',
$date .' à '. $heure,
self::$states[$this->getData(['module', $this->getUrl(0), 'posts', $articleIds[$i], 'state'])],
// Bouton pour afficher les commentaires de l'article
template::button('blogConfigComment' . $articleIds[$i], [
'class' => ($toApprove || $approved ) > 0 ? 'buttonBlue' : 'buttonGrey' ,
'href' => ($toApprove || $approved ) > 0 ? helper::baseUrl() . $this->getUrl(0) . '/comment/' . $articleIds[$i] : '',
'value' => $toApprove > 0 ? $toApprove . '/' . $approved : $approved
]),
template::button('blogConfigEdit' . $articleIds[$i], [
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $articleIds[$i] . '/' . $_SESSION['csrf'],
'value' => template::ico('pencil')
@ -335,28 +512,41 @@ class blog extends common {
else {
// Soumission du formulaire
if($this->isPost()) {
if($this->getUser('group') === self::GROUP_ADMIN){
$newuserid = $this->getInput('blogEditUserId', helper::FILTER_STRING_SHORT, true);
}
else{
$newuserid = $this->getUser('id');
}
$articleId = $this->getInput('blogEditTitle', helper::FILTER_ID, true);
// Incrémente le nouvel id de l'article
if($articleId !== $this->getUrl(2)) {
$articleId = helper::increment($articleId, $this->getData(['page']));
$articleId = helper::increment($articleId, $this->getData(['module', $this->getUrl(0)]));
$articleId = helper::increment($articleId, $this->getData(['module', $this->getUrl(0),'posts']));
$articleId = helper::increment($articleId, array_keys(self::$actions));
}
$this->setData(['module', $this->getUrl(0), 'posts', $articleId, [
'closeComment' => $this->getInput('blogEditCloseComment'),
'mailNotification' => $this->getInput('blogEditMailNotification', helper::FILTER_BOOLEAN),
'groupNotification' => $this->getInput('blogEditGroupNotification', helper::FILTER_INT),
'comment' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'comment']),
'content' => $this->getInput('blogEditContent', null),
'picture' => $this->getInput('blogEditPicture', helper::FILTER_STRING_SHORT, true),
'hidePicture' => $this->getInput('blogEditHidePicture', helper::FILTER_BOOLEAN),
'pictureSize' => $this->getInput('blogEditPictureSize', helper::FILTER_STRING_SHORT),
'picturePosition' => $this->getInput('blogEditPicturePosition', helper::FILTER_STRING_SHORT),
'publishedOn' => $this->getInput('blogEditPublishedOn', helper::FILTER_DATETIME, true),
'state' => $this->getInput('blogEditState', helper::FILTER_BOOLEAN),
'title' => $this->getInput('blogEditTitle', helper::FILTER_STRING_SHORT, true),
'userId' => $this->getInput('blogEditUserId', helper::FILTER_ID, true)
]]);
$this->setData(['module',
$this->getUrl(0),
'posts',
$articleId, [
'comment' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'comment']),
'content' => $this->getInput('blogEditContent', null),
'picture' => $this->getInput('blogEditPicture', helper::FILTER_STRING_SHORT, true),
'hidePicture' => $this->getInput('blogEditHidePicture', helper::FILTER_BOOLEAN),
'pictureSize' => $this->getInput('blogEditPictureSize', helper::FILTER_STRING_SHORT),
'picturePosition' => $this->getInput('blogEditPicturePosition', helper::FILTER_STRING_SHORT),
'publishedOn' => $this->getInput('blogEditPublishedOn', helper::FILTER_DATETIME, true),
'state' => $this->getInput('blogEditState', helper::FILTER_BOOLEAN),
'title' => $this->getInput('blogEditTitle', helper::FILTER_STRING_SHORT, true),
'userId' => $newuserid,
'editConsent' => $this->getInput('blogEditConsent') === self::EDIT_GROUP ? $this->getUser('group') : $this->getInput('blogEditConsent'),
'commentMaxlength' => $this->getInput('blogEditCommentMaxlength'),
'commentApproved' => $this->getInput('blogEditCommentApproved', helper::FILTER_BOOLEAN),
'commentClose' => $this->getInput('blogEditCommentClose', helper::FILTER_BOOLEAN),
'commentNotification' => $this->getInput('blogEditCommentNotification', helper::FILTER_BOOLEAN),
'commentGroupNotification' => $this->getInput('blogEditCommentGroupNotification', helper::FILTER_INT)
]
]);
// Supprime l'ancien article
if($articleId !== $this->getUrl(2)) {
$this->deleteData(['module', $this->getUrl(0), 'posts', $this->getUrl(2)]);
@ -372,7 +562,11 @@ class blog extends common {
self::$users = helper::arrayCollumn($this->getData(['user']), 'firstname');
ksort(self::$users);
foreach(self::$users as $userId => &$userFirstname) {
$userFirstname = $userFirstname . ' ' . $this->getData(['user', $userId, 'lastname']);
// Les membres ne sont pas éditeurs, les exclure de la liste
if ( $this->getData(['user', $userId, 'group']) < self::GROUP_MODERATOR) {
unset(self::$users[$userId]);
}
$userFirstname = $userFirstname . ' ' . $this->getData(['user', $userId, 'lastname']) . ' (' . self::$groupEdits[$this->getData(['user', $userId, 'group'])] . ')';
}
unset($userFirstname);
// Valeurs en sortie
@ -417,38 +611,44 @@ class blog extends common {
self::$inputNotices['blogArticleCaptcha'] = 'Incorrect';
}
// Crée le commentaire
$commentId = helper::increment(uniqid(), $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'comment']));
$this->setData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'comment', $commentId, [
$commentId = helper::increment(uniqid(), $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'comment']));
$content = $this->getInput('blogArticleContent', false);
$this->setData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'comment', $commentId, [
'author' => $this->getInput('blogArticleAuthor', helper::FILTER_STRING_SHORT, empty($this->getInput('blogArticleUserId')) ? TRUE : FALSE),
'content' => $this->getInput('blogArticleContent', helper::FILTER_STRING_SHORT, true),
'content' => $content,
'createdOn' => time(),
'userId' => $this->getInput('blogArticleUserId'),
'approval' => !$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentApproved']) // true commentaire publié false en attente de publication
]]);
// Envoi d'une notification aux administrateurs
// Init tableau
$to = [];
// Liste des destinataires
foreach($this->getData(['user']) as $userId => $user) {
if ($user['group'] >= $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'groupNotification']) ) {
if ($user['group'] >= $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentGroupNotification']) ) {
$to[] = $user['mail'];
$firstname[] = $user['firstname'];
$lastname[] = $user['lastname'];
}
}
// Envoi du mail $sent code d'erreur ou de réussite
if ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'mailNotification']) === true) {
$sent = $this->sendMail(
$to,
'Nouveau commentaire',
'Bonjour' . ' <strong>' . $user['firstname'] . ' ' . $user['lastname'] . '</strong>,<br><br>' .
'Nouveau commentaire déposé sur la page "' . $this->getData(['page', $this->getUrl(0), 'posts', 'title']) . '" :<br><br>',
''
);
$notification = $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentApproved']) === true ? 'Commentaire déposé en attente d\'approbation': 'Commentaire déposé';
if ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentNotification']) === true) {
$error = 0;
foreach($to as $key => $adress){
$sent = $this->sendMail(
$adress,
'Nouveau commentaire déposé',
'Bonjour' . ' <strong>' . $firstname[$key] . ' ' . $lastname[$key] . '</strong>,<br><br>' .
'L\'article <a href="' . helper::baseUrl() . $this->getUrl(0) . '/ ' . $this->getUrl(1) . '">' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'title']) . '</a> a reçu un nouveau commentaire.<br><br>',
''
);
if( $sent === false) $error++;
}
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl() . '#comment',
//'notification' => 'Commentaire ajouté',
//'state' => true
'notification' => ($sent === true ? 'Commentaire ajouté et une notification envoyée' : 'Commentaire ajouté, erreur de notification : <br/>' . $sent),
'notification' => ($error === 0 ? $notification . '<br/>Une notification a été envoyée.' : $notification . '<br/> Erreur de notification : ' . $sent),
'state' => ($sent === true ? true : null)
]);
@ -456,26 +656,53 @@ class blog extends common {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl() . '#comment',
'notification' => 'Commentaire ajouté',
'notification' => $notification,
'state' => true
]);
}
}
// Ids des commentaires par ordre de publication
$commentIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'comment']), 'createdOn', 'SORT_DESC'));
// Ids des commentaires approuvés par ordre de publication
$commentsApproved = $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'comment']);
if ($commentsApproved) {
foreach( $commentsApproved as $key => $value){
if($value['approval']===false) unset($commentsApproved[$key]);
}
// Ligne suivante si affichage du nombre total de commentaires approuvés sous l'article
self::$nbCommentsApproved = count($commentsApproved);
}
$commentIds = array_keys(helper::arrayCollumn($commentsApproved, 'createdOn', 'SORT_DESC'));
// Pagination
$pagination = helper::pagination($commentIds, $this->getUrl(),$this->getData(['config','itemsperPage']),'#comment');
// Liste des pages
self::$pages = $pagination['pages'];
// Signature de l'article
self::$articleSignature = $this->signature($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'userId']));
// Signature du commentaire édité
if($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')) {
self::$editCommentSignature = $this->signature($this->getUser('id'));
}
// Commentaires en fonction de la pagination
for($i = $pagination['first']; $i < $pagination['last']; $i++) {
self::$comments[$commentIds[$i]] = $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'comment', $commentIds[$i]]);
// Signatures des commentaires
$e = $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'comment', $commentIds[$i],'userId']);
if ($e) {
self::$commentsSignature[$commentIds[$i]] = $this->signature($e);
} else {
self::$commentsSignature[$commentIds[$i]] = $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'comment', $commentIds[$i],'author']);
}
// Données du commentaire si approuvé
if ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'comment', $commentIds[$i],'approval']) === true ) {
self::$comments[$commentIds[$i]] = $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'comment', $commentIds[$i]]);
}
}
// Valeurs en sortie
$this->addOutput([
'showBarEditButton' => true,
'title' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'title']),
'title' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'title']),
'vendor' => [
'tinymce'
],
'view' => 'article'
]);
}
@ -508,4 +735,27 @@ class blog extends common {
]);
}
}
}
/**
* Retourne la signature d'un utilisateur
*/
private function signature($userId) {
switch ($this->getData(['user', $userId, 'signature'])){
case 1:
return $userId;
break;
case 2:
return $this->getData(['user', $userId, 'pseudo']);
break;
case 3:
return $this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']);
break;
case 4:
return $this->getData(['user', $userId, 'lastname']) . ' ' . $this->getData(['user', $userId, 'firstname']);
break;
default:
return $this->getData(['user', $userId, 'firstname']);
}
}
}

View File

@ -16,4 +16,39 @@
$("#blogAddDraft").on("click", function() {
$("#blogAddState").val(0);
$("#blogAddForm").trigger("submit");
});
/**
* Options de commentaires
*/
$("#blogAddCommentClose").on("change", function() {
if ($(this).is(':checked') ) {
$(".commentOptionsWrapper").slideUp();
} else {
$(".commentOptionsWrapper").slideDown();
}
});
$("#blogAddCommentNotification").on("change", function() {
if ($(this).is(':checked') ) {
$("#blogAddCommentGroupNotification").slideDown();
} else {
$("#blogAddCommentGroupNotification").slideUp();
}
});
$( document).ready(function() {
if ($("#blogAddCloseComment").is(':checked') ) {
$(".commentOptionsWrapper").slideUp();
} else {
$(".commentOptionsWrapper").slideDown();
}
if ($("#blogAddCommentNotification").is(':checked') ) {
$("#blogAddCommentGroupNotification").slideDown();
} else {
$("#blogAddCommentGroupNotification").slideUp();
}
});

View File

@ -68,31 +68,62 @@
'class' => 'editorWysiwyg'
]); ?>
<div class="row">
<div class="col6">
<div class="col12">
<div class="block">
<h4>Options de publication</h4>
<?php echo template::select('blogAddUserId', $module::$users, [
'label' => 'Auteur',
'selected' => $this->getUser('id')
]); ?>
<?php echo template::date('blogAddPublishedOn', [
'help' => 'L\'article n\'est visible qu\'après la date de publication prévue.',
'label' => 'Date de publication',
'value' => time()
]); ?>
</div>
</div>
<div class="col6">
<div class="block">
<h4>Options avancées</h4>
<?php echo template::checkbox('blogAddCloseComment', true, 'Fermer les commentaires' ); ?>
<?php echo template::checkbox('blogAddMailNotification', true, 'Notifier le commentaire aux groupes à partir de :', [
'help' => 'Editeurs = éditeurs + administrateurs<br/> Membres = membres + éditeurs + administrateurs'
]); ?>
<?php echo template::select('blogAddGroupNotification', $module::$groupNews, [
'label' => ''
]); ?>
<div class="row">
<div class="col4">
<?php echo template::select('blogAddUserId', $module::$users, [
'label' => 'Auteur',
'selected' => $this->getUser('id'),
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN ? true : false
]); ?>
</div>
<div class="col4">
<?php echo template::date('blogAddPublishedOn', [
'help' => 'L\'article n\'est visible qu\'après la date de publication prévue.',
'label' => 'Date de publication',
'value' => time()
]); ?>
</div>
<div class="col4">
<?php echo template::select('blogAddConsent', $module::$articleConsent , [
'label' => 'Edition / Suppression',
'selected' => $module::EDIT_ALL,
'help' => 'Les utilisateurs des groupes supérieurs accèdent à l\'article sans restriction'
]); ?>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>
<div class="row">
<div class="col12">
<div class="block">
<h4>Commentaires</h4>
<div class="row">
<div class="col4 ">
<?php echo template::checkbox('blogAddCommentClose', true, 'Fermer les commentaires'); ?>
</div>
<div class="col4 commentOptionsWrapper ">
<?php echo template::checkbox('blogAddCommentApproved', true, 'Approbation par un modérateur'); ?>
</div>
<div class="col4 commentOptionsWrapper">
<?php echo template::select('blogAddCommentMaxlength', $module::$commentLength,[
'help' => 'Choix du nombre maximum de caractères pour chaque commentaire de l\'article, mise en forme html comprise.',
'label' => 'Caractères par commentaire'
]); ?>
</div>
</div>
<div class="row">
<div class="col3 commentOptionsWrapper offset2">
<?php echo template::checkbox('blogAddCommentNotification', true, 'Notification par email'); ?>
</div>
<div class="col4 commentOptionsWrapper">
<?php echo template::select('blogAddCommentGroupNotification', $module::$groupNews); ?>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>

View File

@ -60,4 +60,4 @@
#rssFeed p {
display: inline;
vertical-align: top;
}
}

View File

@ -13,17 +13,35 @@
?>
</div>
</div>
<?php if(
$this->getUser('group') >= self::GROUP_ADMIN
AND $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
): ?>
<div class="col2">
<?php echo template::button('blogEdit', [
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1) . '/' . $_SESSION['csrf'],
'value' => 'Editer'
]); ?>
</div>
<?php endif; ?>
<?php if (
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
AND
( // Propriétaire
(
$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === $module::EDIT_OWNER
AND ( $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'userId']) === $this->getUser('id')
OR $this->getUser('group') === self::GROUP_ADMIN )
)
OR (
// Groupe
( $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === self::GROUP_ADMIN
OR $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === self::GROUP_MODERATOR)
AND $this->getUser('group') >= $this->getData(['module',$this->getUrl(0), 'posts', $this->getUrl(1),'editConsent'])
)
OR (
// Tout le monde
$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1),'editConsent']) === $module::EDIT_ALL
AND $this->getUser('group') >= $module::$actions['config']
)
)
): ?>
<?php echo template::button('blogEdit', [
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1) . '/' . $_SESSION['csrf'],
'value' => 'Editer'
]); ?>
<?php endif; ?>
</div>
</div>
<?php $pictureSize = $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']) === null ? '100' : $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'pictureSize']); ?>
<?php if ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'hidePicture']) == false) {
@ -31,14 +49,9 @@
' pict' . $pictureSize . '" src="' . helper::baseUrl(false) . self::FILE_DIR.'source/' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picture']) .
'" alt="' . $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'picture']) . '">';
} ?>
<?php echo $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'content']); ?>
<p class="clearBoth signature">
<?php echo $this->getData(['user', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'userId']), 'firstname']); ?>
<?php echo $this->getData(['user', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'userId']), 'lastname']); ?>
</p>
<?php echo template::formClose(); ?>
<!-- Bloc RSS-->
<?php echo $this->getData(['module', $this->getUrl(0),'posts', $this->getUrl(1), 'content']); ?>
<p class="clearBoth signature"><?php echo $module::$articleSignature;?></p>
<!-- Bloc RSS-->
<?php if ($this->getData(['module',$this->getUrl(0), 'config', 'feeds'])): ?>
<div id="rssFeed">
<a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?> ">
@ -49,11 +62,12 @@
</a>
</div>
<?php endif; ?>
<?php if($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'closeComment'])): ?>
<?php if($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentClose'])): ?>
<p>Cet article ne reçoit pas de commentaire.</p>
<?php else: ?>
<h3 id="comment">
<?php $commentsNb = count($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'comment'])); ?>
<?php //$commentsNb = count($module::$comments); ?>
<?php $commentsNb = $module::$nbCommentsApproved; ?>
<?php $s = $commentsNb === 1 ? '': 's' ?>
<?php echo $commentsNb > 0 ? $commentsNb . ' ' . 'commentaire' . $s : 'Pas encore de commentaire'; ?>
</h3>
@ -63,11 +77,11 @@
'readonly' => true
]); ?>
<div id="blogArticleCommentWrapper" class="displayNone">
<?php if($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')): ?>
<?php if($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')): ?>
<?php echo template::text('blogArticleUserName', [
'label' => 'Nom',
'readonly' => true,
'value' => $this->getUser('firstname') . ' ' . $this->getUser('lastname')
'value' => $module::$editCommentSignature
]); ?>
<?php echo template::hidden('blogArticleUserId', [
'value' => $this->getUser('id')
@ -91,9 +105,12 @@
</div>
<?php endif; ?>
<?php echo template::textarea('blogArticleContent', [
'label' => 'Commentaire',
'maxlength' => '500'
'label' => 'Commentaire avec maximum '.$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentMaxlength']).' caractères',
'class' => 'editorWysiwygComment',
'noDirty' => true,
'maxlength' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'commentMaxlength'])
]); ?>
<div id="blogArticleContentAlarm"> </div>
<?php if($this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')): ?>
<div class="row">
<div class="col12">
@ -123,17 +140,11 @@
<div class="col12">
<?php foreach($module::$comments as $commentId => $comment): ?>
<div class="block">
<h4>
<?php if($comment['userId']): ?>
<?php echo $this->getData(['user', $comment['userId'], 'firstname']) . ' ' . $this->getData(['user', $comment['userId'], 'lastname']); ?>
<?php else: ?>
<?php echo $comment['author']; ?>
<?php endif; ?>
le <?php echo mb_detect_encoding(strftime('%d %B %Y - %H:%M', $comment['createdOn']), 'UTF-8', true)
<h4><?php echo $module::$commentsSignature[$commentId]; ?>
le <?php echo mb_detect_encoding(strftime('%d %B %Y - %H:%M', $comment['createdOn']), 'UTF-8', true)
? strftime('%d %B %Y - %H:%M', $comment['createdOn'])
: utf8_encode(strftime('%d %B %Y - %H:%M', $comment['createdOn']));
?>
</h4>
?>
<?php echo $comment['content']; ?>
</div>
<?php endforeach; ?>

View File

@ -10,12 +10,53 @@
* @link http://zwiicms.fr/
*/
/**
* Confirmation de suppression
*/
$(".blogCommentDelete").on("click", function() {
var _this = $(this);
return core.confirm("Êtes-vous sûr de vouloir supprimer ce commentaire ?", function() {
var nom = "<?php echo $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'title' ]); ?>";
return core.confirm("Supprimer le commentaire de l'article " + nom + " ?", function() {
$(location).attr("href", _this.attr("href"));
});
});
});
/**
* Confirmation d'approbation
*/
$(".blogCommentApproved").on("click", function() {
var _this = $(this);
var nom = "<?php echo $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'title' ]); ?>";
return core.confirm("Approuver le commentaire de l'article " + nom + " ?", function() {
$(location).attr("href", _this.attr("href"));
});
});
/**
* Confirmation de rejet
*/
$(".blogCommentRejected").on("click", function() {
var _this = $(this);
var nom = "<?php echo $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'title' ]); ?>";
return core.confirm("Rejeter le commentaire de l'article " + nom + " ?", function() {
$(location).attr("href", _this.attr("href"));
});
});
/**
* Confirmation de suppression en masse
*/
$(".blogCommentDeleteAll").on("click", function() {
var _this = $(this);
var nombre = "<?php echo count($this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'comment' ])); ?>";
var nom = "<?php echo $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'title' ]); ?>";
if( nombre === "1"){
var message = "Supprimer le commentaire de l'article " + nom + " ?";
} else{
var message = "Supprimer les " + nombre + " commentaires de l'article " + nom + " ?";
}
return core.confirm(message, function() {
$(location).attr("href", _this.attr("href"));
});
});

View File

@ -7,10 +7,16 @@
'value' => 'Retour'
]); ?>
</div>
</div>
<?php if($module::$comments): ?>
<?php echo template::table([3, 6, 2, 1], $module::$comments, ['Date', 'Contenu', 'Auteur', '']); ?>
<?php echo $module::$pages; ?>
<div class="col2 offset8">
<?php echo $module::$commentsDelete; ?>
</div>
</div>
<?php echo template::table([3, 5, 2, 1, 1], $module::$comments, ['Date', 'Contenu', 'Auteur', '', '']); ?>
<?php echo $module::$pages.'<br/>'; ?>
<?php else: ?>
</div>
<?php echo template::speech('Aucun commentaire.'); ?>
<?php endif; ?>
<?php endif; ?>

View File

@ -8,13 +8,7 @@
'value' => 'Retour'
]); ?>
</div>
<div class="col3 offset3">
<?php echo template::button('blogConfigComment', [
'href' => helper::baseUrl() . $this->getUrl(0) . '/comment',
'value' => 'Gérer les commentaires'
]); ?>
</div>
<div class="col2">
<div class="col2 offset6">
<?php echo template::button('blogConfigAdd', [
'href' => helper::baseUrl() . $this->getUrl(0) . '/add',
'ico' => 'plus',
@ -45,13 +39,14 @@
</div>
</div>
</div>
<?php if($module::$articles): ?>
<?php echo template::table([4, 4, 2, 1, 1], $module::$articles, ['Titre', 'Date de publication', 'État', '', '']); ?>
<?php echo $module::$pages; ?>
<?php else: ?>
<?php echo template::speech('Aucun article.'); ?>
<?php endif; ?>
<?php echo template::formClose(); ?>
<div class="moduleVersion">Version
<?php echo $module::BLOG_VERSION; ?>
</div>
<?php echo template::formClose(); ?>
<?php if($module::$articles): ?>
<?php echo template::table([4, 4, 1, 1, 1, 1], $module::$articles, ['Titre', 'Date de publication', 'État', 'Commentaires', '','']); ?>
<?php echo $module::$pages; ?>
<?php else: ?>
<?php echo template::speech('Aucun article.'); ?>
<?php endif; ?>
<div class="moduleVersion">Version
<?php echo $module::BLOG_VERSION; ?>
</div>

View File

@ -28,4 +28,39 @@ $("#blogEditMailNotification").on("change", function() {
$("#blogEditDraft").on("click", function() {
$("#blogEditState").val(0);
$("#blogEditForm").trigger("submit");
});
/**
* Options de commentaires
*/
$("#blogEditCommentClose").on("change", function() {
if ($(this).is(':checked') ) {
$(".commentOptionsWrapper").slideUp();
} else {
$(".commentOptionsWrapper").slideDown();
}
});
$("#blogEditCommentNotification").on("change", function() {
if ($(this).is(':checked') ) {
$("#blogEditCommentGroupNotification").slideDown();
} else {
$("#blogEditCommentGroupNotification").slideUp();
}
});
$( document).ready(function() {
if ($("#blogEditCloseComment").is(':checked') ) {
$(".commentOptionsWrapper").slideUp();
} else {
$(".commentOptionsWrapper").slideDown();
}
if ($("#blogEditCommentNotification").is(':checked') ) {
$("#blogEditCommentGroupNotification").slideDown();
} else {
$("#blogEditCommentGroupNotification").slideUp();
}
});

View File

@ -21,6 +21,7 @@
<?php echo template::submit('blogEditSubmit', [
'value' => 'Publier'
]); ?>
</div>
</div>
<div class="row">
@ -73,36 +74,74 @@
'value' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'content'])
]); ?>
<div class="row">
<div class="col6">
<div class="col12">
<div class="block">
<h4>Options de publication</h4>
<?php echo template::select('blogEditUserId', $module::$users, [
'label' => 'Auteur',
'selected' => $this->getUser('id')
]); ?>
<?php echo template::date('blogEditPublishedOn', [
'help' => 'L\'article n\'est visible qu\'après la date de publication prévue.',
'label' => 'Date de publication',
'value' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'publishedOn'])
]); ?>
</div>
</div>
<div class="col6">
<div class="block">
<h4>Options avancées</h4>
<?php echo template::checkbox('blogEditCloseComment', true, 'Fermer les commentaires', [
'checked' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'closeComment'])
]); ?>
<?php echo template::checkbox('blogEditMailNotification', true, 'Notifier le commentaire aux groupes à partir de :', [
'checked' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'mailNotification']),
'help' => 'Editeurs = éditeurs + administrateurs<br/> Membres = membres + éditeurs + administrateurs'
]); ?>
<?php echo template::select('blogEditGroupNotification', $module::$groupNews, [
'label' => '',
'selected' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'groupNotification'])
]); ?>
<div class="row">
<div class="col4">
<?php echo template::select('blogEditUserId', $module::$users, [
'label' => 'Auteur',
'selected' => $this->getUser('id'),
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN ? true : false
]); ?>
</div>
<div class="col4">
<?php echo template::date('blogEditPublishedOn', [
'help' => 'L\'article n\'est visible qu\'après la date de publication prévue.',
'label' => 'Date de publication',
'value' => time()
]); ?>
</div>
<div class="col4">
<?php echo template::select('blogEditConsent', $module::$articleConsent , [
'label' => 'Edition / Suppression',
'selected' => is_numeric($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'editConsent'])) ? $module::EDIT_GROUP : $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'editConsent']),
'help' => 'Les utilisateurs des groupes supérieurs accèdent à l\'article sans restriction'
]); ?>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>
<div class="row">
<div class="col12">
<div class="block">
<h4>Commentaires</h4>
<div class="row">
<div class="col4 ">
<?php echo template::checkbox('blogEditCommentClose', true, 'Fermer les commentaires', [
'checked' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentClose'])
]); ?>
</div>
<div class="col4 commentOptionsWrapper ">
<?php echo template::checkbox('blogEditCommentApproved', true, 'Approbation par un modérateur', [
'checked' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentApproved']),
''
]); ?>
</div>
<div class="col4 commentOptionsWrapper">
<?php echo template::select('blogEditCommentMaxlength', $module::$commentLength,[
'help' => 'Choix du nombre maximum de caractères pour chaque commentaire de l\'article, mise en forme html comprise.',
'label' => 'Caractères par commentaire',
'selected' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentMaxlength'])
]); ?>
</div>
</div>
<div class="row">
<div class="col3 commentOptionsWrapper offset2">
<?php echo template::checkbox('blogEditCommentNotification', true, 'Notification par email', [
'checked' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentNotification']),
]); ?>
</div>
<div class="col4 commentOptionsWrapper">
<?php echo template::select('blogEditCommentGroupNotification', $module::$groupNews, [
'selected' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentGroupNotification']),
'help' => 'Editeurs = éditeurs + administrateurs<br/> Membres = membres + éditeurs + administrateurs'
]); ?>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>

View File

@ -21,6 +21,7 @@
</a>
</div>
<div class="col9">
<article>
<h1 class="blogTitle">
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">
<?php echo $article['title']; ?>
@ -28,7 +29,9 @@
</h1>
<div class="blogComment">
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>#comment">
<?php echo count($article['comment']); ?>
<?php if ($article['comment']): ?>
<?php echo count($article['comment']); ?>
<?php endif; ?>
</a>
<?php echo template::ico('comment', 'left'); ?>
</div>
@ -42,6 +45,7 @@
<?php echo helper::subword(strip_tags($article['content']), 0, 400); ?>...
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">Lire la suite</a>
</p>
</article>
</div>
</div>
<?php endforeach; ?>

View File

@ -32,7 +32,7 @@ class form extends common {
public static $pagination;
const FORM_VERSION = '2.5';
const FORM_VERSION = '2.6';
// Objets
const TYPE_MAIL = 'mail';
@ -94,7 +94,7 @@ class form extends common {
$inputs = [];
foreach($this->getInput('formConfigPosition', null) as $index => $position) {
$inputs[] = [
'name' => $this->getInput('formConfigName[' . $index . ']'),
'name' => htmlspecialchars_decode($this->getInput('formConfigName[' . $index . ']'),ENT_QUOTES),
'position' => helper::filter($position, helper::FILTER_INT),
'required' => $this->getInput('formConfigRequired[' . $index . ']', helper::FILTER_BOOLEAN),
'type' => $this->getInput('formConfigType[' . $index . ']'),

View File

@ -45,7 +45,7 @@
<?php endforeach; ?>
<?php if($this->getData(['module', $this->getUrl(0), 'config', 'captcha'])): ?>
<div class="row">
<div class="col5">
<div class="col12 textAlignCenter">
<?php echo template::captcha('formCaptcha', [
'limit' => $this->getData(['config','captchaStrong'])
]); ?>

View File

@ -33,7 +33,7 @@ class news extends common {
false => 'Brouillon',
true => 'Publié'
];
const NEWS_VERSION = '1.3';
const NEWS_VERSION = '2.0';
public static $users = [];
@ -53,11 +53,11 @@ class news extends common {
$feeds = new \FeedWriter\RSS2();
// En-tête
$feeds->setTitle($this->getData (['page', $this->getUrl(0),'posts','title']));
$feeds->setTitle($this->getData (['page', $this->getUrl(0),'title']));
$feeds->setLink(helper::baseUrl() . $this->getUrl(0));
$feeds->setDescription(html_entity_decode(strip_tags($this->getData (['page', $this->getUrl(0), 'metaDescription']))));
$feeds->setDescription($this->getData (['page', $this->getUrl(0), 'metaDescription']));
$feeds->setChannelElement('language', 'fr-FR');
$feeds->setDate(time());
$feeds->setDate(date('r',time()));
$feeds->addGenerator();
// Corps des articles
$newsIdsPublishedOns = helper::arrayCollumn($this->getData(['module', $this->getUrl(0), 'posts']), 'publishedOn', 'SORT_DESC');
@ -67,11 +67,15 @@ class news extends common {
foreach($newsIdsPublishedOns as $newsId => $newsPublishedOn) {
if($newsPublishedOn <= time() AND $newsIdsStates[$newsId]) {
$newsArticle = $feeds->createNewItem();
$author = $this->signature($this->getData(['module', $this->getUrl(0), 'posts', $newsId, 'userId']));
$newsArticle->addElementArray([
'title' => strip_tags($this->getData(['module', $this->getUrl(0),'posts', $newsId, 'title']) ),
'link' => helper::baseUrl() . $this->getUrl(0),
'description' => html_entity_decode(strip_tags($this->getData(['module', $this->getUrl(0),'posts', $newsId, 'content'])))
'title' => $this->getData(['module', $this->getUrl(0),'posts', $newsId, 'title']),
'link' => helper::baseUrl() . $this->getUrl(0) . '/' . $newsId . '#' . $newsId,
'description' => $this->getData(['module', $this->getUrl(0),'posts', $newsId, 'content'])
]);
$newsArticle->setAuthor($author,'no@mail.com');
$newsArticle->setId(helper::baseUrl() .$this->getUrl(0) . '/' . $newsId . '#' . $newsId);
$newsArticle->setDate(date('r', $this->getData(['module', $this->getUrl(0), 'posts', $newsId, 'publishedOn'])));
$feeds->addItem($newsArticle);
}
}
@ -302,4 +306,26 @@ class news extends common {
'view' => 'index'
]);
}
/**
* Retourne la signature d'un utilisateur
*/
private function signature($userId) {
switch ($this->getData(['user', $userId, 'signature'])){
case 1:
return $userId;
break;
case 2:
return $this->getData(['user', $userId, 'pseudo']);
break;
case 3:
return $this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']);
break;
case 4:
return $this->getData(['user', $userId, 'lastname']) . ' ' . $this->getData(['user', $userId, 'firstname']);
break;
default:
return $this->getData(['user', $userId, 'firstname']);
}
}
}

View File

@ -2,7 +2,7 @@
<div class="row">
<div class="col12">
<?php foreach($module::$news as $newsId => $news): ?>
<h1 class="newsTitle">
<h1 class="newsTitle" id="<?php echo $newsId;?>">
<?php echo $news['title']; ?>
</h1>
<div class="newsContent">

View File

@ -1,14 +1,10 @@
<?php
class theme extends search {
public static $defaultData = [
'keywordColor' => 'rgba(229, 229, 1, 1)'
];
}
class data extends search {
class init extends search {
public static $defaultData = [
'previewLength' => 100,
'resultHideContent' => false,
'placeHolder' => 'Un ou plusieurs mots-clés séparés par un espace ou par +',
'submitText' => 'Rechercher'
'submitText' => 'Rechercher',
'keywordColor' => 'rgba(229, 229, 1, 1)'
];
}

View File

@ -1,11 +0,0 @@
.searchTitle {
font: caption;
font-style: italic;
margin-left: 1em;
}
.searchKeyword {
background: var(--keywordColor);
}
.searchResult {
margin: .3em 0 .3em 1em;
}

View File

@ -1,3 +0,0 @@
.searchKeyword {
--keywordColor: #keywordColor#;
}

View File

@ -38,37 +38,31 @@ class search extends common {
400 => '400 caractères',
];
// Message par défaut
public static $messagePlaceHolder = 'Un ou plusieurs mots-clés entre des espaces ou des guillemets';
public static $messageButtontext = 'Rechercher';
const SEARCH_VERSION = '1.1';
const SEARCH_VERSION = '1.2';
// Configuration vide
public function config() {
// Initialisation des données de thème de la galerie dasn theme.json
// Création des valeurs de réglage par défaut
if ( $this->getData(['module', $this->getUrl(0)]) === null ) {
require_once('module/search/ressource/defaultdata.php');
$this->setData(['module', $this->getUrl(0), init::$defaultData]);
}
if($this->isPost()) {
// Soumission du formulaire
$this->setData(['theme', 'search', [
'keywordColor' => $this->getInput('searchKeywordColor')
]]);
$this->setData(['module', $this->getUrl(0), [
'submitText' => $this->getInput('searchSubmitText'),
'placeHolder' => $this->getInput('searchPlaceHolder'),
'resultHideContent' => $this->getInput('searchResultHideContent',helper::FILTER_BOOLEAN),
'previewLength' => $this->getInput('searchPreviewLength',helper::FILTER_INT)
'previewLength' => $this->getInput('searchPreviewLength',helper::FILTER_INT),
'keywordColor' => $this->getInput('searchKeywordColor')
]]);
// Création des fichiers CSS
$content = file_get_contents('module/search/ressource/vartheme.css');
$themeCss = file_get_contents('module/search/ressource/theme.css');
// Injection des variables
$content = str_replace('#keywordColor#',$this->getinput('searchKeywordColor'),$content );
$success = file_put_contents('module/search/view/index/index.css',$content . $themeCss);
// Valeurs en sortie, affichage du formulaire
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(),
'notification' => $success !== FALSE ? 'Modifications enregistrées' : 'Modifications non enregistées !',
'notification' => $success !== FALSE ? 'Modifications enregistrées' : 'Modifications non enregistrées !',
'state' => $success !== FALSE
]);
@ -84,15 +78,11 @@ class search extends common {
}
public function index() {
// Création des valeurs de thème par défaut
if ( $this->getData(['theme', 'search']) === null ) {
require_once('module/search/ressource/defaultdata.php');
$this->setData(['theme', 'search', theme::$defaultData]);
}
// Création des valeurs de réglage par défaut
if ( $this->getData(['module', 'search']) === null ) {
if ( $this->getData(['module', $this->getUrl(0)]) === null ) {
require_once('module/search/ressource/defaultdata.php');
$this->setData(['module', $this->getUrl(0), data::$defaultData]);
$this->setData(['module', $this->getUrl(0), init::$defaultData]);
}
if($this->isPost()) {
@ -241,7 +231,7 @@ class search extends common {
// Découper l'aperçu
$t = substr($contenu, $d ,$this->getData(['module',$this->getUrl(0),'previewLength']));
// Applique une mise en évidence
$t = preg_replace($keywords, '<span class="searchKeyword">\1</span>',$t);
$t = preg_replace($keywords, '<span style="background:' . $this->getData(['module',$this->getUrl(0),'keywordColor']). ';">\1</span>',$t);
// Sauver résultat
$resultat .= '<p class="searchResult">'.$t.'...</p>';
$resultat .= '<p class="searchTitle">' . count($matches[0]) . (count($matches[0]) === 1 ? ' correspondance<p>' : ' correspondances<p>');

Some files were not shown because too many files have changed in this diff Show More