A responsive, modern PHP directory listing
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.php 47KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335
  1. <?php
  2. /*
  3. Nice Dirlist
  4. https://source.netsyms.com/Netsyms/NiceDirlist
  5. Copyright 2018 Netsyms Technologies
  6. Redistribution and use in source and binary forms, with or without
  7. modification, are permitted provided that the following conditions are met:
  8. 1. Redistributions of source code must retain the above copyright notice,
  9. this list of conditions and the following disclaimer.
  10. 2. Redistributions in binary form must reproduce the above copyright notice,
  11. this list of conditions and the following disclaimer in the documentation
  12. and/or other materials provided with the distribution.
  13. 3. Neither the name of the copyright holder nor the names of its contributors
  14. may be used to endorse or promote products derived from this software without
  15. specific prior written permission.
  16. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  17. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  18. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  19. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
  20. ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  21. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  22. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  23. ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  25. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. // Page title
  28. $TITLE = "Untitled Server";
  29. // Big page heading
  30. $H1 = "Download Server";
  31. // Subheading
  32. $H2 = "Browse all the things";
  33. // Header logo
  34. $SITEICON = "http://lorempixel.com/300/300/";
  35. // List of filenames to not list
  36. $IGNORE = [
  37. "index.php", "robots.txt"
  38. ];
  39. // Actual path of the wwwroot
  40. $ROOTPATH = "/var/www/html";
  41. // Fill in to add mirror download links to files
  42. $MIRRORBASE = [];
  43. /*
  44. $MIRRORBASE = [
  45. [
  46. "name" => "Mirror 1",
  47. "base" => "http://example.com/downloads"
  48. ],
  49. ];
  50. */
  51. // Bootstrap and optional CSS
  52. $STYLESHEETS = [
  53. "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
  54. ];
  55. // FontAwesome 5 locations
  56. $FONTAWESOME = [
  57. "https://use.fontawesome.com/releases/v5.0.9/js/solid.js",
  58. "https://use.fontawesome.com/releases/v5.0.9/js/brands.js",
  59. "https://use.fontawesome.com/releases/v5.0.9/js/fontawesome.js"
  60. ];
  61. // Mimetype to FontAwesome conversion table
  62. $MIMEICONS = [
  63. // General
  64. "text/plain" => "fas fa-align-left",
  65. "application/octet-stream" => "fas fa-file",
  66. // Text/Code
  67. "text/html" => "fab fa-html5",
  68. "text/css" => "fab fa-css3",
  69. "text/csv" => "fas fa-table",
  70. "application/ecmascript" => "fas fa-code",
  71. "text/calendar" => "fas fa-calendar",
  72. "application/javascript" => "fab fa-js",
  73. "application/json" => "fas fa-list",
  74. "application/x-sh" => "fas fa-terminal",
  75. "application/typescript" => "fas fa-code",
  76. "application/xhtml+xml" => "fas fa-code",
  77. "application/xml" => "fas fa-code",
  78. "text/less" => "fab fa-less",
  79. "text/sass" => "fab fa-sass",
  80. "text/markdown" => "fas fa-align-left",
  81. "text/checksum" => "fas fa-file-medical-alt",
  82. "text/other" => "fas fa-file-alt",
  83. // Archives and disk images
  84. "application/x-iso9660-image" => "fas fa-hdd",
  85. "application/x-gzip" => "fas fa-file-archive",
  86. "application/zip" => "fas fa-file-archive",
  87. "application/x-bzip" => "fas fa-file-archive",
  88. "application/x-bzip2" => "fas fa-file-archive",
  89. "application/x-7z-compressed" => "fas fa-file-archive",
  90. "application/x-msi" => "fab fa-windows",
  91. "application/x-msdownload" => "fab fa-windows",
  92. "application/java-archive" => "fas fa-coffee",
  93. "application/x-rar-compressed" => "fas fa-file-archive",
  94. "application/x-tar" => "fas fa-file-archive",
  95. "application/x-apple-diskimage" => "fab fa-apple",
  96. "application/imgfile" => "fas fa-hdd",
  97. // Fonts
  98. "application/vnd.ms-fontobject" => "fas fa-font",
  99. "application/x-font-ttf" => "fas fa-font",
  100. "font/otf" => "fas fa-font",
  101. "font/ttf" => "fas fa-font",
  102. "font/woff" => "fas fa-font",
  103. "font/woff2" => "fas fa-font",
  104. "font/other" => "fas fa-font",
  105. // Images
  106. "image/svg+xml" => "fas fa-file-image",
  107. "image/png" => "fas fa-image",
  108. "image/jpeg" => "fas fa-image",
  109. "image/gif" => "fas fa-image",
  110. "image/bmp" => "fas fa-image",
  111. "image/x-windows-bmp" => "fas fa-image",
  112. "image/x-icon" => "fas fa-image",
  113. "image/tiff" => "fas fa-image",
  114. "image/webp" => "fas fa-image",
  115. "image/other" => "fas fa-image",
  116. // Audio
  117. "audio/acc" => "fas fa-file-audio",
  118. "audio/ogg" => "fas fa-file-audio",
  119. "audio/x-wav" => "fas fa-file-audio",
  120. "audio/webm" => "fas fa-file-audio",
  121. "audio/midi" => "fas fa-music",
  122. "audio/3gpp" => "fas fa-file-audio",
  123. "audio/3gpp2" => "fas fa-file-audio",
  124. "audio/other" => "fas fa-file-audio",
  125. // Video
  126. "application/x-shockwave-flash" => "fas fa-video-slash",
  127. "video/mpeg" => "fas fa-file-video",
  128. "video/ogg" => "fas fa-file-video",
  129. "video/webm" => "fas fa-file-video",
  130. "video/3gpp" => "fas fa-file-video",
  131. "video/3gpp2" => "fas fa-file-video",
  132. "video/other" => "fas fa-file-video",
  133. // Office files
  134. "application/x-abiword" => "fas fa-file-word",
  135. "application/msword" => "fas fa-file-word",
  136. "application/vnd.ms-powerpoint" => "fas fa-file-powerpoint",
  137. "application/vnd.openxmlformats-officedocument.wordprocessingml.document" => "fas fa-file-word",
  138. "application/vnd.openxmlformats-officedocument.presentationml.presentation" => "fas fa-file-powerpoint",
  139. "application/vnd.oasis.opendocument.presentation" => "fas fa-file-powerpoint",
  140. "application/vnd.oasis.opendocument.spreadsheet" => "fas fa-file-excel",
  141. "application/vnd.oasis.opendocument.text" => "fas fa-file-word",
  142. "application/pdf" => "fas fa-file-pdf",
  143. "application/rtf" => "fas fa-file",
  144. // Other
  145. "application/vnd.amazon.ebook" => "fas fa-book",
  146. "application/epub+zip" => "fas fa-book",
  147. "application/ogg" => "fas fa-play",
  148. "application/x-sql" => "fas fa-database",
  149. "application/odb" => "fas fa-database",
  150. ];
  151. // File extension to mimetype conversion
  152. $EXT2MIME = [
  153. "less" => "text/less",
  154. "scss" => "text/sass",
  155. "md" => "text/markdown",
  156. "md5" => "text/checksum",
  157. "md5sum" => "text/checksum",
  158. "md5sums" => "text/checksum",
  159. "sha1" => "text/checksum",
  160. "sha1sum" => "text/checksum",
  161. "sha1sums" => "text/checksum",
  162. "sha256" => "text/checksum",
  163. "sha256sum" => "text/checksum",
  164. "sha256sums" => "text/checksum",
  165. "sha512" => "text/checksum",
  166. "sha512sum" => "text/checksum",
  167. "sha512sums" => "text/checksum",
  168. "gz" => "application/x-gzip",
  169. "img" => "application/imgfile",
  170. // From Apache: http://svn.apache.org/viewvc?view=revision&revision=1810122
  171. "ez" => "application/andrew-inset",
  172. "aw" => "application/applixware",
  173. "atom" => "application/atom+xml",
  174. "atomcat" => "application/atomcat+xml",
  175. "atomsvc" => "application/atomsvc+xml",
  176. "ccxml" => "application/ccxml+xml",
  177. "cdmia" => "application/cdmi-capability",
  178. "cdmic" => "application/cdmi-container",
  179. "cdmid" => "application/cdmi-domain",
  180. "cdmio" => "application/cdmi-object",
  181. "cdmiq" => "application/cdmi-queue",
  182. "cu" => "application/cu-seeme",
  183. "davmount" => "application/davmount+xml",
  184. "dbk" => "application/docbook+xml",
  185. "dssc" => "application/dssc+der",
  186. "xdssc" => "application/dssc+xml",
  187. "ecma" => "application/ecmascript",
  188. "emma" => "application/emma+xml",
  189. "epub" => "application/epub+zip",
  190. "exi" => "application/exi",
  191. "pfr" => "application/font-tdpfr",
  192. "gml" => "application/gml+xml",
  193. "gpx" => "application/gpx+xml",
  194. "gxf" => "application/gxf",
  195. "stk" => "application/hyperstudio",
  196. "ink" => "application/inkml+xml",
  197. "inkml" => "application/inkml+xml",
  198. "ipfix" => "application/ipfix",
  199. "jar" => "application/java-archive",
  200. "ser" => "application/java-serialized-object",
  201. "class" => "application/java-vm",
  202. "js" => "application/javascript",
  203. "json" => "application/json",
  204. "jsonml" => "application/jsonml+json",
  205. "lostxml" => "application/lost+xml",
  206. "hqx" => "application/mac-binhex40",
  207. "cpt" => "application/mac-compactpro",
  208. "mads" => "application/mads+xml",
  209. "mrc" => "application/marc",
  210. "mrcx" => "application/marcxml+xml",
  211. "ma" => "application/mathematica",
  212. "nb" => "application/mathematica",
  213. "mb" => "application/mathematica",
  214. "mathml" => "application/mathml+xml",
  215. "mbox" => "application/mbox",
  216. "mscml" => "application/mediaservercontrol+xml",
  217. "metalink" => "application/metalink+xml",
  218. "meta4" => "application/metalink4+xml",
  219. "mets" => "application/mets+xml",
  220. "mods" => "application/mods+xml",
  221. "m21" => "application/mp21",
  222. "mp21" => "application/mp21",
  223. "mp4s" => "application/mp4",
  224. "doc" => "application/msword",
  225. "dot" => "application/msword",
  226. "mxf" => "application/mxf",
  227. "bin" => "application/octet-stream",
  228. "dms" => "application/octet-stream",
  229. "lrf" => "application/octet-stream",
  230. "mar" => "application/octet-stream",
  231. "so" => "application/octet-stream",
  232. "dist" => "application/octet-stream",
  233. "distz" => "application/octet-stream",
  234. "pkg" => "application/octet-stream",
  235. "bpk" => "application/octet-stream",
  236. "dump" => "application/octet-stream",
  237. "elc" => "application/octet-stream",
  238. "deploy" => "application/octet-stream",
  239. "oda" => "application/oda",
  240. "opf" => "application/oebps-package+xml",
  241. "ogx" => "application/ogg",
  242. "omdoc" => "application/omdoc+xml",
  243. "onetoc" => "application/onenote",
  244. "onetoc2" => "application/onenote",
  245. "onetmp" => "application/onenote",
  246. "onepkg" => "application/onenote",
  247. "oxps" => "application/oxps",
  248. "xer" => "application/patch-ops-error+xml",
  249. "pdf" => "application/pdf",
  250. "pgp" => "application/pgp-encrypted",
  251. "asc" => "application/pgp-signature",
  252. "sig" => "application/pgp-signature",
  253. "prf" => "application/pics-rules",
  254. "p10" => "application/pkcs10",
  255. "p7m" => "application/pkcs7-mime",
  256. "p7c" => "application/pkcs7-mime",
  257. "p7s" => "application/pkcs7-signature",
  258. "p8" => "application/pkcs8",
  259. "ac" => "application/pkix-attr-cert",
  260. "cer" => "application/pkix-cert",
  261. "crl" => "application/pkix-crl",
  262. "pkipath" => "application/pkix-pkipath",
  263. "pki" => "application/pkixcmp",
  264. "pls" => "application/pls+xml",
  265. "ai" => "application/postscript",
  266. "eps" => "application/postscript",
  267. "ps" => "application/postscript",
  268. "cww" => "application/prs.cww",
  269. "pskcxml" => "application/pskc+xml",
  270. "rdf" => "application/rdf+xml",
  271. "rif" => "application/reginfo+xml",
  272. "rnc" => "application/relax-ng-compact-syntax",
  273. "rl" => "application/resource-lists+xml",
  274. "rld" => "application/resource-lists-diff+xml",
  275. "rs" => "application/rls-services+xml",
  276. "gbr" => "application/rpki-ghostbusters",
  277. "mft" => "application/rpki-manifest",
  278. "roa" => "application/rpki-roa",
  279. "rsd" => "application/rsd+xml",
  280. "rss" => "application/rss+xml",
  281. "rtf" => "application/rtf",
  282. "sbml" => "application/sbml+xml",
  283. "scq" => "application/scvp-cv-request",
  284. "scs" => "application/scvp-cv-response",
  285. "spq" => "application/scvp-vp-request",
  286. "spp" => "application/scvp-vp-response",
  287. "sdp" => "application/sdp",
  288. "setpay" => "application/set-payment-initiation",
  289. "setreg" => "application/set-registration-initiation",
  290. "shf" => "application/shf+xml",
  291. "smi" => "application/smil+xml",
  292. "smil" => "application/smil+xml",
  293. "rq" => "application/sparql-query",
  294. "srx" => "application/sparql-results+xml",
  295. "gram" => "application/srgs",
  296. "grxml" => "application/srgs+xml",
  297. "sru" => "application/sru+xml",
  298. "ssdl" => "application/ssdl+xml",
  299. "ssml" => "application/ssml+xml",
  300. "tei" => "application/tei+xml",
  301. "teicorpus" => "application/tei+xml",
  302. "tfi" => "application/thraud+xml",
  303. "tsd" => "application/timestamped-data",
  304. "plb" => "application/vnd.3gpp.pic-bw-large",
  305. "psb" => "application/vnd.3gpp.pic-bw-small",
  306. "pvb" => "application/vnd.3gpp.pic-bw-var",
  307. "tcap" => "application/vnd.3gpp2.tcap",
  308. "pwn" => "application/vnd.3m.post-it-notes",
  309. "aso" => "application/vnd.accpac.simply.aso",
  310. "imp" => "application/vnd.accpac.simply.imp",
  311. "acu" => "application/vnd.acucobol",
  312. "atc" => "application/vnd.acucorp",
  313. "acutc" => "application/vnd.acucorp",
  314. "air" => "application/vnd.adobe.air-application-installer-package+zip",
  315. "fcdt" => "application/vnd.adobe.formscentral.fcdt",
  316. "fxp" => "application/vnd.adobe.fxp",
  317. "fxpl" => "application/vnd.adobe.fxp",
  318. "xdp" => "application/vnd.adobe.xdp+xml",
  319. "xfdf" => "application/vnd.adobe.xfdf",
  320. "ahead" => "application/vnd.ahead.space",
  321. "azf" => "application/vnd.airzip.filesecure.azf",
  322. "azs" => "application/vnd.airzip.filesecure.azs",
  323. "azw" => "application/vnd.amazon.ebook",
  324. "acc" => "application/vnd.americandynamics.acc",
  325. "ami" => "application/vnd.amiga.ami",
  326. "apk" => "application/vnd.android.package-archive",
  327. "cii" => "application/vnd.anser-web-certificate-issue-initiation",
  328. "fti" => "application/vnd.anser-web-funds-transfer-initiation",
  329. "atx" => "application/vnd.antix.game-component",
  330. "mpkg" => "application/vnd.apple.installer+xml",
  331. "m3u8" => "application/vnd.apple.mpegurl",
  332. "swi" => "application/vnd.aristanetworks.swi",
  333. "iota" => "application/vnd.astraea-software.iota",
  334. "aep" => "application/vnd.audiograph",
  335. "mpm" => "application/vnd.blueice.multipass",
  336. "bmi" => "application/vnd.bmi",
  337. "rep" => "application/vnd.businessobjects",
  338. "cdxml" => "application/vnd.chemdraw+xml",
  339. "mmd" => "application/vnd.chipnuts.karaoke-mmd",
  340. "cdy" => "application/vnd.cinderella",
  341. "cla" => "application/vnd.claymore",
  342. "rp9" => "application/vnd.cloanto.rp9",
  343. "c4g" => "application/vnd.clonk.c4group",
  344. "c4d" => "application/vnd.clonk.c4group",
  345. "c4f" => "application/vnd.clonk.c4group",
  346. "c4p" => "application/vnd.clonk.c4group",
  347. "c4u" => "application/vnd.clonk.c4group",
  348. "c11amc" => "application/vnd.cluetrust.cartomobile-config",
  349. "c11amz" => "application/vnd.cluetrust.cartomobile-config-pkg",
  350. "csp" => "application/vnd.commonspace",
  351. "cdbcmsg" => "application/vnd.contact.cmsg",
  352. "cmc" => "application/vnd.cosmocaller",
  353. "clkx" => "application/vnd.crick.clicker",
  354. "clkk" => "application/vnd.crick.clicker.keyboard",
  355. "clkp" => "application/vnd.crick.clicker.palette",
  356. "clkt" => "application/vnd.crick.clicker.template",
  357. "clkw" => "application/vnd.crick.clicker.wordbank",
  358. "wbs" => "application/vnd.criticaltools.wbs+xml",
  359. "pml" => "application/vnd.ctc-posml",
  360. "ppd" => "application/vnd.cups-ppd",
  361. "car" => "application/vnd.curl.car",
  362. "pcurl" => "application/vnd.curl.pcurl",
  363. "dart" => "application/vnd.dart",
  364. "rdz" => "application/vnd.data-vision.rdz",
  365. "uvf" => "application/vnd.dece.data",
  366. "uvvf" => "application/vnd.dece.data",
  367. "uvd" => "application/vnd.dece.data",
  368. "uvvd" => "application/vnd.dece.data",
  369. "uvt" => "application/vnd.dece.ttml+xml",
  370. "uvvt" => "application/vnd.dece.ttml+xml",
  371. "uvx" => "application/vnd.dece.unspecified",
  372. "uvvx" => "application/vnd.dece.unspecified",
  373. "uvz" => "application/vnd.dece.zip",
  374. "uvvz" => "application/vnd.dece.zip",
  375. "fe_launch" => "application/vnd.denovo.fcselayout-link",
  376. "dna" => "application/vnd.dna",
  377. "mlp" => "application/vnd.dolby.mlp",
  378. "dpg" => "application/vnd.dpgraph",
  379. "dfac" => "application/vnd.dreamfactory",
  380. "kpxx" => "application/vnd.ds-keypoint",
  381. "ait" => "application/vnd.dvb.ait",
  382. "svc" => "application/vnd.dvb.service",
  383. "geo" => "application/vnd.dynageo",
  384. "mag" => "application/vnd.ecowin.chart",
  385. "nml" => "application/vnd.enliven",
  386. "esf" => "application/vnd.epson.esf",
  387. "msf" => "application/vnd.epson.msf",
  388. "qam" => "application/vnd.epson.quickanime",
  389. "slt" => "application/vnd.epson.salt",
  390. "ssf" => "application/vnd.epson.ssf",
  391. "es3" => "application/vnd.eszigno3+xml",
  392. "et3" => "application/vnd.eszigno3+xml",
  393. "ez2" => "application/vnd.ezpix-album",
  394. "ez3" => "application/vnd.ezpix-package",
  395. "fdf" => "application/vnd.fdf",
  396. "mseed" => "application/vnd.fdsn.mseed",
  397. "seed" => "application/vnd.fdsn.seed",
  398. "dataless" => "application/vnd.fdsn.seed",
  399. "gph" => "application/vnd.flographit",
  400. "ftc" => "application/vnd.fluxtime.clip",
  401. "fm" => "application/vnd.framemaker",
  402. "frame" => "application/vnd.framemaker",
  403. "maker" => "application/vnd.framemaker",
  404. "book" => "application/vnd.framemaker",
  405. "fnc" => "application/vnd.frogans.fnc",
  406. "ltf" => "application/vnd.frogans.ltf",
  407. "fsc" => "application/vnd.fsc.weblaunch",
  408. "oas" => "application/vnd.fujitsu.oasys",
  409. "oa2" => "application/vnd.fujitsu.oasys2",
  410. "oa3" => "application/vnd.fujitsu.oasys3",
  411. "fg5" => "application/vnd.fujitsu.oasysgp",
  412. "bh2" => "application/vnd.fujitsu.oasysprs",
  413. "ddd" => "application/vnd.fujixerox.ddd",
  414. "xdw" => "application/vnd.fujixerox.docuworks",
  415. "xbd" => "application/vnd.fujixerox.docuworks.binder",
  416. "fzs" => "application/vnd.fuzzysheet",
  417. "txd" => "application/vnd.genomatix.tuxedo",
  418. "ggb" => "application/vnd.geogebra.file",
  419. "ggt" => "application/vnd.geogebra.tool",
  420. "gex" => "application/vnd.geometry-explorer",
  421. "gre" => "application/vnd.geometry-explorer",
  422. "gxt" => "application/vnd.geonext",
  423. "g2w" => "application/vnd.geoplan",
  424. "g3w" => "application/vnd.geospace",
  425. "gmx" => "application/vnd.gmx",
  426. "kml" => "application/vnd.google-earth.kml+xml",
  427. "kmz" => "application/vnd.google-earth.kmz",
  428. "gqf" => "application/vnd.grafeq",
  429. "gqs" => "application/vnd.grafeq",
  430. "gac" => "application/vnd.groove-account",
  431. "ghf" => "application/vnd.groove-help",
  432. "gim" => "application/vnd.groove-identity-message",
  433. "grv" => "application/vnd.groove-injector",
  434. "gtm" => "application/vnd.groove-tool-message",
  435. "tpl" => "application/vnd.groove-tool-template",
  436. "vcg" => "application/vnd.groove-vcard",
  437. "hal" => "application/vnd.hal+xml",
  438. "zmm" => "application/vnd.handheld-entertainment+xml",
  439. "hbci" => "application/vnd.hbci",
  440. "les" => "application/vnd.hhe.lesson-player",
  441. "hpgl" => "application/vnd.hp-hpgl",
  442. "hpid" => "application/vnd.hp-hpid",
  443. "hps" => "application/vnd.hp-hps",
  444. "jlt" => "application/vnd.hp-jlyt",
  445. "pcl" => "application/vnd.hp-pcl",
  446. "pclxl" => "application/vnd.hp-pclxl",
  447. "sfd-hdstx" => "application/vnd.hydrostatix.sof-data",
  448. "mpy" => "application/vnd.ibm.minipay",
  449. "afp" => "application/vnd.ibm.modcap",
  450. "listafp" => "application/vnd.ibm.modcap",
  451. "list3820" => "application/vnd.ibm.modcap",
  452. "irm" => "application/vnd.ibm.rights-management",
  453. "sc" => "application/vnd.ibm.secure-container",
  454. "icc" => "application/vnd.iccprofile",
  455. "icm" => "application/vnd.iccprofile",
  456. "igl" => "application/vnd.igloader",
  457. "ivp" => "application/vnd.immervision-ivp",
  458. "ivu" => "application/vnd.immervision-ivu",
  459. "igm" => "application/vnd.insors.igm",
  460. "xpw" => "application/vnd.intercon.formnet",
  461. "xpx" => "application/vnd.intercon.formnet",
  462. "i2g" => "application/vnd.intergeo",
  463. "qbo" => "application/vnd.intu.qbo",
  464. "qfx" => "application/vnd.intu.qfx",
  465. "rcprofile" => "application/vnd.ipunplugged.rcprofile",
  466. "irp" => "application/vnd.irepository.package+xml",
  467. "xpr" => "application/vnd.is-xpr",
  468. "fcs" => "application/vnd.isac.fcs",
  469. "jam" => "application/vnd.jam",
  470. "rms" => "application/vnd.jcp.javame.midlet-rms",
  471. "jisp" => "application/vnd.jisp",
  472. "joda" => "application/vnd.joost.joda-archive",
  473. "ktz" => "application/vnd.kahootz",
  474. "ktr" => "application/vnd.kahootz",
  475. "karbon" => "application/vnd.kde.karbon",
  476. "chrt" => "application/vnd.kde.kchart",
  477. "kfo" => "application/vnd.kde.kformula",
  478. "flw" => "application/vnd.kde.kivio",
  479. "kon" => "application/vnd.kde.kontour",
  480. "kpr" => "application/vnd.kde.kpresenter",
  481. "kpt" => "application/vnd.kde.kpresenter",
  482. "ksp" => "application/vnd.kde.kspread",
  483. "kwd" => "application/vnd.kde.kword",
  484. "kwt" => "application/vnd.kde.kword",
  485. "htke" => "application/vnd.kenameaapp",
  486. "kia" => "application/vnd.kidspiration",
  487. "kne" => "application/vnd.kinar",
  488. "knp" => "application/vnd.kinar",
  489. "skp" => "application/vnd.koan",
  490. "skd" => "application/vnd.koan",
  491. "skt" => "application/vnd.koan",
  492. "skm" => "application/vnd.koan",
  493. "sse" => "application/vnd.kodak-descriptor",
  494. "lasxml" => "application/vnd.las.las+xml",
  495. "lbd" => "application/vnd.llamagraphics.life-balance.desktop",
  496. "lbe" => "application/vnd.llamagraphics.life-balance.exchange+xml",
  497. "123" => "application/vnd.lotus-1-2-3",
  498. "apr" => "application/vnd.lotus-approach",
  499. "pre" => "application/vnd.lotus-freelance",
  500. "nsf" => "application/vnd.lotus-notes",
  501. "org" => "application/vnd.lotus-organizer",
  502. "scm" => "application/vnd.lotus-screencam",
  503. "lwp" => "application/vnd.lotus-wordpro",
  504. "portpkg" => "application/vnd.macports.portpkg",
  505. "mcd" => "application/vnd.mcd",
  506. "mc1" => "application/vnd.medcalcdata",
  507. "cdkey" => "application/vnd.mediastation.cdkey",
  508. "mwf" => "application/vnd.mfer",
  509. "mfm" => "application/vnd.mfmp",
  510. "flo" => "application/vnd.micrografx.flo",
  511. "igx" => "application/vnd.micrografx.igx",
  512. "mif" => "application/vnd.mif",
  513. "daf" => "application/vnd.mobius.daf",
  514. "dis" => "application/vnd.mobius.dis",
  515. "mbk" => "application/vnd.mobius.mbk",
  516. "mqy" => "application/vnd.mobius.mqy",
  517. "msl" => "application/vnd.mobius.msl",
  518. "plc" => "application/vnd.mobius.plc",
  519. "txf" => "application/vnd.mobius.txf",
  520. "mpn" => "application/vnd.mophun.application",
  521. "mpc" => "application/vnd.mophun.certificate",
  522. "xul" => "application/vnd.mozilla.xul+xml",
  523. "cil" => "application/vnd.ms-artgalry",
  524. "cab" => "application/vnd.ms-cab-compressed",
  525. "xls" => "application/vnd.ms-excel",
  526. "xlm" => "application/vnd.ms-excel",
  527. "xla" => "application/vnd.ms-excel",
  528. "xlc" => "application/vnd.ms-excel",
  529. "xlt" => "application/vnd.ms-excel",
  530. "xlw" => "application/vnd.ms-excel",
  531. "xlam" => "application/vnd.ms-excel.addin.macroenabled.12",
  532. "xlsb" => "application/vnd.ms-excel.sheet.binary.macroenabled.12",
  533. "xlsm" => "application/vnd.ms-excel.sheet.macroenabled.12",
  534. "xltm" => "application/vnd.ms-excel.template.macroenabled.12",
  535. "eot" => "application/vnd.ms-fontobject",
  536. "chm" => "application/vnd.ms-htmlhelp",
  537. "ims" => "application/vnd.ms-ims",
  538. "lrm" => "application/vnd.ms-lrm",
  539. "thmx" => "application/vnd.ms-officetheme",
  540. "cat" => "application/vnd.ms-pki.seccat",
  541. "stl" => "application/vnd.ms-pki.stl",
  542. "ppt" => "application/vnd.ms-powerpoint",
  543. "pps" => "application/vnd.ms-powerpoint",
  544. "pot" => "application/vnd.ms-powerpoint",
  545. "ppam" => "application/vnd.ms-powerpoint.addin.macroenabled.12",
  546. "pptm" => "application/vnd.ms-powerpoint.presentation.macroenabled.12",
  547. "sldm" => "application/vnd.ms-powerpoint.slide.macroenabled.12",
  548. "ppsm" => "application/vnd.ms-powerpoint.slideshow.macroenabled.12",
  549. "potm" => "application/vnd.ms-powerpoint.template.macroenabled.12",
  550. "mpp" => "application/vnd.ms-project",
  551. "mpt" => "application/vnd.ms-project",
  552. "docm" => "application/vnd.ms-word.document.macroenabled.12",
  553. "dotm" => "application/vnd.ms-word.template.macroenabled.12",
  554. "wps" => "application/vnd.ms-works",
  555. "wks" => "application/vnd.ms-works",
  556. "wcm" => "application/vnd.ms-works",
  557. "wdb" => "application/vnd.ms-works",
  558. "wpl" => "application/vnd.ms-wpl",
  559. "xps" => "application/vnd.ms-xpsdocument",
  560. "mseq" => "application/vnd.mseq",
  561. "mus" => "application/vnd.musician",
  562. "msty" => "application/vnd.muvee.style",
  563. "taglet" => "application/vnd.mynfc",
  564. "nlu" => "application/vnd.neurolanguage.nlu",
  565. "ntf" => "application/vnd.nitf",
  566. "nitf" => "application/vnd.nitf",
  567. "nnd" => "application/vnd.noblenet-directory",
  568. "nns" => "application/vnd.noblenet-sealer",
  569. "nnw" => "application/vnd.noblenet-web",
  570. "ngdat" => "application/vnd.nokia.n-gage.data",
  571. "n-gage" => "application/vnd.nokia.n-gage.symbian.install",
  572. "rpst" => "application/vnd.nokia.radio-preset",
  573. "rpss" => "application/vnd.nokia.radio-presets",
  574. "edm" => "application/vnd.novadigm.edm",
  575. "edx" => "application/vnd.novadigm.edx",
  576. "ext" => "application/vnd.novadigm.ext",
  577. "odc" => "application/vnd.oasis.opendocument.chart",
  578. "otc" => "application/vnd.oasis.opendocument.chart-template",
  579. "odb" => "application/vnd.oasis.opendocument.database",
  580. "odf" => "application/vnd.oasis.opendocument.formula",
  581. "odft" => "application/vnd.oasis.opendocument.formula-template",
  582. "odg" => "application/vnd.oasis.opendocument.graphics",
  583. "otg" => "application/vnd.oasis.opendocument.graphics-template",
  584. "odi" => "application/vnd.oasis.opendocument.image",
  585. "oti" => "application/vnd.oasis.opendocument.image-template",
  586. "odp" => "application/vnd.oasis.opendocument.presentation",
  587. "otp" => "application/vnd.oasis.opendocument.presentation-template",
  588. "ods" => "application/vnd.oasis.opendocument.spreadsheet",
  589. "ots" => "application/vnd.oasis.opendocument.spreadsheet-template",
  590. "odt" => "application/vnd.oasis.opendocument.text",
  591. "odm" => "application/vnd.oasis.opendocument.text-master",
  592. "ott" => "application/vnd.oasis.opendocument.text-template",
  593. "oth" => "application/vnd.oasis.opendocument.text-web",
  594. "xo" => "application/vnd.olpc-sugar",
  595. "dd2" => "application/vnd.oma.dd2+xml",
  596. "oxt" => "application/vnd.openofficeorg.extension",
  597. "pptx" => "application/vnd.openxmlformats-officedocument.presentationml.presentation",
  598. "sldx" => "application/vnd.openxmlformats-officedocument.presentationml.slide",
  599. "ppsx" => "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
  600. "potx" => "application/vnd.openxmlformats-officedocument.presentationml.template",
  601. "xlsx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
  602. "xltx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.template",
  603. "docx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
  604. "dotx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
  605. "mgp" => "application/vnd.osgeo.mapguide.package",
  606. "dp" => "application/vnd.osgi.dp",
  607. "esa" => "application/vnd.osgi.subsystem",
  608. "pdb" => "application/vnd.palm",
  609. "pqa" => "application/vnd.palm",
  610. "oprc" => "application/vnd.palm",
  611. "paw" => "application/vnd.pawaafile",
  612. "str" => "application/vnd.pg.format",
  613. "ei6" => "application/vnd.pg.osasli",
  614. "efif" => "application/vnd.picsel",
  615. "wg" => "application/vnd.pmi.widget",
  616. "plf" => "application/vnd.pocketlearn",
  617. "pbd" => "application/vnd.powerbuilder6",
  618. "box" => "application/vnd.previewsystems.box",
  619. "mgz" => "application/vnd.proteus.magazine",
  620. "qps" => "application/vnd.publishare-delta-tree",
  621. "ptid" => "application/vnd.pvi.ptid1",
  622. "qxd" => "application/vnd.quark.quarkxpress",
  623. "qxt" => "application/vnd.quark.quarkxpress",
  624. "qwd" => "application/vnd.quark.quarkxpress",
  625. "qwt" => "application/vnd.quark.quarkxpress",
  626. "qxl" => "application/vnd.quark.quarkxpress",
  627. "qxb" => "application/vnd.quark.quarkxpress",
  628. "bed" => "application/vnd.realvnc.bed",
  629. "mxl" => "application/vnd.recordare.musicxml",
  630. "musicxml" => "application/vnd.recordare.musicxml+xml",
  631. "cryptonote" => "application/vnd.rig.cryptonote",
  632. "cod" => "application/vnd.rim.cod",
  633. "rm" => "application/vnd.rn-realmedia",
  634. "rmvb" => "application/vnd.rn-realmedia-vbr",
  635. "link66" => "application/vnd.route66.link66+xml",
  636. "st" => "application/vnd.sailingtracker.track",
  637. "see" => "application/vnd.seemail",
  638. "sema" => "application/vnd.sema",
  639. "semd" => "application/vnd.semd",
  640. "semf" => "application/vnd.semf",
  641. "ifm" => "application/vnd.shana.informed.formdata",
  642. "itp" => "application/vnd.shana.informed.formtemplate",
  643. "iif" => "application/vnd.shana.informed.interchange",
  644. "ipk" => "application/vnd.shana.informed.package",
  645. "twd" => "application/vnd.simtech-mindmapper",
  646. "twds" => "application/vnd.simtech-mindmapper",
  647. "mmf" => "application/vnd.smaf",
  648. "teacher" => "application/vnd.smart.teacher",
  649. "sdkm" => "application/vnd.solent.sdkm+xml",
  650. "sdkd" => "application/vnd.solent.sdkm+xml",
  651. "dxp" => "application/vnd.spotfire.dxp",
  652. "sfs" => "application/vnd.spotfire.sfs",
  653. "sdc" => "application/vnd.stardivision.calc",
  654. "sda" => "application/vnd.stardivision.draw",
  655. "sdd" => "application/vnd.stardivision.impress",
  656. "smf" => "application/vnd.stardivision.math",
  657. "sdw" => "application/vnd.stardivision.writer",
  658. "vor" => "application/vnd.stardivision.writer",
  659. "sgl" => "application/vnd.stardivision.writer-global",
  660. "smzip" => "application/vnd.stepmania.package",
  661. "sm" => "application/vnd.stepmania.stepchart",
  662. "sxc" => "application/vnd.sun.xml.calc",
  663. "stc" => "application/vnd.sun.xml.calc.template",
  664. "sxd" => "application/vnd.sun.xml.draw",
  665. "std" => "application/vnd.sun.xml.draw.template",
  666. "sxi" => "application/vnd.sun.xml.impress",
  667. "sti" => "application/vnd.sun.xml.impress.template",
  668. "sxm" => "application/vnd.sun.xml.math",
  669. "sxw" => "application/vnd.sun.xml.writer",
  670. "sxg" => "application/vnd.sun.xml.writer.global",
  671. "stw" => "application/vnd.sun.xml.writer.template",
  672. "sus" => "application/vnd.sus-calendar",
  673. "susp" => "application/vnd.sus-calendar",
  674. "svd" => "application/vnd.svd",
  675. "sis" => "application/vnd.symbian.install",
  676. "sisx" => "application/vnd.symbian.install",
  677. "xsm" => "application/vnd.syncml+xml",
  678. "bdm" => "application/vnd.syncml.dm+wbxml",
  679. "xdm" => "application/vnd.syncml.dm+xml",
  680. "tao" => "application/vnd.tao.intent-module-archive",
  681. "pcap" => "application/vnd.tcpdump.pcap",
  682. "cap" => "application/vnd.tcpdump.pcap",
  683. "dmp" => "application/vnd.tcpdump.pcap",
  684. "tmo" => "application/vnd.tmobile-livetv",
  685. "tpt" => "application/vnd.trid.tpt",
  686. "mxs" => "application/vnd.triscape.mxs",
  687. "tra" => "application/vnd.trueapp",
  688. "ufd" => "application/vnd.ufdl",
  689. "ufdl" => "application/vnd.ufdl",
  690. "utz" => "application/vnd.uiq.theme",
  691. "umj" => "application/vnd.umajin",
  692. "unityweb" => "application/vnd.unity",
  693. "uoml" => "application/vnd.uoml+xml",
  694. "vcx" => "application/vnd.vcx",
  695. "vsd" => "application/vnd.visio",
  696. "vst" => "application/vnd.visio",
  697. "vss" => "application/vnd.visio",
  698. "vsw" => "application/vnd.visio",
  699. "vis" => "application/vnd.visionary",
  700. "vsf" => "application/vnd.vsf",
  701. "wbxml" => "application/vnd.wap.wbxml",
  702. "wmlc" => "application/vnd.wap.wmlc",
  703. "wmlsc" => "application/vnd.wap.wmlscriptc",
  704. "wtb" => "application/vnd.webturbo",
  705. "nbp" => "application/vnd.wolfram.player",
  706. "wpd" => "application/vnd.wordperfect",
  707. "wqd" => "application/vnd.wqd",
  708. "stf" => "application/vnd.wt.stf",
  709. "xar" => "application/vnd.xara",
  710. "xfdl" => "application/vnd.xfdl",
  711. "hvd" => "application/vnd.yamaha.hv-dic",
  712. "hvs" => "application/vnd.yamaha.hv-script",
  713. "hvp" => "application/vnd.yamaha.hv-voice",
  714. "osf" => "application/vnd.yamaha.openscoreformat",
  715. "osfpvg" => "application/vnd.yamaha.openscoreformat.osfpvg+xml",
  716. "saf" => "application/vnd.yamaha.smaf-audio",
  717. "spf" => "application/vnd.yamaha.smaf-phrase",
  718. "cmp" => "application/vnd.yellowriver-custom-menu",
  719. "zir" => "application/vnd.zul",
  720. "zirz" => "application/vnd.zul",
  721. "zaz" => "application/vnd.zzazz.deck+xml",
  722. "vxml" => "application/voicexml+xml",
  723. "wgt" => "application/widget",
  724. "hlp" => "application/winhlp",
  725. "wsdl" => "application/wsdl+xml",
  726. "wspolicy" => "application/wspolicy+xml",
  727. "7z" => "application/x-7z-compressed",
  728. "abw" => "application/x-abiword",
  729. "ace" => "application/x-ace-compressed",
  730. "dmg" => "application/x-apple-diskimage",
  731. "aab" => "application/x-authorware-bin",
  732. "x32" => "application/x-authorware-bin",
  733. "u32" => "application/x-authorware-bin",
  734. "vox" => "application/x-authorware-bin",
  735. "aam" => "application/x-authorware-map",
  736. "aas" => "application/x-authorware-seg",
  737. "bcpio" => "application/x-bcpio",
  738. "torrent" => "application/x-bittorrent",
  739. "blb" => "application/x-blorb",
  740. "blorb" => "application/x-blorb",
  741. "bz" => "application/x-bzip",
  742. "bz2" => "application/x-bzip2",
  743. "boz" => "application/x-bzip2",
  744. "cbr" => "application/x-cbr",
  745. "cba" => "application/x-cbr",
  746. "cbt" => "application/x-cbr",
  747. "cbz" => "application/x-cbr",
  748. "cb7" => "application/x-cbr",
  749. "vcd" => "application/x-cdlink",
  750. "cfs" => "application/x-cfs-compressed",
  751. "chat" => "application/x-chat",
  752. "pgn" => "application/x-chess-pgn",
  753. "nsc" => "application/x-conference",
  754. "cpio" => "application/x-cpio",
  755. "csh" => "application/x-csh",
  756. "deb" => "application/x-debian-package",
  757. "udeb" => "application/x-debian-package",
  758. "dgc" => "application/x-dgc-compressed",
  759. "dir" => "application/x-director",
  760. "dcr" => "application/x-director",
  761. "dxr" => "application/x-director",
  762. "cst" => "application/x-director",
  763. "cct" => "application/x-director",
  764. "cxt" => "application/x-director",
  765. "w3d" => "application/x-director",
  766. "fgd" => "application/x-director",
  767. "swa" => "application/x-director",
  768. "wad" => "application/x-doom",
  769. "ncx" => "application/x-dtbncx+xml",
  770. "dtb" => "application/x-dtbook+xml",
  771. "res" => "application/x-dtbresource+xml",
  772. "dvi" => "application/x-dvi",
  773. "evy" => "application/x-envoy",
  774. "eva" => "application/x-eva",
  775. "bdf" => "application/x-font-bdf",
  776. "gsf" => "application/x-font-ghostscript",
  777. "psf" => "application/x-font-linux-psf",
  778. "pcf" => "application/x-font-pcf",
  779. "snf" => "application/x-font-snf",
  780. "pfa" => "application/x-font-type1",
  781. "pfb" => "application/x-font-type1",
  782. "pfm" => "application/x-font-type1",
  783. "afm" => "application/x-font-type1",
  784. "arc" => "application/x-freearc",
  785. "spl" => "application/x-futuresplash",
  786. "gca" => "application/x-gca-compressed",
  787. "ulx" => "application/x-glulx",
  788. "gnumeric" => "application/x-gnumeric",
  789. "gramps" => "application/x-gramps-xml",
  790. "gtar" => "application/x-gtar",
  791. "hdf" => "application/x-hdf",
  792. "install" => "application/x-install-instructions",
  793. "iso" => "application/x-iso9660-image",
  794. "jnlp" => "application/x-java-jnlp-file",
  795. "latex" => "application/x-latex",
  796. "lzh" => "application/x-lzh-compressed",
  797. "lha" => "application/x-lzh-compressed",
  798. "mie" => "application/x-mie",
  799. "prc" => "application/x-mobipocket-ebook",
  800. "mobi" => "application/x-mobipocket-ebook",
  801. "application" => "application/x-ms-application",
  802. "lnk" => "application/x-ms-shortcut",
  803. "wmd" => "application/x-ms-wmd",
  804. "wmz" => "application/x-ms-wmz",
  805. "xbap" => "application/x-ms-xbap",
  806. "mdb" => "application/x-msaccess",
  807. "obd" => "application/x-msbinder",
  808. "crd" => "application/x-mscardfile",
  809. "clp" => "application/x-msclip",
  810. "exe" => "application/x-msdownload",
  811. "dll" => "application/x-msdownload",
  812. "com" => "application/x-msdownload",
  813. "bat" => "application/x-msdownload",
  814. "msi" => "application/x-msdownload",
  815. "mvb" => "application/x-msmediaview",
  816. "m13" => "application/x-msmediaview",
  817. "m14" => "application/x-msmediaview",
  818. "wmf" => "application/x-msmetafile",
  819. "wmz" => "application/x-msmetafile",
  820. "emf" => "application/x-msmetafile",
  821. "emz" => "application/x-msmetafile",
  822. "mny" => "application/x-msmoney",
  823. "pub" => "application/x-mspublisher",
  824. "scd" => "application/x-msschedule",
  825. "trm" => "application/x-msterminal",
  826. "wri" => "application/x-mswrite",
  827. "nc" => "application/x-netcdf",
  828. "cdf" => "application/x-netcdf",
  829. "nzb" => "application/x-nzb",
  830. "p12" => "application/x-pkcs12",
  831. "pfx" => "application/x-pkcs12",
  832. "p7b" => "application/x-pkcs7-certificates",
  833. "spc" => "application/x-pkcs7-certificates",
  834. "p7r" => "application/x-pkcs7-certreqresp",
  835. "rar" => "application/x-rar-compressed",
  836. "ris" => "application/x-research-info-systems",
  837. "sh" => "application/x-sh",
  838. "shar" => "application/x-shar",
  839. "swf" => "application/x-shockwave-flash",
  840. "xap" => "application/x-silverlight-app",
  841. "sql" => "application/x-sql",
  842. "sit" => "application/x-stuffit",
  843. "sitx" => "application/x-stuffitx",
  844. "srt" => "application/x-subrip",
  845. "sv4cpio" => "application/x-sv4cpio",
  846. "sv4crc" => "application/x-sv4crc",
  847. "t3" => "application/x-t3vm-image",
  848. "gam" => "application/x-tads",
  849. "tar" => "application/x-tar",
  850. "tcl" => "application/x-tcl",
  851. "tex" => "application/x-tex",
  852. "tfm" => "application/x-tex-tfm",
  853. "texinfo" => "application/x-texinfo",
  854. "texi" => "application/x-texinfo",
  855. "obj" => "application/x-tgif",
  856. "ustar" => "application/x-ustar",
  857. "src" => "application/x-wais-source",
  858. "der" => "application/x-x509-ca-cert",
  859. "crt" => "application/x-x509-ca-cert",
  860. "fig" => "application/x-xfig",
  861. "xlf" => "application/x-xliff+xml",
  862. "xpi" => "application/x-xpinstall",
  863. "xz" => "application/x-xz",
  864. "z1" => "application/x-zmachine",
  865. "z2" => "application/x-zmachine",
  866. "z3" => "application/x-zmachine",
  867. "z4" => "application/x-zmachine",
  868. "z5" => "application/x-zmachine",
  869. "z6" => "application/x-zmachine",
  870. "z7" => "application/x-zmachine",
  871. "z8" => "application/x-zmachine",
  872. "xaml" => "application/xaml+xml",
  873. "xdf" => "application/xcap-diff+xml",
  874. "xenc" => "application/xenc+xml",
  875. "xhtml" => "application/xhtml+xml",
  876. "xht" => "application/xhtml+xml",
  877. "xml" => "application/xml",
  878. "xsl" => "application/xml",
  879. "dtd" => "application/xml-dtd",
  880. "xop" => "application/xop+xml",
  881. "xpl" => "application/xproc+xml",
  882. "xslt" => "application/xslt+xml",
  883. "xspf" => "application/xspf+xml",
  884. "mxml" => "application/xv+xml",
  885. "xhvml" => "application/xv+xml",
  886. "xvml" => "application/xv+xml",
  887. "xvm" => "application/xv+xml",
  888. "yang" => "application/yang",
  889. "yin" => "application/yin+xml",
  890. "zip" => "application/zip",
  891. "adp" => "audio/adpcm",
  892. "au" => "audio/basic",
  893. "snd" => "audio/basic",
  894. "mid" => "audio/midi",
  895. "midi" => "audio/midi",
  896. "kar" => "audio/midi",
  897. "rmi" => "audio/midi",
  898. "m4a" => "audio/mp4",
  899. "mp4a" => "audio/mp4",
  900. "mpga" => "audio/mpeg",
  901. "mp2" => "audio/mpeg",
  902. "mp2a" => "audio/mpeg",
  903. "mp3" => "audio/mpeg",
  904. "m2a" => "audio/mpeg",
  905. "m3a" => "audio/mpeg",
  906. "oga" => "audio/ogg",
  907. "ogg" => "audio/ogg",
  908. "spx" => "audio/ogg",
  909. "s3m" => "audio/s3m",
  910. "sil" => "audio/silk",
  911. "uva" => "audio/vnd.dece.audio",
  912. "uvva" => "audio/vnd.dece.audio",
  913. "eol" => "audio/vnd.digital-winds",
  914. "dra" => "audio/vnd.dra",
  915. "dts" => "audio/vnd.dts",
  916. "dtshd" => "audio/vnd.dts.hd",
  917. "lvp" => "audio/vnd.lucent.voice",
  918. "pya" => "audio/vnd.ms-playready.media.pya",
  919. "ecelp4800" => "audio/vnd.nuera.ecelp4800",
  920. "ecelp7470" => "audio/vnd.nuera.ecelp7470",
  921. "ecelp9600" => "audio/vnd.nuera.ecelp9600",
  922. "rip" => "audio/vnd.rip",
  923. "weba" => "audio/webm",
  924. "aac" => "audio/x-aac",
  925. "aif" => "audio/x-aiff",
  926. "aiff" => "audio/x-aiff",
  927. "aifc" => "audio/x-aiff",
  928. "caf" => "audio/x-caf",
  929. "flac" => "audio/x-flac",
  930. "mka" => "audio/x-matroska",
  931. "m3u" => "audio/x-mpegurl",
  932. "wax" => "audio/x-ms-wax",
  933. "wma" => "audio/x-ms-wma",
  934. "ram" => "audio/x-pn-realaudio",
  935. "ra" => "audio/x-pn-realaudio",
  936. "rmp" => "audio/x-pn-realaudio-plugin",
  937. "wav" => "audio/x-wav",
  938. "xm" => "audio/xm",
  939. "cdx" => "chemical/x-cdx",
  940. "cif" => "chemical/x-cif",
  941. "cmdf" => "chemical/x-cmdf",
  942. "cml" => "chemical/x-cml",
  943. "csml" => "chemical/x-csml",
  944. "xyz" => "chemical/x-xyz",
  945. "ttc" => "font/collection",
  946. "otf" => "font/otf",
  947. "ttf" => "font/ttf",
  948. "woff" => "font/woff",
  949. "woff2" => "font/woff2",
  950. "bmp" => "image/bmp",
  951. "cgm" => "image/cgm",
  952. "g3" => "image/g3fax",
  953. "gif" => "image/gif",
  954. "ief" => "image/ief",
  955. "jpeg" => "image/jpeg",
  956. "jpg" => "image/jpeg",
  957. "jpe" => "image/jpeg",
  958. "ktx" => "image/ktx",
  959. "png" => "image/png",
  960. "btif" => "image/prs.btif",
  961. "sgi" => "image/sgi",
  962. "svg" => "image/svg+xml",
  963. "svgz" => "image/svg+xml",
  964. "tiff" => "image/tiff",
  965. "tif" => "image/tiff",
  966. "psd" => "image/vnd.adobe.photoshop",
  967. "uvi" => "image/vnd.dece.graphic",
  968. "uvvi" => "image/vnd.dece.graphic",
  969. "uvg" => "image/vnd.dece.graphic",
  970. "uvvg" => "image/vnd.dece.graphic",
  971. "djvu" => "image/vnd.djvu",
  972. "djv" => "image/vnd.djvu",
  973. "sub" => "image/vnd.dvb.subtitle",
  974. "dwg" => "image/vnd.dwg",
  975. "dxf" => "image/vnd.dxf",
  976. "fbs" => "image/vnd.fastbidsheet",
  977. "fpx" => "image/vnd.fpx",
  978. "fst" => "image/vnd.fst",
  979. "mmr" => "image/vnd.fujixerox.edmics-mmr",
  980. "rlc" => "image/vnd.fujixerox.edmics-rlc",
  981. "mdi" => "image/vnd.ms-modi",
  982. "wdp" => "image/vnd.ms-photo",
  983. "npx" => "image/vnd.net-fpx",
  984. "wbmp" => "image/vnd.wap.wbmp",
  985. "xif" => "image/vnd.xiff",
  986. "webp" => "image/webp",
  987. "3ds" => "image/x-3ds",
  988. "ras" => "image/x-cmu-raster",
  989. "cmx" => "image/x-cmx",
  990. "fh" => "image/x-freehand",
  991. "fhc" => "image/x-freehand",
  992. "fh4" => "image/x-freehand",
  993. "fh5" => "image/x-freehand",
  994. "fh7" => "image/x-freehand",
  995. "ico" => "image/x-icon",
  996. "sid" => "image/x-mrsid-image",
  997. "pcx" => "image/x-pcx",
  998. "pic" => "image/x-pict",
  999. "pct" => "image/x-pict",
  1000. "pnm" => "image/x-portable-anymap",
  1001. "pbm" => "image/x-portable-bitmap",
  1002. "pgm" => "image/x-portable-graymap",
  1003. "ppm" => "image/x-portable-pixmap",
  1004. "rgb" => "image/x-rgb",
  1005. "tga" => "image/x-tga",
  1006. "xbm" => "image/x-xbitmap",
  1007. "xpm" => "image/x-xpixmap",
  1008. "xwd" => "image/x-xwindowdump",
  1009. "eml" => "message/rfc822",
  1010. "mime" => "message/rfc822",
  1011. "igs" => "model/iges",
  1012. "iges" => "model/iges",
  1013. "msh" => "model/mesh",
  1014. "mesh" => "model/mesh",
  1015. "silo" => "model/mesh",
  1016. "dae" => "model/vnd.collada+xml",
  1017. "dwf" => "model/vnd.dwf",
  1018. "gdl" => "model/vnd.gdl",
  1019. "gtw" => "model/vnd.gtw",
  1020. "mts" => "model/vnd.mts",
  1021. "vtu" => "model/vnd.vtu",
  1022. "wrl" => "model/vrml",
  1023. "vrml" => "model/vrml",
  1024. "x3db" => "model/x3d+binary",
  1025. "x3dbz" => "model/x3d+binary",
  1026. "x3dv" => "model/x3d+vrml",
  1027. "x3dvz" => "model/x3d+vrml",
  1028. "x3d" => "model/x3d+xml",
  1029. "x3dz" => "model/x3d+xml",
  1030. "appcache" => "text/cache-manifest",
  1031. "ics" => "text/calendar",
  1032. "ifb" => "text/calendar",
  1033. "css" => "text/css",
  1034. "csv" => "text/csv",
  1035. "html" => "text/html",
  1036. "htm" => "text/html",
  1037. "n3" => "text/n3",
  1038. "txt" => "text/plain",
  1039. "text" => "text/plain",
  1040. "conf" => "text/plain",
  1041. "def" => "text/plain",
  1042. "list" => "text/plain",
  1043. "log" => "text/plain",
  1044. "in" => "text/plain",
  1045. "dsc" => "text/prs.lines.tag",
  1046. "rtx" => "text/richtext",
  1047. "sgml" => "text/sgml",
  1048. "sgm" => "text/sgml",
  1049. "tsv" => "text/tab-separated-values",
  1050. "t" => "text/troff",
  1051. "tr" => "text/troff",
  1052. "roff" => "text/troff",
  1053. "man" => "text/troff",
  1054. "me" => "text/troff",
  1055. "ms" => "text/troff",
  1056. "ttl" => "text/turtle",
  1057. "uri" => "text/uri-list",
  1058. "uris" => "text/uri-list",
  1059. "urls" => "text/uri-list",
  1060. "vcard" => "text/vcard",
  1061. "curl" => "text/vnd.curl",
  1062. "dcurl" => "text/vnd.curl.dcurl",
  1063. "mcurl" => "text/vnd.curl.mcurl",
  1064. "scurl" => "text/vnd.curl.scurl",
  1065. "sub" => "text/vnd.dvb.subtitle",
  1066. "fly" => "text/vnd.fly",
  1067. "flx" => "text/vnd.fmi.flexstor",
  1068. "gv" => "text/vnd.graphviz",
  1069. "3dml" => "text/vnd.in3d.3dml",
  1070. "spot" => "text/vnd.in3d.spot",
  1071. "jad" => "text/vnd.sun.j2me.app-descriptor",
  1072. "wml" => "text/vnd.wap.wml",
  1073. "wmls" => "text/vnd.wap.wmlscript",
  1074. "s" => "text/x-asm",
  1075. "asm" => "text/x-asm",
  1076. "c" => "text/x-c",
  1077. "cc" => "text/x-c",
  1078. "cxx" => "text/x-c",
  1079. "cpp" => "text/x-c",
  1080. "h" => "text/x-c",
  1081. "hh" => "text/x-c",
  1082. "dic" => "text/x-c",
  1083. "f" => "text/x-fortran",
  1084. "for" => "text/x-fortran",
  1085. "f77" => "text/x-fortran",
  1086. "f90" => "text/x-fortran",
  1087. "java" => "text/x-java-source",
  1088. "nfo" => "text/x-nfo",
  1089. "opml" => "text/x-opml",
  1090. "p" => "text/x-pascal",
  1091. "pas" => "text/x-pascal",
  1092. "etx" => "text/x-setext",
  1093. "sfv" => "text/x-sfv",
  1094. "uu" => "text/x-uuencode",
  1095. "vcs" => "text/x-vcalendar",
  1096. "vcf" => "text/x-vcard",
  1097. "3gp" => "video/3gpp",
  1098. "3g2" => "video/3gpp2",
  1099. "h261" => "video/h261",
  1100. "h263" => "video/h263",
  1101. "h264" => "video/h264",
  1102. "jpgv" => "video/jpeg",
  1103. "jpm" => "video/jpm",
  1104. "jpgm" => "video/jpm",
  1105. "mj2" => "video/mj2",
  1106. "mjp2" => "video/mj2",
  1107. "mp4" => "video/mp4",
  1108. "mp4v" => "video/mp4",
  1109. "mpg4" => "video/mp4",
  1110. "mpeg" => "video/mpeg",
  1111. "mpg" => "video/mpeg",
  1112. "mpe" => "video/mpeg",
  1113. "m1v" => "video/mpeg",
  1114. "m2v" => "video/mpeg",
  1115. "ogv" => "video/ogg",
  1116. "qt" => "video/quicktime",
  1117. "mov" => "video/quicktime",
  1118. "uvh" => "video/vnd.dece.hd",
  1119. "uvvh" => "video/vnd.dece.hd",
  1120. "uvm" => "video/vnd.dece.mobile",
  1121. "uvvm" => "video/vnd.dece.mobile",
  1122. "uvp" => "video/vnd.dece.pd",
  1123. "uvvp" => "video/vnd.dece.pd",
  1124. "uvs" => "video/vnd.dece.sd",
  1125. "uvvs" => "video/vnd.dece.sd",
  1126. "uvv" => "video/vnd.dece.video",
  1127. "uvvv" => "video/vnd.dece.video",
  1128. "dvb" => "video/vnd.dvb.file",
  1129. "fvt" => "video/vnd.fvt",
  1130. "mxu" => "video/vnd.mpegurl",
  1131. "m4u" => "video/vnd.mpegurl",
  1132. "pyv" => "video/vnd.ms-playready.media.pyv",
  1133. "uvu" => "video/vnd.uvvu.mp4",
  1134. "uvvu" => "video/vnd.uvvu.mp4",
  1135. "viv" => "video/vnd.vivo",
  1136. "webm" => "video/webm",
  1137. "f4v" => "video/x-f4v",
  1138. "fli" => "video/x-fli",
  1139. "flv" => "video/x-flv",
  1140. "m4v" => "video/x-m4v",
  1141. "mkv" => "video/x-matroska",
  1142. "mk3d" => "video/x-matroska",
  1143. "mks" => "video/x-matroska",
  1144. "mng" => "video/x-mng",
  1145. "asf" => "video/x-ms-asf",
  1146. "asx" => "video/x-ms-asf",
  1147. "vob" => "video/x-ms-vob",
  1148. "wm" => "video/x-ms-wm",
  1149. "wmv" => "video/x-ms-wmv",
  1150. "wmx" => "video/x-ms-wmx",
  1151. "wvx" => "video/x-ms-wvx",
  1152. "avi" => "video/x-msvideo",
  1153. "movie" => "video/x-sgi-movie",
  1154. "smv" => "video/x-smv",
  1155. "ice" => "x-conference/x-cooltalk",
  1156. ];
  1157. $path = $_SERVER['REQUEST_URI'];
  1158. $dir = realpath(__DIR__ . $path);
  1159. if (strpos($dir, $ROOTPATH) !== 0) {
  1160. die("Access denied.");
  1161. }
  1162. ?>
  1163. <!DOCTYPE html>
  1164. <meta charset="utf-8">
  1165. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  1166. <title><?php echo $TITLE; ?></title>
  1167. <?php
  1168. foreach ($STYLESHEETS as $css) {
  1169. echo "<link rel=\"stylesheet\" href=\"$css\" />\n";
  1170. }
  1171. ?>
  1172. <style>
  1173. ul {
  1174. list-style: none;
  1175. }
  1176. .display-5 {
  1177. font-size: 2.75rem;
  1178. font-weight: 300;
  1179. line-height: 1.2;
  1180. }
  1181. .site-icon {
  1182. width: 150px;
  1183. max-width: 100%;
  1184. }
  1185. a {
  1186. overflow-wrap: break-word;
  1187. word-wrap: break-word;
  1188. word-break: break-all;
  1189. }
  1190. @media (max-width: 991px) {
  1191. .display-4 {
  1192. font-size: 2.5rem;
  1193. }
  1194. .display-5 {
  1195. font-size: 2rem;
  1196. }
  1197. }
  1198. @media (max-width: 767px) {
  1199. .site-icon {
  1200. width: 100px;
  1201. }
  1202. }
  1203. @media (max-width: 474px) {
  1204. .display-4 {
  1205. font-size: 2rem;
  1206. }
  1207. .display-5 {
  1208. font-size: 1.75rem;
  1209. }
  1210. }
  1211. </style>
  1212. <?php
  1213. foreach ($FONTAWESOME as $fa) {
  1214. echo "<script src=\"$fa\"></script>\n";
  1215. }
  1216. ?>
  1217. <div class="container">
  1218. <div class="card">
  1219. <div class="card-body">
  1220. <div class="row">
  1221. <div class="col-12 col-md-4 col-lg-2" style="text-align: center;">
  1222. <img src="<?php echo $SITEICON; ?>" class="site-icon" />
  1223. </div>
  1224. <div class="col-12 col-md-8 col-lg-10">
  1225. <div class="d-flex flex-column justify-content-center" style="height: 100%;">
  1226. <h1 class="display-4"><?php echo $H1; ?></h1>
  1227. <h2 class="display-5"><?php echo $H2; ?></h2>
  1228. </div>
  1229. </div>
  1230. </div>
  1231. </div>
  1232. </div>
  1233. <div class="row mt-4">
  1234. <div class="col-12">
  1235. <div class="card">
  1236. <div class="card-header d-flex">
  1237. <span class="mr-auto">
  1238. <nav aria-label="breadcrumb">
  1239. <ol class="breadcrumb m-0">
  1240. <?php
  1241. $pathparts = explode("/", $path);
  1242. $pstr = "";
  1243. for ($i = 0; $i < count($pathparts)-1; $i++) {
  1244. $p = $pathparts[$i];
  1245. $pstr .= $p . "/";
  1246. if ($i == 0) {
  1247. $p = "<span class=\"fas fa-home\"></span>";
  1248. }
  1249. if ($i+1 == count($pathparts)-1) {
  1250. echo "\t<li aria-current=\"page\" class=\"breadcrumb-item active\">$p</li>";
  1251. } else {
  1252. echo "\t<li class=\"breadcrumb-item\"><a href=\"$pstr\">$p</a></li>";
  1253. }
  1254. echo "\n";
  1255. }
  1256. ?>
  1257. </ol>
  1258. </nav>
  1259. </span>
  1260. </div>
  1261. <div class="card-body">
  1262. <ul class="list-group">
  1263. <?php
  1264. $files = scandir($dir);
  1265. foreach ($files as $f) {
  1266. if (strpos($f, '.') !== 0 && !in_array($f, $IGNORE)) {
  1267. echo "<li class=\"list-group-item d-flex\">\n";
  1268. echo "\t<a href=\"$path$f\">";
  1269. if (is_dir($dir . "/" . $f)) {
  1270. echo "<span class=\"fas fa-folder fa-fw\"></span> ";
  1271. } else {
  1272. $icon = "fas fa-file";
  1273. $extension = pathinfo("$dir/$f")['extension'];
  1274. // If we don't have an extension, try using the whole filename
  1275. if ($extension == "") {
  1276. $extension = $f;
  1277. }
  1278. $mimetype = "application/octet-stream";
  1279. // Lookup mimetype from extension
  1280. if (array_key_exists($extension, $EXT2MIME)) {
  1281. $mimetype = $EXT2MIME[$extension];
  1282. }
  1283. // Lookup icon from mimetype
  1284. if (array_key_exists($mimetype, $MIMEICONS)) {
  1285. $icon = $MIMEICONS[$mimetype];
  1286. } else { // Allow broad generic <format>/other icons
  1287. $mimefirst = explode("/", $mimetype, 2)[0];
  1288. if (array_key_exists($mimefirst."/other", $MIMEICONS)) {
  1289. $icon = $MIMEICONS[$mimetype];
  1290. }
  1291. }
  1292. echo "<span class=\"$icon fa-fw\"></span> ";
  1293. }
  1294. echo $f . "</a>\n";
  1295. if (count($MIRRORBASE) > 0 && !is_dir($dir . "/" . $f)) {
  1296. echo "<span class=\"d-inline-flex justify-content-end "
  1297. . "align-items-center flex-wrap ml-auto\">\n";
  1298. echo "\t<a href=\"$path$f\" class=\"my-1 btn btn-outline-default btn-sm\">"
  1299. . "<span class=\"fas fa-cloud-download-alt\"></span>"
  1300. . " Main</a>\n";
  1301. foreach ($MIRRORBASE as $mirror) {
  1302. $name = $mirror["name"];
  1303. $base = $mirror["base"];
  1304. echo "\t<a href=\"$base$path$f\""
  1305. . " class=\"ml-2 my-1 btn btn-outline-default btn-sm\">"
  1306. . "<span class=\"fas fa-cloud-download-alt\"></span>"
  1307. . " $name</a>\n";
  1308. }
  1309. echo "</span>";
  1310. }
  1311. echo "</li>\n\n";
  1312. }
  1313. }
  1314. ?>
  1315. </ul>
  1316. </div>
  1317. </div>
  1318. </div>
  1319. </div>
  1320. </div>