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