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