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 51KB

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