Index: !install.txt
===================================================================
--- !install.txt	(revision fbc3369abde946a919e6c00b3dd10c2e5cb7d35b)
+++ !install.txt	(revision 49fafb4c4b73ded67f75984b08c402355a202a61)
@@ -9,5 +9,5 @@
 installation:
 
-make, libcurl-openssl-dev, pkg-config, sigc++-2.0-dev, libncurses-dev
+you might need the following packages: make, libcurl-openssl-dev, pkg-config, sigc++-2.0-dev, libncurses-dev
 
 to install xmlrpc, get the source from here: http://sourceforge.net/project/showfiles.php?group_id=16847
@@ -25,7 +25,7 @@
 to install libtorrent, follow the next steps, as root:
 	mkdir /usr/src/libtorrent
-	wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.11.8.tar.gz
-	tar xvf libtorrent-0.11.8.tar.gz
-	cd /usr/src/libtorrent-0.11.8
+	wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.11.9.tar.gz
+	tar xvf libtorrent-0.11.9.tar.gz
+	cd /usr/src/libtorrent-0.11.9
 	./configure
 	make
@@ -34,7 +34,7 @@
 to install rtorrent, follow the next steps, as root:
 	mkdir /usr/src/rtorrent
-	wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.7.8.tar.gz
-	tar xvf rtorrent-0.7.8.tar.gz
-	cd /usr/src/rtorrent-0.7.8
+	wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.7.9.tar.gz
+	tar xvf rtorrent-0.7.9.tar.gz
+	cd /usr/src/rtorrent-0.7.9
 	./configure --with-xmlrpc-c
 	make
@@ -60,5 +60,5 @@
 
 adding users:
- -find row 44, and change it:
+ -find row 32, and change it:
  -replace "userX" with the actual linux username
  -replace "1234567890abcdef1234567890abcdef12345678" with the sha1 hash of the choosen password for the webui (you can generate the sha1 hash here => http://www.johnmaguire.us/tools/hashcalc/index.php)
@@ -71,8 +71,4 @@
 		"user3"		=> array( "pass" => "1234567890abcdef1234567890abcdef12345678", "port"	=> "12347" ),
 	);
-
--all users, using this webui will need an "!rtwi_files" directory into their download directory (set by "directory = some/path" in the .rtorrent.rc) with 0777 rights
--the download directory should be inside your home directory (this might change later, as soon as i find out something secure)
-
 
 troubleshooting:
Index: includes/classes/xsl_handler.inc.php
===================================================================
--- includes/classes/xsl_handler.inc.php	(revision fbc3369abde946a919e6c00b3dd10c2e5cb7d35b)
+++ includes/classes/xsl_handler.inc.php	(revision 49fafb4c4b73ded67f75984b08c402355a202a61)
@@ -21,6 +21,9 @@
 		$this->content->importStyleSheet( $xsl );
 
-//print $this->page_data->saveXML(); exit;
 		$this->xml_data = $this->content->transformToXML( $this->page_data );
+	}
+
+	function parse_c() {
+		$this->xml_data = $this->page_data->saveXML();
 	}
 
@@ -31,4 +34,9 @@
 	}
 
+	function fetch_c() {
+		$this->xml_data = preg_replace( "/\<\?xml( version=\"[\d\.]+\")*( encoding=\".*\")*\?\>[\\r\\n]*/", "\\0<?xml-stylesheet type=\"text/xsl\" href=\"themes/{$this->theme}/{$this->main_file}\"?>\r\n", $this->xml_data );
+		return $this->xml_data;
+	}
+
 }
 
Index: includes/config.inc.php
===================================================================
--- includes/config.inc.php	(revision fbc3369abde946a919e6c00b3dd10c2e5cb7d35b)
+++ includes/config.inc.php	(revision 49fafb4c4b73ded67f75984b08c402355a202a61)
@@ -5,20 +5,9 @@
 *******************************/
 
-// default extension for php files (html/php)
-$default_ext = "html";
-
-// paths
-$abs_path	= "/var/www";			// webroot (with heading slash) -- change this, if neccessary
-$domain		= "rtwi.cyla.homelinux.net";	// site domain (or ip) -- change this, if neccessary
-$site_path	= "/";				// site path (with heading and trailing slash) -- change this, if neccessary
-$include_path	= "includes";			// include path (include files can be found here)
-
 // URLs
-$url = array(
-	"base"	=> "http://{$domain}{$site_path}",		// base url
-	"index"	=> "index.{$default_ext}",			// index page
-	"input"	=> "input.php",					// input file (for forms)
-);
-$url["full"] = 	"{$url["base"]}/index.{$default_ext}";		// absolute url, of the index page
+$url["base"]	= "http://rtwi.cyla.homelinux.net/";	// base url
+$url["index"]	= "index.html";				// index page
+$url["input"]	= "input.php";				// input file (for forms)
+$url["full"]	= "{$url["base"]}/{$url["index"]}";	// absolute url of the index page
 
 /*******************************
@@ -41,8 +30,5 @@
 // array of users, each, with the sha1 hash of the password, and the scgi port of the rtorrent -- you can add users here
 $users = array(
-//	"username"		=> array( "pass" => "7e240de74fb1ed08fa08d38063f6a6a91462a815", "port"	=> "36100" ),
-	"cyla"		=> array( "pass" => "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8", "port"	=> "36100" ),
-	"freez"		=> array( "pass" => "3c6ac60db4ea17076ddd3e044799e70832916837", "port"	=> "36099" ),
-	"pilok"		=> array( "pass" => "bbe31b37f154f7eadbc657d4187e79122592cd13", "port"	=> "36098" ),
+	"user1"	=> array( "pass" => "7e240de74fb1ed08fa08d38063f6a6a91462a815", "port"	=> "36100" ),
 );
 
@@ -51,9 +37,31 @@
 *******************************/
 
-// umask for new files - set this to "0000" (keep the quotes) if you want to remove the files when erasing a torrent - also need to change download directory permissions (see the manual)
-$torrents_umask = "0000";
+// do a directory tree - set to false (witouth the quotes), if your webserver is running on a slow machine, and you have torrents with a lots of files (a few hundreds)
+$config["dodirtree"] = true;
 
-// do a directory tree - set to "false" (witouth the quotes), if your webserver is running on a slow machine, and you have torrents with a lots of files (a few hundreds)
-$dodirtree = false;
+// true if ajax is allowed
+$config["allow"]["ajax"] = true;
+
+// true if dht is enabled
+$config["allow"]["dht"] = true;
+
+// true if users are allowed to download finished files from the webui
+$config["allow"]["download"] = true;
+
+// true if users are allowed to erase downloaded data from the webui
+$config["allow"]["erase"] = true;
+
+// true if hiding the filelist is allowed
+$config["allow"]["hidedirtree"] = true;
+
+// true if users are allowed to set a meta-refresh interval
+$config["allow"]["refresh"] = true;
+
+// true if users are allowed to set throttle
+$config["allow"]["throttle"] = true;
+
+/*******************************
+* theme and lingual settings
+*******************************/
 
 // language (only english is available atm)
Index: includes/messages.en.inc.php
===================================================================
--- includes/messages.en.inc.php	(revision fbc3369abde946a919e6c00b3dd10c2e5cb7d35b)
+++ includes/messages.en.inc.php	(revision 49fafb4c4b73ded67f75984b08c402355a202a61)
@@ -10,10 +10,12 @@
 	"nohashfound"				=> "No torrents found for this hash",
 	"noidfound"				=> "No id was given",
+	"nodirfound"				=> "No directory was given",
 	"noinputmod"				=> "No mod was specified",
 	"nooponalltorrent"			=> "No task was given",
 
+	"badidfound"				=> "Invalid id was given",
+	"baddirfound"				=> "Invalid directory was given",
+
 	"notanurl"				=> "Not valid URL was given",
-	"notrtfdircreated"			=> "You MUST have an \"!rtwi_files\" (without quotes) directory with 0777 rights in your rTorrent download directory",
-	"notrtfdirwriteright"			=> "The \"!rtwi_files\" directory in your rTorrent download directory MUST have 0777 rights",
 	"rtfileinisize"				=> "The uploaded file exceeds the upload_max_filesize directive in php.ini",
 	"rtfileformsize"			=> "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form",
@@ -23,4 +25,8 @@
 	"rtfilenowrite"				=> "Failed to write file to disk",
 	"rtfileother"				=> "Upload error",
+	"rtfileattack"				=> "Possible file upload attack!",
+
+	"badthrottlevals"			=> "Invalid values for throttle",
+	"succthrottlechange"			=> "Throttle changed",
 
 	"badrtdirectory"			=> "rTorrent download directry is not set correctly",
@@ -50,11 +56,19 @@
 	"succtorrentsremove"			=> "Torrents removed",
 	"succtorrenterase"			=> "Torrent erased",
-	"warntorrenterase"			=> "Torrent erased, but not all the files removed",
+	"warntorrenterase"			=> "Torrent erased, but not all the files were removed",
 	"succtorrentserase"			=> "Torrents erased",
 	"succprioritychange"			=> "Torrent priority changed",
 	"succfileprioritychange"		=> "File priority changed",
+	"succdirprioritychange"			=> "Directory priority changed",
 	"succtrackerenabledchange"		=> "Tracker availablity changed",
 	"succviewchange"			=> "View changed",
 	"succrefreshchange"			=> "Refresh rate changed",
+	"succdhtstart"				=> "DHT server started",
+	"succdhtstop"				=> "DHT server stopped",
+
+	"downloadnotallowed"			=> "You are not allowed to download torrents from the webui",
+	"erasenotallowed"			=> "You are not allowed to erase downloaded data from the webui",
+	"refreshnotallowed"			=> "You are not allowed to set a meta-refresh interval",
+	"throttlenotallowed"			=> "You are not allowed to set throttle",
 
 	"viewtype_main"				=> "Main",
@@ -66,17 +80,4 @@
 	"viewtype_hashing"			=> "Hashing",
 	"viewtype_seeding"			=> "Seeding",
-
-	"refreshrate_0"				=> "Off",
-	"refreshrate_5"				=> "5 secs",
-	"refreshrate_10"			=> "10 secs",
-	"refreshrate_30"			=> "30 secs",
-	"refreshrate_60"			=> "1 minute",
-	"refreshrate_120"			=> "2 minutes",
-	"refreshrate_180"			=> "3 minutes",
-	"refreshrate_300"			=> "5 minutes",
-	"refreshrate_600"			=> "10 minutes",
-	"refreshrate_1200"			=> "20 minutes",
-	"refreshrate_1800"			=> "30 minutes",
-	"refreshrate_3600"			=> "1 hour",
 
 	"no"					=> "No",
@@ -95,5 +96,5 @@
 	"d_hash_checked_1"			=> "Hash checked",
 	"d_multi_file_multi"			=> "Multi",
-	"d_multi_file_single"		=> "Single",
+	"d_multi_file_single"			=> "Single",
 	"d_open_0"				=> "Closed",
 	"d_open_1"				=> "Open",
@@ -124,13 +125,22 @@
 	"t_type_2"				=> "UDP",
 
-	"bind_0000"				=> "Not set",
-	"ip_0000"				=> "All IP addresses",
+	"bind_0000"				=> "All IP addresses",
+	"ip_0000"				=> "Not set",
 	"proxy_address_0000"			=> "Not set",
-
-	"pics"					=> "rTWi - The rTorrent Web interface",
-
 );
 
+$refresh = array(
+	"refreshrate_0"				=> "Off",
+	"refreshrate_60"			=> "1 minute",
+	"refreshrate_120"			=> "2 minutes",
+	"refreshrate_180"			=> "3 minutes",
+	"refreshrate_300"			=> "5 minutes",
+	"refreshrate_600"			=> "10 minutes",
+	"refreshrate_900"			=> "15 minutes",
+	"refreshrate_1200"			=> "20 minutes",
+);
+
 $label = array(
+	// html head
 	"title"					=> "rTWi - The rTorrent Web interface",
 	"description"				=> "rTWi - The rTorrent Web interface",
@@ -139,33 +149,30 @@
 	"mailto"				=> "ghudiczius@gmail.com?subject=rTWi - The rTorrent Web interface",
 
-	"torrents" 				=> "Torrents",
-	"peerlist" 				=> "Peer list",
-	"info" 					=> "Info",
-	"filelist" 				=> "File list",
-	"trackerlist" 				=> "Tracker list",
-	"chunksseen" 				=> "Chunks seen",
+	// login
+	"username"				=> "Username",
+	"password"				=> "Password",
+	"login"					=> "Login",
+
+	// menu
+	"torrents"				=> "Torrents",
+	"peerlist"				=> "Peer list",
+	"info"					=> "Info",
+	"filelist"				=> "File list",
+	"trackerlist"				=> "Tracker list",
+	"chunksseen"				=> "Chunks seen",
 	"transferlist"				=> "Transfer list",
-	"addtorrent" 				=> "Add torrent",
-	"logout" 				=> "Logout",
-
-	"clicktohide" 				=> "Click to hide",
-	"clicktoopen" 				=> "Click to open",
-
-	"openfrom" 				=> "Open from",
-	"fileupload" 				=> "File upload",
-	"url" 					=> "URL",
-	"torrentfile" 				=> "Torrent file",
-	"torrenturl" 				=> "Torrent URL",
-	"starttorrent" 				=> "Start torrent",
-	"starttorrentafteradded"		=> "Start torrent after added",
-	"downloadto" 				=> "Download to",
-
-	"throttle" 				=> "Throttle",
-	"off" 					=> "off",
-	"uploadlimit" 				=> "Upload limit",
-	"nouploadlimit" 			=> "No upload limit",
-	"downloadlimit" 			=> "Download limit",
-	"nodownloadlimit" 			=> "No download limit",
-	"rate"	 				=> "Rate",
+	"addtorrent"				=> "Add torrent",
+	"serverinfo"				=> "Server info",
+	"logout"				=> "Logout",
+
+	// misc
+	"ok"					=> "OK",
+	"yes"					=> "Yes",
+	"no"					=> "No",
+	
+	"clicktohide"				=> "Click to hide",
+	"clicktoopen"				=> "Click to open",
+	"clicktocloseopen"			=> "Click to close/open",
+	"clicktochange"				=> "Click to change",
 
 	"view"					=> "View",
@@ -174,4 +181,163 @@
 	"selectrefreshrate"			=> "Select refresh rate",
 
+	"areyousure"				=> "Are you sure?",
+	"areyousureerase"			=> "Are you sure? All downloaded data will be erased.",
+
+	// add torrent
+	"openfrom"				=> "Open from",
+	"fileupload"				=> "File upload",
+	"url"					=> "URL",
+	"torrentfile"				=> "Torrent file",
+	"torrenturl"				=> "Torrent URL",
+	"starttorrent"				=> "Start torrent",
+	"starttorrentafteradded"		=> "Start torrent after added",
+	"downloadto"				=> "Download to",
+
+	// tasks on torrents
+	"selecttask"				=> "Select task",
+	"selectone"				=> "Select one",
+
+	"startall"				=> "Start all",
+	"stopall"				=> "Stop all",
+	"openall"				=> "Open all",
+	"closeall"				=> "Close all",
+	"checkall"				=> "Check all",
+	"removeall"				=> "Remove all",
+	"eraseall"				=> "Erase all",
+
+	"start"					=> "Start",
+	"stop"					=> "Stop",
+	"open"					=> "Open",
+	"close"					=> "Close",
+	"checkhash"				=> "Check hash",
+	"remove"				=> "Remove",
+	"erase"					=> "Erase",
+
+	"selectpriority"			=> "Select priority",
+	"selectdirpriority"			=> "Select directory priority",
+	"selectfilepriority"			=> "Select file priority",
+
+	// torrent states
+	"started"				=> "Started",
+	"stopped"				=> "Stopped",
+	"opened"				=> "Opened",
+	"closed"				=> "Closed",
+	"finished"				=> "Finished",
+	"checkhashed"				=> "Hash checked",
+
+	"startedsince"				=> "Started since",
+	"stopedsince"				=> "Stoped since",
+	"openedsince"				=> "Opened since",
+	"closedsince"				=> "Closeed since",
+	"finishedsince"				=> "Finished since",
+	"hashingsince"				=> "Hashing since",
+
+	"sincepre"				=> "since",
+	"sincepost"				=> "",
+
+	// torrent stats
+	"details"				=> "Details",
+
+	"done"					=> "done",
+	"downloadfinished"			=> "Download finished",
+	"downloadeddata"			=> "Downloaded data",
+	"torrentsize"				=> "Torrent size",
+	"uploaded"				=> "Uploaded",
+	"uploadeddata"				=> "Uploaded data",
+
+	"percenthashed"				=> "percent hashed",
+	"percentcompleted"			=> "percent completed",
+	"estimatedtimeremaining"		=> "Estimated time remaining",
+	"ignorecommands"			=> "Ignore commands",
+	"ratio"					=> "Ratio",
+
+	"off"					=> "Off",
+	"low"					=> "Low",
+	"normal"				=> "Normal",
+	"high"					=> "High",
+
+	"message"				=> "Message",
+
+	"lasttouched"				=> "Last touched",
+	"filesize"				=> "File size",
+	"downloadfile"				=> "Download file",
+	"trackergroup"				=> "Tracker group",
+	"type"					=> "Type",
+	"selecttrackerenabled"			=> "Select if tracker is enabled",
+	"mininterval"				=> "Minimum interval",
+
+	// stats
+	"throttle"				=> "Throttle",
+	"uploadspeed"				=> "Upload speed",
+	"uploadlimit"				=> "Upload limit",
+	"nouploadlimit"				=> "No upload limit",
+	"downloadspeed"				=> "Download speed",
+	"downloadlimit"				=> "Download limit",
+	"nodownloadlimit"			=> "No download limit",
+	"rate"					=> "Rate",
+
+	// info page
+	"name"					=> "Name",
+	"infohash"				=> "Info hash",
+	"localid"				=> "Local ID",
+	"localidhtml"				=> "Local ID (html)",
+	"directory"				=> "Directory",
+	"tiedtofile"				=> "Tied to file",
+	"filestats"				=> "File stats",
+	"files"					=> "files",
+	"private"				=> "Private",
+	"chunks"				=> "Chunks",
+	"priority"				=> "Priority",
+	"statechanged"				=> "State changed",
+	"freediskspace"				=> "Free diskspace",
+	"connectiontype"			=> "Connection type",
+	"trackers"				=> "Trackers",
+	"leechers"				=> "Leechers",
+	"seeders"				=> "Seeders",
+	"pexenabled"				=> "PEX enabled",
+	"pexsize"				=> "PEX size",
+	"upload"				=> "Upload",
+	"download"				=> "Download",
+	"skipped"				=> "Skipped",
+
+	// server info page
+	"clientversion"				=> "Client version",
+	"libraryversion"			=> "Library version",
+	"workingdirectory"			=> "Working directory",
+	"downloaddirectory"			=> "Download directory",
+	"sessiondirectory"			=> "Session directory",
+	"hostname"				=> "Hostname",
+	"listeningipaddress"			=> "Listening IP address",
+	"reportedipaddress"			=> "IP address reported to the tracker",
+	"portopened"				=> "Port opened",
+	"randomport"				=> "Random port",
+	"portrange"				=> "Port range",
+	"changedhtstatus"			=> "Start/stop DHT server",
+	"dht"					=> "DHT server",
+	"dhtport"				=> "DHT port",
+	"dhtcycle"				=> "DHT cycle",
+	"dhtqueries"				=> "DHT queries received / sent",
+	"dhtreplies"				=> "DHT replies received",
+	"dhtbytes"				=> "DHT bytes read / written",
+	"dhtnodes"				=> "DHT nodes",
+	"in"					=> "in",
+	"buckets"				=> "buckets",
+	"dhtpeers"				=> "DHT peers",
+	"dhttorrents"				=> "DHT torrents",
+	"maxuploads"				=> "Maximum number of uploads",
+	"maxpeers"				=> "Minimum number of peers",
+	"minpeers"				=> "Maximum number of peers",
+	"memoryusage"				=> "Memory usage",
+	"maxmemoryusage"			=> "Max memory usage",
+	"hashcheck"				=> "Hash check",
+	"safesync"				=> "Safe sync",
+	"sendbuffer"				=> "Send buffer",
+	"receivebuffer"				=> "Receive buffer",
+
+	// tracker list page
+	"focus"					=> "Focus",
+	"enabled"				=> "Enabled",
+	"seedersleechers"			=> "S/L",
+	"lasttimescraped"			=> "Last time scraped",
 );
 
