PageRenderTime 57ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 1ms

/index.php

https://github.com/ilian-G/encode-explorer
PHP | 3075 lines | 2414 code | 195 blank | 466 comment | 412 complexity | 2df509547ac19eb34e1bbf50035c8980 MD5 | raw file
  1. <?php
  2. /***************************************************************************
  3. *
  4. * Encode Explorer
  5. *
  6. * Author / Autor : Marek Rei (marek ät siineiolekala dot net)
  7. *
  8. * Version / Versioon : 6.3
  9. *
  10. * Last change / Viimati muudetud: 23.09.2011
  11. *
  12. * Homepage / Koduleht: encode-explorer.siineiolekala.net
  13. *
  14. *
  15. * NB!: Comments are in english.
  16. * Comments needed for configuring are in both estonian and english.
  17. * If you change anything, save with UTF-8! Otherwise you may
  18. * encounter problems, especially when displaying images.
  19. *
  20. * NB!: Kommentaarid on inglise keeles.
  21. * Seadistamiseks vajalikud kommentaarid on eesti ja inglise keeles.
  22. * Kui midagi muudate, salvestage UTF-8 formaati! Vastasel juhul
  23. * võivad probleemid tekkida, eriti piltide kuvamisega.
  24. *
  25. ***************************************************************************/
  26. /***************************************************************************
  27. *
  28. * This is free software and it's distributed under GPL Licence.
  29. *
  30. * Encode Explorer is written in the hopes that it can be useful to people.
  31. * It has NO WARRANTY and when you use it, the author is not responsible
  32. * for how it works (or doesn't).
  33. *
  34. * The icon images are designed by Mark James (http://www.famfamfam.com)
  35. * and distributed under the Creative Commons Attribution 3.0 License.
  36. *
  37. ***************************************************************************/
  38. /***************************************************************************/
  39. /* SIIN ON SEADED */
  40. /* */
  41. /* HERE ARE THE SETTINGS FOR CONFIGURATION */
  42. /***************************************************************************/
  43. //
  44. // Algväärtustame muutujad. Ära muuda.
  45. //
  46. // Initialising variables. Don't change these.
  47. //
  48. $_CONFIG = array();
  49. $_ERROR = "";
  50. $_START_TIME = microtime(TRUE);
  51. /*
  52. * GENERAL SETTINGS
  53. */
  54. //
  55. // Vali sobiv keel. Allpool on näha võimalikud valikud. Vaikimisi: en
  56. //
  57. // Choose a language. See below in the language section for options.
  58. // Default: $_CONFIG['lang'] = "en";
  59. //
  60. $_CONFIG['lang'] = "en";
  61. //
  62. // Kuva pildifailidele eelvaated. Vaikimisi: true
  63. // Levinumad pildifailide tüübid on toetatud (jpeg, png, gif).
  64. // Pdf failid on samuti toetatud kuid ImageMagick peab olema paigaldatud.
  65. //
  66. // Display thumbnails when hovering over image entries in the list.
  67. // Common image types are supported (jpeg, png, gif).
  68. // Pdf files are also supported but require ImageMagick to be installed.
  69. // Default: $_CONFIG['thumbnails'] = true;
  70. //
  71. $_CONFIG['thumbnails'] = true;
  72. //
  73. // Eelvaadete maksimumsuurused pikslites. Vaikimisi: 200, 200
  74. //
  75. // Maximum sizes of the thumbnails.
  76. // Default: $_CONFIG['thumbnails_width'] = 200;
  77. // Default: $_CONFIG['thumbnails_height'] = 200;
  78. //
  79. $_CONFIG['thumbnails_width'] = 300;
  80. $_CONFIG['thumbnails_height'] = 300;
  81. //
  82. // Mobillidele mõeldud kasutajaliides. true/false
  83. // Vaikimisi: true
  84. //
  85. // Mobile interface enabled. true/false
  86. // Default: $_CONFIG['mobile_enabled'] = true;
  87. //
  88. $_CONFIG['mobile_enabled'] = true;
  89. //
  90. // Mobiilidele mõeldud kasutajaliides avaneb automaatselt. true/false
  91. // Vaikimisi: false
  92. //
  93. // Mobile interface as the default setting. true/false
  94. // Default: $_CONFIG['mobile_default'] = false;
  95. //
  96. $_CONFIG['mobile_default'] = false;
  97. /*
  98. * USER INTERFACE
  99. */
  100. //
  101. // Kas failid avatakse uues aknas? true/false
  102. //
  103. // Will the files be opened in a new window? true/false
  104. // Default: $_CONFIG['open_in_new_window'] = false;
  105. //
  106. $_CONFIG['open_in_new_window'] = false;
  107. //
  108. // Kui sügavalt alamkataloogidest suurust näitav script faile otsib?
  109. // Määra see nullist suuremaks, kui soovid kogu kasutatud ruumi suurust kuvada.
  110. // Vaikimisi: 0
  111. //
  112. // How deep in subfolders will the script search for files?
  113. // Set it larger than 0 to display the total used space.
  114. // Default: $_CONFIG['calculate_space_level'] = 0;
  115. //
  116. $_CONFIG['calculate_space_level'] = 0;
  117. //
  118. // Kas kuvatakse lehe päis? true/false
  119. // Vaikimisi: true;
  120. //
  121. // Will the page header be displayed? 0=no, 1=yes.
  122. // Default: $_CONFIG['show_top'] = true;
  123. //
  124. $_CONFIG['show_top'] = true;
  125. //
  126. // Veebilehe pealkiri
  127. //
  128. // The title for the page
  129. // Default: $_CONFIG['main_title'] = "Encode Explorer";
  130. //
  131. $_CONFIG['main_title'] = "Encode Explorer";
  132. //
  133. // Pealkirjad, mida kuvatakse lehe päises, suvalises järjekorras.
  134. //
  135. // The secondary page titles, randomly selected and displayed under the main header.
  136. // For example: $_CONFIG['secondary_titles'] = array("Secondary title", "&ldquo;Secondary title with quotes&rdquo;");
  137. // Default: $_CONFIG['secondary_titles'] = array();
  138. //
  139. $_CONFIG['secondary_titles'] = array();
  140. //
  141. // Kuva asukoht kataloogipuus. true/false
  142. // Vaikimisi: true
  143. //
  144. // Display breadcrumbs (relative path of the location).
  145. // Default: $_CONFIG['show_path'] = true;
  146. //
  147. $_CONFIG['show_path'] = true;
  148. //
  149. // Kuva lehe laadimise aega. true/false
  150. // Vaikimisi: false
  151. //
  152. // Display the time it took to load the page.
  153. // Default: $_CONFIG['show_load_time'] = true;
  154. //
  155. $_CONFIG['show_load_time'] = true;
  156. //
  157. // Formaat faili muutmise aja kuvamiseks.
  158. //
  159. // The time format for the "last changed" column.
  160. // Default: $_CONFIG['time_format'] = "d.m.y H:i:s";
  161. //
  162. $_CONFIG['time_format'] = "d.m.y H:i:s";
  163. //
  164. // Kodeering, mida lehel kasutatakse.
  165. // Tuleb panna sobivaks, kui täpitähtedega tekib probleeme. Vaikimisi: UTF-8
  166. //
  167. // Charset. Use the one that suits for you.
  168. // Default: $_CONFIG['charset'] = "UTF-8";
  169. //
  170. $_CONFIG['charset'] = "UTF-8";
  171. /*
  172. * PERMISSIONS
  173. */
  174. //
  175. // Kaustade varjamine. Kaustade nimed mida lehel ei kuvata.
  176. // Näiteks: CONFIG['hidden_dirs'] = array("ikoonid", "kaustanimi", "teinekaust");
  177. //
  178. // The array of folder names that will be hidden from the list.
  179. // Default: $_CONFIG['hidden_dirs'] = array();
  180. //
  181. $_CONFIG['hidden_dirs'] = array();
  182. //
  183. // Failide varjamine. Failide nimed mida lehel ei kuvata.
  184. // NB! Märgitud nimega failid ja kaustad varjatakse kõigis alamkaustades.
  185. //
  186. // Filenames that will be hidden from the list.
  187. // Default: $_CONFIG['hidden_files'] = array(".ftpquota", "index.php", "index.php~", ".htaccess", ".htpasswd");
  188. //
  189. $_CONFIG['hidden_files'] = array(".ftpquota", "index.php", "index.php~", ".htaccess", ".htpasswd");
  190. //
  191. // Määra kas lehe nägemiseks peab sisse logima.
  192. // 'false' tähendab, et leht on avalik
  193. // 'true' tähendab, et kasutaja peab sisestama parooli (vaata allpool).
  194. //
  195. // Whether authentication is required to see the contents of the page.
  196. // If set to false, the page is public.
  197. // If set to true, you should specify some users as well (see below).
  198. // Important: This only prevents people from seeing the list.
  199. // They will still be able to access the files with a direct link.
  200. // Default: $_CONFIG['require_login'] = false;
  201. //
  202. $_CONFIG['require_login'] = false;
  203. //
  204. // Kasutajanimed ja paroolid, lehele ligipääsu piiramiseks.
  205. // Näiteks: $_CONFIG['users'] = array(array("user1", "pass1"), array("user2", "pass2"));
  206. // Võimalik lehte kaitsta ka ainult üldise parooliga.
  207. // Näiteks: $_CONFIG['users'] = array(array(null, "pass"));
  208. // Kui ühtegi kasutajat märgitud ei ole, siis parooli ei küsita.
  209. //
  210. // Usernames and passwords for restricting access to the page.
  211. // The format is: array(username, password, status)
  212. // Status can be either "user" or "admin". User can read the page, admin can upload and delete.
  213. // For example: $_CONFIG['users'] = array(array("username1", "password1", "user"), array("username2", "password2", "admin"));
  214. // You can also keep require_login=false and specify an admin.
  215. // That way everyone can see the page but username and password are needed for uploading.
  216. // For example: $_CONFIG['users'] = array(array("username", "password", "admin"));
  217. // Default: $_CONFIG['users'] = array();
  218. //
  219. $_CONFIG['users'] = array();
  220. //
  221. // Seaded uploadimiseks, uute kaustade loomiseks ja kustutamiseks.
  222. // Valikud kehtivad ainult andmin kontode jaoks, tavakasutajatel pole need kunagi lubatud.
  223. //
  224. // Permissions for uploading, creating new directories and deleting.
  225. // They only apply to admin accounts, regular users can never perform these operations.
  226. // Default:
  227. // $_CONFIG['upload_enable'] = true;
  228. // $_CONFIG['newdir_enable'] = true;
  229. // $_CONFIG['delete_enable'] = false;
  230. //
  231. $_CONFIG['upload_enable'] = true;
  232. $_CONFIG['newdir_enable'] = true;
  233. $_CONFIG['delete_enable'] = false;
  234. /*
  235. * UPLOADING
  236. */
  237. //
  238. // Nimekiri kaustadest kuhu on lubatud uploadida ja uusi kaustu luua.
  239. // Näiteks: $_CONFIG['upload_dirs'] = array("./myuploaddir1/", "./mydir/upload2/");
  240. // Kausta asukoht peab olema määratud põhikausta suhtes, algama "./" ja lõppema "/" märgiga.
  241. // Kõik kaustad märgitute all on automaatselt kaasa arvatud.
  242. // Kui nimekiri on tühi (vaikimisi), siis on kõikidesse kaustadesse failide lisamine lubatud.
  243. //
  244. // List of directories where users are allowed to upload.
  245. // For example: $_CONFIG['upload_dirs'] = array("./myuploaddir1/", "./mydir/upload2/");
  246. // The path should be relative to the main directory, start with "./" and end with "/".
  247. // All the directories below the marked ones are automatically included as well.
  248. // If the list is empty (default), all directories are open for uploads, given that the password has been set.
  249. // Default: $_CONFIG['upload_dirs'] = array();
  250. //
  251. $_CONFIG['upload_dirs'] = array();
  252. //
  253. // MIME failitüübid mis on uploadimiseks lubatud.
  254. // Näiteks: $_CONFIG['upload_allow_type'] = array("image/png", "image/gif", "image/jpeg");
  255. //
  256. // MIME type that are allowed to be uploaded.
  257. // For example, to only allow uploading of common image types, you could use:
  258. // $_CONFIG['upload_allow_type'] = array("image/png", "image/gif", "image/jpeg");
  259. // Default: $_CONFIG['upload_allow_type'] = array();
  260. //
  261. $_CONFIG['upload_allow_type'] = array();
  262. //
  263. // Uploadimiseks keelatud faililaiendid
  264. //
  265. // File extensions that are not allowed for uploading.
  266. // For example: $_CONFIG['upload_reject_extension'] = array("php", "html", "htm");
  267. // Default: $_CONFIG['upload_reject_extension'] = array();
  268. //
  269. $_CONFIG['upload_reject_extension'] = array("php");
  270. /*
  271. * LOGGING
  272. */
  273. //
  274. // Failide lisamisest teatamise e-maili aadress.
  275. // Kui määratud, siis saadetakse sellele aadressile e-mail iga kord kui keegi lisab uue faili või kausta.
  276. //
  277. // Upload notification e-mail.
  278. // If set, an e-mail will be sent every time someone uploads a file or creates a new dirctory.
  279. // Default: $_CONFIG['upload_email'] = "";
  280. //
  281. $_CONFIG['upload_email'] = "";
  282. //
  283. // Logifail. Kui määratud, siis kirjutatakse kaustade ja failide avamise kohta logi faili.
  284. // Näiteks: $_CONFIG['log_file'] = ".log.txt";
  285. //
  286. // Logfile name. If set, a log line will be written there whenever a directory or file is accessed.
  287. // For example: $_CONFIG['log_file'] = ".log.txt";
  288. // Default: $_CONFIG['log_file'] = "";
  289. //
  290. $_CONFIG['log_file'] = "";
  291. /*
  292. * SYSTEM
  293. */
  294. //
  295. // Algkataloogi suhteline aadress. Reeglina ei ole vaja muuta.
  296. // Kasutage ainult suhtelisi alamkatalooge!
  297. // Vaikimisi: .
  298. //
  299. // The starting directory. Normally no need to change this.
  300. // Use only relative subdirectories!
  301. // For example: $_CONFIG['starting_dir'] = "./mysubdir/";
  302. // Default: $_CONFIG['starting_dir'] = ".";
  303. //
  304. $_CONFIG['starting_dir'] = ".";
  305. //
  306. // Asukoht serveris. Tavaliselt ei ole vaja siia midagi panna kuna script leiab ise õige asukoha.
  307. // Mõnes serveris tuleb piirangute tõttu see aadress ise teistsuguseks määrata.
  308. // See fail peaks asuma serveris aadressil [AADRESS]/index.php
  309. // Aadress võib olla näiteks "/www/data/www.minudomeen.ee/minunimi"
  310. //
  311. // Location in the server. Usually this does not have to be set manually.
  312. // Default: $_CONFIG['basedir'] = "";
  313. //
  314. $_CONFIG['basedir'] = "";
  315. //
  316. // Suured failid. Kui sul on failiruumis väga suured failid (>4GB), siis on see vajalik
  317. // faili suuruse õigeks määramiseks. Vaikimisi: false
  318. //
  319. // Big files. If you have some very big files (>4GB), enable this for correct
  320. // file size calculation.
  321. // Default: $_CONFIG['large_files'] = false;
  322. //
  323. $_CONFIG['large_files'] = false;
  324. //
  325. // Küpsise/sessiooni nimi.
  326. // Anna sellele originaalne väärtus kui soovid samas ruumis kasutada mitut koopiat
  327. // ning ei taha, et toimuks andmete jagamist nende vahel.
  328. // Väärtus tohib sisaldada ainult tähti ja numbreid. Näiteks: MYSESSION1
  329. //
  330. // The session name, which is used as a cookie name.
  331. // Change this to something original if you have multiple copies in the same space
  332. // and wish to keep their authentication separate.
  333. // The value can contain only letters and numbers. For example: MYSESSION1
  334. // More info at: http://www.php.net/manual/en/function.session-name.php
  335. // Default: $_CONFIG['session_name'] = "";
  336. //
  337. $_CONFIG['session_name'] = "";
  338. /***************************************************************************/
  339. /* TÕLKED */
  340. /* */
  341. /* TRANSLATIONS. */
  342. /***************************************************************************/
  343. $_TRANSLATIONS = array();
  344. // Albanian
  345. $_TRANSLATIONS["al"] = array(
  346. "file_name" => "Emri Skedarit",
  347. "size" => "Madhësia",
  348. "last_changed" => "Ndryshuar",
  349. "total_used_space" => "Memorija e përdorur total",
  350. "free_space" => "Memorija e lirë",
  351. "password" => "Fjalëkalimi",
  352. "upload" => "Ngarko skedarë",
  353. "failed_upload" => "Ngarkimi i skedarit dështoi!",
  354. "failed_move" => "Lëvizja e skedarit në udhëzuesin e saktë deshtoi!",
  355. "wrong_password" => "Fjalëkalimi i Gabuar!!",
  356. "make_directory" => "New dir",
  357. "new_dir_failed" => "Failed to create directory",
  358. "chmod_dir_failed" => "Failed to change directory rights",
  359. "unable_to_read_dir" => "Unable to read directory",
  360. "location" => "Location",
  361. "root" => "Root"
  362. );
  363. // Dutch
  364. $_TRANSLATIONS["nl"] = array(
  365. "file_name" => "Bestandsnaam",
  366. "size" => "Omvang",
  367. "last_changed" => "Laatst gewijzigd",
  368. "total_used_space" => "Totaal gebruikte ruimte",
  369. "free_space" => "Beschikbaar",
  370. "password" => "Wachtwoord",
  371. "upload" => "Upload",
  372. "failed_upload" => "Fout bij uploaden van bestand!",
  373. "failed_move" => "Fout bij het verplaatsen van tijdelijk uploadbestand!",
  374. "wrong_password" => "Fout wachtwoord!",
  375. "make_directory" => "Nieuwe folder",
  376. "new_dir_failed" => "Fout bij aanmaken folder!",
  377. "chmod_dir_failed" => "Rechten konden niet gewijzigd worden!",
  378. "unable_to_read_dir" => "Unable to read directory",
  379. "location" => "Location",
  380. "root" => "Root"
  381. );
  382. // English
  383. $_TRANSLATIONS["en"] = array(
  384. "file_name" => "File name",
  385. "size" => "Size",
  386. "last_changed" => "Last changed",
  387. "total_used_space" => "Total used space",
  388. "free_space" => "Free space",
  389. "password" => "Password",
  390. "upload" => "Upload",
  391. "failed_upload" => "Failed to upload the file!",
  392. "failed_move" => "Failed to move the file into the right directory!",
  393. "wrong_password" => "Wrong password",
  394. "make_directory" => "New dir",
  395. "new_dir_failed" => "Failed to create directory",
  396. "chmod_dir_failed" => "Failed to change directory rights",
  397. "unable_to_read_dir" => "Unable to read directory",
  398. "location" => "Location",
  399. "root" => "Root",
  400. "log_file_permission_error" => "The script does not have permissions to write the log file.",
  401. "upload_not_allowed" => "The script configuration does not allow uploading in this directory.",
  402. "upload_dir_not_writable" => "This directory does not have write permissions.",
  403. "mobile_version" => "Mobile view",
  404. "standard_version" => "Standard view",
  405. "page_load_time" => "Page loaded in %.2f ms",
  406. "wrong_pass" => "Wrong username or password",
  407. "username" => "Username",
  408. "log_in" => "Log in",
  409. "upload_type_not_allowed" => "This file type is not allowed for uploading.",
  410. "del" => "Del", // short for Delete
  411. "log_out" => "Log out"
  412. );
  413. // Estonian
  414. $_TRANSLATIONS["et"] = array(
  415. "file_name" => "Faili nimi",
  416. "size" => "Suurus",
  417. "last_changed" => "Viimati muudetud",
  418. "total_used_space" => "Kokku kasutatud",
  419. "free_space" => "Vaba ruumi",
  420. "password" => "Parool",
  421. "upload" => "Uploadi",
  422. "failed_upload" => "Faili ei &otilde;nnestunud serverisse laadida!",
  423. "failed_move" => "Faili ei &otilde;nnestunud &otilde;igesse kausta liigutada!",
  424. "wrong_password" => "Vale parool",
  425. "make_directory" => "Uus kaust",
  426. "new_dir_failed" => "Kausta loomine ebaõnnestus",
  427. "chmod_dir_failed" => "Kausta õiguste muutmine ebaõnnestus",
  428. "unable_to_read_dir" => "Unable to read directory",
  429. "location" => "Asukoht",
  430. "root" => "Peakaust"
  431. );
  432. // Finnish
  433. $_TRANSLATIONS["fi"] = array(
  434. "file_name" => "Tiedoston nimi",
  435. "size" => "Koko",
  436. "last_changed" => "Muokattu",
  437. "total_used_space" => "Yhteenlaskettu koko",
  438. "free_space" => "Vapaa tila",
  439. "password" => "Salasana",
  440. "upload" => "Lisää tiedosto",
  441. "failed_upload" => "Tiedoston lisäys epäonnistui!",
  442. "failed_move" => "Tiedoston siirto kansioon epäonnistui!",
  443. "wrong_password" => "Väärä salasana",
  444. "make_directory" => "Uusi kansio",
  445. "new_dir_failed" => "Uuden kansion luonti epäonnistui!",
  446. "chmod_dir_failed" => "Kansion käyttäjäoikeuksien muuttaminen epäonnistui!",
  447. "unable_to_read_dir" => "Kansion sisältöä ei voi lukea.",
  448. "location" => "Paikka",
  449. "root" => "Juurihakemisto",
  450. "log_file_permission_error" => "Ohjelman ei ole sallittu kirjoittaa lokiin.",
  451. "upload_not_allowed" => "Ohjelman asetukset eivät salli tiedoston lisäämistä tähän kansioon.",
  452. "upload_dir_not_writable" => "Kansioon tallentaminen epäonnistui.",
  453. "mobile_version" => "Mobiilinäkymä",
  454. "standard_version" => "Tavallinen näkymä",
  455. "page_load_time" => "Sivu ladattu %.2f ms:ssa",
  456. "wrong_pass" => "Väärä käyttäjätunnus tai salasana",
  457. "username" => "Käyttäjätunnus",
  458. "log_in" => "Kirjaudu sisään",
  459. "log_out" => "Kirjaudu ulos",
  460. "upload_type_not_allowed" => "Tämän tiedostotyypin lisääminen on estetty.",
  461. "del" => "Poista"
  462. );
  463. // French
  464. $_TRANSLATIONS["fr"] = array(
  465. "file_name" => "Nom de fichier",
  466. "size" => "Taille",
  467. "last_changed" => "Ajout&eacute;",
  468. "total_used_space" => "Espace total utilis&eacute;",
  469. "free_space" => "Espace libre",
  470. "password" => "Mot de passe",
  471. "upload" => "Envoyer un fichier",
  472. "failed_upload" => "Erreur lors de l'envoi",
  473. "failed_move" => "Erreur lors du changement de dossier",
  474. "wrong_password" => "Mauvais mot de passe",
  475. "make_directory" => "Nouveau dossier",
  476. "new_dir_failed" => "Erreur lors de la cr&eacute;ation du dossier",
  477. "chmod_dir_failed" => "Impossible de changer les permissions du dossier",
  478. "unable_to_read_dir" => "Impossible de lire le dossier",
  479. "location" => "Localisation",
  480. "root" => "Racine"
  481. );
  482. // German
  483. $_TRANSLATIONS["de"] = array(
  484. "file_name" => "Dateiname",
  485. "size" => "Größe",
  486. "last_changed" => "Letzte Änderung",
  487. "total_used_space" => "Benutzter Speicher",
  488. "free_space" => "Freier Speicher",
  489. "password" => "Passwort",
  490. "upload" => "Upload",
  491. "failed_upload" => "Upload ist fehlgeschlagen!",
  492. "failed_move" => "Verschieben der Datei ist fehlgeschlagen!",
  493. "wrong_password" => "Falsches Passwort",
  494. "make_directory" => "Neuer Ordner",
  495. "new_dir_failed" => "Erstellen des Ordners fehlgeschlagen",
  496. "chmod_dir_failed" => "Veränderung der Zugriffsrechte des Ordners fehlgeschlagen",
  497. "unable_to_read_dir" => "Unable to read directory",
  498. "location" => "Location",
  499. "root" => "Root"
  500. );
  501. // Greek
  502. $_TRANSLATIONS["el"] = array(
  503. "file_name" => "Όνομα αρχείου",
  504. "size" => "Μέγεθος",
  505. "last_changed" => "Τροποποιημένο",
  506. "total_used_space" => "Χρησιμοποιημένος χώρος",
  507. "free_space" => "Ελεύθερος χώρος",
  508. "password" => "Εισάγεται κωδικό",
  509. "upload" => "Φόρτωση",
  510. "failed_upload" => "Αποτυχία φόρτωσης αρχείου!",
  511. "failed_move" => "Αποτυχία μεταφοράς αρχείου στον κατάλληλο φάκελο!",
  512. "wrong_password" => "Λάθος κωδικός",
  513. "make_directory" => "Δημιουργία νέου φακέλου",
  514. "new_dir_failed" => "Αποτυχία δημιουργίας νέου φακέλου",
  515. "chmod_dir_failed" => "Αποτυχία τροποποίησης δικαιωμάτων φακέλου",
  516. "unable_to_read_dir" => "Unable to read directory",
  517. "location" => "Location",
  518. "root" => "Root"
  519. );
  520. // Hungarian
  521. $_TRANSLATIONS["hu"] = array(
  522. "file_name" => "Fájl név",
  523. "size" => "Méret",
  524. "last_changed" => "Utolsó módosítás",
  525. "total_used_space" => "Összes elfoglalt terület",
  526. "free_space" => "Szabad terület",
  527. "password" => "Jelszó",
  528. "upload" => "Feltöltés",
  529. "failed_upload" => "A fájl feltöltése nem sikerült!",
  530. "failed_move" => "A fájl mozgatása nem sikerült!",
  531. "wrong_password" => "Hibás jelszó",
  532. "make_directory" => "Új mappa",
  533. "new_dir_failed" => "A mappa létrehozása nem sikerült",
  534. "chmod_dir_failed" => "A mappa jogainak megváltoztatása nem sikerült",
  535. "unable_to_read_dir" => "A mappa nem olvasható",
  536. "location" => "Hely",
  537. "root" => "Gyökér",
  538. "log_file_permission_error" => "A log fájl írása jogosultsági okok miatt nem sikerült.",
  539. "upload_not_allowed" => "Ebbe a mappába a feltöltés nem engedélyezett.",
  540. "upload_dir_not_writable" => "A mappa nem írható.",
  541. "mobile_version" => "Mobil nézet",
  542. "standard_version" => "Web nézet",
  543. "page_load_time" => "Letöltési id? %.2f ms",
  544. "wrong_pass" => "Rossz felhasználónév vagy jelszó",
  545. "username" => "Felhasználónév",
  546. "log_in" => "Belépés",
  547. "upload_type_not_allowed" => "A fájltípus feltöltése tiltott."
  548. );
  549. // Italian
  550. $_TRANSLATIONS["it"] = array(
  551. "file_name" => "Nome file",
  552. "size" => "Dimensione",
  553. "last_changed" => "Ultima modifica",
  554. "total_used_space" => "Totale spazio usato",
  555. "free_space" => "Spazio disponibile",
  556. "password" => "Parola chiave",
  557. "upload" => "Caricamento file",
  558. "failed_upload" => "Caricamento del file fallito!",
  559. "failed_move" => "Spostamento del file nella cartella fallito!",
  560. "wrong_password" => "Password sbagliata",
  561. "make_directory" => "Nuova cartella",
  562. "new_dir_failed" => "Creazione cartella fallita!",
  563. "chmod_dir_failed" => "Modifica dei permessi della cartella fallita!",
  564. "unable_to_read_dir" => "Unable to read directory",
  565. "location" => "Location",
  566. "root" => "Root"
  567. );
  568. // Norwegian
  569. $_TRANSLATIONS["no"] = array(
  570. "file_name" => "Navn",
  571. "size" => "Størrelse",
  572. "last_changed" => "Endret",
  573. "total_used_space" => "Brukt plass",
  574. "free_space" => "Resterende plass",
  575. "password" => "Passord",
  576. "upload" => "Last opp",
  577. "failed_upload" => "Opplasting gikk galt",
  578. "failed_move" => "Kunne ikke flytte objektet",
  579. "wrong_password" => "Feil passord",
  580. "make_directory" => "Ny mappe",
  581. "new_dir_failed" => "Kunne ikke lage ny mappe",
  582. "chmod_dir_failed" => "Kunne ikke endre rettigheter",
  583. "unable_to_read_dir" => "Kunne ikke lese mappen",
  584. "location" => "Område",
  585. "root" => "Rot"
  586. );
  587. //Polish
  588. $_TRANSLATIONS["pl"] = array(
  589. "file_name" => "Nazwa Pliku",
  590. "size" => "Rozmiar",
  591. "last_changed" => "Data Zmiany",
  592. "total_used_space" => "Total used space",
  593. "free_space" => "Wolnego obszaru",
  594. "password" => "Haslo",
  595. "upload" => "Przeslij",
  596. "failed_upload" => "Przeslanie pliku nie powiodlo sie",
  597. "failed_move" => "Przenosienie pliku nie powidlo sie!",
  598. "wrong_password" => "Niepoprawne haslo",
  599. "make_directory" => "Nowy folder",
  600. "new_dir_failed" => "Blad podczas tworzenia nowego foldera",
  601. "chmod_dir_failed" => "Blad podczas zmiany uprawnienia foldera",
  602. "unable_to_read_dir" => "Odczytanie foldera nie powiodlo sie",
  603. "location" => "Miejsce",
  604. "root" => "Root",
  605. "log_file_permission_error" => "Brak uprawnien aby utowrzyc dziennik dzialan.",
  606. "upload_not_allowed" => "Konfiguracja zabrania przeslanie pliku do tego foldera.",
  607. "upload_dir_not_writable" => "Nie mozna zapisac pliku do tego foldera.",
  608. "mobile_version" => "Wersja Mobile",
  609. "standard_version" => "Widok standardowy",
  610. "page_load_time" => "Zaladowano w %.2f ms",
  611. "wrong_pass" => "Nie poprawna nazwa uzytkownika lub hasla",
  612. "username" => "Uzytkownik",
  613. "log_in" => "Zaloguj sie",
  614. "upload_type_not_allowed" => "Ten rodazaj pliku jest zabrioniony."
  615. );
  616. // Portuguese (Brazil)
  617. $_TRANSLATIONS["pt_BR"] = array(
  618. "file_name" => "Nome do arquivo",
  619. "size" => "Tamanho",
  620. "last_changed" => "Modificado em",
  621. "total_used_space" => "Total de espaço utilizado",
  622. "free_space" => "Espaço livre",
  623. "password" => "Senha",
  624. "upload" => "Enviar",
  625. "failed_upload" => "Falha ao enviar o arquivo!",
  626. "failed_move" => "Falha ao mover o arquivo para o diretório correto!",
  627. "wrong_password" => "Senha errada",
  628. "make_directory" => "Nova pasta",
  629. "new_dir_failed" => "Falha ao criar diretório",
  630. "chmod_dir_failed" => "Falha ao mudar os privilégios do diretório",
  631. "unable_to_read_dir" => "Não foi possível ler o diretório",
  632. "location" => "Localização",
  633. "root" => "Raíz",
  634. "log_file_permission_error" => "O script não tem permissão para escrever o arquivo de log.",
  635. "upload_not_allowed" => "A configuração do script não permite envios neste diretório.",
  636. "upload_dir_not_writable" => "Não há permissão para escrita neste diretório.",
  637. "mobile_version" => "Versão Móvel",
  638. "standard_version" => "Versão Padrão",
  639. "page_load_time" => "Página carregada em %.2f ms",
  640. "wrong_pass" => "Nome de usuário ou senha errados",
  641. "username" => "Nome de Usuário",
  642. "log_in" => "Log in",
  643. "upload_type_not_allowed" => "Não é permitido envio de arquivos deste tipo."
  644. );
  645. // Romanian
  646. $_TRANSLATIONS["ro"] = array(
  647. "file_name" => "Nume fisier",
  648. "size" => "Marime",
  649. "last_changed" => "Ultima modificare",
  650. "total_used_space" => "Spatiu total utilizat",
  651. "free_space" => "Spatiu disponibil",
  652. "password" => "Parola",
  653. "upload" => "Incarcare fisier",
  654. "failed_upload" => "Incarcarea fisierului a esuat!",
  655. "failed_move" => "Mutarea fisierului in alt director a esuat!",
  656. "wrong_password" => "Parol gresita!",
  657. "make_directory" => "Director nou",
  658. "new_dir_failed" => "Eroare la crearea directorului",
  659. "chmod_dir_failed" => "Eroare la modificarea drepturilor pe director",
  660. "unable_to_read_dir" => "Nu s-a putut citi directorul",
  661. "location" => "Locatie",
  662. "root" => "Root"
  663. );
  664. // Russian
  665. $_TRANSLATIONS["ru"] = array(
  666. "file_name" => "Имя файла",
  667. "size" => "Размер",
  668. "last_changed" => "Последнее изменение",
  669. "total_used_space" => "Всего использовано",
  670. "free_space" => "Свободно",
  671. "password" => "Пароль",
  672. "upload" => "Загрузка",
  673. "failed_upload" => "Не удалось загрузить файл!",
  674. "failed_move" => "Не удалось переместить файл в нужную папку!",
  675. "wrong_password" => "Неверный пароль",
  676. "make_directory" => "Новая папка",
  677. "new_dir_failed" => "Не удалось создать папку",
  678. "chmod_dir_failed" => "Не удалось изменить права доступа к папке",
  679. "unable_to_read_dir" => "Не возможно прочитать папку",
  680. "location" => "Расположение",
  681. "root" => "Корневая папка",
  682. "log_file_permission_error" => "Скрипт не имеет прав для записи лога файла.",
  683. "upload_not_allowed" => "Загрузка в эту папку запрещена в настройках скрипта",
  684. "upload_dir_not_writable" => "В эту папку запрещена запись",
  685. "mobile_version" => "Мобильный вид",
  686. "standard_version" => "Обычный вид",
  687. "page_load_time" => "Страница загружена за %.2f мс.",
  688. "wrong_pass" => "Неверное имя пользователя или пароль",
  689. "username" => "Имя пользователя",
  690. "log_in" => "Войти",
  691. "upload_type_not_allowed" => "Этот тип файла запрещено загружать"
  692. );
  693. // Slovensky
  694. $_TRANSLATIONS["sk"] = array(
  695. "file_name" => "Meno súboru",
  696. "size" => "Ve?kos?",
  697. "last_changed" => "Posledná zmena",
  698. "total_used_space" => "Použité miesto celkom",
  699. "free_space" => "Vo?né miesto",
  700. "password" => "Heslo",
  701. "upload" => "Nahranie súborov",
  702. "failed_upload" => "Chyba nahrávania súboru!",
  703. "failed_move" => "Nepodarilo sa presunú? súbor do vybraného adresára!",
  704. "wrong_password" => "Neplatné heslo!",
  705. "make_directory" => "Nový prie?inok",
  706. "new_dir_failed" => "Nepodarilo sa vytvori? adresár!",
  707. "chmod_dir_failed" => "Nepodarilo sa zmeni? práva adresára!",
  708. "unable_to_read_dir" => "Nemôžem ?íta? adresár",
  709. "location" => "Umiestnenie",
  710. "root" => "Domov"
  711. );
  712. // Spanish
  713. $_TRANSLATIONS["es"] = array(
  714. "file_name" => "Nombre de archivo",
  715. "size" => "Medida",
  716. "last_changed" => "Ultima modificación",
  717. "total_used_space" => "Total espacio usado",
  718. "free_space" => "Espacio libre",
  719. "password" => "Contraseña",
  720. "upload" => "Subir el archivo",
  721. "failed_upload" => "Error al subir el archivo!",
  722. "failed_move" => "Error al mover el archivo al directorio seleccionado!",
  723. "wrong_password" => "Contraseña incorrecta",
  724. "make_directory" => "New dir",
  725. "new_dir_failed" => "Failed to create directory",
  726. "chmod_dir_failed" => "Failed to change directory rights",
  727. "unable_to_read_dir" => "Unable to read directory",
  728. "location" => "Location",
  729. "root" => "Root"
  730. );
  731. // Swedish
  732. $_TRANSLATIONS["sv"] = array(
  733. "file_name" => "Filnamn",
  734. "size" => "Storlek",
  735. "last_changed" => "Senast andrad",
  736. "total_used_space" => "Totalt upptaget utrymme",
  737. "free_space" => "Ledigt utrymme",
  738. "password" => "Losenord",
  739. "upload" => "Ladda upp",
  740. "failed_upload" => "Fel vid uppladdning av fil!",
  741. "failed_move" => "Fel vid flytt av fil till mapp!",
  742. "wrong_password" => "Fel losenord",
  743. "make_directory" => "Ny mapp",
  744. "new_dir_failed" => "Fel vid skapande av mapp",
  745. "chmod_dir_failed" => "Fel vid andring av mappens egenskaper",
  746. "unable_to_read_dir" => "Kan inte lasa den filen",
  747. "location" => "Plats",
  748. "root" => "Hem"
  749. );
  750. // Turkish
  751. $_TRANSLATIONS["tr"] = array(
  752. "file_name" => "Dosya ismi",
  753. "size" => "Boyut",
  754. "last_changed" => "gecmis",
  755. "total_used_space" => "Toplam dosya boyutu",
  756. "free_space" => "Bos alan",
  757. "password" => "Sifre",
  758. "upload" => "Yükleyen",
  759. "failed_upload" => "Hatali dosya yüklemesi!",
  760. "failed_move" => "Hatali dosya tasimasi!",
  761. "wrong_password" => "Yeniden sifre",
  762. "make_directory" => "Yeni dosya",
  763. "new_dir_failed" => "Dosya olusturalamadi",
  764. "chmod_dir_failed" => "Dosya ayari deqistirelemedi",
  765. "unable_to_read_dir" => "Unable to read directory",
  766. "location" => "Location",
  767. "root" => "Root"
  768. );
  769. /***************************************************************************/
  770. /* CSS KUJUNDUSE MUUTMISEKS */
  771. /* */
  772. /* CSS FOR TWEAKING THE DESIGN */
  773. /***************************************************************************/
  774. function css()
  775. {
  776. ?>
  777. <style type="text/css">
  778. /* General styles */
  779. BODY {
  780. background-color:#FFFFFF;
  781. font-family:Verdana;
  782. font-size:small;
  783. }
  784. A {
  785. color: #000000;
  786. text-decoration: none;
  787. }
  788. A:hover {
  789. text-decoration: underline;
  790. }
  791. #top {
  792. width:100%;
  793. padding-bottom: 20px;
  794. }
  795. #top a span, #top a:hover, #top a span:hover{
  796. color:#68a9d2;
  797. font-weight:bold;
  798. text-align:center;
  799. font-size:large;
  800. }
  801. #top a {
  802. display:block;
  803. padding:20px 0 0 0;
  804. }
  805. #top span {
  806. display:block;
  807. }
  808. div.subtitle{
  809. width:80%;
  810. margin: 0 auto;
  811. color:#68a9d2;
  812. text-align:center;
  813. }
  814. #frame {
  815. border: 1px solid #CDD2D6;
  816. text-align:left;
  817. position: relative;
  818. margin: 0 auto;
  819. max-width:680px;
  820. overflow:hidden;
  821. }
  822. #error {
  823. max-width:450px;
  824. background-color:#FFE4E1;
  825. color:#000000;
  826. padding:7pt;
  827. position: relative;
  828. margin: 10pt auto;
  829. text-align:center;
  830. border: 1px dotted #CDD2D6;
  831. }
  832. input {
  833. border: 1px solid #CDD2D6;
  834. }
  835. .bar{
  836. width:100%;
  837. clear:both;
  838. height:1px;
  839. }
  840. /* File list */
  841. table.table {
  842. width:100%;
  843. border-collapse: collapse;
  844. }
  845. table.table td{
  846. padding:3px;
  847. }
  848. table.table tr.row.two {
  849. background-color:#fcfdfe;
  850. }
  851. table.table tr.row.one {
  852. background-color:#f8f9fa;
  853. }
  854. table.table tr.row td.icon {
  855. width:25px;
  856. padding-top:3px;
  857. padding-bottom:1px;
  858. }
  859. table.table td.del {
  860. width:25px;
  861. }
  862. table.table tr.row td.size {
  863. width: 100px;
  864. text-align: right;
  865. }
  866. table.table tr.row td.changed {
  867. width: 150px;
  868. text-align: center;
  869. }
  870. table.table tr.header img {
  871. vertical-align:bottom;
  872. }
  873. table img{
  874. border:0;
  875. }
  876. /* Info area */
  877. #info {
  878. color:#000000;
  879. font-family:Verdana;
  880. max-width:680px;
  881. position: relative;
  882. margin: 0 auto;
  883. text-align:center;
  884. }
  885. /* Thumbnail area */
  886. #thumb {
  887. position:absolute;
  888. border: 1px solid #CDD2D6;
  889. background:#f8f9fa;
  890. display:none;
  891. padding:3px;
  892. }
  893. #thumb img {
  894. display:block;
  895. }
  896. /* Login bar (at the bottom of the page) */
  897. #login_bar {
  898. margin: 0 auto;
  899. margin-top:2px;
  900. max-width:680px;
  901. }
  902. #login_bar input.submit{
  903. float:right;
  904. }
  905. /* Upload area */
  906. #upload {
  907. margin: 0 auto;
  908. margin-top:2px;
  909. max-width:680px;
  910. }
  911. #upload #password_container {
  912. margin-right:20px;
  913. }
  914. #upload #newdir_container, #upload #password_container {
  915. float:left;
  916. }
  917. #upload #upload_container{
  918. float:right;
  919. }
  920. #upload input.upload_dirname, #upload input.upload_password{
  921. width:140px;
  922. }
  923. #upload input.upload_file{
  924. font-size:small;
  925. }
  926. /* Breadcrumbs */
  927. div.breadcrumbs {
  928. display:block;
  929. padding:1px 3px;
  930. color:#cccccc;
  931. font-size:x-small;
  932. }
  933. div.breadcrumbs a{
  934. display:inline-block;
  935. color:#cccccc;
  936. padding:2px 0;
  937. font-size:small;
  938. }
  939. /* Login area */
  940. #login {
  941. max-width:280px;
  942. text-align:right;
  943. margin:15px auto 50px auto;
  944. }
  945. #login div {
  946. display:block;
  947. width:100%;
  948. margin-top:5px;
  949. }
  950. #login label{
  951. width: 120px;
  952. text-align: right;
  953. }
  954. /* Mobile interface */
  955. body.mobile #frame, body.mobile #info, body.mobile #upload {
  956. max-width:none;
  957. }
  958. body.mobile {
  959. font-size:medium;
  960. }
  961. body.mobile a.item {
  962. display:block;
  963. padding:10px 0;
  964. }
  965. body.mobile a.item span.size {
  966. float:right;
  967. margin-left:10px;
  968. }
  969. body.mobile table.table {
  970. margin-bottom:30px;
  971. }
  972. body.mobile table.table tr td {
  973. border-top: 1px solid #CDD2D6;
  974. }
  975. body.mobile table.table tr.last td {
  976. border-bottom: 1px solid #CDD2D6;
  977. }
  978. body.mobile #top {
  979. padding-bottom:3px;
  980. }
  981. body.mobile #top a {
  982. padding-top:3px;
  983. }
  984. body.mobile #upload #password_container, body.mobile #upload #upload_container, body.mobile #upload #newdir_container {
  985. float:none;
  986. margin-top:5px;
  987. }
  988. body.mobile #upload input.upload_dirname, body.mobile #upload input.upload_password{
  989. width:240px;
  990. }
  991. body.mobile #upload {
  992. margin-bottom:15px;
  993. }
  994. </style>
  995. <?php
  996. }
  997. /***************************************************************************/
  998. /* PILTIDE KOODID */
  999. /* Saad neid ise oma piltidest juurde genereerida base64 konverteriga */
  1000. /* Näiteks siin: http://www.motobit.com/util/base64-decoder-encoder.asp */
  1001. /* Või siin: http://www.greywyvern.com/code/php/binary2base64 */
  1002. /* Või kasuta lihtsalt PHP base64_encode() funktsiooni */
  1003. /* */
  1004. /* IMAGE CODES IN BASE64 */
  1005. /* You can generate your own with a converter */
  1006. /* Like here: http://www.motobit.com/util/base64-decoder-encoder.asp */
  1007. /* Or here: http://www.greywyvern.com/code/php/binary2base64 */
  1008. /* Or just use PHP base64_encode() function */
  1009. /***************************************************************************/
  1010. $_IMAGES = array();
  1011. $_IMAGES["arrow_down"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1012. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAABbSURBVCjPY/jPgB8yDCkFB/7v+r/5/+r/
  1013. i/7P+N/3DYuC7V93/d//fydQ0Zz/9eexKFgtsejLiv8b/8/8X/WtUBGrGyZLdH6f8r/sW64cTkdW
  1014. SRS+zpQbgiEJAI4UCqdRg1A6AAAAAElFTkSuQmCC";
  1015. $_IMAGES["arrow_up"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1016. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAABbSURBVCjPY/jPgB8yDDkFmyVWv14kh1PB
  1017. eoll31f/n/ytUw6rgtUSi76s+L/x/8z/Vd8KFbEomPt16f/1/1f+X/S/7X/qeSwK+v63/K/6X/g/
  1018. 83/S/5hvQywkAdMGCdCoabZeAAAAAElFTkSuQmCC";
  1019. $_IMAGES["del"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1020. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJdSURBVDjLpZP7S1NhGMf9W7YfogSJboSE
  1021. UVCY8zJ31trcps6zTI9bLGJpjp1hmkGNxVz4Q6ildtXKXzJNbJRaRmrXoeWx8tJOTWptnrNryre5
  1022. YCYuI3rh+8vL+/m8PA/PkwIg5X+y5mJWrxfOUBXm91QZM6UluUmthntHqplxUml2lciF6wrmdHri
  1023. I0Wx3xw2hAediLwZRWRkCPzdDswaSvGqkGCfq8VEUsEyPF1O8Qu3O7A09RbRvjuIttsRbT6HHzeb
  1024. sDjcB4/JgFFlNv9MnkmsEszodIIY7Oaut2OJcSF68Qx8dgv8tmqEL1gQaaARtp5A+N4NzB0lMXxo
  1025. n/uxbI8gIYjB9HytGYuusfiPIQcN71kjgnW6VeFOkgh3XcHLvAwMSDPohOADdYQJdF1FtLMZPmsl
  1026. vhZJk2ahkgRvq4HHUoWHRDqTEDDl2mDkfheiDgt8pw340/EocuClCuFvboQzb0cwIZgki4KhzlaE
  1027. 6w0InipbVzBfqoK/qRH94i0rgokSFeO11iBkp8EdV8cfJo0yD75aE2ZNRvSJ0lZKcBXLaUYmQrCz
  1028. DT6tDN5SyRqYlWeDLZAg0H4JQ+Jt6M3atNLE10VSwQsN4Z6r0CBwqzXesHmV+BeoyAUri8EyMfi2
  1029. FowXS5dhd7doo2DVII0V5BAjigP89GEVAtda8b2ehodU4rNaAW+dGfzlFkyo89GTlcrHYCLpKD+V
  1030. 7yeeHNzLjkp24Uu1Ed6G8/F8qjqGRzlbl2H2dzjpMg1KdwsHxOlmJ7GTeZC/nesXbeZ6c9OYnuxU
  1031. c3fmBuFft/Ff8xMd0s65SXIb/gAAAABJRU5ErkJggg==";
  1032. $_IMAGES["archive"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1033. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJmSURBVDjLhZNNS5RRGIav8+HMvDNO5ZhO
  1034. YqXQF2FgVNRCCKM2EbQ1ok2b/AG16F/0ge5qUwitghbWooikiIhI3AQVFER+VsyMztg7vuecp4U2
  1035. ORH5wLM5cK7n5r65lYgAoJTaDhQBw/9nAfgiIgEAEWENcjiO43KSJN45J//aOI5lZGTkBtALaBFp
  1036. AhxNksRXq1Wp1WqNrVQqUiqVZH5+XpxzMjs7K6Ojow2Imri9Z1Dntjwo2dObZr7vpKXFoDVAwFpN
  1037. vR6za9du+vr6KRQKrKysEEJgbGzs5vDw8DX1/N6Rrx0HOrpfvOqnWs0CCgQkaJTJEkIAHENDFygW
  1038. i01mWGuP2Vw+KnT3djPUM0eLzZO4L6ikztQz6Dl2i4ePxgk+IYoylMtlQgg45+js7FyFKKUk/llh
  1039. evplg9zTtR8RC0AmSlGtrGCMxVqF9x5j/gRlRQLZbIbt3fvW4lwmpS0IhCA4FwgEjDForVFK/Ta9
  1040. oYDa8jdmpt83Hndu86DaEQkgHgkBrXXT5QaA4FuiqI3itl4IPzHWk7G5NQUBQgISUEoBYIxpVlAr
  1041. le9+fCbntFY6qM2Z4BOWazFzS13UPrwjlUqzuFhtXF9NZZ0Cn7hLc59mrly+/uPQ+OO3T+6PP8W7
  1042. OpH1fJ6cpLU1hUsSphcqRLlNFHK6GXD84nuvlCoDS1FrgZn28+T5zom933jzeoKpyZeY9oPceOJp
  1043. z1e4erbtLw/WTTBZWVpaVNmcYuvWDk6eOsPAwCCLseHOpCOfNg0vgACg1rXxSL1enzDGZAC9QSOD
  1044. 9345nU4PrgfsWKvzRp9/jwcWfgF7VEKXfHY5kwAAAABJRU5ErkJggg==";
  1045. $_IMAGES["audio"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1046. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIvSURBVDjLjZPLaxNRFIeriP+AO7Gg7nRX
  1047. qo1ogoKCK0Fbig8QuxKhPop04SYLNYqlKpEmQlDBRRcFFWlBqqJYLVpbq6ktaRo0aWmamUxmJpN5
  1048. ZvKoP++9mmlqWuzAt7jc+X2Hcy6nDkAdhXxbCI2Epv+wlbDeyVUJGm3bzpVKpcVyuYyVIPcIBAL3
  1049. qiXVgiYaNgwDpmk6qKoKRVEgCAKT8DyPYDDoSCrhdYHrO9qzkdOQvp+E+O04hC+tED63gBs+QiDn
  1050. hQgTWJYFWiQUCv2RUEH/g4YNXwdcT/VEJ6xkF8zEDRixq1CnriD94SikH08gikJNS2wmVLDwybON
  1051. H3GbNt8DY+YMrDk/tGkvhOFmKPE+pxVJkpDJZMBx3JJAHN+/MTPq8amxdtj8fWjhwzB+diH5ag9y
  1052. 8V6QubDhUYmmaWwesiwvCYRRtyv9ca9oc37kk3egTbbBiPowP+iGOHGT0A1h7BrS43ehiXHous5E
  1053. joCEx3IzF6FMnYMcPgs95iOCW1DDXqTfnEBqsBnRR9shTvYibyhsiBRHwL13dabe7r797uHOx3Kk
  1054. m1T2IDfhhTRyAfMDh5Aauox8Ns5aKRQKDNrSsiHSZ6SHoq1i9nkDuNfHkHi2D9loHwtSisUig4ZX
  1055. FaSG2pB8cZBUPY+ila0JV1Mj8F/a3DHbfwDq3Mtlb12R/EuNoKN10ylLmv612h6swKIj+CvZRQZk
  1056. 0ou1hMm/OtveKkE9laxhnSvQ1a//DV9axd5NSHlCAAAAAElFTkSuQmCC";
  1057. $_IMAGES["code"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1058. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHtSURBVDjLjZM9T9tQFIYpQ5eOMBKlW6eW
  1059. IQipa8RfQKQghEAKqZgKFQgmFn5AWyVDCipVQZC2EqBWlEqdO2RCpAssQBRsx1+1ndix8wFvfW6w
  1060. cUhQsfTI0j33PD7n+N4uAF2E+/S5RFwG/8Njl24/LyCIOI6j1+v1y0ajgU64cSSTybdBSVAwSMmm
  1061. acKyLB/DMKBpGkRRZBJBEJBKpXyJl/yABLTBtm1Uq1X2JsrlMnRdhyRJTFCpVEAfSafTTUlQoFs1
  1062. luxBAkoolUqQZbmtJTYTT/AoHInOfpcwtVtkwcSBgrkDGYph+60oisIq4Xm+VfB0+U/P0Lvj3NwP
  1063. GfHPTcHMvoyFXwpe7UmQtAqTUCU0D1VVbwTPVk5jY19Fe3ZfQny7CE51WJDXqpjeEUHr45ki9rIq
  1064. a4dmQiJfMLItGEs/FcQ2ucbRmdnSYy5vYWyLx/w3EaMfLmBaDpMQvuDJ65PY8Dpnz3wpYmLtApzc
  1065. rIAqmfrEgdZH1grY/a36w6Xz0DKD8ES25/niYS6+wWE8mWfByY8cXmYEJFYLkHUHtVqNQcltAvoL
  1066. D3v7o/FUHsNvzlnwxfsCEukC/ho3yUHaBN5Buo17Ojtyl+DqrnvQgUtfcC0ZcAdkUeA+ye7eMru9
  1067. AUGIJPe4zh509UP/AAfNypi8oj/mAAAAAElFTkSuQmCC";
  1068. $_IMAGES["database"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1069. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHVSURBVDjLjZPLaiJBFIZNHmJWCeQdMuT1
  1070. Mi/gYlARBRUkao+abHUhmhgU0QHtARVxJ0bxhvfGa07Of5Iu21yYFPyLrqrz1f+f6rIRkQ3icca6
  1071. ZF39RxesU1VnAVyuVqvJdrvd73Y7+ky8Tk6n87cVYgVcoXixWNByuVSaTqc0Ho+p1+sJpNvtksvl
  1072. UhCb3W7/cf/w+BSLxfapVIqSySRlMhnSdZ2GwyHN53OaTCbU7/cFYBgG4RCPx/MKub27+1ur1Xqj
  1073. 0YjW6zWxCyloNBqUSCSkYDab0WAw+BBJeqLFtQpvGoFqAlAEaZomuc0ocAQnnU7nALiJ3uh8whgn
  1074. ttttarVaVCgUpCAUCgnQhMAJ+gG3CsDZa7xh1mw2ZbFSqYgwgsGgbDQhcIWeAHSIoP1pcGeNarUq
  1075. gFKpJMLw+/0q72azkYhmPAWIRmM6AGbXc7kc5fN5AXi9XgWACwAguLEAojrfsVGv1yV/sVikcrks
  1076. AIfDIYUQHEAoPgLwT3GdzWYNdBfXh3xwApDP5zsqtkoBwuHwaSAQ+OV2u//F43GKRCLEc5ROpwVo
  1077. OngvBXj7jU/wwZPPX72DT7RXgDfIT27QEgvfKea9c3m9FsA5IN94zqbw9M9fAEuW+zzj8uLvAAAA
  1078. AElFTkSuQmCC";
  1079. $_IMAGES["directory"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1080. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGrSURBVDjLxZO7ihRBFIa/6u0ZW7GHBUV0
  1081. UQQTZzd3QdhMQxOfwMRXEANBMNQX0MzAzFAwEzHwARbNFDdwEd31Mj3X7a6uOr9BtzNjYjKBJ6ni
  1082. cP7v3KqcJFaxhBVtZUAK8OHlld2st7Xl3DJPVONP+zEUV4HqL5UDYHr5xvuQAjgl/Qs7TzvOOVAj
  1083. xjlC+ePSwe6DfbVegLVuT4r14eTr6zvA8xSAoBLzx6pvj4l+DZIezuVkG9fY2H7YRQIMZIBwycmz
  1084. H1/s3F8AapfIPNF3kQk7+kw9PWBy+IZOdg5Ug3mkAATy/t0usovzGeCUWTjCz0B+Sj0ekfdvkZ3a
  1085. bBv+U4GaCtJ1iEm6ANQJ6fEzrG/engcKw/wXQvEKxSEKQxRGKE7Izt+DSiwBJMUSm71rguMYhQKr
  1086. BygOIRStf4TiFFRBvbRGKiQLWP29yRSHKBTtfdBmHs0BUpgvtgF4yRFR+NUKi0XZcYjCeCG2smkz
  1087. LAHkbRBmP0/Uk26O5YnUActBp1GsAI+S5nRJJJal5K1aAMrq0d6Tm9uI6zjyf75dAe6tx/SsWeD/
  1088. /o2/Ab6IH3/h25pOAAAAAElFTkSuQmCC";
  1089. $_IMAGES["graphics"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1090. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAH8SURBVDjLjZPLaxNRFIfHLrpx10WbghXx
  1091. H7DQx6p14cadiCs31Y2LLizYhdBFWyhYaFUaUxLUQFCxL61E+0gofWGLRUqGqoWp2JpGG8g4ybTJ
  1092. JJm86897Ls4QJIm98DED9/6+mXNmjiAIwhlGE6P1P5xjVAEQiqHVlMlkYvl8/rhQKKAUbB92u91W
  1093. SkKrlcLJZBK6rptomoZoNApFUbhElmU4HA4u8YzU1PsmWryroxYrF9CBdDqNbDbLr0QikUAsFkM4
  1094. HOaCVCoFesjzpwMuaeXuthYcw4rtvG4KKGxAAgrE43FEIhGzlJQWxE/RirQ6i8/T7XjXV2szBawM
  1095. 8yDdU91GKaqqInQgwf9xCNmoB7LYgZn+Oud0T121KfiXYokqf8X+5jAyR3NQvtzEq96z4os7lhqz
  1096. ieW6TxJN3UVg8yEPqzu38P7xRVy+cPoay52qKDhUf0HaWsC3xRvstd3Qvt9mTWtEOPAJf/+L8oKA
  1097. fwfLnil43z7Bkusqdr2X4Btvg1+c5fsVBZJ/H9aXbix/2EAouAVx4zVmHl2BtOrkPako2DsIwule
  1098. xKhnG/cmfbg+uIbukXkooR/I5XKcioLu+8/QNTyGzqE36OidQNeDJayLe7yZBuUEv8t9iRIcU6Z4
  1099. FprZ36fTxknC7GyCBrBY0ECSE4yzAY1+gyH4Ay9cw2Ifwv9mAAAAAElFTkSuQmCC";
  1100. $_IMAGES["image"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1101. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGWSURBVBgZpcE/a1NhGMbh3/OeN56cKq2D
  1102. p6AoCOKmk4uCn8DNycEOIojilr2TaBfRzVnESQR3Bz+FFDoWA2IjtkRqmpyc97k9qYl/IQV7XSaJ
  1103. w4g0VlZfP0m13dwepPbuiH85fyhyWCx4/ubxjU6kkdxWHt69VC6XpZlFBAhwJgwJJHAmRKorbj94
  1104. ewvoRBrbuykvT5R2/+lLTp05Tp45STmEJYJBMAjByILxYeM9jzr3GCczGpHGYAQhRM6fO8uFy1fJ
  1105. QoaUwCKYEcwwC4QQaGUBd36KTDmQ523axTGQmEcIEBORKQfG1ZDxcA/MkBxXwj1ggCQyS9TVAMmZ
  1106. iUxJ8Ln/kS+9PmOvcSW+jrao0mmMH5bzHfa+9UGBmciUBJ+2Fmh1h+yTQCXSkJkdCrpd8btIwwEJ
  1107. QnaEkOXMk7XaiF8CUxL/JdKQOwb0Ntc5SG9zHXQNd/ZFGsaEeLa2ChjzXQcqZiKNxSL0vR4unVww
  1108. MENMCATib0ZdV+QtE41I42geXt1Ze3dlMNZFdw6Ut6CIvKBhkjiM79Pyq1YUmtkKAAAAAElFTkSu
  1109. QmCC";
  1110. $_IMAGES["presentation"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1111. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHeSURBVDjLjZO/i1NBEMc/u+/lBYxiLkgU
  1112. 7vRstLEUDyxtxV68ykIMWlocaGHrD1DxSAqxNf4t115jo6DYhCRCEsk733s7u2PxkuiRoBkYdmGZ
  1113. z3xndsaoKgDGmC3gLBDxbxsA31U1AKCqzCBXsywbO+e8iOgqz7JM2+32W+AiYFX1GGDHOeen06mm
  1114. abrwyWSio9FI+/2+ioj2ej3tdDoLiJm+bimAhgBeUe9RmbkrT5wgT97RaDQoioIQAt1ud7/Var1h
  1115. +uq+/s9+PLilw+FwqSRgJ1YpexHSKenHF4DFf/uC3b7CydsPsafraO5IkoTxeEwIARGh2WwCYNUJ
  1116. AOmHZ5y4eY/a7h4hPcIdHvDz/fMSnjviOCZJEiqVCtVqdfEl8RygHkz9DLZWQzOHisd9OizfckcU
  1117. RRhjMMbMm14CQlEC/NfPjPd2CSJQCEEEDWYBsNZijFkaCqu5Ky+blwl5geaOUDg0c8TnNssSClkE
  1118. R1GEtXYZcOruI6ILl1AJqATirW02Hr8sFThBVZfklyXMFdQbbDzdXzm78z4Bx7KXTcwdgzs3yizu
  1119. zxAhHvVh4avqBzAzaQa4JiIHgGE9C3EcX7ezhVIgeO9/AWGdYO/9EeDNX+t8frbOdk0FHhj8BvUs
  1120. fP0TH5dOAAAAAElFTkSuQmCC";
  1121. $_IMAGES["spreadsheet"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1122. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIpSURBVDjLjZNPSFRRFMZ/9707o0SOOshM
  1123. 0x/JFtUmisKBooVEEUThsgi3KS0CN0G2lagWEYkSUdsRWgSFG9sVFAW1EIwQqRZiiDOZY804b967
  1124. 954249hUpB98y/PjO5zzKREBQCm1E0gDPv9XHpgTEQeAiFCDHAmCoBhFkTXGyL8cBIGMjo7eA3YD
  1125. nog0ALJRFNlSqSTlcrnulZUVWV5elsXFRTHGyMLCgoyNjdUhanCyV9ayOSeIdTgnOCtY43DWYY3j
  1126. 9ulxkskkYRjinCOXy40MDAzcZXCyVzZS38MeKRQKf60EZPXSXInL9y+wLZMkCMs0RR28mJ2grSWJ
  1127. Eo+lH9/IpNPE43GKxSLOOYwxpFIpAPTWjiaOtZ+gLdFKlJlD8u00xWP8lO/M5+e5efEB18b70Vqj
  1128. lMJai++vH8qLqoa+nn4+fJmiNNPCvMzQnIjzZuo1V88Ns3/HAcKKwfd9tNZorYnFYuuAMLDMfJ3m
  1129. +fQznr7L0Vk9zGpLmezB4zx++YggqhAFEZ7n4ft+HVQHVMoB5++cJNWaRrQwMjHM9qCLTFcnJJq5
  1130. 9WSIMLAopQDwfR/P8+oAbaqWK2eGSGxpxVrDnvQ+3s++4tPnj4SewYscUdUgIiilcM41/uXZG9kN
  1131. z9h9aa+EYdjg+hnDwHDq+iGsaXwcZ6XhsdZW+FOqFk0B3caYt4Bic3Ja66NerVACOGttBXCbGbbW
  1132. rgJW/VbnXbU6e5tMYIH8L54Xq0cq018+AAAAAElFTkSuQmCC";
  1133. $_IMAGES["textdocument"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1134. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIdSURBVDjLjZO7a5RREMV/9/F9yaLBzQY3
  1135. CC7EpBGxU2O0EBG0sxHBUitTWYitYCsiiJL0NvlfgoWSRpGA4IMsm43ZXchmv8e9MxZZN1GD5MCB
  1136. W8yce4aZY1QVAGPMaWAacPwfm8A3VRUAVJWhyIUsy7plWcYQgh7GLMt0aWnpNTADWFX9Q2C+LMu4
  1137. s7Oj/X5/xF6vp51OR1utloYQtNls6vLy8kjE3Huz9qPIQjcUg/GZenVOokIEiSBBCKUSQ+TFwwa1
  1138. Wo2iKBARVlZW3iwuLr7izssPnwZ50DLIoWz9zPT+s/fabrf/GQmY97GIIXGWp28/08si5+oV1jcG
  1139. TCSO6nHH2pddYqmkaUq320VECCFQr9cBsBIVBbJcSdXQmK7Q6Qsnq54sj2gBplS896RpSpIkjI2N
  1140. jVZitdh7jAOSK6trXcpC2GjlfP1esHD+GDYozjm893jvSZJkXyAWe+ssc6W5G9naLqkaw/pGxBrl
  1141. 1tVpJCrWWpxzI6GRgOQKCv2BYHPl5uUatROeSsVy7eIkU9UUiYoxBgDnHNbagw4U6yAWwpmphNvX
  1142. T6HAhAZuLNRx1iDDWzHG/L6ZEbyJVLa2c54/PgsKgyzw5MHcqKC9nROK/aaDvwN4KYS7j959DHk2
  1143. PtuYnBUBFUEVVBQRgzX7I/wNM7RmgEshhFXAcDSI9/6KHQZKAYkxDgA5SnOMcReI5kCcG8M42yM6
  1144. iMDmL261eaOOnqrOAAAAAElFTkSuQmCC";
  1145. $_IMAGES["unknown"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1146. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAC4SURBVCjPdZFbDsIgEEWnrsMm7oGGfZro
  1147. hxvU+Iq1TyjU60Bf1pac4Yc5YS4ZAtGWBMk/drQBOVwJlZrWYkLhsB8UV9K0BUrPGy9cWbng2CtE
  1148. EUmLGppPjRwpbixUKHBiZRS0p+ZGhvs4irNEvWD8heHpbsyDXznPhYFOyTjJc13olIqzZCHBouE0
  1149. FRMUjA+s1gTjaRgVFpqRwC8mfoXPPEVPS7LbRaJL2y7bOifRCTEli3U7BMWgLzKlW/CuebZPAAAA
  1150. AElFTkSuQmCC";
  1151. $_IMAGES["vectorgraphics"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1152. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIWSURBVDjLhZNPbxJRFMWhRrYu3NrExIUb
  1153. dzWte6M7d34Eo2Hjxm8gwZUxIYEARUKAWgwbV0BpxAW11bpQFrCoCVEMDplhQMow782/enx3WsiU
  1154. 0jrJ2bz7zu+9e95cHwAfSXzXhFaEVv+j60JLM58HsGIYxsi27SPHcbBIoo5oNBrxQryAVTJPJhPo
  1155. uu6q0+mgVquh0WhAlmUX0uv1EIvFZpCp2U8A2sA5h2maYIyhUChA0zTU63UoiuICaJ0OSSaTx5B5
  1156. AJnpqqVSCbmNTWxVt9FsNtHv98+05GYyD7AsC5VKBZvFd/j2k6Etc6gjHfLgELKiujeRJGkxQGSA
  1157. YDCIx8+eI/ORIb3Lkf0sWvmio9aaoC2NoQ7+QFUHCwFr5XIZ8bfvhZFhq2XgU9tEb2Tj99DCgcTx
  1158. 9YeOg64GZTCGPQdYEnpaLBbxZl9HfIejo1rg5nGvti3CMyxouonhIYM8ZG7NBWSz2YepVKobiUR+
  1159. UXjrwry+wzBm9qnAqD03YHohbsASUP+ly2u+XC7XzmQyt9LpdJc2xuscr0ULU9NUFC6JDiFRCy4g
  1160. n88/EWqFw+EEmfL7HK8+8FOAqdmrWYjC7E8kElcCgcAdWmx2LbzY5mCmc+YWXp33H/w1LQehKhPP
  1161. ZuK8mTjR0QxwArktQtKpsLHHEarwC81ir+ZOrwewTBCiXr157/7d0PfqjQcvH10w1jT6y/8A/nHJ
  1162. HcAgm2AAAAAASUVORK5CYII=";
  1163. $_IMAGES["video"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1164. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIfSURBVDjLpZNPaBNBGMXfbrubzBqbg4kL
  1165. 0lJLgiVKE/AP6Kl6UUFQNAeDIAjVS08aELx59GQPAREV/4BeiqcqROpRD4pUNCJSS21OgloISWME
  1166. Z/aPb6ARdNeTCz92mO+9N9/w7RphGOJ/nsH+olqtvg+CYJR8q9VquThxuVz+oJTKeZ63Uq/XC38E
  1167. 0Jj3ff8+OVupVGLbolkzQw5HOqAxQU4wXWWnZrykmYD0QsgAOJe9hpEUcPr8i0GaJ8n2vs/sL2h8
  1168. R66TpVfWTdETHWE6GRGKjGiiKNLii5BSLpN7pBHpgMYhMkm8tPUWz3sL2D1wFaY/jvnWcTTaE5Dy
  1169. jMfTT5J0XIAiTRYn3ASwZ1MKbTmN7z+KaHUOYqmb1fcPiNa4kQBuyvWAHYfcHGzDgYcx9NKrwJYH
  1170. CAyF21JiPWBnXMAQOea6bmn+4ueYGZi8gtymNVobF7BG5prNpjd+eW6X4BSUD0gOdCpzA8MpA/v2
  1171. v15kl4+pK0emwHSbjJGBlz+vYM1fQeDrYOBTdzOGvDf6EFNr+LYjHbBgsaCLxr+moNQjU2vYhRXp
  1172. gIUOmSWWnsJRfjlOZhrexgtYDZ/gWbetNRbNs6QT10GJglNk64HMaGgbAkoMo5fiFNy7CKDQUGqE
  1173. 5r38YktxAfSqW7Zt33l66WtkAkACjuNsaLVaDxlw5HdJ/86aYrG4WCgUZD6fX+jv/U0ymfxoWVZo
  1174. muZyf+8XqfGP49CCrBUAAAAASUVORK5CYII=";
  1175. $_IMAGES["webpage"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1176. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJwSURBVDjLjZPdT1JhHMetvyO3/gfLKy+6
  1177. 8bLV2qIAq7UyG6IrdRPL5hs2U5FR0MJIAqZlh7BVViI1kkyyiPkCyUtztQYTYbwJE8W+Pc8pjofK
  1178. 1dk+OxfP+X3O83srAVBCIc8eQhmh/B/sJezm4niCsvX19cTm5uZWPp/H3yDnUKvVKr6ELyinwWtr
  1179. a8hkMhzJZBLxeBwrKyusJBwOQ6PRcJJC8K4DJ/dXM04DOswNqNOLybsRo9N6LCy7kUgkEIlEWEE2
  1180. mwX9iVar/Smhglqd8IREKwya3qhg809gPLgI/XsrOp/IcXVMhqnFSayurv6RElsT6ZCoov5u1fzU
  1181. VwvcKRdefVuEKRCA3OFHv2MOxtlBdFuaMf/ZhWg0yt4kFAoVCZS3Hd1gkpOwRt9h0LOES3YvamzP
  1182. cdF7A6rlPrSbpbhP0kmlUmw9YrHYtoDku2T6pEZ/2ICXEQ8kTz+g2TkNceAKKv2nIHachn6qBx1M
  1183. I5t/Op1mRXzBd31AiRafBp1vZyEcceGCzQ6p24yjEzocGT6LUacS0iExcrkcK6Fsp6AXLRnmFOjy
  1184. PMIZixPHmAAOGxZQec2OQyo7zpm6cNN6GZ2kK1RAofPAr8GA4oUMrdNNkIw/wPFhDwSjX3Dwlg0C
  1185. Qy96HreiTlcFZsaAjY0NNvh3QUXtHeHcoKMNA7NjqLd8xHmzDzXDRvRO1KHtngTyhzL4SHeooAAn
  1186. KMxBtUYQbGWa0Dc+AsWzSVy3qkjeItLCFsz4XoNMaRFFAm4SyTXbmQa2YHQSGacR/pAXO+zGFif4
  1187. JdlHCpShBzstEz+YfJtmt5cnKKWS/1jnAnT1S38AGTynUFUTzJcAAAAASUVORK5CYII=";
  1188. $_IMAGES["7z"] = $_IMAGES["archive"];
  1189. $_IMAGES["as"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1190. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIqSURBVDjLjZPNi1JRGMan/ooWDbSKNq2s
  1191. gZqh0UgqKVoOU7OooEWLgZi+JIaYGolaRAS60JXuxJWoIC6E0KAgAzGbCqpFmua393qv9+PoPJ33
  1192. THPHcYy68HDPvee8v/e8zznvFIApEn8Octm4Zv6hQ1z7rbgRgE3X9S5jbDgYDDBJfB5er/flKGQU
  1193. MEPBiqJAVVVLkiSh0+mgVqsJSLVahc/nsyDbwfsIQAs0TYNhGNDevIX29BnUxx50u13U63UB6Pf7
  1194. oCR+v38LMg6gYCOdhnb1GgaeVajnL0CWZTQajT0lCU/GAea379AWFsHu3kJ/4TLUO/etUprNpthJ
  1195. pVL5C4Ax6I/WwVbvoe9+AMazMvrHzSMI7YT8aLVakwHs8xdoS1eguC7CeJUBa3fEwkKhgEwmI+pP
  1196. 8/Ly+fxkgP78BZj7NgYP3ZDn7FDXPGJhKpVCuVwW/tA7HA7vBawdPrJEmZl7hQc7IJ2YtwCxWEyU
  1197. IgzmCgaDuwF157kDlVOnC+bKMmS7E8a79zA3PsEs/0Q8Hkc2m4VpmkLkB5URjUa3AMpZ1+uew/lV
  1198. mnMw/cZ1qOtPrGOirKVSCclk0gKQQqGQOFYB6NnPKPKsfdNYvgnJdQnsV23XWRMkkUig3W6LMSkQ
  1199. COyUIJ+ch3R8Fj+O2j6YHzc2J/VAsVgUEBpHIhHkcjkaDy0P/hh5jBuk0sQ4gO4AXSIa09b595Cv
  1200. 7YnuHQFME+Q/2nlb1PrTvwGo2K3gWVH3FgAAAABJRU5ErkJggg==";
  1201. $_IMAGES["avi"] = $_IMAGES["video"];
  1202. $_IMAGES["bz2"] = $_IMAGES["archive"];
  1203. $_IMAGES["c"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1204. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHdSURBVDjLjZNLS+NgFIad+R0KwuzcSQdd
  1205. unTWXraKA4KCuFKcWYqgVbE4TKJWNyqC2oHKoDBeEBF04UpFUVQqUoemSVOTJr2lrb5+5xsTUy+j
  1206. gYdc3yfnnOQrAVBCsK2U4WFUvUE546OTcwk82WxWz+fzt4VCAS/B7kMQhB9uiVtQReFkMolUKuWQ
  1207. SCSgaRpkWeYSSZIgiqIjscMfSEAPZDIZWJbF94RpmtB1HYqicEE6nQa9xO/3/5OQoM57/qm2a3PG
  1208. tyzDtxzF/FYMe6c6F1DAMAzEYrFnLfGZ1A9devqC8o2wpmL8jwJhRcbw7ygGAxJYS7xvuxVVVXkl
  1209. kUjkUdAshgP+DRVfureXbPPcuoKe2b/QDKtIQpXQPOLx+KOgf0nGCCu9smHiu7u8IGuDBHRsS6gd
  1210. mgmJHEHfLwn9wSgqagc6Xvt8RC6X48MlCeEI2ibDIS8TVDYGBHfAO3ONowvTOacqSEBQNY6gpvOk
  1211. p3cxgq8/Q8ZxyISWsDAwfY32sSscnhk8SFAFBIWLBPQZq1sOvjX5LozOqTBaxSu0jF5iYVV+FnZT
  1212. JLB/pN0DDTv7WlHvtuQpLwrYxbv/DfIJt47gQfKZDShFN94TZs+afPW6BGUkecdytqGlX3YPTr7m
  1213. omspN0YAAAAASUVORK5CYII=";
  1214. $_IMAGES["cab"] = $_IMAGES["archive"];
  1215. $_IMAGES["cpp"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1216. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAH/SURBVDjLjZPNaxNRFMWrf4cFwV13JVKX
  1217. Luta61apIChIV0rblUqhjYpRcUaNboxIqxFTQgVti4hQQTe1C7FFSUmnmvmM85XJzCSpx3efzmTS
  1218. RtqBw7yZ9+5v7rl3bg+AHhK7DjClmAZ20UGm/XFcApAKgsBqNptbrVYL3cT2IQjCnSQkCRig4Fqt
  1219. Bs/zYtm2DdM0oaoqh8iyDFEUY0gUvI8AdMD3fYRhyO8k13VhWRY0TeOAer0O+kg2m/0LIcDx9LdD
  1220. gxff5jJzKjJzCmbe6fi0anEABTiOA13Xd1jiNTlxfT01UVB/CfMG7r/WILxScaOo4FpeBrPEfUdW
  1221. DMPgmVQqlTbgtCjls4sGjl16PxuRny5oGH3yA7oZoPjR4BDbqeHlksLrUa1W24DJWRU3Wer9Qw/G
  1222. k+kVmA2lGuDKtMQzsVwfl6c3eE3IUgyYeCFjsqCgb3DqQhJwq/gTY7lyV61Jdhtw7qFUSjNA/8m8
  1223. kASkc5tYXnN4BvTs1kO23uAdIksx4OjI19Grzys4c7fkfCm5MO0QU483cf5eGcurNq8BWfD8kK11
  1224. HtwBoDYeGV4ZO5X57ow8knBWLGP49jqevVF5IKnRaOxQByD6kT6smFj6bHb0OoJsV1cAe/n7f3PQ
  1225. RVsx4B/kMCuQRxt7CWZnXT69CUAvQfYwzpFo9Hv/AD332dKni9XnAAAAAElFTkSuQmCC";
  1226. $_IMAGES["cs"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1227. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJOSURBVDjLjZPbaxNBFMarf4cFwb9AIgXB
  1228. R18Enyw+i1gs4g01kphSlPjQeAtNzNqGNLVpNCGhEvBS21Rr0ZIK6ovFiKbNbXNpdpNsstncUz9n
  1229. NiauErEDHwMz8/1mzjlz+gD0UZGxh0hFNPAf7SXa3fUpAKparVZoNpvbrVYLvUT2YbFYTEqIEjBA
  1230. zZIkoVwud1UsFiEIAjKZjAxJp9NgGKYL6Zh3UQA9UK1WUa/X5ZmqVCqhUCiA4zgZUKlUQC+xWq1t
  1231. CAUM3v6+74hu2cH4eUz6OcwFcvgYEmUANYiiiFF3Aq5XHIJRCeqHLOJbFcg5OW6Mqm495fL2NznY
  1232. l7OwveYxsZSF6QUHEpIc9+eQgOvuFL6EMjC6wrg4GZZfIwOGbazX8TaPY/qAr5Ms72oOBt8WknwV
  1233. em8KWmcCY0/S0E1HcXYyhjNMBAYH2waYF8izl3I4eGLqmjLjz9by+PRNxCMS0k0C0c+yMDjj0Mwm
  1234. MOGJ4+Vqtg0Yn+dwf5HH/sG75/4uWzAiwbfCQ+dMYSGQxdhMHMPmMFY+8MgX623AiDu9+YAADg35
  1235. LErzHU8SGkcSI4+T0DoSuGRnoZ5mcdIUwdC9zd85OHpjQzP+nMOVmZj4NSZBKNVh9LbN6xslnGai
  1236. 8CxmMP+Ol81criwntgugZTysDmovTEXEUVcKV8lt520s5kjJvP4MTpkjyApVXCZmvTWKRqMh6w9A
  1237. 5yO9Xy9ijUgZCi1lL/UEkMUf/+qDHtruAn5BDpAvXKYbOzGTsyW5exWAfgrZQTt3RFu//yfHVsX/
  1238. fi5tjwAAAABJRU5ErkJggg==";
  1239. $_IMAGES["css"] = $_IMAGES["code"];
  1240. $_IMAGES["doc"] = $_IMAGES["textdocument"];
  1241. $_IMAGES["docx"] = $_IMAGES["textdocument"];
  1242. $_IMAGES["exe"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1243. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAEkSURBVCjPbdE9S0IBGIbhxxobWxP8D8r5
  1244. I60RLg0NNTS21VBRQwg1aA4VOAWBpBVCFhKUtkVJtPQx9GFFWh49x3P0bvAjjsWzXrzvcAtpREEZ
  1245. fQtoACEkpKBVdpouv7NYi3SJkAynWcXExKTCJ6+4PLPeIZJPhksdmzp1vilTwqVGlWhEgR6wsbGp
  1246. U+OLt94rGfJ1gIOLi4OFSYV3Sjx5QXdtkiHFx//gjiwlTshyT5LV3T8gwy3HFLnhkCuWmB3qA0Uu
  1247. 2WGOZVIUmN/ru5CiwAsLNLCI8cg+i3hAggMeiNOgwQbXRJnwghoX5DkiTow0OcLJ8HAbtLpkkzwJ
  1248. CuTY4pQppgeFFLJNtxMrzSRFtlnhvDXO6Fk7ll8hb+wZxpChoPzoB6aiXIYcSLDWAAAAAElFTkSu
  1249. QmCC";
  1250. $_IMAGES["gz"] = $_IMAGES["archive"];
  1251. $_IMAGES["gif"] = $_IMAGES["image"];
  1252. $_IMAGES["h"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1253. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHtSURBVDjLjZNLS9xQFMe138C9A/0OynyB
  1254. UjeFQjduROi2MMtCEalS0ToLEdQMdEShoKDWRymKigWxII7PhaB9aBFUJjHJpHlnnvbfe27NJcVI
  1255. DfwIyT3nd885cOoA1BHsaWQ0MZL/4SHjgciLCJpKpZJVrVava7Ua4mDnkCRpKCqJCpKU7HkefN8X
  1256. 2LYN0zShqiqXKIqCTCYjJGFyPQkooFgsolwu8zfhui4sy4KmaVwQBAHokmw2+1cSClpSUmr12MP7
  1257. LQunii8klOA4DnRdv9USn0koePRiJDW+aTGBjcOLgAewlnjfYSuFQoFXIsvybQF9jG2avIKFPQtz
  1258. OyZmcyZMtywkVAnNwzCMeMG7jV+YyFmQ1g30L2kYWitAWtZFJdQOzYREsYLhzwZGGF+OHez/9PD2
  1259. k4aeeYUHVyoVPheSELGCwRUdA+zG/VMPeycu3iyo6J5WxDxIQFA1QtCauUwPrOpIPh/vSC+qSC/q
  1260. PHn3u4uu2Su8nsrzZKqAoOR/BO2j+Q+DTPC0/2CdSu79qOLVlIyXk3l0zsjomJYxv6ELQYgQPOk7
  1261. a2jpOnmcaG57tvuD3fzNxc5XB9sEm0XuyMb5VcCriBI7A/bz9117EMO1ENxImtmAfDq4TzKLdfn2
  1262. RgQJktxjnUNo9RN/AFmTwlP7TY1uAAAAAElFTkSuQmCC";
  1263. $_IMAGES["htm"] = $_IMAGES["webpage"];
  1264. $_IMAGES["html"] = $_IMAGES["webpage"];
  1265. $_IMAGES["iso"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1266. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIsSURBVDjLjZNfa9NQGIdnP4cDv8Nkn8PL
  1267. 6UfwSgQZOoSBYkUvZLN1lMFArQyHrsIuWkE3ug2t1K3O0LXrZotdlzZp0qZp/qc9P8852qyyigs8
  1268. F8nJ7znveZN3DMAYg14XKROUyf9wiRIKckOCCcdxNN/3+71eD6Og64hEInPDkmHBJAsbhgHTNAM6
  1269. nQ7a7TYkSeKSer2OaDQaSAbhC7efJGY28gZWPrUQTyt4l2lCKLfR7XahaRpkWeYCy7LANonFYr8l
  1270. qzt26PUXIxzf7pCfioeS5EI2fVQkG+GVH0hlRVqFjmazeeZIvCc0PBXf1ohu96GZBEnBQMMmcAjg
  1271. eH3cWRKQyTf4URRF4ZWIongqoOFURXZpUEOt1YNm+BzDI6AeFKo6IqsF3g9d13k/VFU9FSytK9V8
  1272. zUJiR0WbBh+/2cVich+trodvNQeFEwvTsa/8C7Dzs54wUSBYeN+ofq+ageDZmoBX64dQdRcbByaE
  1273. qoGbTzPwPA+u63IJIxDMrR2nDkUTR6oPxSJ8ZxYuNlxsHtnYLal48DIH+om5gMGqCQSP3lam7i+X
  1274. SMfp40AFsjWCrbKHdMlGpeng2uxHpHM1XgGDhf8S3Fsuhe4+3w9PL+6RvbKGguhAODaRLSq4OvsB
  1275. L5JFvutAMCAQDH6kK9fnZyKJAm4tZHFj/jMexnPYzJ3w0kdxRsBu6EPyrzkYQT8Q/JFcpqWabOE8
  1276. Yfpul0/vkGCcSc4xzgPY6I//AmC87eKq4rrzAAAAAElFTkSuQmCC";
  1277. $_IMAGES["java"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1278. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIRSURBVDjLjZPJa1NRFIera/8ECy7dV7tx
  1279. kb2UOoDgzo0R3YuLrFwWIVglWQRtN0GCLkIixJDJQJKGQOYBA4akmec5eSFT/XnPsXlNsWIffOTd
  1280. d3O+e+6PezcAbBDiuS7YEmz/hxuCq3LdmmBrOp32F4vFyXK5xEWIeWg0mnfrknXBNhWPx2NIkiQz
  1281. GAzQ6/XQaDRYUqvVoNVqZQkXGwyGm2q1+k00GkUkEkE4HEYwGGQCgQDS6TSKxSILJpMJaBGdTvdH
  1282. YjKZHvp8vuNsNot6vc7QavRLq1UqFcTjcbhcLrmLFZyJ2+0u9Pt9hC1f8OHpDt4/uoO3928zmscK
  1283. HD5/gKPPB8jn8yxpNpuoVqtnAqPRiOFwiPGgB/fhPr7uvcJH5S4Ont3Dp5dP8G3/NX4cfedCi8XC
  1284. eXQ6nTOBzWaT5vM5J0yTFFy325WhtmkbhN1ux2g04gVlgcfj+UmDUqkEh8OBcrnM7xRaLpdDIpHg
  1285. cSqVYihEYr0DL61O6fv9fhQKBd4vhUrpk6DdbsNsNrN8Nptxt7JApVK9EMW9TCbDEgqI2qUOSELv
  1286. JPF6vbw9Kj4nEM81pVJ5V6/XH8diMQ6IaLVaLAmFQnA6nfyNslohC05P4RWFQrFLHVitVoYSF2cE
  1287. yWSSgxOn9Bx/CWggPv761z24gBNZcCq5JQKSaOIyxeK/I769a4JNklziOq+gq7/5Gx172kZga+XW
  1288. AAAAAElFTkSuQmCC";
  1289. $_IMAGES["jpg"] = $_IMAGES["image"];
  1290. $_IMAGES["jpeg"] = $_IMAGES["image"];
  1291. $_IMAGES["js"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1292. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHdSURBVDjLjZNPaxNBGIdrLwURLznWgkcv
  1293. IrQhRw9FGgy01IY0TVsQ0q6GFkT0kwjJId9AP4AHP4Q9FO2hJ7El2+yf7OzMbja7Sf0578QdNybF
  1294. LjwszLu/Z2femZkDMEfI54FkRVL4Dw8l8zqXEawMBgM2HA6vR6MRZiHraDabH7KSrKBA4SAIEIah
  1295. xvd9eJ6HbrerJKZpotVqaUkavkMC+iCKIsRxrN6EEAKMMViWpQT9fh/0k3a7PZZkBUPmqXAKCSjA
  1296. OYdt21NLUj1JBYW7C6vi6BC8vKWKQXUXQcNA5Nh6KY7jqJl0Op1JwY/Hi7mLp/lT/uoA/OX2WLC3
  1297. C9FoQBwfILKulIRmQv1wXfevwHmyuMPXS5Fv1MHrFSTmhSomnUvw/Spo3C+vg3/+pJZDPSGRFvil
  1298. NV+8PUZvoziKvn+d3LZvJ/BelMDevIZXK2EQCiUhtMDM53bY5rOIGXtwjU3EVz/HM5Az8eplqPFK
  1299. EfzLR91cOg8TPTgr3MudFx+d9owK7KMNVfQOtyQ1OO9qiHsWkiRRUHhKQLuwfH9+1XpfhVVfU0V3
  1300. //k4zFwdzjIlSA/Sv8jTOZObBL9uugczuNaCP5K8bFBIhduE5bdC3d6MYIkkt7jOKXT1l34DkIu9
  1301. e0agZjoAAAAASUVORK5CYII=";
  1302. $_IMAGES["mov"] = $_IMAGES["video"];
  1303. $_IMAGES["mp3"] = $_IMAGES["audio"];
  1304. $_IMAGES["mp4"] = $_IMAGES["audio"];
  1305. $_IMAGES["mpeg"] = $_IMAGES["video"];
  1306. $_IMAGES["mpg"] = $_IMAGES["video"];
  1307. $_IMAGES["odg"] = $_IMAGES["vectorgraphics"];
  1308. $_IMAGES["odp"] = $_IMAGES["presentation"];
  1309. $_IMAGES["ods"] = $_IMAGES["spreadsheet"];
  1310. $_IMAGES["odt"] = $_IMAGES["textdocument"];
  1311. $_IMAGES["pdf"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1312. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHhSURBVDjLjZPLSxtRFIfVZRdWi0oFBf+B
  1313. rhRx5dKVYKG4tLhRqlgXPmIVJQiC60JCCZYqFHQh7rrQlUK7aVUUfCBRG5RkJpNkkswrM5NEf73n
  1314. 6gxpHujAB/fOvefjnHM5VQCqCPa1MNoZnU/Qxqhx4woE7ZZlpXO53F0+n0c52Dl8Pt/nQkmhoJOC
  1315. dUWBsvQJ2u4ODMOAwvapVAqSJHGJKIrw+/2uxAmuJgFdMDUVincSxvEBTNOEpmlIp9OIxWJckMlk
  1316. oOs6AoHAg6RYYNs2kp4RqOvfuIACVFVFPB4vKYn3pFjAykDSOwVta52vqW6nlEQiwTMRBKGygIh9
  1317. GEDCMwZH6EgoE+qHLMuVBdbfKwjv3yE6Ogjz/PQ/CZVDPSFRRYE4/RHy1y8wry8RGWGSqyC/nM1m
  1318. eX9IQpQV2JKIUH8vrEgYmeAFwuPDCHa9QehtD26HBhCZnYC8ucGzKSsIL8wgsjiH1PYPxL+vQvm5
  1319. B/3sBMLyIm7GhhCe90BaWykV/Gp+VR9oqPVe9vfBTsruM1HtBKVPmFIUNusBrV3B4ev6bsbyXlPd
  1320. kbr/u+StHUkxruBPY+0KY8f38oWX/byvNAdluHNLeOxDB+uyQQfPCWZ3NT69BYJWkjxjnB1o9Fv/
  1321. ASQ5s+ABz8i2AAAAAElFTkSuQmCC";
  1322. $_IMAGES["php"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1323. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGsSURBVDjLjZNLSwJRFICtFv2AgggS2vQL
  1324. DFvVpn0Pi4iItm1KItvWJqW1pYsRemyyNILARbZpm0WtrJ0kbmbUlHmr4+t0z60Z7oSSAx935txz
  1325. vrlPBwA4EPKMEVwE9z+ME/qtOkbgqtVqUqPRaDWbTegE6YdQKBRkJazAjcWapoGu6xayLIMoilAo
  1326. FKhEEAQIh8OWxCzuQwEmVKtVMAyDtoiqqiBJEhSLRSqoVCqAP+E47keCAvfU5sDQ8MRs/OYNtr1x
  1327. 2PXdwuJShLLljcFlNAW5HA9khLYp0TUhSYMLHm7PLEDS7zyw3ybRqyfg+TyBtwl2sDP1nKWFiUSa
  1328. zFex3tk45sXjL1Aul20CGTs+syVY37igBbwg03eMsfH9gwSsrZ+Doig2QZsdNiZmMkVrKmwc18az
  1329. HKELyQrOMEHTDJp8HXu1hostG8dY8PiRngdWMEq467ZwbDxwlIR8XrQLcBvn5k9Gpmd8fn/gHlZW
  1330. T20C/D4k8eTDB3yVFKjX6xSbgD1If8G970Q3QbvbPehAyxL8SibJEdaxo5dikqvS28sInCjp4Tqb
  1331. 4NV3fgPirZ4pD4KS4wAAAABJRU5ErkJggg==";
  1332. $_IMAGES["png"] = $_IMAGES["image"];
  1333. $_IMAGES["pps"] = $_IMAGES["presentation"];
  1334. $_IMAGES["ppsx"] = $_IMAGES["presentation"];
  1335. $_IMAGES["ppt"] = $_IMAGES["presentation"];
  1336. $_IMAGES["pptx"] = $_IMAGES["presentation"];
  1337. $_IMAGES["psd"] = $_IMAGES["graphics"];
  1338. $_IMAGES["rar"] = $_IMAGES["archive"];
  1339. $_IMAGES["rb"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1340. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIESURBVDjLjZNPTxNBGIexid9CEr8DBr8C
  1341. HEiMVoomJiQkxBIM3dgIiaIESJTGGpVtyXIzHhoM4SIe9KAnEi4clQtJEczWFrbdP93d7s7u/JwZ
  1342. 7XYJBdnkyRxmfs/MvO9OD4AeDvuuMPoY/f/hKiMR5WKCvlarpRNCwiAI0A02D1mW38QlcUE/Dzeb
  1343. Tdi2HWEYBhqNBqrVqpBUKhUUCoVI0g5f4gK+wHVdeJ4nRo5lWdB1HbVaTQgcxwHfRFGUvxIuCKYf
  1344. zmqZyZ2wKIO8fQ3/1Uv4Sy/QWliAO/sU9qMZmFMS3HfvT1xJ1ITOZJ9RpQi6+RH0y2fQb19BP23C
  1345. VhRo+TysXA71+XkcMIk6fAfHK6tQVfWEoESXngNra0C5DHZJYGMDZiaD35IEi41qOo3vc3MoJ1Oo
  1346. j92HpmkdQZiVEsHUAzl88hjY3gYIAdbXYQ0MoDo4CH1kBHssvH8jCf3eGKzDXzBNsyNoF/HH7WSJ
  1347. ZLPA7i6wtQVnaAhmKoXjxUX8vDkMY3Qcnm6IInJOCS4nEte9QhF+RhInIRMTcFhYvZWCcXcUPmsl
  1348. 7w6H/w+nBFEb5SLc8TTo8jLq7M4m25mHfd8X8PC5AtHrXB5NdmwRrnfCcc4VCEnpA8jREasp6cpZ
  1349. AnrWO+hCGAn+Sa6xAtl84iJhttYSrzcm6OWSCzznNvzp9/4BgwKvG3Zq1eoAAAAASUVORK5CYII=";
  1350. $_IMAGES["sln"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1351. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJQSURBVDjLjZNvSBNxGMeX9O+FOAkaLbeh
  1352. ozdGRGiMQqTIlEqJMIig3oxl0YxcgYt6FUZRryLYwpFWCr2wXgjBIMJMYhFjgZSiEXOg5c5N593u
  1353. dne7u+2+3V3tT22SBx/uxe/5fu7uuefRAdCpKJdJoVHB9h9qFSryuSJBYzqdpiRJymYyGZRDOYfH
  1354. 43lULCkW2NRwKpUCy7J5kskkSJJELBbTJARBwOv15iW58AZVoBbwPA9BELS7CsMwoCgK8XhcE3Ac
  1355. B/UhPp/vtyQnGBi03pYXjyAbPQuRD2sSbmUFVN9NLJ5ux9DryZJP0nqiChzjl48Oh9oYRPTAXBVk
  1356. sgnS0hRWu7uxXG/EfL0ZZ9yjGHgb1t4kGo0WBO6AvcUVsFP9oTZZjlQCP7ZA/r4JpHM3lup2Im6p
  1357. RsRai2PX/GjoDWEk8BWJRKIg6P147mfP+CW63d16RUyOQP5SA6rLAsKyA0TNNizvM4D9/A4Tk2Ec
  1358. 7nuPE0+vgqbpgqBnzLl6vv8N3+x4eEsS0mAvHAJhMoAw6kHUVUF4rkeWHAKXZtA15kDL6C6tkXmB
  1359. ffiZs/P+NE7dC4pBhwsJY6USVjBtBO/bCswrbfq2GS+Ce9DwyooHoRvaPPzVxI67IVfHnQA+2JqQ
  1360. MFQgur0anP8J5IVmYEopmdbh5YQO1wMu0BxdKlB/44GLg48/HT8J8uBesH6/ViDxC5DnWiHPWjAz
  1361. 0wleYCGKokaJIDdI/6JMZ1nWEshr7UEZsnnBH8l+ZfpY9WA9YaWW0ba3SGBWJetY5xzq6pt/AY6/
  1362. mKmzshF5AAAAAElFTkSuQmCC";
  1363. $_IMAGES["sql"] = $_IMAGES["database"];
  1364. $_IMAGES["tar"] = $_IMAGES["archive"];
  1365. $_IMAGES["tgz"] = $_IMAGES["archive"];
  1366. $_IMAGES["txt"] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
  1367. U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADoSURBVBgZBcExblNBGAbA2ceegTRBuIKO
  1368. giihSZNTcC5LUHAihNJR0kGKCDcYJY6D3/77MdOinTvzAgCw8ysThIvn/VojIyMjIyPP+bS1sUQI
  1369. V2s95pBDDvmbP/mdkft83tpYguZq5Jh/OeaYh+yzy8hTHvNlaxNNczm+la9OTlar1UdA/+C2A4tr
  1370. RCnD3jS8BB1obq2Gk6GU6QbQAS4BUaYSQAf4bhhKKTFdAzrAOwAxEUAH+KEM01SY3gM6wBsEAQB0
  1371. gJ+maZoC3gI6iPYaAIBJsiRmHU0AALOeFC3aK2cWAACUXe7+AwO0lc9eTHYTAAAAAElFTkSuQmCC";
  1372. $_IMAGES["wav"] = $_IMAGES["audio"];
  1373. $_IMAGES["wma"] = $_IMAGES["audio"];
  1374. $_IMAGES["wmv"] = $_IMAGES["video"];
  1375. $_IMAGES["xcf"] = $_IMAGES["graphics"];
  1376. $_IMAGES["xls"] = $_IMAGES["spreadsheet"];
  1377. $_IMAGES["xlsx"] = $_IMAGES["spreadsheet"];
  1378. $_IMAGES["xml"] = $_IMAGES["code"];
  1379. $_IMAGES["zip"] = $_IMAGES["archive"];
  1380. /***************************************************************************/
  1381. /* EDASIST KOODI EI OLE TARVIS MUUTA */
  1382. /* */
  1383. /* HERE COMES THE CODE. */
  1384. /* DON'T CHANGE UNLESS YOU KNOW WHAT YOU ARE DOING ;) */
  1385. /***************************************************************************/
  1386. //
  1387. // The class that displays images (icons and thumbnails)
  1388. //
  1389. class ImageServer
  1390. {
  1391. //
  1392. // Checks if an image is requested and displays one if needed
  1393. //
  1394. public static function showImage()
  1395. {
  1396. global $_IMAGES;
  1397. if(isset($_GET['img']))
  1398. {
  1399. if(strlen($_GET['img']) > 0)
  1400. {
  1401. $mtime = gmdate('r', filemtime($_SERVER['SCRIPT_FILENAME']));
  1402. $etag = md5($mtime.$_SERVER['SCRIPT_FILENAME']);
  1403. if ((isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && $_SERVER['HTTP_IF_MODIFIED_SINCE'] == $mtime)
  1404. || (isset($_SERVER['HTTP_IF_NONE_MATCH']) && str_replace('"', '', stripslashes($_SERVER['HTTP_IF_NONE_MATCH'])) == $etag))
  1405. {
  1406. header('HTTP/1.1 304 Not Modified');
  1407. return true;
  1408. }
  1409. else {
  1410. header('ETag: "'.$etag.'"');
  1411. header('Last-Modified: '.$mtime);
  1412. header('Content-type: image/gif');
  1413. if(isset($_IMAGES[$_GET['img']]))
  1414. print base64_decode($_IMAGES[$_GET['img']]);
  1415. else
  1416. print base64_decode($_IMAGES["unknown"]);
  1417. }
  1418. }
  1419. return true;
  1420. }
  1421. else if(isset($_GET['thumb']))
  1422. {
  1423. if(strlen($_GET['thumb']) > 0 && EncodeExplorer::getConfig('thumbnails') == true)
  1424. {
  1425. ImageServer::showThumbnail($_GET['thumb']);
  1426. }
  1427. return true;
  1428. }
  1429. return false;
  1430. }
  1431. public static function isEnabledPdf()
  1432. {
  1433. if(class_exists("Imagick"))
  1434. return true;
  1435. return false;
  1436. }
  1437. public static function openPdf($file)
  1438. {
  1439. if(!ImageServer::isEnabledPdf())
  1440. return null;
  1441. $im = new Imagick($file.'[0]');
  1442. $im->setImageFormat( "png" );
  1443. $str = $im->getImageBlob();
  1444. $im2 = imagecreatefromstring($str);
  1445. return $im2;
  1446. }
  1447. //
  1448. // Creates and returns a thumbnail image object from an image file
  1449. //
  1450. public static function createThumbnail($file)
  1451. {
  1452. if(is_int(EncodeExplorer::getConfig('thumbnails_width')))
  1453. $max_width = EncodeExplorer::getConfig('thumbnails_width');
  1454. else
  1455. $max_width = 200;
  1456. if(is_int(EncodeExplorer::getConfig('thumbnails_height')))
  1457. $max_height = EncodeExplorer::getConfig('thumbnails_height');
  1458. else
  1459. $max_height = 200;
  1460. if(File::isPdfFile($file))
  1461. $image = ImageServer::openPdf($file);
  1462. else
  1463. $image = ImageServer::openImage($file);
  1464. if($image == null)
  1465. return;
  1466. imagealphablending($image, true);
  1467. imagesavealpha($image, true);
  1468. $width = imagesx($image);
  1469. $height = imagesy($image);
  1470. $new_width = $max_width;
  1471. $new_height = $max_height;
  1472. if(($width/$height) > ($new_width/$new_height))
  1473. $new_height = $new_width * ($height / $width);
  1474. else
  1475. $new_width = $new_height * ($width / $height);
  1476. if($new_width >= $width && $new_height >= $height)
  1477. {
  1478. $new_width = $width;
  1479. $new_height = $height;
  1480. }
  1481. $new_image = ImageCreateTrueColor($new_width, $new_height);
  1482. imagealphablending($new_image, true);
  1483. imagesavealpha($new_image, true);
  1484. $trans_colour = imagecolorallocatealpha($new_image, 0, 0, 0, 127);
  1485. imagefill($new_image, 0, 0, $trans_colour);
  1486. imagecopyResampled ($new_image, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
  1487. return $new_image;
  1488. }
  1489. //
  1490. // Function for displaying the thumbnail.
  1491. // Includes attempts at cacheing it so that generation is minimised.
  1492. //
  1493. public static function showThumbnail($file)
  1494. {
  1495. if(filemtime($file) < filemtime($_SERVER['SCRIPT_FILENAME']))
  1496. $mtime = gmdate('r', filemtime($_SERVER['SCRIPT_FILENAME']));
  1497. else
  1498. $mtime = gmdate('r', filemtime($file));
  1499. $etag = md5($mtime.$file);
  1500. if ((isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && $_SERVER['HTTP_IF_MODIFIED_SINCE'] == $mtime)
  1501. || (isset($_SERVER['HTTP_IF_NONE_MATCH']) && str_replace('"', '', stripslashes($_SERVER['HTTP_IF_NONE_MATCH'])) == $etag))
  1502. {
  1503. header('HTTP/1.1 304 Not Modified');
  1504. return;
  1505. }
  1506. else
  1507. {
  1508. header('ETag: "'.$etag.'"');
  1509. header('Last-Modified: '.$mtime);
  1510. header('Content-Type: image/png');
  1511. $image = ImageServer::createThumbnail($file);
  1512. imagepng($image);
  1513. }
  1514. }
  1515. //
  1516. // A helping function for opening different types of image files
  1517. //
  1518. public static function openImage ($file)
  1519. {
  1520. $size = getimagesize($file);
  1521. switch($size["mime"])
  1522. {
  1523. case "image/jpeg":
  1524. $im = imagecreatefromjpeg($file);
  1525. break;
  1526. case "image/gif":
  1527. $im = imagecreatefromgif($file);
  1528. break;
  1529. case "image/png":
  1530. $im = imagecreatefrompng($file);
  1531. break;
  1532. default:
  1533. $im=null;
  1534. break;
  1535. }
  1536. return $im;
  1537. }
  1538. }
  1539. //
  1540. // The class for logging user activity
  1541. //
  1542. class Logger
  1543. {
  1544. public static function log($message)
  1545. {
  1546. global $encodeExplorer;
  1547. if(strlen(EncodeExplorer::getConfig('log_file')) > 0)
  1548. {
  1549. if(Location::isFileWritable(EncodeExplorer::getConfig('log_file')))
  1550. {
  1551. $message = "[" . date("Y-m-d h:i:s", mktime()) . "] ".$message." (".$_SERVER["HTTP_USER_AGENT"].")\n";
  1552. error_log($message, 3, EncodeExplorer::getConfig('log_file'));
  1553. }
  1554. else
  1555. $encodeExplorer->setErrorString("log_file_permission_error");
  1556. }
  1557. }
  1558. public static function logAccess($path, $isDir)
  1559. {
  1560. $message = $_SERVER['REMOTE_ADDR']." ".GateKeeper::getUserName()." accessed ";
  1561. $message .= $isDir?"dir":"file";
  1562. $message .= " ".$path;
  1563. Logger::log($message);
  1564. }
  1565. public static function logQuery()
  1566. {
  1567. if(isset($_POST['log']) && strlen($_POST['log']) > 0)
  1568. {
  1569. Logger::logAccess($_POST['log'], false);
  1570. return true;
  1571. }
  1572. else
  1573. return false;
  1574. }
  1575. public static function logCreation($path, $isDir)
  1576. {
  1577. $message = $_SERVER['REMOTE_ADDR']." ".GateKeeper::getUserName()." created ";
  1578. $message .= $isDir?"dir":"file";
  1579. $message .= " ".$path;
  1580. Logger::log($message);
  1581. }
  1582. public static function emailNotification($path, $isFile)
  1583. {
  1584. if(strlen(EncodeExplorer::getConfig('upload_email')) > 0)
  1585. {
  1586. $message = "This is a message to let you know that ".GateKeeper::getUserName()." ";
  1587. $message .= ($isFile?"uploaded a new file":"created a new directory")." in Encode Explorer.\n\n";
  1588. $message .= "Path : ".$path."\n";
  1589. $message .= "IP : ".$_SERVER['REMOTE_ADDR']."\n";
  1590. mail(EncodeExplorer::getConfig('upload_email'), "Upload notification", $message);
  1591. }
  1592. }
  1593. }
  1594. //
  1595. // The class controls logging in and authentication
  1596. //
  1597. class GateKeeper
  1598. {
  1599. public static function init()
  1600. {
  1601. global $encodeExplorer;
  1602. if(strlen(EncodeExplorer::getConfig("session_name")) > 0)
  1603. session_name(EncodeExplorer::getConfig("session_name"));
  1604. if(count(EncodeExplorer::getConfig("users")) > 0)
  1605. session_start();
  1606. else
  1607. return;
  1608. if(isset($_GET['logout']))
  1609. {
  1610. $_SESSION['ee_user_name'] = null;
  1611. $_SESSION['ee_user_pass'] = null;
  1612. }
  1613. if(isset($_POST['user_pass']) && strlen($_POST['user_pass']) > 0)
  1614. {
  1615. if(GateKeeper::isUser((isset($_POST['user_name'])?$_POST['user_name']:""), $_POST['user_pass']))
  1616. {
  1617. $_SESSION['ee_user_name'] = isset($_POST['user_name'])?$_POST['user_name']:"";
  1618. $_SESSION['ee_user_pass'] = $_POST['user_pass'];
  1619. $addr = $_SERVER['PHP_SELF'];
  1620. if(isset($_GET['m']))
  1621. $addr .= "?m";
  1622. else if(isset($_GET['s']))
  1623. $addr .= "?s";
  1624. header( "Location: ".$addr);
  1625. }
  1626. else
  1627. $encodeExplorer->setErrorString("wrong_pass");
  1628. }
  1629. }
  1630. public static function isUser($userName, $userPass)
  1631. {
  1632. foreach(EncodeExplorer::getConfig("users") as $user)
  1633. {
  1634. if($user[1] == $userPass)
  1635. {
  1636. if(strlen($userName) == 0 || $userName == $user[0])
  1637. {
  1638. return true;
  1639. }
  1640. }
  1641. }
  1642. return false;
  1643. }
  1644. public static function isLoginRequired()
  1645. {
  1646. if(EncodeExplorer::getConfig("require_login") == false){
  1647. return false;
  1648. }
  1649. return true;
  1650. }
  1651. public static function isUserLoggedIn()
  1652. {
  1653. if(isset($_SESSION['ee_user_name']) && isset($_SESSION['ee_user_pass']))
  1654. {
  1655. if(GateKeeper::isUser($_SESSION['ee_user_name'], $_SESSION['ee_user_pass']))
  1656. return true;
  1657. }
  1658. return false;
  1659. }
  1660. public static function isAccessAllowed()
  1661. {
  1662. if(!GateKeeper::isLoginRequired() || GateKeeper::isUserLoggedIn())
  1663. return true;
  1664. return false;
  1665. }
  1666. public static function isUploadAllowed(){
  1667. if(EncodeExplorer::getConfig("upload_enable") == true && GateKeeper::isUserLoggedIn() == true && GateKeeper::getUserStatus() == "admin")
  1668. return true;
  1669. return false;
  1670. }
  1671. public static function isNewdirAllowed(){
  1672. if(EncodeExplorer::getConfig("newdir_enable") == true && GateKeeper::isUserLoggedIn() == true && GateKeeper::getUserStatus() == "admin")
  1673. return true;
  1674. return false;
  1675. }
  1676. public static function isDeleteAllowed(){
  1677. if(EncodeExplorer::getConfig("delete_enable") == true && GateKeeper::isUserLoggedIn() == true && GateKeeper::getUserStatus() == "admin")
  1678. return true;
  1679. return false;
  1680. }
  1681. public static function getUserStatus(){
  1682. if(GateKeeper::isUserLoggedIn() == true && EncodeExplorer::getConfig("users") != null && is_array(EncodeExplorer::getConfig("users"))){
  1683. foreach(EncodeExplorer::getConfig("users") as $user){
  1684. if($user[0] != null && $user[0] == $_SESSION['ee_user_name'])
  1685. return $user[2];
  1686. }
  1687. }
  1688. return null;
  1689. }
  1690. public static function getUserName()
  1691. {
  1692. if(GateKeeper::isUserLoggedIn() == true && isset($_SESSION['ee_user_name']) && strlen($_SESSION['ee_user_name']) > 0)
  1693. return $_SESSION['ee_user_name'];
  1694. if(isset($_SERVER["REMOTE_USER"]) && strlen($_SERVER["REMOTE_USER"]) > 0)
  1695. return $_SERVER["REMOTE_USER"];
  1696. if(isset($_SERVER['PHP_AUTH_USER']) && strlen($_SERVER['PHP_AUTH_USER']) > 0)
  1697. return $_SERVER['PHP_AUTH_USER'];
  1698. return "an anonymous user";
  1699. }
  1700. public static function showLoginBox(){
  1701. if(!GateKeeper::isUserLoggedIn() && count(EncodeExplorer::getConfig("users")) > 0)
  1702. return true;
  1703. return false;
  1704. }
  1705. }
  1706. //
  1707. // The class for any kind of file managing (new folder, upload, etc).
  1708. //
  1709. class FileManager
  1710. {
  1711. /* Obsolete code
  1712. function checkPassword($inputPassword)
  1713. {
  1714. global $encodeExplorer;
  1715. if(strlen(EncodeExplorer::getConfig("upload_password")) > 0 && $inputPassword == EncodeExplorer::getConfig("upload_password"))
  1716. {
  1717. return true;
  1718. }
  1719. else
  1720. {
  1721. $encodeExplorer->setErrorString("wrong_password");
  1722. return false;
  1723. }
  1724. }
  1725. */
  1726. function newFolder($location, $dirname)
  1727. {
  1728. global $encodeExplorer;
  1729. if(strlen($dirname) > 0)
  1730. {
  1731. $forbidden = array(".", "/", "\\");
  1732. for($i = 0; $i < count($forbidden); $i++)
  1733. {
  1734. $dirname = str_replace($forbidden[$i], "", $dirname);
  1735. }
  1736. if(!$location->uploadAllowed())
  1737. {
  1738. // The system configuration does not allow uploading here
  1739. $encodeExplorer->setErrorString("upload_not_allowed");
  1740. }
  1741. else if(!$location->isWritable())
  1742. {
  1743. // The target directory is not writable
  1744. $encodeExplorer->setErrorString("upload_dir_not_writable");
  1745. }
  1746. else if(!mkdir($location->getDir(true, false, false, 0).$dirname, 0777))
  1747. {
  1748. // Error creating a new directory
  1749. $encodeExplorer->setErrorString("new_dir_failed");
  1750. }
  1751. else if(!chmod($location->getDir(true, false, false, 0).$dirname, 0777))
  1752. {
  1753. // Error applying chmod 777
  1754. $encodeExplorer->setErrorString("chmod_dir_failed");
  1755. }
  1756. else
  1757. {
  1758. // Directory successfully created, sending e-mail notification
  1759. Logger::logCreation($location->getDir(true, false, false, 0).$dirname, true);
  1760. Logger::emailNotification($location->getDir(true, false, false, 0).$dirname, false);
  1761. }
  1762. }
  1763. }
  1764. function uploadFile($location, $userfile)
  1765. {
  1766. global $encodeExplorer;
  1767. $name = basename($userfile['name']);
  1768. if(get_magic_quotes_gpc())
  1769. $name = stripslashes($name);
  1770. $upload_dir = $location->getFullPath();
  1771. $upload_file = $upload_dir . $name;
  1772. if(function_exists("finfo_open") && function_exists("finfo_file"))
  1773. $mime_type = File::getFileMime($userfile['tmp_name']);
  1774. else
  1775. $mime_type = $userfile['type'];
  1776. $extension = File::getFileExtension($userfile['name']);
  1777. if(!$location->uploadAllowed())
  1778. {
  1779. $encodeExplorer->setErrorString("upload_not_allowed");
  1780. }
  1781. else if(!$location->isWritable())
  1782. {
  1783. $encodeExplorer->setErrorString("upload_dir_not_writable");
  1784. }
  1785. else if(!is_uploaded_file($userfile['tmp_name']))
  1786. {
  1787. $encodeExplorer->setErrorString("failed_upload");
  1788. }
  1789. else if(is_array(EncodeExplorer::getConfig("upload_allow_type")) && count(EncodeExplorer::getConfig("upload_allow_type")) > 0 && !in_array($mime_type, EncodeExplorer::getConfig("upload_allow_type")))
  1790. {
  1791. $encodeExplorer->setErrorString("upload_type_not_allowed");
  1792. }
  1793. else if(is_array(EncodeExplorer::getConfig("upload_reject_extension")) && count(EncodeExplorer::getConfig("upload_reject_extension")) > 0 && in_array($extension, EncodeExplorer::getConfig("upload_reject_extension")))
  1794. {
  1795. $encodeExplorer->setErrorString("upload_type_not_allowed");
  1796. }
  1797. else if(!@move_uploaded_file($userfile['tmp_name'], $upload_file))
  1798. {
  1799. $encodeExplorer->setErrorString("failed_move");
  1800. }
  1801. else
  1802. {
  1803. chmod($upload_file, 0755);
  1804. Logger::logCreation($location->getDir(true, false, false, 0).$name, false);
  1805. Logger::emailNotification($location->getDir(true, false, false, 0).$name, true);
  1806. }
  1807. }
  1808. public static function delete_dir($dir) {
  1809. if (is_dir($dir)) {
  1810. $objects = scandir($dir);
  1811. foreach ($objects as $object) {
  1812. if ($object != "." && $object != "..") {
  1813. if (filetype($dir."/".$object) == "dir")
  1814. FileManager::delete_dir($dir."/".$object);
  1815. else
  1816. unlink($dir."/".$object);
  1817. }
  1818. }
  1819. reset($objects);
  1820. rmdir($dir);
  1821. }
  1822. }
  1823. public static function delete_file($file){
  1824. if(is_file($file)){
  1825. unlink($file);
  1826. }
  1827. }
  1828. //
  1829. // The main function, checks if the user wants to perform any supported operations
  1830. //
  1831. function run($location)
  1832. {
  1833. if(isset($_POST['userdir']) && strlen($_POST['userdir']) > 0){
  1834. if($location->uploadAllowed() && GateKeeper::isUserLoggedIn() && GateKeeper::isAccessAllowed() && GateKeeper::isNewdirAllowed()){
  1835. $this->newFolder($location, $_POST['userdir']);
  1836. }
  1837. }
  1838. if(isset($_FILES['userfile']['name']) && strlen($_FILES['userfile']['name']) > 0){
  1839. if($location->uploadAllowed() && GateKeeper::isUserLoggedIn() && GateKeeper::isAccessAllowed() && GateKeeper::isUploadAllowed()){
  1840. $this->uploadFile($location, $_FILES['userfile']);
  1841. }
  1842. }
  1843. if(isset($_GET['del'])){
  1844. if(GateKeeper::isUserLoggedIn() && GateKeeper::isAccessAllowed() && GateKeeper::isDeleteAllowed()){
  1845. $split_path = Location::splitPath($_GET['del']);
  1846. $path = "";
  1847. for($i = 0; $i < count($split_path); $i++){
  1848. $path .= $split_path[$i];
  1849. if($i + 1 < count($split_path))
  1850. $path .= "/";
  1851. }
  1852. if($path == "" || $path == "/" || $path == "\\" || $path == ".")
  1853. return;
  1854. if(is_dir($path))
  1855. FileManager::delete_dir($path);
  1856. else if(is_file($path))
  1857. FileManager::delete_file($path);
  1858. }
  1859. }
  1860. }
  1861. }
  1862. //
  1863. // Dir class holds the information about one directory in the list
  1864. //
  1865. class Dir
  1866. {
  1867. var $name;
  1868. var $location;
  1869. //
  1870. // Constructor
  1871. //
  1872. function Dir($name, $location)
  1873. {
  1874. $this->name = $name;
  1875. $this->location = $location;
  1876. }
  1877. function getName()
  1878. {
  1879. return $this->name;
  1880. }
  1881. function getNameHtml()
  1882. {
  1883. return htmlspecialchars($this->name);
  1884. }
  1885. function getNameEncoded()
  1886. {
  1887. return rawurlencode($this->name);
  1888. }
  1889. //
  1890. // Debugging output
  1891. //
  1892. function debug()
  1893. {
  1894. print("Dir name (htmlspecialchars): ".$this->getName()."\n");
  1895. print("Dir location: ".$this->location->getDir(true, false, false, 0)."\n");
  1896. }
  1897. }
  1898. //
  1899. // File class holds the information about one file in the list
  1900. //
  1901. class File
  1902. {
  1903. var $name;
  1904. var $location;
  1905. var $size;
  1906. //var $extension;
  1907. var $type;
  1908. var $modTime;
  1909. //
  1910. // Constructor
  1911. //
  1912. function File($name, $location)
  1913. {
  1914. $this->name = $name;
  1915. $this->location = $location;
  1916. $this->type = File::getFileType($this->location->getDir(true, false, false, 0).$this->getName());
  1917. $this->size = File::getFileSize($this->location->getDir(true, false, false, 0).$this->getName());
  1918. $this->modTime = filemtime($this->location->getDir(true, false, false, 0).$this->getName());
  1919. }
  1920. function getName()
  1921. {
  1922. return $this->name;
  1923. }
  1924. function getNameEncoded()
  1925. {
  1926. return rawurlencode($this->name);
  1927. }
  1928. function getNameHtml()
  1929. {
  1930. return htmlspecialchars($this->name);
  1931. }
  1932. function getSize()
  1933. {
  1934. return $this->size;
  1935. }
  1936. function getType()
  1937. {
  1938. return $this->type;
  1939. }
  1940. function getModTime()
  1941. {
  1942. return $this->modTime;
  1943. }
  1944. //
  1945. // Determine the size of a file
  1946. //
  1947. public static function getFileSize($file)
  1948. {
  1949. $sizeInBytes = filesize($file);
  1950. // If filesize() fails (with larger files), try to get the size from unix command line.
  1951. if (EncodeExplorer::getConfig("large_files") == true || !$sizeInBytes || $sizeInBytes < 0) {
  1952. $sizeInBytes=exec("ls -l '$file' | awk '{print $5}'");
  1953. }
  1954. return $sizeInBytes;
  1955. }
  1956. public static function getFileType($filepath)
  1957. {
  1958. /*
  1959. * This extracts the information from the file contents.
  1960. * Unfortunately it doesn't properly detect the difference between text-based file types.
  1961. *
  1962. $mime_type = File::getMimeType($filepath);
  1963. $mime_type_chunks = explode("/", $mime_type, 2);
  1964. $type = $mime_type_chunks[1];
  1965. */
  1966. return File::getFileExtension($filepath);
  1967. }
  1968. public static function getFileMime($filepath)
  1969. {
  1970. $fhandle = finfo_open(FILEINFO_MIME);
  1971. $mime_type = finfo_file($fhandle, $filepath);
  1972. $mime_type_chunks = preg_split('/\s+/', $mime_type);
  1973. $mime_type = $mime_type_chunks[0];
  1974. $mime_type_chunks = explode(";", $mime_type);
  1975. $mime_type = $mime_type_chunks[0];
  1976. return $mime_type;
  1977. }
  1978. public static function getFileExtension($filepath)
  1979. {
  1980. return strtolower(pathinfo($filepath, PATHINFO_EXTENSION));
  1981. }
  1982. //
  1983. // Debugging output
  1984. //
  1985. function debug()
  1986. {
  1987. print("File name: ".$this->getName()."\n");
  1988. print("File location: ".$this->location->getDir(true, false, false, 0)."\n");
  1989. print("File size: ".$this->size."\n");
  1990. print("File modTime: ".$this->modTime."\n");
  1991. }
  1992. function isImage()
  1993. {
  1994. $type = $this->getType();
  1995. if($type == "png" || $type == "jpg" || $type == "gif" || $type == "jpeg")
  1996. return true;
  1997. return false;
  1998. }
  1999. function isPdf()
  2000. {
  2001. if(strtolower($this->getType()) == "pdf")
  2002. return true;
  2003. return false;
  2004. }
  2005. public static function isPdfFile($file)
  2006. {
  2007. if(File::getFileType($file) == "pdf")
  2008. return true;
  2009. return false;
  2010. }
  2011. function isValidForThumb()
  2012. {
  2013. if($this->isImage() || ($this->isPdf() && ImageServer::isEnabledPdf()))
  2014. return true;
  2015. return false;
  2016. }
  2017. }
  2018. class Location
  2019. {
  2020. var $path;
  2021. //
  2022. // Split a file path into array elements
  2023. //
  2024. public static function splitPath($dir)
  2025. {
  2026. $dir = stripslashes($dir);
  2027. $path1 = preg_split("/[\\\\\/]+/", $dir);
  2028. $path2 = array();
  2029. for($i = 0; $i < count($path1); $i++)
  2030. {
  2031. if($path1[$i] == ".." || $path1[$i] == "." || $path1[$i] == "")
  2032. continue;
  2033. $path2[] = $path1[$i];
  2034. }
  2035. return $path2;
  2036. }
  2037. //
  2038. // Get the current directory.
  2039. // Options: Include the prefix ("./"); URL-encode the string; HTML-encode the string; return directory n-levels up
  2040. //
  2041. function getDir($prefix, $encoded, $html, $up)
  2042. {
  2043. $dir = "";
  2044. if($prefix == true)
  2045. $dir .= "./";
  2046. for($i = 0; $i < ((count($this->path) >= $up && $up > 0)?count($this->path)-$up:count($this->path)); $i++)
  2047. {
  2048. $temp = $this->path[$i];
  2049. if($encoded)
  2050. $temp = rawurlencode($temp);
  2051. if($html)
  2052. $temp = htmlspecialchars($temp);
  2053. $dir .= $temp."/";
  2054. }
  2055. return $dir;
  2056. }
  2057. function getPathLink($i, $html)
  2058. {
  2059. if($html)
  2060. return htmlspecialchars($this->path[$i]);
  2061. else
  2062. return $this->path[$i];
  2063. }
  2064. function getFullPath()
  2065. {
  2066. return (strlen(EncodeExplorer::getConfig('basedir')) > 0?EncodeExplorer::getConfig('basedir'):dirname($_SERVER['SCRIPT_FILENAME']))."/".$this->getDir(true, false, false, 0);
  2067. }
  2068. //
  2069. // Debugging output
  2070. //
  2071. function debug()
  2072. {
  2073. print_r($this->path);
  2074. print("Dir with prefix: ".$this->getDir(true, false, false, 0)."\n");
  2075. print("Dir without prefix: ".$this->getDir(false, false, false, 0)."\n");
  2076. print("Upper dir with prefix: ".$this->getDir(true, false, false, 1)."\n");
  2077. print("Upper dir without prefix: ".$this->getDir(false, false, false, 1)."\n");
  2078. }
  2079. //
  2080. // Set the current directory
  2081. //
  2082. function init()
  2083. {
  2084. if(!isset($_GET['dir']) || strlen($_GET['dir']) == 0)
  2085. {
  2086. $this->path = $this->splitPath(EncodeExplorer::getConfig('starting_dir'));
  2087. }
  2088. else
  2089. {
  2090. $this->path = $this->splitPath($_GET['dir']);
  2091. }
  2092. }
  2093. //
  2094. // Checks if the current directory is below the input path
  2095. //
  2096. function isSubDir($checkPath)
  2097. {
  2098. for($i = 0; $i < count($this->path); $i++)
  2099. {
  2100. if(strcmp($this->getDir(true, false, false, $i), $checkPath) == 0)
  2101. return true;
  2102. }
  2103. return false;
  2104. }
  2105. //
  2106. // Check if uploading is allowed into the current directory, based on the configuration
  2107. //
  2108. function uploadAllowed()
  2109. {
  2110. if(EncodeExplorer::getConfig('upload_enable') != true)
  2111. return false;
  2112. if(EncodeExplorer::getConfig('upload_dirs') == null || count(EncodeExplorer::getConfig('upload_dirs')) == 0)
  2113. return true;
  2114. $upload_dirs = EncodeExplorer::getConfig('upload_dirs');
  2115. for($i = 0; $i < count($upload_dirs); $i++)
  2116. {
  2117. if($this->isSubDir($upload_dirs[$i]))
  2118. return true;
  2119. }
  2120. return false;
  2121. }
  2122. function isWritable()
  2123. {
  2124. return is_writable($this->getDir(true, false, false, 0));
  2125. }
  2126. public static function isDirWritable($dir)
  2127. {
  2128. return is_writable($dir);
  2129. }
  2130. public static function isFileWritable($file)
  2131. {
  2132. if(file_exists($file))
  2133. {
  2134. if(is_writable($file))
  2135. return true;
  2136. else
  2137. return false;
  2138. }
  2139. else if(Location::isDirWritable(dirname($file)))
  2140. return true;
  2141. else
  2142. return false;
  2143. }
  2144. }
  2145. class EncodeExplorer
  2146. {
  2147. var $location;
  2148. var $dirs;
  2149. var $files;
  2150. var $sort_by;
  2151. var $sort_as;
  2152. var $mobile;
  2153. var $logging;
  2154. var $spaceUsed;
  2155. var $lang;
  2156. //
  2157. // Determine sorting, calculate space.
  2158. //
  2159. function init()
  2160. {
  2161. $this->sort_by = "";
  2162. $this->sort_as = "";
  2163. if(isset($_GET["sort_by"]) && isset($_GET["sort_as"]))
  2164. {
  2165. if($_GET["sort_by"] == "name" || $_GET["sort_by"] == "size" || $_GET["sort_by"] == "mod")
  2166. if($_GET["sort_as"] == "asc" || $_GET["sort_as"] == "desc")
  2167. {
  2168. $this->sort_by = $_GET["sort_by"];
  2169. $this->sort_as = $_GET["sort_as"];
  2170. }
  2171. }
  2172. if(strlen($this->sort_by) <= 0 || strlen($this->sort_as) <= 0)
  2173. {
  2174. $this->sort_by = "name";
  2175. $this->sort_as = "desc";
  2176. }
  2177. global $_TRANSLATIONS;
  2178. if(isset($_GET['lang']) && isset($_TRANSLATIONS[$_GET['lang']]))
  2179. $this->lang = $_GET['lang'];
  2180. else
  2181. $this->lang = EncodeExplorer::getConfig("lang");
  2182. $this->mobile = false;
  2183. if(EncodeExplorer::getConfig("mobile_enabled") == true)
  2184. {
  2185. if((EncodeExplorer::getConfig("mobile_default") == true || isset($_GET['m'])) && !isset($_GET['s']))
  2186. $this->mobile = true;
  2187. }
  2188. $this->logging = false;
  2189. if(EncodeExplorer::getConfig("log_file") != null && strlen(EncodeExplorer::getConfig("log_file")) > 0)
  2190. $this->logging = true;
  2191. }
  2192. //
  2193. // Read the file list from the directory
  2194. //
  2195. function readDir()
  2196. {
  2197. global $encodeExplorer;
  2198. //
  2199. // Reading the data of files and directories
  2200. //
  2201. if($open_dir = @opendir($this->location->getFullPath()))
  2202. {
  2203. $this->dirs = array();
  2204. $this->files = array();
  2205. while ($object = readdir($open_dir))
  2206. {
  2207. if($object != "." && $object != "..")
  2208. {
  2209. if(is_dir($this->location->getDir(true, false, false, 0)."/".$object))
  2210. {
  2211. if(!in_array($object, EncodeExplorer::getConfig('hidden_dirs')))
  2212. $this->dirs[] = new Dir($object, $this->location);
  2213. }
  2214. else if(!in_array($object, EncodeExplorer::getConfig('hidden_files')))
  2215. $this->files[] = new File($object, $this->location);
  2216. }
  2217. }
  2218. closedir($open_dir);
  2219. }
  2220. else
  2221. {
  2222. $encodeExplorer->setErrorString("unable_to_read_dir");;
  2223. }
  2224. }
  2225. //
  2226. // A recursive function for calculating the total used space
  2227. //
  2228. function sum_dir($start_dir, $ignore_files, $levels = 1)
  2229. {
  2230. if ($dir = opendir($start_dir))
  2231. {
  2232. $total = 0;
  2233. while ((($file = readdir($dir)) !== false))
  2234. {
  2235. if (!in_array($file, $ignore_files))
  2236. {
  2237. if ((is_dir($start_dir . '/' . $file)) && ($levels - 1 >= 0))
  2238. {
  2239. $total += $this->sum_dir($start_dir . '/' . $file, $ignore_files, $levels-1);
  2240. }
  2241. elseif (is_file($start_dir . '/' . $file))
  2242. {
  2243. $total += File::getFileSize($start_dir . '/' . $file) / 1024;
  2244. }
  2245. }
  2246. }
  2247. closedir($dir);
  2248. return $total;
  2249. }
  2250. }
  2251. function calculateSpace()
  2252. {
  2253. if(EncodeExplorer::getConfig('calculate_space_level') <= 0)
  2254. return;
  2255. $ignore_files = array('..', '.');
  2256. $start_dir = getcwd();
  2257. $spaceUsed = $this->sum_dir($start_dir, $ignore_files, EncodeExplorer::getConfig('calculate_space_level'));
  2258. $this->spaceUsed = round($spaceUsed/1024, 3);
  2259. }
  2260. function sort()
  2261. {
  2262. if(is_array($this->files)){
  2263. usort($this->files, "EncodeExplorer::cmp_".$this->sort_by);
  2264. if($this->sort_as == "desc")
  2265. $this->files = array_reverse($this->files);
  2266. }
  2267. if(is_array($this->dirs)){
  2268. usort($this->dirs, "EncodeExplorer::cmp_name");
  2269. if($this->sort_by == "name" && $this->sort_as == "desc")
  2270. $this->dirs = array_reverse($this->dirs);
  2271. }
  2272. }
  2273. function makeArrow($sort_by)
  2274. {
  2275. if($this->sort_by == $sort_by && $this->sort_as == "asc")
  2276. {
  2277. $sort_as = "desc";
  2278. $img = "arrow_up";
  2279. }
  2280. else
  2281. {
  2282. $sort_as = "asc";
  2283. $img = "arrow_down";
  2284. }
  2285. if($sort_by == "name")
  2286. $text = $this->getString("file_name");
  2287. else if($sort_by == "size")
  2288. $text = $this->getString("size");
  2289. else if($sort_by == "mod")
  2290. $text = $this->getString("last_changed");
  2291. return "<a href=\"".$this->makeLink(false, false, $sort_by, $sort_as, null, $this->location->getDir(false, true, false, 0))."\">
  2292. $text <img style=\"border:0;\" alt=\"".$sort_as."\" src=\"?img=".$img."\" /></a>";
  2293. }
  2294. function makeLink($switchVersion, $logout, $sort_by, $sort_as, $delete, $dir)
  2295. {
  2296. $link = "?";
  2297. if($switchVersion == true && EncodeExplorer::getConfig("mobile_enabled") == true)
  2298. {
  2299. if($this->mobile == false)
  2300. $link .= "m&amp;";
  2301. else
  2302. $link .= "s&amp;";
  2303. }
  2304. else if($this->mobile == true && EncodeExplorer::getConfig("mobile_enabled") == true && EncodeExplorer::getConfig("mobile_default") == false)
  2305. $link .= "m&amp;";
  2306. else if($this->mobile == false && EncodeExplorer::getConfig("mobile_enabled") == true && EncodeExplorer::getConfig("mobile_default") == true)
  2307. $link .= "s&amp;";
  2308. if($logout == true)
  2309. {
  2310. $link .= "logout";
  2311. return $link;
  2312. }
  2313. if(isset($this->lang) && $this->lang != EncodeExplorer::getConfig("lang"))
  2314. $link .= "lang=".$this->lang."&amp;";
  2315. if($sort_by != null && strlen($sort_by) > 0)
  2316. $link .= "sort_by=".$sort_by."&amp;";
  2317. if($sort_as != null && strlen($sort_as) > 0)
  2318. $link .= "sort_as=".$sort_as."&amp;";
  2319. $link .= "dir=".$dir;
  2320. if($delete != null)
  2321. $link .= "&amp;del=".$delete;
  2322. return $link;
  2323. }
  2324. function makeIcon($l)
  2325. {
  2326. $l = strtolower($l);
  2327. return "?img=".$l;
  2328. }
  2329. function formatModTime($time)
  2330. {
  2331. $timeformat = "d.m.y H:i:s";
  2332. if(EncodeExplorer::getConfig("time_format") != null && strlen(EncodeExplorer::getConfig("time_format")) > 0)
  2333. $timeformat = EncodeExplorer::getConfig("time_format");
  2334. return date($timeformat, $time);
  2335. }
  2336. function formatSize($size)
  2337. {
  2338. $sizes = Array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');
  2339. $y = $sizes[0];
  2340. for ($i = 1; (($i < count($sizes)) && ($size >= 1024)); $i++)
  2341. {
  2342. $size = $size / 1024;
  2343. $y = $sizes[$i];
  2344. }
  2345. return round($size, 2)." ".$y;
  2346. }
  2347. //
  2348. // Debugging output
  2349. //
  2350. function debug()
  2351. {
  2352. print("Explorer location: ".$this->location->getDir(true, false, false, 0)."\n");
  2353. for($i = 0; $i < count($this->dirs); $i++)
  2354. $this->dirs[$i]->output();
  2355. for($i = 0; $i < count($this->files); $i++)
  2356. $this->files[$i]->output();
  2357. }
  2358. //
  2359. // Comparison functions for sorting.
  2360. //
  2361. public static function cmp_name($b, $a)
  2362. {
  2363. return strcasecmp($a->name, $b->name);
  2364. }
  2365. public static function cmp_size($a, $b)
  2366. {
  2367. return ($a->size - $b->size);
  2368. }
  2369. public static function cmp_mod($b, $a)
  2370. {
  2371. return ($a->modTime - $b->modTime);
  2372. }
  2373. //
  2374. // The function for getting a translated string.
  2375. // Falls back to english if the correct language is missing something.
  2376. //
  2377. public static function getLangString($stringName, $lang)
  2378. {
  2379. global $_TRANSLATIONS;
  2380. if(isset($_TRANSLATIONS[$lang]) && is_array($_TRANSLATIONS[$lang])
  2381. && isset($_TRANSLATIONS[$lang][$stringName]))
  2382. return $_TRANSLATIONS[$lang][$stringName];
  2383. else if(isset($_TRANSLATIONS["en"]))// && is_array($_TRANSLATIONS["en"])
  2384. //&& isset($_TRANSLATIONS["en"][$stringName]))
  2385. return $_TRANSLATIONS["en"][$stringName];
  2386. else
  2387. return "Translation error";
  2388. }
  2389. function getString($stringName)
  2390. {
  2391. return EncodeExplorer::getLangString($stringName, $this->lang);
  2392. }
  2393. //
  2394. // The function for getting configuration values
  2395. //
  2396. public static function getConfig($name)
  2397. {
  2398. global $_CONFIG;
  2399. if(isset($_CONFIG) && isset($_CONFIG[$name]))
  2400. return $_CONFIG[$name];
  2401. return null;
  2402. }
  2403. public static function setError($message)
  2404. {
  2405. global $_ERROR;
  2406. if(isset($_ERROR) && strlen($_ERROR) > 0)
  2407. ;// keep the first error and discard the rest
  2408. else
  2409. $_ERROR = $message;
  2410. }
  2411. function setErrorString($stringName)
  2412. {
  2413. EncodeExplorer::setError($this->getString($stringName));
  2414. }
  2415. //
  2416. // Main function, activating tasks
  2417. //
  2418. function run($location)
  2419. {
  2420. $this->location = $location;
  2421. $this->calculateSpace();
  2422. $this->readDir();
  2423. $this->sort();
  2424. $this->outputHtml();
  2425. }
  2426. public function printLoginBox()
  2427. {
  2428. ?>
  2429. <div id="login">
  2430. <form enctype="multipart/form-data" action="<?php print $this->makeLink(false, false, null, null, null, ""); ?>" method="post">
  2431. <?php
  2432. if(GateKeeper::isLoginRequired())
  2433. {
  2434. $require_username = false;
  2435. foreach(EncodeExplorer::getConfig("users") as $user){
  2436. if($user[0] != null && strlen($user[0]) > 0){
  2437. $require_username = true;
  2438. break;
  2439. }
  2440. }
  2441. if($require_username)
  2442. {
  2443. ?>
  2444. <div><label for="user_name"><?php print $this->getString("username"); ?>:</label>
  2445. <input type="text" name="user_name" value="" id="user_name" /></div>
  2446. <?php
  2447. }
  2448. ?>
  2449. <div><label for="user_pass"><?php print $this->getString("password"); ?>:</label>
  2450. <input type="password" name="user_pass" id="user_pass" /></div>
  2451. <div><input type="submit" value="<?php print $this->getString("log_in"); ?>" class="button" /></div>
  2452. </form>
  2453. </div>
  2454. <?php
  2455. }
  2456. }
  2457. //
  2458. // Printing the actual page
  2459. //
  2460. function outputHtml()
  2461. {
  2462. global $_ERROR;
  2463. global $_START_TIME;
  2464. ?>
  2465. <!DOCTYPE HTML>
  2466. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $this->getConfig('lang'); ?>" lang="<?php print $this->getConfig('lang'); ?>">
  2467. <head>
  2468. <meta name="viewport" content="width=device-width" />
  2469. <meta http-equiv="Content-Type" content="text/html; charset=<?php print $this->getConfig('charset'); ?>">
  2470. <?php css(); ?>
  2471. <!-- <meta charset="<?php print $this->getConfig('charset'); ?>" /> -->
  2472. <?php
  2473. if(($this->getConfig('log_file') != null && strlen($this->getConfig('log_file')) > 0)
  2474. || ($this->getConfig('thumbnails') != null && $this->getConfig('thumbnails') == true && $this->mobile == false)
  2475. || (GateKeeper::isDeleteAllowed()))
  2476. {
  2477. ?>
  2478. <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
  2479. <script type="text/javascript">
  2480. //<![CDATA[
  2481. $(document).ready(function() {
  2482. <?php
  2483. if(GateKeeper::isDeleteAllowed()){
  2484. ?>
  2485. $('td.del a').click(function(){
  2486. var answer = confirm('Are you sure you want to delete : \'' + $(this).attr("data-name") + "\' ?");
  2487. return answer;
  2488. });
  2489. <?php
  2490. }
  2491. if($this->logging == true)
  2492. {
  2493. ?>
  2494. function logFileClick(path)
  2495. {
  2496. $.ajax({
  2497. async: false,
  2498. type: "POST",
  2499. data: {log: path},
  2500. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  2501. cache: false
  2502. });
  2503. }
  2504. $("a.file").click(function(){
  2505. logFileClick("<?php print $this->location->getDir(true, true, false, 0);?>" + $(this).html());
  2506. return true;
  2507. });
  2508. <?php
  2509. }
  2510. if(EncodeExplorer::getConfig("thumbnails") == true && $this->mobile == false)
  2511. {
  2512. ?>
  2513. function positionThumbnail(e) {
  2514. xOffset = 30;
  2515. yOffset = 10;
  2516. $("#thumb").css("left",(e.clientX + xOffset) + "px");
  2517. diff = 0;
  2518. if(e.clientY + $("#thumb").height() > $(window).height())
  2519. diff = e.clientY + $("#thumb").height() - $(window).height();
  2520. $("#thumb").css("top",(e.pageY - yOffset - diff) + "px");
  2521. }
  2522. $("a.thumb").hover(function(e){
  2523. $("#thumb").remove();
  2524. $("body").append("<div id=\"thumb\"><img src=\"?thumb="+ $(this).attr("href") +"\" alt=\"Preview\" \/><\/div>");
  2525. positionThumbnail(e);
  2526. $("#thumb").fadeIn("medium");
  2527. },
  2528. function(){
  2529. $("#thumb").remove();
  2530. });
  2531. $("a.thumb").mousemove(function(e){
  2532. positionThumbnail(e);
  2533. });
  2534. $("a.thumb").click(function(e){$("#thumb").remove(); return true;});
  2535. <?php
  2536. }
  2537. ?>
  2538. });
  2539. //]]>
  2540. </script>
  2541. <?php
  2542. }
  2543. ?>
  2544. <title><?php if(EncodeExplorer::getConfig('main_title') != null) print EncodeExplorer::getConfig('main_title'); ?></title>
  2545. </head>
  2546. <body class="<?php print ($this->mobile == true?"mobile":"standard");?>">
  2547. <?php
  2548. //
  2549. // Print the error (if there is something to print)
  2550. //
  2551. if(isset($_ERROR) && strlen($_ERROR) > 0)
  2552. {
  2553. print "<div id=\"error\">".$_ERROR."</div>";
  2554. }
  2555. ?>
  2556. <div id="frame">
  2557. <?php
  2558. if(EncodeExplorer::getConfig('show_top') == true)
  2559. {
  2560. ?>
  2561. <div id="top">
  2562. <a href="<?php print $this->makeLink(false, false, null, null, null, ""); ?>"><span><?php if(EncodeExplorer::getConfig('main_title') != null) print EncodeExplorer::getConfig('main_title'); ?></span></a>
  2563. <?php
  2564. if(EncodeExplorer::getConfig("secondary_titles") != null && is_array(EncodeExplorer::getConfig("secondary_titles")) && count(EncodeExplorer::getConfig("secondary_titles")) > 0 && $this->mobile == false)
  2565. {
  2566. $secondary_titles = EncodeExplorer::getConfig("secondary_titles");
  2567. print "<div class=\"subtitle\">".$secondary_titles[array_rand($secondary_titles)]."</div>\n";
  2568. }
  2569. ?>
  2570. </div>
  2571. <?php
  2572. }
  2573. // Checking if the user is allowed to access the page, otherwise showing the login box
  2574. if(!GateKeeper::isAccessAllowed())
  2575. {
  2576. $this->printLoginBox();
  2577. }
  2578. else
  2579. {
  2580. if($this->mobile == false && EncodeExplorer::getConfig("show_path") == true)
  2581. {
  2582. ?>
  2583. <div class="breadcrumbs">
  2584. <a href="?dir="><?php print $this->getString("root"); ?></a>
  2585. <?php
  2586. for($i = 0; $i < count($this->location->path); $i++)
  2587. {
  2588. print "&gt; <a href=\"".$this->makeLink(false, false, null, null, null, $this->location->getDir(false, true, false, count($this->location->path) - $i - 1))."\">";
  2589. print $this->location->getPathLink($i, true);
  2590. print "</a>\n";
  2591. }
  2592. ?>
  2593. </div>
  2594. <?php
  2595. }
  2596. ?>
  2597. <!-- START: List table -->
  2598. <table class="table">
  2599. <?php
  2600. if($this->mobile == false)
  2601. {
  2602. ?>
  2603. <tr class="row one header">
  2604. <td class="icon"> </td>
  2605. <td class="name"><?php print $this->makeArrow("name");?></td>
  2606. <td class="size"><?php print $this->makeArrow("size"); ?></td>
  2607. <td class="changed"><?php print $this->makeArrow("mod"); ?></td>
  2608. <?php if($this->mobile == false && GateKeeper::isDeleteAllowed()){?>
  2609. <td class="del"><?php print EncodeExplorer::getString("del"); ?></td>
  2610. <?php } ?>
  2611. </tr>
  2612. <?php
  2613. }
  2614. ?>
  2615. <tr class="row two">
  2616. <td class="icon"><img alt="dir" src="?img=directory" /></td>
  2617. <td colspan="<?php print (($this->mobile == true?2:(GateKeeper::isDeleteAllowed()?4:3))); ?>" class="long">
  2618. <a class="item" href="<?php print $this->makeLink(false, false, null, null, null, $this->location->getDir(false, true, false, 1)); ?>">..</a>
  2619. </td>
  2620. </tr>
  2621. <?php
  2622. //
  2623. // Ready to display folders and files.
  2624. //
  2625. $row = 1;
  2626. //
  2627. // Folders first
  2628. //
  2629. if($this->dirs)
  2630. {
  2631. foreach ($this->dirs as $dir)
  2632. {
  2633. $row_style = ($row ? "one" : "two");
  2634. print "<tr class=\"row ".$row_style."\">\n";
  2635. print "<td class=\"icon\"><img alt=\"dir\" src=\"?img=directory\" /></td>\n";
  2636. print "<td class=\"name\" colspan=\"".($this->mobile == true?2:3)."\">\n";
  2637. print "<a href=\"".$this->makeLink(false, false, null, null, null, $this->location->getDir(false, true, false, 0).$dir->getNameEncoded())."\" class=\"item dir\">";
  2638. print $dir->getNameHtml();
  2639. print "</a>\n";
  2640. print "</td>\n";
  2641. if($this->mobile == false && GateKeeper::isDeleteAllowed()){
  2642. print "<td class=\"del\"><a data-name=\"".htmlentities($dir->getName())."\" href=\"".$this->makeLink(false, false, null, null, $this->location->getDir(false, true, false, 0).$dir->getNameEncoded(), $this->location->getDir(false, true, false, 0))."\"><img src=\"?img=del\" alt=\"Delete\" /></a></td>";
  2643. }
  2644. print "</tr>\n";
  2645. $row =! $row;
  2646. }
  2647. }
  2648. //
  2649. // Now the files
  2650. //
  2651. if($this->files)
  2652. {
  2653. $count = 0;
  2654. foreach ($this->files as $file)
  2655. {
  2656. $row_style = ($row ? "one" : "two");
  2657. print "<tr class=\"row ".$row_style.(++$count == count($this->files)?" last":"")."\">\n";
  2658. print "<td class=\"icon\"><img alt=\"".$file->getType()."\" src=\"".$this->makeIcon($file->getType())."\" /></td>\n";
  2659. print "<td class=\"name\">\n";
  2660. print "\t\t<a href=\"".$this->location->getDir(false, true, false, 0).$file->getNameEncoded()."\"";
  2661. if(EncodeExplorer::getConfig('open_in_new_window') == true)
  2662. print "target=\"_blank\"";
  2663. print " class=\"item file";
  2664. if($file->isValidForThumb())
  2665. print " thumb";
  2666. print "\">";
  2667. print $file->getNameHtml();
  2668. if($this->mobile == true)
  2669. {
  2670. print "<span class =\"size\">".$this->formatSize($file->getSize())."</span>";
  2671. }
  2672. print "</a>\n";
  2673. print "</td>\n";
  2674. if($this->mobile != true)
  2675. {
  2676. print "<td class=\"size\">".$this->formatSize($file->getSize())."</td>\n";
  2677. print "<td class=\"changed\">".$this->formatModTime($file->getModTime())."</td>\n";
  2678. }
  2679. if($this->mobile == false && GateKeeper::isDeleteAllowed()){
  2680. print "<td class=\"del\">
  2681. <a data-name=\"".htmlentities($file->getName())."\" href=\"".$this->makeLink(false, false, null, null, $this->location->getDir(false, true, false, 0).$file->getNameEncoded(), $this->location->getDir(false, true, false, 0))."\">
  2682. <img src=\"?img=del\" alt=\"Delete\" />
  2683. </a>
  2684. </td>";
  2685. }
  2686. print "</tr>\n";
  2687. $row =! $row;
  2688. }
  2689. }
  2690. //
  2691. // The files and folders have been displayed
  2692. //
  2693. ?>
  2694. </table>
  2695. <!-- END: List table -->
  2696. <?php
  2697. }
  2698. ?>
  2699. </div>
  2700. <?php
  2701. if(GateKeeper::isAccessAllowed() && GateKeeper::showLoginBox()){
  2702. ?>
  2703. <!-- START: Login area -->
  2704. <form enctype="multipart/form-data" method="post">
  2705. <div id="login_bar">
  2706. <?php print $this->getString("username"); ?>:
  2707. <input type="text" name="user_name" value="" id="user_name" />
  2708. <?php print $this->getString("password"); ?>:
  2709. <input type="password" name="user_pass" id="user_pass" />
  2710. <input type="submit" class="submit" value="<?php print $this->getString("log_in"); ?>" />
  2711. <div class="bar"></div>
  2712. </div>
  2713. </form>
  2714. <!-- END: Login area -->
  2715. <?php
  2716. }
  2717. if(GateKeeper::isAccessAllowed() && $this->location->uploadAllowed() && (GateKeeper::isUploadAllowed() || GateKeeper::isNewdirAllowed()))
  2718. {
  2719. ?>
  2720. <!-- START: Upload area -->
  2721. <form enctype="multipart/form-data" method="post">
  2722. <div id="upload">
  2723. <?php
  2724. if(GateKeeper::isNewdirAllowed()){
  2725. ?>
  2726. <div id="newdir_container">
  2727. <input name="userdir" type="text" class="upload_dirname" />
  2728. <input type="submit" value="<?php print $this->getString("make_directory"); ?>" />
  2729. </div>
  2730. <?php
  2731. }
  2732. if(GateKeeper::isUploadAllowed()){
  2733. ?>
  2734. <div id="upload_container">
  2735. <input name="userfile" type="file" class="upload_file" />
  2736. <input type="submit" value="<?php print $this->getString("upload"); ?>" class="upload_sumbit" />
  2737. </div>
  2738. <?php
  2739. }
  2740. ?>
  2741. <div class="bar"></div>
  2742. </div>
  2743. </form>
  2744. <!-- END: Upload area -->
  2745. <?php
  2746. }
  2747. ?>
  2748. <!-- START: Info area -->
  2749. <div id="info">
  2750. <?php
  2751. if(GateKeeper::isUserLoggedIn())
  2752. print "<a href=\"".$this->makeLink(false, true, null, null, null, "")."\">".$this->getString("log_out")."</a> | ";
  2753. if(EncodeExplorer::getConfig("mobile_enabled") == true)
  2754. {
  2755. print "<a href=\"".$this->makeLink(true, false, null, null, null, $this->location->getDir(false, true, false, 0))."\">\n";
  2756. print ($this->mobile == true)?$this->getString("standard_version"):$this->getString("mobile_version")."\n";
  2757. print "</a> | \n";
  2758. }
  2759. if(GateKeeper::isAccessAllowed() && $this->getConfig("calculate_space_level") > 0 && $this->mobile == false)
  2760. {
  2761. print $this->getString("total_used_space").": ".$this->spaceUsed." MB | ";
  2762. }
  2763. if($this->mobile == false && $this->getConfig("show_load_time") == true)
  2764. {
  2765. printf($this->getString("page_load_time")." | ", (microtime(TRUE) - $_START_TIME)*1000);
  2766. }
  2767. ?>
  2768. <a href="http://encode-explorer.siineiolekala.net">Encode Explorer</a>
  2769. </div>
  2770. <!-- END: Info area -->
  2771. </body>
  2772. </html>
  2773. <?php
  2774. }
  2775. }
  2776. //
  2777. // This is where the system is activated.
  2778. // We check if the user wants an image and show it. If not, we show the explorer.
  2779. //
  2780. $encodeExplorer = new EncodeExplorer();
  2781. $encodeExplorer->init();
  2782. GateKeeper::init();
  2783. if(!ImageServer::showImage() && !Logger::logQuery())
  2784. {
  2785. $location = new Location();
  2786. $location->init();
  2787. if(GateKeeper::isAccessAllowed())
  2788. {
  2789. Logger::logAccess($location->getDir(true, false, false, 0), true);
  2790. $fileManager = new FileManager();
  2791. $fileManager->run($location);
  2792. }
  2793. $encodeExplorer->run($location);
  2794. }
  2795. ?>