includes/constants.php
changeset 1227 bdac73ed481e
parent 1101 30d8bb88572d
child 1324 612680c02316
equal deleted inserted replaced
1226:de56132c008d 1227:bdac73ed481e
   274 // significantly increase encryption strength either.
   274 // significantly increase encryption strength either.
   275 define('AES_BLOCKSIZE', 128);
   275 define('AES_BLOCKSIZE', 128);
   276 
   276 
   277 // Our list of tables included in Enano
   277 // Our list of tables included in Enano
   278 $system_table_list = Array(
   278 $system_table_list = Array(
   279     'categories',
   279 		'categories',
   280     'comments',
   280 		'comments',
   281     'config',
   281 		'config',
   282     'logs',
   282 		'logs',
   283     'page_text',
   283 		'page_text',
   284     'session_keys',
   284 		'session_keys',
   285     'pages',
   285 		'pages',
   286     'users',
   286 		'users',
   287     'users_extra',
   287 		'users_extra',
   288     'themes',
   288 		'themes',
   289     'buddies',
   289 		'buddies',
   290     'banlist',
   290 		'banlist',
   291     'files',
   291 		'files',
   292     'privmsgs',
   292 		'privmsgs',
   293     'sidebar',
   293 		'sidebar',
   294     'hits',
   294 		'hits',
   295     'groups',
   295 		'groups',
   296     'group_members',
   296 		'group_members',
   297     'acl',
   297 		'acl',
   298     'page_groups',
   298 		'page_groups',
   299     'page_group_members',
   299 		'page_group_members',
   300     'tags',
   300 		'tags',
   301     'language',
   301 		'language',
   302     'language_strings',
   302 		'language_strings',
   303     'lockout',
   303 		'lockout',
   304     'search_index',
   304 		'search_index',
   305     'captcha',
   305 		'captcha',
   306     'diffiehellman',
   306 		'diffiehellman',
   307     'plugins',
   307 		'plugins',
   308     'ranks'
   308 		'ranks'
   309   );
   309 	);
   310 
   310 
   311 if ( defined('table_prefix') && !defined('ENANO_TABLELIST_PREFIXED') )
   311 if ( defined('table_prefix') && !defined('ENANO_TABLELIST_PREFIXED') )
   312 {
   312 {
   313   define('ENANO_TABLELIST_PREFIXED', 1);
   313 	define('ENANO_TABLELIST_PREFIXED', 1);
   314   foreach ( $system_table_list as $i => $_ )
   314 	foreach ( $system_table_list as $i => $_ )
   315   {
   315 	{
   316     $system_table_list[$i] = table_prefix . $system_table_list[$i];
   316 		$system_table_list[$i] = table_prefix . $system_table_list[$i];
   317   }
   317 	}
   318 }
   318 }
   319 
   319 
   320 /*
   320 /*
   321  * MIMETYPES
   321  * MIMETYPES
   322  *
   322  *
   326 
   326 
   327 global $mime_types, $mimetype_exps, $mimetype_extlist;
   327 global $mime_types, $mimetype_exps, $mimetype_extlist;
   328 
   328 
   329 // IMPORTANT: this array can NEVER have items removed from it or key indexes changed
   329 // IMPORTANT: this array can NEVER have items removed from it or key indexes changed
   330 $mime_types = Array (
   330 $mime_types = Array (
   331   'ai'      => 'application/postscript',
   331 	'ai'      => 'application/postscript',
   332   'aif'     => 'audio/x-aiff',
   332 	'aif'     => 'audio/x-aiff',
   333   'aifc'    => 'audio/x-aiff',
   333 	'aifc'    => 'audio/x-aiff',
   334   'aiff'    => 'audio/x-aiff',
   334 	'aiff'    => 'audio/x-aiff',
   335   'au'      => 'audio/basic',
   335 	'au'      => 'audio/basic',
   336   'avi'     => 'video/x-msvideo',
   336 	'avi'     => 'video/x-msvideo',
   337   'bcpio'   => 'application/x-bcpio',
   337 	'bcpio'   => 'application/x-bcpio',
   338   'bin'     => 'application/octet-stream',
   338 	'bin'     => 'application/octet-stream',
   339   'bmp'     => 'image/bmp',
   339 	'bmp'     => 'image/bmp',
   340   'bz2'     => 'application/x-bzip',
   340 	'bz2'     => 'application/x-bzip',
   341   'cdf'     => 'application/x-netcdf',
   341 	'cdf'     => 'application/x-netcdf',
   342   'cgm'     => 'image/cgm',
   342 	'cgm'     => 'image/cgm',
   343   'class'   => 'application/octet-stream',
   343 	'class'   => 'application/octet-stream',
   344   'cpio'    => 'application/x-cpio',
   344 	'cpio'    => 'application/x-cpio',
   345   'cpt'     => 'application/mac-compactpro',
   345 	'cpt'     => 'application/mac-compactpro',
   346   'csh'     => 'application/x-csh',
   346 	'csh'     => 'application/x-csh',
   347   'css'     => 'text/css',
   347 	'css'     => 'text/css',
   348   'dcr'     => 'application/x-director',
   348 	'dcr'     => 'application/x-director',
   349   'dir'     => 'application/x-director',
   349 	'dir'     => 'application/x-director',
   350   'djv'     => 'image/vnd.djvu',
   350 	'djv'     => 'image/vnd.djvu',
   351   'djvu'    => 'image/vnd.djvu',
   351 	'djvu'    => 'image/vnd.djvu',
   352   'dll'     => 'application/octet-stream',
   352 	'dll'     => 'application/octet-stream',
   353   'dms'     => 'application/octet-stream',
   353 	'dms'     => 'application/octet-stream',
   354   'doc'     => 'application/msword',
   354 	'doc'     => 'application/msword',
   355   'dtd'     => 'application/xml-dtd',
   355 	'dtd'     => 'application/xml-dtd',
   356   'dvi'     => 'application/x-dvi',
   356 	'dvi'     => 'application/x-dvi',
   357   'dxr'     => 'application/x-director',
   357 	'dxr'     => 'application/x-director',
   358   'eps'     => 'application/postscript',
   358 	'eps'     => 'application/postscript',
   359   'etx'     => 'text/x-setext',
   359 	'etx'     => 'text/x-setext',
   360   'exe'     => 'application/octet-stream',
   360 	'exe'     => 'application/octet-stream',
   361   'ez'      => 'application/andrew-inset',
   361 	'ez'      => 'application/andrew-inset',
   362   'gif'     => 'image/gif',
   362 	'gif'     => 'image/gif',
   363   'gram'    => 'application/srgs',
   363 	'gram'    => 'application/srgs',
   364   'grxml'   => 'application/srgs+xml',
   364 	'grxml'   => 'application/srgs+xml',
   365   'gtar'    => 'application/x-gtar',
   365 	'gtar'    => 'application/x-gtar',
   366   'gz'      => 'application/x-gzip',
   366 	'gz'      => 'application/x-gzip',
   367   'hdf'     => 'application/x-hdf',
   367 	'hdf'     => 'application/x-hdf',
   368   'hqx'     => 'application/mac-binhex40',
   368 	'hqx'     => 'application/mac-binhex40',
   369   'htm'     => 'text/html',
   369 	'htm'     => 'text/html',
   370   'html'    => 'text/html',
   370 	'html'    => 'text/html',
   371   'ice'     => 'x-conference/x-cooltalk',
   371 	'ice'     => 'x-conference/x-cooltalk',
   372   'ico'     => 'image/x-icon',
   372 	'ico'     => 'image/x-icon',
   373   'ics'     => 'text/calendar',
   373 	'ics'     => 'text/calendar',
   374   'ief'     => 'image/ief',
   374 	'ief'     => 'image/ief',
   375   'ifb'     => 'text/calendar',
   375 	'ifb'     => 'text/calendar',
   376   'iges'    => 'model/iges',
   376 	'iges'    => 'model/iges',
   377   'igs'     => 'model/iges',
   377 	'igs'     => 'model/iges',
   378   'jar'     => 'application/zip',
   378 	'jar'     => 'application/zip',
   379   'jpe'     => 'image/jpeg',
   379 	'jpe'     => 'image/jpeg',
   380   'jpeg'    => 'image/jpeg',
   380 	'jpeg'    => 'image/jpeg',
   381   'jpg'     => 'image/jpeg',
   381 	'jpg'     => 'image/jpeg',
   382   'js'      => 'application/x-javascript',
   382 	'js'      => 'application/x-javascript',
   383   'kar'     => 'audio/midi',
   383 	'kar'     => 'audio/midi',
   384   'latex'   => 'application/x-latex',
   384 	'latex'   => 'application/x-latex',
   385   'lha'     => 'application/octet-stream',
   385 	'lha'     => 'application/octet-stream',
   386   'lzh'     => 'application/octet-stream',
   386 	'lzh'     => 'application/octet-stream',
   387   'm3u'     => 'audio/x-mpegurl',
   387 	'm3u'     => 'audio/x-mpegurl',
   388   'man'     => 'application/x-troff-man',
   388 	'man'     => 'application/x-troff-man',
   389   'mathml'  => 'application/mathml+xml',
   389 	'mathml'  => 'application/mathml+xml',
   390   'me'      => 'application/x-troff-me',
   390 	'me'      => 'application/x-troff-me',
   391   'mesh'    => 'model/mesh',
   391 	'mesh'    => 'model/mesh',
   392   'mid'     => 'audio/midi',
   392 	'mid'     => 'audio/midi',
   393   'midi'    => 'audio/midi',
   393 	'midi'    => 'audio/midi',
   394   'mif'     => 'application/vnd.mif',
   394 	'mif'     => 'application/vnd.mif',
   395   'mov'     => 'video/quicktime',
   395 	'mov'     => 'video/quicktime',
   396   'movie'   => 'video/x-sgi-movie',
   396 	'movie'   => 'video/x-sgi-movie',
   397   'mp2'     => 'audio/mpeg',
   397 	'mp2'     => 'audio/mpeg',
   398   'mp3'     => 'audio/mpeg',
   398 	'mp3'     => 'audio/mpeg',
   399   'mpe'     => 'video/mpeg',
   399 	'mpe'     => 'video/mpeg',
   400   'mpeg'    => 'video/mpeg',
   400 	'mpeg'    => 'video/mpeg',
   401   'mpg'     => 'video/mpeg',
   401 	'mpg'     => 'video/mpeg',
   402   'mpga'    => 'audio/mpeg',
   402 	'mpga'    => 'audio/mpeg',
   403   'ms'      => 'application/x-troff-ms',
   403 	'ms'      => 'application/x-troff-ms',
   404   'msh'     => 'model/mesh',
   404 	'msh'     => 'model/mesh',
   405   'mxu'     => 'video/vnd.mpegurl',
   405 	'mxu'     => 'video/vnd.mpegurl',
   406   'nc'      => 'application/x-netcdf',
   406 	'nc'      => 'application/x-netcdf',
   407   'oda'     => 'application/oda',
   407 	'oda'     => 'application/oda',
   408   'ogg'     => 'application/ogg',
   408 	'ogg'     => 'application/ogg',
   409   'ogm'     => 'application/ogg',
   409 	'ogm'     => 'application/ogg',
   410   'pbm'     => 'image/x-portable-bitmap',
   410 	'pbm'     => 'image/x-portable-bitmap',
   411   'pdb'     => 'chemical/x-pdb',
   411 	'pdb'     => 'chemical/x-pdb',
   412   'pdf'     => 'application/pdf',
   412 	'pdf'     => 'application/pdf',
   413   'pgm'     => 'image/x-portable-graymap',
   413 	'pgm'     => 'image/x-portable-graymap',
   414   'pgn'     => 'application/x-chess-pgn',
   414 	'pgn'     => 'application/x-chess-pgn',
   415   'png'     => 'image/png',
   415 	'png'     => 'image/png',
   416   'pnm'     => 'image/x-portable-anymap',
   416 	'pnm'     => 'image/x-portable-anymap',
   417   'ppm'     => 'image/x-portable-pixmap',
   417 	'ppm'     => 'image/x-portable-pixmap',
   418   'ppt'     => 'application/vnd.ms-powerpoint',
   418 	'ppt'     => 'application/vnd.ms-powerpoint',
   419   'ps'      => 'application/postscript',
   419 	'ps'      => 'application/postscript',
   420   'psd'     => 'image/x-photoshop',
   420 	'psd'     => 'image/x-photoshop',
   421   'qt'      => 'video/quicktime',
   421 	'qt'      => 'video/quicktime',
   422   'ra'      => 'audio/x-realaudio',
   422 	'ra'      => 'audio/x-realaudio',
   423   'ram'     => 'audio/x-pn-realaudio',
   423 	'ram'     => 'audio/x-pn-realaudio',
   424   'ras'     => 'image/x-cmu-raster',
   424 	'ras'     => 'image/x-cmu-raster',
   425   'rdf'     => 'text/xml',
   425 	'rdf'     => 'text/xml',
   426   'rgb'     => 'image/x-rgb',
   426 	'rgb'     => 'image/x-rgb',
   427   'rm'      => 'audio/x-pn-realaudio',
   427 	'rm'      => 'audio/x-pn-realaudio',
   428   'roff'    => 'application/x-troff',
   428 	'roff'    => 'application/x-troff',
   429   'rpm'     => 'audio/x-pn-realaudio-plugin',
   429 	'rpm'     => 'audio/x-pn-realaudio-plugin',
   430   'rss'     => 'text/xml',
   430 	'rss'     => 'text/xml',
   431   'rtf'     => 'text/rtf',
   431 	'rtf'     => 'text/rtf',
   432   'rtx'     => 'text/richtext',
   432 	'rtx'     => 'text/richtext',
   433   'sgm'     => 'text/sgml',
   433 	'sgm'     => 'text/sgml',
   434   'sgml'    => 'text/sgml',
   434 	'sgml'    => 'text/sgml',
   435   'sh'      => 'application/x-sh',
   435 	'sh'      => 'application/x-sh',
   436   'shar'    => 'application/x-shar',
   436 	'shar'    => 'application/x-shar',
   437   'silo'    => 'model/mesh',
   437 	'silo'    => 'model/mesh',
   438   'sit'     => 'application/x-stuffit',
   438 	'sit'     => 'application/x-stuffit',
   439   'skd'     => 'application/x-koan',
   439 	'skd'     => 'application/x-koan',
   440   'skm'     => 'application/x-koan',
   440 	'skm'     => 'application/x-koan',
   441   'skp'     => 'application/x-koan',
   441 	'skp'     => 'application/x-koan',
   442   'skt'     => 'application/x-koan',
   442 	'skt'     => 'application/x-koan',
   443   'smi'     => 'application/smil',
   443 	'smi'     => 'application/smil',
   444   'smil'    => 'application/smil',
   444 	'smil'    => 'application/smil',
   445   'snd'     => 'audio/basic',
   445 	'snd'     => 'audio/basic',
   446   'so'      => 'application/octet-stream',
   446 	'so'      => 'application/octet-stream',
   447   'spl'     => 'application/x-futuresplash',
   447 	'spl'     => 'application/x-futuresplash',
   448   'src'     => 'application/x-wais-source',
   448 	'src'     => 'application/x-wais-source',
   449   'stc'     => 'application/zip',
   449 	'stc'     => 'application/zip',
   450   'std'     => 'application/zip',
   450 	'std'     => 'application/zip',
   451   'sti'     => 'application/zip',
   451 	'sti'     => 'application/zip',
   452   'stm'     => 'application/zip',
   452 	'stm'     => 'application/zip',
   453   'stw'     => 'application/zip',
   453 	'stw'     => 'application/zip',
   454   'sv4cpio' => 'application/x-sv4cpio',
   454 	'sv4cpio' => 'application/x-sv4cpio',
   455   'sv4crc'  => 'application/x-sv4crc',
   455 	'sv4crc'  => 'application/x-sv4crc',
   456   'svg'     => 'image/svg+xml',
   456 	'svg'     => 'image/svg+xml',
   457   'swf'     => 'application/x-shockwave-flash',
   457 	'swf'     => 'application/x-shockwave-flash',
   458   'sxc'     => 'application/zip',
   458 	'sxc'     => 'application/zip',
   459   'sxd'     => 'application/zip',
   459 	'sxd'     => 'application/zip',
   460   'sxi'     => 'application/zip',
   460 	'sxi'     => 'application/zip',
   461   'sxm'     => 'application/zip',
   461 	'sxm'     => 'application/zip',
   462   'sxw'     => 'application/zip',
   462 	'sxw'     => 'application/zip',
   463   't'       => 'application/x-troff',
   463 	't'       => 'application/x-troff',
   464   'tar'     => 'application/x-tar',
   464 	'tar'     => 'application/x-tar',
   465   'tcl'     => 'application/x-tcl',
   465 	'tcl'     => 'application/x-tcl',
   466   'tex'     => 'application/x-tex',
   466 	'tex'     => 'application/x-tex',
   467   'texi'    => 'application/x-texinfo',
   467 	'texi'    => 'application/x-texinfo',
   468   'texinfo' => 'application/x-texinfo',
   468 	'texinfo' => 'application/x-texinfo',
   469   'tif'     => 'image/tiff',
   469 	'tif'     => 'image/tiff',
   470   'tiff'    => 'image/tiff',
   470 	'tiff'    => 'image/tiff',
   471   'tr'      => 'application/x-troff',
   471 	'tr'      => 'application/x-troff',
   472   'tsv'     => 'text/tab-separated-values',
   472 	'tsv'     => 'text/tab-separated-values',
   473   'txt'     => 'text/plain',
   473 	'txt'     => 'text/plain',
   474   'ustar'   => 'application/x-ustar',
   474 	'ustar'   => 'application/x-ustar',
   475   'vcd'     => 'application/x-cdlink',
   475 	'vcd'     => 'application/x-cdlink',
   476   'vrml'    => 'model/vrml',
   476 	'vrml'    => 'model/vrml',
   477   'vxml'    => 'application/voicexml+xml',
   477 	'vxml'    => 'application/voicexml+xml',
   478   'wav'     => 'audio/x-wav',
   478 	'wav'     => 'audio/x-wav',
   479   'wbmp'    => 'image/vnd.wap.wbmp',
   479 	'wbmp'    => 'image/vnd.wap.wbmp',
   480   'wbxml'   => 'application/vnd.wap.wbxml',
   480 	'wbxml'   => 'application/vnd.wap.wbxml',
   481   'wml'     => 'text/vnd.wap.wml',
   481 	'wml'     => 'text/vnd.wap.wml',
   482   'wmlc'    => 'application/vnd.wap.wmlc',
   482 	'wmlc'    => 'application/vnd.wap.wmlc',
   483   'wmls'    => 'text/vnd.wap.wmlscript',
   483 	'wmls'    => 'text/vnd.wap.wmlscript',
   484   'wmlsc'   => 'application/vnd.wap.wmlscriptc',
   484 	'wmlsc'   => 'application/vnd.wap.wmlscriptc',
   485   'wrl'     => 'model/vrml',
   485 	'wrl'     => 'model/vrml',
   486   'xbm'     => 'image/x-xbitmap',
   486 	'xbm'     => 'image/x-xbitmap',
   487   'xcf'     => 'image/xcf',
   487 	'xcf'     => 'image/xcf',
   488   'xht'     => 'application/xhtml+xml',
   488 	'xht'     => 'application/xhtml+xml',
   489   'xhtml'   => 'application/xhtml+xml',
   489 	'xhtml'   => 'application/xhtml+xml',
   490   'xls'     => 'application/vnd.ms-excel',
   490 	'xls'     => 'application/vnd.ms-excel',
   491   'xml'     => 'text/xml',
   491 	'xml'     => 'text/xml',
   492   'xpi'     => 'application/zip',
   492 	'xpi'     => 'application/zip',
   493   'xpm'     => 'image/x-xpixmap',
   493 	'xpm'     => 'image/x-xpixmap',
   494   'xsl'     => 'text/xml',
   494 	'xsl'     => 'text/xml',
   495   'xslt'    => 'text/xml',
   495 	'xslt'    => 'text/xml',
   496   'xwd'     => 'image/x-xwindowdump',
   496 	'xwd'     => 'image/x-xwindowdump',
   497   'xyz'     => 'chemical/x-xyz',
   497 	'xyz'     => 'chemical/x-xyz',
   498   'zip'     => 'application/zip',
   498 	'zip'     => 'application/zip',
   499   'odt' => 'application/vnd.oasis.opendocument.text',
   499 	'odt' => 'application/vnd.oasis.opendocument.text',
   500   'ott' => 'application/vnd.oasis.opendocument.text-template',
   500 	'ott' => 'application/vnd.oasis.opendocument.text-template',
   501   'odg' => 'application/vnd.oasis.opendocument.graphics',
   501 	'odg' => 'application/vnd.oasis.opendocument.graphics',
   502   'otg' => 'application/vnd.oasis.opendocument.graphics-template',
   502 	'otg' => 'application/vnd.oasis.opendocument.graphics-template',
   503   'odp' => 'application/vnd.oasis.opendocument.presentation',
   503 	'odp' => 'application/vnd.oasis.opendocument.presentation',
   504   'otp' => 'application/vnd.oasis.opendocument.presentation-template',
   504 	'otp' => 'application/vnd.oasis.opendocument.presentation-template',
   505   'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
   505 	'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
   506   'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
   506 	'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
   507   'odc' => 'application/vnd.oasis.opendocument.chart',
   507 	'odc' => 'application/vnd.oasis.opendocument.chart',
   508   'otc' => 'application/vnd.oasis.opendocument.chart-template',
   508 	'otc' => 'application/vnd.oasis.opendocument.chart-template',
   509   'odi' => 'application/vnd.oasis.opendocument.image',
   509 	'odi' => 'application/vnd.oasis.opendocument.image',
   510   'oti' => 'application/vnd.oasis.opendocument.image-template',
   510 	'oti' => 'application/vnd.oasis.opendocument.image-template',
   511   'odf' => 'application/vnd.oasis.opendocument.formula',
   511 	'odf' => 'application/vnd.oasis.opendocument.formula',
   512   'otf' => 'application/vnd.oasis.opendocument.formula-template',
   512 	'otf' => 'application/vnd.oasis.opendocument.formula-template',
   513   'odm' => 'application/vnd.oasis.opendocument.text-master',
   513 	'odm' => 'application/vnd.oasis.opendocument.text-master',
   514   'oth' => 'application/vnd.oasis.opendocument.text-web'
   514 	'oth' => 'application/vnd.oasis.opendocument.text-web'
   515 );
   515 );
   516 
   516 
   517 $mimetype_extlist = Array(
   517 $mimetype_extlist = Array(
   518   'application/andrew-inset'=>'ez',
   518 	'application/andrew-inset'=>'ez',
   519   'application/mac-binhex40'=>'hqx',
   519 	'application/mac-binhex40'=>'hqx',
   520   'application/mac-compactpro'=>'cpt',
   520 	'application/mac-compactpro'=>'cpt',
   521   'application/mathml+xml'=>'mathml',
   521 	'application/mathml+xml'=>'mathml',
   522   'application/msword'=>'doc',
   522 	'application/msword'=>'doc',
   523   'application/octet-stream'=>'bin dms lha lzh exe class so dll',
   523 	'application/octet-stream'=>'bin dms lha lzh exe class so dll',
   524   'application/oda'=>'oda',
   524 	'application/oda'=>'oda',
   525   'application/ogg'=>'ogg ogm',
   525 	'application/ogg'=>'ogg ogm',
   526   'application/pdf'=>'pdf',
   526 	'application/pdf'=>'pdf',
   527   'application/postscript'=>'ai eps ps',
   527 	'application/postscript'=>'ai eps ps',
   528   'application/rdf+xml'=>'rdf',
   528 	'application/rdf+xml'=>'rdf',
   529   'application/smil'=>'smi smil',
   529 	'application/smil'=>'smi smil',
   530   'application/srgs'=>'gram',
   530 	'application/srgs'=>'gram',
   531   'application/srgs+xml'=>'grxml',
   531 	'application/srgs+xml'=>'grxml',
   532   'application/vnd.mif'=>'mif',
   532 	'application/vnd.mif'=>'mif',
   533   'application/vnd.ms-excel'=>'xls',
   533 	'application/vnd.ms-excel'=>'xls',
   534   'application/vnd.ms-powerpoint'=>'ppt',
   534 	'application/vnd.ms-powerpoint'=>'ppt',
   535   'application/vnd.wap.wbxml'=>'wbxml',
   535 	'application/vnd.wap.wbxml'=>'wbxml',
   536   'application/vnd.wap.wmlc'=>'wmlc',
   536 	'application/vnd.wap.wmlc'=>'wmlc',
   537   'application/vnd.wap.wmlscriptc'=>'wmlsc',
   537 	'application/vnd.wap.wmlscriptc'=>'wmlsc',
   538   'application/voicexml+xml'=>'vxml',
   538 	'application/voicexml+xml'=>'vxml',
   539   'application/x-bcpio'=>'bcpio',
   539 	'application/x-bcpio'=>'bcpio',
   540   'application/x-bzip'=>'gz bz2',
   540 	'application/x-bzip'=>'gz bz2',
   541   'application/x-cdlink'=>'vcd',
   541 	'application/x-cdlink'=>'vcd',
   542   'application/x-chess-pgn'=>'pgn',
   542 	'application/x-chess-pgn'=>'pgn',
   543   'application/x-cpio'=>'cpio',
   543 	'application/x-cpio'=>'cpio',
   544   'application/x-csh'=>'csh',
   544 	'application/x-csh'=>'csh',
   545   'application/x-director'=>'dcr dir dxr',
   545 	'application/x-director'=>'dcr dir dxr',
   546   'application/x-dvi'=>'dvi',
   546 	'application/x-dvi'=>'dvi',
   547   'application/x-futuresplash'=>'spl',
   547 	'application/x-futuresplash'=>'spl',
   548   'application/x-gtar'=>'gtar tar',
   548 	'application/x-gtar'=>'gtar tar',
   549   'application/x-gzip'=>'gz',
   549 	'application/x-gzip'=>'gz',
   550   'application/x-hdf'=>'hdf',
   550 	'application/x-hdf'=>'hdf',
   551   'application/x-jar'=>'jar',
   551 	'application/x-jar'=>'jar',
   552   'application/x-javascript'=>'js',
   552 	'application/x-javascript'=>'js',
   553   'application/x-koan'=>'skp skd skt skm',
   553 	'application/x-koan'=>'skp skd skt skm',
   554   'application/x-latex'=>'latex',
   554 	'application/x-latex'=>'latex',
   555   'application/x-netcdf'=>'nc cdf',
   555 	'application/x-netcdf'=>'nc cdf',
   556   'application/x-sh'=>'sh',
   556 	'application/x-sh'=>'sh',
   557   'application/x-shar'=>'shar',
   557 	'application/x-shar'=>'shar',
   558   'application/x-shockwave-flash'=>'swf',
   558 	'application/x-shockwave-flash'=>'swf',
   559   'application/x-stuffit'=>'sit',
   559 	'application/x-stuffit'=>'sit',
   560   'application/x-sv4cpio'=>'sv4cpio',
   560 	'application/x-sv4cpio'=>'sv4cpio',
   561   'application/x-sv4crc'=>'sv4crc',
   561 	'application/x-sv4crc'=>'sv4crc',
   562   'application/x-tar'=>'tar',
   562 	'application/x-tar'=>'tar',
   563   'application/x-tcl'=>'tcl',
   563 	'application/x-tcl'=>'tcl',
   564   'application/x-tex'=>'tex',
   564 	'application/x-tex'=>'tex',
   565   'application/x-texinfo'=>'texinfo texi',
   565 	'application/x-texinfo'=>'texinfo texi',
   566   'application/x-troff'=>'t tr roff',
   566 	'application/x-troff'=>'t tr roff',
   567   'application/x-troff-man'=>'man',
   567 	'application/x-troff-man'=>'man',
   568   'application/x-troff-me'=>'me',
   568 	'application/x-troff-me'=>'me',
   569   'application/x-troff-ms'=>'ms',
   569 	'application/x-troff-ms'=>'ms',
   570   'application/x-ustar'=>'ustar',
   570 	'application/x-ustar'=>'ustar',
   571   'application/x-wais-source'=>'src',
   571 	'application/x-wais-source'=>'src',
   572   'application/x-xpinstall'=>'xpi',
   572 	'application/x-xpinstall'=>'xpi',
   573   'application/xhtml+xml'=>'xhtml xht',
   573 	'application/xhtml+xml'=>'xhtml xht',
   574   'application/xslt+xml'=>'xslt',
   574 	'application/xslt+xml'=>'xslt',
   575   'application/xml'=>'xml xsl',
   575 	'application/xml'=>'xml xsl',
   576   'application/xml-dtd'=>'dtd',
   576 	'application/xml-dtd'=>'dtd',
   577   'application/zip'=>'zip jar xpi  sxc stc  sxd std   sxi sti   sxm stm   sxw stw  ',
   577 	'application/zip'=>'zip jar xpi  sxc stc  sxd std   sxi sti   sxm stm   sxw stw  ',
   578   'audio/basic'=>'au snd',
   578 	'audio/basic'=>'au snd',
   579   'audio/midi'=>'mid midi kar',
   579 	'audio/midi'=>'mid midi kar',
   580   'audio/mpeg'=>'mpga mp2 mp3',
   580 	'audio/mpeg'=>'mpga mp2 mp3',
   581   'audio/ogg'=>'ogg ',
   581 	'audio/ogg'=>'ogg ',
   582   'audio/x-aiff'=>'aif aiff aifc',
   582 	'audio/x-aiff'=>'aif aiff aifc',
   583   'audio/x-mpegurl'=>'m3u',
   583 	'audio/x-mpegurl'=>'m3u',
   584   'audio/x-ogg'=>'ogg ',
   584 	'audio/x-ogg'=>'ogg ',
   585   'audio/x-pn-realaudio'=>'ram rm',
   585 	'audio/x-pn-realaudio'=>'ram rm',
   586   'audio/x-pn-realaudio-plugin'=>'rpm',
   586 	'audio/x-pn-realaudio-plugin'=>'rpm',
   587   'audio/x-realaudio'=>'ra',
   587 	'audio/x-realaudio'=>'ra',
   588   'audio/x-wav'=>'wav',
   588 	'audio/x-wav'=>'wav',
   589   'chemical/x-pdb'=>'pdb',
   589 	'chemical/x-pdb'=>'pdb',
   590   'chemical/x-xyz'=>'xyz',
   590 	'chemical/x-xyz'=>'xyz',
   591   'image/bmp'=>'bmp',
   591 	'image/bmp'=>'bmp',
   592   'image/cgm'=>'cgm',
   592 	'image/cgm'=>'cgm',
   593   'image/gif'=>'gif',
   593 	'image/gif'=>'gif',
   594   'image/ief'=>'ief',
   594 	'image/ief'=>'ief',
   595   'image/jpeg'=>'jpeg jpg jpe',
   595 	'image/jpeg'=>'jpeg jpg jpe',
   596   'image/png'=>'png',
   596 	'image/png'=>'png',
   597   'image/svg+xml'=>'svg',
   597 	'image/svg+xml'=>'svg',
   598   'image/tiff'=>'tiff tif',
   598 	'image/tiff'=>'tiff tif',
   599   'image/vnd.djvu'=>'djvu djv',
   599 	'image/vnd.djvu'=>'djvu djv',
   600   'image/vnd.wap.wbmp'=>'wbmp',
   600 	'image/vnd.wap.wbmp'=>'wbmp',
   601   'image/x-cmu-raster'=>'ras',
   601 	'image/x-cmu-raster'=>'ras',
   602   'image/x-icon'=>'ico',
   602 	'image/x-icon'=>'ico',
   603   'image/x-portable-anymap'=>'pnm',
   603 	'image/x-portable-anymap'=>'pnm',
   604   'image/x-portable-bitmap'=>'pbm',
   604 	'image/x-portable-bitmap'=>'pbm',
   605   'image/x-portable-graymap'=>'pgm',
   605 	'image/x-portable-graymap'=>'pgm',
   606   'image/x-portable-pixmap'=>'ppm',
   606 	'image/x-portable-pixmap'=>'ppm',
   607   'image/x-rgb'=>'rgb',
   607 	'image/x-rgb'=>'rgb',
   608   'image/x-photoshop'=>'psd',
   608 	'image/x-photoshop'=>'psd',
   609   'image/x-xbitmap'=>'xbm',
   609 	'image/x-xbitmap'=>'xbm',
   610   'image/x-xpixmap'=>'xpm',
   610 	'image/x-xpixmap'=>'xpm',
   611   'image/x-xwindowdump'=>'xwd',
   611 	'image/x-xwindowdump'=>'xwd',
   612   'model/iges'=>'igs iges',
   612 	'model/iges'=>'igs iges',
   613   'model/mesh'=>'msh mesh silo',
   613 	'model/mesh'=>'msh mesh silo',
   614   'model/vrml'=>'wrl vrml',
   614 	'model/vrml'=>'wrl vrml',
   615   'text/calendar'=>'ics ifb',
   615 	'text/calendar'=>'ics ifb',
   616   'text/css'=>'css',
   616 	'text/css'=>'css',
   617   'text/html'=>'html htm',
   617 	'text/html'=>'html htm',
   618   'text/plain'=>'txt',
   618 	'text/plain'=>'txt',
   619   'text/richtext'=>'rtx',
   619 	'text/richtext'=>'rtx',
   620   'text/rtf'=>'rtf',
   620 	'text/rtf'=>'rtf',
   621   'text/sgml'=>'sgml sgm',
   621 	'text/sgml'=>'sgml sgm',
   622   'text/tab-separated-values'=>'tsv',
   622 	'text/tab-separated-values'=>'tsv',
   623   'text/vnd.wap.wml'=>'wml',
   623 	'text/vnd.wap.wml'=>'wml',
   624   'text/vnd.wap.wmlscript'=>'wmls',
   624 	'text/vnd.wap.wmlscript'=>'wmls',
   625   'text/xml'=>'xml xsl xslt rss rdf',
   625 	'text/xml'=>'xml xsl xslt rss rdf',
   626   'text/x-setext'=>'etx',
   626 	'text/x-setext'=>'etx',
   627   'video/mpeg'=>'mpeg mpg mpe',
   627 	'video/mpeg'=>'mpeg mpg mpe',
   628   'video/ogg'=>'ogm ogg',
   628 	'video/ogg'=>'ogm ogg',
   629   'video/quicktime'=>'qt mov',
   629 	'video/quicktime'=>'qt mov',
   630   'video/vnd.mpegurl'=>'mxu',
   630 	'video/vnd.mpegurl'=>'mxu',
   631   'video/x-msvideo'=>'avi',
   631 	'video/x-msvideo'=>'avi',
   632   'video/x-ogg'=>'ogm ogg',
   632 	'video/x-ogg'=>'ogm ogg',
   633   'video/x-sgi-movie'=>'movie',
   633 	'video/x-sgi-movie'=>'movie',
   634   'x-conference/x-cooltalk'=>'ice',
   634 	'x-conference/x-cooltalk'=>'ice',
   635   // Added for Enano
   635 	// Added for Enano
   636   'image/xcf' => 'xcf xcfbz2 xcf.bz2',
   636 	'image/xcf' => 'xcf xcfbz2 xcf.bz2',
   637   'application/vnd.oasis.opendocument.text' => 'odt',
   637 	'application/vnd.oasis.opendocument.text' => 'odt',
   638   'application/vnd.oasis.opendocument.text-template' => 'ott',
   638 	'application/vnd.oasis.opendocument.text-template' => 'ott',
   639   'application/vnd.oasis.opendocument.graphics' => 'odg',
   639 	'application/vnd.oasis.opendocument.graphics' => 'odg',
   640   'application/vnd.oasis.opendocument.graphics-template' => 'otg',
   640 	'application/vnd.oasis.opendocument.graphics-template' => 'otg',
   641   'application/vnd.oasis.opendocument.presentation' => 'odp',
   641 	'application/vnd.oasis.opendocument.presentation' => 'odp',
   642   'application/vnd.oasis.opendocument.presentation-template' => 'otp',
   642 	'application/vnd.oasis.opendocument.presentation-template' => 'otp',
   643   'application/vnd.oasis.opendocument.spreadsheet' => 'ods',
   643 	'application/vnd.oasis.opendocument.spreadsheet' => 'ods',
   644   'application/vnd.oasis.opendocument.spreadsheet-template' => 'ots',
   644 	'application/vnd.oasis.opendocument.spreadsheet-template' => 'ots',
   645   'application/vnd.oasis.opendocument.chart' => 'odc',
   645 	'application/vnd.oasis.opendocument.chart' => 'odc',
   646   'application/vnd.oasis.opendocument.chart-template' => 'otc',
   646 	'application/vnd.oasis.opendocument.chart-template' => 'otc',
   647   'application/vnd.oasis.opendocument.image' => 'odi',
   647 	'application/vnd.oasis.opendocument.image' => 'odi',
   648   'application/vnd.oasis.opendocument.image-template' => 'oti',
   648 	'application/vnd.oasis.opendocument.image-template' => 'oti',
   649   'application/vnd.oasis.opendocument.formula' => 'odf',
   649 	'application/vnd.oasis.opendocument.formula' => 'odf',
   650   'application/vnd.oasis.opendocument.formula-template' => 'otf',
   650 	'application/vnd.oasis.opendocument.formula-template' => 'otf',
   651   'application/vnd.oasis.opendocument.text-master' => 'odm',
   651 	'application/vnd.oasis.opendocument.text-master' => 'odm',
   652   'application/vnd.oasis.opendocument.text-web' => 'oth'
   652 	'application/vnd.oasis.opendocument.text-web' => 'oth'
   653 );
   653 );
   654 
   654 
   655 $k = array_keys($mime_types);
   655 $k = array_keys($mime_types);
   656 $mimetype_exps = Array();
   656 $mimetype_exps = Array();
   657 foreach($k as $s => $x)
   657 foreach($k as $s => $x)
   658 {
   658 {
   659   $mimetype_exps[$x] = pow(2, $s);
   659 	$mimetype_exps[$x] = pow(2, $s);
   660 }
   660 }
   661 
   661 
   662 unset($k, $s, $x);
   662 unset($k, $s, $x);
   663 
   663 
   664 /******************************************************************************
   664 /******************************************************************************
   667 * 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.
   667 * 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.
   668 *
   668 *
   669 ******************************************************************************/
   669 ******************************************************************************/
   670 
   670 
   671 $GLOBALS[ "JPEG_Segment_Names" ] = array(
   671 $GLOBALS[ "JPEG_Segment_Names" ] = array(
   672   0xC0 =>  "SOF0",  0xC1 =>  "SOF1",  0xC2 =>  "SOF2",  0xC3 =>  "SOF4",
   672 	0xC0 =>  "SOF0",  0xC1 =>  "SOF1",  0xC2 =>  "SOF2",  0xC3 =>  "SOF4",
   673   0xC5 =>  "SOF5",  0xC6 =>  "SOF6",  0xC7 =>  "SOF7",  0xC8 =>  "JPG",
   673 	0xC5 =>  "SOF5",  0xC6 =>  "SOF6",  0xC7 =>  "SOF7",  0xC8 =>  "JPG",
   674   0xC9 =>  "SOF9",  0xCA =>  "SOF10", 0xCB =>  "SOF11", 0xCD =>  "SOF13",
   674 	0xC9 =>  "SOF9",  0xCA =>  "SOF10", 0xCB =>  "SOF11", 0xCD =>  "SOF13",
   675   0xCE =>  "SOF14", 0xCF =>  "SOF15",
   675 	0xCE =>  "SOF14", 0xCF =>  "SOF15",
   676   0xC4 =>  "DHT",   0xCC =>  "DAC",
   676 	0xC4 =>  "DHT",   0xCC =>  "DAC",
   677   
   677 	
   678   0xD0 =>  "RST0",  0xD1 =>  "RST1",  0xD2 =>  "RST2",  0xD3 =>  "RST3",
   678 	0xD0 =>  "RST0",  0xD1 =>  "RST1",  0xD2 =>  "RST2",  0xD3 =>  "RST3",
   679   0xD4 =>  "RST4",  0xD5 =>  "RST5",  0xD6 =>  "RST6",  0xD7 =>  "RST7",
   679 	0xD4 =>  "RST4",  0xD5 =>  "RST5",  0xD6 =>  "RST6",  0xD7 =>  "RST7",
   680   
   680 	
   681   0xD8 =>  "SOI",   0xD9 =>  "EOI",   0xDA =>  "SOS",   0xDB =>  "DQT",
   681 	0xD8 =>  "SOI",   0xD9 =>  "EOI",   0xDA =>  "SOS",   0xDB =>  "DQT",
   682   0xDC =>  "DNL",   0xDD =>  "DRI",   0xDE =>  "DHP",   0xDF =>  "EXP",
   682 	0xDC =>  "DNL",   0xDD =>  "DRI",   0xDE =>  "DHP",   0xDF =>  "EXP",
   683   
   683 	
   684   0xE0 =>  "APP0",  0xE1 =>  "APP1",  0xE2 =>  "APP2",  0xE3 =>  "APP3",
   684 	0xE0 =>  "APP0",  0xE1 =>  "APP1",  0xE2 =>  "APP2",  0xE3 =>  "APP3",
   685   0xE4 =>  "APP4",  0xE5 =>  "APP5",  0xE6 =>  "APP6",  0xE7 =>  "APP7",
   685 	0xE4 =>  "APP4",  0xE5 =>  "APP5",  0xE6 =>  "APP6",  0xE7 =>  "APP7",
   686   0xE8 =>  "APP8",  0xE9 =>  "APP9",  0xEA =>  "APP10", 0xEB =>  "APP11",
   686 	0xE8 =>  "APP8",  0xE9 =>  "APP9",  0xEA =>  "APP10", 0xEB =>  "APP11",
   687   0xEC =>  "APP12", 0xED =>  "APP13", 0xEE =>  "APP14", 0xEF =>  "APP15",
   687 	0xEC =>  "APP12", 0xED =>  "APP13", 0xEE =>  "APP14", 0xEF =>  "APP15",
   688   
   688 	
   689   
   689 	
   690   0xF0 =>  "JPG0",  0xF1 =>  "JPG1",  0xF2 =>  "JPG2",  0xF3 =>  "JPG3",
   690 	0xF0 =>  "JPG0",  0xF1 =>  "JPG1",  0xF2 =>  "JPG2",  0xF3 =>  "JPG3",
   691   0xF4 =>  "JPG4",  0xF5 =>  "JPG5",  0xF6 =>  "JPG6",  0xF7 =>  "JPG7",
   691 	0xF4 =>  "JPG4",  0xF5 =>  "JPG5",  0xF6 =>  "JPG6",  0xF7 =>  "JPG7",
   692   0xF8 =>  "JPG8",  0xF9 =>  "JPG9",  0xFA =>  "JPG10", 0xFB =>  "JPG11",
   692 	0xF8 =>  "JPG8",  0xF9 =>  "JPG9",  0xFA =>  "JPG10", 0xFB =>  "JPG11",
   693   0xFC =>  "JPG12", 0xFD =>  "JPG13",
   693 	0xFC =>  "JPG12", 0xFD =>  "JPG13",
   694   
   694 	
   695   0xFE =>  "COM",   0x01 =>  "TEM",   0x02 =>  "RES",
   695 	0xFE =>  "COM",   0x01 =>  "TEM",   0x02 =>  "RES",
   696 );
   696 );
   697 
   697 
   698 // DST profiles
   698 // DST profiles
   699 global $dst_profiles;
   699 global $dst_profiles;
   700 $dst_profiles = array(
   700 $dst_profiles = array(
   701     'off' => '0;0;0;0;60',
   701 		'off' => '0;0;0;0;60',
   702     'usa' => '3;' . SECOND_SUNDAY . ';11;' . FIRST_SUNDAY . ';60',
   702 		'usa' => '3;' . SECOND_SUNDAY . ';11;' . FIRST_SUNDAY . ';60',
   703     'europe' => '3;' . LAST_SUNDAY . ';10;' . LAST_SUNDAY . ';60',
   703 		'europe' => '3;' . LAST_SUNDAY . ';10;' . LAST_SUNDAY . ';60',
   704     'australia' => '10;' . LAST_SUNDAY . ';3;' . LAST_SUNDAY . ';60',
   704 		'australia' => '10;' . LAST_SUNDAY . ';3;' . LAST_SUNDAY . ';60',
   705     'tasmania' => '10;' . FIRST_SUNDAY . ';3;' . LAST_SUNDAY . ';60'
   705 		'tasmania' => '10;' . FIRST_SUNDAY . ';3;' . LAST_SUNDAY . ';60'
   706   );
   706 	);