Index: includes/messages.hu.inc.php
===================================================================
--- includes/messages.hu.inc.php	(revision 49fafb4c4b73ded67f75984b08c402355a202a61)
+++ includes/messages.hu.inc.php	(revision 49fafb4c4b73ded67f75984b08c402355a202a61)
@@ -0,0 +1,344 @@
+<?php
+
+$message = array(
+	"badlogin"				=> "Hibás felhasználó, vagy jelszó",
+	"succlogin"				=> "Sikeres bejelentkezés",
+	"succlogout"				=> "Sikeres kijelentkezés",
+
+	"noconn"				=> "Nincs kapcsolat",
+
+	"nohashfound"				=> "Nincs ilyen torrent",
+	"noidfound"				=> "Nincs ID megadva",
+	"nodirfound"				=> "Nincs könyvtár megadva",
+	"noinputmod"				=> "Nincs funkció megadva",
+	"nooponalltorrent"			=> "Nincs feladat megadva",
+
+	"badidfound"				=> "Hibás ID",
+	"baddirfound"				=> "Hibás könyvtárnév",
+
+	"notanurl"				=> "Nincs URL megadva",
+	"rtfileinisize"				=> "A feltöltött fájl mérete meghaladja a PHP.ini-ben megengedett (upload_max_filesize) méretet",
+	"rtfileformsize"			=> "A feltöltött fájl mérete meghaladja a HTML űrlapon megengedett (MAX_FILE_SIZE) méretet",
+	"rtfilepartial"				=> "A fájl csak részlegesen került feltöltésre",
+	"rtfilenofile"				=> "Nem történt fájlfeltöltés",
+	"rtfilenotmpdir"			=> "Nincs megadva ideiglenes könyvtár",
+	"rtfilenowrite"				=> "Nem sikerült írni a lemezre",
+	"rtfileother"				=> "Feltöltési hiba",
+	"rtfileattack"				=> "Lehetséges támadás!",
+
+	"badthrottlevals"			=> "Hibás sebességkorlát érték",
+	"succthrottlechange"			=> "Sebességkorlát megváltoztatva",
+
+	"badrtdirectory"			=> "Az rTorrent letöltési könyvtár hibásan van megadva",
+	"badatpath"				=> "Hibás útvonal",
+
+	"novaluefound"				=> "Nincs érték megadva",
+	"badvaluefound"				=> "Hibás érték",
+
+	"nopriorityfound"			=> "Nincs prioritás megadva",
+	"badpriorityfound"			=> "Hibás prioritás",
+
+	"badviewtype"				=> "Hibás nézet",
+	"badrefreshrate"			=> "Hibás frissítési intervallum",
+
+	"succtorrentload"			=> "Torrent betöltve",
+	"succtorrentstart"			=> "Torrent elindítva",
+	"succtorrentsstart"			=> "Torrentek elindítva",
+	"succtorrentopen"			=> "Torrent megnyitva",
+	"succtorrentsopen"			=> "Torrentek megnzitva",
+	"succtorrentstop"			=> "Torrent leállítva",
+	"succtorrentsstop"			=> "Torrentek leállítva",
+	"succtorrentclose"			=> "Torrent bezárva",
+	"succtorrentsclose"			=> "Torrentek bezárva",
+	"succtorrentcheckhash"			=> "Torrent ellenőrzés elindítva",
+	"succtorrentscheckhash"			=> "Torrentek ellenőrzése elindítva",
+	"succtorrentremove"			=> "Torrent eltávolítva",
+	"succtorrentsremove"			=> "Torrentek eltávolítva",
+	"succtorrenterase"			=> "Torrent törölve",
+	"warntorrenterase"			=> "Torrent törölve, de nem minden fájl lett eltávolítva",
+	"succtorrentserase"			=> "Torrentek törölve",
+	"succprioritychange"			=> "Torrent prioritása beállítva",
+	"succfileprioritychange"		=> "Fájl prioritása beállítva",
+	"succdirprioritychange"			=> "Könyvtár prioritása beállítva",
+	"succtrackerenabledchange"		=> "Tracker elérhetősége beállítva",
+	"succviewchange"			=> "Nézet beállítva",
+	"succrefreshchange"			=> "Frissítés beállítva",
+	"succdhtstart"				=> "DHT szerver elindítva",
+	"succdhtstop"				=> "DHT szerver leállítva",
+
+	"downloadnotallowed"			=> "Nem vagy jogosult torrentek letöltésére a web-es felületről",
+	"erasenotallowed"			=> "Nem vagy jogosult torrentek törlésére a web-es felületen",
+	"refreshnotallowed"			=> "Nem vagy jogosult frissítés beállítására",
+	"throttlenotallowed"			=> "Nem vagy jogosult sebességkorlát beállítására",
+
+	"viewtype_main"				=> "Alapértelmezett",
+	"viewtype_name"				=> "Név szerint",
+	"viewtype_started"			=> "Elindított torrentek",
+	"viewtype_stopped"			=> "Leállított torrentek",
+	"viewtype_complete"			=> "Befejezett torrentek",
+	"viewtype_incomplete"			=> "Befejezetlen torrentek",
+	"viewtype_hashing"			=> "Ellenőrzés alatt álló torrentek",
+	"viewtype_seeding"			=> "Feltöltések",
+
+	"no"					=> "Nem",
+	"yes"					=> "Igen",
+	"disabled"				=> "Letiltva",
+	"enabled"				=> "Engedélyezve",
+	"notset"				=> "Nincs beállítva",
+
+	"d_connection_current_leech"		=> "Letöltés",
+	"d_connection_current_seed"		=> "Feltöltés",
+	"d_ignore_commands_0"			=> "Parancsok figyelembevétele",
+	"d_ignore_commands_1"			=> "Parancsok figyelmen kívü hagyása",
+	"d_active_0"				=> "Leállítva",
+	"d_active_1"				=> "Elindítva",
+	"d_hash_checked_0"			=> "Nem volt ellenőrizve",
+	"d_hash_checked_1"			=> "Ellenőrizve",
+	"d_multi_file_multi"			=> "",
+	"d_multi_file_single"			=> "Egyetlen fájl",
+	"d_open_0"				=> "Zárva",
+	"d_open_1"				=> "Nyitva",
+	"d_complete_0"				=> "Befejezetlen",
+	"d_complete_1"				=> "Befejezett",
+	"d_hash_checking_0"			=> "Nincs ellenőrzés alatt",
+	"d_hash_checking_1"			=> "Ellenőrzés alatt",
+	"d_hashing_0"				=> "Nincs ellenőrzés alatt",
+	"d_hashing_1"				=> "Normál ellenőrzés",
+	"d_hashing_2"				=> "Letöltés befejezve, ellenőrzés",
+	"d_hashing_3"				=> "Újraellenőrzés",
+	"d_priority_0"				=> "Leállítva",
+	"d_priority_1"				=> "Alacsonz",
+	"d_priority_2"				=> "Normál",
+	"d_priority_3"				=> "Magas",
+	"d_state_0"				=> "Leállítva",
+	"d_state_1"				=> "Elindítva",
+	"f_is_open_0"				=> "Zárva",
+	"f_is_open_1"				=> "Nyitva",
+	"f_priority_0"				=> "Leállítva",
+	"f_priority_1"				=> "Normál",
+	"f_priority_2"				=> "Magas",
+	"t_enabled_0"				=> "Letiltva",
+	"t_enabled_1"				=> "Engedélyezve",
+	"t_open_0"				=> "Zárva",
+	"t_open_1"				=> "Nyitva",
+	"t_type_1"				=> "TCP",
+	"t_type_2"				=> "UDP",
+
+	"bind_0000"				=> "Minden IP cím",
+	"ip_0000"				=> "Nincs beállítva",
+	"proxy_address_0000"			=> "Nincs beállítva",
+);
+
+$refresh = array(
+	"refreshrate_0"				=> "Letiltva",
+	"refreshrate_60"			=> "1 perc",
+	"refreshrate_120"			=> "2 perc",
+	"refreshrate_180"			=> "3 perc",
+	"refreshrate_300"			=> "5 perc",
+	"refreshrate_600"			=> "10 perc",
+	"refreshrate_900"			=> "15 perc",
+	"refreshrate_1200"			=> "20 perc",
+);
+
+$label = array(
+	// html head
+	"title"					=> "rTWi - Az rTorrent Web interfész",
+	"description"				=> "rTWi - Az rTorrent Web interfész",
+	"keywords"				=> "rTWi - Az rTorrent Web interfész",
+	"author"				=> "Hudiczius Gábor",
+	"mailto"				=> "ghudiczius@gmail.com?subject=rTWi - Az rTorrent Web interfész",
+
+	// login
+	"username"				=> "Felhasználó",
+	"password"				=> "Jelszó",
+	"login"					=> "Belépés",
+
+	// menu
+	"torrents"				=> "Torrentek",
+	"peerlist"				=> "Peer lista",
+	"info"					=> "Információ",
+	"filelist"				=> "Fájl lista",
+	"trackerlist"				=> "Tracker lista",
+	"chunksseen"				=> "Elérhető syeletek",
+	"transferlist"				=> "Átviteli lista",
+	"addtorrent"				=> "Torrent hozzáadása",
+	"serverinfo"				=> "Szerver információ",
+	"logout"				=> "Kijelentkezés",
+
+	// misc
+	"ok"					=> "OK",
+	"yes"					=> "Igen",
+	"no"					=> "Nem",
+	
+	"clicktohide"				=> "Kattints ide az elrejtéshez",
+	"clicktoopen"				=> "Kattints ide a lenyitáshoz",
+	"clicktocloseopen"			=> "Kattints ide a bezáráshoz/lenyitáshoz",
+	"clicktochange"				=> "Kattints ide a megváltoztatásához",
+
+	"view"					=> "Nézet",
+	"selectviewtype"			=> "Válassz megjelenítést",
+	"refresh"				=> "Frissítés",
+	"selectrefreshrate"			=> "Válassz frissítési időközt",
+
+	"areyousure"				=> "Biztosan törlöd?",
+	"areyousureerase"			=> "Biztosan törlöd? Minden letöltött adat törlésre kerül.",
+
+	// add torrent
+	"openfrom"				=> "Megnyitás",
+	"fileupload"				=> "Fájlfeltöltéssel",
+	"url"					=> "URL megadásával",
+	"torrentfile"				=> "Torrent fájl",
+	"torrenturl"				=> "Torrent URL-je",
+	"starttorrent"				=> "Torrent indítása",
+	"starttorrentafteradded"		=> "Torrent indítása letöltés után",
+	"downloadto"				=> "Letöltés",
+
+	// tasks on torrents
+	"selecttask"				=> "Válassz műveletet",
+	"selectone"				=> "Válassz egyet",
+
+	"startall"				=> "Összes indítása",
+	"stopall"				=> "Összes leállítása",
+	"openall"				=> "Összes megnyitása",
+	"closeall"				=> "Összes bezárása",
+	"checkall"				=> "Összes ellenőrzése",
+	"removeall"				=> "Összes eltávolítása",
+	"eraseall"				=> "Összes törlése",
+
+	"start"					=> "Elindít",
+	"stop"					=> "Leállít",
+	"open"					=> "Megnyit",
+	"close"					=> "Bezár",
+	"checkhash"				=> "Hash ellenőrzés",
+	"remove"				=> "Eltávolít",
+	"erase"					=> "Töröl",
+
+	"selectpriority"			=> "Válassz prioritást",
+	"selectdirpriority"			=> "Válassz könyvtár prioritást",
+	"selectfilepriority"			=> "Válassz fájl prioritást",
+
+	// torrent states
+	"started"				=> "Elindítva",
+	"stopped"				=> "Leállítva",
+	"opened"				=> "Nyitva",
+	"closed"				=> "Zárva",
+	"finished"				=> "Kész",
+	"checkhashed"				=> "Hash ellenőrizve",
+
+	"startedsince"				=> "Elindítva:",
+	"stopedsince"				=> "Leállítva:",
+	"openedsince"				=> "Megyyitva:",
+	"closedsince"				=> "Beárva:",
+	"finishedsince"				=> "elkészült:",
+	"hashingsince"				=> "Hash ellenőrés elindítva:",
+
+	"sincepre"				=> "",
+	"sincepost"				=> "óta",
+
+	// torrent stats
+	"details"				=> "Részletek",
+
+	"done"					=> "kész",
+	"downloadfinished"			=> "Letöltés elkészült",
+	"downloadeddata"			=> "Letöltött adatmennyiség",
+	"torrentsize"				=> "Torrent mérete",
+	"uploaded"				=> "Feltöltve",
+	"uploadeddata"				=> "Feltöltött adatmennyiség",
+
+	"percenthashed"				=> "százalék ellenőrizve",
+	"percentcompleted"			=> "százalék elkészült",
+	"estimatedtimeremaining"		=> "Becsült hátralévő idő",
+	"ignorecommands"			=> "Parancsdok figyelmen kívül hagyása",
+	"ratio"					=> "Arány",
+
+	"off"					=> "Leállítva",
+	"low"					=> "Alacsony",
+	"normal"				=> "Normál",
+	"high"					=> "Magas",
+
+	"message"				=> "Üzenet",
+
+	"lasttouched"				=> "Legutóbb módosítva",
+	"filesize"				=> "Fájl mérete",
+	"downloadfile"				=> "Fájl letöltése",
+	"trackergroup"				=> "Tracker csoport",
+	"type"					=> "Típus",
+	"selecttrackerenabled"			=> "Tracker engedélyezése",
+	"mininterval"				=> "Leggyakoribb kapcsolódás",
+
+	// stats
+	"throttle"				=> "Korlát",
+	"uploadspeed"				=> "Feltöltési sebesség",
+	"uploadlimit"				=> "Feltöltési korlát",
+	"nouploadlimit"				=> "Nincs feltöltési korlát",
+	"downloadspeed"				=> "Letöltési sebesség",
+	"downloadlimit"				=> "Letöltési korlát",
+	"nodownloadlimit"			=> "Nincs letöltési korlát",
+	"rate"					=> "Sebesség",
+
+	// info page
+	"name"					=> "Torrent neve",
+	"infohash"				=> "Info hash",
+	"localid"				=> "Azonosító",
+	"localidhtml"				=> "Azonosító (html)",
+	"directory"				=> "Könyvtár",
+	"tiedtofile"				=> "Fájlhoz kötve",
+	"filestats"				=> "Fájlok száma",
+	"files"					=> "fájl",
+	"private"				=> "Privát torrent",
+	"chunks"				=> "Szeletek",
+	"priority"				=> "Prioritás",
+	"statechanged"				=> "Utolsó állapotváltozás",
+	"freediskspace"				=> "Szabad lemezterület",
+	"connectiontype"			=> "Kapcsolat tipusa",
+	"trackers"				=> "Trackerek száma",
+	"leechers"				=> "Letöltők száma",
+	"seeders"				=> "Feltöltők száma",
+	"pexenabled"				=> "PEX engedélyezve",
+	"pexsize"				=> "PEX mérete",
+	"upload"				=> "Feltöltés",
+	"download"				=> "Letöltés",
+	"skipped"				=> "Kihagyva",
+
+	// server info page
+	"clientversion"				=> "Kliens verzió",
+	"libraryversion"			=> "Függvénykönyvtár verzió",
+	"workingdirectory"			=> "Munkakönyvtár",
+	"downloaddirectory"			=> "Letöltési könyvtár",
+	"sessiondirectory"			=> "Munkamenet könyvtár",
+	"hostname"				=> "Hosztnév",
+	"listeningipaddress"			=> "Kapcsolatot fogadó IP cím",
+	"reportedipaddress"			=> "Tracker felé jelentett IP cím",
+	"portopened"				=> "Nyitott port",
+	"randomport"				=> "Véletlen port",
+	"portrange"				=> "Porttartomány",
+	"changedhtstatus"			=> "DHT szerver elindítása/leállítása",
+	"dht"					=> "DHT szerver",
+	"dhtport"				=> "DHT port",
+	"dhtcycle"				=> "DHT kör",
+	"dhtqueries"				=> "DHT fogadott / küldött kérések",
+	"dhtreplies"				=> "DHT fogadott válaszok",
+	"dhtbytes"				=> "DHT olvasott / írt bájtok",
+	"dhtnodes"				=> "DHT pontok",
+	"in"					=> "pont",
+	"buckets"				=> "csokorban",
+	"dhtpeers"				=> "DHT peer-ek",
+	"dhttorrents"				=> "DHT torrentek",
+	"maxuploads"				=> "Feltöltések maximális száma",
+	"maxpeers"				=> "Peer-ek maximális száma",
+	"minpeers"				=> "Peer-ek minimális száma",
+	"memoryusage"				=> "Memóriahasználat",
+	"maxmemoryusage"			=> "Maximális memóriahasználat",
+	"hashcheck"				=> "Hash ellenőrzés",
+	"safesync"				=> "Biztonságos szinkronizálás",
+	"sendbuffer"				=> "Kimeneti puffer",
+	"receivebuffer"				=> "Bejövő puffer",
+
+	// tracker list page
+	"focus"					=> "Fókusz",
+	"enabled"				=> "Engedélyezve",
+	"seedersleechers"			=> "Fel/Le",
+	"lasttimescraped"			=> "Utoljára lekérdezve",
+);
+
+?>
Index: index.html
===================================================================
--- index.html	(revision fbc3369abde946a919e6c00b3dd10c2e5cb7d35b)
+++ index.html	(revision 49fafb4c4b73ded67f75984b08c402355a202a61)
@@ -1,10 +1,3 @@
 <?php
-
-$xmlrpc_methods = array(
-	"si"	=> array( "get_bind", "get_check_hash", "get_connection_leech", "get_connection_seed", "get_directory", "get_download_rate", "get_handshake_log", "get_hash_interval", "get_hash_max_tries", "get_hash_read_ahead", "get_http_cacert", "get_http_capath", "get_http_proxy", "get_ip", "get_key_layout", "get_max_downloads_div", "get_max_downloads_global", "get_max_file_size", "get_max_memory_usage", "get_max_open_files", "get_max_open_http", "get_max_open_sockets", "get_max_peers", "get_max_peers_seed", "get_max_uploads", "get_max_uploads_div", "get_max_uploads_global", "get_memory_usage", "get_min_peers", "get_min_peers_seed", "get_name", "get_peer_exchange", "get_port_open", "get_port_random", "get_port_range", "get_preload_min_size", "get_preload_required_rate", "get_preload_type", "get_proxy_address", "get_receive_buffer_size", "get_safe_free_diskspace", "get_safe_sync", "get_scgi_dont_route", "get_send_buffer_size", "get_session", "get_session_lock", "get_session_on_completion", "get_split_file_size", "get_split_suffix", "get_stats_not_preloaded", "get_stats_preloaded", "get_timeout_safe_sync", "get_timeout_sync", "get_tracker_dump", "get_tracker_numwant", "get_upload_rate", "get_use_udp_trackers", "system.client_version", "system.get_cwd", "system.hostname", "system.library_version", "system.pid" ),
-	"d"	=> array( "d.get_base_filename=", "d.get_base_path=", "d.get_bytes_done=", "d.get_chunk_size=", "d.get_chunks_hashed=", "d.get_complete=", "d.get_completed_bytes=", "d.get_completed_chunks=", "d.get_connection_current=", "d.get_connection_leech=", "d.get_connection_seed=", "d.get_creation_date=", "d.get_custom1=", "d.get_custom2=", "d.get_custom3=", "d.get_custom4=", "d.get_custom5=", "d.get_directory=", "d.get_down_rate=", "d.get_down_total=", "d.get_free_diskspace=", "d.get_hash=", "d.get_hashing=", "d.get_ignore_commands=", "d.get_left_bytes=", "d.get_local_id=", "d.get_local_id_html=", "d.get_max_file_size=", "d.get_max_peers=", "d.get_max_uploads=", "d.get_message=", "d.get_min_peers=", "d.get_name=", "d.get_peer_exchange=", "d.get_peers_accounted=", "d.get_peers_complete=", "d.get_peers_connected=", "d.get_peers_max=", "d.get_peers_min=", "d.get_peers_not_connected=", "d.get_priority=", "d.get_priority_str=", "d.get_ratio=", "d.get_size_bytes=", "d.get_size_chunks=", "d.get_size_files=", "d.get_skip_rate=", "d.get_skip_total=", "d.get_state=", "d.get_state_changed=", "d.get_tied_to_file=", "d.get_tracker_focus=", "d.get_tracker_numwant=", "d.get_tracker_size=", "d.get_up_rate=", "d.get_up_total=", "d.get_uploads_max=", "d.is_active=", "d.is_hash_checked=", "d.is_hash_checking=", "d.is_multi_file=", "d.is_open=", "d.is_private=" ),
-	"f"	=> array( "f.get_completed_chunks=", "f.get_frozen_path=", "f.get_is_created=", "f.get_is_open=", "f.get_last_touched=", "f.get_match_depth_next=", "f.get_match_depth_prev=", "f.get_offset=", "f.get_path=", "f.get_path_components=", "f.get_path_depth=", "f.get_priority=", "f.get_range_first=", "f.get_range_second=", "f.get_size_bytes=", "f.get_size_chunks=" ),
-	"t"	=> array( "t.get_group=", "t.get_id=", "t.get_min_interval=", "t.get_normal_interval=", "t.get_scrape_complete=", "t.get_scrape_downloaded=", "t.get_scrape_incomplete=", "t.get_scrape_time_last=", "t.get_type=", "t.get_url=", "t.is_enabled=", "t.is_open=" )
-);
 
 function make_abs_path( &$rel_path, &$cwd, $home ) {
@@ -59,5 +52,5 @@
 }
 
-function prepare_si_responses( &$responses, &$message, &$home_path ) {
+function prepare_si_responses( &$responses, &$message, &$home_path, &$config = array() ) {
 	$bytes_down_arr = switch_bytes( $responses["bytes_down"] );
 	$bytes_up_arr = switch_bytes( $responses["bytes_up"] );
@@ -129,4 +122,18 @@
 		$responses["split_file_size_value"] = sprintf( "%.1f", $split_file_size_arr[0] );
 		$responses["split_file_size_suffix"] = $split_file_size_arr[1];
+	}
+
+	if ( $config["allow"]["dht"] == true ) {
+		if ( $responses["dht_statistics_active"] != 0 ) {
+			$dht_statistics_bytes_read_arr = switch_bytes( $responses["dht_statistics_bytes_read"] );
+			$dht_statistics_bytes_written_arr = switch_bytes( $responses["dht_statistics_bytes_written"] );
+
+			$responses["dht_statistics_bytes_read_value"] = sprintf( "%.1f", $dht_statistics_bytes_read_arr[0] );
+			$responses["dht_statistics_bytes_read_suffix"] = $bytes_up_arr[1];
+			$responses["dht_statistics_bytes_written_value"] = sprintf( "%.1f", $dht_statistics_bytes_written_arr[0] );
+			$responses["dht_statistics_bytes_written_suffix"] = $dht_statistics_bytes_written_arr[1];
+		}
+
+		$responses["dht_statistics_active_value"] = $responses["dht_statistics_active"] == 0 ? $message["disabled"] : $message["enabled"];
 	}
 
@@ -193,4 +200,5 @@
 	$responses["d_peers_max_value"] = $responses["d_peers_max"] == -1 ? $message["disabled"] : $responses["d_peers_max"];
 	$responses["d_peers_min_value"] = $responses["d_peers_min"] == -1 ? $message["disabled"] : $responses["d_peers_min"];
+	$responses["d_pex_active_value"] = $responses["d_pex_active"] == 1 ? $message["yes"] : $message["no"];
 	$responses["d_private_value"] = $responses["d_private"] == 1 ? $message["yes"] : $message["no"];
 	$responses["d_state_value"] = $responses["d_state"] == 1 ? $message["d_state_1"] : $message["d_state_0"];
@@ -213,4 +221,6 @@
 		$responses["d_percentage"] = $responses["d_completed_bytes"] / $responses["d_size_bytes"];
 		$responses["d_percentage_value"] = floor( $responses["d_completed_bytes"] / $responses["d_size_bytes"] * 100 );
+		$responses["d_hpercentage"] = $responses["d_chunks_hashed"] / $responses["d_size_chunks"];
+		$responses["d_hpercentage_value"] = floor( $responses["d_chunks_hashed"] / $responses["d_size_chunks"] * 100 );
 	} elseif ( $responses["d_complete"] != 1 ) {
 		$responses["d_estimated_time"] = "";
@@ -332,5 +342,5 @@
 }
 
