[SPIP] +2.1.12
[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-2011 *
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 'aiff' => 'AIFF',
34 'anx' => 'Annodex',
35 'axa' => 'Annodex Audio',
36 'axv' => 'Annodex Video',
37 'asf' => 'Windows Media',
38 'avi' => 'AVI',
39 'dv' => 'Digital Video',
40 'f4a' => 'Audio for Adobe Flash Player',
41 'f4b' => 'Audio Book for Adobe Flash Player',
42 'f4p' => 'Protected Video for Adobe Flash Player',
43 'f4v' => 'Video for Adobe Flash Player',
44 'flac' => 'Free Lossless Audio Codec',
45 'flv' => 'Flash Video',
46 'm4v' => 'MPEG4 Video',
47 'm4a' => 'MPEG4 Audio',
48 'm4b' => 'MPEG4 Audio',
49 'm4p' => 'MPEG4 Audio',
50 'mid' => 'Midi',
51 'mng' => 'MNG',
52 'mka' => 'Matroska Audio',
53 'mkv' => 'Matroska Video',
54 'mov' => 'QuickTime',
55 'mp3' => 'MP3',
56 'mp4' => 'MPEG4',
57 'mpc' => 'Musepack',
58 'mpg' => 'MPEG',
59 'oga' => 'Ogg Audio',
60 'ogg' => 'Ogg Vorbis',
61 'ogv' => 'Ogg Video',
62 'ogx' => 'Ogg Multiplex',
63 'qt' => 'QuickTime',
64 'ra' => 'RealAudio',
65 'ram' => 'RealAudio',
66 'rm' => 'RealAudio',
67 'spx' => 'Ogg Speex',
68 'svg' => 'Scalable Vector Graphics',
69 'swf' => 'Flash',
70 'wav' => 'WAV',
71 'webm' => 'WebM',
72 'wmv' => 'Windows Media',
73 '3gp' => '3rd Generation Partnership Project'
74 );
75
76 // Documents varies
77 $tables_documents = array(
78 'abw' => 'Abiword',
79 'ai' => 'Adobe Illustrator',
80 'bz2' => 'BZip',
81 'bin' => 'Binary Data',
82 'blend' => 'Blender',
83 'c' => 'C source',
84 'cls' => 'LaTeX Class',
85 'css' => 'Cascading Style Sheet',
86 'csv' => 'Comma Separated Values',
87 'deb' => 'Debian',
88 'doc' => 'Word',
89 'djvu' => 'DjVu',
90 'dvi' => 'LaTeX DVI',
91 'eps' => 'PostScript',
92 'gz' => 'GZ',
93 'h' => 'C header',
94 'html' => 'HTML',
95 'kml' => 'Keyhole Markup Language',
96 'kmz' => 'Google Earth Placemark File',
97 'm4u' => 'MPEG4 playliste',
98 'pas' => 'Pascal',
99 'pdf' => 'PDF',
100 'pgn' => 'Portable Game Notation',
101 'ppt' => 'PowerPoint',
102 'ps' => 'PostScript',
103 'psd' => 'Photoshop',
104 'rpm' => 'RedHat/Mandrake/SuSE',
105 'rtf' => 'RTF',
106 'sdd' => 'StarOffice',
107 'sdw' => 'StarOffice',
108 'sit' => 'Stuffit',
109 'sty' => 'LaTeX Style Sheet',
110 'sxc' => 'OpenOffice.org Calc',
111 'sxi' => 'OpenOffice.org Impress',
112 'sxw' => 'OpenOffice.org',
113 'tex' => 'LaTeX',
114 'tgz' => 'TGZ',
115 'torrent' => 'BitTorrent',
116 'ttf' => 'TTF Font',
117 'txt' => 'texte',
118 'xcf' => 'GIMP multi-layer',
119 'xspf' => 'XSPF',
120 'xls' => 'Excel',
121 'xml' => 'XML',
122 'zip' => 'Zip',
123
124 // open document format
125 'odt' => 'opendocument text',
126 'ods' => 'opendocument spreadsheet',
127 'odp' => 'opendocument presentation',
128 'odg' => 'opendocument graphics',
129 'odc' => 'opendocument chart',
130 'odf' => 'opendocument formula',
131 'odb' => 'opendocument database',
132 'odi' => 'opendocument image',
133 'odm' => 'opendocument text-master',
134 'ott' => 'opendocument text-template',
135 'ots' => 'opendocument spreadsheet-template',
136 'otp' => 'opendocument presentation-template',
137 'otg' => 'opendocument graphics-template',
138
139 // Open XML File Formats
140 'docm' => 'Word',
141 'docx' => 'Word',
142 'dotm' => 'Word template',
143 'dotx' => 'Word template',
144
145 'potm' => 'Powerpoint template',
146 'potx' => 'Powerpoint template',
147 'ppam' => 'Powerpoint addin',
148 'ppsm' => 'Powerpoint slideshow',
149 'ppsx' => 'Powerpoint slideshow',
150 'pptm' => 'Powerpoint',
151 'pptx' => 'Powerpoint',
152
153 'xlam' => 'Excel',
154 'xlsb' => 'Excel binary',
155 'xlsm' => 'Excel',
156 'xlsx' => 'Excel',
157 'xltm' => 'Excel template',
158 'xltx' => 'Excel template'
159 );
160
161 $tables_mime = array(
162 // Images reconnues par PHP
163 'jpg' => 'image/jpeg',
164 'png' => 'image/png',
165 'gif' => 'image/gif',
166
167 // Autres images (peuvent utiliser le tag <img>)
168 'bmp' => 'image/x-ms-bmp', // pas enregistre par IANA, variante: image/bmp
169 'tif' => 'image/tiff',
170
171 // Multimedia (peuvent utiliser le tag <embed>)
172 'aiff' => 'audio/x-aiff',
173 'asf' => 'video/x-ms-asf',
174 'avi' => 'video/x-msvideo',
175 'anx' => 'application/annodex',
176 'axa' => 'audio/annodex',
177 'axv' => 'video/annodex',
178 'dv' => 'video/x-dv',
179 'f4a' => 'audio/mp4',
180 'f4b' => 'audio/mp4',
181 'f4p' => 'video/mp4',
182 'f4v' => 'video/mp4',
183 'flac' => 'audio/x-flac',
184 'flv' => 'video/x-flv',
185 'm4a' => 'audio/mp4a-latm',
186 'm4b' => 'audio/mp4a-latm',
187 'm4p' => 'audio/mp4a-latm',
188 'm4u' => 'video/vnd.mpegurl',
189 'm4v' => 'video/x-m4v',
190 'mid' => 'audio/midi',
191 'mka' => 'audio/mka',
192 'mkv' => 'video/mkv',
193 'mng' => 'video/x-mng',
194 'mov' => 'video/quicktime',
195 'mp3' => 'audio/mpeg',
196 'mp4' => 'application/mp4',
197 'mpc' => 'audio/x-musepack',
198 'mpg' => 'video/mpeg',
199 'oga' => 'audio/ogg',
200 'ogg' => 'audio/ogg',
201 'ogv' => 'video/ogg',
202 'ogx' => 'application/ogg',
203 'qt' => 'video/quicktime',
204 'ra' => 'audio/x-pn-realaudio',
205 'ram' => 'audio/x-pn-realaudio',
206 'rm' => 'audio/x-pn-realaudio',
207 'spx' => 'audio/ogg',
208 'svg' => 'image/svg+xml',
209 'swf' => 'application/x-shockwave-flash',
210 'wav' => 'audio/x-wav',
211 'webm' => 'video/webm',
212 'wmv' => 'video/x-ms-wmv',
213 '3gp' => 'video/3gpp',
214
215 // Documents varies
216 'ai' => 'application/illustrator',
217 'abw' => 'application/abiword',
218 'bin' => 'application/octet-stream', # le tout-venant
219 'blend' => 'application/x-blender',
220 'bz2' => 'application/x-bzip2',
221 'c' => 'text/x-csrc',
222 'css' => 'text/css',
223 'csv' => 'text/csv',
224 'deb' => 'application/x-debian-package',
225 'doc' => 'application/msword',
226 'djvu' => 'image/vnd.djvu',
227 'dvi' => 'application/x-dvi',
228 'eps' => 'application/postscript',
229 'gz' => 'application/x-gzip',
230 'h' => 'text/x-chdr',
231 'html' => 'text/html',
232 'kml' => 'application/vnd.google-earth.kml+xml',
233 'kmz' => 'application/vnd.google-earth.kmz',
234 'pas' => 'text/x-pascal',
235 'pdf' => 'application/pdf',
236 'pgn' => 'application/x-chess-pgn',
237 'ppt' => 'application/vnd.ms-powerpoint',
238 'ps' => 'application/postscript',
239 'psd' => 'image/x-photoshop', // pas enregistre par IANA
240 'rpm' => 'application/x-redhat-package-manager',
241 'rtf' => 'application/rtf',
242 'sdd' => 'application/vnd.stardivision.impress',
243 'sdw' => 'application/vnd.stardivision.writer',
244 'sit' => 'application/x-stuffit',
245 'sxc' => 'application/vnd.sun.xml.calc',
246 'sxi' => 'application/vnd.sun.xml.impress',
247 'sxw' => 'application/vnd.sun.xml.writer',
248 'tex' => 'text/x-tex',
249 'tgz' => 'application/x-gtar',
250 'torrent' => 'application/x-bittorrent',
251 'ttf' => 'application/x-font-ttf',
252 'txt' => 'text/plain',
253 'xcf' => 'application/x-xcf',
254 'xls' => 'application/vnd.ms-excel',
255 'xspf' => 'application/xspf+xml',
256 'xml' => 'application/xml',
257 'zip' => 'application/zip',
258
259 // Open Document format
260 'odt' => 'application/vnd.oasis.opendocument.text',
261 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
262 'odp' => 'application/vnd.oasis.opendocument.presentation',
263 'odg' => 'application/vnd.oasis.opendocument.graphics',
264 'odc' => 'application/vnd.oasis.opendocument.chart',
265 'odf' => 'application/vnd.oasis.opendocument.formula',
266 'odb' => 'application/vnd.oasis.opendocument.database',
267 'odi' => 'application/vnd.oasis.opendocument.image',
268 'odm' => 'application/vnd.oasis.opendocument.text-master',
269 'ott' => 'application/vnd.oasis.opendocument.text-template',
270 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
271 'otp' => 'application/vnd.oasis.opendocument.presentation-template',
272 'otg' => 'application/vnd.oasis.opendocument.graphics-template',
273
274 'cls' => 'text/x-tex',
275 'sty' => 'text/x-tex',
276
277 // Open XML File Formats
278 'docm' => 'application/vnd.ms-word.document.macroEnabled.12',
279 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
280 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12',
281 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
282
283 'potm' => 'application/vnd.ms-powerpoint.template.macroEnabled.12',
284 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
285 'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12',
286 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',
287 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
288 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
289 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
290
291 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12',
292 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
293 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
294 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
295 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12',
296 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template'
297 );
298
299
300 $mime_alias = array (
301 'audio/x-mpeg' => 'audio/mpeg',
302 'audio/webm' => 'video/webm',
303 'audio/x-musepack' => 'audio/musepack',
304 'application/x-ogg' => 'application/ogg',
305 'video/mp4' => 'application/mp4',
306 'video/flv' => 'video/x-flv',
307 'audio/3gpp' => 'video/3gpp'
308 );
309
310 ?>