Les permissions des modules sont intégrées au code du module.

This commit is contained in:
Fred Tempez 2023-07-21 21:48:41 +02:00
parent 81448227f9
commit efa82f4a9c
40 changed files with 623 additions and 541 deletions

View File

@ -51,7 +51,7 @@ class common
const ACCESS_TIMER = 1800;
// Numéro de version
const ZWII_VERSION = '13.0.00';
const ZWII_VERSION = '13.0.00.1';
// URL autoupdate
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/';

View File

@ -546,103 +546,66 @@ class user extends common
$this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
$this->isPost()
) {
// Données du formulaire
$data = [
'name' => $this->getInput('profilEditName', helper::FILTER_STRING_SHORT, true),
'readonly' => false,
'comment' => $this->getInput('profilEditComment', helper::FILTER_STRING_SHORT, true),
'filemanager' => $this->getInput('profilEditFileManager', helper::FILTER_BOOLEAN),
'file' => [
'download' => $this->getInput('profilEditDownload', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilEditEdit', helper::FILTER_BOOLEAN),
'create' => $this->getInput('profilEditCreate', helper::FILTER_BOOLEAN),
'rename' => $this->getInput('profilEditRename', helper::FILTER_BOOLEAN),
'upload' => $this->getInput('profilEditUpload', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilEditDelete', helper::FILTER_BOOLEAN),
'preview' => $this->getInput('profilEditPreview', helper::FILTER_BOOLEAN),
'duplicate' => $this->getInput('profilEditDuplicate', helper::FILTER_BOOLEAN),
'extract' => $this->getInput('profilEditExtract', helper::FILTER_BOOLEAN),
'copycut' => $this->getInput('profilEditCopycut', helper::FILTER_BOOLEAN),
'chmod' => $this->getInput('profilEditChmod', helper::FILTER_BOOLEAN),
],
'folder' => [
'create' => $this->getInput('profilEditFolderCreate', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilEditFolderDelete', helper::FILTER_BOOLEAN),
'rename' => $this->getInput('profilEditFolderRename', helper::FILTER_BOOLEAN),
'copycut' => $this->getInput('profilEditFolderCopycut', helper::FILTER_BOOLEAN),
'chmod' => $this->getInput('profilEditFolderChmod', helper::FILTER_BOOLEAN),
'path' => $this->getInput('profilEditPath'),
],
'page' => [
'add' => $this->getInput('profilEditPageAdd', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilEditPageEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilEditPageDelete', helper::FILTER_BOOLEAN),
'duplicate' => $this->getInput('profilEditPageDuplicate', helper::FILTER_BOOLEAN),
'module' => $this->getInput('profilEditPageModule', helper::FILTER_BOOLEAN),
'cssEditor' => $this->getInput('profilEditPagecssEditor', helper::FILTER_BOOLEAN),
'jsEditor' => $this->getInput('profilEditPagejsEditor', helper::FILTER_BOOLEAN),
],
'user' => [
'edit' => $this->getInput('profilEditUserEdit', helper::FILTER_BOOLEAN),
]
];
// Données des modules
$dataModules = helper::getModules();
if (is_array($dataModules)) {
foreach ($dataModules as $moduleId => $moduleValue) {
if (file_exists('module/' . $moduleId . '/profil/main/edit.inc.php')) {
include('module/' . $moduleId . '/profil/main/edit.inc.php');
if (is_array($moduleData[$moduleId])) {
$data = array_merge($data, [$moduleId => $moduleData[$moduleId]]);
}
}
}
}
//Sauvegarder le données
$this->setData([
'profil',
$this->getInput('profilEditGroup', helper::FILTER_STRING_LONG, true),
$this->getInput('profilEditProfil', helper::FILTER_STRING_LONG, true),
[
'name' => $this->getInput('profilEditName', helper::FILTER_STRING_SHORT, true),
'readonly' => false,
'comment' => $this->getInput('profilEditComment', helper::FILTER_STRING_SHORT, true),
'filemanager' => $this->getInput('profilEditFileManager', helper::FILTER_BOOLEAN),
'file' => [
'download' => $this->getInput('profilEditDownload', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilEditEdit', helper::FILTER_BOOLEAN),
'create' => $this->getInput('profilEditCreate', helper::FILTER_BOOLEAN),
'rename' => $this->getInput('profilEditRename', helper::FILTER_BOOLEAN),
'upload' => $this->getInput('profilEditUpload', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilEditDelete', helper::FILTER_BOOLEAN),
'preview' => $this->getInput('profilEditPreview', helper::FILTER_BOOLEAN),
'duplicate' => $this->getInput('profilEditDuplicate', helper::FILTER_BOOLEAN),
'extract' => $this->getInput('profilEditExtract', helper::FILTER_BOOLEAN),
'copycut' => $this->getInput('profilEditCopycut', helper::FILTER_BOOLEAN),
'chmod' => $this->getInput('profilEditChmod', helper::FILTER_BOOLEAN),
],
'folder' => [
'create' => $this->getInput('profilEditFolderCreate', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilEditFolderDelete', helper::FILTER_BOOLEAN),
'rename' => $this->getInput('profilEditFolderRename', helper::FILTER_BOOLEAN),
'copycut' => $this->getInput('profilEditFolderCopycut', helper::FILTER_BOOLEAN),
'chmod' => $this->getInput('profilEditFolderChmod', helper::FILTER_BOOLEAN),
'path' => $this->getInput('profilEditPath'),
],
'page' => [
'add' => $this->getInput('profilEditPageAdd', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilEditPageEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilEditPageDelete', helper::FILTER_BOOLEAN),
'duplicate' => $this->getInput('profilEditPageDuplicate', helper::FILTER_BOOLEAN),
'module' => $this->getInput('profilEditPageModule', helper::FILTER_BOOLEAN),
'cssEditor' => $this->getInput('profilEditPagecssEditor', helper::FILTER_BOOLEAN),
'jsEditor' => $this->getInput('profilEditPagejsEditor', helper::FILTER_BOOLEAN),
],
'blog' => [
'add' => $this->getInput('profilEditBlogAdd', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilEditBlogEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilEditBlogDelete', helper::FILTER_BOOLEAN),
'option' => $this->getInput('profilEditBlogOption', helper::FILTER_BOOLEAN),
'comment' => $this->getInput('profilEditBlogComment', helper::FILTER_BOOLEAN),
'commentApprove' => $this->getInput('profilEditBlogCommentApprove', helper::FILTER_BOOLEAN),
'commentDelete' => $this->getInput('profilEditBlogCommentDelete', helper::FILTER_BOOLEAN),
'commentDeleteAll' => $this->getInput('profilEditBlogCommentDeleteAll', helper::FILTER_BOOLEAN),
'config' => $this->getInput('profilEditBlogAdd', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditBlogEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditBlogDelete', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditBlogOption', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditBlogComment', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditBlogCommentApprove', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditBlogCommentDelete', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditBlogCommentDeleteAll', helper::FILTER_BOOLEAN)
],
'news' => [
'add' => $this->getInput('profilEditNewsAdd', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilEditNewsEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilEditNewsDelete', helper::FILTER_BOOLEAN),
'option' => $this->getInput('profilEditNewsOption', helper::FILTER_BOOLEAN),
'config' => $this->getInput('profilEditNewsAdd', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditNewsEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditNewsEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditNewsOption', helper::FILTER_BOOLEAN)
],
'gallery' => [
'add' => $this->getInput('profilEditGalleryAdd', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilEditGalleryEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilEditGalleryDelete', helper::FILTER_BOOLEAN),
'option' => $this->getInput('profilEditGalleryOption', helper::FILTER_BOOLEAN),
'theme' => $this->getInput('profilEditGalleryTheme', helper::FILTER_BOOLEAN),
'config' => $this->getInput('profilEditGalleryAdd', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditGalleryEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditGalleryDelete', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditGalleryOption', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditGalleryTheme', helper::FILTER_BOOLEAN)
],
'form' => [
'config' => $this->getInput('profilEditFormConfig', helper::FILTER_BOOLEAN),
'option' => $this->getInput('profilEditFormOption', helper::FILTER_BOOLEAN),
'data' => $this->getInput('profilEditFormData', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilEditFormDelete', helper::FILTER_BOOLEAN),
'deleteAll' => $this->getInput('profilEditFormDeleteAll', helper::FILTER_BOOLEAN),
'export2csv' => $this->getInput('profilEditFormExport2csv', helper::FILTER_BOOLEAN),
],
'search' => [
'config' => $this->getInput('profilEditSearchConfig', helper::FILTER_BOOLEAN),
],
'redirection' => [
'config' => $this->getInput('profilEditRedirectionConfig', helper::FILTER_BOOLEAN),
],
'user' => [
'edit' => $this->getInput('profilEditUserEdit', helper::FILTER_BOOLEAN),
]
]
$data
]);
// Valeurs en sortie
@ -679,108 +642,67 @@ class user extends common
// Nombre de profils de ce groupe
$group = $this->getInput('profilAddGroup');
$profil = (string) (count($this->getData(['profil', $group])) + 1);
// Données du formulaire
$data = [
'name' => $this->getInput('profilAddName', helper::FILTER_STRING_SHORT, true),
'readonly' => false,
'comment' => $this->getInput('profilAddComment', helper::FILTER_STRING_SHORT, true),
'filemanager' => $this->getInput('profilAddFileManager', helper::FILTER_BOOLEAN),
'file' => [
'download' => $this->getInput('profilAddDownload', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilAddEdit', helper::FILTER_BOOLEAN),
'create' => $this->getInput('profilAddCreate', helper::FILTER_BOOLEAN),
'rename' => $this->getInput('profilAddRename', helper::FILTER_BOOLEAN),
'upload' => $this->getInput('profilAddUpload', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilAddDelete', helper::FILTER_BOOLEAN),
'preview' => $this->getInput('profilAddPreview', helper::FILTER_BOOLEAN),
'duplicate' => $this->getInput('profilAddDuplicate', helper::FILTER_BOOLEAN),
'extract' => $this->getInput('profilAddExtract', helper::FILTER_BOOLEAN),
'copycut' => $this->getInput('profilAddCopycut', helper::FILTER_BOOLEAN),
'chmod' => $this->getInput('profilAddChmod', helper::FILTER_BOOLEAN),
],
'folder' => [
'create' => $this->getInput('profilAddFolderCreate', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilAddFolderDelete', helper::FILTER_BOOLEAN),
'rename' => $this->getInput('profilAddFolderRename', helper::FILTER_BOOLEAN),
'copycut' => $this->getInput('profilAddFolderCopycut', helper::FILTER_BOOLEAN),
'chmod' => $this->getInput('profilAddFolderChmod', helper::FILTER_BOOLEAN),
'path' => $this->getInput('profilAddPath'),
],
'page' => [
'add' => $this->getInput('profilAddPageAdd', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilAddPageEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilAddPageDelete', helper::FILTER_BOOLEAN),
'duplicate' => $this->getInput('profilAddPageDuplicate', helper::FILTER_BOOLEAN),
'module' => $this->getInput('profilAddPageModule', helper::FILTER_BOOLEAN),
'cssEditor' => $this->getInput('profilAddPagecssEditor', helper::FILTER_BOOLEAN),
'jsEditor' => $this->getInput('profilAddPagejsEditor', helper::FILTER_BOOLEAN),
],
'user' => [
'edit' => $this->getInput('profilAddUserEdit', helper::FILTER_BOOLEAN),
]
];
// Données des modules
$dataModules = helper::getModules();
if (is_array($dataModules)) {
foreach ($dataModules as $moduleId => $moduleValue) {
if (file_exists('module/' . $moduleId . '/profil/main/add.inc.php')) {
include('module/' . $moduleId . '/profil/main/add.inc.php');
if (is_array($moduleData[$moduleId])) {
$data = array_merge($data, [$moduleId => $moduleData[$moduleId]]);
}
}
}
}
// Sauvegarder les données
$this->setData([
'profil',
$group,
$profil,
[
'name' => $this->getInput('profilAddName', helper::FILTER_STRING_SHORT, true),
'readonly' => false,
'comment' => $this->getInput('profilAddComment', helper::FILTER_STRING_SHORT, true),
'filemanager' => $this->getInput('profilAddFileManager', helper::FILTER_BOOLEAN),
'file' => [
'download' => $this->getInput('profilAddDownload', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilAddEdit', helper::FILTER_BOOLEAN),
'create' => $this->getInput('profilAddCreate', helper::FILTER_BOOLEAN),
'rename' => $this->getInput('profilAddRename', helper::FILTER_BOOLEAN),
'upload' => $this->getInput('profilAddUpload', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilAddDelete', helper::FILTER_BOOLEAN),
'preview' => $this->getInput('profilAddPreview', helper::FILTER_BOOLEAN),
'duplicate' => $this->getInput('profilAddDuplicate', helper::FILTER_BOOLEAN),
'extract' => $this->getInput('profilAddExtract', helper::FILTER_BOOLEAN),
'copycut' => $this->getInput('profilAddCopycut', helper::FILTER_BOOLEAN),
'chmod' => $this->getInput('profilAddChmod', helper::FILTER_BOOLEAN),
],
'folder' => [
'create' => $this->getInput('profilAddFolderCreate', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilAddFolderDelete', helper::FILTER_BOOLEAN),
'rename' => $this->getInput('profilAddFolderRename', helper::FILTER_BOOLEAN),
'copycut' => $this->getInput('profilAddFolderCopycut', helper::FILTER_BOOLEAN),
'chmod' => $this->getInput('profilAddFolderChmod', helper::FILTER_BOOLEAN),
'path' => $this->getInput('profilAddPath'),
],
'page' => [
'add' => $this->getInput('profilAddPageAdd', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilAddPageEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilAddPageDelete', helper::FILTER_BOOLEAN),
'duplicate' => $this->getInput('profilAddPageDuplicate', helper::FILTER_BOOLEAN),
'module' => $this->getInput('profilAddPageModule', helper::FILTER_BOOLEAN),
'cssEditor' => $this->getInput('profilAddPagecssEditor', helper::FILTER_BOOLEAN),
'jsEditor' => $this->getInput('profilAddPagejsEditor', helper::FILTER_BOOLEAN),
],
'blog' => [
'add' => $this->getInput('profilAddBlogAdd', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilAddBlogEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilAddBlogDelete', helper::FILTER_BOOLEAN),
'option' => $this->getInput('profilAddBlogOption', helper::FILTER_BOOLEAN),
'comment' => $this->getInput('profilAddBlogComment', helper::FILTER_BOOLEAN),
'commentApprove' => $this->getInput('profilAddBlogCommentApprove', helper::FILTER_BOOLEAN),
'commentDelete' => $this->getInput('profilAddBlogCommentDelete', helper::FILTER_BOOLEAN),
'commentDeleteAll' => $this->getInput('profilAddBlogCommentDeleteAll', helper::FILTER_BOOLEAN),
'config' => $this->getInput('profilAddBlogAdd', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddBlogEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddBlogDelete', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddBlogOption', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddBlogComment', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddBlogCommentApprove', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddBlogCommentDelete', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddBlogCommentDeleteAll', helper::FILTER_BOOLEAN)
],
'news' => [
'add' => $this->getInput('profilAddNewsAdd', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilAddNewsEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilAddNewsDelete', helper::FILTER_BOOLEAN),
'option' => $this->getInput('profilAddNewsOption', helper::FILTER_BOOLEAN),
'config' => $this->getInput('profilAddNewsAdd', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddNewsEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddNewsEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddNewsOption', helper::FILTER_BOOLEAN)
],
'gallery' => [
'add' => $this->getInput('profilAddGalleryAdd', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilAddGalleryEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilAddGalleryDelete', helper::FILTER_BOOLEAN),
'option' => $this->getInput('profilAddGalleryOption', helper::FILTER_BOOLEAN),
'theme' => $this->getInput('profilAddGalleryTheme', helper::FILTER_BOOLEAN),
'config' => $this->getInput('profilAddGalleryAdd', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddGalleryEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddGalleryDelete', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddGalleryOption', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddGalleryTheme', helper::FILTER_BOOLEAN)
],
'form' => [
'option' => $this->getInput('profilAddFormOption', helper::FILTER_BOOLEAN),
'data' => $this->getInput('profilAddFormData', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilAddFormDelete', helper::FILTER_BOOLEAN),
'deleteAll' => $this->getInput('profilAddFormDeleteAll', helper::FILTER_BOOLEAN),
'export2csv' => $this->getInput('profilAddFormExport2csv', helper::FILTER_BOOLEAN),
'config' => $this->getInput('profilAddFormOption', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddFormData', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddFormDelete', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddFormDeleteAll', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddFormExport2csv', helper::FILTER_BOOLEAN)
],
'search' => [
'config' => $this->getInput('profilAddSearchConfig', helper::FILTER_BOOLEAN),
],
'redirection' => [
'config' => $this->getInput('profilAddRedirectionConfig', helper::FILTER_BOOLEAN),
],
'user' => [
'edit' => $this->getInput('profilAddUserEdit', helper::FILTER_BOOLEAN),
]
]
$data
]);
// Valeurs en sortie
$this->addOutput([

View File

@ -79,155 +79,24 @@
</div>
</div>
<div class="containerModule">
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Permissions sur le module') . ' ' . helper::translate('Blog'); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilAddBlogAdd', true, 'Ajouter'); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilAddBlogEdit', true, 'Edit'); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilAddBlogDelete', true, 'Effacer'); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilAddBlogOption', true, 'Options'); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilAddBlogComment', true, 'Commentaire'); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilAddBlogCommentApprove', true, 'Approuver les commentaires'); ?>
</div>
</div>
<div class="row">
<div class="col6" s>
<?php echo template::checkbox('profilAddBlogCommentDelete', true, 'Effacer les commentaires'); ?>
</div>
<div class="col6">
<?php echo template::checkbox('profilAddBlogCommentDeleteAll', true, 'Nettoyer les commentaires'); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Permissions sur le module') . ' ' . helper::translate('News'); ?>
</h4>
<div class="row">
<div class="col3">
<?php echo template::checkbox('profilAddNewsAdd', true, 'Ajouter'); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilAddNewsEdit', true, 'Éditer'); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilAddNewsDelete', true, 'Effacer'); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilAddNewsOption', true, 'Options'); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Permissions sur le module') . ' ' . helper::translate('Galerie'); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilAddGalleryAdd', true, 'Ajouter'); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilAddGalleryEdit', true, 'Éditer'); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilAddGalleryDelete', true, 'Effacer'); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('profilAddGalleryOption', true, 'Options'); ?>
</div>
<div class="col6">
<?php echo template::checkbox('profilAddGalleryTheme', true, 'Thème'); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Permissions sur le module') . ' ' . helper::translate('Formulaire'); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilAddFormOption', true, 'Options'); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilAddFormData', true, 'Gérer les données'); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilAddFormExport2csv', true, 'Export CSV'); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilAddFormDelete', true, 'Effacer'); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilAddFormDeleteAll', true, 'Tout Effacer'); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Permissions sur le module') . ' ' . helper::translate('Redirection'); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilEditRedirectionConfig', true, 'Configurer'); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Permissions sur le module') . ' ' . helper::translate('Recherche'); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilEditSearchConfig', true, 'Configurer'); ?>
</div>
</div>
</div>
</div>
</div>
<?php if (file_exists('module/blog/profil/view/add.inc.php')) {
include('module/blog/profil/view/add.inc.php');
} ?>
<?php if (file_exists('module/news/profil/view/add.inc.php')) {
include('module/news/profil/view/add.inc.php');
} ?>
<?php if (file_exists('module/gallery/profil/view/add.inc.php')) {
include('module/gallery/profil/view/add.inc.php');
} ?>
<?php if (file_exists('module/form/profil/view/add.inc.php')) {
include('module/form/profil/view/add.inc.php');
} ?>
<?php if (file_exists('module/redirection/profil/view/add.inc.php')) {
include('module/redirection/profil/view/add.inc.php');
} ?>
<?php if (file_exists('module/search/profil/view/add.inc.php')) {
include('module/search/profil/view/add.inc.php');
} ?>
</div>
<div class="row">
<div class="col12">

View File

@ -101,201 +101,24 @@
</div>
</div>
<div class="containerModule">
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Permissions sur le module') . ' ' . helper::translate('Blog'); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilEditBlogAdd', true, 'Ajouter', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'blog', 'add'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilEditBlogEdit', true, 'Éditer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'blog', 'edit'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilEditBlogDelete', true, 'Effacer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'blog', 'delete'])
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilEditBlogOption', true, 'Options', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'blog', 'option'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilEditBlogComment', true, 'Gérer les commentaires', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'blog', 'comment'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilEditBlogCommentApprove', true, 'Approuver les commentaires', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'blog', 'commentApprove'])
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('profilEditBlogCommentDelete', true, 'Effacer les commentaires', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'blog', 'commentDelete'])
]); ?>
</div>
<div class="col6">
<?php echo template::checkbox('profilEditBlogCommentDeleteAll', true, 'Nettoyer les commentaires', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'blog', 'commentDeleteAll'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Permissions sur le module') . ' ' . helper::translate('News'); ?>
</h4>
<div class="row">
<div class="col3">
<?php echo template::checkbox('profilEditNewsAdd', true, 'Ajouter', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'news', 'add'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilEditNewsEdit', true, 'Éditer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'news', 'edit'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilEditNewsDelete', true, 'Effacer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'news', 'delete'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilEditNewsOption', true, 'Options', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'news', 'option'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Permissions sur le module') . ' ' . helper::translate('Galerie'); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilEditGalleryAdd', true, 'Ajouter', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'add'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilEditGalleryEdit', true, 'Éditer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'edit'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilEditGalleryDelete', true, 'Effacer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'delete'])
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('profilEditGalleryOption', true, 'Options', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'option'])
]); ?>
</div>
<div class="col6">
<?php echo template::checkbox('profilEditGalleryTheme', true, 'Thème', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'theme'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Permissions sur le module') . ' ' . helper::translate('Formulaire'); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilEditFormOption', true, 'Options', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'form', 'option'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilEditFormData', true, 'Gérer les données', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'form', 'data'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilEditFormExport2csv', true, 'Export CSV', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'form', 'export2csv'])
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('profilEditFormDelete', true, 'Effacer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'form', 'delete'])
]); ?>
</div>
<div class="col6">
<?php echo template::checkbox('profilEditFormDeleteAll', true, 'Tout Effacer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'form', 'deleteAll'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Permissions sur le module') . ' ' . helper::translate('Redirection'); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilEditRedirectionConfig', true, 'Configurer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'redirection', 'config'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Permissions sur le module') . ' ' . helper::translate('Recherche'); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilEditSearchConfig', true, 'Configurer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'search', 'config'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<?php if (file_exists('module/blog/profil/view/edit.inc.php')) {
include('module/blog/profil/view/edit.inc.php');
} ?>
<?php if (file_exists('module/news/profil/view/edit.inc.php')) {
include('module/news/profil/view/edit.inc.php');
} ?>
<?php if (file_exists('module/gallery/profil/view/edit.inc.php')) {
include('module/gallery/profil/view/edit.inc.php');
} ?>
<?php if (file_exists('module/form/profil/view/edit.inc.php')) {
include('module/form/profil/view/edit.inc.php');
} ?>
<?php if (file_exists('module/redirection/profil/view/edit.inc.php')) {
include('module/redirection/profil/view/edit.inc.php');
} ?>
<?php if (file_exists('module/search/profil/view/edit.inc.php')) {
include('module/search/profil/view/edit.inc.php');
} ?>
</div>
<?php endif; ?>
<div class="row">

View File

@ -16,7 +16,7 @@
class blog extends common
{
const VERSION = '6.9';
const VERSION = '7.0';
const REALNAME = 'Blog';
const DELETE = true;
const UPDATE = '0.0';

View File

@ -1,3 +1,5 @@
# Version 7.0
- Gestion des permissions intégrée dans le module
# version 6.9
- Bloque l'effacement de l'article selon le profil
# version 6.8

View File

@ -0,0 +1,18 @@
<?php $moduleData['blog'] = [
'add' => $this->getInput('profilAddBlogAdd', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilAddBlogEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilAddBlogDelete', helper::FILTER_BOOLEAN),
'option' => $this->getInput('profilAddBlogOption', helper::FILTER_BOOLEAN),
'comment' => $this->getInput('profilAddBlogComment', helper::FILTER_BOOLEAN),
'commentApprove' => $this->getInput('profilAddBlogCommentApprove', helper::FILTER_BOOLEAN),
'commentDelete' => $this->getInput('profilAddBlogCommentDelete', helper::FILTER_BOOLEAN),
'commentDeleteAll' => $this->getInput('profilAddBlogCommentDeleteAll', helper::FILTER_BOOLEAN),
'config' => $this->getInput('profilAddBlogAdd', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddBlogEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddBlogDelete', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddBlogOption', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddBlogComment', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddBlogCommentApprove', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddBlogCommentDelete', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddBlogCommentDeleteAll', helper::FILTER_BOOLEAN)
];

View File

@ -0,0 +1,18 @@
<?php $moduleData['blog'] = [
'add' => $this->getInput('profilEditBlogAdd', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilEditBlogEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilEditBlogDelete', helper::FILTER_BOOLEAN),
'option' => $this->getInput('profilEditBlogOption', helper::FILTER_BOOLEAN),
'comment' => $this->getInput('profilEditBlogComment', helper::FILTER_BOOLEAN),
'commentApprove' => $this->getInput('profilEditBlogCommentApprove', helper::FILTER_BOOLEAN),
'commentDelete' => $this->getInput('profilEditBlogCommentDelete', helper::FILTER_BOOLEAN),
'commentDeleteAll' => $this->getInput('profilEditBlogCommentDeleteAll', helper::FILTER_BOOLEAN),
'config' => $this->getInput('profilEditBlogAdd', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditBlogEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditBlogDelete', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditBlogOption', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditBlogComment', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditBlogCommentApprove', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditBlogCommentDelete', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditBlogCommentDeleteAll', helper::FILTER_BOOLEAN)
];

View File

@ -0,0 +1,40 @@
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Blog'); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilAddBlogAdd', true, 'Ajouter'); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilAddBlogEdit', true, 'Edit'); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilAddBlogDelete', true, 'Supprimer'); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilAddBlogOption', true, 'Options'); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilAddBlogComment', true, 'Commentaire'); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilAddBlogCommentApprove', true, 'Approuver les commentaires'); ?>
</div>
</div>
<div class="row">
<div class="col6" s>
<?php echo template::checkbox('profilAddBlogCommentDelete', true, 'Supprimer les commentaires'); ?>
</div>
<div class="col6">
<?php echo template::checkbox('profilAddBlogCommentDeleteAll', true, 'Nettoyer les commentaires'); ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,55 @@
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Blog'); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilEditBlogAdd', true, 'Ajouter', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'blog', 'add'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilEditBlogEdit', true, 'Éditer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'blog', 'edit'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilEditBlogDelete', true, 'Supprimer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'blog', 'delete'])
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilEditBlogOption', true, 'Options', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'blog', 'option'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilEditBlogComment', true, 'Gérer les commentaires', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'blog', 'comment'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilEditBlogCommentApprove', true, 'Approuver les commentaires', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'blog', 'commentApprove'])
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('profilEditBlogCommentDelete', true, 'Supprimer les commentaires', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'blog', 'commentDelete'])
]); ?>
</div>
<div class="col6">
<?php echo template::checkbox('profilEditBlogCommentDeleteAll', true, 'Nettoyer les commentaires', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'blog', 'commentDeleteAll'])
]); ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,3 +1,5 @@
# Version 4.0
- Gestion des permissions intégrée dans le module
# Version 3.10
- Bloque l'effacement selon le profil
- Masque le code de vérification

View File

@ -17,7 +17,7 @@
class form extends common
{
const VERSION = '3.10';
const VERSION = '4.0';
const REALNAME = 'Formulaire';
const DATADIRECTORY = ''; // Contenu localisé inclus par défaut (page.json et module.json)

View File

@ -0,0 +1,12 @@
<?php $moduleData['form'] = [
'option' => $this->getInput('profilAddFormOption', helper::FILTER_BOOLEAN),
'data' => $this->getInput('profilAddFormData', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilAddFormDelete', helper::FILTER_BOOLEAN),
'deleteAll' => $this->getInput('profilAddFormDeleteAll', helper::FILTER_BOOLEAN),
'export2csv' => $this->getInput('profilAddFormExport2csv', helper::FILTER_BOOLEAN),
'config' => $this->getInput('profilAddFormOption', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddFormData', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddFormDelete', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddFormDeleteAll', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddFormExport2csv', helper::FILTER_BOOLEAN)
];

View File

@ -0,0 +1,8 @@
<?php $moduleData['form'] = [
'config' => $this->getInput('profilEditFormConfig', helper::FILTER_BOOLEAN),
'option' => $this->getInput('profilEditFormOption', helper::FILTER_BOOLEAN),
'data' => $this->getInput('profilEditFormData', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilEditFormDelete', helper::FILTER_BOOLEAN),
'deleteAll' => $this->getInput('profilEditFormDeleteAll', helper::FILTER_BOOLEAN),
'export2csv' => $this->getInput('profilEditFormExport2csv', helper::FILTER_BOOLEAN),
];

View File

@ -0,0 +1,29 @@
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Formulaire'); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilAddFormOption', true, 'Options'); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilAddFormData', true, 'Gérer les données'); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilAddFormExport2csv', true, 'Export CSV'); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilAddFormDelete', true, 'Supprimer'); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilAddFormDeleteAll', true, 'Tout Supprimer'); ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,38 @@
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Formulaire'); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilEditFormOption', true, 'Options', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'form', 'option'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilEditFormData', true, 'Gérer les données', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'form', 'data'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilEditFormExport2csv', true, 'Export CSV', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'form', 'export2csv'])
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('profilEditFormDelete', true, 'Supprimer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'form', 'delete'])
]); ?>
</div>
<div class="col6">
<?php echo template::checkbox('profilEditFormDeleteAll', true, 'Tout Supprimer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'form', 'deleteAll'])
]); ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,3 +1,5 @@
# Version 4.0
- Gestion des permissions intégrée dans le module
# Version 3.9
- Bloque l'effacement de la galerie selon le profil
- Masque le code de vérification

