Commit a771e839 authored by Gabor Hudiczius's avatar Gabor Hudiczius
Browse files

rtwi-0.3.2-080519

parent 5cd1e7c9
......@@ -239,39 +239,37 @@ class xmlrpc_handler {
private function encode_request( $method, $params ) {
$xml = new DOMDocument( "1.0", "utf-8" );
$xml->formatOutput = true;
$xml->formatOutput = false;
$root = $xml->appendChild( $xml->createElement( "methodCall" ) );
$mnode = $root->appendChild( $xml->createElement( "methodName", $method ) );
if ( !empty( $params ) ) {
$psnode = $root->appendChild( $xml->createElement( "params" ) );
if ( is_array( $params ) ) {
$assoc = false;
foreach ( array_keys( $params ) as $key => $val ) {
if ( !preg_match( "/^[0-9]*$/", $val ) ) {
$assoc = true;
}
$psnode = $root->appendChild( $xml->createElement( "params" ) );
if ( is_array( $params ) ) {
$assoc = false;
foreach ( array_keys( $params ) as $key => $val ) {
if ( !preg_match( "/^[0-9]*$/", $val ) ) {
$assoc = true;
}
if ( $assoc ) {
$pnode = $psnode->appendChild( $xml->createElement( "param" ) );
$vnode = $pnode->appendChild( $xml->createElement( "value" ) );
$anode = $vnode->appendChild( $xml->createElement( "struct" ) );
foreach ( $params as $key => $val ) {
$mnode = $anode->appendChild( $xml->createElement( "member" ) );
$nnode = $mnode->appendChild( $xml->createElement( "name", $key ) );
$this->encode_request_rec( $method, $val, $xml, $mnode );
}
} else {
foreach ( $params as $key => $val ) {
$pnode = $psnode->appendChild( $xml->createElement( "param" ) );
$this->encode_request_rec( $method, $val, $xml, $pnode );
}
}
if ( $assoc ) {
$pnode = $psnode->appendChild( $xml->createElement( "param" ) );
$vnode = $pnode->appendChild( $xml->createElement( "value" ) );
$anode = $vnode->appendChild( $xml->createElement( "struct" ) );
foreach ( $params as $key => $val ) {
$mnode = $anode->appendChild( $xml->createElement( "member" ) );
$nnode = $mnode->appendChild( $xml->createElement( "name", $key ) );
$this->encode_request_rec( $method, $val, $xml, $mnode );
}
} else {
$pnode = $psnode->appendChild( $xml->createElement( "param" ) );
$this->encode_request_rec( $method, $params, $xml, $pnode );
foreach ( $params as $key => $val ) {
$pnode = $psnode->appendChild( $xml->createElement( "param" ) );
$this->encode_request_rec( $method, $val, $xml, $pnode );
}
}
} else {
$pnode = $psnode->appendChild( $xml->createElement( "param" ) );
$this->encode_request_rec( $method, $params, $xml, $pnode );
}
return $xml->saveXML();
......
<?php
$message = array(
"badlogin" => "使用者名稱或密碼錯誤",
"succlogin" => "登入成功",
"succlogout" => "登出成功",
"noconn" => "沒有連線",
"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",
"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",
"rtfilepartial" => "The uploaded file was only partially uploaded",
"rtfilenofile" => "No file was uploaded",
"rtfilenotmpdir" => "Missing a temporary folder",
"rtfilenowrite" => "Failed to write file to disk",
"rtfileother" => "上傳錯誤",
"rtfileattack" => "Possible file upload attack!",
"badthrottlevals" => "Invalid values for throttle",
"succthrottlechange" => "速度限制已更改",
"badrtdirectory" => "rTorrent download directry is not set correctly",
"badatpath" => "Invalid path was given",
"novaluefound" => "No value was given",
"badvaluefound" => "Bad value was given",
"nopriorityfound" => "No priority was given",
"badpriorityfound" => "Bad priority was given",
"noviewtype" => "No view was given",
"badviewtype" => "Bad view was given",
"norefreshrate" => "No refresh rate was given",
"badrefreshrate" => "Bad refresh rate was given",
"nolanguage" => "No language was given",
"badlanguage" => "Bad language was given (no translation is available for this language)",
"succtorrentload" => "Torrent 已載入",
"succtorrentstart" => "Torrent 已開始",
"succtorrentsstart" => "Torrents 已開始",
"succtorrentopen" => "Torrent 已開啟",
"succtorrentsopen" => "Torrents 已開啟",
"succtorrentstop" => "Torrent 已停止",
"succtorrentsstop" => "Torrents 已停止",
"succtorrentclose" => "Torrent 已關閉",
"succtorrentsclose" => "Torrents 已關閉",
"succtorrentcheckhash" => "Torrent hash check started",
"succtorrentscheckhash" => "Torrents hash check started",
"succtorrentremove" => "Torrent 已移除",
"succtorrentsremove" => "Torrents 已移除",
"succtorrenterase" => "Torrent erased",
"warntorrenterase" => "Torrent erased, but not all the files were removed",
"succtorrentserase" => "Torrents erased",
"succprioritychange" => "Torrent 優先權已更改",
"succfileprioritychange" => "檔案優先權已更改",
"succdirprioritychange" => "目錄優先權已更改",
"succtrackerenabledchange" => "Tracker availablity changed",
"succviewchange" => "瀏覽類型已更改",
"succrefreshchange" => "更新頻率已更改",
"succlanguagechange" => "語言已更改",
"succdhtstart" => "DHT 伺服器已啟動",
"succdhtstop" => "DHT 伺服器已停止",
"downloadnotallowed" => "You are not allowed to download torrents from the webui",
"erasenotallowed" => "You are not allowed to erase downloaded data from the webui",
"languagenotallowed" => "You are not allowed to set the language of the page",
"refreshnotallowed" => "You are not allowed to set a meta-refresh interval",
"throttlenotallowed" => "You are not allowed to set throttle",
"no" => "否",
"yes" => "是",
"disabled" => "Disabled",
"enabled" => "Enabled",
"notset" => "Not set",
"d_connection_current_leech" => "Leeching",
"d_connection_current_seed" => "做種中",
"d_ignore_commands_0" => "Not ignoring commands",
"d_ignore_commands_1" => "Ignoring commands",
"d_active_0" => "已停止",
"d_active_1" => "已開始",
"d_hash_checked_0" => "Hash not checked",
"d_hash_checked_1" => "Hash checked",
"d_multi_file_multi" => "Multi",
"d_multi_file_single" => "Single",
"d_open_0" => "已關閉",
"d_open_1" => "開啟",
"d_complete_0" => "未完成",
"d_complete_1" => "已完成",
"d_hash_checking_0" => "Not hashing",
"d_hash_checking_1" => "Hashing",
"d_hashing_0" => "Not hashing",
"d_hashing_1" => "Normal hashing",
"d_hashing_2" => "Download finished, hashing",
"d_hashing_3" => "Re-hashing",
"d_priority_0" => "關",
"d_priority_1" => "低",
"d_priority_2" => "中",
"d_priority_3" => "高",
"d_state_0" => "已停止",
"d_state_1" => "已開始",
"f_open_0" => "已關閉",
"f_open_1" => "開啟",
"f_priority_0" => "關閉",
"f_priority_1" => "中",
"f_priority_2" => "高",
"p_encrypted_0" => "Plain",
"p_encrypted_1" => "Encrypted",
"p_incoming_0" => "Outgoing",
"p_incoming_1" => "Incoming",
"t_enabled_0" => "Disabled",
"t_enabled_1" => "Enabled",
"t_open_0" => "已關閉",
"t_open_1" => "開啟",
"t_type_1" => "TCP",
"t_type_2" => "UDP",
"dht_0" => "已停止",
"dht_1" => "已開始",
"bind_0000" => "All IP addresses",
"ip_0000" => "Not set",
"proxy_address_0000" => "Not set",
"unknown" => "Unknown",
);
$viewtypes = array(
"viewtype_main" => "主要",
"viewtype_default" => "預設",
"viewtype_name" => "名稱",
"viewtype_started" => "已開始",
"viewtype_stopped" => "已停止",
"viewtype_complete" => "已完成",
"viewtype_incomplete" => "未完成",
"viewtype_hashing" => "Hashing",
"viewtype_seeding" => "做種中",
"viewtype_scheduler" => "Scheduler",
);
$refreshrates = array(
"refreshrate_0" => "關閉",
"refreshrate_60" => "1 分鐘",
"refreshrate_180" => "3 分鐘",
"refreshrate_420" => "7 分鐘",
"refreshrate_900" => "15 分鐘",
"refreshrate_1500" => "25 分鐘",
);
$languages = array(
"en" => "English",
"de" => "German",
"hu" => "Hungarian",
"cht" => "Traditional Chinese",
);
$label = array(
// html head
"title" => "rTWi - an rTorrent Web interface",
"description" => "rTWi - an rTorrent Web interface",
"author" => "Gabor Hudiczius",
"mailto" => "ghudiczius@gmail.com?subject=rTWi - an rTorrent Web interface",
// login
"username" => "使用者名稱",
"password" => "密碼",
"rememberme" => "記住我",
"login" => "登入",
// menu
"torrents" => "Torrents",
"peerlist" => "Peer 清單",
"info" => "資訊",
"filelist" => "檔案清單",
"trackerlist" => "Tracker 清單",
"chunksseen" => "Chunks seen",
"transferlist" => "Transfer list",
"addtorrent" => "新增 Torrent",
"serverinfo" => "伺服器資訊",
"logout" => "登出",
// misc
"ok" => "確定",
"yes" => "是",
"no" => "否",
"clicktohide" => "按一下來隱藏",
"clicktoopen" => "按一下來開啟",
"clicktocloseopen" => "按一下來 關閉 / 開啟",
"clicktochange" => "按一下來更改",
"view" => "瀏覽",
"selectviewtype" => "選擇瀏覽類型",
"refresh" => "更新",
"selectrefreshrate" => "選擇更新速度",
"language" => "語言",
"selectlanguage" => "選擇語言",
"areyousure" => "你確定嗎?",
"areyousureerase" => "Are you sure? All downloaded data will be erased.",
"homepage" => "rTWi project homepage",
"highest" => "最高",
// add torrent
"openfrom" => "開啟來源",
"fileupload" => "檔案上傳",
"url" => "網址",
"torrentfile" => "Torrent 檔案",
"torrenturl" => "Torrent 網址",
"starttorrent" => "開始下載",
"starttorrentafteradded" => "新增後開始下載",
"downloadto" => "下載至",
// tasks on torrents
"selecttask" => "選擇動作",
"selectone" => "Select one",
"startall" => "全部開始",
"stopall" => "全部停止",
"openall" => "全部開啟",
"closeall" => "全部關閉",
"checkall" => "全部檢查",
"removeall" => "全部移除",
"eraseall" => "Erase all",
"start" => "開始",
"stop" => "停止",
"open" => "開啟",
"close" => "關閉",
"checkhash" => "檢查hash",
"remove" => "移除",
"erase" => "Erase",
"selectpriority" => "設定優先權",
"selectdirpriority" => "設定目錄優先權",
"selectfilepriority" => "設定檔案優先權",
// torrent states
"started" => "已開始",
"stopped" => "已停止",
"opened" => "已開啟",
"closed" => "已關閉",
"finished" => "已完成",
"checkhashed" => "Hash checked",
"startedsince" => "Started since",
"stopedsince" => "Stoped since",
"openedsince" => "Opened since",
"closedsince" => "Closed since",
"finishedsince" => "Finished since",
"hashingsince" => "Hashing since",
"sincepre" => "since",
"sincepost" => "",
// torrent stats
"details" => "細節",
"done" => "完成",
"downloadfinished" => "下載已完成",
"downloadeddata" => "已下載資料",
"torrentsize" => "大小",
"uploaded" => "已上傳",
"uploadeddata" => "已上傳資料",
"percenthashed" => "% hashed",
"percentcompleted" => "% 已完成",
"estimatedtimeremaining" => "估計剩餘時間",
"ignorecommands" => "Ignore commands",
"ratio" => "Ratio",
"off" => "關閉",
"low" => "低",
"normal" => "中",
"high" => "高",
"message" => "Message",
"lasttouched" => "Last touched",
"filesize" => "檔案大小",
"downloadfile" => "下載檔案",
"trackergroup" => "Tracker group",
"type" => "類型",
"selecttrackerenabled" => "選擇是否啟用 tracker",
"mininterval" => "Minimum interval",
// stats
"throttle" => "速度限制",
"uploadspeed" => "上傳速度",
"uploadlimit" => "上傳限制",
"nouploadlimit" => "無上傳限制",
"downloadspeed" => "下載速度",
"downloadlimit" => "下載限制",
"nodownloadlimit" => "無下載限制",
"rate" => "速度",
// info page
"name" => "名稱",
"infohash" => "Info hash",
"localid" => "Local ID",
"localidhtml" => "Local ID (html)",
"directory" => "目錄",
"tiedtofile" => "Tied to file",
"filestats" => "File stats",
"files" => "files",
"private" => "Private",
"chunks" => "Chunks",
"priority" => "優先權",
"statechanged" => "State changed",
"freediskspace" => "磁碟可用空間",
"connectiontype" => "連線類型",
"trackers" => "Trackers",
"peersconnected" => "Peers connected",
"dmaxpeers" => "Maximum",
"dminpeers" => "Minimum",
"leechers" => "Leechers",
"seeders" => "Seeders",
"pexenabled" => "PEX enabled",
"pexsize" => "PEX size",
"upload" => "上傳",
"download" => "下載",
"skipped" => "Skipped",
// server info page
"clientversion" => "客戶端版本",
"libraryversion" => "程式庫版本",
"workingdirectory" => "工作目錄",
"downloaddirectory" => "下載目錄",
"sessiondirectory" => "快取目錄",
"hostname" => "Hostname",
"pid" => "PID",
"listeningipaddress" => "Listening IP address",
"reportedipaddress" => "IP address reported to the tracker",
"portopened" => "Port opened",
"randomport" => "Random port",
"portrange" => "Port range",
"udptrackers" => "Use UDP trackers",
"changedhtstatus" => "開始 / 停止 DHT伺服器",
"dht" => "DHT 伺服器",
"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" => "記憶體使用量",
"maxmemoryusage" => "最大記憶體使用量",
"hashcheck" => "Hash check",
"safesync" => "Safe sync",
"sendbuffer" => "Send buffer",
"receivebuffer" => "Receive buffer",
// peer list page
"address" => "Address",
"port" => "Port",
"up_rate" => "Up",
"down_rate" => "Down",
"peer_rate" => "Peer",
"pdone" => "Done",
"encrypted" => "Encrypted",
"incoming" => "Connection",
"pclientversion" => "客戶端版本",
// tracker list page
"focus" => "Focus",
"enabled" => "啟用",
"seedersleechers" => "S/L",
"lasttimescraped" => "Last time scraped",
);
?>
<?php
$message = array(
"badlogin" => "Benutzername oder Passwort falsch",
"succlogin" => "Erfolgreich angemeldet",
"succlogout" => "Erfolgreich abgemeldet",
"noconn" => "Keine Verbindung",
"nohashfound" => "Für diesen Hash wurden keine Torrents gefunden",
"noidfound" => "Keine ID festgelegt",
"nodirfound" => "Kein Verzeichnis festgelegt",
"noinputmod" => "Kein Mod festgelegt",
"nooponalltorrent" => "Keinen Task festegelegt",
"badidfound" => "ID ungültig",
"baddirfound" => "Verzeichnis ungültig",
"notanurl" => "Keine gültige URL",
"rtfileinisize" => "Das hochgeladene File ist zu gross",
"rtfileformsize" => "Das hochgeladene File ist zu gross",
"rtfilepartial" => "Das File wurde nur teilweisse hochgeladen",
"rtfilenofile" => "Es wurde kein File hochgeladen",
"rtfilenotmpdir" => "Kein temporärer Ordner vorhanden",
"rtfilenowrite" => "File konnte nicht gespeichert werden",
"rtfileother" => "Fehler beim Upload",
"rtfileattack" => "Möglicher File-Upload Angriff!",
"badthrottlevals" => "Throttle Einstellungen fehlerhaft",
"succthrottlechange" => "Throttle geändert",
"badrtdirectory" => "Download Verzeichnis nicht richtig eingestellt",
"badatpath" => "Pfad fehlerhaft",
"novaluefound" => "Kein Wert festgelegt",
"badvaluefound" => "Fehlerhafter Wert festgelegt",
"nopriorityfound" => "Keine Priorität festgelegt",
"badpriorityfound" => "Fehlerhafte Priorität festgelegt",
"noviewtype" => "Keine Ansicht festgelegt",
"badviewtype" => "Fehlerhafte Ansicht festgelegt",
"norefreshrate" => "Keine Aktualisierungsrate festgelegt",
"badrefreshrate" => "Fehlerhafte Aktualisierungsrate festgelegt",
"nolanguage" => "Keine Sprache festgelegt",
"badlanguage" => "Fehlerhafte Sprache festgelegt (keine Übersetzung für diese Sprache verfügbar)",
"succtorrentload" => "Torrent geladen",
"succtorrentstart" => "Torrent gestartet",
"succtorrentsstart" => "Torrents gestartet",
"succtorrentopen" => "Torrent geöffnet",
"succtorrentsopen" => "Torrents geöffnet",
"succtorrentstop" => "Torrent gestoppt",
"succtorrentsstop" => "Torrents gestoppt",
"succtorrentclose" => "Torrent geschlossen",
"succtorrentsclose" => "Torrents geschlossen",
"succtorrentcheckhash" => "Torrent Hash Überprüfung gestartet",
"succtorrentscheckhash" => "Torrents Hash Überprüfung gestartet",
"succtorrentremove" => "Torrent entfernt",
"succtorrentsremove" => "Torrents entfernt",
"succtorrenterase" => "Torrent gelöscht",
"warntorrenterase" => "Torrent gelöscht, aber nicht alle Dateien entfernt",
"succtorrentserase" => "Torrents gelöscht",
"succprioritychange" => "Torrent Priorität geändert",
"succfileprioritychange" => "File Priorität geändert",
"succdirprioritychange" => "Directory Priorität geändert",
"succtrackerenabledchange" => "Tracker Verfügbarkeit geändert",
"succviewchange" => "Anicht geändert",
"succrefreshchange" => "Aktualisierungsrate geändert",
"succlanguagechange" => "Sprache geändert",
"succdhtstart" => "DHT server gestartet",
"succdhtstop" => "DHT server gestoppt",
"downloadnotallowed" => "Du darfst keine Torrents vom WebUI herunterladen",
"erasenotallowed" => "Du darfst keine Daten vom WebUI löschen",
"languagenotallowed" => "Du darfst die Sprache nicht ändern",
"refreshnotallowed" => "Du darfst die Aktualisierungsrate nicht ändern",
"throttlenotallowed" => "Du darfst den Throttle nicht ändern",
"no" => "Nein",
"yes" => "Ja",
"disabled" => "Deaktiviert",
"enabled" => "Aktiviert",
"notset" => "Nicht gesetzt",
"d_connection_current_leech" => "Leeche",
"d_connection_current_seed" => "Seede",
"d_ignore_commands_0" => "Ignoriere Befehle nicht",
"d_ignore_commands_1" => "Ignoriere Befhele",
"d_active_0" => "Gestoppt",
"d_active_1" => "Gestartet",
"d_hash_checked_0" => "Hash nicht überprüft",
"d_hash_checked_1" => "Hash überprüft",
"d_multi_file_multi" => "Multi",
"d_multi_file_single" => "Single",
"d_open_0" => "Geschlossen",
"d_open_1" => "Offen",
"d_complete_0" => "Unvollständig",
"d_complete_1" => "Fertig",
"d_hash_checking_0" => "Hashe nicht",
"d_hash_checking_1" => "Hashe",
"d_hashing_0" => "Hashe nicht",
"d_hashing_1" => "Normales Hashen",
"d_hashing_2" => "Download fertig, hashe",
"d_hashing_3" => "Hashe erneut",
"d_priority_0" => "Aus",
"d_priority_1" => "Niedrig",
"d_priority_2" => "Normal",
"d_priority_3" => "Hoch",
"d_state_0" => "Gestoppt",
"d_state_1" => "Gestartet",
"f_open_0" => "Geschlossen",
"f_open_1" => "Offen",
"f_priority_0" => "Aus",
"f_priority_1" => "Normal",
"f_priority_2" => "Hoch",
"p_encrypted_0" => "Unverschlüsselt",
"p_encrypted_1" => "Verschlüsselt",
"p_incoming_0" => "Outgoing",
"p_incoming_1" => "Incoming",
"t_enabled_0" => "Deaktiviert",
"t_enabled_1" => "Aktiviert",
"t_open_0" => "Geschlossen",
"t_open_1" => "Offen",
"t_type_1" => "TCP",
"t_type_2" => "UDP",
"dht_0" => "Gestoppt",
"dht_1" => "Gestartet",
"bind_0000" => "Alle IP-Adressen",
"ip_0000" => "Nicht gesetzt",
"proxy_address_0000" => "Nicht gesetzt",
"unknown" => "Unbekannt",
);
$viewtypes = array(
"viewtype_main" => "Main",
"viewtype_default" => "Standard",
"viewtype_name" => "Name",
"viewtype_started" => "Gestartet",
"viewtype_stopped" => "Gestoppt",
"viewtype_complete" => "Fertig",
"viewtype_incomplete" => "Unvollständig",
"viewtype_hashing" => "Hashe",
"viewtype_seeding" => "Seede",
"viewtype_scheduler" => "Scheduler",
);
$refreshrates = array(
"refreshrate_0" => "Aus",
"refreshrate_60" => "1 Minute",
"refreshrate_180" => "3 Minuten",
"refreshrate_420" => "7 Minuten",
"refreshrate_900" => "15 Minuten",
<