-function addrefresh( &$xml, &$node, &$message ) {
+function addrefresh( &$xml, &$node, &$refresh ) {
 	$node->setAttribute( "refreshrate", $_SESSION["rtwi_refresh"] );
 
@@ -338,64 +348,25 @@
 	$rrrnode = $node->appendChild( $xml->createElement( "refreshrates" ) );
 	$rrrnode->setAttribute( "value", $_SESSION["rtwi_refresh"] );
-	$rrnode = $rrrnode->appendChild( $xml->createElement( "refreshrate" ) );
-	$rrnode->setAttribute( "value", "0" );
-	$rrnode->setAttribute( "title", $message["refreshrate_0"] );
-	$rrnode = $rrrnode->appendChild( $xml->createElement( "refreshrate" ) );
-	$rrnode->setAttribute( "value", "5" );
-	$rrnode->setAttribute( "title", $message["refreshrate_5"] );
-	$rrnode = $rrrnode->appendChild( $xml->createElement( "refreshrate" ) );
-	$rrnode->setAttribute( "value", "10" );
-	$rrnode->setAttribute( "title", $message["refreshrate_10"] );
-	$rrnode = $rrrnode->appendChild( $xml->createElement( "refreshrate" ) );
-	$rrnode->setAttribute( "value", "30" );
-	$rrnode->setAttribute( "title", $message["refreshrate_30"] );
-	$rrnode = $rrrnode->appendChild( $xml->createElement( "refreshrate" ) );
-	$rrnode->setAttribute( "value", "60" );
-	$rrnode->setAttribute( "title", $message["refreshrate_60"] );
-	$rrnode = $rrrnode->appendChild( $xml->createElement( "refreshrate" ) );
-	$rrnode->setAttribute( "value", "120" );
-	$rrnode->setAttribute( "title", $message["refreshrate_120"] );
-	$rrnode = $rrrnode->appendChild( $xml->createElement( "refreshrate" ) );
-	$rrnode->setAttribute( "value", "180" );
-	$rrnode->setAttribute( "title", $message["refreshrate_180"] );
-	$rrnode = $rrrnode->appendChild( $xml->createElement( "refreshrate" ) );
-	$rrnode->setAttribute( "value", "300" );
-	$rrnode->setAttribute( "title", $message["refreshrate_300"] );
-	$rrnode = $rrrnode->appendChild( $xml->createElement( "refreshrate" ) );
-	$rrnode->setAttribute( "value", "600" );
-	$rrnode->setAttribute( "title", $message["refreshrate_600"] );
-	$rrnode = $rrrnode->appendChild( $xml->createElement( "refreshrate" ) );
-	$rrnode->setAttribute( "value", "1200" );
-	$rrnode->setAttribute( "title", $message["refreshrate_1200"] );
-	$rrnode = $rrrnode->appendChild( $xml->createElement( "refreshrate" ) );
-	$rrnode->setAttribute( "value", "1800" );
-	$rrnode->setAttribute( "title", $message["refreshrate_1800"] );
-	$rrnode->setAttribute( "value", "3600" );
-	$rrnode->setAttribute( "title", $message["refreshrate_3600"] );
-}
-
-function build_xmltree( $list, &$tree, &$xml ) {
-	if ( count( $list ) > 1 ) {
-		$sublist = $list;
-		array_shift( $sublist );
-
-		if ( !is_object( $tree->getElementsByTagName( "directory" )->item( 0 ) ) ) {
+	foreach ( $refresh as $key => $val ) {
+		$rrnode = $rrrnode->appendChild( $xml->createElement( "refreshrate" ) );
+		$rrnode->setAttribute( "value", substr( $key, 12 ) );
+		$rrnode->setAttribute( "title", $val );
+	}
+}
+
+function build_xmltree( &$dstruct, &$tree, &$xml, $fullpath, $responses ) {
+	foreach ( $dstruct as $key => $val ) {
+		if ( is_array( $val ) ) {
 			$subtree = $tree->appendChild( $xml->createElement( "directory" ) );
-			$subtree->setAttribute( "dirname", $list[0] );
+			$subtree->setAttribute( "id", sha1( mt_rand() ) );
+			$subtree->setAttribute( "dirname", $key );
+			$subtree->setAttribute( "dirpath", urlencode( "{$fullpath}/{$key}" ) );
+			$ret = build_xmltree( $val, $subtree, $xml, "{$fullpath}/{$key}", $responses );
 		} else {
-			for ( $i = 0; $i < $tree->getElementsByTagName( "directory" )->length; $i++ ) {
-				if ( $tree->getElementsByTagName( "directory" )->item( $i )->getAttribute( "dirname" ) == $list[0] ) {
-					$subtree = $tree->getElementsByTagName( "directory" )->item( $i );
-				}
-			}
-			if ( !isset( $subtree ) || !is_object( $subtree ) ) {
-				$subtree = $tree->appendChild( $xml->createElement( "directory" ) );
-				$subtree->setAttribute( "dirname", $list[0] );
-			}
-		}
-		$ret = build_xmltree( $sublist, $subtree, $xml );
-	} else {
-		$ret = $tree->appendChild( $xml->createElement( "file" ) );
-		$ret->setAttribute( "filename", $list[0] );
+			$ret = $tree->appendChild( $xml->createElement( "file" ) );
+			$ret->setAttribute( "id", $key );
+			$ret->setAttribute( "filename", $val );
+			xmlrpc_multiappend( $xml, $ret, $responses[$key] );
+		}
 	}
 
@@ -452,8 +423,15 @@
 			$methodval = substr( $methodval, 7 );
 			$methodval = "{$methodval}";
+		} elseif ( substr( $methodval, 0, 3 ) == "dht" ) {
 		} else {
 			$methodval = substr( $methodval, 4 );
 		}
-		$responses[$methodval] = $response[$r++][0];
+		if ( $methodval == "dht_statistics" ) {
+			foreach ( $response[$r++][0] as $dkey => $dval ) {
+				$responses["{$methodval}_{$dkey}"] = $dval;
+			}
+		} else {
+			$responses[$methodval] = $response[$r++][0];
+		}
 	}
 
@@ -487,8 +465,8 @@
 }
 
-set_time_limit( 0 );
-
 error_reporting( E_ALL );
 //error_reporting( E_ALL ^ E_NOTICE );
+
+set_time_limit( 0 );
 
 session_start();
@@ -499,5 +477,5 @@
 require_once( "includes/config.inc.php" );
 require_once( "includes/messages.{$lang}.inc.php" );
-require_once( "{$include_path}/tools/functions.time.inc.php" );
+require_once( "includes/tools/functions.time.inc.php" );
 
 $st = getmicrotime();
@@ -505,4 +483,11 @@
 $calltime = 0;
 $multicallnum = 0;
