author | Dan |
Fri, 18 Jan 2008 10:35:33 -0500 | |
changeset 446 | 27f5ac58992c |
parent 322 | 5f1cd51bf1be |
child 326 | ab66d6d1f1f4 |
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 |
|
322
5f1cd51bf1be
Many changes. Installer with PostgreSQL is broken badly and will be for some time.
Dan
parents:
293
diff
changeset
|
5 |
* Version 1.0.3 (Dyrad) |
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); |
156
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 |
|
73 |
||
74 |
// Sidebar |
|
75 |
||
76 |
define('BLOCK_WIKIFORMAT', 0); |
|
77 |
define('BLOCK_TEMPLATEFORMAT', 1); |
|
78 |
define('BLOCK_HTML', 2); |
|
79 |
define('BLOCK_PHP', 3); |
|
80 |
define('BLOCK_PLUGIN', 4); |
|
81 |
define('SIDEBAR_LEFT', 1); |
|
82 |
define('SIDEBAR_RIGHT', 2); |
|
83 |
||
84 |
define('GENERAL_ERROR', 'General error'); |
|
85 |
define('GENERAL_NOTICE', 'Information'); |
|
86 |
define('CRITICAL_ERROR', 'Critical error'); |
|
87 |
||
88 |
// You can un-comment the next line to require database backups to be encrypted using the site's unique key. |
|
89 |
// This keeps the file safe in transit, but also prevents any type of editing to the file. This is NOT |
|
90 |
// recommended except for tiny sites because encrypting an average of 2MB of data will take a while. |
|
91 |
// define('SQL_BACKUP_CRYPT', ''); |
|
92 |
||
93 |
// Security |
|
94 |
||
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
|
95 |
// 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
|
96 |
// 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
|
97 |
define('AES_BITS', 192); |
1 | 98 |
|
99 |
// Define this to enable Mcrypt support which makes encryption work faster. This is only triggered if Mcrypt support is detected. |
|
100 |
// THIS IS DISABLED BECAUSE MCRYPT DOES NOT SEEM TO SUPPORT THE AES BLOCK SIZES THAT ENANO USES. |
|
101 |
//define('MCRYPT_ACCEL', ''); |
|
102 |
||
103 |
//if(defined('MCRYPT_RIJNDAEL_' . AES_BITS)) |
|
104 |
//{ |
|
105 |
// eval('$bs = MCRYPT_RIJNDAEL_' . AES_BITS . ';'); |
|
106 |
// $bs = mcrypt_module_get_algo_block_size($bs); |
|
107 |
// $bs = $bs * 8; |
|
108 |
// define('AES_BLOCKSIZE', $bs); |
|
109 |
//} |
|
110 |
// else |
|
111 |
// { |
|
112 |
// define('AES_BLOCKSIZE', AES_BITS); |
|
113 |
// } |
|
114 |
||
115 |
define('AES_BLOCKSIZE', 128); |
|
116 |
||
117 |
/* |
|
118 |
* MIMETYPES |
|
119 |
* |
|
120 |
* This array defines the 166 known MIME types used by the Enano file-extension filter. Whether extensions are allowed or not is |
|
121 |
* determined by a bitfield in the config table. |
|
122 |
*/ |
|
123 |
||
124 |
global $mime_types, $mimetype_exps, $mimetype_extlist; |
|
125 |
||
126 |
// IMPORTANT: this array can NEVER have items removed from it or key indexes changed |
|
127 |
$mime_types = Array ( |
|
128 |
'ai' => 'application/postscript', |
|
129 |
'aif' => 'audio/x-aiff', |
|
130 |
'aifc' => 'audio/x-aiff', |
|
131 |
'aiff' => 'audio/x-aiff', |
|
132 |
'au' => 'audio/basic', |
|
133 |
'avi' => 'video/x-msvideo', |
|
134 |
'bcpio' => 'application/x-bcpio', |
|
135 |
'bin' => 'application/octet-stream', |
|
136 |
'bmp' => 'image/bmp', |
|
137 |
'bz2' => 'application/x-bzip', |
|
138 |
'cdf' => 'application/x-netcdf', |
|
139 |
'cgm' => 'image/cgm', |
|
140 |
'class' => 'application/octet-stream', |
|
141 |
'cpio' => 'application/x-cpio', |
|
142 |
'cpt' => 'application/mac-compactpro', |
|
143 |
'csh' => 'application/x-csh', |
|
144 |
'css' => 'text/css', |
|
145 |
'dcr' => 'application/x-director', |
|
146 |
'dir' => 'application/x-director', |
|
147 |
'djv' => 'image/vnd.djvu', |
|
148 |
'djvu' => 'image/vnd.djvu', |
|
149 |
'dll' => 'application/octet-stream', |
|
150 |
'dms' => 'application/octet-stream', |
|
151 |
'doc' => 'application/msword', |
|
152 |
'dtd' => 'application/xml-dtd', |
|
153 |
'dvi' => 'application/x-dvi', |
|
154 |
'dxr' => 'application/x-director', |
|
155 |
'eps' => 'application/postscript', |
|
156 |
'etx' => 'text/x-setext', |
|
157 |
'exe' => 'application/octet-stream', |
|
158 |
'ez' => 'application/andrew-inset', |
|
159 |
'gif' => 'image/gif', |
|
160 |
'gram' => 'application/srgs', |
|
161 |
'grxml' => 'application/srgs+xml', |
|
162 |
'gtar' => 'application/x-gtar', |
|
163 |
'gz' => 'application/x-gzip', |
|
164 |
'hdf' => 'application/x-hdf', |
|
165 |
'hqx' => 'application/mac-binhex40', |
|
166 |
'htm' => 'text/html', |
|
167 |
'html' => 'text/html', |
|
168 |
'ice' => 'x-conference/x-cooltalk', |
|
169 |
'ico' => 'image/x-icon', |
|
170 |
'ics' => 'text/calendar', |
|
171 |
'ief' => 'image/ief', |
|
172 |
'ifb' => 'text/calendar', |
|
173 |
'iges' => 'model/iges', |
|
174 |
'igs' => 'model/iges', |
|
175 |
'jar' => 'application/zip', |
|
176 |
'jpe' => 'image/jpeg', |
|
177 |
'jpeg' => 'image/jpeg', |
|
178 |
'jpg' => 'image/jpeg', |
|
179 |
'js' => 'application/x-javascript', |
|
180 |
'kar' => 'audio/midi', |
|
181 |
'latex' => 'application/x-latex', |
|
182 |
'lha' => 'application/octet-stream', |
|
183 |
'lzh' => 'application/octet-stream', |
|
184 |
'm3u' => 'audio/x-mpegurl', |
|
185 |
'man' => 'application/x-troff-man', |
|
186 |
'mathml' => 'application/mathml+xml', |
|
187 |
'me' => 'application/x-troff-me', |
|
188 |
'mesh' => 'model/mesh', |
|
189 |
'mid' => 'audio/midi', |
|
190 |
'midi' => 'audio/midi', |
|
191 |
'mif' => 'application/vnd.mif', |
|
192 |
'mov' => 'video/quicktime', |
|
193 |
'movie' => 'video/x-sgi-movie', |
|
194 |
'mp2' => 'audio/mpeg', |
|
195 |
'mp3' => 'audio/mpeg', |
|
196 |
'mpe' => 'video/mpeg', |
|
197 |
'mpeg' => 'video/mpeg', |
|
198 |
'mpg' => 'video/mpeg', |
|
199 |
'mpga' => 'audio/mpeg', |
|
200 |
'ms' => 'application/x-troff-ms', |
|
201 |
'msh' => 'model/mesh', |
|
202 |
'mxu' => 'video/vnd.mpegurl', |
|
203 |
'nc' => 'application/x-netcdf', |
|
204 |
'oda' => 'application/oda', |
|
205 |
'ogg' => 'application/ogg', |
|
206 |
'ogm' => 'application/ogg', |
|
207 |
'pbm' => 'image/x-portable-bitmap', |
|
208 |
'pdb' => 'chemical/x-pdb', |
|
209 |
'pdf' => 'application/pdf', |
|
210 |
'pgm' => 'image/x-portable-graymap', |
|
211 |
'pgn' => 'application/x-chess-pgn', |
|
212 |
'png' => 'image/png', |
|
213 |
'pnm' => 'image/x-portable-anymap', |
|
214 |
'ppm' => 'image/x-portable-pixmap', |
|
215 |
'ppt' => 'application/vnd.ms-powerpoint', |
|
216 |
'ps' => 'application/postscript', |
|
217 |
'psd' => 'image/x-photoshop', |
|
218 |
'qt' => 'video/quicktime', |
|
219 |
'ra' => 'audio/x-realaudio', |
|
220 |
'ram' => 'audio/x-pn-realaudio', |
|
221 |
'ras' => 'image/x-cmu-raster', |
|
222 |
'rdf' => 'text/xml', |
|
223 |
'rgb' => 'image/x-rgb', |
|
224 |
'rm' => 'audio/x-pn-realaudio', |
|
225 |
'roff' => 'application/x-troff', |
|
226 |
'rpm' => 'audio/x-pn-realaudio-plugin', |
|
227 |
'rss' => 'text/xml', |
|
228 |
'rtf' => 'text/rtf', |
|
229 |
'rtx' => 'text/richtext', |
|
230 |
'sgm' => 'text/sgml', |
|
231 |
'sgml' => 'text/sgml', |
|
232 |
'sh' => 'application/x-sh', |
|
233 |
'shar' => 'application/x-shar', |
|
234 |
'silo' => 'model/mesh', |
|
235 |
'sit' => 'application/x-stuffit', |
|
236 |
'skd' => 'application/x-koan', |
|
237 |
'skm' => 'application/x-koan', |
|
238 |
'skp' => 'application/x-koan', |
|
239 |
'skt' => 'application/x-koan', |
|
240 |
'smi' => 'application/smil', |
|
241 |
'smil' => 'application/smil', |
|
242 |
'snd' => 'audio/basic', |
|
243 |
'so' => 'application/octet-stream', |
|
244 |
'spl' => 'application/x-futuresplash', |
|
245 |
'src' => 'application/x-wais-source', |
|
246 |
'stc' => 'application/zip', |
|
247 |
'std' => 'application/zip', |
|
248 |
'sti' => 'application/zip', |
|
249 |
'stm' => 'application/zip', |
|
250 |
'stw' => 'application/zip', |
|
251 |
'sv4cpio' => 'application/x-sv4cpio', |
|
252 |
'sv4crc' => 'application/x-sv4crc', |
|
253 |
'svg' => 'image/svg+xml', |
|
254 |
'swf' => 'application/x-shockwave-flash', |
|
255 |
'sxc' => 'application/zip', |
|
256 |
'sxd' => 'application/zip', |
|
257 |
'sxi' => 'application/zip', |
|
258 |
'sxm' => 'application/zip', |
|
259 |
'sxw' => 'application/zip', |
|
260 |
't' => 'application/x-troff', |
|
261 |
'tar' => 'application/x-tar', |
|
262 |
'tcl' => 'application/x-tcl', |
|
263 |
'tex' => 'application/x-tex', |
|
264 |
'texi' => 'application/x-texinfo', |
|
265 |
'texinfo' => 'application/x-texinfo', |
|
266 |
'tif' => 'image/tiff', |
|
267 |
'tiff' => 'image/tiff', |
|
268 |
'tr' => 'application/x-troff', |
|
269 |
'tsv' => 'text/tab-separated-values', |
|
270 |
'txt' => 'text/plain', |
|
271 |
'ustar' => 'application/x-ustar', |
|
272 |
'vcd' => 'application/x-cdlink', |
|
273 |
'vrml' => 'model/vrml', |
|
274 |
'vxml' => 'application/voicexml+xml', |
|
275 |
'wav' => 'audio/x-wav', |
|
276 |
'wbmp' => 'image/vnd.wap.wbmp', |
|
277 |
'wbxml' => 'application/vnd.wap.wbxml', |
|
278 |
'wml' => 'text/vnd.wap.wml', |
|
279 |
'wmlc' => 'application/vnd.wap.wmlc', |
|
280 |
'wmls' => 'text/vnd.wap.wmlscript', |
|
281 |
'wmlsc' => 'application/vnd.wap.wmlscriptc', |
|
282 |
'wrl' => 'model/vrml', |
|
283 |
'xbm' => 'image/x-xbitmap', |
|
284 |
'xcf' => 'image/xcf', |
|
285 |
'xht' => 'application/xhtml+xml', |
|
286 |
'xhtml' => 'application/xhtml+xml', |
|
287 |
'xls' => 'application/vnd.ms-excel', |
|
288 |
'xml' => 'text/xml', |
|
289 |
'xpi' => 'application/zip', |
|
290 |
'xpm' => 'image/x-xpixmap', |
|
291 |
'xsl' => 'text/xml', |
|
292 |
'xslt' => 'text/xml', |
|
293 |
'xwd' => 'image/x-xwindowdump', |
|
294 |
'xyz' => 'chemical/x-xyz', |
|
295 |
'zip' => 'application/zip', |
|
293
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
296 |
'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:
272
diff
changeset
|
297 |
'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:
272
diff
changeset
|
298 |
'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:
272
diff
changeset
|
299 |
'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:
272
diff
changeset
|
300 |
'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:
272
diff
changeset
|
301 |
'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:
272
diff
changeset
|
302 |
'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:
272
diff
changeset
|
303 |
'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:
272
diff
changeset
|
304 |
'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:
272
diff
changeset
|
305 |
'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:
272
diff
changeset
|
306 |
'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:
272
diff
changeset
|
307 |
'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:
272
diff
changeset
|
308 |
'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:
272
diff
changeset
|
309 |
'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:
272
diff
changeset
|
310 |
'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:
272
diff
changeset
|
311 |
'oth' => 'application/vnd.oasis.opendocument.text-web' |
1 | 312 |
); |
313 |
||
314 |
$mimetype_extlist = Array( |
|
315 |
'application/andrew-inset'=>'ez', |
|
316 |
'application/mac-binhex40'=>'hqx', |
|
317 |
'application/mac-compactpro'=>'cpt', |
|
318 |
'application/mathml+xml'=>'mathml', |
|
319 |
'application/msword'=>'doc', |
|
320 |
'application/octet-stream'=>'bin dms lha lzh exe class so dll', |
|
321 |
'application/oda'=>'oda', |
|
322 |
'application/ogg'=>'ogg ogm', |
|
323 |
'application/pdf'=>'pdf', |
|
324 |
'application/postscript'=>'ai eps ps', |
|
325 |
'application/rdf+xml'=>'rdf', |
|
326 |
'application/smil'=>'smi smil', |
|
327 |
'application/srgs'=>'gram', |
|
328 |
'application/srgs+xml'=>'grxml', |
|
329 |
'application/vnd.mif'=>'mif', |
|
330 |
'application/vnd.ms-excel'=>'xls', |
|
331 |
'application/vnd.ms-powerpoint'=>'ppt', |
|
332 |
'application/vnd.wap.wbxml'=>'wbxml', |
|
333 |
'application/vnd.wap.wmlc'=>'wmlc', |
|
334 |
'application/vnd.wap.wmlscriptc'=>'wmlsc', |
|
335 |
'application/voicexml+xml'=>'vxml', |
|
336 |
'application/x-bcpio'=>'bcpio', |
|
337 |
'application/x-bzip'=>'gz bz2', |
|
338 |
'application/x-cdlink'=>'vcd', |
|
339 |
'application/x-chess-pgn'=>'pgn', |
|
340 |
'application/x-cpio'=>'cpio', |
|
341 |
'application/x-csh'=>'csh', |
|
342 |
'application/x-director'=>'dcr dir dxr', |
|
343 |
'application/x-dvi'=>'dvi', |
|
344 |
'application/x-futuresplash'=>'spl', |
|
345 |
'application/x-gtar'=>'gtar tar', |
|
346 |
'application/x-gzip'=>'gz', |
|
347 |
'application/x-hdf'=>'hdf', |
|
348 |
'application/x-jar'=>'jar', |
|
349 |
'application/x-javascript'=>'js', |
|
350 |
'application/x-koan'=>'skp skd skt skm', |
|
351 |
'application/x-latex'=>'latex', |
|
352 |
'application/x-netcdf'=>'nc cdf', |
|
353 |
'application/x-sh'=>'sh', |
|
354 |
'application/x-shar'=>'shar', |
|
355 |
'application/x-shockwave-flash'=>'swf', |
|
356 |
'application/x-stuffit'=>'sit', |
|
357 |
'application/x-sv4cpio'=>'sv4cpio', |
|
358 |
'application/x-sv4crc'=>'sv4crc', |
|
359 |
'application/x-tar'=>'tar', |
|
360 |
'application/x-tcl'=>'tcl', |
|
361 |
'application/x-tex'=>'tex', |
|
362 |
'application/x-texinfo'=>'texinfo texi', |
|
363 |
'application/x-troff'=>'t tr roff', |
|
364 |
'application/x-troff-man'=>'man', |
|
365 |
'application/x-troff-me'=>'me', |
|
366 |
'application/x-troff-ms'=>'ms', |
|
367 |
'application/x-ustar'=>'ustar', |
|
368 |
'application/x-wais-source'=>'src', |
|
369 |
'application/x-xpinstall'=>'xpi', |
|
370 |
'application/xhtml+xml'=>'xhtml xht', |
|
371 |
'application/xslt+xml'=>'xslt', |
|
372 |
'application/xml'=>'xml xsl', |
|
373 |
'application/xml-dtd'=>'dtd', |
|
374 |
'application/zip'=>'zip jar xpi sxc stc sxd std sxi sti sxm stm sxw stw ', |
|
375 |
'audio/basic'=>'au snd', |
|
376 |
'audio/midi'=>'mid midi kar', |
|
377 |
'audio/mpeg'=>'mpga mp2 mp3', |
|
378 |
'audio/ogg'=>'ogg ', |
|
379 |
'audio/x-aiff'=>'aif aiff aifc', |
|
380 |
'audio/x-mpegurl'=>'m3u', |
|
381 |
'audio/x-ogg'=>'ogg ', |
|
382 |
'audio/x-pn-realaudio'=>'ram rm', |
|
383 |
'audio/x-pn-realaudio-plugin'=>'rpm', |
|
384 |
'audio/x-realaudio'=>'ra', |
|
385 |
'audio/x-wav'=>'wav', |
|
386 |
'chemical/x-pdb'=>'pdb', |
|
387 |
'chemical/x-xyz'=>'xyz', |
|
388 |
'image/bmp'=>'bmp', |
|
389 |
'image/cgm'=>'cgm', |
|
390 |
'image/gif'=>'gif', |
|
391 |
'image/ief'=>'ief', |
|
392 |
'image/jpeg'=>'jpeg jpg jpe', |
|
393 |
'image/png'=>'png', |
|
394 |
'image/svg+xml'=>'svg', |
|
395 |
'image/tiff'=>'tiff tif', |
|
396 |
'image/vnd.djvu'=>'djvu djv', |
|
397 |
'image/vnd.wap.wbmp'=>'wbmp', |
|
398 |
'image/x-cmu-raster'=>'ras', |
|
399 |
'image/x-icon'=>'ico', |
|
400 |
'image/x-portable-anymap'=>'pnm', |
|
401 |
'image/x-portable-bitmap'=>'pbm', |
|
402 |
'image/x-portable-graymap'=>'pgm', |
|
403 |
'image/x-portable-pixmap'=>'ppm', |
|
404 |
'image/x-rgb'=>'rgb', |
|
405 |
'image/x-photoshop'=>'psd', |
|
406 |
'image/x-xbitmap'=>'xbm', |
|
407 |
'image/x-xpixmap'=>'xpm', |
|
408 |
'image/x-xwindowdump'=>'xwd', |
|
409 |
'model/iges'=>'igs iges', |
|
410 |
'model/mesh'=>'msh mesh silo', |
|
411 |
'model/vrml'=>'wrl vrml', |
|
412 |
'text/calendar'=>'ics ifb', |
|
413 |
'text/css'=>'css', |
|
414 |
'text/html'=>'html htm', |
|
415 |
'text/plain'=>'txt', |
|
416 |
'text/richtext'=>'rtx', |
|
417 |
'text/rtf'=>'rtf', |
|
418 |
'text/sgml'=>'sgml sgm', |
|
419 |
'text/tab-separated-values'=>'tsv', |
|
420 |
'text/vnd.wap.wml'=>'wml', |
|
421 |
'text/vnd.wap.wmlscript'=>'wmls', |
|
422 |
'text/xml'=>'xml xsl xslt rss rdf', |
|
423 |
'text/x-setext'=>'etx', |
|
424 |
'video/mpeg'=>'mpeg mpg mpe', |
|
425 |
'video/ogg'=>'ogm ogg', |
|
426 |
'video/quicktime'=>'qt mov', |
|
427 |
'video/vnd.mpegurl'=>'mxu', |
|
428 |
'video/x-msvideo'=>'avi', |
|
429 |
'video/x-ogg'=>'ogm ogg', |
|
430 |
'video/x-sgi-movie'=>'movie', |
|
431 |
'x-conference/x-cooltalk'=>'ice', |
|
432 |
// Added for Enano |
|
433 |
'image/xcf' => 'xcf xcfbz2 xcf.bz2', |
|
293
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
434 |
'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:
272
diff
changeset
|
435 |
'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:
272
diff
changeset
|
436 |
'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:
272
diff
changeset
|
437 |
'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:
272
diff
changeset
|
438 |
'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:
272
diff
changeset
|
439 |
'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:
272
diff
changeset
|
440 |
'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:
272
diff
changeset
|
441 |
'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:
272
diff
changeset
|
442 |
'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:
272
diff
changeset
|
443 |
'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:
272
diff
changeset
|
444 |
'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:
272
diff
changeset
|
445 |
'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:
272
diff
changeset
|
446 |
'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:
272
diff
changeset
|
447 |
'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:
272
diff
changeset
|
448 |
'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:
272
diff
changeset
|
449 |
'application/vnd.oasis.opendocument.text-web' => 'oth' |
1 | 450 |
); |
451 |
||
452 |
$k = array_keys($mime_types); |
|
453 |
$mimetype_exps = Array(); |
|
454 |
foreach($k as $s => $x) |
|
455 |
{ |
|
456 |
$mimetype_exps[$x] = pow(2, $s); |
|
457 |
} |
|
458 |
||
459 |
unset($k, $s, $x); |