author | Dan |
Mon, 31 Dec 2007 21:43:51 -0500 | |
changeset 344 | be6c5fdd9203 |
parent 334 | c72b545f1304 |
child 345 | 4ccdfeee9a11 |
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 |
|
205 | 42 |
// Identifier for the default meta-language |
43 |
define('LANG_DEFAULT', 0); |
|
44 |
||
1 | 45 |
// |
46 |
// User types - don't touch these |
|
47 |
// |
|
48 |
||
49 |
// User can do absolutely everything |
|
50 |
define('USER_LEVEL_ADMIN', 9); |
|
51 |
||
52 |
// User can edit/[un]approve comments and do some basic administration |
|
53 |
define('USER_LEVEL_MOD', 5); |
|
54 |
||
55 |
// Default for members. When authed at this level, the user can change his/her password. |
|
56 |
define('USER_LEVEL_CHPREF', 3); |
|
57 |
||
58 |
// The level that you will be running at most of the time |
|
59 |
define('USER_LEVEL_MEMBER', 2); |
|
60 |
||
61 |
// Special level for guests |
|
62 |
define('USER_LEVEL_GUEST', 1); |
|
63 |
||
64 |
// Group status |
|
65 |
||
66 |
define('GROUP_CLOSED', 1); |
|
67 |
define('GROUP_REQUEST', 2); |
|
68 |
define('GROUP_HIDDEN', 3); |
|
69 |
define('GROUP_OPEN', 4); |
|
70 |
||
334
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
71 |
// Private message flags |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
72 |
define('PM_UNREAD', 1); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
73 |
define('PM_STARRED', 2); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
74 |
define('PM_SENT', 4); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
75 |
define('PM_DRAFT', 8); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
76 |
define('PM_ARCHIVE', 16); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
77 |
define('PM_TRASH', 32); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
78 |
define('PM_DELIVERED', 64); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
79 |
|
1 | 80 |
// Other stuff |
81 |
||
82 |
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 |
|
83 |
define('SEARCH_RESULTS_PER_PAGE', 10); |
|
84 |
define('MYSQL_MAX_PACKET_SIZE', 1048576); // 1MB; this is the default in MySQL 4.x I think |
|
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
85 |
define('ENANO_SUPPORT_AVATARS', 1); |
1 | 86 |
|
87 |
// Sidebar |
|
88 |
||
89 |
define('BLOCK_WIKIFORMAT', 0); |
|
90 |
define('BLOCK_TEMPLATEFORMAT', 1); |
|
91 |
define('BLOCK_HTML', 2); |
|
92 |
define('BLOCK_PHP', 3); |
|
93 |
define('BLOCK_PLUGIN', 4); |
|
94 |
define('SIDEBAR_LEFT', 1); |
|
95 |
define('SIDEBAR_RIGHT', 2); |
|
96 |
||
97 |
define('GENERAL_ERROR', 'General error'); |
|
98 |
define('GENERAL_NOTICE', 'Information'); |
|
99 |
define('CRITICAL_ERROR', 'Critical error'); |
|
100 |
||
101 |
// You can un-comment the next line to require database backups to be encrypted using the site's unique key. |
|
102 |
// This keeps the file safe in transit, but also prevents any type of editing to the file. This is NOT |
|
103 |
// recommended except for tiny sites because encrypting an average of 2MB of data will take a while. |
|
104 |
// define('SQL_BACKUP_CRYPT', ''); |
|
105 |
||
106 |
// Security |
|
107 |
||
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
|
108 |
// 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
|
109 |
// 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
|
110 |
define('AES_BITS', 192); |
1 | 111 |
|
112 |
// Define this to enable Mcrypt support which makes encryption work faster. This is only triggered if Mcrypt support is detected. |
|
113 |
// THIS IS DISABLED BECAUSE MCRYPT DOES NOT SEEM TO SUPPORT THE AES BLOCK SIZES THAT ENANO USES. |
|
114 |
//define('MCRYPT_ACCEL', ''); |
|
115 |
||
116 |
//if(defined('MCRYPT_RIJNDAEL_' . AES_BITS)) |
|
117 |
//{ |
|
118 |
// eval('$bs = MCRYPT_RIJNDAEL_' . AES_BITS . ';'); |
|
119 |
// $bs = mcrypt_module_get_algo_block_size($bs); |
|
120 |
// $bs = $bs * 8; |
|
121 |
// define('AES_BLOCKSIZE', $bs); |
|
122 |
//} |
|
123 |
// else |
|
124 |
// { |
|
125 |
// define('AES_BLOCKSIZE', AES_BITS); |
|
126 |
// } |
|
127 |
||
128 |
define('AES_BLOCKSIZE', 128); |
|
129 |
||
130 |
/* |
|
131 |
* MIMETYPES |
|
132 |
* |
|
133 |
* This array defines the 166 known MIME types used by the Enano file-extension filter. Whether extensions are allowed or not is |
|
134 |
* determined by a bitfield in the config table. |
|
135 |
*/ |
|
136 |
||
137 |
global $mime_types, $mimetype_exps, $mimetype_extlist; |
|
138 |
||
139 |
// IMPORTANT: this array can NEVER have items removed from it or key indexes changed |
|
140 |
$mime_types = Array ( |
|
141 |
'ai' => 'application/postscript', |
|
142 |
'aif' => 'audio/x-aiff', |
|
143 |
'aifc' => 'audio/x-aiff', |
|
144 |
'aiff' => 'audio/x-aiff', |
|
145 |
'au' => 'audio/basic', |
|
146 |
'avi' => 'video/x-msvideo', |
|
147 |
'bcpio' => 'application/x-bcpio', |
|
148 |
'bin' => 'application/octet-stream', |
|
149 |
'bmp' => 'image/bmp', |
|
150 |
'bz2' => 'application/x-bzip', |
|
151 |
'cdf' => 'application/x-netcdf', |
|
152 |
'cgm' => 'image/cgm', |
|
153 |
'class' => 'application/octet-stream', |
|
154 |
'cpio' => 'application/x-cpio', |
|
155 |
'cpt' => 'application/mac-compactpro', |
|
156 |
'csh' => 'application/x-csh', |
|
157 |
'css' => 'text/css', |
|
158 |
'dcr' => 'application/x-director', |
|
159 |
'dir' => 'application/x-director', |
|
160 |
'djv' => 'image/vnd.djvu', |
|
161 |
'djvu' => 'image/vnd.djvu', |
|
162 |
'dll' => 'application/octet-stream', |
|
163 |
'dms' => 'application/octet-stream', |
|
164 |
'doc' => 'application/msword', |
|
165 |
'dtd' => 'application/xml-dtd', |
|
166 |
'dvi' => 'application/x-dvi', |
|
167 |
'dxr' => 'application/x-director', |
|
168 |
'eps' => 'application/postscript', |
|
169 |
'etx' => 'text/x-setext', |
|
170 |
'exe' => 'application/octet-stream', |
|
171 |
'ez' => 'application/andrew-inset', |
|
172 |
'gif' => 'image/gif', |
|
173 |
'gram' => 'application/srgs', |
|
174 |
'grxml' => 'application/srgs+xml', |
|
175 |
'gtar' => 'application/x-gtar', |
|
176 |
'gz' => 'application/x-gzip', |
|
177 |
'hdf' => 'application/x-hdf', |
|
178 |
'hqx' => 'application/mac-binhex40', |
|
179 |
'htm' => 'text/html', |
|
180 |
'html' => 'text/html', |
|
181 |
'ice' => 'x-conference/x-cooltalk', |
|
182 |
'ico' => 'image/x-icon', |
|
183 |
'ics' => 'text/calendar', |
|
184 |
'ief' => 'image/ief', |
|
185 |
'ifb' => 'text/calendar', |
|
186 |
'iges' => 'model/iges', |
|
187 |
'igs' => 'model/iges', |
|
188 |
'jar' => 'application/zip', |
|
189 |
'jpe' => 'image/jpeg', |
|
190 |
'jpeg' => 'image/jpeg', |
|
191 |
'jpg' => 'image/jpeg', |
|
192 |
'js' => 'application/x-javascript', |
|
193 |
'kar' => 'audio/midi', |
|
194 |
'latex' => 'application/x-latex', |
|
195 |
'lha' => 'application/octet-stream', |
|
196 |
'lzh' => 'application/octet-stream', |
|
197 |
'm3u' => 'audio/x-mpegurl', |
|
198 |
'man' => 'application/x-troff-man', |
|
199 |
'mathml' => 'application/mathml+xml', |
|
200 |
'me' => 'application/x-troff-me', |
|
201 |
'mesh' => 'model/mesh', |
|
202 |
'mid' => 'audio/midi', |
|
203 |
'midi' => 'audio/midi', |
|
204 |
'mif' => 'application/vnd.mif', |
|
205 |
'mov' => 'video/quicktime', |
|
206 |
'movie' => 'video/x-sgi-movie', |
|
207 |
'mp2' => 'audio/mpeg', |
|
208 |
'mp3' => 'audio/mpeg', |
|
209 |
'mpe' => 'video/mpeg', |
|
210 |
'mpeg' => 'video/mpeg', |
|
211 |
'mpg' => 'video/mpeg', |
|
212 |
'mpga' => 'audio/mpeg', |
|
213 |
'ms' => 'application/x-troff-ms', |
|
214 |
'msh' => 'model/mesh', |
|
215 |
'mxu' => 'video/vnd.mpegurl', |
|
216 |
'nc' => 'application/x-netcdf', |
|
217 |
'oda' => 'application/oda', |
|
218 |
'ogg' => 'application/ogg', |
|
219 |
'ogm' => 'application/ogg', |
|
220 |
'pbm' => 'image/x-portable-bitmap', |
|
221 |
'pdb' => 'chemical/x-pdb', |
|
222 |
'pdf' => 'application/pdf', |
|
223 |
'pgm' => 'image/x-portable-graymap', |
|
224 |
'pgn' => 'application/x-chess-pgn', |
|
225 |
'png' => 'image/png', |
|
226 |
'pnm' => 'image/x-portable-anymap', |
|
227 |
'ppm' => 'image/x-portable-pixmap', |
|
228 |
'ppt' => 'application/vnd.ms-powerpoint', |
|
229 |
'ps' => 'application/postscript', |
|
230 |
'psd' => 'image/x-photoshop', |
|
231 |
'qt' => 'video/quicktime', |
|
232 |
'ra' => 'audio/x-realaudio', |
|
233 |
'ram' => 'audio/x-pn-realaudio', |
|
234 |
'ras' => 'image/x-cmu-raster', |
|
235 |
'rdf' => 'text/xml', |
|
236 |
'rgb' => 'image/x-rgb', |
|
237 |
'rm' => 'audio/x-pn-realaudio', |
|
238 |
'roff' => 'application/x-troff', |
|
239 |
'rpm' => 'audio/x-pn-realaudio-plugin', |
|
240 |
'rss' => 'text/xml', |
|
241 |
'rtf' => 'text/rtf', |
|
242 |
'rtx' => 'text/richtext', |
|
243 |
'sgm' => 'text/sgml', |
|
244 |
'sgml' => 'text/sgml', |
|
245 |
'sh' => 'application/x-sh', |
|
246 |
'shar' => 'application/x-shar', |
|
247 |
'silo' => 'model/mesh', |
|
248 |
'sit' => 'application/x-stuffit', |
|
249 |
'skd' => 'application/x-koan', |
|
250 |
'skm' => 'application/x-koan', |
|
251 |
'skp' => 'application/x-koan', |
|
252 |
'skt' => 'application/x-koan', |
|
253 |
'smi' => 'application/smil', |
|
254 |
'smil' => 'application/smil', |
|
255 |
'snd' => 'audio/basic', |
|
256 |
'so' => 'application/octet-stream', |
|
257 |
'spl' => 'application/x-futuresplash', |
|
258 |
'src' => 'application/x-wais-source', |
|
259 |
'stc' => 'application/zip', |
|
260 |
'std' => 'application/zip', |
|
261 |
'sti' => 'application/zip', |
|
262 |
'stm' => 'application/zip', |
|
263 |
'stw' => 'application/zip', |
|
264 |
'sv4cpio' => 'application/x-sv4cpio', |
|
265 |
'sv4crc' => 'application/x-sv4crc', |
|
266 |
'svg' => 'image/svg+xml', |
|
267 |
'swf' => 'application/x-shockwave-flash', |
|
268 |
'sxc' => 'application/zip', |
|
269 |
'sxd' => 'application/zip', |
|
270 |
'sxi' => 'application/zip', |
|
271 |
'sxm' => 'application/zip', |
|
272 |
'sxw' => 'application/zip', |
|
273 |
't' => 'application/x-troff', |
|
274 |
'tar' => 'application/x-tar', |
|
275 |
'tcl' => 'application/x-tcl', |
|
276 |
'tex' => 'application/x-tex', |
|
277 |
'texi' => 'application/x-texinfo', |
|
278 |
'texinfo' => 'application/x-texinfo', |
|
279 |
'tif' => 'image/tiff', |
|
280 |
'tiff' => 'image/tiff', |
|
281 |
'tr' => 'application/x-troff', |
|
282 |
'tsv' => 'text/tab-separated-values', |
|
283 |
'txt' => 'text/plain', |
|
284 |
'ustar' => 'application/x-ustar', |
|
285 |
'vcd' => 'application/x-cdlink', |
|
286 |
'vrml' => 'model/vrml', |
|
287 |
'vxml' => 'application/voicexml+xml', |
|
288 |
'wav' => 'audio/x-wav', |
|
289 |
'wbmp' => 'image/vnd.wap.wbmp', |
|
290 |
'wbxml' => 'application/vnd.wap.wbxml', |
|
291 |
'wml' => 'text/vnd.wap.wml', |
|
292 |
'wmlc' => 'application/vnd.wap.wmlc', |
|
293 |
'wmls' => 'text/vnd.wap.wmlscript', |
|
294 |
'wmlsc' => 'application/vnd.wap.wmlscriptc', |
|
295 |
'wrl' => 'model/vrml', |
|
296 |
'xbm' => 'image/x-xbitmap', |
|
297 |
'xcf' => 'image/xcf', |
|
298 |
'xht' => 'application/xhtml+xml', |
|
299 |
'xhtml' => 'application/xhtml+xml', |
|
300 |
'xls' => 'application/vnd.ms-excel', |
|
301 |
'xml' => 'text/xml', |
|
302 |
'xpi' => 'application/zip', |
|
303 |
'xpm' => 'image/x-xpixmap', |
|
304 |
'xsl' => 'text/xml', |
|
305 |
'xslt' => 'text/xml', |
|
306 |
'xwd' => 'image/x-xwindowdump', |
|
307 |
'xyz' => 'chemical/x-xyz', |
|
308 |
'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
|
309 |
'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
|
310 |
'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
|
311 |
'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
|
312 |
'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
|
313 |
'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
|
314 |
'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
|
315 |
'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
|
316 |
'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
|
317 |
'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
|
318 |
'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
|
319 |
'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
|
320 |
'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
|
321 |
'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
|
322 |
'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
|
323 |
'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
|
324 |
'oth' => 'application/vnd.oasis.opendocument.text-web' |
1 | 325 |
); |
326 |
||
327 |
$mimetype_extlist = Array( |
|
328 |
'application/andrew-inset'=>'ez', |
|
329 |
'application/mac-binhex40'=>'hqx', |
|
330 |
'application/mac-compactpro'=>'cpt', |
|
331 |
'application/mathml+xml'=>'mathml', |
|
332 |
'application/msword'=>'doc', |
|
333 |
'application/octet-stream'=>'bin dms lha lzh exe class so dll', |
|
334 |
'application/oda'=>'oda', |
|
335 |
'application/ogg'=>'ogg ogm', |
|
336 |
'application/pdf'=>'pdf', |
|
337 |
'application/postscript'=>'ai eps ps', |
|
338 |
'application/rdf+xml'=>'rdf', |
|
339 |
'application/smil'=>'smi smil', |
|
340 |
'application/srgs'=>'gram', |
|
341 |
'application/srgs+xml'=>'grxml', |
|
342 |
'application/vnd.mif'=>'mif', |
|
343 |
'application/vnd.ms-excel'=>'xls', |
|
344 |
'application/vnd.ms-powerpoint'=>'ppt', |
|
345 |
'application/vnd.wap.wbxml'=>'wbxml', |
|
346 |
'application/vnd.wap.wmlc'=>'wmlc', |
|
347 |
'application/vnd.wap.wmlscriptc'=>'wmlsc', |
|
348 |
'application/voicexml+xml'=>'vxml', |
|
349 |
'application/x-bcpio'=>'bcpio', |
|
350 |
'application/x-bzip'=>'gz bz2', |
|
351 |
'application/x-cdlink'=>'vcd', |
|
352 |
'application/x-chess-pgn'=>'pgn', |
|
353 |
'application/x-cpio'=>'cpio', |
|
354 |
'application/x-csh'=>'csh', |
|
355 |
'application/x-director'=>'dcr dir dxr', |
|
356 |
'application/x-dvi'=>'dvi', |
|
357 |
'application/x-futuresplash'=>'spl', |
|
358 |
'application/x-gtar'=>'gtar tar', |
|
359 |
'application/x-gzip'=>'gz', |
|
360 |
'application/x-hdf'=>'hdf', |
|
361 |
'application/x-jar'=>'jar', |
|
362 |
'application/x-javascript'=>'js', |
|
363 |
'application/x-koan'=>'skp skd skt skm', |
|
364 |
'application/x-latex'=>'latex', |
|
365 |
'application/x-netcdf'=>'nc cdf', |
|
366 |
'application/x-sh'=>'sh', |
|
367 |
'application/x-shar'=>'shar', |
|
368 |
'application/x-shockwave-flash'=>'swf', |
|
369 |
'application/x-stuffit'=>'sit', |
|
370 |
'application/x-sv4cpio'=>'sv4cpio', |
|
371 |
'application/x-sv4crc'=>'sv4crc', |
|
372 |
'application/x-tar'=>'tar', |
|
373 |
'application/x-tcl'=>'tcl', |
|
374 |
'application/x-tex'=>'tex', |
|
375 |
'application/x-texinfo'=>'texinfo texi', |
|
376 |
'application/x-troff'=>'t tr roff', |
|
377 |
'application/x-troff-man'=>'man', |
|
378 |
'application/x-troff-me'=>'me', |
|
379 |
'application/x-troff-ms'=>'ms', |
|
380 |
'application/x-ustar'=>'ustar', |
|
381 |
'application/x-wais-source'=>'src', |
|
382 |
'application/x-xpinstall'=>'xpi', |
|
383 |
'application/xhtml+xml'=>'xhtml xht', |
|
384 |
'application/xslt+xml'=>'xslt', |
|
385 |
'application/xml'=>'xml xsl', |
|
386 |
'application/xml-dtd'=>'dtd', |
|
387 |
'application/zip'=>'zip jar xpi sxc stc sxd std sxi sti sxm stm sxw stw ', |
|
388 |
'audio/basic'=>'au snd', |
|
389 |
'audio/midi'=>'mid midi kar', |
|
390 |
'audio/mpeg'=>'mpga mp2 mp3', |
|
391 |
'audio/ogg'=>'ogg ', |
|
392 |
'audio/x-aiff'=>'aif aiff aifc', |
|
393 |
'audio/x-mpegurl'=>'m3u', |
|
394 |
'audio/x-ogg'=>'ogg ', |
|
395 |
'audio/x-pn-realaudio'=>'ram rm', |
|
396 |
'audio/x-pn-realaudio-plugin'=>'rpm', |
|
397 |
'audio/x-realaudio'=>'ra', |
|
398 |
'audio/x-wav'=>'wav', |
|
399 |
'chemical/x-pdb'=>'pdb', |
|
400 |
'chemical/x-xyz'=>'xyz', |
|
401 |
'image/bmp'=>'bmp', |
|
402 |
'image/cgm'=>'cgm', |
|
403 |
'image/gif'=>'gif', |
|
404 |
'image/ief'=>'ief', |
|
405 |
'image/jpeg'=>'jpeg jpg jpe', |
|
406 |
'image/png'=>'png', |
|
407 |
'image/svg+xml'=>'svg', |
|
408 |
'image/tiff'=>'tiff tif', |
|
409 |
'image/vnd.djvu'=>'djvu djv', |
|
410 |
'image/vnd.wap.wbmp'=>'wbmp', |
|
411 |
'image/x-cmu-raster'=>'ras', |
|
412 |
'image/x-icon'=>'ico', |
|
413 |
'image/x-portable-anymap'=>'pnm', |
|
414 |
'image/x-portable-bitmap'=>'pbm', |
|
415 |
'image/x-portable-graymap'=>'pgm', |
|
416 |
'image/x-portable-pixmap'=>'ppm', |
|
417 |
'image/x-rgb'=>'rgb', |
|
418 |
'image/x-photoshop'=>'psd', |
|
419 |
'image/x-xbitmap'=>'xbm', |
|
420 |
'image/x-xpixmap'=>'xpm', |
|
421 |
'image/x-xwindowdump'=>'xwd', |
|
422 |
'model/iges'=>'igs iges', |
|
423 |
'model/mesh'=>'msh mesh silo', |
|
424 |
'model/vrml'=>'wrl vrml', |
|
425 |
'text/calendar'=>'ics ifb', |
|
426 |
'text/css'=>'css', |
|
427 |
'text/html'=>'html htm', |
|
428 |
'text/plain'=>'txt', |
|
429 |
'text/richtext'=>'rtx', |
|
430 |
'text/rtf'=>'rtf', |
|
431 |
'text/sgml'=>'sgml sgm', |
|
432 |
'text/tab-separated-values'=>'tsv', |
|
433 |
'text/vnd.wap.wml'=>'wml', |
|
434 |
'text/vnd.wap.wmlscript'=>'wmls', |
|
435 |
'text/xml'=>'xml xsl xslt rss rdf', |
|
436 |
'text/x-setext'=>'etx', |
|
437 |
'video/mpeg'=>'mpeg mpg mpe', |
|
438 |
'video/ogg'=>'ogm ogg', |
|
439 |
'video/quicktime'=>'qt mov', |
|
440 |
'video/vnd.mpegurl'=>'mxu', |
|
441 |
'video/x-msvideo'=>'avi', |
|
442 |
'video/x-ogg'=>'ogm ogg', |
|
443 |
'video/x-sgi-movie'=>'movie', |
|
444 |
'x-conference/x-cooltalk'=>'ice', |
|
445 |
// Added for Enano |
|
446 |
'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
|
447 |
'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
|
448 |
'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
|
449 |
'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
|
450 |
'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
|
451 |
'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
|
452 |
'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
|
453 |
'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
|
454 |
'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
|
455 |
'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
|
456 |
'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
|
457 |
'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
|
458 |
'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
|
459 |
'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
|
460 |
'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
|
461 |
'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
|
462 |
'application/vnd.oasis.opendocument.text-web' => 'oth' |
1 | 463 |
); |
464 |
||
465 |
$k = array_keys($mime_types); |
|
466 |
$mimetype_exps = Array(); |
|
467 |
foreach($k as $s => $x) |
|
468 |
{ |
|
469 |
$mimetype_exps[$x] = pow(2, $s); |
|
470 |
} |
|
471 |
||
472 |
unset($k, $s, $x); |
|
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
473 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
474 |
/****************************************************************************** |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
475 |
* Global Variable: JPEG_Segment_Names |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
476 |
* |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
477 |
* Contents: The names of the JPEG segment markers, indexed by their marker number. This data is from the PHP JPEG Metadata Toolkit. Licensed under the GPLv2 or later. |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
478 |
* |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
479 |
******************************************************************************/ |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
480 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
481 |
$GLOBALS[ "JPEG_Segment_Names" ] = array( |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
482 |
0xC0 => "SOF0", 0xC1 => "SOF1", 0xC2 => "SOF2", 0xC3 => "SOF4", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
483 |
0xC5 => "SOF5", 0xC6 => "SOF6", 0xC7 => "SOF7", 0xC8 => "JPG", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
484 |
0xC9 => "SOF9", 0xCA => "SOF10", 0xCB => "SOF11", 0xCD => "SOF13", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
485 |
0xCE => "SOF14", 0xCF => "SOF15", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
486 |
0xC4 => "DHT", 0xCC => "DAC", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
487 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
488 |
0xD0 => "RST0", 0xD1 => "RST1", 0xD2 => "RST2", 0xD3 => "RST3", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
489 |
0xD4 => "RST4", 0xD5 => "RST5", 0xD6 => "RST6", 0xD7 => "RST7", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
490 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
491 |
0xD8 => "SOI", 0xD9 => "EOI", 0xDA => "SOS", 0xDB => "DQT", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
492 |
0xDC => "DNL", 0xDD => "DRI", 0xDE => "DHP", 0xDF => "EXP", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
493 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
494 |
0xE0 => "APP0", 0xE1 => "APP1", 0xE2 => "APP2", 0xE3 => "APP3", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
495 |
0xE4 => "APP4", 0xE5 => "APP5", 0xE6 => "APP6", 0xE7 => "APP7", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
496 |
0xE8 => "APP8", 0xE9 => "APP9", 0xEA => "APP10", 0xEB => "APP11", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
497 |
0xEC => "APP12", 0xED => "APP13", 0xEE => "APP14", 0xEF => "APP15", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
498 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
499 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
500 |
0xF0 => "JPG0", 0xF1 => "JPG1", 0xF2 => "JPG2", 0xF3 => "JPG3", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
501 |
0xF4 => "JPG4", 0xF5 => "JPG5", 0xF6 => "JPG6", 0xF7 => "JPG7", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
502 |
0xF8 => "JPG8", 0xF9 => "JPG9", 0xFA => "JPG10", 0xFB => "JPG11", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
503 |
0xFC => "JPG12", 0xFD => "JPG13", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
504 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
505 |
0xFE => "COM", 0x01 => "TEM", 0x02 => "RES", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
506 |
); |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
507 |