View File

@ -18,7 +18,7 @@ class gallery extends common
{
const VERSION = '3.9';
const VERSION = '4.0';
const REALNAME = 'Galerie';
const DATADIRECTORY = self::DATA_DIR . 'gallery/';

View File

@ -0,0 +1,12 @@
<?php $moduleData['gallery'] = [
'add' => $this->getInput('profilAddGalleryAdd', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilAddGalleryEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilAddGalleryDelete', helper::FILTER_BOOLEAN),
'option' => $this->getInput('profilAddGalleryOption', helper::FILTER_BOOLEAN),
'theme' => $this->getInput('profilAddGalleryTheme', helper::FILTER_BOOLEAN),
'config' => $this->getInput('profilAddGalleryAdd', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddGalleryEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddGalleryDelete', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddGalleryOption', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddGalleryTheme', helper::FILTER_BOOLEAN)
];

View File

@ -0,0 +1,12 @@
<?php $moduleData['gallery'] = [
'add' => $this->getInput('profilEditGalleryAdd', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilEditGalleryEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilEditGalleryDelete', helper::FILTER_BOOLEAN),
'option' => $this->getInput('profilEditGalleryOption', helper::FILTER_BOOLEAN),
'theme' => $this->getInput('profilEditGalleryTheme', helper::FILTER_BOOLEAN),
'config' => $this->getInput('profilEditGalleryAdd', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditGalleryEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditGalleryDelete', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditGalleryOption', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditGalleryTheme', helper::FILTER_BOOLEAN)
];

View File

@ -0,0 +1,28 @@
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Galerie'); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilAddGalleryAdd', true, 'Ajouter'); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilAddGalleryEdit', true, 'Éditer'); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilAddGalleryDelete', true, 'Supprimer'); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('profilAddGalleryOption', true, 'Options'); ?>
</div>
<div class="col6">
<?php echo template::checkbox('profilAddGalleryTheme', true, 'Thème'); ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,38 @@
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Galerie'); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilEditGalleryAdd', true, 'Ajouter', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'add'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilEditGalleryEdit', true, 'Éditer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'edit'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilEditGalleryDelete', true, 'Supprimer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'delete'])
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('profilEditGalleryOption', true, 'Options', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'option'])
]); ?>
</div>
<div class="col6">
<?php echo template::checkbox('profilEditGalleryTheme', true, 'Thème', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'theme'])
]); ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,3 +1,5 @@
# Version 5.0
- Gestion des permissions intégrée dans le module
# Version 4.5
- Bloque l'effacement de l'article selon le profil
- Masque le code de vérification

