PEEL Shopping
Open source ecommerce : PEEL Shopping
config.php
Go to the documentation of this file.
1 <?php
2 /*
3  * FCKeditor - The text editor for Internet - http://www.fckeditor.net
4  * Copyright (C) 2003-2009 Frederico Caldeira Knabben
5  *
6  * == BEGIN LICENSE ==
7  *
8  * Licensed under the terms of any of the following licenses at your
9  * choice:
10  *
11  * - GNU General Public License Version 2 or later (the "GPL")
12  * http://www.gnu.org/licenses/gpl.html
13  *
14  * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15  * http://www.gnu.org/licenses/lgpl.html
16  *
17  * - Mozilla Public License Version 1.1 or later (the "MPL")
18  * http://www.mozilla.org/MPL/MPL-1.1.html
19  *
20  * == END LICENSE ==
21  *
22  * Configuration file for the File Manager Connector for PHP.
23  */
24 
25 global $Config ;
26 
27 // SECURITY: You must explicitly enable this "connector". (Set it to "true").
28 // WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only
29 // authenticated users can access this file or use some kind of session checking.
30 $Config['Enabled'] = true ;
31 
32 // On va chercher la configuration de PEEL
33 define('LOAD_NO_OPTIONAL_MODULE', true);
34 include('../../../../../../configuration.inc.php');
35 
36 // Vérification des droits : l'utilisateur doit être un administrateur PEEL
37 if(!a_priv('admin*', false)){
38  die();
39 }
40 
41 // Path to user files relative to the document root.
42 $Config['UserFilesPath'] = $GLOBALS['wwwroot'] .'/upload/' ;
43 
44 // Fill the following value it you prefer to specify the absolute path for the
45 // user files directory. Useful if you are using a virtual directory, symbolic
46 // link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
47 // Attention: The above 'UserFilesPath' must point to the same directory.
48 $Config['UserFilesAbsolutePath'] = '../../../../../../upload/' ;
49 
50 // Due to security issues with Apache modules, it is recommended to leave the
51 // following setting enabled.
52 $Config['ForceSingleExtension'] = true ;
53 
54 // Perform additional checks for image files.
55 // If set to true, validate image size (using getimagesize).
56 $Config['SecureImageUploads'] = true;
57 
58 // What the user can do with this connector.
59 $Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder') ;
60 
61 // Allowed Resource Types.
62 $Config['ConfigAllowedTypes'] = array('File', 'Image', 'Flash', 'Media') ;
63 
64 // For security, HTML is allowed in the first Kb of data for files having the
65 // following extensions only.
66 $Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js") ;
67 
68 // After file is uploaded, sometimes it is required to change its permissions
69 // so that it was possible to access it at the later time.
70 // If possible, it is recommended to set more restrictive permissions, like 0755.
71 // Set to 0 to disable this feature.
72 // Note: not needed on Windows-based servers.
73 
74 // Par défaut dans PEEL, on laisse PHP créer les fichiers avec les droits par défaut
75 // Si vous le souhaitez, créez une variable de configuration chmod_new_files de type octal ou integer (c'est converti automatiquement par PEEL) avec pour valeur 644 par exemple
76 $Config['ChmodOnUpload'] = vb($GLOBALS['site_parameters']['chmod_new_files'], null);
77 
78 // See comments above.
79 // Used when creating folders that does not exist.
80 // Par défaut dans PEEL, on laisse PHP créer les dossiers avec les droits par défaut
81 // Si vous le souhaitez, créez une variable de configuration chmod_new_folders de type octal ou integer (c'est converti automatiquement par PEEL) avec pour valeur 755 par exemple
82 $Config['ChmodOnFolderCreate'] = vb($GLOBALS['site_parameters']['chmod_new_folders'], null);
83 
84 /*
85  Configuration settings for each Resource Type
86 
87  - AllowedExtensions: the possible extensions that can be allowed.
88  If it is empty then any file type can be uploaded.
89  - DeniedExtensions: The extensions that won't be allowed.
90  If it is empty then no restrictions are done here.
91 
92  For a file to be uploaded it has to fulfill both the AllowedExtensions
93  and DeniedExtensions (that's it: not being denied) conditions.
94 
95  - FileTypesPath: the virtual folder relative to the document root where
96  these resources will be located.
97  Attention: It must start and end with a slash: '/'
98 
99  - FileTypesAbsolutePath: the physical path to the above folder. It must be
100  an absolute path.
101  If it's an empty string then it will be autocalculated.
102  Useful if you are using a virtual directory, symbolic link or alias.
103  Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
104  Attention: The above 'FileTypesPath' must point to the same directory.
105  Attention: It must end with a slash: '/'
106 
107  - QuickUploadPath: the virtual folder relative to the document root where
108  these resources will be uploaded using the Upload tab in the resources
109  dialogs.
110  Attention: It must start and end with a slash: '/'
111 
112  - QuickUploadAbsolutePath: the physical path to the above folder. It must be
113  an absolute path.
114  If it's an empty string then it will be autocalculated.
115  Useful if you are using a virtual directory, symbolic link or alias.
116  Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
117  Attention: The above 'QuickUploadPath' must point to the same directory.
118  Attention: It must end with a slash: '/'
119 
120  NOTE: by default, QuickUploadPath and QuickUploadAbsolutePath point to
121  "userfiles" directory to maintain backwards compatibility with older versions of FCKeditor.
122  This is fine, but you in some cases you will be not able to browse uploaded files using file browser.
123  Example: if you click on "image button", select "Upload" tab and send image
124  to the server, image will appear in FCKeditor correctly, but because it is placed
125  directly in /userfiles/ directory, you'll be not able to see it in built-in file browser.
126  The more expected behaviour would be to send images directly to "image" subfolder.
127  To achieve that, simply change
128  $Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ;
129  $Config['QuickUploadAbsolutePath']['Image'] = $Config['UserFilesAbsolutePath'] ;
130  into:
131  $Config['QuickUploadPath']['Image'] = $Config['FileTypesPath']['Image'] ;
132  $Config['QuickUploadAbsolutePath']['Image'] = $Config['FileTypesAbsolutePath']['Image'] ;
133 
134 */
135 
136 // WARNING: It is recommended to remove swf extension from the list of allowed extensions.
137 // SWF files can be used to perform XSS attack.
138 
139 $Config['AllowedExtensions']['File'] = array('7z', 'aiff', 'asf', 'avi', 'bmp', 'csv', 'doc', 'fla', 'flv', 'gif', 'gz', 'gzip', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'ods', 'odt', 'pdf', 'png', 'ppt', 'pxd', 'qt', 'ram', 'rar', 'rm', 'rmi', 'rmvb', 'rtf', 'sdc', 'sitd', 'swf', 'sxc', 'sxw', 'tar', 'tgz', 'tif', 'tiff', 'txt', 'vsd', 'wav', 'wma', 'wmv', 'xls', 'xml', 'zip') ;
140 $Config['DeniedExtensions']['File'] = array() ;
141 $Config['FileTypesPath']['File'] = $Config['UserFilesPath'] . '' ;
142 $Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'' ;
143 $Config['QuickUploadPath']['File'] = $Config['UserFilesPath'] ;
144 $Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'] ;
145 
146 $Config['AllowedExtensions']['Image'] = array('bmp','gif','jpeg','jpg','png') ;
147 $Config['DeniedExtensions']['Image'] = array() ;
148 $Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . '' ;
149 $Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'' ;
150 $Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ;
151 $Config['QuickUploadAbsolutePath']['Image']= $Config['UserFilesAbsolutePath'] ;
152 
153 $Config['AllowedExtensions']['Flash'] = array('swf','flv') ;
154 $Config['DeniedExtensions']['Flash'] = array() ;
155 $Config['FileTypesPath']['Flash'] = $Config['UserFilesPath'] . '' ;
156 $Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'' ;
157 $Config['QuickUploadPath']['Flash'] = $Config['UserFilesPath'] ;
158 $Config['QuickUploadAbsolutePath']['Flash']= $Config['UserFilesAbsolutePath'] ;
159 
160 $Config['AllowedExtensions']['Media'] = array('aiff', 'asf', 'avi', 'bmp', 'fla', 'flv', 'gif', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'png', 'qt', 'ram', 'rm', 'rmi', 'rmvb', 'swf', 'tif', 'tiff', 'wav', 'wma', 'wmv') ;
161 $Config['DeniedExtensions']['Media'] = array() ;
162 $Config['FileTypesPath']['Media'] = $Config['UserFilesPath'] . '' ;
163 $Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'' ;
164 $Config['QuickUploadPath']['Media'] = $Config['UserFilesPath'] ;
165 $Config['QuickUploadAbsolutePath']['Media']= $Config['UserFilesAbsolutePath'] ;
166 
167 
168 
169 ?>
global $Config
Definition: config.php:25
vb(&$var, $default=null)
Variable blanche if $var n'est pas défini, retourne $default, sinon retourne $var.
Definition: format.php:97
$GLOBALS['page_columns_count']
a_priv($requested_priv, $demo_allowed=false, $site_configuration_modification=false, $user_id=null)
Renvoie true si l'utilisateur de la session a le privilège $requested_priv ou un droit supérieur Des ...
Definition: user.php:63

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:30:08 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.