KH454M3

encode-explorer-filemanager.php

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