author | Dan |
Sat, 17 Jan 2009 11:31:45 -0500 | |
changeset 315 | 01e7206b4441 |
parent 310 | 78cb09a23e69 |
child 318 | eec2dfd2f0a3 |
permissions | -rw-r--r-- |
1 | 1 |
<?php |
2 |
||
3 |
/* |
|
4 |
* Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between |
|
294 | 5 |
* Version 1.0.5 (Ferrishyn) |
1 | 6 |
* Copyright (C) 2006-2007 Dan Fuhry |
7 |
* constants.php - important defines used Enano-wide |
|
8 |
* |
|
9 |
* This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
|
10 |
* as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
|
11 |
* |
|
12 |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
|
13 |
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
|
14 |
*/ |
|
15 |
||
16 |
// Ban types |
|
17 |
||
18 |
define('BAN_IP', 1); |
|
19 |
define('BAN_USER', 2); |
|
20 |
define('BAN_EMAIL', 3); |
|
21 |
||
22 |
// ACL permission types |
|
23 |
define('AUTH_ALLOW', 4); |
|
24 |
define('AUTH_WIKIMODE', 3); // User can do this if wiki mode is enabled |
|
25 |
define('AUTH_DISALLOW', 2); |
|
26 |
define('AUTH_DENY', 1); // A Deny setting overrides *everything* |
|
27 |
||
28 |
define('ACL_TYPE_GROUP', 1); |
|
29 |
define('ACL_TYPE_USER', 2); |
|
30 |
define('ACL_TYPE_PRESET', 3); |
|
31 |
||
32 |
// System groups |
|
33 |
define('GROUP_ID_ADMIN', 2); |
|
34 |
define('GROUP_ID_MOD', 3); |
|
35 |
||
73
0a74676a2f2f
Made the move to Loch Ness, and got some basic page grouping functionality working. TODO: fix some UI issues in Javascript ACL editor and change non-JS ACL editor to work with page groups too
Dan
parents:
21
diff
changeset
|
36 |
// Page group types |
0a74676a2f2f
Made the move to Loch Ness, and got some basic page grouping functionality working. TODO: fix some UI issues in Javascript ACL editor and change non-JS ACL editor to work with page groups too
Dan
parents:
21
diff
changeset
|
37 |
define('PAGE_GRP_CATLINK', 1); |
0a74676a2f2f
Made the move to Loch Ness, and got some basic page grouping functionality working. TODO: fix some UI issues in Javascript ACL editor and change non-JS ACL editor to work with page groups too
Dan
parents:
21
diff
changeset
|
38 |
define('PAGE_GRP_TAGGED', 2); |
0a74676a2f2f
Made the move to Loch Ness, and got some basic page grouping functionality working. TODO: fix some UI issues in Javascript ACL editor and change non-JS ACL editor to work with page groups too
Dan
parents:
21
diff
changeset
|
39 |
define('PAGE_GRP_NORMAL', 3); |
155
edbff85d43e8
Feature add: new page group type: regular expression match (PCRE)
Dan
parents:
142
diff
changeset
|
40 |
define('PAGE_GRP_REGEX', 4); |
73
0a74676a2f2f
Made the move to Loch Ness, and got some basic page grouping functionality working. TODO: fix some UI issues in Javascript ACL editor and change non-JS ACL editor to work with page groups too
Dan
parents:
21
diff
changeset
|
41 |
|
1 | 42 |
// |
43 |
// User types - don't touch these |
|
44 |
// |
|
45 |
||
46 |
// User can do absolutely everything |
|
47 |
define('USER_LEVEL_ADMIN', 9); |
|
48 |
||
49 |
// User can edit/[un]approve comments and do some basic administration |
|
50 |
define('USER_LEVEL_MOD', 5); |
|
51 |
||
52 |
// Default for members. When authed at this level, the user can change his/her password. |
|
53 |
define('USER_LEVEL_CHPREF', 3); |
|
54 |
||
55 |
// The level that you will be running at most of the time |
|
56 |
define('USER_LEVEL_MEMBER', 2); |
|
57 |
||
58 |
// Special level for guests |
|
59 |
define('USER_LEVEL_GUEST', 1); |
|
60 |
||
61 |
// Group status |
|
62 |
||
63 |
define('GROUP_CLOSED', 1); |
|
64 |
define('GROUP_REQUEST', 2); |
|
65 |
define('GROUP_HIDDEN', 3); |
|
66 |
define('GROUP_OPEN', 4); |
|
67 |
||
68 |
// Other stuff |
|
69 |
||
70 |
define('MAX_PMS_PER_BATCH', 7); // The maximum number of users that users can send PMs to in one go; restriction does not apply to users with mod_misc rights |
|
71 |
define('SEARCH_RESULTS_PER_PAGE', 10); |
|
72 |
define('MYSQL_MAX_PACKET_SIZE', 1048576); // 1MB; this is the default in MySQL 4.x I think |
|
310
78cb09a23e69
Made UX for Windows patch more pleasant including external documentation. Breaking change to dynamic download script.
Dan
parents:
294
diff
changeset
|
73 |
// don't change this next line in upstream (it has to be auto-patched by the dynamic download script) |
78cb09a23e69
Made UX for Windows patch more pleasant including external documentation. Breaking change to dynamic download script.
Dan
parents:
294
diff
changeset
|
74 |
// define('WINDOWS_MOD_REWRITE_WORKAROUNDS', ''); |
1 | 75 |
|
76 |
// Sidebar |
|
77 |
||
78 |
define('BLOCK_WIKIFORMAT', 0); |
|
79 |
define('BLOCK_TEMPLATEFORMAT', 1); |
|
80 |
define('BLOCK_HTML', 2); |
|
81 |
define('BLOCK_PHP', 3); |
|
82 |
define('BLOCK_PLUGIN', 4); |
|
83 |
define('SIDEBAR_LEFT', 1); |
|
84 |
define('SIDEBAR_RIGHT', 2); |
|
85 |
||
86 |
define('GENERAL_ERROR', 'General error'); |
|
87 |
define('GENERAL_NOTICE', 'Information'); |
|
88 |
define('CRITICAL_ERROR', 'Critical error'); |
|
89 |
||
90 |
// You can un-comment the next line to require database backups to be encrypted using the site's unique key. |
|
91 |
// This keeps the file safe in transit, but also prevents any type of editing to the file. This is NOT |
|
92 |
// recommended except for tiny sites because encrypting an average of 2MB of data will take a while. |
|
93 |
// define('SQL_BACKUP_CRYPT', ''); |
|
94 |
||
95 |
// Security |
|
96 |
||
98
6457a9b983c6
Fixed non-object reference in databaseless template, added locking for Javascript paginator, made comments on AES key size more clear in constants, and disallowed "anonymous" and IP addresses for admin username in install.php; Loch Ness release candidate
Dan
parents:
73
diff
changeset
|
97 |
// AES cipher strength - defaults to 192 and cannot be changed after installation. |
6457a9b983c6
Fixed non-object reference in databaseless template, added locking for Javascript paginator, made comments on AES key size more clear in constants, and disallowed "anonymous" and IP addresses for admin username in install.php; Loch Ness release candidate
Dan
parents:
73
diff
changeset
|
98 |
// This can be 128, 192, or 256. |
6457a9b983c6
Fixed non-object reference in databaseless template, added locking for Javascript paginator, made comments on AES key size more clear in constants, and disallowed "anonymous" and IP addresses for admin username in install.php; Loch Ness release candidate
Dan
parents:
73
diff
changeset
|
99 |
define('AES_BITS', 192); |
1 | 100 |
|
101 |
// Define this to enable Mcrypt support which makes encryption work faster. This is only triggered if Mcrypt support is detected. |
|
102 |
// THIS IS DISABLED BECAUSE MCRYPT DOES NOT SEEM TO SUPPORT THE AES BLOCK SIZES THAT ENANO USES. |
|
103 |
//define('MCRYPT_ACCEL', ''); |
|
104 |
||
105 |
//if(defined('MCRYPT_RIJNDAEL_' . AES_BITS)) |
|
106 |
//{ |
|
107 |
// eval('$bs = MCRYPT_RIJNDAEL_' . AES_BITS . ';'); |
|
108 |
// $bs = mcrypt_module_get_algo_block_size($bs); |
|
109 |
// $bs = $bs * 8; |
|
110 |
// define('AES_BLOCKSIZE', $bs); |
|
111 |
//} |
|
112 |
// else |
|
113 |
// { |
|
114 |
// define('AES_BLOCKSIZE', AES_BITS); |
|
115 |
// } |
|
116 |
||
117 |
define('AES_BLOCKSIZE', 128); |
|
118 |
||
119 |
/* |
|
120 |
* MIMETYPES |
|
121 |
* |
|
122 |
* This array defines the 166 known MIME types used by the Enano file-extension filter. Whether extensions are allowed or not is |
|
123 |
* determined by a bitfield in the config table. |
|
124 |
*/ |
|
125 |
||
126 |
global $mime_types, $mimetype_exps, $mimetype_extlist; |
|
127 |
||
128 |
// IMPORTANT: this array can NEVER have items removed from it or key indexes changed |
|
129 |
$mime_types = Array ( |
|
130 |
'ai' => 'application/postscript', |
|
131 |
'aif' => 'audio/x-aiff', |
|
132 |
'aifc' => 'audio/x-aiff', |
|
133 |
'aiff' => 'audio/x-aiff', |
|
134 |
'au' => 'audio/basic', |
|
135 |
'avi' => 'video/x-msvideo', |
|
136 |
'bcpio' => 'application/x-bcpio', |
|
137 |
'bin' => 'application/octet-stream', |
|
138 |
'bmp' => 'image/bmp', |
|
139 |
'bz2' => 'application/x-bzip', |
|
140 |
'cdf' => 'application/x-netcdf', |
|
141 |
'cgm' => 'image/cgm', |
|
142 |
'class' => 'application/octet-stream', |
|
143 |
'cpio' => 'application/x-cpio', |
|
144 |
'cpt' => 'application/mac-compactpro', |
|
145 |
'csh' => 'application/x-csh', |
|
146 |
'css' => 'text/css', |
|
147 |
'dcr' => 'application/x-director', |
|
148 |
'dir' => 'application/x-director', |
|
149 |
'djv' => 'image/vnd.djvu', |
|
150 |
'djvu' => 'image/vnd.djvu', |
|
151 |
'dll' => 'application/octet-stream', |
|
152 |
'dms' => 'application/octet-stream', |
|
153 |
'doc' => 'application/msword', |
|
154 |
'dtd' => 'application/xml-dtd', |
|
155 |
'dvi' => 'application/x-dvi', |
|
156 |
'dxr' => 'application/x-director', |
|
157 |
'eps' => 'application/postscript', |
|
158 |
'etx' => 'text/x-setext', |
|
159 |
'exe' => 'application/octet-stream', |
|
160 |
'ez' => 'application/andrew-inset', |
|
161 |
'gif' => 'image/gif', |
|
162 |
'gram' => 'application/srgs', |
|
163 |
'grxml' => 'application/srgs+xml', |
|
164 |
'gtar' => 'application/x-gtar', |
|
165 |
'gz' => 'application/x-gzip', |
|
166 |
'hdf' => 'application/x-hdf', |
|
167 |
'hqx' => 'application/mac-binhex40', |
|
168 |
'htm' => 'text/html', |
|
169 |
'html' => 'text/html', |
|
170 |
'ice' => 'x-conference/x-cooltalk', |
|
171 |
'ico' => 'image/x-icon', |
|
172 |
'ics' => 'text/calendar', |
|
173 |
'ief' => 'image/ief', |
|
174 |
'ifb' => 'text/calendar', |
|
175 |
'iges' => 'model/iges', |
|
176 |
'igs' => 'model/iges', |
|
177 |
'jar' => 'application/zip', |
|
178 |
'jpe' => 'image/jpeg', |
|
179 |
'jpeg' => 'image/jpeg', |
|
180 |
'jpg' => 'image/jpeg', |
|
181 |
'js' => 'application/x-javascript', |
|
182 |
'kar' => 'audio/midi', |
|
183 |
'latex' => 'application/x-latex', |
|
184 |
'lha' => 'application/octet-stream', |
|
185 |
'lzh' => 'application/octet-stream', |
|
186 |
'm3u' => 'audio/x-mpegurl', |
|
187 |
'man' => 'application/x-troff-man', |
|
188 |
'mathml' => 'application/mathml+xml', |
|
189 |
'me' => 'application/x-troff-me', |
|
190 |
'mesh' => 'model/mesh', |
|
191 |
'mid' => 'audio/midi', |
|
192 |
'midi' => 'audio/midi', |
|
193 |
'mif' => 'application/vnd.mif', |
|
194 |
'mov' => 'video/quicktime', |
|
195 |
'movie' => 'video/x-sgi-movie', |
|
196 |
'mp2' => 'audio/mpeg', |
|
197 |
'mp3' => 'audio/mpeg', |
|
198 |
'mpe' => 'video/mpeg', |
|
199 |
'mpeg' => 'video/mpeg', |
|
200 |
'mpg' => 'video/mpeg', |
|
201 |
'mpga' => 'audio/mpeg', |
|
202 |
'ms' => 'application/x-troff-ms', |
|
203 |
'msh' => 'model/mesh', |
|
204 |
'mxu' => 'video/vnd.mpegurl', |
|
205 |
'nc' => 'application/x-netcdf', |
|
206 |
'oda' => 'application/oda', |
|
207 |
'ogg' => 'application/ogg', |
|
208 |
'ogm' => 'application/ogg', |
|
209 |
'pbm' => 'image/x-portable-bitmap', |
|
210 |
'pdb' => 'chemical/x-pdb', |
|
211 |
'pdf' => 'application/pdf', |
|
212 |
'pgm' => 'image/x-portable-graymap', |
|
213 |
'pgn' => 'application/x-chess-pgn', |
|
214 |
'png' => 'image/png', |
|
215 |
'pnm' => 'image/x-portable-anymap', |
|
216 |
'ppm' => 'image/x-portable-pixmap', |
|
217 |
'ppt' => 'application/vnd.ms-powerpoint', |
|
218 |
'ps' => 'application/postscript', |
|
219 |
'psd' => 'image/x-photoshop', |
|
220 |
'qt' => 'video/quicktime', |
|
221 |
'ra' => 'audio/x-realaudio', |
|
222 |
'ram' => 'audio/x-pn-realaudio', |
|
223 |
'ras' => 'image/x-cmu-raster', |
|
224 |
'rdf' => 'text/xml', |
|
225 |
'rgb' => 'image/x-rgb', |
|
226 |
'rm' => 'audio/x-pn-realaudio', |
|
227 |
'roff' => 'application/x-troff', |
|
228 |
'rpm' => 'audio/x-pn-realaudio-plugin', |
|
229 |
'rss' => 'text/xml', |
|
230 |
'rtf' => 'text/rtf', |
|
231 |
'rtx' => 'text/richtext', |
|
232 |
'sgm' => 'text/sgml', |
|
233 |
'sgml' => 'text/sgml', |
|
234 |
'sh' => 'application/x-sh', |
|
235 |
'shar' => 'application/x-shar', |
|
236 |
'silo' => 'model/mesh', |
|
237 |
'sit' => 'application/x-stuffit', |
|
238 |
'skd' => 'application/x-koan', |
|
239 |
'skm' => 'application/x-koan', |
|
240 |
'skp' => 'application/x-koan', |
|
241 |
'skt' => 'application/x-koan', |
|
242 |
'smi' => 'application/smil', |
|
243 |
'smil' => 'application/smil', |
|
244 |
'snd' => 'audio/basic', |
|
245 |
'so' => 'application/octet-stream', |
|
246 |
'spl' => 'application/x-futuresplash', |
|
247 |
'src' => 'application/x-wais-source', |
|
248 |
'stc' => 'application/zip', |
|
249 |
'std' => 'application/zip', |
|
250 |
'sti' => 'application/zip', |
|
251 |
'stm' => 'application/zip', |
|
252 |
'stw' => 'application/zip', |
|
253 |
'sv4cpio' => 'application/x-sv4cpio', |
|
254 |
'sv4crc' => 'application/x-sv4crc', |
|
255 |
'svg' => 'image/svg+xml', |
|
256 |
'swf' => 'application/x-shockwave-flash', |
|
257 |
'sxc' => 'application/zip', |
|
258 |
'sxd' => 'application/zip', |
|
259 |
'sxi' => 'application/zip', |
|
260 |
'sxm' => 'application/zip', |
|
261 |
'sxw' => 'application/zip', |
|
262 |
't' => 'application/x-troff', |
|
263 |
'tar' => 'application/x-tar', |
|
264 |
'tcl' => 'application/x-tcl', |
|
265 |
'tex' => 'application/x-tex', |
|
266 |
'texi' => 'application/x-texinfo', |
|
267 |
'texinfo' => 'application/x-texinfo', |
|
268 |
'tif' => 'image/tiff', |
|
269 |
'tiff' => 'image/tiff', |
|
270 |
'tr' => 'application/x-troff', |
|
271 |
'tsv' => 'text/tab-separated-values', |
|
272 |
'txt' => 'text/plain', |
|
273 |
'ustar' => 'application/x-ustar', |
|
274 |
'vcd' => 'application/x-cdlink', |
|
275 |
'vrml' => 'model/vrml', |
|
276 |
'vxml' => 'application/voicexml+xml', |
|
277 |
'wav' => 'audio/x-wav', |
|
278 |
'wbmp' => 'image/vnd.wap.wbmp', |
|
279 |
'wbxml' => 'application/vnd.wap.wbxml', |
|
280 |
'wml' => 'text/vnd.wap.wml', |
|
281 |
'wmlc' => 'application/vnd.wap.wmlc', |
|
282 |
'wmls' => 'text/vnd.wap.wmlscript', |
|
283 |
'wmlsc' => 'application/vnd.wap.wmlscriptc', |
|
284 |
'wrl' => 'model/vrml', |
|
285 |
'xbm' => 'image/x-xbitmap', |
|
286 |
'xcf' => 'image/xcf', |
|
287 |
'xht' => 'application/xhtml+xml', |
|
288 |
'xhtml' => 'application/xhtml+xml', |
|
289 |
'xls' => 'application/vnd.ms-excel', |
|
290 |
'xml' => 'text/xml', |
|
291 |
'xpi' => 'application/zip', |
|
292 |
'xpm' => 'image/x-xpixmap', |
|
293 |
'xsl' => 'text/xml', |
|
294 |
'xslt' => 'text/xml', |
|
295 |
'xwd' => 'image/x-xwindowdump', |
|
296 |
'xyz' => 'chemical/x-xyz', |
|
297 |
'zip' => 'application/zip', |
|
236
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
298 |
'odt' => 'application/vnd.oasis.opendocument.text', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
299 |
'ott' => 'application/vnd.oasis.opendocument.text-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
300 |
'odg' => 'application/vnd.oasis.opendocument.graphics', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
301 |
'otg' => 'application/vnd.oasis.opendocument.graphics-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
302 |
'odp' => 'application/vnd.oasis.opendocument.presentation', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
303 |
'otp' => 'application/vnd.oasis.opendocument.presentation-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
304 |
'ods' => 'application/vnd.oasis.opendocument.spreadsheet', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
305 |
'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
306 |
'odc' => 'application/vnd.oasis.opendocument.chart', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
307 |
'otc' => 'application/vnd.oasis.opendocument.chart-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
308 |
'odi' => 'application/vnd.oasis.opendocument.image', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
309 |
'oti' => 'application/vnd.oasis.opendocument.image-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
310 |
'odf' => 'application/vnd.oasis.opendocument.formula', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
311 |
'otf' => 'application/vnd.oasis.opendocument.formula-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
312 |
'odm' => 'application/vnd.oasis.opendocument.text-master', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
313 |
'oth' => 'application/vnd.oasis.opendocument.text-web' |
1 | 314 |
); |
315 |
||
316 |
$mimetype_extlist = Array( |
|
317 |
'application/andrew-inset'=>'ez', |
|
318 |
'application/mac-binhex40'=>'hqx', |
|
319 |
'application/mac-compactpro'=>'cpt', |
|
320 |
'application/mathml+xml'=>'mathml', |
|
321 |
'application/msword'=>'doc', |
|
322 |
'application/octet-stream'=>'bin dms lha lzh exe class so dll', |
|
323 |
'application/oda'=>'oda', |
|
324 |
'application/ogg'=>'ogg ogm', |
|
325 |
'application/pdf'=>'pdf', |
|
326 |
'application/postscript'=>'ai eps ps', |
|
327 |
'application/rdf+xml'=>'rdf', |
|
328 |
'application/smil'=>'smi smil', |
|
329 |
'application/srgs'=>'gram', |
|
330 |
'application/srgs+xml'=>'grxml', |
|
331 |
'application/vnd.mif'=>'mif', |
|
332 |
'application/vnd.ms-excel'=>'xls', |
|
333 |
'application/vnd.ms-powerpoint'=>'ppt', |
|
334 |
'application/vnd.wap.wbxml'=>'wbxml', |
|
335 |
'application/vnd.wap.wmlc'=>'wmlc', |
|
336 |
'application/vnd.wap.wmlscriptc'=>'wmlsc', |
|
337 |
'application/voicexml+xml'=>'vxml', |
|
338 |
'application/x-bcpio'=>'bcpio', |
|
339 |
'application/x-bzip'=>'gz bz2', |
|
340 |
'application/x-cdlink'=>'vcd', |
|
341 |
'application/x-chess-pgn'=>'pgn', |
|
342 |
'application/x-cpio'=>'cpio', |
|
343 |
'application/x-csh'=>'csh', |
|
344 |
'application/x-director'=>'dcr dir dxr', |
|
345 |
'application/x-dvi'=>'dvi', |
|
346 |
'application/x-futuresplash'=>'spl', |
|
347 |
'application/x-gtar'=>'gtar tar', |
|
348 |
'application/x-gzip'=>'gz', |
|
349 |
'application/x-hdf'=>'hdf', |
|
350 |
'application/x-jar'=>'jar', |
|
351 |
'application/x-javascript'=>'js', |
|
352 |
'application/x-koan'=>'skp skd skt skm', |
|
353 |
'application/x-latex'=>'latex', |
|
354 |
'application/x-netcdf'=>'nc cdf', |
|
355 |
'application/x-sh'=>'sh', |
|
356 |
'application/x-shar'=>'shar', |
|
357 |
'application/x-shockwave-flash'=>'swf', |
|
358 |
'application/x-stuffit'=>'sit', |
|
359 |
'application/x-sv4cpio'=>'sv4cpio', |
|
360 |
'application/x-sv4crc'=>'sv4crc', |
|
361 |
'application/x-tar'=>'tar', |
|
362 |
'application/x-tcl'=>'tcl', |
|
363 |
'application/x-tex'=>'tex', |
|
364 |
'application/x-texinfo'=>'texinfo texi', |
|
365 |
'application/x-troff'=>'t tr roff', |
|
366 |
'application/x-troff-man'=>'man', |
|
367 |
'application/x-troff-me'=>'me', |
|
368 |
'application/x-troff-ms'=>'ms', |
|
369 |
'application/x-ustar'=>'ustar', |
|
370 |
'application/x-wais-source'=>'src', |
|
371 |
'application/x-xpinstall'=>'xpi', |
|
372 |
'application/xhtml+xml'=>'xhtml xht', |
|
373 |
'application/xslt+xml'=>'xslt', |
|
374 |
'application/xml'=>'xml xsl', |
|
375 |
'application/xml-dtd'=>'dtd', |
|
376 |
'application/zip'=>'zip jar xpi sxc stc sxd std sxi sti sxm stm sxw stw ', |
|
377 |
'audio/basic'=>'au snd', |
|
378 |
'audio/midi'=>'mid midi kar', |
|
379 |
'audio/mpeg'=>'mpga mp2 mp3', |
|
380 |
'audio/ogg'=>'ogg ', |
|
381 |
'audio/x-aiff'=>'aif aiff aifc', |
|
382 |
'audio/x-mpegurl'=>'m3u', |
|
383 |
'audio/x-ogg'=>'ogg ', |
|
384 |
'audio/x-pn-realaudio'=>'ram rm', |
|
385 |
'audio/x-pn-realaudio-plugin'=>'rpm', |
|
386 |
'audio/x-realaudio'=>'ra', |
|
387 |
'audio/x-wav'=>'wav', |
|
388 |
'chemical/x-pdb'=>'pdb', |
|
389 |
'chemical/x-xyz'=>'xyz', |
|
390 |
'image/bmp'=>'bmp', |
|
391 |
'image/cgm'=>'cgm', |
|
392 |
'image/gif'=>'gif', |
|
393 |
'image/ief'=>'ief', |
|
394 |
'image/jpeg'=>'jpeg jpg jpe', |
|
395 |
'image/png'=>'png', |
|
396 |
'image/svg+xml'=>'svg', |
|
397 |
'image/tiff'=>'tiff tif', |
|
398 |
'image/vnd.djvu'=>'djvu djv', |
|
399 |
'image/vnd.wap.wbmp'=>'wbmp', |
|
400 |
'image/x-cmu-raster'=>'ras', |
|
401 |
'image/x-icon'=>'ico', |
|
402 |
'image/x-portable-anymap'=>'pnm', |
|
403 |
'image/x-portable-bitmap'=>'pbm', |
|
404 |
'image/x-portable-graymap'=>'pgm', |
|
405 |
'image/x-portable-pixmap'=>'ppm', |
|
406 |
'image/x-rgb'=>'rgb', |
|
407 |
'image/x-photoshop'=>'psd', |
|
408 |
'image/x-xbitmap'=>'xbm', |
|
409 |
'image/x-xpixmap'=>'xpm', |
|
410 |
'image/x-xwindowdump'=>'xwd', |
|
411 |
'model/iges'=>'igs iges', |
|
412 |
'model/mesh'=>'msh mesh silo', |
|
413 |
'model/vrml'=>'wrl vrml', |
|
414 |
'text/calendar'=>'ics ifb', |
|
415 |
'text/css'=>'css', |
|
416 |
'text/html'=>'html htm', |
|
417 |
'text/plain'=>'txt', |
|
418 |
'text/richtext'=>'rtx', |
|
419 |
'text/rtf'=>'rtf', |
|
420 |
'text/sgml'=>'sgml sgm', |
|
421 |
'text/tab-separated-values'=>'tsv', |
|
422 |
'text/vnd.wap.wml'=>'wml', |
|
423 |
'text/vnd.wap.wmlscript'=>'wmls', |
|
424 |
'text/xml'=>'xml xsl xslt rss rdf', |
|
425 |
'text/x-setext'=>'etx', |
|
426 |
'video/mpeg'=>'mpeg mpg mpe', |
|
427 |
'video/ogg'=>'ogm ogg', |
|
428 |
'video/quicktime'=>'qt mov', |
|
429 |
'video/vnd.mpegurl'=>'mxu', |
|
430 |
'video/x-msvideo'=>'avi', |
|
431 |
'video/x-ogg'=>'ogm ogg', |
|
432 |
'video/x-sgi-movie'=>'movie', |
|
433 |
'x-conference/x-cooltalk'=>'ice', |
|
434 |
// Added for Enano |
|
435 |
'image/xcf' => 'xcf xcfbz2 xcf.bz2', |
|
236
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
436 |
'application/vnd.oasis.opendocument.text' => 'odt', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
437 |
'application/vnd.oasis.opendocument.text-template' => 'ott', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
438 |
'application/vnd.oasis.opendocument.graphics' => 'odg', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
439 |
'application/vnd.oasis.opendocument.graphics-template' => 'otg', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
440 |
'application/vnd.oasis.opendocument.presentation' => 'odp', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
441 |
'application/vnd.oasis.opendocument.presentation-template' => 'otp', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
442 |
'application/vnd.oasis.opendocument.spreadsheet' => 'ods', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
443 |
'application/vnd.oasis.opendocument.spreadsheet-template' => 'ots', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
444 |
'application/vnd.oasis.opendocument.chart' => 'odc', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
445 |
'application/vnd.oasis.opendocument.chart-template' => 'otc', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
446 |
'application/vnd.oasis.opendocument.image' => 'odi', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
447 |
'application/vnd.oasis.opendocument.image-template' => 'oti', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
448 |
'application/vnd.oasis.opendocument.formula' => 'odf', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
449 |
'application/vnd.oasis.opendocument.formula-template' => 'otf', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
450 |
'application/vnd.oasis.opendocument.text-master' => 'odm', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
218
diff
changeset
|
451 |
'application/vnd.oasis.opendocument.text-web' => 'oth' |
1 | 452 |
); |
453 |
||
454 |
$k = array_keys($mime_types); |
|
455 |
$mimetype_exps = Array(); |
|
456 |
foreach($k as $s => $x) |
|
457 |
{ |
|
458 |
$mimetype_exps[$x] = pow(2, $s); |
|
459 |
} |
|
460 |
||
461 |
unset($k, $s, $x); |