+
+$xmlrpc_methods = array(
+	"si"	=> $config["allow"]["dht"] == true ? array( "dht_statistics", "get_bind", "get_check_hash", "get_connection_leech", "get_connection_seed", "get_dht_port", "get_directory", "get_download_rate", "get_handshake_log", "get_hash_interval", "get_hash_max_tries", "get_hash_read_ahead", "get_http_cacert", "get_http_capath", "get_http_proxy", "get_ip", "get_key_layout", "get_max_downloads_div", "get_max_downloads_global", "get_max_file_size", "get_max_memory_usage", "get_max_open_files", "get_max_open_http", "get_max_open_sockets", "get_max_peers", "get_max_peers_seed", "get_max_uploads", "get_max_uploads_div", "get_max_uploads_global", "get_memory_usage", "get_min_peers", "get_min_peers_seed", "get_name", "get_peer_exchange", "get_port_open", "get_port_random", "get_port_range", "get_preload_min_size", "get_preload_required_rate", "get_preload_type", "get_proxy_address", "get_receive_buffer_size", "get_safe_free_diskspace", "get_safe_sync", "get_scgi_dont_route", "get_send_buffer_size", "get_session", "get_session_lock", "get_session_on_completion", "get_split_file_size", "get_split_suffix", "get_stats_not_preloaded", "get_stats_preloaded", "get_timeout_safe_sync", "get_timeout_sync", "get_tracker_dump", "get_tracker_numwant", "get_upload_rate", "get_use_udp_trackers", "system.client_version", "system.get_cwd", "system.hostname", "system.library_version", "system.pid" ) : array( "get_bind", "get_check_hash", "get_connection_leech", "get_connection_seed", "get_directory", "get_download_rate", "get_handshake_log", "get_hash_interval", "get_hash_max_tries", "get_hash_read_ahead", "get_http_cacert", "get_http_capath", "get_http_proxy", "get_ip", "get_key_layout", "get_max_downloads_div", "get_max_downloads_global", "get_max_file_size", "get_max_memory_usage", "get_max_open_files", "get_max_open_http", "get_max_open_sockets", "get_max_peers", "get_max_peers_seed", "get_max_uploads", "get_max_uploads_div", "get_max_uploads_global", "get_memory_usage", "get_min_peers", "get_min_peers_seed", "get_name", "get_peer_exchange", "get_port_open", "get_port_random", "get_port_range", "get_preload_min_size", "get_preload_required_rate", "get_preload_type", "get_proxy_address", "get_receive_buffer_size", "get_safe_free_diskspace", "get_safe_sync", "get_scgi_dont_route", "get_send_buffer_size", "get_session", "get_session_lock", "get_session_on_completion", "get_split_file_size", "get_split_suffix", "get_stats_not_preloaded", "get_stats_preloaded", "get_timeout_safe_sync", "get_timeout_sync", "get_tracker_dump", "get_tracker_numwant", "get_upload_rate", "get_use_udp_trackers", "system.client_version", "system.get_cwd", "system.hostname", "system.library_version", "system.pid" ),
+	"d"	=> array( "d.get_base_filename=", "d.get_base_path=", "d.get_bytes_done=", "d.get_chunk_size=", "d.get_chunks_hashed=", "d.get_complete=", "d.get_completed_bytes=", "d.get_completed_chunks=", "d.get_connection_current=", "d.get_connection_leech=", "d.get_connection_seed=", "d.get_creation_date=", "d.get_custom1=", "d.get_custom2=", "d.get_custom3=", "d.get_custom4=", "d.get_custom5=", "d.get_directory=", "d.get_down_rate=", "d.get_down_total=", "d.get_free_diskspace=", "d.get_hash=", "d.get_hashing=", "d.get_ignore_commands=", "d.get_left_bytes=", "d.get_local_id=", "d.get_local_id_html=", "d.get_max_file_size=", "d.get_max_peers=", "d.get_max_size_pex=", "d.get_max_uploads=", "d.get_message=", "d.get_min_peers=", "d.get_name=", "d.get_peer_exchange=", "d.get_peers_accounted=", "d.get_peers_complete=", "d.get_peers_connected=", "d.get_peers_max=", "d.get_peers_min=", "d.get_peers_not_connected=", "d.get_priority=", "d.get_priority_str=", "d.get_ratio=", "d.get_size_bytes=", "d.get_size_chunks=", "d.get_size_files=", "d.get_size_pex=", "d.get_skip_rate=", "d.get_skip_total=", "d.get_state=", "d.get_state_changed=", "d.get_tied_to_file=", "d.get_tracker_focus=", "d.get_tracker_numwant=", "d.get_tracker_size=", "d.get_up_rate=", "d.get_up_total=", "d.get_uploads_max=", "d.is_active=", "d.is_hash_checked=", "d.is_hash_checking=", "d.is_multi_file=", "d.is_open=", "d.is_pex_active=", "d.is_private=" ),
+	"f"	=> array( "f.get_completed_chunks=", "f.get_frozen_path=", "f.get_is_created=", "f.get_is_open=", "f.get_last_touched=", "f.get_match_depth_next=", "f.get_match_depth_prev=", "f.get_offset=", "f.get_path=", "f.get_path_components=", "f.get_path_depth=", "f.get_priority=", "f.get_range_first=", "f.get_range_second=", "f.get_size_bytes=", "f.get_size_chunks=" ),
+	"t"	=> array( "t.get_group=", "t.get_id=", "t.get_min_interval=", "t.get_normal_interval=", "t.get_scrape_complete=", "t.get_scrape_downloaded=", "t.get_scrape_incomplete=", "t.get_scrape_time_last=", "t.get_type=", "t.get_url=", "t.is_enabled=", "t.is_open=" )
+);
 
 if ( isset( $_REQUEST["mod"] ) ) {
@@ -602,4 +587,10 @@
 $root->appendChild( $xml->createElement( "purl", isset( $_SESSION["rtwi_lastpage"] ) ? str_replace( "&", "&amp;", $_SESSION["rtwi_lastpage"] ) : "" ) );
 $root->appendChild( $xml->createElement( "datetime", date( "Y. m. d. H:i:s", time() ) ) );
+$root->appendChild( $xml->createElement( "lang", $lang ) );
+foreach ( $config["allow"] as $key => $val ) {
+	if ( $val == true ) {
+		$root->appendChild( $xml->createElement( "allow_{$key}", "true" ) );
+	}
+}
 
 $labels = $root->appendChild( $xml->createElement( "labels" ) );
@@ -623,4 +614,57 @@
 	case "login" : { // login
 		$layout_file = "layout.main.login.xsl";
+
+		break;
+	}
+	case "serverinfo" : { // server info
+		// creating torrents node
+		$tnode = $root->appendChild( $xml->createElement( "torrents" ) );
+		if ( $config["allow"]["refresh"] ) {
+			addrefresh( $xml, $tnode, $refresh );
+		}
+
+		// retrieving server info
+		$methodlist = $xmlrpc_methods["si"];
+		$si_responses = xmlrpc_multicall( $xmlrpc_array, $methodlist, $multicallnum, $callnum, $calltime );
+
+		$methodlist = array( "d.get_down_rate=", "d.get_up_rate=" );
+		$request = xmlrpc_encode_request( "d.multicall", array_merge( array( $_SESSION["rtwi_view"] ), $methodlist ) );
+		$response = xmlrpc_call( $xmlrpc_array, $request, $callnum, $calltime );
+		$response = preg_replace( "/i8|ex\.i8/", "string", $response );
+		$response = xmlrpc_decode( $response );
+
+		$bytes_down = 0;
+		$bytes_up = 0;
+		for ( $i = 0; $i < count( $response ); $i++ ) {
+			for ( $r = 0; $r < count( $methodlist ); $r++ ) {
+				$methodval = preg_replace( "/(.)\.get_(.*)=/", "$1_$2", $methodlist[$r] );
+				$d_responses[$i][$methodval] = $response[$i][$r];
+			}
+			$bytes_down += $d_responses[$i]["d_down_rate"];
+			$bytes_up += $d_responses[$i]["d_up_rate"];
+		}
+
+		$si_responses["bytes_down"] = $bytes_down;
+		$si_responses["bytes_up"] = $bytes_up;
+
+		prepare_si_responses( $si_responses, $message, $home_path, $config );
+
+		$node = $tnode->appendChild( $xml->createElement( "bytes_down", $si_responses["bytes_down"] ) );
+		$node->setAttribute( "suffix", $si_responses["bytes_down_suffix"] );
+		$node->setAttribute( "value", $si_responses["bytes_down_value"] );
+		$node = $tnode->appendChild( $xml->createElement( "bytes_up", $si_responses["bytes_up"] ) );
+		$node->setAttribute( "suffix", $si_responses["bytes_up_suffix"] );
+		$node->setAttribute( "value", $si_responses["bytes_up_value"] );
+		$node = $tnode->appendChild( $xml->createElement( "download_rate", $si_responses["download_rate"] ) );
+		$node->setAttribute( "suffix", $si_responses["download_rate_suffix"] );
+		$node->setAttribute( "value", $si_responses["download_rate_value"] );
+		$node = $tnode->appendChild( $xml->createElement( "upload_rate", $si_responses["upload_rate"] ) );
+		$node->setAttribute( "suffix", $si_responses["upload_rate_suffix"] );
+		$node->setAttribute( "value", $si_responses["upload_rate_value"] );
+
+		$inode = $tnode->appendChild( $xml->createElement( "server_info" ) );
+		xmlrpc_multiappend( $xml, $inode, $si_responses );
+
+		$layout_file = "layout.main.index.xsl";
 
 		break;
@@ -673,5 +717,5 @@
 			$dpath = str_replace( "//", "/", "{$path}/{$val}" );
 			$fdpath = str_replace( "//", "/", "{$directory}/{$dpath}" );
-			if ( ( is_dir( $fdpath ) || ( is_link( $fdpath ) && is_dir( readlink( $fdpath ) ) ) ) && substr( $val, 0, 1 ) != "." && $fdpath != "{$directory}/!rtwi_files" ) {
+			if ( ( is_dir( $fdpath ) || ( is_link( $fdpath ) && is_dir( readlink( $fdpath ) ) ) ) && substr( $val, 0, 1 ) != "."  ) {
 				$freespace = switch_bytes( disk_free_space( $fdpath ) );
 
@@ -692,5 +736,7 @@
 		// creating torrents node
 		$tnode = $root->appendChild( $xml->createElement( "torrents" ) );
-		addrefresh( $xml, $tnode, $message );
+		if ( $config["allow"]["refresh"] ) {
+			addrefresh( $xml, $tnode, $refresh );
+		}
 
 		// retrieving server info
@@ -756,16 +802,25 @@
 						}
 					}
+
+					$dstruct = array();
 					for ( $i = 0; $i < $torrent["d_size_files"]; $i++ ) {
 						prepare_f_responses( $responses[$i], $message, $home_path, $si_response["get_cwd"] );
 
-						if ( $dodirtree === true ) {
-							$fnode = build_xmltree( $responses[$i]["f_path_components"], $node, $xml );
-						} else {
-							$fnode = $node->appendChild( $xml->createElement( "file" ) );
-							$fnode->setAttribute( "filename", $responses[$i]["f_path"] );
+						$n = 0;
+						$tmp = &$dstruct;
+						foreach ( $responses[$i]["f_path_components"] as $key => $val ) {
+							if ( count( $responses[$i]["f_path_components"] ) == ++$n ) {
+								$tmp[$i] = $val;
+							} else {
+								if ( !isset( $tmp[$val] ) ) {
+									$tmp[$val] = array();
+								}
+								$tmp = &$tmp[$val];
+							}
 						}
-						$fnode->setAttribute( "id", $i );
-						xmlrpc_multiappend( $xml, $fnode, $responses[$i] );
+
 					}
+					$fnode = build_xmltree( $dstruct, $node, $xml, $torrent["d_directory_value"], $responses );
+
 
 					$ftt = getmicrotime();
@@ -819,5 +874,5 @@
 		$si_responses["bytes_up"] = $bytes_up;
 
-		prepare_si_responses( $si_responses, $message, $home_path );
+		prepare_si_responses( $si_responses, $message, $home_path, $config );
 
 		$node = $tnode->appendChild( $xml->createElement( "bytes_down", $si_responses["bytes_down"] ) );
@@ -843,5 +898,13 @@
 	}
 	case "getfile" : { // download a file
-		if ( $id >= 0 ) {
+		if ( !$config["allow"]["download"] ) {
+			$_SESSION["rtwi_err"] = "downloadnotallowed";
+			header( "location: {$url["index"]}" );
+			exit;
+		} elseif ( $id < 0 ) {
+			$_SESSION["rtwi_err"] = "noidfound";
+			header( "location: {$url["index"]}" );
+			exit;
+		} else {
 			// retrieving server info
 			$methodlist = $xmlrpc_methods["si"];
@@ -889,15 +952,15 @@
 				$layout_file = "layout.main.index.xsl";
 			}
-		} else {
-			$_SESSION["rtwi_err"] = "noidfound";
-			$layout_file = "layout.main.index.xsl";
 		}
 
 		break;
 	}
-	case "serverinfo" : { // server info
+	default : { // torrents
 		// creating torrents node
 		$tnode = $root->appendChild( $xml->createElement( "torrents" ) );
-		addrefresh( $xml, $tnode, $message );
+		addview( $xml, $tnode, $message );
+		if ( $config["allow"]["refresh"] ) {
+			addrefresh( $xml, $tnode, $refresh );
+		}
 
 		// retrieving server info
@@ -905,19 +968,23 @@
 		$si_responses = xmlrpc_multicall( $xmlrpc_array, $methodlist, $multicallnum, $callnum, $calltime );
 
-		$methodlist = array( "d.get_down_rate=", "d.get_up_rate=" );
+		$methodlist = $xmlrpc_methods["d"];
 		$request = xmlrpc_encode_request( "d.multicall", array_merge( array( $_SESSION["rtwi_view"] ), $methodlist ) );
 		$response = xmlrpc_call( $xmlrpc_array, $request, $callnum, $calltime );
 		$response = preg_replace( "/i8|ex\.i8/", "string", $response );
 		$response = xmlrpc_decode( $response );
-
+//print_r( $response ); exit;
 		$bytes_down = 0;
 		$bytes_up = 0;
 		for ( $i = 0; $i < count( $response ); $i++ ) {
 			for ( $r = 0; $r < count( $methodlist ); $r++ ) {
-				$methodval = preg_replace( "/(.)\.get_(.*)=/", "$1_$2", $methodlist[$r] );
+				$methodval = preg_replace( "/(.)\.(get|is)_(.*)=/", "$1_$3", $methodlist[$r] );
 				$d_responses[$i][$methodval] = $response[$i][$r];
 			}
 			$bytes_down += $d_responses[$i]["d_down_rate"];
 			$bytes_up += $d_responses[$i]["d_up_rate"];
+
+			prepare_d_responses( $d_responses[$i], $message, $home_path, $si_responses["get_cwd"] );
+			$ttnode = $tnode->appendChild( $xml->createElement( "torrent" ) );
+			xmlrpc_multiappend( $xml, $ttnode, $d_responses[$i] );
 		}
 
@@ -925,5 +992,5 @@
 		$si_responses["bytes_up"] = $bytes_up;
 
-		prepare_si_responses( $si_responses, $message, $home_path );
+		prepare_si_responses( $si_responses, $message, $home_path, $config );
 
 		$node = $tnode->appendChild( $xml->createElement( "bytes_down", $si_responses["bytes_down"] ) );
@@ -940,60 +1007,4 @@
 		$node->setAttribute( "value", $si_responses["upload_rate_value"] );
 
-		$inode = $tnode->appendChild( $xml->createElement( "server_info" ) );
-		xmlrpc_multiappend( $xml, $inode, $si_responses );
-
-		$layout_file = "layout.main.index.xsl";
-
-		break;
-	}
-	default : { // torrents
-		// creating torrents node
-		$tnode = $root->appendChild( $xml->createElement( "torrents" ) );
-		addview( $xml, $tnode, $message );
-		addrefresh( $xml, $tnode, $message );
-
-		// retrieving server info
-		$methodlist = $xmlrpc_methods["si"];
-		$si_responses = xmlrpc_multicall( $xmlrpc_array, $methodlist, $multicallnum, $callnum, $calltime );
-
-		$methodlist = $xmlrpc_methods["d"];
-		$request = xmlrpc_encode_request( "d.multicall", array_merge( array( $_SESSION["rtwi_view"] ), $methodlist ) );
-		$response = xmlrpc_call( $xmlrpc_array, $request, $callnum, $calltime );
-		$response = preg_replace( "/i8|ex\.i8/", "string", $response );
-		$response = xmlrpc_decode( $response );
-
-		$bytes_down = 0;
-		$bytes_up = 0;
-		for ( $i = 0; $i < count( $response ); $i++ ) {
-			for ( $r = 0; $r < count( $methodlist ); $r++ ) {
-				$methodval = preg_replace( "/(.)\.(get|is)_(.*)=/", "$1_$3", $methodlist[$r] );
-				$d_responses[$i][$methodval] = $response[$i][$r];
-			}
-			$bytes_down += $d_responses[$i]["d_down_rate"];
-			$bytes_up += $d_responses[$i]["d_up_rate"];
-
-			prepare_d_responses( $d_responses[$i], $message, $home_path, $si_responses["get_cwd"] );
-			$ttnode = $tnode->appendChild( $xml->createElement( "torrent" ) );
-			xmlrpc_multiappend( $xml, $ttnode, $d_responses[$i] );
-		}
-
-		$si_responses["bytes_down"] = $bytes_down;
-		$si_responses["bytes_up"] = $bytes_up;
-
-		prepare_si_responses( $si_responses, $message, $home_path );
-
-		$node = $tnode->appendChild( $xml->createElement( "bytes_down", $si_responses["bytes_down"] ) );
-		$node->setAttribute( "suffix", $si_responses["bytes_down_suffix"] );
-		$node->setAttribute( "value", $si_responses["bytes_down_value"] );
-		$node = $tnode->appendChild( $xml->createElement( "bytes_up", $si_responses["bytes_up"] ) );
-		$node->setAttribute( "suffix", $si_responses["bytes_up_suffix"] );
-		$node->setAttribute( "value", $si_responses["bytes_up_value"] );
-		$node = $tnode->appendChild( $xml->createElement( "download_rate", $si_responses["download_rate"] ) );
-		$node->setAttribute( "suffix", $si_responses["download_rate_suffix"] );
-		$node->setAttribute( "value", $si_responses["download_rate_value"] );
-		$node = $tnode->appendChild( $xml->createElement( "upload_rate", $si_responses["upload_rate"] ) );
-		$node->setAttribute( "suffix", $si_responses["upload_rate_suffix"] );
-		$node->setAttribute( "value", $si_responses["upload_rate_value"] );
-
 		$layout_file = "layout.main.index.xsl";
 
@@ -1020,5 +1031,5 @@
 
 if ( $mod != "getfile" ) {
-	require_once( "{$include_path}/classes/xsl_handler.inc.php" );
+	require_once( "includes/classes/xsl_handler.inc.php" );
 	$page = new page_handler( $site_theme, $layout_file, $xml );
 	$page->parse();
@@ -1026,5 +1037,5 @@
 	$len = strlen( $text );
 
-	@header( "content-length: {$len}" );
+//	@header( "content-length: {$len}" );
 	@header( "content-type: text/html; charset=utf-8" );
 	@header( "content-language: hu" );
@@ -1049,5 +1060,4 @@
 $tt = getmicrotime();
 
-/*
 printf( "<br />\r\nXMLRPC calls: %d (%d multicall)", $callnum, $multicallnum );
 printf( "<br />\r\nXMLRPC time: %0.6f sec", $calltime );
@@ -1056,5 +1066,4 @@
 }
 printf( "<br />\r\nTotal time: %0.6f sec", $tt - $st );
-*/
 
 ?>
Index: input.php
===================================================================
--- input.php	(revision fbc3369abde946a919e6c00b3dd10c2e5cb7d35b)
+++ input.php	(revision 49fafb4c4b73ded67f75984b08c402355a202a61)
@@ -39,6 +39,6 @@
 
 require_once( "includes/config.inc.php" );
-require_once( "{$include_path}/tools/functions.time.inc.php" );
-require_once( "{$include_path}/classes/bittorrent_handler.inc.php" );
+require_once( "includes/tools/functions.time.inc.php" );
+require_once( "includes/classes/bittorrent_handler.inc.php" );
 
 $st = getmicrotime();
@@ -84,7 +84,4 @@
 			$xmlrpc_array["port"] = $users[$_SESSION["rtwi_nick"]]["port"];
 
-			$request = xmlrpc_encode_request( "system.set_umask", array( $torrents_umask ) );
-			$response = xmlrpc_call( $xmlrpc_array, $request, $callnum, $calltime );
-
 			$_SESSION["rtwi_err"] = "succlogin";
 			header( "location: {$url["index"]}" );
@@ -168,4 +165,9 @@
 	}
 	case "changerefresh" : { // change view
+		if ( !$config["allow"]["refresh"] ) {
+			$_SESSION["rtwi_err"] = "refreshnotallowed";
+			header( "location: {$url["index"]}" );
+			exit;
+		}
 		if ( isset( $_REQUEST["refreshrate"] ) && $_REQUEST["refreshrate"] != "" ) {
 			$refreshrate = $_REQUEST["refreshrate"];
@@ -191,4 +193,9 @@
 	}
 	case "changethrottle" : { // change view
+		if ( !$config["allow"]["throttle"] ) {
+			$_SESSION["rtwi_err"] = "throttlenotallowed";
+			header( "location: {$url["index"]}" );
+			exit;
+		}
 		if ( isset( $_REQUEST["upspeed"] ) && $_REQUEST["upspeed"] != "" && isset( $_REQUEST["downspeed"] ) && $_REQUEST["downspeed"] != "" ) {
 			$upspeed = $_REQUEST["upspeed"];
@@ -208,8 +215,9 @@
 			$response = xmlrpc_call( $xmlrpc_array, $request, $callnum, $calltime );
 
+			$_SESSION["rtwi_err"] = "succthrottlechange";
 			header( "location: {$_SESSION["rtwi_lastpage"]}" );
 			exit;
 		} else {
-			$_SESSION["rtwi_err"] = "badrefreshrate";
+			$_SESSION["rtwi_err"] = "badthrottlevals";
 			header( "location: {$_SESSION["rtwi_lastpage"]}" );
 			exit;
@@ -235,5 +243,5 @@
 			$directory = substr( $directory, 0, -1 );
 		}
-		if ( in_array( "..", split( "/", $directory ) ) || in_array( ".", split( "/", $directory ) ) ) {
+		if ( in_array( "..", split( "/", $directory ) ) ) {
 			$_SESSION["rtwi_err"] = "badrtdirectory";
 			header( "location: {$url["index"]}?mod=addtorrent" );
@@ -268,34 +276,10 @@
 				case 0 : {
 					if ( is_uploaded_file( $_FILES["torrentfile"]["tmp_name"] ) ) {
-						if ( isset( $_REQUEST["keeptorrentfile"] ) && $_REQUEST["keeptorrentfile"] == "on" ) {
-							$prefix = time() . mt_rand();
-							$uploadpath = "{$directory}/!rtwi_files/{$prefix}_{$_FILES["torrentfile"]["name"]}";
-
-							if ( !is_dir( "{$directory}/!rtwi_files" ) && !@mkdir( "{$directory}/!rtwi_files", 0777 ) ) {
-								$_SESSION["rtwi_err"] = "notrtfdircreated";
-								header( "location: {$url["index"]}?mod=addtorrent" );
-								exit;
-							}
-
-							if ( @copy( $_FILES["torrentfile"]["tmp_name"], $uploadpath ) ) {
-								chmod( $uploadpath, 0666 );
-								$torrent = $uploadpath;
-							} else {
-								if ( !is_dir( $directory ) ) {
-									$_SESSION["rtwi_err"] = "notrtfdircreated";
-									header( "location: {$url["index"]}?mod=addtorrent" );
-									exit;
-								} else {
-									$_SESSION["rtwi_err"] = "notrtfdirwriteright";
-									header( "location: {$url["index"]}?mod=addtorrent" );
-									exit;
-								}
-							}
-						} else {
-							$torrent = file_get_contents( $_FILES["torrentfile"]["tmp_name"] );
-							xmlrpc_set_type( &$torrent, "base64" ); 
-						}
+						$torrent = file_get_contents( $_FILES["torrentfile"]["tmp_name"] );
+						xmlrpc_set_type( &$torrent, "base64" ); 
 					} else {
-						print "Possible file upload attack!\n";
+						$_SESSION["rtwi_err"] = "rtfileattack";
+						header( "location: {$url["index"]}?mod=addtorrent" );
+						exit;
 					}
 
@@ -361,5 +345,5 @@
 			$dlpath = substr( $dlpath, 0, -1 );
 		}
-		if ( in_array( "..", split( "/", $dlpath ) ) || in_array( ".", split( "/", $dlpath ) ) ) {
+		if ( in_array( "..", split( "/", $dlpath ) ) ) {
 			$_SESSION["rtwi_err"] = "badatpath";
 			header( "location: {$url["index"]}?mod=addtorrent" );
@@ -529,4 +513,9 @@
 	}
 	case "torrenterase" : { // erase a torrent and delete the data
+		if ( !$config["allow"]["erase"] ) {
+			$_SESSION["rtwi_err"] = "erasenotallowed";
+			header( "location: {$url["index"]}" );
+			exit;
+		}
 		$request = xmlrpc_encode_request( "download_list", array() );
 		$response = xmlrpc_call( $xmlrpc_array, $request, $callnum, $calltime );
@@ -562,7 +551,8 @@
 			$directory = substr( $directory, 0, -1 );
 		}
-		if ( in_array( "..", split( "/", $directory ) ) || in_array( ".", split( "/", $directory ) ) ) {
+//		print_r( split( "/", $directory ) );
+		if ( in_array( "..", split( "/", $directory ) ) ) {
 			$_SESSION["rtwi_err"] = "badrtdirectory";
-			header( "location: {$url["index"]}?mod=addtorrent" );
+			header( "location: {$url["index"]}" );
 			exit;
 		} elseif ( substr( $directory, 0, 2 ) == "./" ) {
@@ -578,7 +568,7 @@
 			$dd = substr( $dd, 0, -1 );
 		}
-		if ( in_array( "..", split( "/", $dd ) ) || in_array( ".", split( "/", $dd ) ) ) {
+		if ( in_array( "..", split( "/", $dd ) ) ) {
 			$_SESSION["rtwi_err"] = "badrtdirectory";
-			header( "location: {$url["index"]}?mod=addtorrent" );
+			header( "location: {$url["index"]}" );
 			exit;
 		} elseif ( substr( $dd, 0, 2 ) == "./" ) {
@@ -811,5 +801,5 @@
 		if ( isset( $_REQUEST["filepriority"] ) ) {
 			$filepriority = $_REQUEST["filepriority"];
-			settype( $fpriority, "int" );
+			settype( $filepriority, "int" );
 		} else {
 			$_SESSION["rtwi_err"] = "nopriorityfound";
@@ -833,4 +823,89 @@
 
 		$_SESSION["rtwi_err"] = "succfileprioritychange";
+		header( "location: {$tourl}" );
+		exit;
+
+		break;
+	}
+	case "changedirpriority" : { // set file priority
+		$request = xmlrpc_encode_request( "download_list", array() );
+		$response = xmlrpc_call( $xmlrpc_array, $request, $callnum, $calltime );
+		$response = preg_replace( "/i8|ex\.i8/", "string", $response );
+		$torrents = xmlrpc_decode( $response );
+
+		if ( isset( $_REQUEST["ajax"] ) && $_REQUEST["ajax"] == "true" ) {
+			$tourl = "{$url["index"]}?mod=torrent&hash={$hash}&page=files&ajax=true";
+		} else {
+			$tourl = "{$url["index"]}?mod=torrent&hash={$hash}&page=files";
+		}
+
+		if ( !in_array( $hash, $torrents ) ) {
+			$_SESSION["rtwi_err"] = "nohashfound";
+			header( "location: {$tourl}" );
+			exit;
+		}
+
+		if ( isset( $_REQUEST["dirpriority"] ) ) {
+			$dirpriority = $_REQUEST["dirpriority"];
+			settype( $dirpriority, "int" );
+		} else {
+			$_SESSION["rtwi_err"] = "nopriorityfound";
+			header( "location: {$tourl}" );
+			exit;
+		}
+
+		if ( !in_array( $dirpriority, array( 0, 1, 2 ) ) ) {
+			$_SESSION["rtwi_err"] = "badpriorityfound";
+			header( "location: {$tourl}" );
+			exit;
+		}
+
+		if ( isset( $_REQUEST["dir"] ) ) {
+			$dir = $_REQUEST["dir"];
+		} else {
+			$_SESSION["rtwi_err"] = "nodirfound";
+			header( "location: {$tourl}" );
+			exit;
+		}
+
+		if ( substr( $dir, -1 ) != "/" ) {
+			$dir = "{$dir}/";
+		}
+		$len = strlen( $dir );
+
+		$request = xmlrpc_encode_request( "f.multicall", array( $hash, 0, "f.get_frozen_path=" ) );
+		$response = xmlrpc_call( $xmlrpc_array, $request, $callnum, $calltime );
+		$response = preg_replace( "/i8|ex\.i8/", "string", $response );
+		$files = xmlrpc_decode( $response );
+
+		$badpath = true;
+		$request = array();
+		foreach ( $files as $key => $val ) {
+			if ( strpos( $val[0], $dir ) === 0 ) {
+				$request[] = array( "methodName" => "f.set_priority", "params" => array( $hash, $key, $dirpriority ) );
+				$filestochange[] = array( $key, $val[0] );
+				if ( $badpath == true ) {
+					$badpath = false;
+				}
+			}
+		}
+
+		if ( $badpath === true ) {
+			$_SESSION["rtwi_err"] = "baddirfound";
+			header( "location: {$tourl}" );
+			exit;
+		}
+
+
+		$request = xmlrpc_encode_request( "system.multicall", array( $request ) );
+		$response = xmlrpc_call( $xmlrpc_array, $request, $callnum, $calltime );
+
+		$request = xmlrpc_encode_request( "d.update_priorities ", array( $hash ) );
+		$response = xmlrpc_call( $xmlrpc_array, $request, $callnum, $calltime );
+
+
+		sleep( 1 );
+
+		$_SESSION["rtwi_err"] = "succdirprioritychange";
 		header( "location: {$tourl}" );
 		exit;
@@ -902,7 +977,36 @@
 		break;
 	}
+	case "changedhtstatus" : { // start/stop dht server
+		if ( !isset( $_REQUEST["dhtstatus"] ) || $_REQUEST["dhtstatus"] == "" ) {
+			$_SESSION["rtwi_err"] = "novaluefound";
+			header( "location: {$url["index"]}?mod=serverinfo" );
+			exit;
+		}
+
+		$dhtstatus = $_REQUEST["dhtstatus"];
+		settype( $dhtstatus, "int" );
+		if ( $dhtstatus != 0 && $dhtstatus != 1 ) {
+			$_SESSION["rtwi_err"] = "badvaluefound";
+			header( "location: {$url["index"]}?mod=serverinfo" );
+			exit;
+		}
+
+		$dhtstatus = $dhtstatus == 1 ? "on" : "off";
+
+		$request = xmlrpc_encode_request( "dht", array( $dhtstatus ) );
+		$response = xmlrpc_call( $xmlrpc_array, $request, $callnum, $calltime );
+
+		$_SESSION["rtwi_err"] = $dhtstatus == 1 ? "succdhtstart" : "succdhtstop";
+
+		sleep( 1 );
+
+		header( "location: {$url["index"]}?mod=serverinfo" );
+		exit;
+
+		break;
+	}
 	default : {
 		$_SESSION["rtwi_err"] = "noinputmod";
-		header( "location: {$url["index"]}" );
+		header( "location: {$_SESSION["rtwi_lastpage"]}" );
 		exit;
 
Index: themes/default_ajax/inc/afunc.js
===================================================================
--- themes/default_ajax/inc/afunc.js	(revision fbc3369abde946a919e6c00b3dd10c2e5cb7d35b)
+++ themes/default_ajax/inc/afunc.js	(revision 49fafb4c4b73ded67f75984b08c402355a202a61)
@@ -49,4 +49,54 @@
 }
 
+function loadcontent_dirpriority( iurl, hash, dir, dirpriority ) {
+ var xmlHttp;
+ try {
+  xmlHttp = new XMLHttpRequest();
+ }
+ catch ( e ) {
+  try {
+   xmlHttp = new ActiveXObject( "Msxml2.XMLHTTP" );
+  }
+  catch ( e ) {
+   try {
+    xmlHttp = new ActiveXObject( "Microsoft.XMLHTTP" );
+   } catch ( e ) {
+    alert( "Your browser does not support AJAX!" );
+    return false;
+   }
+  }
+ }
+ xmlHttp.onreadystatechange = function() {
+  switch ( xmlHttp.readyState ) {
+   case 0 : {
+    document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = 0;
+    break;
+   }
+   case 1 : {
+    document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = 'Requesting...';
+    break;
+   }
+   case 2 : {
+    document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = 2;
+    break;
+   }
+   case 3 : {
+    document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = 'Processing...';
+    break;
+   }
+   case 4 : {
+    document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = xmlHttp.responseText;
+    break;
+   }
+   default : {
+    document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = '.';
+    break;
+   }
+  }
+ }
+ xmlHttp.open( 'GET', iurl + '?mod=changedirpriority&hash=' + hash + '&dir=' + dir + '&dirpriority=' + dirpriority + '&ajax=true', true );
+ xmlHttp.send( null );
+}
+
 function loadcontent_filepriority( iurl, hash, id, filepriority ) {
  var xmlHttp;
Index: themes/default_ajax/inc/hfunc.js
===================================================================
--- themes/default_ajax/inc/hfunc.js	(revision fbc3369abde946a919e6c00b3dd10c2e5cb7d35b)
+++ themes/default_ajax/inc/hfunc.js	(revision 49fafb4c4b73ded67f75984b08c402355a202a61)
@@ -1,13 +1,16 @@
 function toggle( modpage ) {
  switch ( modpage ) {
+  case '_info' :
   case 'torrent_info' :
   case 'torrent_trackers' :
-  case '_info' : {
-   document.getElementById( 'throttleupinput' ).style.display = 'none';
-   document.getElementById( 'throttledowninput' ).style.display = 'none';
-   document.getElementById( 'tsubmit' ).style.display = 'none';
+  case 'serverinfo_info' : {
+   if ( document.getElementById( 'changethrottleform' ) != null ) {
+    document.getElementById( 'throttleupinput' ).style.display = 'none';
+    document.getElementById( 'throttledowninput' ).style.display = 'none';
+    document.getElementById( 'tsubmit' ).style.display = 'none';
 
-   document.getElementById( 'throttleup' ).style.display = '';
-   document.getElementById( 'throttledown' ).style.display = '';
+    document.getElementById( 'throttleup' ).style.display = '';
+    document.getElementById( 'throttledown' ).style.display = '';
+   }
 
    break;
@@ -31,6 +34,9 @@
    var uls = document.getElementsByTagName( 'ul' );
    for ( i = 0; i < uls.length; i++ ) {
-    if ( uls.item( i ).getAttribute( 'class' ) == 'directory' ) {
-     uls.item( i ).style.display='none';
+    var atts = uls.item( i ).attributes;
+    for ( j = 0; j < atts.length; j++ ) {
+     if ( atts[j].nodeName == 'class' && atts[j].nodeValue == 'directory' ) {
+      uls.item( i ).style.display='none';
+     }
     }
    }
Index: themes/default_ajax/inc/style.css
===================================================================
--- themes/default_ajax/inc/style.css	(revision fbc3369abde946a919e6c00b3dd10c2e5cb7d35b)
+++ themes/default_ajax/inc/style.css	(revision 49fafb4c4b73ded67f75984b08c402355a202a61)
@@ -75,5 +75,5 @@
 }
 
-#balh {
+#leftcol {
 		float: left;
 		width: 13%;
@@ -81,5 +81,5 @@
 }
 
-#kozeph {
+#maincol {
 		float: left;
 		width: 84%;
@@ -88,5 +88,5 @@
 }
 
-#fomenu {
+#mainmenu {
 		margin: 0 0 1em 0;
 		padding: 0;
@@ -94,5 +94,5 @@
 }
 
-#fomenu li.first {
+#mainmenu li.first {
 		margin: 0;
 		padding: 0;
@@ -100,9 +100,9 @@
 }
 
-#fomenu li {
+#mainmenu li {
 		border-top: 1px solid #aaaaaa;
 }
 
-#fomenu a {
+#mainmenu a {
 		display: block;
 		padding: .2em 0 .2em 0;
@@ -112,5 +112,5 @@
 }
 
-#fomenu a:hover {
+#mainmenu a:hover {
 		display: block;
 		color: #000000;
@@ -181,6 +181,6 @@
 
 .tthrottle input[type="text"] {
-	width: 2em;
-	text-align: right;
+		width: 2em;
+		text-align: right;
 }
 
@@ -222,5 +222,5 @@
 .trates {
 		float: left;
-		width: 13em;
+		width: 14em;
 		margin: 0 .5em 0 0;
 		background: #eeeeee;
@@ -238,5 +238,5 @@
 .tpercentage {
 		float: left;
-		width: 3em;
+		width: 3.5em;
 		margin: 0 .5em 0 0;
 		background: #eeeeee;
@@ -306,5 +306,5 @@
 .tcontainer a.files {
 		float: left;
-		width: 13em;
+		width: 14em;
 		margin: 0 .5em 0 0;
 		background: #eeeeee;
@@ -365,4 +365,31 @@
 }
 
+.dopenlink {
+		float: left;
+}
+
+.dpriority {
+		float: right;
+		margin: 0;
+		font-size: smaller;
+		text-align: right;
+		background: #eeeeee;
+}
+
+.dpriority select {
+		font-size: smaller;
+}
+
+.dpriority .submit {
+		font-size: smaller;
+}
+
+.tcontent .dpriority {
+		float: right;
+		margin: 0;
+		text-align: right;
+		background: #eeeeee;
+}
+
 .fname {
 		float: left;
@@ -393,5 +420,5 @@
 .fpriority {
 		float: right;
-		width: 7.5em;
+		width: 8.5em;
 		margin: 0 0 0 .5em;
 		font-size: smaller;
@@ -410,5 +437,5 @@
 .tcontent .fpriority {
 		float: right;
-		width: 6.5em;
+		width: 8em;
 		margin: 0 0 0 .5em;
 		text-align: right;
@@ -455,4 +482,8 @@
 }
 
+.tcontainer .tenabled {
+		width: 13em;
+}
+
 .tenabled .submit {
 		font-size: smaller;
Index: themes/default_ajax/layout.ajax.index.xsl
===================================================================
--- themes/default_ajax/layout.ajax.index.xsl	(revision fbc3369abde946a919e6c00b3dd10c2e5cb7d35b)
+++ themes/default_ajax/layout.ajax.index.xsl	(revision 49fafb4c4b73ded67f75984b08c402355a202a61)
@@ -1,5 +1,5 @@
 ﻿<xsl:stylesheet version="1.1"
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                lang="hu">
+                lang="en">
  <xsl:output method="xml"
              indent="no"
@@ -13,5 +13,5 @@
  <xsl:template match="err">
   <div id="aerr">
-   <span title="Click to hide" onmouseover="this.style.cursor='pointer';" onclick="document.getElementById( 'aerr' ).style.display='none';">
+   <span title="{/root/labels/clicktohide}" onmouseover="this.style.cursor='pointer';" onclick="document.getElementById( 'aerr' ).style.display='none';">
     <xsl:value-of select="errmsg" />
    </span>
@@ -32,7 +32,7 @@
 
  <xsl:template match="torrent_info">
-  <li class="line">
-   <div class="infoleft">
-    <xsl:text>Name:</xsl:text>
+  <li class="line spacer">
+   <div class="infoleft">
+    <xsl:value-of select="/root/labels/name" />
    </div>
    <div class="inforight">
@@ -41,7 +41,7 @@
    <div class="clr"></div>
   </li>
-  <li class="line spacer">
-   <div class="infoleft">
-    <xsl:text>Info hash:</xsl:text>
+  <li class="line">
+   <div class="infoleft">
+    <xsl:value-of select="/root/labels/infohash" />
    </div>
    <div class="inforight">
@@ -52,5 +52,23 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Directory:</xsl:text>
+    <xsl:value-of select="/root/labels/localid" />
+   </div>
+   <div class="inforight">
+    <xsl:value-of select="d_local_id" />
+   </div>
+   <div class="clr"></div>
+  </li>
+  <li class="line spacer">
+   <div class="infoleft">
+    <xsl:value-of select="/root/labels/localidhtml" />
+   </div>
+   <div class="inforight">
+    <xsl:value-of select="d_local_id_html" />
+   </div>
+   <div class="clr"></div>
+  </li>
+  <li class="line">
+   <div class="infoleft">
+    <xsl:value-of select="/root/labels/directory" />
    </div>
    <div class="inforight">
@@ -61,5 +79,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Tied to file:</xsl:text>
+    <xsl:value-of select="/root/labels/tiedtofile" />
    </div>
    <div class="inforight">
@@ -69,5 +87,5 @@
      </xsl:when>
      <xsl:otherwise>
-      <xsl:text>No</xsl:text>
+      <xsl:value-of select="/root/labels/no" />
      </xsl:otherwise>
     </xsl:choose>
@@ -75,7 +93,7 @@
    <div class="clr"></div>
   </li>
-  <li class="line spacer">
-   <div class="infoleft">
-    <xsl:text>File stats:</xsl:text>
+  <li class="line">
+   <div class="infoleft">
+    <xsl:value-of select="/root/labels/filestats" />
    </div>
    <div class="inforight">
@@ -85,5 +103,6 @@
       <xsl:text> </xsl:text>
       <xsl:value-of select="d_size_files" />
-      <xsl:text> files</xsl:text>
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="/root/labels/files" />
      </xsl:when>
     </xsl:choose>
@@ -91,7 +110,16 @@
    <div class="clr"></div>
   </li>
-  <li class="line">
-   <div class="infoleft">
-    <xsl:text>Chunks:</xsl:text>
+  <li class="line spacer">
+   <div class="infoleft">
+    <xsl:value-of select="/root/labels/private" />
+   </div>
+   <div class="inforight">
+    <xsl:value-of select="d_private/@value" />
+   </div>
+   <div class="clr"></div>
+  </li>
+  <li class="line">
+   <div class="infoleft">
+    <xsl:value-of select="/root/labels/chunks" />
    </div>
    <div class="inforight">
@@ -108,5 +136,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Priority:</xsl:text>
+    <xsl:value-of select="/root/labels/priority" />
    </div>
    <div class="inforight">
@@ -117,5 +145,5 @@
   <li class="line spacer">
    <div class="infoleft">
-    <xsl:text>State changed:</xsl:text>
+    <xsl:value-of select="/root/labels/statechanged" />
    </div>
    <div class="inforight">
@@ -126,5 +154,5 @@
   <li class="line spacer">
    <div class="infoleft">
-    <xsl:text>Free diskspace:</xsl:text>
+    <xsl:value-of select="/root/labels/freediskspace" />
    </div>
    <div class="inforight">
@@ -137,5 +165,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Connection type:</xsl:text>
+    <xsl:value-of select="/root/labels/connectiontype" />
    </div>
    <div class="inforight">
@@ -146,5 +174,14 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Leechers:</xsl:text>
+    <xsl:value-of select="/root/labels/trackers" />
+   </div>
+   <div class="inforight">
+    <xsl:value-of select="d_tracker_size" />
+   </div>
+   <div class="clr"></div>
+  </li>
+  <li class="line">
+   <div class="infoleft">
+    <xsl:value-of select="/root/labels/leechers" />
    </div>
    <div class="inforight">
@@ -155,5 +192,5 @@
   <li class="line spacer">
    <div class="infoleft">
-    <xsl:text>Seeders:</xsl:text>
+    <xsl:value-of select="/root/labels/seeders" />
    </div>
    <div class="inforight">
@@ -164,5 +201,25 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Upload:</xsl:text>
+    <xsl:value-of select="/root/labels/pexenabled" />
+   </div>
+   <div class="inforight">
+    <xsl:value-of select="d_pex_active/@value" />
+   </div>
+   <div class="clr"></div>
+  </li>
+  <li class="line spacer">
+   <div class="infoleft">
+    <xsl:value-of select="/root/labels/pexsize" />
+   </div>
+   <div class="inforight">
+    <xsl:value-of select="d_size_pex" />
+    <xsl:text> / </xsl:text>
+    <xsl:value-of select="d_max_size_pex" />
+   </div>
+   <div class="clr"></div>
+  </li>
+  <li class="line">
+   <div class="infoleft">
+    <xsl:value-of select="/root/labels/upload" />
    </div>
    <div class="inforight">
@@ -179,5 +236,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Download:</xsl:text>
+    <xsl:value-of select="/root/labels/download" />
    </div>
    <div class="inforight">
@@ -194,5 +251,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Skipped:</xsl:text>
+    <xsl:value-of select="/root/labels/skipped" />
    </div>
    <div class="inforight">
@@ -232,5 +289,21 @@
  <xsl:template match="directory">
   <li>
-   <a title="Click to open/close" onmouseover="this.style.cursor='pointer';" onclick="if ( this.parentNode.getElementsByTagName( 'ul' ).item( 0 ).style.display == '' ) {{ this.parentNode.getElementsByTagName( 'ul' ).item( 0 ).style.display = 'none' }} else {{ this.parentNode.getElementsByTagName( 'ul' ).item( 0 ).style.display = '' }};"><xsl:value-of select="@dirname" /></a>
+   <div class="dopenlink">
+    <a title="{/root/labels/clicktoopenclose}" onmouseover="this.style.cursor='pointer';" onclick="if ( this.parentNode.parentNode.getElementsByTagName( 'ul' ).item( 0 ).style.display == '' ) {{ this.parentNode.parentNode.getElementsByTagName( 'ul' ).item( 0 ).style.display = 'none' }} else {{ this.parentNode.parentNode.getElementsByTagName( 'ul' ).item( 0 ).style.display = '' }};"><xsl:value-of select="@dirname" /></a>
+   </div>
+   <div class="dpriority">
+    <form class="changedirpriorityform" name="changedirpriorityform_{@id}" method="post" action="{/root/iurl}?mod=changedirpriority&amp;hash={/root/hash}&amp;dir={@dirpath}">
+     <select class="whiteselect" name="dirpriority" title="Select directory priority" onchange="loadcontent_dirpriority( '{/root/iurl}', '{/root/hash}', '{@dirpath}', this.value );">
+      <option value="-1" title="{/root/labels/selectone}" selected="selected"><xsl:value-of select="/root/labels/selectone" /></option>
+      <option value="0" title="{/root/labels/off}"><xsl:value-of select="/root/labels/off" /></option>
+      <option value="1" title="{/root/labels/normal}"><xsl:value-of select="/root/labels/normal" /></option>
+      <option value="2" title="{/root/labels/high}"><xsl:value-of select="/root/labels/high" /></option>
+     </select>
+     <noscript>
+      <input class="submit" type="submit" name="OK" value="OK" title="OK" />
+     </noscript>
+    </form>
+   </div>
+   <div class="clr">_</div>
    <ul class="directory" style="display: none;">
     <xsl:apply-templates select="directory" />
@@ -243,10 +316,10 @@
   <li onmouseover="this.style.background='#eeeeee';" onmouseout="this.style.background='';">
    <div class="fname">
-    <span title="Last touched: {f_last_touched}">
+    <span title="{/root/labels/lasttouched}: {f_last_touched}">
      <xsl:value-of select="@filename" />
     </span>
    </div>
    <div class="fpercentage">
-    <span title="{f_percentage/@value} percent completed">
+    <span title="{f_percentage/@value} {/root/labels/percentcompleted}">
      <xsl:text>[</xsl:text>
      <xsl:value-of select="f_percentage/@value" />
@@ -256,20 +329,20 @@
    <div class="fpriority">
     <form class="changefilepriorityform" name="changefilepriorityform_{@id}" method="post" action="{/root/iurl}?mod=changefilepriority&amp;hash={/root/hash}&amp;id={@id}">
-     <select class="whiteselect" name="filepriority" title="Select file priority" onchange="loadcontent_filepriority( '{/root/iurl}', '{/root/hash}', '{@id}', this.value );">
+     <select class="whiteselect" name="filepriority" title="{/root/labels/selectfilepriority}" onchange="loadcontent_filepriority( '{/root/iurl}', '{/root/hash}', '{@id}', this.value );">
       <xsl:choose>
        <xsl:when test="f_priority = 0">
-        <option value="0" title="Off" selected="selected">Off</option>
-        <option value="1" title="Normal">Normal</option>
-        <option value="2" title="High">High</option>
+        <option value="0" title="{/root/labels/off}" selected="selected"><xsl:value-of select="/root/labels/off" /></option>
+        <option value="1" title="{/root/labels/normal}"><xsl:value-of select="/root/labels/normal" /></option>
+        <option value="2" title="{/root/labels/high}"><xsl:value-of select="/root/labels/high" /></option>
        </xsl:when>
        <xsl:when test="f_priority = 2">
-        <option value="0" title="Off">Off</option>
-        <option value="1" title="Normal">Normal</option>
-        <option value="2" title="High" selected="selected">High</option>
+        <option value="0" title="{/root/labels/off}"><xsl:value-of select="/root/labels/off" /></option>
+        <option value="1" title="{/root/labels/normal}"><xsl:value-of select="/root/labels/normal" /></option>
+        <option value="2" title="{/root/labels/high}" selected="selected"><xsl:value-of select="/root/labels/high" /></option>
        </xsl:when>
        <xsl:otherwise>
-        <option value="0" title="Off">Off</option>
-        <option value="1" title="Normal" selected="selected">Normal</option>
-        <option value="2" title="High">High</option>
+        <option value="0" title="{/root/labels/off}"><xsl:value-of select="/root/labels/off" /></option>
+        <option value="1" title="{/root/labels/normal}" selected="selected"><xsl:value-of select="/root/labels/normal" /></option>
+        <option value="2" title="{/root/labels/high}"><xsl:value-of select="/root/labels/high" /></option>
        </xsl:otherwise>
       </xsl:choose>
@@ -278,5 +351,5 @@
    </div>
    <div class="fsize">
-    <span title="File size">
+    <span title="{/root/labels/filesize}">
      <xsl:value-of select="f_size_bytes/@value" />
      <xsl:text> </xsl:text>
@@ -285,5 +358,5 @@
    </div>
    <div class="fchunks">
-    <span title="Chunks">
+    <span title="{/root/labels/chunks}">
      <xsl:choose>
       <xsl:when test="f_range_first != f_range_second">
@@ -299,7 +372,7 @@
    </div>
    <xsl:choose>
-    <xsl:when test="f_percentage = 1">
+    <xsl:when test="f_percentage = 1 and /root/allow_download = 'true'">
      <div class="fdownload">
-      <a href="?mod=getfile&amp;hash={/root/hash}&amp;id={@id}" title="Download file">Download</a>
+      <a href="?mod=getfile&amp;hash={/root/hash}&amp;id={@id}" title="{/root/labels/downloadfile}"><xsl:value-of select="/root/labels/download" /></a>
      </div>
     </xsl:when>
@@ -314,5 +387,5 @@
     <li>
      <div class="tgroup">
-      <span title="Tracker group">
+      <span title="{/root/labels/trackergroup}">
        <xsl:value-of select="t_group" />
        <xsl:text>:</xsl:text>
@@ -320,5 +393,5 @@
      </div>
      <div class="turl">
-      <span title="Type: {t_type/@value}">
+      <span title="{/root/labels/type}: {t_type/@value}">
        <xsl:value-of select="t_url" />
       </span>
@@ -330,23 +403,28 @@
       <xsl:choose>
        <xsl:when test="root/tottents/torrent_trackers_root/torrent_trackers/d_tracker_focus = @id">
-        <xsl:text>Focus: Yes</xsl:text>
+        <xsl:value-of select="/root/labels/focus" />
+        <xsl:text>: </xsl:text>
+        <xsl:value-of select="/root/labels/yes" />
        </xsl:when>
        <xsl:otherwise>
-        <xsl:text>Focus: No</xsl:text>
+        <xsl:value-of select="/root/labels/focus" />
+        <xsl:text>: </xsl:text>
+        <xsl:value-of select="/root/labels/no" />
        </xsl:otherwise>
       </xsl:choose>
      </div>
      <div class="tenabled">
-      <form class="changetrackerenabledform" name="changetrackerenabledfor_{@id}" method="post" action="{/root/iurl}?mod=changetrackerenabled&amp;hash={/root/hash}&amp;id={@id}">
-       <xsl:text>Enabled: </xsl:text>
-       <select class="whiteselect" name="rackerenabled" title="Select if tracker is enabled" onchange="loadcontent_trackerenabled( '{/root/iurl}', '{/root/hash}', '{@id}', this.value )">
+      <form class="changetrackerenabledform" name="changetrackerenabledform_{@id}" method="post" action="{/root/iurl}?mod=changetrackerenabled&amp;hash={/root/hash}&amp;id={@id}">
+       <xsl:value-of select="/root/labels/enabled" />
+       <xsl:text>: </xsl:text>
+       <select class="whiteselect" name="trackerenabled" title="{/root/labels/selecttrackerenabled}" onchange="loadcontent_trackerenabled( '{/root/iurl}', '{/root/hash}', '{@id}', this.value )">
         <xsl:choose>
          <xsl:when test="t_enabled = 0">
-          <option value="1" title="Yes">Yes</option>
-          <option value="0" title="No" selected="selected">No</option>
+          <option value="1" title="{/root/labels/yes}"><xsl:value-of select="/root/labels/yes" /></option>
+          <option value="0" title="{/root/labels/no}" selected="selected"><xsl:value-of select="/root/labels/no" /></option>
          </xsl:when>
          <xsl:otherwise>
-          <option value="1" title="Yes" selected="selected">Yes</option>
-          <option value="0" title="No">No</option>
+          <option value="1" title="{/root/labels/yes}" selected="selected"><xsl:value-of select="/root/labels/yes" /></option>
+          <option value="0" title="{/root/labels/no}"><xsl:value-of select="/root/labels/no" /></option>
          </xsl:otherwise>
         </xsl:choose>
@@ -355,16 +433,18 @@
      </div>
      <div class="topen">
-      <xsl:text>Open: </xsl:text>
+      <xsl:value-of select="/root/labels/opened" />
+      <xsl:text>: </xsl:text>
       <xsl:choose>
        <xsl:when test="t_open != 0">
-        <xsl:text>Yes</xsl:text>
+        <xsl:value-of select="/root/labels/yes" />
        </xsl:when>
        <xsl:otherwise>
-        <xsl:text>No</xsl:text>
+        <xsl:value-of select="/root/labels/no" />
        </xsl:otherwise>
       </xsl:choose>
      </div>
      <div class="tpeers">
-      <xsl:text>S/L: </xsl:text>
+      <xsl:value-of select="/root/labels/seedersleechers" />
+      <xsl:text>: </xsl:text>
       <xsl:value-of select="t_scrape_complete" />
       <xsl:text> / </xsl:text>
@@ -375,6 +455,7 @@
     <li>
      <div class="tscrape">
-      <span title="Minimum interval: {t_min_interval/@value} - Normal interval: {t_normal_interval/@value}">
-       <xsl:text>Last time scraped: </xsl:text>
+      <span title="{/root/labels/mininterval}: {t_min_interval/@value} - Normal interval: {t_normal_interval/@value}">
+       <xsl:value-of select="/root/labels/lasttimescraped" />
+       <xsl:text>: </xsl:text>
        <xsl:value-of select="t_scrape_time_last/@value" />
       </span>
Index: themes/default_ajax/layout.editor.index.xsl
===================================================================
--- themes/default_ajax/layout.editor.index.xsl	(revision 49fafb4c4b73ded67f75984b08c402355a202a61)
+++ themes/default_ajax/layout.editor.index.xsl	(revision 49fafb4c4b73ded67f75984b08c402355a202a61)
@@ -0,0 +1,103 @@
+﻿<xsl:stylesheet version="1.1"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                lang="en">
+ <xsl:output method="xml"
+             indent="no"
+             encoding="utf-8"
+             doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+             doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
+
+ <xsl:template match="root">
+  <html lang="en">
+   <head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+    <meta http-equiv="content-language" content="en" />
+    <meta http-equiv="cache-control" content="no-store, no-cache, must-revalidate, post-check=0, pre-check=0" />
+    <meta http-equiv="pragma" content="no-cache" />
+    <meta http-equiv="expires" content="thu, 1 jan 1970 00:00:00 gmt" />
+    <meta http-equiv="imagetoolbar" content="no" />  
+    <xsl:choose>
+     <xsl:when test="/root/torrents/@refreshrate != 0">
+      <meta http-equiv="refresh" content="{/root/torrents/@refreshrate}; url={curl}" />  
+     </xsl:when>
+    </xsl:choose>
+    <meta name="author" content="{/root/labels/author}" />
+    <meta name="description" content="{/root/labels/description}" />
+    <meta name="keywords" content="{/root/labels/keywords}" />
+    <meta name="doc-type" content="web page" />
+    <meta name="rating" content="general" />
+    <meta name="robots" content="all" />
+    <link rel="stylesheet" type="text/css" href="themes/default_ajax/inc/style.css" />
+    <script type="text/javascript" src="themes/default_ajax/inc/afunc.js"></script>
+    <script type="text/javascript" src="themes/default_ajax/inc/hfunc.js"></script>
+    <title><xsl:value-of select="/root/labels/title" /></title>
+   </head>
+   <body onload="toggle( '{/root/mod}_{/root/page}' );">
+    <div id="top">
+    </div>
+    <div id="main">
+     <div id="balh">
+      <div id="fomenu">
+       <ul>
+        <li class="first"><a href="{/root/url}" title="Main">Main</a></li>
+        <li><a href="?mod=loadtorrent" title="Load torrent">Load torrent</a></li>
+        <li><a href="?mod=savetorrent" title="Save torrent">Save torrent</a></li>
+       </ul>
+      </div>
+     </div>
+     <div id="kozeph">
+      <xsl:apply-templates select="err" />
+      <xsl:apply-templates select="torrent" />
+     </div>
+     <div class="clr1"></div>
+    </div>
+   </body>
+  </html>
+ </xsl:template>
+
+ <xsl:template match="err">
+  <div id="err">
+   <span title="Click to hide" onmouseover="this.style.cursor='pointer';" onclick="document.getElementById( 'err' ).style.display='none';">
+    <xsl:value-of select="errmsg" />
+   </span>
+  </div>
+ </xsl:template>
+
+ <xsl:template match="loadtorrent">
+  <form id="loadtorrent" name="loadtorrent" enctype="multipart/form-data" method="post" action="{/root/iurl}?mod=loadtorrent">
+   <ul class="tuform">
+    <li>
+     <div class="tufleft">Open from:</div>
+     <div class="tufright">
+      <select name="tfmethod" title="Open from" onchange="if ( this.value == 'url' ) {{ document.getElementById( 'torrenturl' ).style.display=''; document.getElementById( 'torrentfile' ).style.display='none'; }} else {{ document.getElementById( 'torrenturl' ).style.display='none'; document.getElementById( 'torrentfile' ).style.display=''; }}">
+       <option value="file">File upload</option>
+       <option value="url">URL</option>
+      </select>
+     </div>
+     <div class="clr"></div>
+    </li>
+    <li id="torrentfile">
+     <div class="tufleft">Torrent file:</div>
+     <div class="tufright">
+      <input type="hidden" name="MAX_FILE_SIZE" value="1000000" />
+      <input type="file" name="torrentfile" title="Torrent File" value="" />
+	  <input type="checkbox" name="keeptorrentfile" title="Keep the .torrent file" />
+	  <span>Keep the .torrent file</span>
+     </div>
+     <div class="clr"></div>
+    </li>
+    <li id="torrenturl">
+     <div class="tufleft">Torrent URL:</div>
+     <div class="tufright">
+      <input type="text" name="torrenturl" title="Torrent url" value="" />
+     </div>
+     <div class="clr"></div>
+    </li>
+    <li class="formsend">
+     <input class="inputok" type="submit" name="loadtorrent" title="Load torrent" value="Load torrent" />
+    </li>
+   </ul>
+  </form>
+ </xsl:template>
+
+</xsl:stylesheet>
Index: themes/default_ajax/layout.main.index.xsl
===================================================================
--- themes/default_ajax/layout.main.index.xsl	(revision fbc3369abde946a919e6c00b3dd10c2e5cb7d35b)
+++ themes/default_ajax/layout.main.index.xsl	(revision 49fafb4c4b73ded67f75984b08c402355a202a61)
@@ -1,7 +1,7 @@
 ﻿<xsl:stylesheet version="1.1"
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                lang="hu">
+                lang="en">
  <xsl:output method="xml"
-             indent="no"
+             indent="yes"
              encoding="utf-8"
              doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
@@ -9,8 +9,8 @@
 
  <xsl:template match="root">
-  <html lang="hu">
+  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{lang}" lang="{lang}">
    <head>
     <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-    <meta http-equiv="content-language" content="hu" />
+    <meta http-equiv="content-language" content="{lang}" />
     <meta http-equiv="cache-control" content="no-store, no-cache, must-revalidate, post-check=0, pre-check=0" />
     <meta http-equiv="pragma" content="no-cache" />
@@ -18,11 +18,11 @@
     <meta http-equiv="imagetoolbar" content="no" />  
     <xsl:choose>
-     <xsl:when test="/root/torrents/@refreshrate != 0">
-      <meta http-equiv="refresh" content="{/root/torrents/@refreshrate}; url={curl}" />  
-     </xsl:when>
-    </xsl:choose>
-    <meta name="author" content="{/root/labels/author}" />
-    <meta name="description" content="{/root/labels/description}" />
-    <meta name="keywords" content="{/root/labels/keywords}" />
+     <xsl:when test="torrents/@refreshrate != 0">
+      <meta http-equiv="refresh" content="{torrents/@refreshrate}; url={curl}" />  
+     </xsl:when>
+    </xsl:choose>
+    <meta name="author" content="{labels/author}" />
+    <meta name="description" content="{labels/description}" />
+    <meta name="keywords" content="{labels/keywords}" />
     <meta name="doc-type" content="web page" />
     <meta name="rating" content="general" />
@@ -31,43 +31,43 @@
     <script type="text/javascript" src="themes/default_ajax/inc/afunc.js"></script>
     <script type="text/javascript" src="themes/default_ajax/inc/hfunc.js"></script>
-    <title><xsl:value-of select="/root/labels/title" /></title>
+    <title><xsl:value-of select="labels/title" /></title>
    </head>
-   <body onload="toggle( '{/root/mod}_{/root/page}' );">
+   <body onload="toggle( '{mod}_{page}' );">
     <div id="top">
     </div>
     <div id="main">
-     <div id="balh">
-      <div id="fomenu">
+     <div id="leftcol">
+      <div id="mainmenu">
        <ul>
-        <li class="first"><a href="{/root/url}" title="Torrents">Torrents</a></li>
+        <li class="first"><a href="{url}" title="{labels/torrents}"><xsl:value-of select="labels/torrents" /></a></li>
         <xsl:choose>
-         <xsl:when test="/root/mod = 'torrent'">
+         <xsl:when test="mod = 'torrent'">
           <li class="submenu notshown">
-           <a href="?mod=torrent&amp;hash={/root/hash}&amp;page=peers" title="Peer list">Peer list</a>
+           <a href="?mod=torrent&amp;hash={hash}&amp;page=peers" title="{labels/peerlist}"><xsl:value-of select="labels/peerlist" /></a>
           </li>
           <li class="submenu">
-           <a href="?mod=torrent&amp;hash={/root/hash}&amp;page=info" title="Info">Info</a>
+           <a href="?mod=torrent&amp;hash={hash}&amp;page=info" title="{labels/info}"><xsl:value-of select="labels/info" /></a>
           </li>
           <li class="submenu">
-           <a href="?mod=torrent&amp;hash={/root/hash}&amp;page=files" title="File list">File list</a>
+           <a href="?mod=torrent&amp;hash={hash}&amp;page=files" title="{labels/filelist}"><xsl:value-of select="labels/filelist" /></a>
           </li>
           <li class="submenu">
-           <a href="?mod=torrent&amp;hash={/root/hash}&amp;page=trackers" title="Tracker list">Tracker list</a>
+           <a href="?mod=torrent&amp;hash={hash}&amp;page=trackers" title="{labels/trackerlist}"><xsl:value-of select="labels/trackerlist" /></a>
           </li>
           <li class="submenu notshown">
-           <a href="?mod=torrent&amp;hash={/root/hash}&amp;page=chunks" title="Chunks seen">Chunks seen</a>
+           <a href="?mod=torrent&amp;hash={hash}&amp;page=chunks" title="{labels/chunksseen}"><xsl:value-of select="labels/chunksseen" /></a>
           </li>
           <li class="submenu notshown">
-           <a href="?mod=torrent&amp;hash={/root/hash}&amp;page=transfers" title="Transfer list">Transfer list</a>
+           <a href="?mod=torrent&amp;hash={hash}&amp;page=transfers" title="{labels/transferlist}"><xsl:value-of select="labels/transferlist" /></a>
           </li>
          </xsl:when>
         </xsl:choose>
-        <li><a href="?mod=addtorrent" title="Add torrent">Add torrent</a></li>
-        <li><a href="?mod=serverinfo" title="Server info">Server info</a></li>
-        <li><a href="{/root/iurl}?mod=logout" title="Logout">Logout</a></li>
+        <li><a href="?mod=addtorrent" title="{labels/addtorrent}"><xsl:value-of select="labels/addtorrent" /></a></li>
+        <li><a href="?mod=serverinfo" title="{labels/serverinfo}"><xsl:value-of select="labels/serverinfo" /></a></li>
+        <li><a href="{iurl}?mod=logout" title="{labels/logout}"><xsl:value-of select="labels/logout" /></a></li>
        </ul>
       </div>
      </div>
-     <div id="kozeph">
+     <div id="maincol">
       <xsl:apply-templates select="err" />
       <xsl:apply-templates select="addtorrent" />
@@ -82,5 +82,5 @@
  <xsl:template match="err">
   <div id="err">
-   <span title="Click to hide" onmouseover="this.style.cursor='pointer';" onclick="document.getElementById( 'err' ).style.display='none';">
+   <span title="{/root/labels/clicktohide}" onmouseover="this.style.cursor='pointer';" onclick="document.getElementById( 'err' ).style.display='none';">
     <xsl:value-of select="errmsg" />
    </span>
@@ -92,9 +92,9 @@
    <ul class="tuform">
     <li>
-     <div class="tufleft">Open from:</div>
+     <div class="tufleft"><xsl:value-of select="/root/labels/openfrom" />:</div>
      <div class="tufright">
-      <select name="tfmethod" title="Open from" onchange="if ( this.value == 'url' ) {{ document.getElementById( 'torrenturl' ).style.display=''; document.getElementById( 'torrentfile' ).style.display='none'; }} else {{ document.getElementById( 'torrenturl' ).style.display='none'; document.getElementById( 'torrentfile' ).style.display=''; }}">
-       <option value="file">File upload</option>
-       <option value="url">URL</option>
+      <select name="tfmethod" title="{/root/labels/openfrom}" onchange="if ( this.value == 'url' ) {{ document.getElementById( 'torrenturl' ).style.display=''; document.getElementById( 'torrentfile' ).style.display='none'; }} else {{ document.getElementById( 'torrenturl' ).style.display='none'; document.getElementById( 'torrentfile' ).style.display=''; }}">
+       <option value="file"><xsl:value-of select="/root/labels/fileupload" /></option>
+       <option value="url"><xsl:value-of select="/root/labels/url" /></option>
       </select>
      </div>
@@ -102,29 +102,27 @@
     </li>
     <li id="torrentfile">
-     <div class="tufleft">Torrent file:</div>
+     <div class="tufleft"><xsl:value-of select="/root/labels/torrentfile" />:</div>
      <div class="tufright">
       <input type="hidden" name="MAX_FILE_SIZE" value="1000000" />
-      <input type="file" name="torrentfile" title="Torrent File" value="" />
-	  <input type="checkbox" name="keeptorrentfile" title="Keep the .torrent file" />
-	  <span>Keep the .torrent file</span>
+      <input type="file" name="torrentfile" title="{/root/labels/torrentfile}" value="" />
      </div>
      <div class="clr"></div>
     </li>
     <li id="torrenturl">
-     <div class="tufleft">Torrent URL:</div>
+     <div class="tufleft"><xsl:value-of select="/root/labels/torrenturl" />:</div>
      <div class="tufright">
-      <input type="text" name="torrenturl" title="Torrent url" value="" />
+      <input type="text" name="torrenturl" title="{/root/labels/torrenturl}" value="" />
      </div>
      <div class="clr"></div>
     </li>
     <li>
-     <div class="tufleft">Start torrent:</div>
+     <div class="tufleft"><xsl:value-of select="/root/labels/starttorrent" />:</div>
      <div class="tufright">
-      <input type="checkbox" name="torrentstart" title="Start torrent after added" value="start" checked="checked" />
+      <input type="checkbox" name="torrentstart" title="{/root/labels/starttorrentafteradded}" value="start" checked="checked" />
      </div>
      <div class="clr"></div>
     </li>
     <li>
-     <div class="tufleft">Download to:</div>
+     <div class="tufleft"><xsl:value-of select="/root/labels/downloadto" />:</div>
      <div class="tufright">
       <input type="hidden" name="dlpath" value="{@path}" />
@@ -147,5 +145,5 @@
     </li>
     <li class="formsend">
-     <input class="inputok" type="submit" name="addtorrent" title="Add torrent" value="Add torrent" />
+     <input class="inputok" type="submit" name="addtorrent" title="{/root/labels/addtorrent}" value="{/root/labels/addtorrent}" />
     </li>
    </ul>
@@ -160,21 +158,19 @@
     <xsl:choose>
      <xsl:when test="/root/mod = ''">
-      <div>
-       <form id="doonalltorrentform" name="doonalltorrentform" method="post" action="{/root/iurl}?mod=doonalltorrent">
-        <select class="whiteselect" name="task" title="Select task" onchange="window.location='{/root/iurl}?mod=doonalltorrent&amp;task='+this.value;">
-         <option value="select" title="Select task" selected="selected">Select task</option>
-         <option value="start" title="Start all">Start all</option>
-         <option value="stop" title="Stop all">Stop all</option>
-         <option value="open" title="Open all">Open all</option>
-         <option value="close" title="Close all">Close all</option>
-         <option value="checkhash" title="Check all">Check all</option>
-         <option value="remove" title="Remove all">Remove all</option>
-         <option value="erase" title="Erase all">Erase all</option>
-        </select>
-        <noscript>
-         <input class="submit" id="doatsubmit" type="submit" name="doatsubmit" title="OK" value="OK" />
-        </noscript>
-       </form>
-      </div>
+      <form id="doonalltorrentform" name="doonalltorrentform" method="post" action="{/root/iurl}?mod=doonalltorrent">
+       <select class="whiteselect" name="task" title="{/root/labels/selecttask}" onchange="window.location='{/root/iurl}?mod=doonalltorrent&amp;task='+this.value;">
+        <option value="select" title="{/root/labels/selecttask}" selected="selected"><xsl:value-of select="/root/labels/selecttask" /></option>
+        <option value="start" title="{/root/labels/startall}"><xsl:value-of select="/root/labels/startall" /></option>
+        <option value="stop" title="{/root/labels/stopall}"><xsl:value-of select="/root/labels/stopall" /></option>
+        <option value="open" title="{/root/labels/openall}"><xsl:value-of select="/root/labels/openall" /></option>
+        <option value="close" title="{/root/labels/closeall}"><xsl:value-of select="/root/labels/closeall" /></option>
+        <option value="checkhash" title="{/root/labels/checkall}"><xsl:value-of select="/root/labels/checkall" /></option>
+        <option value="remove" title="{/root/labels/removeall}"><xsl:value-of select="/root/labels/removeall" /></option>
+        <option value="erase" title="{/root/labels/eraseall}"><xsl:value-of select="/root/labels/eraseall" /></option>
+       </select>
+       <noscript>
+        <input class="submit" id="doatsubmit" type="submit" name="doatsubmit" title="{/root/labels/ok}" value="{/root/labels/ok}" />
+       </noscript>
+      </form>
      </xsl:when>
     </xsl:choose>
@@ -187,25 +183,48 @@
    <xsl:apply-templates select="server_info" />
    <li class="tline last">
-    <div class="tthrottle" onmouseover="this.style.cursor='pointer';" onclick="toggle( '_info_restore' );">
-     <form id="changethrottleform" name="changethrottleform" method="post" action="{/root/iurl}?mod=changethrottle">
-      <span title="Click to change">[Throttle </span>
-      <span title="Upload limit">
-       <span id="throttleup" style="display: none;"><xsl:value-of select="upload_rate/@value" /></span>
-       <input type="text" id="throttleupinput" name="upspeed" value="{upload_rate/@value}" />
-       <xsl:text> KB</xsl:text>
-      </span>
-      <xsl:text> / </xsl:text>
-      <span title="Download limit">
-       <span id="throttledown" style="display: none;"><xsl:value-of select="download_rate/@value" /></span>
-       <input type="text" id="throttledowninput" name="downspeed" value="{download_rate/@value}" />
-       <xsl:text> KB</xsl:text>
-      </span>
-      <input class="submit" id="tsubmit" type="submit" name="tsubmit" title="OK" value="OK" />
-      <xsl:text>]</xsl:text>
-     </form>
-    </div>
+    <xsl:choose>
+     <xsl:when test="/root/allow_throttle = 'true'">
+      <div class="tthrottle" onmouseover="this.style.cursor='pointer';" onclick="toggle( '_info_restore' );">
+       <form id="changethrottleform" name="changethrottleform" method="post" action="{/root/iurl}?mod=changethrottle">
+        <span title="{/root/labels/clicktochange}">
+         <xsl:text>[</xsl:text>
+         <xsl:value-of select="/root/labels/throttle" />
+         <xsl:text> </xsl:text>
+        </span>
+        <span title="{/root/labels/uploadlimit}">
+         <span id="throttleup" style="display: none;"><xsl:value-of select="upload_rate/@value" /></span>
+         <input type="text" id="throttleupinput" name="upspeed" value="{upload_rate/@value}" />
+         <xsl:text> KB</xsl:text>
+        </span>
+        <xsl:text> / </xsl:text>
+        <span title="{/root/labels/downloadlimit}">
+         <span id="throttledown" style="display: none;"><xsl:value-of select="download_rate/@value" /></span>
+         <input type="text" id="throttledowninput" name="downspeed" value="{download_rate/@value}" />
+         <xsl:text> KB</xsl:text>
+        </span>
+        <input class="submit" id="tsubmit" type="submit" name="tsubmit" title="{/root/labels/ok}" value="{/root/labels/ok}" />
+        <xsl:text>]</xsl:text>
+       </form>
+      </div>
+     </xsl:when>
+     <xsl:otherwise>
+      <div class="tthrottle">
+        <span>
+         <xsl:text>[</xsl:text>
+         <xsl:value-of select="/root/labels/throttle" />
+         <xsl:text> </xsl:text>
+        </span>
+       <span title="{/root/labels/uploadlimit}"><xsl:value-of select="upload_rate/@value" /> KB</span>
+       <xsl:text> / </xsl:text>
+       <span title="{/root/labels/downloadlimit}"><xsl:value-of select="download_rate/@value" /> KB</span>
+       <xsl:text>]</xsl:text>
+      </div>
+     </xsl:otherwise>
+    </xsl:choose>
     <div class="trates_total">
-     <xsl:text>[Rate </xsl:text>
-     <span title="Upload speed">
+     <xsl:text>[</xsl:text>
+     <xsl:value-of select="/root/labels/rate" />
+     <xsl:text> </xsl:text>
+     <span title="{/root/labels/uploadspeed}">
       <xsl:value-of select="bytes_up/@value" />
       <xsl:text> </xsl:text>
@@ -213,5 +232,5 @@
      </span>
      <xsl:text> / </xsl:text>
-     <span title="Download speed">
+     <span title="{/root/labels/downloadspeed}">
       <xsl:value-of select="bytes_down/@value" />
       <xsl:text> </xsl:text>
@@ -227,10 +246,12 @@
  <xsl:template match="viewtypes">
   <form id="changeviewform" name="changeviewform" method="post" action="{/root/iurl}?mod=changeview">
-   <xsl:text>[View: </xsl:text>
-   <select class="whiteselect" name="viewtype" title="Select view type" onchange="window.location='{/root/iurl}?mod=changeview&amp;viewtype='+this.value;">
+   <xsl:text>[</xsl:text>
+   <xsl:value-of select="/root/labels/view" />
+   <xsl:text>: </xsl:text>
+   <select class="whiteselect" name="viewtype" title="{/root/labels/selectviewtype}" onchange="window.location='{/root/iurl}?mod=changeview&amp;viewtype='+this.value;">
     <xsl:apply-templates select="viewtype" />
    </select>
    <noscript>
-    <input class="submit" id="vtsubmit" type="submit" name="vtsubmit" title="OK" value="OK" />
+    <input class="submit" id="vtsubmit" type="submit" name="vtsubmit" title="{/root/labels/ok}" value="{/root/labels/ok}" />
    </noscript>
    <xsl:text>]</xsl:text>
@@ -251,10 +272,12 @@
  <xsl:template match="refreshrates">
   <form id="changerefreshform" name="changerefreshform" method="post" action="{/root/iurl}?mod=changerefresh">
-   <xsl:text>[Refresh: </xsl:text>
-   <select class="whiteselect" name="refreshrate" title="Select refresh rate" onchange="window.location='{/root/iurl}?mod=changerefresh&amp;refreshrate='+this.value;">
+   <xsl:text>[</xsl:text>
+   <xsl:value-of select="/root/labels/refresh" />
+   <xsl:text>: </xsl:text>
+   <select class="whiteselect" name="refreshrate" title="{/root/labels/selectrefreshrate}" onchange="window.location='{/root/iurl}?mod=changerefresh&amp;refreshrate='+this.value;">
     <xsl:apply-templates select="refreshrate" />
    </select>
    <noscript>
-    <input class="submit" id="rrsubmit" type="submit" name="rrsubmit" title="OK" value="OK" />
+    <input class="submit" id="rrsubmit" type="submit" name="rrsubmit" title="{/root/labels/ok}" value="{/root/labels/ok}" />
    </noscript>
    <xsl:text>]</xsl:text>
@@ -278,29 +301,36 @@
     <xsl:choose>
      <xsl:when test="d_active != 0">
-      <img class="icon" src="themes/default_ajax/pics/{d_connection_current}ing.png" alt="{d_connection_current}" title="{d_connection_current/@value} since {d_state_changed/@value}" />
+      <img class="icon" src="themes/default_ajax/pics/{d_connection_current}ing.png" alt="{d_connection_current}" title="{d_connection_current/@value} {/root/labels/sincepre} {d_state_changed/@value} {/root/labels/sincepost}" />
      </xsl:when>
      <xsl:when test="d_hashing != 0">
-      <img class="icon" src="themes/default_ajax/pics/hashing.png" alt="hashing" title="Hashing since {d_state_changed/@value}" />
+      <img class="icon" src="themes/default_ajax/pics/hashing.png" alt="{/root/labels/hashing}" title="{/root/labels/hashingsince} {d_state_changed/@value}" />
      </xsl:when>
      <xsl:when test="d_complete != 0">
       <xsl:choose>
        <xsl:when test="d_open != 0">
-        <img class="icon" src="themes/default_ajax/pics/finished.png" alt="finished" title="Finished since {d_state_changed/@value}" />
+        <img class="icon" src="themes/default_ajax/pics/finished.png" alt="{/root/labels/finished}" title="{/root/labels/finishedsince} {d_state_changed/@value}" />
        </xsl:when>
        <xsl:otherwise>
-        <img class="icon" src="themes/default_ajax/pics/finished_c.png" alt="finished" title="Finished since {d_state_changed/@value}" />
+        <img class="icon" src="themes/default_ajax/pics/finished_c.png" alt="{/root/labels/finished}" title="{/root/labels/finishedsince} {d_state_changed/@value}" />
        </xsl:otherwise>
       </xsl:choose>
      </xsl:when>
      <xsl:when test="d_open != 0">
-      <img class="icon" src="themes/default_ajax/pics/stopped.png" alt="stopped" title="Stopped since {d_state_changed/@value}" />
+      <img class="icon" src="themes/default_ajax/pics/stopped.png" alt="{/root/labels/stopped}" title="{/root/labels/stoppedsince} {d_state_changed/@value}" />
      </xsl:when>
      <xsl:otherwise>
-      <img class="icon" src="themes/default_ajax/pics/closed.png" alt="closed" title="Closed since {d_state_changed/@value}" />
+      <img class="icon" src="themes/default_ajax/pics/closed.png" alt="{/root/labels/closed}" title="{/root/labels/closedsince} {d_state_changed/@value}" />
      </xsl:otherwise>
     </xsl:choose>
    </div>
    <div class="tname">
-    <a href="?mod=torrent&amp;hash={d_hash}" title="Details" onclick="if ( document.getElementById( 'torrent_{d_hash}' ).style.display == '' ) {{ document.getElementById( 'torrent_{d_hash}' ).style.display = 'none' }} else {{ document.getElementById( 'torrent_{d_hash}' ).style.display = ''}} return false;"><xsl:value-of select="d_name" /></a>
+    <xsl:choose>
+     <xsl:when test="/root/allow_ajax = 'true'">
+      <a href="?mod=torrent&amp;hash={d_hash}" title="{/root/labels/details}" onclick="if ( document.getElementById( 'torrent_{d_hash}' ).style.display == '' ) {{ document.getElementById( 'torrent_{d_hash}' ).style.display = 'none' }} else {{ document.getElementById( 'torrent_{d_hash}' ).style.display = ''}} return false;"><xsl:value-of select="d_name" /></a>
+     </xsl:when>
+     <xsl:otherwise>
+      <a href="?mod=torrent&amp;hash={d_hash}" title="{/root/labels/details}"><xsl:value-of select="d_name" /></a>
+     </xsl:otherwise>
+    </xsl:choose>
    </div>
    <div class="tops">
@@ -310,18 +340,18 @@
      </xsl:when>
      <xsl:otherwise>
-      <a href="{/root/iurl}?mod=torrentcheckhash&amp;hash={d_hash}" title="Check hash">Check hash</a>
+      <a href="{/root/iurl}?mod=torrentcheckhash&amp;hash={d_hash}" title="{/root/labels/checkhash}"><xsl:value-of select="/root/labels/checkhash" /></a>
      </xsl:otherwise>
     </xsl:choose>
     <xsl:choose>
      <xsl:when test="d_active != 0">
-      <a href="{/root/iurl}?mod=torrentstop&amp;hash={d_hash}" title="Stop">Stop</a>
+      <a href="{/root/iurl}?mod=torrentstop&amp;hash={d_hash}" title="{/root/labels/stop}"><xsl:value-of select="/root/labels/stop" /></a>
      </xsl:when>
      <xsl:otherwise>
       <xsl:choose>
        <xsl:when test="d_hashing != 0">
-        <a href="{/root/iurl}?mod=torrentstop&amp;hash={d_hash}" title="Stop">Stop</a>
+        <a href="{/root/iurl}?mod=torrentstop&amp;hash={d_hash}" title="{/root/labels/stop}"><xsl:value-of select="/root/labels/stop" /></a>
        </xsl:when>
        <xsl:otherwise>
-        <a href="{/root/iurl}?mod=torrentstart&amp;hash={d_hash}" title="Start">Start</a>
+        <a href="{/root/iurl}?mod=torrentstart&amp;hash={d_hash}" title="{/root/labels/start}"><xsl:value-of select="/root/labels/start" /></a>
        </xsl:otherwise>
       </xsl:choose>
@@ -330,12 +360,16 @@
     <xsl:choose>
      <xsl:when test="d_open = 0">
-      <a href="{/root/iurl}?mod=torrentopen&amp;hash={d_hash}" title="Open">Open</a>
+      <a href="{/root/iurl}?mod=torrentopen&amp;hash={d_hash}" title="{/root/labels/open}"><xsl:value-of select="/root/labels/open" /></a>
      </xsl:when>
      <xsl:otherwise>
-      <a href="{/root/iurl}?mod=torrentclose&amp;hash={d_hash}" title="Close">Close</a>
+      <a href="{/root/iurl}?mod=torrentclose&amp;hash={d_hash}" title="{/root/labels/close}"><xsl:value-of select="/root/labels/close" /></a>
      </xsl:otherwise>
     </xsl:choose>
-    <a href="{/root/iurl}?mod=torrentremove&amp;hash={d_hash}" title="Remove" onclick="var answer = confirm( 'Are you sure?' ); if ( !answer ) return false;">Remove</a>
-    <a href="{/root/iurl}?mod=torrenterase&amp;hash={d_hash}" title="Erase" onclick="var answer = confirm( 'Are you sure? Downloaded data will be erased.' ); if ( !answer ) return false;">Erase</a>
+    <a href="{/root/iurl}?mod=torrentremove&amp;hash={d_hash}" title="{/root/labels/remove}" onclick="var answer = confirm( '{/root/labels/areyousure}' ); if ( !answer ) return false;"><xsl:value-of select="/root/labels/remove" /></a>
+    <xsl:choose>
+     <xsl:when test="/root/allow_erase = 'true'">
+      <a href="{/root/iurl}?mod=torrenterase&amp;hash={d_hash}" title="{/root/labels/erase}" onclick="var answer = confirm( '{/root/labels/areyousureerase}' ); if ( !answer ) return false;"><xsl:value-of select="/root/labels/erase" /></a>
+     </xsl:when>
+    </xsl:choose>
    </div>
    <div class="clr"></div>
@@ -343,8 +377,8 @@
     <xsl:choose>
      <xsl:when test="d_complete = 1">
-      <span title="Download finished">done </span>
+      <span title="{/root/labels/downloadfinished}"><xsl:value-of select="/root/labels/done" /> </span>
      </xsl:when>
      <xsl:otherwise>
-      <span title="Downloaded data">
+      <span title="{/root/labels/downloadeddata}">
        <xsl:value-of select="d_bytes_done/@value" />
        <xsl:text> </xsl:text>
@@ -354,5 +388,5 @@
      </xsl:otherwise>
     </xsl:choose>
-    <span title="Torrent size">
+    <span title="{/root/labels/torrentsize}">
      <xsl:value-of select="d_size_bytes/@value" />
      <xsl:text> </xsl:text>
@@ -361,6 +395,7 @@
    </div>
    <div class="trates">
-    <xsl:text>Rate: </xsl:text>
-    <span title="Upload speed">
+    <xsl:value-of select="/root/labels/rate" />
+    <xsl:text>: </xsl:text>
+    <span title="{/root/labels/uploadspeed}">
      <xsl:value-of select="d_up_rate/@value" />
      <xsl:text> </xsl:text>
@@ -368,5 +403,5 @@
     </span>
     <xsl:text> / </xsl:text>
-    <span title="Download speed">
+    <span title="{/root/labels/downloadspeed}">
      <xsl:value-of select="d_down_rate/@value" />
      <xsl:text> </xsl:text>
@@ -375,6 +410,6 @@
    </div>
    <div class="tupbytes">
-    <span>Uploaded: </span>
-    <span title="Uploaded data">
+    <span><xsl:value-of select="/root/labels/uploaded" />: </span>
+    <span title="{/root/labels/uploadeddata}">
      <xsl:value-of select="d_up_total/@value" />
      <xsl:text> </xsl:text>
@@ -384,15 +419,35 @@
    <xsl:choose>
     <xsl:when test="d_percentage != 1">
-     <div class="tpercentage">
-      <span title="{d_percentage/@value} percent completed">
-       <xsl:text>[</xsl:text>
-       <xsl:value-of select="d_percentage/@value" />
-       <xsl:text> %]</xsl:text>
-      </span>
-     </div>
+     <xsl:choose>
+      <xsl:when test="d_hashing != 0">
+       <div class="tpercentage">
+        <span title="{d_hpercentage/@value} {/root/labels/percenthashed}">
+         <xsl:text>[</xsl:text>
+         <xsl:value-of select="d_hpercentage/@value" />
+         <xsl:text> %]</xsl:text>
+        </span>
+       </div>
+       <div class="tpercentage">
+        <span title="{d_percentage/@value} {/root/labels/percentcompleted}">
+         <xsl:text>[</xsl:text>
+         <xsl:value-of select="d_percentage/@value" />
+         <xsl:text> %]</xsl:text>
+        </span>
+       </div>
+      </xsl:when>
+      <xsl:otherwise>
+       <div class="tpercentage">
+        <span title="{d_percentage/@value} {/root/labels/percentcompleted}">
+         <xsl:text>[</xsl:text>
+         <xsl:value-of select="d_percentage/@value" />
+         <xsl:text> %]</xsl:text>
+        </span>
+       </div>
+      </xsl:otherwise>
+     </xsl:choose>
      <xsl:choose>
       <xsl:when test="d_estimated_time != ''">
        <div class="testimate">
-        <span title="Estimated time remaining">
+        <span title="{/root/labels/estimatedtimeremaining}">
          <xsl:value-of select="d_estimated_time/@value" />
         </span>
@@ -406,13 +461,13 @@
     <xsl:choose>
      <xsl:when test="d_tied_to_file != ''">
-      <span title="Tied to file">T</span>
+      <span title="{/root/labels/tiedtofile}">T</span>
      </xsl:when>
     </xsl:choose>
     <xsl:choose>
      <xsl:when test="d_ignore_commands != 0">
-      <span title="Ignoring commands">I</span>
-     </xsl:when>
-    </xsl:choose>
-    <span title="Ratio">
+      <span title="{/root/labels/ignoringcommands}">I</span>
+     </xsl:when>
+    </xsl:choose>
+    <span title="{/root/labels/ratio}">
      <xsl:text> R: </xsl:text>
      <xsl:value-of select="d_ratio/@value" />
@@ -422,34 +477,34 @@
    <div class="tpriority">
     <form class="changepriorityform" name="changepriorityform_{d_hash}" method="post" action="{/root/iurl}?mod=changepriority&amp;hash={d_hash}">
-     <select class="whiteselect" name="priority" title="Select priority" onchange="window.location='{/root/iurl}?mod=changepriority&amp;hash={d_hash}&amp;priority='+this.value;">
+     <select class="whiteselect" name="priority" title="{/root/labels/selectpriority}" onchange="window.location='{/root/iurl}?mod=changepriority&amp;hash={d_hash}&amp;priority='+this.value;">
       <xsl:choose>
        <xsl:when test="d_priority = 0">
-        <option value="0" title="Off" selected="selected">Off</option>
-        <option value="1" title="Low">Low</option>
-        <option value="2" title="Normal">Normal</option>
-        <option value="3" title="High">High</option>
+        <option value="0" title="{/root/labels/off}" selected="selected"><xsl:value-of select="/root/labels/off" /></option>
+        <option value="1" title="{/root/labels/low}"><xsl:value-of select="/root/labels/low" /></option>
+        <option value="2" title="{/root/labels/normal}"><xsl:value-of select="/root/labels/normal" /></option>
+        <option value="3" title="{/root/labels/high}"><xsl:value-of select="/root/labels/high" /></option>
        </xsl:when>
        <xsl:when test="d_priority = 1">
-        <option value="0" title="Off">Off</option>
-        <option value="1" title="Low" selected="selected">Low</option>
-        <option value="2" title="Normal">Normal</option>
-        <option value="3" title="High">High</option>
+        <option value="0" title="{/root/labels/off}"><xsl:value-of select="/root/labels/off" /></option>
+        <option value="1" title="{/root/labels/low}" selected="selected"><xsl:value-of select="/root/labels/low" /></option>
+        <option value="2" title="{/root/labels/normal}"><xsl:value-of select="/root/labels/normal" /></option>
+        <option value="3" title="{/root/labels/high}"><xsl:value-of select="/root/labels/high" /></option>
        </xsl:when>
        <xsl:when test="d_priority = 3">
-        <option value="0" title="Off">Off</option>
-        <option value="1" title="Low">Low</option>
-        <option value="2" title="Normal">Normal</option>
-        <option value="3" title="High" selected="selected">High</option>
+        <option value="0" title="{/root/labels/off}"><xsl:value-of select="/root/labels/off" /></option>
+        <option value="1" title="{/root/labels/low}"><xsl:value-of select="/root/labels/low" /></option>
+        <option value="2" title="{/root/labels/normal}"><xsl:value-of select="/root/labels/normal" /></option>
+        <option value="3" title="{/root/labels/high}" selected="selected"><xsl:value-of select="/root/labels/high" /></option>
        </xsl:when>
        <xsl:otherwise>
-        <option value="0" title="Off">Off</option>
-        <option value="1" title="Low">Low</option>
-        <option value="2" title="Normal" selected="selected">Normal</option>
-        <option value="3" title="High">High</option>
+        <option value="0" title="{/root/labels/off}"><xsl:value-of select="/root/labels/off" /></option>
+        <option value="1" title="{/root/labels/low}"><xsl:value-of select="/root/labels/low" /></option>
+        <option value="2" title="{/root/labels/normal}" selected="selected"><xsl:value-of select="/root/labels/normal" /></option>
+        <option value="3" title="{/root/labels/high}"><xsl:value-of select="/root/labels/high" /></option>
        </xsl:otherwise>
       </xsl:choose>
      </select>
      <noscript>
-      <input class="submit" type="submit" name="submit" value="OK" title="OK" />
+      <input class="submit" type="submit" name="submit" value="{/root/labels/ok}" title="{/root/labels/ok}" />
      </noscript>
     </form>
@@ -457,14 +512,18 @@
    <div class="clr"></div>
    <div class="tmessage">
-    <span>Message: <xsl:value-of select="d_message" /></span>
-   </div>
-   <div class="clr"></div>
-   <div class="tcontainer" id="torrent_{d_hash}" style="display: none;">
-    <a class="info" href="?mod=torrent&amp;hash={d_hash}&amp;page=info" title="Info" onclick="loadcontent( '{d_hash}', 'info' ); return false;">Info</a>
-    <a class="files" href="?mod=torrent&amp;hash={d_hash}&amp;page=files" title="File list" onclick="loadcontent( '{d_hash}', 'files' ); return false;">File list</a>
-    <a class="trackers" href="?mod=torrent&amp;hash={d_hash}&amp;page=trackers" title="Tracker list" onclick="loadcontent( '{d_hash}', 'trackers' ); return false;">Tracker list</a>
-    <div class="clr"></div>
-    <div class="tcontent" id="torrent_{d_hash}_content"></div>
-   </div>
+    <span><xsl:value-of select="/root/labels/message" />: <xsl:value-of select="d_message" /></span>
+   </div>
+   <div class="clr"></div>
+   <xsl:choose>
+    <xsl:when test="/root/allow_ajax = 'true'">
+     <div class="tcontainer" id="torrent_{d_hash}" style="display: none;">
+      <a class="info" href="?mod=torrent&amp;hash={d_hash}&amp;page=info" title="{/root/labels/info}" onclick="loadcontent( '{d_hash}', 'info' ); return false;"><xsl:value-of select="/root/labels/info" /></a>
+      <a class="files" href="?mod=torrent&amp;hash={d_hash}&amp;page=files" title="{/root/labels/filelist}" onclick="loadcontent( '{d_hash}', 'files' ); return false;"><xsl:value-of select="/root/labels/filelist" /></a>
+      <a class="trackers" href="?mod=torrent&amp;hash={d_hash}&amp;page=trackers" title="{/root/labels/trackerlist}" onclick="loadcontent( '{d_hash}', 'trackers' ); return false;"><xsl:value-of select="/root/labels/trackerlist" /></a>
+      <div class="clr"></div>
+      <div class="tcontent" id="torrent_{d_hash}_content"></div>
+     </div>
+    </xsl:when>
+   </xsl:choose>
    <div class="clr"></div>
   </li>
@@ -478,5 +537,5 @@
   <li class="line spacer">
    <div class="infoleft">
-    <xsl:text>Name:</xsl:text>
+    <xsl:value-of select="/root/labels/name" />
    </div>
    <div class="inforight">
@@ -487,5 +546,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Info hash:</xsl:text>
+    <xsl:value-of select="/root/labels/infohash" />
    </div>
    <div class="inforight">
@@ -496,5 +555,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Local ID:</xsl:text>
+    <xsl:value-of select="/root/labels/localid" />
    </div>
    <div class="inforight">
@@ -505,5 +564,5 @@
   <li class="line spacer">
    <div class="infoleft">
-    <xsl:text>Local ID (html):</xsl:text>
+    <xsl:value-of select="/root/labels/localidhtml" />
    </div>
    <div class="inforight">
@@ -514,5 +573,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Directory:</xsl:text>
+    <xsl:value-of select="/root/labels/directory" />
    </div>
    <div class="inforight">
@@ -523,5 +582,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Tied to file:</xsl:text>
+    <xsl:value-of select="/root/labels/tiedtofile" />
    </div>
    <div class="inforight">
@@ -531,5 +590,5 @@
      </xsl:when>
      <xsl:otherwise>
-      <xsl:text>No</xsl:text>
+      <xsl:value-of select="/root/labels/no" />
      </xsl:otherwise>
     </xsl:choose>
@@ -539,5 +598,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>File stats:</xsl:text>
+    <xsl:value-of select="/root/labels/filestats" />
    </div>
    <div class="inforight">
@@ -547,5 +606,6 @@
       <xsl:text> </xsl:text>
       <xsl:value-of select="d_size_files" />
-      <xsl:text> files</xsl:text>
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="/root/labels/files" />
      </xsl:when>
     </xsl:choose>
@@ -555,5 +615,5 @@
   <li class="line spacer">
    <div class="infoleft">
-    <xsl:text>Private:</xsl:text>
+    <xsl:value-of select="/root/labels/private" />
    </div>
    <div class="inforight">
@@ -564,5 +624,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Chunks:</xsl:text>
+    <xsl:value-of select="/root/labels/chunks" />
    </div>
    <div class="inforight">
@@ -579,5 +639,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Priority:</xsl:text>
+    <xsl:value-of select="/root/labels/priority" />
    </div>
    <div class="inforight">
@@ -588,5 +648,5 @@
   <li class="line spacer">
    <div class="infoleft">
-    <xsl:text>State changed:</xsl:text>
+    <xsl:value-of select="/root/labels/statechanged" />
    </div>
    <div class="inforight">
@@ -597,5 +657,5 @@
   <li class="line spacer">
    <div class="infoleft">
-    <xsl:text>Free diskspace:</xsl:text>
+    <xsl:value-of select="/root/labels/freediskspace" />
    </div>
    <div class="inforight">
@@ -608,5 +668,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Connection type:</xsl:text>
+    <xsl:value-of select="/root/labels/connectiontype" />
    </div>
    <div class="inforight">
@@ -617,5 +677,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Trackers:</xsl:text>
+    <xsl:value-of select="/root/labels/trackers" />
    </div>
    <div class="inforight">
@@ -626,5 +686,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Leechers:</xsl:text>
+    <xsl:value-of select="/root/labels/leechers" />
    </div>
    <div class="inforight">
@@ -635,5 +695,5 @@
   <li class="line spacer">
    <div class="infoleft">
-    <xsl:text>Seeders:</xsl:text>
+    <xsl:value-of select="/root/labels/seeders" />
    </div>
    <div class="inforight">
@@ -644,5 +704,25 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Upload:</xsl:text>
+    <xsl:value-of select="/root/labels/pexenabled" />
+   </div>
+   <div class="inforight">
+    <xsl:value-of select="d_pex_active/@value" />
+   </div>
+   <div class="clr"></div>
+  </li>
+  <li class="line spacer">
+   <div class="infoleft">
+    <xsl:value-of select="/root/labels/pexsize" />
+   </div>
+   <div class="inforight">
+    <xsl:value-of select="d_size_pex" />
+    <xsl:text> / </xsl:text>
+    <xsl:value-of select="d_max_size_pex" />
+   </div>
+   <div class="clr"></div>
+  </li>
+  <li class="line">
+   <div class="infoleft">
+    <xsl:value-of select="/root/labels/upload" />
    </div>
    <div class="inforight">
@@ -659,5 +739,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Download:</xsl:text>
+    <xsl:value-of select="/root/labels/download" />
    </div>
    <div class="inforight">
@@ -674,5 +754,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Skipped:</xsl:text>
+    <xsl:value-of select="/root/labels/skipped" />
    </div>
    <div class="inforight">
@@ -708,5 +788,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Client version:</xsl:text>
+    <xsl:value-of select="/root/labels/clientversion" />
    </div>
    <div class="inforight">
@@ -717,5 +797,5 @@
   <li class="line spacer">
    <div class="infoleft">
-    <xsl:text>Library version:</xsl:text>
+    <xsl:value-of select="/root/labels/libraryversion" />
    </div>
    <div class="inforight">
@@ -726,5 +806,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Working directory:</xsl:text>
+    <xsl:value-of select="/root/labels/workingdirectory" />
    </div>
    <div class="inforight">
@@ -735,5 +815,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Download directory:</xsl:text>
+    <xsl:value-of select="/root/labels/downloaddirectory" />
    </div>
    <div class="inforight">
@@ -744,5 +824,5 @@
   <li class="line spacer">
    <div class="infoleft">
-    <xsl:text>Session directory:</xsl:text>
+    <xsl:value-of select="/root/labels/sessiondirectory" />
    </div>
    <div class="inforight">
@@ -753,5 +833,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Hostname:</xsl:text>
+    <xsl:value-of select="/root/labels/hostname" />
    </div>
    <div class="inforight">
@@ -762,5 +842,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Listening IP address:</xsl:text>
+    <xsl:value-of select="/root/labels/listeningipaddress" />
    </div>
    <div class="inforight">
@@ -771,5 +851,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>IP address reported to the tracker:</xsl:text>
+    <xsl:value-of select="/root/labels/reportedipaddress" />
    </div>
    <div class="inforight">
@@ -780,5 +860,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Port opened:</xsl:text>
+    <xsl:value-of select="/root/labels/portopened" />
    </div>
    <div class="inforight">
@@ -789,5 +869,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Random port:</xsl:text>
+    <xsl:value-of select="/root/labels/randomport" />
    </div>
    <div class="inforight">
@@ -798,5 +878,5 @@
   <li class="line spacer">
    <div class="infoleft">
-    <xsl:text>Port range:</xsl:text>
+    <xsl:value-of select="/root/labels/portrange" />
    </div>
    <div class="inforight">
@@ -805,7 +885,139 @@
    <div class="clr"></div>
   </li>
-  <li class="line">
-   <div class="infoleft">
-    <xsl:text>Maximum number of uploads:</xsl:text>
+  <xsl:choose>
+   <xsl:when test="/root/allow_dht = 'true'">
+    <xsl:choose>
+     <xsl:when test="dht_statistics_active = 0">
+      <li class="line spacer">
+       <div class="infoleft">
+        <xsl:value-of select="/root/labels/dht" />
+       </div>
+       <div class="inforight">
+        <form class="changedhtstatusform" name="changedhtstatusform" method="post" action="{/root/iurl}?mod=changedhtstatus">
+         <select class="whiteselect" name="dhtstatus" title="{/root/labels/changedhtstatus}" onchange="window.location='{/root/iurl}?mod=changedhtstatus&amp;dhtstatus='+this.value;">
+          <option value="0" title="{/root/labels/stopped}" selected="selected"><xsl:value-of select="/root/labels/stopped" /></option>
+          <option value="1" title="{/root/labels/start}"><xsl:value-of select="/root/labels/start" /></option>
+         </select>
+         <noscript>
+          <input class="submit" type="submit" name="{/root/labels/ok}" value="{/root/labels/ok}" title="{/root/labels/ok}" />
+         </noscript>
+        </form>
+       </div>
+       <div class="clr"></div>
+      </li>
+     </xsl:when>
+     <xsl:otherwise>
+      <li class="line">
+       <div class="infoleft">
+        <xsl:value-of select="/root/labels/dht" />
+       </div>
+       <div class="inforight">
+        <form class="changedhtstatusform" name="changedhtstatusform" method="post" action="{/root/iurl}?mod=changedhtstatus">
+         <select class="whiteselect" name="dhtstatus" title="{/root/labels/changedhtstatus}" onchange="window.location='{/root/iurl}?mod=changedhtstatus&amp;dhtstatus='+this.value;">
+          <option value="0" title="{/root/labels/stop}"><xsl:value-of select="/root/labels/stop" /></option>
+          <option value="1" title="{/root/labels/started}" selected="selected"><xsl:value-of select="/root/labels/started" /></option>
+         </select>
+         <noscript>
+          <input class="submit" type="submit" name="{/root/labels/ok}" value="{/root/labels/ok}" title="{/root/labels/ok}" />
+         </noscript>
+        </form>
+       </div>
+       <div class="clr"></div>
+      </li>
+      <li class="line">
+       <div class="infoleft">
+        <xsl:value-of select="/root/labels/dhtport" />
+       </div>
+       <div class="inforight">
+        <xsl:value-of select="dht_port" />
+       </div>
+       <div class="clr"></div>
+      </li>
+      <li class="line">
+       <div class="infoleft">
+        <xsl:value-of select="/root/labels/dhtcycle" />
+       </div>
+       <div class="inforight">
+        <xsl:value-of select="dht_statistics_cycle" />
+       </div>
+       <div class="clr"></div>
+      </li>
+      <li class="line">
+       <div class="infoleft">
+        <xsl:value-of select="/root/labels/dhtqueries" />
+       </div>
+       <div class="inforight">
+        <xsl:value-of select="dht_statistics_queries_received" />
+        <xsl:text> / </xsl:text>
+        <xsl:value-of select="dht_statistics_queries_sent" />
+       </div>
+       <div class="clr"></div>
+      </li>
+      <li class="line">
+       <div class="infoleft">
+        <xsl:value-of select="/root/labels/dhtreplies" />
+       </div>
+       <div class="inforight">
+        <xsl:value-of select="dht_statistics_replies_received" />
+       </div>
+       <div class="clr"></div>
+      </li>
+      <li class="line">
+       <div class="infoleft">
+        <xsl:value-of select="/root/labels/dhtbytes" />
+       </div>
+       <div class="inforight">
+        <xsl:value-of select="dht_statistics_bytes_read/@value" />
+        <xsl:text> </xsl:text>
+        <xsl:value-of select="dht_statistics_bytes_read/@suffix" />
+        <xsl:text> / </xsl:text>
+        <xsl:value-of select="dht_statistics_bytes_written/@value" />
+        <xsl:text> </xsl:text>
+        <xsl:value-of select="dht_statistics_bytes_written/@suffix" />
+       </div>
+       <div class="clr"></div>
+      </li>
+      <li class="line">
+       <div class="infoleft">
+        <xsl:value-of select="/root/labels/dhtnodes" />
+       </div>
+       <div class="inforight">
+        <xsl:value-of select="dht_statistics_nodes" />
+        <xsl:text> </xsl:text>
+        <xsl:value-of select="/root/labels/in" />
+        <xsl:text> </xsl:text>
+        <xsl:value-of select="dht_statistics_buckets" />
+        <xsl:text> </xsl:text>
+        <xsl:value-of select="/root/labels/buckets" />
+       </div>
+       <div class="clr"></div>
+      </li>
+      <li class="line">
+       <div class="infoleft">
+        <xsl:value-of select="/root/labels/dhtpeers" />
+       </div>
+       <div class="inforight">
+        <xsl:value-of select="dht_statistics_peers" />
+        <xsl:text> / </xsl:text>
+        <xsl:value-of select="dht_statistics_peers_max" />
+       </div>
+       <div class="clr"></div>
+      </li>
+      <li class="line spacer">
+       <div class="infoleft">
+        <xsl:value-of select="/root/labels/dhttorrents" />
+       </div>
+       <div class="inforight">
+        <xsl:value-of select="dht_statistics_torrents" />
+       </div>
+       <div class="clr"></div>
+      </li>
+     </xsl:otherwise>
+    </xsl:choose>
+   </xsl:when>
+  </xsl:choose>
+  <li class="line">
+   <div class="infoleft">
+    <xsl:value-of select="/root/labels/maxuploads" />
    </div>
    <div class="inforight">
@@ -816,5 +1028,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Minimum number of peers:</xsl:text>
+    <xsl:value-of select="/root/labels/minpeers" />
    </div>
    <div class="inforight">
@@ -825,5 +1037,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Maximum number of peers:</xsl:text>
+    <xsl:value-of select="/root/labels/maxpeers" />
    </div>
    <div class="inforight">
@@ -834,5 +1046,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Memory usage:</xsl:text>
+    <xsl:value-of select="/root/labels/memoryusage" />
    </div>
    <div class="inforight">
@@ -845,5 +1057,5 @@
   <li class="line spacer">
    <div class="infoleft">
-    <xsl:text>Max memory usage:</xsl:text>
+    <xsl:value-of select="/root/labels/maxmemoryusage" />
    </div>
    <div class="inforight">
@@ -856,5 +1068,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Check hash:</xsl:text>
+    <xsl:value-of select="/root/labels/hashcheck" />
    </div>
    <div class="inforight">
@@ -865,5 +1077,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Safe sync:</xsl:text>
+    <xsl:value-of select="/root/labels/safesync" />
    </div>
    <div class="inforight">
@@ -874,5 +1086,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Send buffer:</xsl:text>
+    <xsl:value-of select="/root/labels/sendbuffer" />
    </div>
    <div class="inforight">
@@ -885,5 +1097,5 @@
   <li class="line">
    <div class="infoleft">
-    <xsl:text>Receive buffer:</xsl:text>
+    <xsl:value-of select="/root/labels/receivebuffer" />
    </div>
    <div class="inforight">
@@ -903,9 +1115,35 @@
  <xsl:template match="directory">
   <li>
-   <a title="Click to open/close" onmouseover="this.style.cursor='pointer';" onclick="if ( this.parentNode.getElementsByTagName( 'ul' ).item( 0 ).style.display == '' ) {{ this.parentNode.getElementsByTagName( 'ul' ).item( 0 ).style.display = 'none' }} else {{ this.parentNode.getElementsByTagName( 'ul' ).item( 0 ).style.display = '' }};"><xsl:value-of select="@dirname" /></a>
-   <ul class="directory">
-    <xsl:apply-templates select="directory" />
-    <xsl:apply-templates select="file" />
-   </ul>
+   <div class="dopenlink">
+    <a title="{/root/labels/clicktoopenclose}" onmouseover="this.style.cursor='pointer';" onclick="if ( this.parentNode.parentNode.getElementsByTagName( 'ul' ).item( 0 ).style.display == '' ) {{ this.parentNode.parentNode.getElementsByTagName( 'ul' ).item( 0 ).style.display = 'none' }} else {{ this.parentNode.parentNode.getElementsByTagName( 'ul' ).item( 0 ).style.display = '' }};"><xsl:value-of select="@dirname" /></a>
+   </div>
+   <div class="dpriority">
+    <form class="changedirpriorityform" name="changedirpriorityform_{@id}" method="post" action="{/root/iurl}?mod=changedirpriority&amp;hash={/root/hash}&amp;dir={@dirpath}">
+     <select class="whiteselect" name="dirpriority" title="{/root/labels/selectdirpriority}" onchange="window.location='{/root/iurl}?mod=changedirpriority&amp;hash={/root/hash}&amp;dir={@dirpath}&amp;dirpriority='+this.value;">
+      <option value="-1" title="{/root/labels/selectone}" selected="selected"><xsl:value-of select="/root/labels/selectone" /></option>
+      <option value="0" title="{/root/labels/off}"><xsl:value-of select="/root/labels/off" /></option>
+      <option value="1" title="{/root/labels/normal}"><xsl:value-of select="/root/labels/normal" /></option>
+      <option value="2" title="{/root/labels/high}"><xsl:value-of select="/root/labels/high" /></option>
+     </select>
+     <noscript>
+      <input class="submit" type="submit" name="{/root/labels/ok}" value="{/root/labels/ok}" title="{/root/labels/ok}" />
+     </noscript>
+    </form>
+   </div>
+   <div class="clr"></div>
+   <xsl:choose>
+    <xsl:when test="/root/allow_hidedirtree = 'true'">
+     <ul class="directory">
+      <xsl:apply-templates select="directory" />
+      <xsl:apply-templates select="file" />
+     </ul>
+    </xsl:when>
+    <xsl:otherwise>
+     <ul class="directory nohide">
+      <xsl:apply-templates select="directory" />
+      <xsl:apply-templates select="file" />
+     </ul>
+    </xsl:otherwise>
+   </xsl:choose>
   </li>
  </xsl:template>
@@ -914,10 +1152,10 @@
   <li onmouseover="this.style.background='#eeeeee';" onmouseout="this.style.background='';">
    <div class="fname">
-    <span title="Last touched: {f_last_touched}">
+    <span title="{/root/labels/lasttouched}: {f_last_touched}">
      <xsl:value-of select="@filename" />
     </span>
    </div>
    <div class="fpercentage">
-    <span title="{f_percentage/@value} percent completed">
+    <span title="{f_percentage/@value} {/root/labels/percentcompleted}">
      <xsl:text>[</xsl:text>
      <xsl:value-of select="f_percentage/@value" />
@@ -927,30 +1165,30 @@
    <div class="fpriority">
     <form class="changefilepriorityform" name="changefilepriorityform_{@id}" method="post" action="{/root/iurl}?mod=changefilepriority&amp;hash={/root/hash}&amp;id={@id}">
-     <select class="whiteselect" name="filepriority" title="Select file priority" onchange="window.location='{/root/iurl}?mod=changefilepriority&amp;hash={/root/hash}&amp;id={@id}&amp;filepriority='+this.value;">
+     <select class="whiteselect" name="filepriority" title="{/root/labels/selectfilepriority}" onchange="window.location='{/root/iurl}?mod=changefilepriority&amp;hash={/root/hash}&amp;id={@id}&amp;filepriority='+this.value;">
       <xsl:choose>
        <xsl:when test="f_priority = 0">
-        <option value="0" title="Off" selected="selected">Off</option>
-        <option value="1" title="Normal">Normal</option>
-        <option value="2" title="High">High</option>
+        <option value="0" title="{/root/labels/off}" selected="selected"><xsl:value-of select="/root/labels/off" /></option>
+        <option value="1" title="{/root/labels/normal}"><xsl:value-of select="/root/labels/normal" /></option>
+        <option value="2" title="{/root/labels/high}"><xsl:value-of select="/root/labels/high" /></option>
        </xsl:when>
        <xsl:when test="f_priority = 2">
-        <option value="0" title="Off">Off</option>
-        <option value="1" title="Normal">Normal</option>
-        <option value="2" title="High" selected="selected">High</option>
+        <option value="0" title="{/root/labels/off}"><xsl:value-of select="/root/labels/off" /></option>
+        <option value="1" title="{/root/labels/normal}"><xsl:value-of select="/root/labels/normal" /></option>
+        <option value="2" title="{/root/labels/high}" selected="selected"><xsl:value-of select="/root/labels/high" /></option>
        </xsl:when>
        <xsl:otherwise>
-        <option value="0" title="Off">Off</option>
-        <option value="1" title="Normal" selected="selected">Normal</option>
-        <option value="2" title="High">High</option>
+        <option value="0" title="{/root/labels/off}"><xsl:value-of select="/root/labels/off" /></option>
+        <option value="1" title="{/root/labels/normal}" selected="selected"><xsl:value-of select="/root/labels/normal" /></option>
+        <option value="2" title="{/root/labels/high}"><xsl:value-of select="/root/labels/high" /></option>
        </xsl:otherwise>
       </xsl:choose>
      </select>
      <noscript>
-      <input class="submit" type="submit" name="OK" value="OK" title="OK" />
+      <input class="submit" type="submit" name="{/root/labels/ok}" value="{/root/labels/ok}" title="{/root/labels/ok}" />
      </noscript>
     </form>
    </div>
    <div class="fsize">
-    <span title="File size">
+    <span title="{/root/labels/filesize}">
      <xsl:value-of select="f_size_bytes/@value" />
      <xsl:text> </xsl:text>
@@ -959,5 +1197,5 @@
    </div>
    <div class="fchunks">
-    <span title="Chunks">
+    <span title="{/root/labels/chunks}">
      <xsl:choose>
       <xsl:when test="f_range_first != f_range_second">
@@ -973,7 +1211,7 @@
    </div>
    <xsl:choose>
-    <xsl:when test="f_percentage = 1">
+    <xsl:when test="f_percentage = 1 and /root/allow_download = 'true'">
      <div class="fdownload">
-      <a href="?mod=getfile&amp;hash={/root/hash}&amp;id={@id}" title="Download file">Download</a>
+      <a href="?mod=getfile&amp;hash={/root/hash}&amp;id={@id}" title="{/root/labels/downloadfile}"><xsl:value-of select="/root/labels/download" /></a>
      </div>
     </xsl:when>
@@ -1004,5 +1242,5 @@
     <li>
      <div class="tgroup">
-      <span title="Tracker group">
+      <span title="{/root/labels/trackergroup}">
        <xsl:value-of select="t_group" />
        <xsl:text>:</xsl:text>
@@ -1010,5 +1248,5 @@
      </div>
      <div class="turl">
-      <span title="Type: {t_type/@value}">
+      <span title="{/root/labels/type}: {t_type/@value}">
        <xsl:value-of select="t_url" />
       </span>
@@ -1020,8 +1258,12 @@
       <xsl:choose>
        <xsl:when test="root/tottents/torrent_trackers_root/torrent_trackers/d_tracker_focus = @id">
-        <xsl:text>Focus: Yes</xsl:text>
+        <xsl:value-of select="/root/labels/focus" />
+        <xsl:text>: </xsl:text>
+        <xsl:value-of select="/root/labels/yes" />
        </xsl:when>
        <xsl:otherwise>
-        <xsl:text>Focus: No</xsl:text>
+        <xsl:value-of select="/root/labels/focus" />
+        <xsl:text>: </xsl:text>
+        <xsl:value-of select="/root/labels/no" />
        </xsl:otherwise>
       </xsl:choose>
@@ -1029,35 +1271,38 @@
      <div class="tenabled">
       <form class="changetrackerenabledform" name="changetrackerenabledform_{@id}" method="post" action="{/root/iurl}?mod=changetrackerenabled&amp;hash={/root/hash}&amp;id={@id}">
-       <xsl:text>Enabled: </xsl:text>
-       <select class="whiteselect" name="trackerenabled" title="Select if tracker is enabled" onchange="window.location='{/root/iurl}?mod=changetrackerenabled&amp;hash={/root/hash}&amp;id={@id}&amp;trackerenabled='+this.value;">
+       <xsl:value-of select="/root/labels/enabled" />
+       <xsl:text>: </xsl:text>
+       <select class="whiteselect" name="trackerenabled" title="{/root/labels/selecttrackerenabled}" onchange="window.location='{/root/iurl}?mod=changetrackerenabled&amp;hash={/root/hash}&amp;id={@id}&amp;trackerenabled='+this.value;">
         <xsl:choose>
          <xsl:when test="t_enabled = 0">
-          <option value="1" title="Yes">Yes</option>
-          <option value="0" title="No" selected="selected">No</option>
+          <option value="1" title="{/root/labels/yes}"><xsl:value-of select="/root/labels/yes" /></option>
+          <option value="0" title="{/root/labels/no}" selected="selected"><xsl:value-of select="/root/labels/no" /></option>
          </xsl:when>
          <xsl:otherwise>
-          <option value="1" title="Yes" selected="selected">Yes</option>
-          <option value="0" title="No">No</option>
+          <option value="1" title="{/root/labels/yes}" selected="selected"><xsl:value-of select="/root/labels/yes" /></option>
+          <option value="0" title="{/root/labels/no}"><xsl:value-of select="/root/labels/no" /></option>
          </xsl:otherwise>
         </xsl:choose>
        </select>
        <noscript>
-        <input class="submit" type="submit" name="submit" value="OK" title="OK" />
+        <input class="submit" type="submit" name="submit" value="{/root/labels/ok}" title="{/root/labels/ok}" />
        </noscript>
       </form>
      </div>
      <div class="topen">
-      <xsl:text>Open: </xsl:text>
+      <xsl:value-of select="/root/labels/opened" />
+      <xsl:text>: </xsl:text>
       <xsl:choose>
        <xsl:when test="t_open != 0">
-        <xsl:text>Yes</xsl:text>
+        <xsl:value-of select="/root/labels/yes" />
        </xsl:when>
        <xsl:otherwise>
-        <xsl:text>No</xsl:text>
+        <xsl:value-of select="/root/labels/no" />
        </xsl:otherwise>
       </xsl:choose>
      </div>
      <div class="tpeers">
-      <xsl:text>S/L: </xsl:text>
+      <xsl:value-of select="/root/labels/seedersleechers" />
+      <xsl:text>: </xsl:text>
       <xsl:value-of select="t_scrape_complete" />
       <xsl:text> / </xsl:text>
@@ -1068,6 +1313,7 @@
     <li>
      <div class="tscrape">
-      <span title="Minimum interval: {t_min_interval/@value} - Normal interval: {t_normal_interval/@value}">
-       <xsl:text>Last time scraped: </xsl:text>
+      <span title="{/root/labels/mininterval}: {t_min_interval/@value} - Normal interval: {t_normal_interval/@value}">
+       <xsl:value-of select="/root/labels/lasttimescraped" />
+       <xsl:text>: </xsl:text>
        <xsl:value-of select="t_scrape_time_last/@value" />
       </span>
Index: themes/default_ajax/layout.main.login.xsl
===================================================================
--- themes/default_ajax/layout.main.login.xsl	(revision fbc3369abde946a919e6c00b3dd10c2e5cb7d35b)
+++ themes/default_ajax/layout.main.login.xsl	(revision 49fafb4c4b73ded67f75984b08c402355a202a61)
@@ -1,5 +1,5 @@
 ﻿<xsl:stylesheet version="1.1"
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                lang="hu">
+                lang="en">
  <xsl:output method="xml"
              indent="no"
@@ -9,20 +9,20 @@
 
  <xsl:template match="root">
-  <html lang="hu">
+  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{lang}" lang="{lang}">
    <head>
     <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-    <meta http-equiv="content-language" content="hu" />
+    <meta http-equiv="content-language" content="{lang}" />
     <meta http-equiv="cache-control" content="no-store, no-cache, must-revalidate, post-check=0, pre-check=0" />
     <meta http-equiv="pragma" content="no-cache" />
     <meta http-equiv="expires" content="thu, 1 jan 1970 00:00:00 gmt" />
     <meta http-equiv="imagetoolbar" content="no" />  
-    <meta name="author" content="{/root/author}" />
-    <meta name="description" content="{/root/description}" />
-    <meta name="keywords" content="{/root/keywords}" />
+    <meta name="author" content="{labels/author}" />
+    <meta name="description" content="{labels/description}" />
+    <meta name="keywords" content="{labels/keywords}" />
     <meta name="doc-type" content="web page" />
     <meta name="rating" content="general" />
     <meta name="robots" content="all" />
     <link rel="stylesheet" type="text/css" href="themes/default_ajax/inc/style.css" />
-    <title><xsl:value-of select="/root/title" /></title>
+    <title><xsl:value-of select="labels/title" /></title>
    </head>
    <body onload="document.getElementById( 'lfname' ).focus();">
@@ -31,20 +31,20 @@
     <div id="loginbox">
      <xsl:apply-templates select="err" />
-     <form id="login" method="post" action="{/root/iurl}?mod=login">
+     <form id="login" method="post" action="{iurl}?mod=login">
       <ul>
        <li>
-        <div class="lftitle">Username:</div>
+        <div class="lftitle"><xsl:value-of select="labels/username" />:</div>
         <div class="lffield">
-         <input id="lfname" type="text" title="Username" name="loginname" />
+         <input id="lfname" type="text" title="{labels/username}" name="loginname" />
         </div>
        </li>
        <li>
-        <div class="lftitle">Password:</div>
+        <div class="lftitle"><xsl:value-of select="labels/password" />:</div>
         <div class="lffield">
-         <input id="lfpass" type="password" title="Password" name="loginpass" />
+         <input id="lfpass" type="password" title="labels/password" name="loginpass" />
         </div>
        </li>
        <li class="formsend">
-        <input class="inputok" type="submit" title="Login" name="Login" value="Login" />
+        <input class="inputok" type="submit" title="{labels/login}" name="{labels/login}" value="{labels/login}" />
        </li>
       </ul>
@@ -57,5 +57,5 @@
  <xsl:template match="err">
   <div id="err">
-   <span title="Click to hide" onmouseover="this.style.cursor='pointer';" onclick="document.getElementById( 'err' ).style.display='none';">
+   <span title="clicktohide" onmouseover="this.style.cursor='pointer';" onclick="document.getElementById( 'err' ).style.display='none';">
     <xsl:value-of select="errmsg" />
    </span>
