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