PageRenderTime 49ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/_core_/tags/spip-3.0.0-rc/medias/base/typedoc.php

https://bitbucket.org/pombredanne/spip-zone-treemap
PHP | 392 lines | 345 code | 26 blank | 21 comment | 1 complexity | 8cb793b7f3d36ac1ce23aab10792bb4c MD5 | raw file
  1. <?php
  2. /***************************************************************************\
  3. * SPIP, Systeme de publication pour l'internet *
  4. * *
  5. * Copyright (c) 2001-2011 *
  6. * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
  7. * *
  8. * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
  9. * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
  10. \***************************************************************************/
  11. if (!defined('_ECRIRE_INC_VERSION')) return;
  12. global $tables_images, $tables_sequences, $tables_documents, $tables_mime, $mime_alias;
  13. $tables_images = array(
  14. // Images reconnues par PHP
  15. 'jpg' => 'JPEG',
  16. 'png' => 'PNG',
  17. 'gif' => 'GIF',
  18. // Autres images (peuvent utiliser le tag <img>)
  19. 'bmp' => 'BMP',
  20. );
  21. // Multimedia (peuvent utiliser le tag <embed>)
  22. $tables_sequences = array(
  23. 'aac' => 'Advanced Audio Coding',
  24. 'ac3' => 'AC-3 Compressed Audio',
  25. 'aifc' => 'Compressed AIFF Audio',
  26. 'aiff' => 'AIFF',
  27. 'amr' => 'Adaptive Multi-Rate Audio',
  28. 'anx' => 'Annodex',
  29. 'ape' => 'Monkey\'s Audio File',
  30. 'axa' => 'Annodex Audio',
  31. 'axv' => 'Annodex Video',
  32. 'asf' => 'Windows Media',
  33. 'avi' => 'AVI',
  34. 'dv' => 'Digital Video',
  35. 'f4a' => 'Audio for Adobe Flash Player',
  36. 'f4b' => 'Audio Book for Adobe Flash Player',
  37. 'f4p' => 'Protected Video for Adobe Flash Player',
  38. 'f4v' => 'Video for Adobe Flash Player',
  39. 'flac' => 'Free Lossless Audio Codec',
  40. 'flv' => 'Flash Video',
  41. 'm2p' => 'MPEG-PS',
  42. 'm2ts' => 'BDAV MPEG-2 Transport Stream',
  43. 'm4a' => 'MPEG4 Audio',
  44. 'm4b' => 'MPEG4 Audio',
  45. 'm4p' => 'MPEG4 Audio',
  46. 'm4r' => 'iPhone Ringtone',
  47. 'm4v' => 'MPEG4 Video',
  48. 'mid' => 'Midi',
  49. 'mng' => 'MNG',
  50. 'mka' => 'Matroska Audio',
  51. 'mkv' => 'Matroska Video',
  52. 'mov' => 'QuickTime',
  53. 'mp3' => 'MP3',
  54. 'mp4' => 'MPEG4',
  55. 'mpc' => 'Musepack',
  56. 'mpg' => 'MPEG',
  57. 'mts' => 'AVCHD MPEG-2 transport stream',
  58. 'oga' => 'Ogg Audio',
  59. 'ogg' => 'Ogg Vorbis',
  60. 'ogv' => 'Ogg Video',
  61. 'ogx' => 'Ogg Multiplex',
  62. 'qt' => 'QuickTime',
  63. 'ra' => 'RealAudio',
  64. 'ram' => 'RealAudio',
  65. 'rm' => 'RealAudio',
  66. 'spx' => 'Ogg Speex',
  67. 'svg' => 'Scalable Vector Graphics',
  68. 'svgz' => 'Compressed Scalable Vector Graphic',
  69. 'swf' => 'Flash',
  70. 'tif' => 'TIFF',
  71. 'ts' => 'MPEG transport stream',
  72. 'wav' => 'WAV',
  73. 'webm' => 'WebM',
  74. 'wma' => 'Windows Media Audio',
  75. 'wmv' => 'Windows Media Video',
  76. '3ga' => '3GP Audio File',
  77. '3gp' => '3rd Generation Partnership Project'
  78. );
  79. // Documents varies
  80. $tables_documents = array(
  81. '7z' => '7 Zip',
  82. 'abw' => 'Abiword',
  83. 'ai' => 'Adobe Illustrator',
  84. 'asx' => 'Advanced Stream Redirector',
  85. 'bib' => 'BibTeX',
  86. 'bz2' => 'BZip',
  87. 'bin' => 'Binary Data',
  88. 'blend' => 'Blender',
  89. 'c' => 'C source',
  90. 'cls' => 'LaTeX Class',
  91. 'csl' => 'Citation Style Language',
  92. 'css' => 'Cascading Style Sheet',
  93. 'csv' => 'Comma Separated Values',
  94. 'deb' => 'Debian',
  95. 'doc' => 'Word',
  96. 'dot' => 'Word Template',
  97. 'djvu' => 'DjVu',
  98. 'dvi' => 'LaTeX DVI',
  99. 'emf' => 'Enhanced Metafile',
  100. 'enl' => 'EndNote Library',
  101. 'ens' => 'EndNote Style',
  102. 'epub' => 'EPUB',
  103. 'eps' => 'PostScript',
  104. 'gpx' => 'GPS eXchange Format',
  105. 'gz' => 'GZ',
  106. 'h' => 'C header',
  107. 'html' => 'HTML',
  108. 'jar' => 'Java Archive',
  109. 'kml' => 'Keyhole Markup Language',
  110. 'kmz' => 'Google Earth Placemark File',
  111. 'mathml' => 'MathML',
  112. 'm3u' => 'M3U Playlist',
  113. 'm3u8' => 'M3U8 Playlist',
  114. 'm4u' => 'MPEG4 Playlist',
  115. 'pas' => 'Pascal',
  116. 'pdf' => 'PDF',
  117. 'pgn' => 'Portable Game Notation',
  118. 'pls' => 'Playlist',
  119. 'pot' => 'PowerPoint Template',
  120. 'ppt' => 'PowerPoint',
  121. 'ps' => 'PostScript',
  122. 'psd' => 'Photoshop',
  123. 'rar' => 'WinRAR',
  124. 'rdf' => 'Resource Description Framework',
  125. 'ris' => 'RIS',
  126. 'rpm' => 'RedHat/Mandrake/SuSE',
  127. 'rtf' => 'RTF',
  128. 'sdc' => 'StarOffice Spreadsheet',
  129. 'sdd' => 'StarOffice Presentation',
  130. 'sdw' => 'StarOffice Writer document',
  131. 'sit' => 'Stuffit',
  132. 'sla' => 'Scribus',
  133. 'srt' => 'SubRip Subtitle',
  134. 'ssa' => 'SubStation Alpha Subtitle',
  135. 'sty' => 'LaTeX Style Sheet',
  136. 'sxc' => 'OpenOffice.org Calc',
  137. 'sxi' => 'OpenOffice.org Impress',
  138. 'sxw' => 'OpenOffice.org',
  139. 'tex' => 'LaTeX',
  140. 'tgz' => 'TGZ',
  141. 'torrent' => 'BitTorrent',
  142. 'ttf' => 'TTF Font',
  143. 'txt' => 'Texte',
  144. 'usf' => 'Universal Subtitle Format',
  145. 'xcf' => 'GIMP multi-layer',
  146. 'xspf' => 'XSPF',
  147. 'xls' => 'Excel',
  148. 'xlt' => 'Excel Template',
  149. 'xml' => 'XML',
  150. 'wmf' => 'Windows Metafile',
  151. 'wpl' => 'Windows Media Player Playlist',
  152. 'yaml' => 'YAML',
  153. 'zip' => 'Zip',
  154. // open document format
  155. 'odb' => 'OpenDocument Database',
  156. 'odc' => 'OpenDocument Chart',
  157. 'odf' => 'OpenDocument Formula',
  158. 'odg' => 'OpenDocument Graphics',
  159. 'odi' => 'OpenDocument Image',
  160. 'odm' => 'OpenDocument Text-master',
  161. 'odp' => 'OpenDocument Presentation',
  162. 'ods' => 'OpenDocument Spreadsheet',
  163. 'odt' => 'OpenDocument Text',
  164. 'otg' => 'OpenDocument Graphics-template',
  165. 'otp' => 'OpenDocument Presentation-template',
  166. 'ots' => 'OpenDocument Spreadsheet-template',
  167. 'ott' => 'OpenDocument Text-template',
  168. // Open XML File Formats
  169. 'docm' => 'Word',
  170. 'docx' => 'Word',
  171. 'dotm' => 'Word template',
  172. 'dotx' => 'Word template',
  173. 'potm' => 'Powerpoint template',
  174. 'potx' => 'Powerpoint template',
  175. 'ppam' => 'Powerpoint addin',
  176. 'ppsm' => 'Powerpoint slideshow',
  177. 'ppsx' => 'Powerpoint slideshow',
  178. 'pptm' => 'Powerpoint',
  179. 'pptx' => 'Powerpoint',
  180. 'xlam' => 'Excel',
  181. 'xlsb' => 'Excel binary',
  182. 'xlsm' => 'Excel',
  183. 'xlsx' => 'Excel',
  184. 'xltm' => 'Excel template',
  185. 'xltx' => 'Excel template'
  186. );
  187. $tables_mime = array(
  188. // Images reconnues par PHP
  189. 'jpg' => 'image/jpeg',
  190. 'png' => 'image/png',
  191. 'gif' => 'image/gif',
  192. // Autres images (peuvent utiliser le tag <img>)
  193. 'bmp' => 'image/x-ms-bmp', // pas enregistre par IANA, variante: image/bmp
  194. 'tif' => 'image/tiff',
  195. // Multimedia (peuvent utiliser le tag <embed>)
  196. 'aac' => 'audio/mp4a-latm',
  197. 'ac3' => 'audio/x-aac',
  198. 'aifc' => 'audio/x-aifc',
  199. 'aiff' => 'audio/x-aiff',
  200. 'amr' => 'audio/amr',
  201. 'ape' => 'audio/x-monkeys-audio',
  202. 'asf' => 'video/x-ms-asf',
  203. 'avi' => 'video/x-msvideo',
  204. 'anx' => 'application/annodex',
  205. 'axa' => 'audio/annodex',
  206. 'axv' => 'video/annodex',
  207. 'dv' => 'video/x-dv',
  208. 'f4a' => 'audio/mp4',
  209. 'f4b' => 'audio/mp4',
  210. 'f4p' => 'video/mp4',
  211. 'f4v' => 'video/mp4',
  212. 'flac' => 'audio/x-flac',
  213. 'flv' => 'video/x-flv',
  214. 'm2p' => 'video/MP2P',
  215. 'm2ts' => 'video/MP2T',
  216. 'm4a' => 'audio/mp4a-latm',
  217. 'm4b' => 'audio/mp4a-latm',
  218. 'm4p' => 'audio/mp4a-latm',
  219. 'm4r' => 'audio/aac',
  220. 'm4u' => 'video/vnd.mpegurl',
  221. 'm4v' => 'video/x-m4v',
  222. 'mid' => 'audio/midi',
  223. 'mka' => 'audio/mka',
  224. 'mkv' => 'video/mkv',
  225. 'mng' => 'video/x-mng',
  226. 'mov' => 'video/quicktime',
  227. 'mp3' => 'audio/mpeg',
  228. 'mp4' => 'application/mp4',
  229. 'mpc' => 'audio/x-musepack',
  230. 'mpg' => 'video/mpeg',
  231. 'mts' => 'video/MP2T',
  232. 'oga' => 'audio/ogg',
  233. 'ogg' => 'audio/ogg',
  234. 'ogv' => 'video/ogg',
  235. 'ogx' => 'application/ogg',
  236. 'qt' => 'video/quicktime',
  237. 'ra' => 'audio/x-pn-realaudio',
  238. 'ram' => 'audio/x-pn-realaudio',
  239. 'rm' => 'audio/x-pn-realaudio',
  240. 'spx' => 'audio/ogg',
  241. 'svg' => 'image/svg+xml',
  242. 'svgz' => 'image/svg+xml',
  243. 'swf' => 'application/x-shockwave-flash',
  244. 'ts' => 'video/MP2T',
  245. 'wav' => 'audio/x-wav',
  246. 'webm' => 'video/webm',
  247. 'wma' => 'audio/x-ms-wma',
  248. 'wmv' => 'video/x-ms-wmv',
  249. '3gp' => 'video/3gpp',
  250. '3ga' => 'audio/3ga',
  251. // Documents varies
  252. '7z' => 'application/x-7z-compressed',
  253. 'ai' => 'application/illustrator',
  254. 'abw' => 'application/abiword',
  255. 'asx' => 'video/x-ms-asf',
  256. 'bib' => 'application/x-bibtex',
  257. 'bin' => 'application/octet-stream', # le tout-venant
  258. 'blend' => 'application/x-blender',
  259. 'bz2' => 'application/x-bzip2',
  260. 'c' => 'text/x-csrc',
  261. 'csl' => 'application/xml',
  262. 'css' => 'text/css',
  263. 'csv' => 'text/csv',
  264. 'deb' => 'application/x-debian-package',
  265. 'doc' => 'application/msword',
  266. 'dot' => 'application/msword',
  267. 'djvu' => 'image/vnd.djvu',
  268. 'dvi' => 'application/x-dvi',
  269. 'emf' => 'image/x-emf',
  270. 'enl' => 'application/octet-stream',
  271. 'ens' => 'application/octet-stream',
  272. 'eps' => 'application/postscript',
  273. 'epub' => 'application/epub+zip', // pas enregistre par IANA
  274. 'gpx' => 'application/gpx+xml', // pas enregistre par IANA
  275. 'gz' => 'application/x-gzip',
  276. 'h' => 'text/x-chdr',
  277. 'html' => 'text/html',
  278. 'jar' => 'application/java-archive',
  279. 'kml' => 'application/vnd.google-earth.kml+xml',
  280. 'kmz' => 'application/vnd.google-earth.kmz',
  281. 'm3u' => 'text/plain',
  282. 'm3u8' => 'text/plain',
  283. 'mathml' => 'application/mathml+xml',
  284. 'pas' => 'text/x-pascal',
  285. 'pdf' => 'application/pdf',
  286. 'pgn' => 'application/x-chess-pgn',
  287. 'pls' => 'text/plain',
  288. 'ppt' => 'application/vnd.ms-powerpoint',
  289. 'pot' => 'application/vnd.ms-powerpoint',
  290. 'ps' => 'application/postscript',
  291. 'psd' => 'image/x-photoshop', // pas enregistre par IANA
  292. 'rar' => 'application/x-rar-compressed',
  293. 'rdf' => 'application/rdf+xml',
  294. 'ris' => 'application/x-research-info-systems',
  295. 'rpm' => 'application/x-redhat-package-manager',
  296. 'rtf' => 'application/rtf',
  297. 'sdc' => 'application/vnd.stardivision.calc',
  298. 'sdd' => 'application/vnd.stardivision.impress',
  299. 'sdw' => 'application/vnd.stardivision.writer',
  300. 'sit' => 'application/x-stuffit',
  301. 'sla' => 'application/x-scribus',
  302. 'srt' => 'text/plain',
  303. 'ssa' => 'text/plain',
  304. 'sxc' => 'application/vnd.sun.xml.calc',
  305. 'sxi' => 'application/vnd.sun.xml.impress',
  306. 'sxw' => 'application/vnd.sun.xml.writer',
  307. 'tex' => 'text/x-tex',
  308. 'tgz' => 'application/x-gtar',
  309. 'torrent' => 'application/x-bittorrent',
  310. 'ttf' => 'application/x-font-ttf',
  311. 'txt' => 'text/plain',
  312. 'usf' => 'application/xml',
  313. 'xcf' => 'application/x-xcf',
  314. 'xls' => 'application/vnd.ms-excel',
  315. 'xlt' => 'application/vnd.ms-excel',
  316. 'wmf' => 'image/x-emf',
  317. 'wpl' => 'application/vnd.ms-wpl',
  318. 'xspf' => 'application/xspf+xml',
  319. 'xml' => 'application/xml',
  320. 'yaml' => 'text/yaml',
  321. 'zip' => 'application/zip',
  322. // Open Document format
  323. 'odt' => 'application/vnd.oasis.opendocument.text',
  324. 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
  325. 'odp' => 'application/vnd.oasis.opendocument.presentation',
  326. 'odg' => 'application/vnd.oasis.opendocument.graphics',
  327. 'odc' => 'application/vnd.oasis.opendocument.chart',
  328. 'odf' => 'application/vnd.oasis.opendocument.formula',
  329. 'odb' => 'application/vnd.oasis.opendocument.database',
  330. 'odi' => 'application/vnd.oasis.opendocument.image',
  331. 'odm' => 'application/vnd.oasis.opendocument.text-master',
  332. 'ott' => 'application/vnd.oasis.opendocument.text-template',
  333. 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
  334. 'otp' => 'application/vnd.oasis.opendocument.presentation-template',
  335. 'otg' => 'application/vnd.oasis.opendocument.graphics-template',
  336. 'cls' => 'text/x-tex',
  337. 'sty' => 'text/x-tex',
  338. // Open XML File Formats
  339. 'docm' => 'application/vnd.ms-word.document.macroEnabled.12',
  340. 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
  341. 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12',
  342. 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
  343. 'potm' => 'application/vnd.ms-powerpoint.template.macroEnabled.12',
  344. 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
  345. 'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12',
  346. 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',
  347. 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
  348. 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
  349. 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
  350. 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12',
  351. 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
  352. 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
  353. 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
  354. 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12',
  355. 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template'
  356. );
  357. $mime_alias = array (
  358. 'application/x-ogg' => 'application/ogg',
  359. 'audio/3gpp' => 'video/3gpp',
  360. 'audio/x-mpeg' => 'audio/mpeg',
  361. 'audio/x-musepack' => 'audio/musepack',
  362. 'audio/webm' => 'video/webm',
  363. 'video/flv' => 'video/x-flv',
  364. 'video/mp4' => 'application/mp4'
  365. );
  366. ?>