View File

@ -16,7 +16,7 @@
class news extends common
{
const VERSION = '4.4';
const VERSION = '5.0';
const REALNAME = 'News';
const DATADIRECTORY = self::DATA_DIR . 'news/';

View File

@ -0,0 +1,10 @@
<?php $moduleData['news'] = [
'add' => $this->getInput('profilAddNewsAdd', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilAddNewsEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilAddNewsDelete', helper::FILTER_BOOLEAN),
'option' => $this->getInput('profilAddNewsOption', helper::FILTER_BOOLEAN),
'config' => $this->getInput('profilAddNewsAdd', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddNewsEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddNewsEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddNewsOption', helper::FILTER_BOOLEAN)
];

View File

@ -0,0 +1,10 @@
<?php $moduleData['news'] = [
'add' => $this->getInput('profilEditNewsAdd', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilEditNewsEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilEditNewsDelete', helper::FILTER_BOOLEAN),
'option' => $this->getInput('profilEditNewsOption', helper::FILTER_BOOLEAN),
'config' => $this->getInput('profilEditNewsAdd', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditNewsEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditNewsEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditNewsOption', helper::FILTER_BOOLEAN)
];

View File

@ -0,0 +1,24 @@
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('News'); ?>
</h4>
<div class="row">
<div class="col3">
<?php echo template::checkbox('profilAddNewsAdd', true, 'Ajouter'); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilAddNewsEdit', true, 'Éditer'); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilAddNewsDelete', true, 'Supprimer'); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilAddNewsOption', true, 'Options'); ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,32 @@
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('News'); ?>
</h4>
<div class="row">
<div class="col3">
<?php echo template::checkbox('profilEditNewsAdd', true, 'Ajouter', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'news', 'add'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilEditNewsEdit', true, 'Éditer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'news', 'edit'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilEditNewsDelete', true, 'Supprimer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'news', 'delete'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilEditNewsOption', true, 'Options', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'news', 'option'])
]); ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,2 +1,4 @@
# Version 2.0
- Gestion des permissions intégrée dans le module
# Version 1.6
- Multilinguisme

View File

@ -0,0 +1,3 @@
<?php $moduleData['redirection'] = [
'config' => $this->getInput('profilAddRedirectionConfig', helper::FILTER_BOOLEAN),
];

View File

@ -0,0 +1,3 @@
<?php $moduleData['redirection'] = [
'config' => $this->getInput('profilEditRedirectionConfig', helper::FILTER_BOOLEAN),
];

View File

@ -0,0 +1,14 @@
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Redirection'); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilEditRedirectionConfig', true, 'Configurer'); ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,16 @@
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Redirection'); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilEditRedirectionConfig', true, 'Configurer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'redirection', 'config'])
]); ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -16,7 +16,7 @@
class redirection extends common
{
const VERSION = '1.6';
const VERSION = '2.0';
const REALNAME = 'Redirection';
const DATADIRECTORY = ''; // Contenu localisé inclus par défaut (page.json et module.json)

View File

@ -1,3 +1,5 @@
# Version 3.0
- Gestion des permissions intégrée dans le module
# Version 2.8
- Multilingue
# Version 2.71

View File

@ -0,0 +1,3 @@
<?php $moduleData['search'] = [
'config' => $this->getInput('profilAddSearchConfig', helper::FILTER_BOOLEAN),
];

View File

@ -0,0 +1,3 @@
<?php $moduleData['search'] = [
'config' => $this->getInput('profilEditSearchConfig', helper::FILTER_BOOLEAN),
];

View File

@ -0,0 +1,14 @@
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Recherche'); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilEditSearchConfig', true, 'Configurer'); ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,16 @@
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Recherche'); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilEditSearchConfig', true, 'Configurer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'search', 'config'])
]); ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -20,7 +20,7 @@
class search extends common
{
const VERSION = '2.8';
const VERSION = '3.0';
const REALNAME = 'Recherche';
const DATADIRECTORY = self::DATA_DIR . 'search/';