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

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