Permissions du groupe sur RFM

This commit is contained in:
Fred Tempez 2023-03-17 15:55:15 +01:00
parent abcf4c3a70
commit 3da3bf63fc
4 changed files with 363 additions and 324 deletions

View File

@ -335,32 +335,93 @@ class init extends common
'blacklist' => [], 'blacklist' => [],
'language'=> [], 'language'=> [],
'group' => [ 'group' => [
"-1" => [ '-1' => [
'name' => 'Banni', 'name' => 'Banni',
'readonly' => true, 'readonly' => true,
'comment' => 'Accès désactivé' 'comment' => 'Accès désactivé'
], ],
"0" => [ '0' => [
'name' => 'Visiteur', 'name' => 'Visiteur',
'readonly' => true, 'readonly' => true,
'comment' => 'Accède au site' 'comment' => 'Accède au site'
], ],
"1" => [ '1' => [
'name' => 'Membre', 'name' => 'Membre',
'readonly' => true, 'readonly' => true,
'comment' => 'Accède aux pages réservées' 'comment' => 'Accède aux pages réservées et à un dossier partagé',
'path' => '/site/file/source/partage/',
'file' => [
'download' => false,
'edit' => false,
'create' => false,
'rename' => false,
'upload' => false,
'delete' => false,
'preview' => false,
'duplicate' => false,
'extract' => false,
'copycut' => false,
'permission' => false
],
'folder' => [
'create' => false,
'delete' => false,
'rename' => false,
'copycut' => false,
'permission' => false
]
], ],
"2" => [ '2' => [
'name' => 'Editeur', 'name' => 'Editeur',
'readonly' => false, 'readonly' => false,
'comment' => 'Edition des pages', 'comment' => 'Edition des pages',
'file' => [], 'path' => '/site/file/source/',
'folder' => [] 'file' => [
'download' => true,
'edit' => true,
'create' => true,
'rename' => true,
'upload' => true,
'delete' => false,
'preview' => true,
'duplicate' => false,
'extract' => false,
'copycut' => false,
'permission' => false
],
'folder' => [
'create' => true,
'delete' => true,
'rename' => true,
'copycut' => false,
'permission' => false
]
], ],
"99" => [ '99' => [
'name' => 'Administrateur', 'name' => 'Administrateur',
'readonly' => true, 'readonly' => true,
'comment' => 'Contrôle total' 'comment' => 'Contrôle total',
'path' => '/site/file/source/',
'file' => [
'download' => true,
'edit' => true,
'create' => true,
'rename' => true,
'upload' => true,
'delete' => true,
'preview' => true,
'duplicate' => true,
'extract' => true,
'copycut' => true,
'permission' => true
],
'folder' => [
'create' => true,
'delete' => true,
'rename' => true,
'copycut' => true,
'permission' => false
]
] ]
], ],
]; ];
@ -884,7 +945,6 @@ class init extends common
'picturePosition' => 'left', 'picturePosition' => 'left',
'hidePicture' => false, 'hidePicture' => false,
'pictureSize' => 20, 'pictureSize' => 20,
'picturePosition' => 'left',
'publishedOn' => 1548790902, 'publishedOn' => 1548790902,
'state' => true, 'state' => true,
'title' => 'Mon premier article', 'title' => 'Mon premier article',
@ -904,7 +964,6 @@ class init extends common
'hidePicture' => false, 'hidePicture' => false,
'picturePosition' => 'right', 'picturePosition' => 'right',
'pictureSize' => 40, 'pictureSize' => 40,
'picturePosition' => 'right',
'publishedOn' => 1550432502, 'publishedOn' => 1550432502,
'state' => true, 'state' => true,
'title' => 'Mon deuxième article', 'title' => 'Mon deuxième article',
@ -924,7 +983,6 @@ class init extends common
'hidePicture' => false, 'hidePicture' => false,
'picturePosition' => 'left', 'picturePosition' => 'left',
'pictureSize' => 100, 'pictureSize' => 100,
'picturePosition' => 'left',
'publishedOn' => 1550864502, 'publishedOn' => 1550864502,
'state' => true, 'state' => true,
'title' => 'Mon troisième article', 'title' => 'Mon troisième article',

View File

@ -457,35 +457,41 @@ class user extends common
// Soumission du formulaire // Soumission du formulaire
if ($this->isPost()) { if ($this->isPost()) {
$group = $this->getUrl(2); $group = $this->getUrl(2);
var_dump( $group ); $this->setData([
die(); 'group',
$this->setData(['group', $group,
$group, [ [
'name'=> $this->getData(['group', $group, 'name']), 'name' => $this->getData(['group', $group, 'name']),
'readonly' => $this->getData(['group', $group, 'readonly']), 'readonly' => $this->getData(['group', $group, 'readonly']),
'comment'=> $this->getData(['group', $group, 'comment']), 'comment' => $this->getData(['group', $group, 'comment']),
'file' => [ 'file' => [
'download' => $this->getInput('groupEditDownload', helper::FILTER_BOOLEAN), 'download' => $this->getInput('groupEditDownload', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('groupEditEdit', helper::FILTER_BOOLEAN), 'edit' => $this->getInput('groupEditEdit', helper::FILTER_BOOLEAN),
'create' => $this->getInput('groupEditCreate', helper::FILTER_BOOLEAN), 'create' => $this->getInput('groupEditCreate', helper::FILTER_BOOLEAN),
'rename' => $this->getInput('groupEditRename', helper::FILTER_BOOLEAN), 'rename' => $this->getInput('groupEditRename', helper::FILTER_BOOLEAN),
'upload' => $this->getInput('groupEditUpload', helper::FILTER_BOOLEAN), 'upload' => $this->getInput('groupEditUpload', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('groupEditDelete', helper::FILTER_BOOLEAN), 'delete' => $this->getInput('groupEditDelete', helper::FILTER_BOOLEAN),
'preview' => $this->getInput('groupEditPreview', helper::FILTER_BOOLEAN), 'preview' => $this->getInput('groupEditPreview', helper::FILTER_BOOLEAN),
'duplicate' => $this->getInput('groupEditDuplicate', helper::FILTER_BOOLEAN), 'duplicate' => $this->getInput('groupEditDuplicate', helper::FILTER_BOOLEAN),
'extract' => $this->getInput('groupEditExtract', helper::FILTER_BOOLEAN), 'extract' => $this->getInput('groupEditExtract', helper::FILTER_BOOLEAN),
'copycut' => $this->getInput('groupEditCopycut', helper::FILTER_BOOLEAN), 'copycut' => $this->getInput('groupEditCopycut', helper::FILTER_BOOLEAN),
'permission' => $this->getInput('groupEditPermission', helper::FILTER_BOOLEAN), 'permission' => $this->getInput('groupEditPermission', helper::FILTER_BOOLEAN),
], ],
'folder' => [ 'folder' => [
'create' => $this->getInput('groupEditFolderCreate', helper::FILTER_BOOLEAN), 'create' => $this->getInput('groupEditFolderCreate', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('groupEditFolderDelete', helper::FILTER_BOOLEAN), 'delete' => $this->getInput('groupEditFolderDelete', helper::FILTER_BOOLEAN),
'rename' => $this->getInput('groupEditFolderRename', helper::FILTER_BOOLEAN), 'rename' => $this->getInput('groupEditFolderRename', helper::FILTER_BOOLEAN),
'copycut' => $this->getInput('groupEditFolderCopycut', helper::FILTER_BOOLEAN), 'copycut' => $this->getInput('groupEditFolderCopycut', helper::FILTER_BOOLEAN),
'permission' => $this->getInput('groupEditFolderPermission', helper::FILTER_BOOLEAN), 'permission' => $this->getInput('groupEditFolderPermission', helper::FILTER_BOOLEAN),
] ]
] ]
]); ]);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'user/group',
'notification' => helper::translate('Modifications enregistrées'),
'state' => true
]);
} }
// Valeurs en sortie // Valeurs en sortie

View File

@ -94,27 +94,27 @@
<div class="row"> <div class="row">
<div class="col2"> <div class="col2">
<?php echo template::checkbox('groupEditFolderCreate', true, 'Création', [ <?php echo template::checkbox('groupEditFolderCreate', true, 'Création', [
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'create']) 'checked' => $this->getData(['group', $this->getUrl(2), 'folder', 'create'])
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::checkbox('groupEditFolderDelete', true, 'Effacement', [ <?php echo template::checkbox('groupEditFolderDelete', true, 'Effacement', [
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'delete']) 'checked' => $this->getData(['group', $this->getUrl(2), 'folder', 'delete'])
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::checkbox('groupEditFolderRename', true, 'Nommage', [ <?php echo template::checkbox('groupEditFolderRename', true, 'Nommage', [
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'rename']) 'checked' => $this->getData(['group', $this->getUrl(2), 'folder', 'rename'])
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::checkbox('groupEditFolderCopycut', true, 'Coupé collé', [ <?php echo template::checkbox('groupEditFolderCopycut', true, 'Coupé collé', [
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'copycut']) 'checked' => $this->getData(['group', $this->getUrl(2), 'folder', 'copycut'])
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="col2">
<?php echo template::checkbox('groupEditFolderPermission', true, 'Permissions', [ <?php echo template::checkbox('groupEditFolderPermission', true, 'Permissions', [
'checked' => $this->getData(['group', $this->getUrl(2), 'file', 'permission']) 'checked' => $this->getData(['group', $this->getUrl(2), 'folder', 'permission'])
]); ?> ]); ?>
</div> </div>
</div> </div>

View File

@ -1,6 +1,7 @@
<?php <?php
$version = "9.14.0"; $version = "9.14.0";
if (session_id() == '') session_start(); if (session_id() == '')
session_start();
mb_internal_encoding('UTF-8'); mb_internal_encoding('UTF-8');
mb_http_output(); mb_http_output();
@ -18,72 +19,17 @@ setlocale(LC_CTYPE, $lang);
/* Lecture du groupe de l'utilisateur connecté pour attribuer les droits et les dossiers */ /* Lecture du groupe de l'utilisateur connecté pour attribuer les droits et les dossiers */
$userId = $_COOKIE['ZWII_USER_ID']; $userId = $_COOKIE['ZWII_USER_ID'];
$tab = json_decode(file_get_contents('../../../site/data/user.json'), true); $u = json_decode(file_get_contents('../../../site/data/user.json'), true);
$group = $tab['user'][$userId]['group']; $g = json_decode(file_get_contents('../../../site/data/group.json'), true);
$uploadDir = '/site/file/source/'; $group = $u['user'][$userId]['group'];
$currentPath = '../../../site/file/source/'; $file = $g['group'][$group]['file'];
switch ($group) { $folder = $g['group'][$group]['folder'];
case 3:
// Administrateur, droits maximum $uploadDir = $g['group'][$group]['path'];
$deleteFiles = true; $currentPath = '../../..' . $uploadDir;
$createFolders = true; if (!is_dir($currentPath ))
$deleteFolders = true; mkdir($currentPath );
$uploadFiles = true;
$renameFiles = true;
$renameFolders = true;
$duplicateFiles = true;
$extractFiles = true;
$copycutFiles = true;
$copycutDirs = true;
$chmodFiles = true;
$chmodDirs = true;
$previewtextFiles = true;
$edittextFiles = true;
$createtextFiles = true;
$downloadFiles = true;
break;
case 2:
// Modérateur éditeur
$deleteFiles = true;
$createFolders = false;
$deleteFolders = false;
$uploadFiles = true;
$renameFiles = true;
$renameFolders = false;
$duplicateFiles = true;
$extractFiles = true;
$copycutFiles = true;
$copycutDirs = false;
$chmodFiles = false;
$chmodDirs = false;
$previewtextFiles = true;
$edittextFiles = true;
$createtextFiles = true;
$downloadFiles = true;
break;
default:
// Membre avec droits d'upload / download
$uploadDir = '/site/file/source/partage/';
$currentPath = '../../../site/file/source/partage/';
if(!is_dir('../../../site/file/source/partage')) mkdir ('../../../site/file/source/partage');
$deleteFiles = false;
$createFolders = false;
$deleteFolders = false;
$uploadFiles = true;
$renameFiles = false;
$renameFolders = false;
$duplicateFiles = false;
$extractFiles = false;
$copycutFiles = true;
$copycutDirs = false;
$chmodFiles = false;
$chmodDirs = false;
$previewtextFiles = false;
$edittextFiles = false;
$createtextFiles = false;
$downloadFiles = true;
break;
}
/* Fin lecture du groupe de l'utilisateur connecté pour attribuer les droits et les dossiers */ /* Fin lecture du groupe de l'utilisateur connecté pour attribuer les droits et les dossiers */
@ -142,7 +88,7 @@ $config = array(
| without final / (DON'T TOUCH) | without final / (DON'T TOUCH)
| |
*/ */
'base_url' => ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && ! in_array(strtolower($_SERVER['HTTPS']), array( 'off', 'no' ))) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . rtrim(str_replace('/core/vendor/filemanager', '', pathinfo($_SERVER['PHP_SELF'])['dirname']), ' /'), 'base_url' => ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && !in_array(strtolower($_SERVER['HTTPS']), array('off', 'no'))) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . rtrim(str_replace('/core/vendor/filemanager', '', pathinfo($_SERVER['PHP_SELF'])['dirname']), ' /'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| path from base_url to base of upload folder | path from base_url to base of upload folder
@ -173,16 +119,16 @@ $config = array(
*/ */
'thumbs_base_path' => '../../../site/file/thumb/', 'thumbs_base_path' => '../../../site/file/thumb/',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| path from base_url to base of thumbs folder | path from base_url to base of thumbs folder
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| with final / | with final /
| DO NOT put inside upload folder | DO NOT put inside upload folder
| |
*/ */
'thumbs_upload_dir' => '/thumb/', 'thumbs_upload_dir' => '/thumb/',
/* /*
@ -193,7 +139,7 @@ $config = array(
| If you want to be forced to assign the extension starting from the mime type | If you want to be forced to assign the extension starting from the mime type
| |
*/ */
'mime_extension_rename' => false, 'mime_extension_rename' => false,
/* /*
@ -206,13 +152,14 @@ $config = array(
| upload dir will be ftp_base_folder + upload_dir so without final / | upload dir will be ftp_base_folder + upload_dir so without final /
| |
*/ */
'ftp_host' => false, //put the FTP host 'ftp_host' => false,
'ftp_user' => "user", //put the FTP host
'ftp_pass' => "pass", 'ftp_user' => "user",
'ftp_base_folder' => "base_folder", 'ftp_pass' => "pass",
'ftp_base_url' => "http://site to ftp root", 'ftp_base_folder' => "base_folder",
'ftp_base_url' => "http://site to ftp root",
// Directory where place files before to send to FTP with final / // Directory where place files before to send to FTP with final /
'ftp_temp_folder' => "../temp/", 'ftp_temp_folder' => "../temp/",
/* /*
|--------------------------------------------------------------------------- |---------------------------------------------------------------------------
| path from ftp_base_folder to base of thumbs folder with start and final / | path from ftp_base_folder to base of thumbs folder with start and final /
@ -242,7 +189,7 @@ $config = array(
| The user can have a select button that pass a json to external input or pass the first file selected to editor | The user can have a select button that pass a json to external input or pass the first file selected to editor
| If you use responsivefilemanager tinymce extension can copy into editor multiple object like images, videos, audios, links in the same time | If you use responsivefilemanager tinymce extension can copy into editor multiple object like images, videos, audios, links in the same time
| |
*/ */
'multiple_selection_action_button' => true, 'multiple_selection_action_button' => true,
/* /*
@ -317,26 +264,26 @@ $config = array(
//Show or not total size in filemanager (is possible to greatly increase the calculations) //Show or not total size in filemanager (is possible to greatly increase the calculations)
'show_total_size' => true, 'show_total_size' => true,
//Show or not show folder size in list view feature in filemanager (is possible, if there is a large folder, to greatly increase the calculations) //Show or not show folder size in list view feature in filemanager (is possible, if there is a large folder, to greatly increase the calculations)
'show_folder_size' => true, 'show_folder_size' => true,
//Show or not show sorting feature in filemanager //Show or not show sorting feature in filemanager
'show_sorting_bar' => true, 'show_sorting_bar' => true,
//Show or not show filters button in filemanager //Show or not show filters button in filemanager
'show_filter_buttons' => true, 'show_filter_buttons' => true,
//Show or not language selection feature in filemanager //Show or not language selection feature in filemanager
'show_language_selection' => true, 'show_language_selection' => true,
//active or deactive the transliteration (mean convert all strange characters in A..Za..z0..9 characters) //active or deactive the transliteration (mean convert all strange characters in A..Za..z0..9 characters)
'transliteration' => true, 'transliteration' => true,
//convert all spaces on files name and folders name with $replace_with variable //convert all spaces on files name and folders name with $replace_with variable
'convert_spaces' => true, 'convert_spaces' => true,
//convert all spaces on files name and folders name this value //convert all spaces on files name and folders name this value
'replace_with' => "_", 'replace_with' => "_",
//convert to lowercase the files and folders name //convert to lowercase the files and folders name
'lower_case' => true, 'lower_case' => true,
//Add ?484899493349 (time value) to returned images to prevent cache //Add ?484899493349 (time value) to returned images to prevent cache
'add_time_to_img' => false, 'add_time_to_img' => false,
//******************************************* //*******************************************
@ -346,9 +293,9 @@ $config = array(
// set maximum pixel width and/or maximum pixel height for all images // set maximum pixel width and/or maximum pixel height for all images
// If you set a maximum width or height, oversized images are converted to those limits. Images smaller than the limit(s) are unaffected // If you set a maximum width or height, oversized images are converted to those limits. Images smaller than the limit(s) are unaffected
// if you don't need a limit set both to 0 // if you don't need a limit set both to 0
'image_max_width' => 0, 'image_max_width' => 0,
'image_max_height' => 0, 'image_max_height' => 0,
'image_max_mode' => 'auto', 'image_max_mode' => 'auto',
/* /*
# $option: 0 / exact = defined size; # $option: 0 / exact = defined size;
# 1 / portrait = keep aspect set height; # 1 / portrait = keep aspect set height;
@ -361,11 +308,12 @@ $config = array(
// If you set $image_resizing to TRUE the script converts all uploaded images exactly to image_resizing_width x image_resizing_height dimension // If you set $image_resizing to TRUE the script converts all uploaded images exactly to image_resizing_width x image_resizing_height dimension
// If you set width or height to 0 the script automatically calculates the other dimension // If you set width or height to 0 the script automatically calculates the other dimension
// Is possible that if you upload very big images the script not work to overcome this increase the php configuration of memory and time limit // Is possible that if you upload very big images the script not work to overcome this increase the php configuration of memory and time limit
'image_resizing' => false, 'image_resizing' => false,
'image_resizing_width' => 0, 'image_resizing_width' => 0,
'image_resizing_height' => 0, 'image_resizing_height' => 0,
'image_resizing_mode' => 'auto', // same as $image_max_mode 'image_resizing_mode' => 'auto',
'image_resizing_override' => false, // same as $image_max_mode
'image_resizing_override' => false,
// If set to TRUE then you can specify bigger images than $image_max_width & height otherwise if image_resizing is // If set to TRUE then you can specify bigger images than $image_max_width & height otherwise if image_resizing is
// bigger than $image_max_width or height then it will be converted to those values // bigger than $image_max_width or height then it will be converted to those values
@ -375,7 +323,7 @@ $config = array(
// WATERMARK IMAGE // WATERMARK IMAGE
// //
//Watermark path or false //Watermark path or false
'image_watermark' => false,//"../watermark.png", 'image_watermark' => false, //"../watermark.png",
# Could be a pre-determined position such as: # Could be a pre-determined position such as:
# tl = top left, # tl = top left,
# t = top (middle), # t = top (middle),
@ -387,11 +335,11 @@ $config = array(
# b = bottom (middle), # b = bottom (middle),
# br = bottom right # br = bottom right
# Or, it could be a co-ordinate position such as: 50x100 # Or, it could be a co-ordinate position such as: 50x100
'image_watermark_position' => 'br', 'image_watermark_position' => 'br',
# padding: If using a pre-determined position you can # padding: If using a pre-determined position you can
# adjust the padding from the edges by passing an amount # adjust the padding from the edges by passing an amount
# in pixels. If using co-ordinates, this value is ignored. # in pixels. If using co-ordinates, this value is ignored.
'image_watermark_padding' => 10, 'image_watermark_padding' => 10,
//****************** //******************
// Default layout setting // Default layout setting
@ -402,76 +350,89 @@ $config = array(
// YOU CAN ALSO PASS THIS PARAMETERS USING SESSION VAR => $_SESSION['RF']["VIEW"]= // YOU CAN ALSO PASS THIS PARAMETERS USING SESSION VAR => $_SESSION['RF']["VIEW"]=
// //
//****************** //******************
'default_view' => 0, 'default_view' => 0,
//set if the filename is truncated when overflow first row //set if the filename is truncated when overflow first row
'ellipsis_title_after_first_row' => true, 'ellipsis_title_after_first_row' => true,
//************************* //*************************
//Permissions configuration //Permissions configuration
//****************** //******************
'delete_files' => $deleteFiles, 'delete_files' => $file['delete'],
'create_folders' => $createFolders, 'create_folders' => $folder['create'],
'delete_folders' => $deleteFolders, 'delete_folders' => $folder['delete'],
'upload_files' => $uploadFiles, 'upload_files' => $file['upload'],
'rename_files' => $renameFiles, 'rename_files' => $file['rename'],
'rename_folders' => $renameFolders, 'rename_folders' => $folder['create'],
'duplicate_files' => $duplicateFiles, 'duplicate_files' => $file['duplicate'],
'extract_files' => $extractFiles, 'extract_files' => $file['extract'],
'copy_cut_files' => $copycutFiles, // for copy/cut files 'copy_cut_files' => $file['copycut'],
'copy_cut_dirs' => $copycutDirs, // for copy/cut directories // for copy/cut files
'chmod_files' => $chmodFiles, // change file permissions 'copy_cut_dirs' => $folder['copycut'],
'chmod_dirs' => $chmodDirs, // change folder permissions // for copy/cut directories
'preview_text_files' => $previewtextFiles, // eg.: txt, log etc. 'chmod_files' => $file['permission'],
'edit_text_files' => $edittextFiles, // eg.: txt, log etc. // change file permissions
'create_text_files' => $createtextFiles, // only create files with exts. defined in $config['editable_text_file_exts'] 'chmod_dirs' => $folder['copycut'],
'download_files' => $downloadFiles, // allow download files or just preview // change folder permissions
'preview_text_files' => $file['preview'],
// eg.: txt, log etc.
'edit_text_files' => $file['edit'],
// eg.: txt, log etc.
'create_text_files' => $file['extract'],
// only create files with exts. defined in $config['editable_text_file_exts']
'download_files' => $file['download'],
// allow download files or just preview
// you can preview these type of files if $preview_text_files is true // you can preview these type of files if $preview_text_files is true
'previewable_text_file_exts' => array( "bsh", "c","css", "cc", "cpp", "cs", "csh", "cyc", "cv", "htm", "html", "java", "js", "m", "mxml", "perl", "pl", "pm", "py", "rb", "sh", "xhtml", "xml","xsl",'txt', 'log', 'gpx', 'kml', '' ), 'previewable_text_file_exts' => array("bsh", "c", "css", "cc", "cpp", "cs", "csh", "cyc", "cv", "htm", "html", "java", "js", "m", "mxml", "perl", "pl", "pm", "py", "rb", "sh", "xhtml", "xml", "xsl", 'txt', 'log', 'gpx', 'kml', ''),
// you can edit these type of files if $edit_text_files is true (only text based files) // you can edit these type of files if $edit_text_files is true (only text based files)
// you can create these type of files if $config['create_text_files'] is true (only text based files) // you can create these type of files if $config['create_text_files'] is true (only text based files)
// if you want you can add html,css etc. // if you want you can add html,css etc.
// but for security reasons it's NOT RECOMMENDED! // but for security reasons it's NOT RECOMMENDED!
'editable_text_file_exts' => array( 'txt', 'log', 'xml', 'html', 'css', 'htm', 'js', '' ), 'editable_text_file_exts' => array('txt', 'log', 'xml', 'html', 'css', 'htm', 'js', ''),
'jplayer_exts' => array("mp4","flv","webmv","webma","webm","m4a","m4v","ogv","oga","mp3","midi","mid","ogg","wav"), 'jplayer_exts' => array("mp4", "flv", "webmv", "webma", "webm", "m4a", "m4v", "ogv", "oga", "mp3", "midi", "mid", "ogg", "wav"),
'cad_exts' => array('dwg', 'dxf', 'hpgl', 'plt', 'spl', 'step', 'stp', 'iges', 'igs', 'sat', 'cgm', 'svg'), 'cad_exts' => array('dwg', 'dxf', 'hpgl', 'plt', 'spl', 'step', 'stp', 'iges', 'igs', 'sat', 'cgm', 'svg'),
// Preview with Google Documents // Preview with Google Documents
'googledoc_enabled' => true, 'googledoc_enabled' => true,
'googledoc_file_exts' => array( 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx' , 'pdf', 'odt', 'odp', 'ods'), 'googledoc_file_exts' => array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'pdf', 'odt', 'odp', 'ods'),
// defines size limit for paste in MB / operation // defines size limit for paste in MB / operation
// set 'FALSE' for no limit // set 'FALSE' for no limit
'copy_cut_max_size' => 100, 'copy_cut_max_size' => 100,
// defines file count limit for paste / operation // defines file count limit for paste / operation
// set 'FALSE' for no limit // set 'FALSE' for no limit
'copy_cut_max_count' => 200, 'copy_cut_max_count' => 200,
//IF any of these limits reached, operation won't start and generate warning //IF any of these limits reached, operation won't start and generate warning
//********************** //**********************
//Allowed extensions (lowercase insert) //Allowed extensions (lowercase insert)
//********************** //**********************
'ext_img' => array( 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff','svg', 'ico', 'webp', 'avif' ), //Images 'ext_img' => array('jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'svg', 'ico', 'webp', 'avif'),
'ext_file' => array( 'doc', 'docx', 'rtf', 'pdf', 'xls', 'xlsx', 'txt', 'csv', 'html', 'xhtml', 'psd', 'sql', 'log', 'fla', 'xml', 'ade', 'adp', 'mdb', 'accdb', 'ppt', 'pptx', 'odt', 'ots', 'ott', 'odb', 'odg', 'otp', 'otg', 'odf', 'ods', 'odp', 'css', 'ai', 'kmz','dwg', 'dxf', 'hpgl', 'plt', 'spl', 'step', 'stp', 'iges', 'igs', 'sat', 'cgm', 'ics', 'gpx', 'kml', ''), //Files //Images
'ext_video' => array( 'mov', 'mpeg', 'm4v', 'mp4', 'avi', 'mpg', 'wma', 'flv', 'webm' ), //Video 'ext_file' => array('doc', 'docx', 'rtf', 'pdf', 'xls', 'xlsx', 'txt', 'csv', 'html', 'xhtml', 'psd', 'sql', 'log', 'fla', 'xml', 'ade', 'adp', 'mdb', 'accdb', 'ppt', 'pptx', 'odt', 'ots', 'ott', 'odb', 'odg', 'otp', 'otg', 'odf', 'ods', 'odp', 'css', 'ai', 'kmz', 'dwg', 'dxf', 'hpgl', 'plt', 'spl', 'step', 'stp', 'iges', 'igs', 'sat', 'cgm', 'ics', 'gpx', 'kml', ''),
'ext_music' => array( 'mp3', 'mpga', 'm4a', 'ac3', 'aiff', 'mid', 'ogg', 'wav' ), //Audio //Files
'ext_misc' => array( 'zip', 'rar', 'gz', 'tar', 'iso', 'dmg', 'woff' ), //Archives et polices de caractères 'ext_video' => array('mov', 'mpeg', 'm4v', 'mp4', 'avi', 'mpg', 'wma', 'flv', 'webm'),
//Video
'ext_music' => array('mp3', 'mpga', 'm4a', 'ac3', 'aiff', 'mid', 'ogg', 'wav'),
//Audio
'ext_misc' => array('zip', 'rar', 'gz', 'tar', 'iso', 'dmg', 'woff'),
//Archives et polices de caractères
//********************* //*********************
// If you insert an extensions blacklist array the filemanager don't check any extensions but simply block the extensions in the list // If you insert an extensions blacklist array the filemanager don't check any extensions but simply block the extensions in the list
// otherwise check Allowed extensions configuration // otherwise check Allowed extensions configuration
//********************* //*********************
'ext_blacklist' => false,//['exe','bat','jpg'], 'ext_blacklist' => false, //['exe','bat','jpg'],
//Empty filename permits like .htaccess, .env, ... //Empty filename permits like .htaccess, .env, ...
'empty_filename' => false, 'empty_filename' => false,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -481,102 +442,102 @@ $config = array(
| If you want to accept files without extension, remember to add '' extension on allowed extension | If you want to accept files without extension, remember to add '' extension on allowed extension
| |
*/ */
'files_without_extension' => false, 'files_without_extension' => false,
/****************** /******************
* TUI Image Editor config * TUI Image Editor config
*******************/ *******************/
// Add or modify the options below as needed - they will be json encoded when added to the configuration so arrays can be utilized as needed // Add or modify the options below as needed - they will be json encoded when added to the configuration so arrays can be utilized as needed
'tui_active' => true, 'tui_active' => true,
'tui_position' => 'bottom', 'tui_position' => 'bottom',
// 'common.bi.image' => "../assets/images/logo.png", // 'common.bi.image' => "../assets/images/logo.png",
// 'common.bisize.width' => '70px', // 'common.bisize.width' => '70px',
// 'common.bisize.height' => '25px', // 'common.bisize.height' => '25px',
'common.backgroundImage' => 'none', 'common.backgroundImage' => 'none',
'common.backgroundColor' => '#ececec', 'common.backgroundColor' => '#ececec',
'common.border' => '1px solid #E6E7E8', 'common.border' => '1px solid #E6E7E8',
// header // header
'header.backgroundImage' => 'none', 'header.backgroundImage' => 'none',
'header.backgroundColor' => '#ececec', 'header.backgroundColor' => '#ececec',
'header.border' => '0px', 'header.border' => '0px',
// main icons // main icons
'menu.normalIcon.path' => 'svg/icon-d.svg', 'menu.normalIcon.path' => 'svg/icon-d.svg',
'menu.normalIcon.name' => 'icon-d', 'menu.normalIcon.name' => 'icon-d',
'menu.activeIcon.path' => 'svg/icon-b.svg', 'menu.activeIcon.path' => 'svg/icon-b.svg',
'menu.activeIcon.name' => 'icon-b', 'menu.activeIcon.name' => 'icon-b',
'menu.disabledIcon.path' => 'svg/icon-a.svg', 'menu.disabledIcon.path' => 'svg/icon-a.svg',
'menu.disabledIcon.name' => 'icon-a', 'menu.disabledIcon.name' => 'icon-a',
'menu.hoverIcon.path' => 'svg/icon-c.svg', 'menu.hoverIcon.path' => 'svg/icon-c.svg',
'menu.hoverIcon.name' => 'icon-c', 'menu.hoverIcon.name' => 'icon-c',
'menu.iconSize.width' => '24px', 'menu.iconSize.width' => '24px',
'menu.iconSize.height' => '24px', 'menu.iconSize.height' => '24px',
// submenu primary color // submenu primary color
'submenu.backgroundColor' => '#ececec', 'submenu.backgroundColor' => '#ececec',
'submenu.partition.color' => '#000000', 'submenu.partition.color' => '#000000',
// submenu icons // submenu icons
'submenu.normalIcon.path' => 'svg/icon-d.svg', 'submenu.normalIcon.path' => 'svg/icon-d.svg',
'submenu.normalIcon.name' => 'icon-d', 'submenu.normalIcon.name' => 'icon-d',
'submenu.activeIcon.path' => 'svg/icon-b.svg', 'submenu.activeIcon.path' => 'svg/icon-b.svg',
'submenu.activeIcon.name' => 'icon-b', 'submenu.activeIcon.name' => 'icon-b',
'submenu.iconSize.width' => '32px', 'submenu.iconSize.width' => '32px',
'submenu.iconSize.height' => '32px', 'submenu.iconSize.height' => '32px',
// submenu labels // submenu labels
'submenu.normalLabel.color' => '#000', 'submenu.normalLabel.color' => '#000',
'submenu.normalLabel.fontWeight' => 'normal', 'submenu.normalLabel.fontWeight' => 'normal',
'submenu.activeLabel.color' => '#000', 'submenu.activeLabel.color' => '#000',
'submenu.activeLabel.fontWeight' => 'normal', 'submenu.activeLabel.fontWeight' => 'normal',
// checkbox style // checkbox style
'checkbox.border' => '1px solid #E6E7E8', 'checkbox.border' => '1px solid #E6E7E8',
'checkbox.backgroundColor' => '#000', 'checkbox.backgroundColor' => '#000',
// rango style // rango style
'range.pointer.color' => '#333', 'range.pointer.color' => '#333',
'range.bar.color' => '#ccc', 'range.bar.color' => '#ccc',
'range.subbar.color' => '#606060', 'range.subbar.color' => '#606060',
'range.disabledPointer.color' => '#d3d3d3', 'range.disabledPointer.color' => '#d3d3d3',
'range.disabledBar.color' => 'rgba(85,85,85,0.06)', 'range.disabledBar.color' => 'rgba(85,85,85,0.06)',
'range.disabledSubbar.color' => 'rgba(51,51,51,0.2)', 'range.disabledSubbar.color' => 'rgba(51,51,51,0.2)',
'range.value.color' => '#000', 'range.value.color' => '#000',
'range.value.fontWeight' => 'normal', 'range.value.fontWeight' => 'normal',
'range.value.fontSize' => '11px', 'range.value.fontSize' => '11px',
'range.value.border' => '0', 'range.value.border' => '0',
'range.value.backgroundColor' => '#f5f5f5', 'range.value.backgroundColor' => '#f5f5f5',
'range.title.color' => '#000', 'range.title.color' => '#000',
'range.title.fontWeight' => 'lighter', 'range.title.fontWeight' => 'lighter',
// colorpicker style // colorpicker style
'colorpicker.button.border' => '0px', 'colorpicker.button.border' => '0px',
'colorpicker.title.color' => '#000', 'colorpicker.title.color' => '#000',
//The filter and sorter are managed through both javascript and php scripts because if you have a lot of //The filter and sorter are managed through both javascript and php scripts because if you have a lot of
//file in a folder the javascript script can't sort all or filter all, so the filemanager switch to php script. //file in a folder the javascript script can't sort all or filter all, so the filemanager switch to php script.
//The plugin automatic swich javascript to php when the current folder exceeds the below limit of files number //The plugin automatic swich javascript to php when the current folder exceeds the below limit of files number
'file_number_limit_js' => 500, 'file_number_limit_js' => 500,
//********************** //**********************
// Hidden files and folders // Hidden files and folders
//********************** //**********************
// set the names of any folders you want hidden (eg "hidden_folder1", "hidden_folder2" ) Remember all folders with these names will be hidden (you can set any exceptions in config.php files on folders) // set the names of any folders you want hidden (eg "hidden_folder1", "hidden_folder2" ) Remember all folders with these names will be hidden (you can set any exceptions in config.php files on folders)
'hidden_folders' => array(), 'hidden_folders' => array(),
// set the names of any files you want hidden. Remember these names will be hidden in all folders (eg "this_document.pdf", "that_image.jpg" ) // set the names of any files you want hidden. Remember these names will be hidden in all folders (eg "this_document.pdf", "that_image.jpg" )
'hidden_files' => array( 'config.php' ), 'hidden_files' => array('config.php'),
/******************* /*******************
* URL upload * URL upload
*******************/ *******************/
'url_upload' => false, 'url_upload' => false,
//************************************ //************************************
//Thumbnail for external use creation //Thumbnail for external use creation
//************************************ //************************************
@ -588,12 +549,18 @@ $config = array(
// path_from_filemanager/test/test1/ // path_from_filemanager/test/test1/
// PS if there isn't write permission in your destination folder you must set it // PS if there isn't write permission in your destination folder you must set it
// //
'fixed_image_creation' => true, //activate or not the creation of one or more image resized with fixed path from filemanager folder 'fixed_image_creation' => true,
'fixed_path_from_filemanager' => array( '../../../site/file/thumb/' ), //fixed path of the image folder from the current position on upload folder //activate or not the creation of one or more image resized with fixed path from filemanager folder
'fixed_image_creation_name_to_prepend' => array( 'mini_' ), //name to prepend on filename 'fixed_path_from_filemanager' => array('../../../site/file/thumb/'),
'fixed_image_creation_to_append' => array( '' ), //name to appendon filename //fixed path of the image folder from the current position on upload folder
'fixed_image_creation_width' => array( 640 ), //width of image 'fixed_image_creation_name_to_prepend' => array('mini_'),
'fixed_image_creation_height' => array( 480 ), //height of image //name to prepend on filename
'fixed_image_creation_to_append' => array(''),
//name to appendon filename
'fixed_image_creation_width' => array(640),
//width of image
'fixed_image_creation_height' => array(480),
//height of image
/* /*
# $option: 0 / exact = defined size; # $option: 0 / exact = defined size;
# 1 / portrait = keep aspect set height; # 1 / portrait = keep aspect set height;
@ -601,7 +568,8 @@ $config = array(
# 3 / auto = auto; # 3 / auto = auto;
# 4 / crop= resize and crop; # 4 / crop= resize and crop;
*/ */
'fixed_image_creation_option' => array('auto', 'crop'), //set the type of the crop 'fixed_image_creation_option' => array('auto', 'crop'),
//set the type of the crop
// New image resized creation with relative path inside to upload folder after uploading (thumbnails in relative mode) // New image resized creation with relative path inside to upload folder after uploading (thumbnails in relative mode)
@ -609,12 +577,18 @@ $config = array(
// just simply add a value in the array // just simply add a value in the array
// The image creation path is always relative so if i'm inside source/test/test1 and I upload an image, the path start from here // The image creation path is always relative so if i'm inside source/test/test1 and I upload an image, the path start from here
// //
'relative_image_creation' => false, //activate or not the creation of one or more image resized with relative path from upload folder 'relative_image_creation' => false,
'relative_path_from_current_pos' => array( './', './' ), //relative path of the image folder from the current position on upload folder //activate or not the creation of one or more image resized with relative path from upload folder
'relative_image_creation_name_to_prepend' => array( '', '' ), //name to prepend on filename 'relative_path_from_current_pos' => array('./', './'),
'relative_image_creation_name_to_append' => array( '_thumb', '_thumb1' ), //name to append on filename //relative path of the image folder from the current position on upload folder
'relative_image_creation_width' => array( 300, 400 ), //width of image 'relative_image_creation_name_to_prepend' => array('', ''),
'relative_image_creation_height' => array( 200, 300 ), //height of image //name to prepend on filename
'relative_image_creation_name_to_append' => array('_thumb', '_thumb1'),
//name to append on filename
'relative_image_creation_width' => array(300, 400),
//width of image
'relative_image_creation_height' => array(200, 300),
//height of image
/* /*
# $option: 0 / exact = defined size; # $option: 0 / exact = defined size;
# 1 / portrait = keep aspect set height; # 1 / portrait = keep aspect set height;
@ -622,72 +596,73 @@ $config = array(
# 3 / auto = auto; # 3 / auto = auto;
# 4 / crop= resize and crop; # 4 / crop= resize and crop;
*/ */
'relative_image_creation_option' => array( 'crop', 'crop' ), //set the type of the crop 'relative_image_creation_option' => array('crop', 'crop'),
//set the type of the crop
// Remember text filter after close filemanager for future session // Remember text filter after close filemanager for future session
'remember_text_filter' => false, 'remember_text_filter' => false,
); );
return array_merge( return array_merge(
$config, $config,
array( array(
'ext'=> array_merge( 'ext' => array_merge(
$config['ext_img'], $config['ext_img'],
$config['ext_file'], $config['ext_file'],
$config['ext_misc'], $config['ext_misc'],
$config['ext_video'], $config['ext_video'],
$config['ext_music'] $config['ext_music']
), ),
'tui_defaults_config' => array( 'tui_defaults_config' => array(
//'common.bi.image' => $config['common.bi.image'], //'common.bi.image' => $config['common.bi.image'],
//'common.bisize.width' => $config['common.bisize.width'], //'common.bisize.width' => $config['common.bisize.width'],
//'common.bisize.height' => $config['common.bisize.height'], //'common.bisize.height' => $config['common.bisize.height'],
'common.backgroundImage' => $config['common.backgroundImage'], 'common.backgroundImage' => $config['common.backgroundImage'],
'common.backgroundColor' => $config['common.backgroundColor'], 'common.backgroundColor' => $config['common.backgroundColor'],
'common.border' => $config['common.border'], 'common.border' => $config['common.border'],
'header.backgroundImage' => $config['header.backgroundImage'], 'header.backgroundImage' => $config['header.backgroundImage'],
'header.backgroundColor' => $config['header.backgroundColor'], 'header.backgroundColor' => $config['header.backgroundColor'],
'header.border' => $config['header.border'], 'header.border' => $config['header.border'],
'menu.normalIcon.path' => $config['menu.normalIcon.path'], 'menu.normalIcon.path' => $config['menu.normalIcon.path'],
'menu.normalIcon.name' => $config['menu.normalIcon.name'], 'menu.normalIcon.name' => $config['menu.normalIcon.name'],
'menu.activeIcon.path' => $config['menu.activeIcon.path'], 'menu.activeIcon.path' => $config['menu.activeIcon.path'],
'menu.activeIcon.name' => $config['menu.activeIcon.name'], 'menu.activeIcon.name' => $config['menu.activeIcon.name'],
'menu.disabledIcon.path' => $config['menu.disabledIcon.path'], 'menu.disabledIcon.path' => $config['menu.disabledIcon.path'],
'menu.disabledIcon.name' => $config['menu.disabledIcon.name'], 'menu.disabledIcon.name' => $config['menu.disabledIcon.name'],
'menu.hoverIcon.path' => $config['menu.hoverIcon.path'], 'menu.hoverIcon.path' => $config['menu.hoverIcon.path'],
'menu.hoverIcon.name' => $config['menu.hoverIcon.name'], 'menu.hoverIcon.name' => $config['menu.hoverIcon.name'],
'menu.iconSize.width' => $config['menu.iconSize.width'], 'menu.iconSize.width' => $config['menu.iconSize.width'],
'menu.iconSize.height' => $config['menu.iconSize.height'], 'menu.iconSize.height' => $config['menu.iconSize.height'],
'submenu.backgroundColor' => $config['submenu.backgroundColor'], 'submenu.backgroundColor' => $config['submenu.backgroundColor'],
'submenu.partition.color' => $config['submenu.partition.color'], 'submenu.partition.color' => $config['submenu.partition.color'],
'submenu.normalIcon.path' => $config['submenu.normalIcon.path'], 'submenu.normalIcon.path' => $config['submenu.normalIcon.path'],
'submenu.normalIcon.name' => $config['submenu.normalIcon.name'], 'submenu.normalIcon.name' => $config['submenu.normalIcon.name'],
'submenu.activeIcon.path' => $config['submenu.activeIcon.path'], 'submenu.activeIcon.path' => $config['submenu.activeIcon.path'],
'submenu.activeIcon.name' => $config['submenu.activeIcon.name'], 'submenu.activeIcon.name' => $config['submenu.activeIcon.name'],
'submenu.iconSize.width' => $config['submenu.iconSize.width'], 'submenu.iconSize.width' => $config['submenu.iconSize.width'],
'submenu.iconSize.height' => $config['submenu.iconSize.height'], 'submenu.iconSize.height' => $config['submenu.iconSize.height'],
'submenu.normalLabel.color' => $config['submenu.normalLabel.color'], 'submenu.normalLabel.color' => $config['submenu.normalLabel.color'],
'submenu.normalLabel.fontWeight' => $config['submenu.normalLabel.fontWeight'], 'submenu.normalLabel.fontWeight' => $config['submenu.normalLabel.fontWeight'],
'submenu.activeLabel.color' => $config['submenu.activeLabel.color'], 'submenu.activeLabel.color' => $config['submenu.activeLabel.color'],
//'submenu.activeLabel.fontWeight' => $config['submenu.activeLabel.fontWeightcommon.bi.image'], //'submenu.activeLabel.fontWeight' => $config['submenu.activeLabel.fontWeightcommon.bi.image'],
'checkbox.border' => $config['checkbox.border'], 'checkbox.border' => $config['checkbox.border'],
'checkbox.backgroundColor' => $config['checkbox.backgroundColor'], 'checkbox.backgroundColor' => $config['checkbox.backgroundColor'],
'range.pointer.color' => $config['range.pointer.color'], 'range.pointer.color' => $config['range.pointer.color'],
'range.bar.color' => $config['range.bar.color'], 'range.bar.color' => $config['range.bar.color'],
'range.subbar.color' => $config['range.subbar.color'], 'range.subbar.color' => $config['range.subbar.color'],
'range.disabledPointer.color' => $config['range.disabledPointer.color'], 'range.disabledPointer.color' => $config['range.disabledPointer.color'],
'range.disabledBar.color' => $config['range.disabledBar.color'], 'range.disabledBar.color' => $config['range.disabledBar.color'],
'range.disabledSubbar.color' => $config['range.disabledSubbar.color'], 'range.disabledSubbar.color' => $config['range.disabledSubbar.color'],
'range.value.color' => $config['range.value.color'], 'range.value.color' => $config['range.value.color'],
'range.value.fontWeight' => $config['range.value.fontWeight'], 'range.value.fontWeight' => $config['range.value.fontWeight'],
'range.value.fontSize' => $config['range.value.fontSize'], 'range.value.fontSize' => $config['range.value.fontSize'],
'range.value.border' => $config['range.value.border'], 'range.value.border' => $config['range.value.border'],
'range.value.backgroundColor' => $config['range.value.backgroundColor'], 'range.value.backgroundColor' => $config['range.value.backgroundColor'],
'range.title.color' => $config['range.title.color'], 'range.title.color' => $config['range.title.color'],
'range.title.fontWeight' => $config['range.title.fontWeight'], 'range.title.fontWeight' => $config['range.title.fontWeight'],
'colorpicker.button.border' => $config['colorpicker.button.border'], 'colorpicker.button.border' => $config['colorpicker.button.border'],
'colorpicker.title.color' => $config['colorpicker.title.color'] 'colorpicker.title.color' => $config['colorpicker.title.color']
), ),
) )
); );