Advertisement
EddieKidiw

PHP File Manager

Aug 5th, 2016
885
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 233.20 KB | None | 0 0
  1. <?php
  2. //a:9:{s:4:"lang";s:2:"en";s:9:"auth_pass";s:32:"d41d8cd98f00b204e9800998ecf8427e";s:8:"quota_mb";i:0;s:17:"upload_ext_filter";a:0:{}s:19:"download_ext_filter";a:0:{}s:15:"error_reporting";i:1;s:7:"fm_root";s:0:"";s:17:"cookie_cache_time";i:2592000;s:7:"version";s:5:"0.9.8";}
  3. /*--------------------------------------------------
  4.  | PHP FILE MANAGER
  5.  +--------------------------------------------------
  6.  | phpFileManager 0.9.8
  7.  | By Fabricio Seger Kolling
  8.  | Copyright (c) 2004-2013 Fabrício Seger Kolling
  9.  | E-mail: dulldusk@gmail.com
  10.  | URL: http://phpfm.sf.net
  11.  | Last Changed: 2013-10-15
  12.  +--------------------------------------------------
  13.  | OPEN SOURCE CONTRIBUTIONS
  14.  +--------------------------------------------------
  15.  | TAR/GZIP/BZIP2/ZIP ARCHIVE CLASSES 2.0
  16.  | By Devin Doucette
  17.  | Copyright (c) 2004 Devin Doucette
  18.  | E-mail: darksnoopy@shaw.ca
  19.  | URL: http://www.phpclasses.org
  20.  +--------------------------------------------------
  21.  | It is the AUTHOR'S REQUEST that you keep intact the above header information
  22.  | and notify him if you conceive any BUGFIXES or IMPROVEMENTS to this program.
  23.  +--------------------------------------------------
  24.  | LICENSE
  25.  +--------------------------------------------------
  26.  | Licensed under the terms of any of the following licenses at your choice:
  27.  | - GNU General Public License Version 2 or later (the "GPL");
  28.  | - GNU Lesser General Public License Version 2.1 or later (the "LGPL");
  29.  | - Mozilla Public License Version 1.1 or later (the "MPL").
  30.  | You are not required to, but if you want to explicitly declare the license
  31.  | you have chosen to be bound to when using, reproducing, modifying and
  32.  | distributing this software, just include a text file titled "LEGAL" in your version
  33.  | of this software, indicating your license choice. In any case, your choice will not
  34.  | restrict any recipient of your version of this software to use, reproduce, modify
  35.  | and distribute this software under any of the above licenses.
  36.  +--------------------------------------------------
  37.  | CONFIGURATION AND INSTALATION NOTES
  38.  +--------------------------------------------------
  39.  | This program does not include any instalation or configuration
  40.  | notes because it simply does not require them.
  41.  | Just throw this file anywhere in your webserver and enjoy !!
  42.  +--------------------------------------------------
  43. */
  44. // +--------------------------------------------------
  45. // | Header and Globals
  46. // +-------------------------------------------------- 
  47.     $charset = "UTF-8";
  48.     //@setlocale(LC_CTYPE, 'C');
  49.     header("Pragma: no-cache");
  50.     header("Cache-Control: no-store");
  51.     header("Content-Type: text/html; charset=".$charset);
  52.     //@ini_set('default_charset', $charset);
  53.     if (@get_magic_quotes_gpc()) {
  54.         function stripslashes_deep($value){
  55.             return is_array($value)? array_map('stripslashes_deep', $value):$value;
  56.         }
  57.         $_POST = array_map('stripslashes_deep', $_POST);
  58.         $_GET = array_map('stripslashes_deep', $_GET);
  59.         $_COOKIE = array_map('stripslashes_deep', $_COOKIE);
  60.     }
  61.     // Server Vars
  62.     function get_client_ip() {
  63.         $ipaddress = '';
  64.         if ($_SERVER['HTTP_CLIENT_IP']) $ipaddress = $_SERVER['HTTP_CLIENT_IP'];
  65.         else if($_SERVER['HTTP_X_FORWARDED_FOR']) $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
  66.         else if($_SERVER['HTTP_X_FORWARDED']) $ipaddress = $_SERVER['HTTP_X_FORWARDED'];
  67.         else if($_SERVER['HTTP_FORWARDED_FOR']) $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
  68.         else if($_SERVER['HTTP_FORWARDED']) $ipaddress = $_SERVER['HTTP_FORWARDED'];
  69.         else if($_SERVER['REMOTE_ADDR']) $ipaddress = $_SERVER['REMOTE_ADDR'];
  70.         // proxy transparente não esconde o IP local, colocando ele após o IP da rede, separado por vírgula
  71.         if (strpos($ipaddress, ',') !== false) {
  72.             $ips = explode(',', $ipaddress);
  73.             $ipaddress = trim($ips[0]);
  74.         }
  75.         if ($ipaddress == '::1') $ipaddress = '';
  76.         return $ipaddress;
  77.     }      
  78.     $ip = get_client_ip();
  79.     $islinux = !(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN');
  80.     function getServerURL() {
  81.         $url = ($_SERVER["HTTPS"] == "on")?"https://":"http://";
  82.         $url .= $_SERVER["SERVER_NAME"]; // $_SERVER["HTTP_HOST"] is equivalent
  83.         if ($_SERVER["SERVER_PORT"] != "80") $url .= ":".$_SERVER["SERVER_PORT"];
  84.         return $url;
  85.     }
  86.     function getCompleteURL() {
  87.         return getServerURL().$_SERVER["REQUEST_URI"];
  88.     }
  89.     $url = getCompleteURL();
  90.     $url_info = parse_url($url);
  91.     if( !isset($_SERVER['DOCUMENT_ROOT']) ) {
  92.         if ( isset($_SERVER['SCRIPT_FILENAME']) ) $path = $_SERVER['SCRIPT_FILENAME'];
  93.         elseif ( isset($_SERVER['PATH_TRANSLATED']) ) $path = str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']);
  94.         $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($path, 0, 0-strlen($_SERVER['PHP_SELF'])));
  95.     }
  96.     $doc_root = str_replace('//','/',str_replace(DIRECTORY_SEPARATOR,'/',$_SERVER["DOCUMENT_ROOT"]));
  97.     $fm_self = $doc_root.$_SERVER["PHP_SELF"];
  98.     $path_info = pathinfo($fm_self);
  99.     // Register Globals
  100.     $blockKeys = array('_SERVER','_SESSION','_GET','_POST','_COOKIE','charset','ip','islinux','url','url_info','doc_root','fm_self','path_info');
  101.     foreach ($_GET as $key => $val) if (array_search($key,$blockKeys) === false) $$key=$val;
  102.     foreach ($_POST as $key => $val) if (array_search($key,$blockKeys) === false) $$key=$val;
  103.     foreach ($_COOKIE as $key => $val) if (array_search($key,$blockKeys) === false) $$key=$val;
  104. // +--------------------------------------------------
  105. // | Config
  106. // +--------------------------------------------------
  107.     $cfg = new config();
  108.     $cfg->load();
  109.     switch ($error_reporting){
  110.         case 0: error_reporting(0); @ini_set("display_errors",0); break;
  111.         case 1: error_reporting(E_ERROR | E_PARSE | E_COMPILE_ERROR); @ini_set("display_errors",1); break;
  112.         case 2: error_reporting(E_ALL); @ini_set("display_errors",1); break;
  113.     }
  114.     if (!isset($current_dir)){
  115.         $current_dir = $path_info["dirname"]."/";
  116.         if (!$islinux) $current_dir = ucfirst($current_dir);
  117.         //@chmod($current_dir,0755);
  118.     } else $current_dir = format_path($current_dir);
  119.     // Auto Expand Local Path
  120.     if (!isset($expanded_dir_list)){
  121.         $expanded_dir_list = "";
  122.         $mat = explode("/",$path_info["dirname"]);
  123.         for ($x=0;$x<count($mat);$x++) $expanded_dir_list .= ":".$mat[$x];
  124.         setcookie("expanded_dir_list", $expanded_dir_list, 0, "/");
  125.     }
  126.     if (!isset($fm_current_root)){
  127.         if (strlen($fm_root)) $fm_current_root = $fm_root;
  128.         else {
  129.             if (!$islinux) $fm_current_root = ucfirst($path_info["dirname"]."/");
  130.             else $fm_current_root = $doc_root."/";
  131.         }
  132.         setcookie("fm_current_root", $fm_current_root, 0, "/");
  133.     } elseif (isset($set_fm_current_root)) {
  134.         if (!$islinux) $fm_current_root = ucfirst($set_fm_current_root);
  135.         setcookie("fm_current_root", $fm_current_root, 0, "/");
  136.     }
  137.     if (!isset($resolveIDs)){
  138.         setcookie("resolveIDs", 0, time()+$cookie_cache_time, "/");
  139.     } elseif (isset($set_resolveIDs)){
  140.         $resolveIDs=($resolveIDs)?0:1;
  141.         setcookie("resolveIDs", $resolveIDs, time()+$cookie_cache_time, "/");
  142.     }
  143.     if ($resolveIDs){
  144.         exec("cat /etc/passwd",$mat_passwd);
  145.         exec("cat /etc/group",$mat_group);
  146.     }
  147.     $fm_color['Bg'] = "EEEEEE";
  148.     $fm_color['Text'] = "000000";
  149.     $fm_color['Link'] = "0A77F7";
  150.     $fm_color['Entry'] = "FFFFFF";
  151.     $fm_color['Over'] = "C0EBFD";
  152.     $fm_color['Mark'] = "A7D2E4";
  153.     foreach($fm_color as $tag=>$color){
  154.         $fm_color[$tag]=strtolower($color);
  155.     }
  156. // +--------------------------------------------------
  157. // | File Manager Actions
  158. // +--------------------------------------------------
  159. if ($loggedon==$auth_pass){
  160.     switch ($frame){
  161.         case 1: break; // Empty Frame
  162.         case 2: frame2(); break;
  163.         case 3: frame3(); break;
  164.         default:
  165.             switch($action){
  166.                 case 1: logout(); break;
  167.                 case 2: config_form(); break;
  168.                 case 3: download(); break;
  169.                 case 4: view(); break;
  170.                 case 5: server_info(); break;
  171.                 case 6: execute_cmd(); break;
  172.                 case 7: edit_file_form(); break;
  173.                 case 8: chmod_form(); break;
  174.                 case 9: shell_form(); break;
  175.                 case 10: upload_form(); break;
  176.                 case 11: execute_file(); break;
  177.                 default: frameset();
  178.             }
  179.     }
  180. } else {
  181.     if (isset($pass)) login();
  182.     else login_form();
  183. }
  184. // +--------------------------------------------------
  185. // | Config Class
  186. // +--------------------------------------------------
  187. class config {
  188.     var $data;
  189.     var $filename;
  190.     function config(){
  191.         global $fm_self;
  192.         $this->data = array(
  193.             'lang'=>'en',
  194.             'auth_pass'=>md5(''),
  195.             'quota_mb'=>0,
  196.             'upload_ext_filter'=>array(),
  197.             'download_ext_filter'=>array(),
  198.             'error_reporting'=>1,
  199.             'fm_root'=>'',
  200.             'cookie_cache_time'=>60*60*24*30, // 30 Days
  201.             'version'=>'0.9.8'
  202.             );
  203.         $data = false;
  204.         $this->filename = $fm_self;
  205.         if (file_exists($this->filename)){
  206.             $mat = file($this->filename);
  207.             $objdata = trim(substr($mat[1],2));
  208.             if (strlen($objdata)) $data = unserialize($objdata);
  209.         }
  210.         if (is_array($data)&&count($data)==count($this->data)) $this->data = $data;
  211.         else $this->save();
  212.     }
  213.     function save(){
  214.         $objdata = "<?php".chr(13).chr(10)."//".serialize($this->data).chr(13).chr(10);
  215.         if (strlen($objdata)){
  216.             if (file_exists($this->filename)){
  217.                 $mat = file($this->filename);
  218.                 if ($fh = @fopen($this->filename, "w")){
  219.                     @fputs($fh,$objdata,strlen($objdata));
  220.                     for ($x=2;$x<count($mat);$x++) @fputs($fh,$mat[$x],strlen($mat[$x]));
  221.                     @fclose($fh);
  222.                 }
  223.             }
  224.         }
  225.     }
  226.     function load(){
  227.         foreach ($this->data as $key => $val) $GLOBALS[$key] = $val;
  228.     }
  229. }
  230. // +--------------------------------------------------
  231. // | Internationalization
  232. // +--------------------------------------------------
  233. function et($tag){
  234.     global $lang;
  235.  
  236.     // English - by Fabricio Seger Kolling
  237.     $en['Version'] = 'Version';
  238.     $en['DocRoot'] = 'Document Root';
  239.     $en['FLRoot'] = 'File Manager Root';
  240.     $en['Name'] = 'Name';
  241.     $en['And'] = 'and';
  242.     $en['Enter'] = 'Enter';
  243.     $en['Send'] = 'Send';
  244.     $en['Refresh'] = 'Refresh';
  245.     $en['SaveConfig'] = 'Save Configurations';
  246.     $en['SavePass'] = 'Save Password';
  247.     $en['SaveFile'] = 'Save File';
  248.     $en['Save'] = 'Save';
  249.     $en['Leave'] = 'Leave';
  250.     $en['Edit'] = 'Edit';
  251.     $en['View'] = 'View';
  252.     $en['Config'] = 'Config';
  253.     $en['Ren'] = 'Rename';
  254.     $en['Rem'] = 'Delete';
  255.     $en['Compress'] = 'Compress';
  256.     $en['Decompress'] = 'Decompress';
  257.     $en['ResolveIDs'] = 'Resolve IDs';
  258.     $en['Move'] = 'Move';
  259.     $en['Copy'] = 'Copy';
  260.     $en['ServerInfo'] = 'Server Info';
  261.     $en['CreateDir'] = 'Create Directory';
  262.     $en['CreateArq'] = 'Create File';
  263.     $en['ExecCmd'] = 'Execute Command';
  264.     $en['Upload'] = 'Upload';
  265.     $en['UploadEnd'] = 'Upload Finished';
  266.     $en['Perm'] = 'Perm';
  267.     $en['Perms'] = 'Permissions';
  268.     $en['Owner'] = 'Owner';
  269.     $en['Group'] = 'Group';
  270.     $en['Other'] = 'Other';
  271.     $en['Size'] = 'Size';
  272.     $en['Date'] = 'Date';
  273.     $en['Type'] = 'Type';
  274.     $en['Free'] = 'free';
  275.     $en['Shell'] = 'Shell';
  276.     $en['Read'] = 'Read';
  277.     $en['Write'] = 'Write';
  278.     $en['Exec'] = 'Execute';
  279.     $en['Apply'] = 'Apply';
  280.     $en['StickyBit'] = 'Sticky Bit';
  281.     $en['Pass'] = 'Password';
  282.     $en['Lang'] = 'Language';
  283.     $en['File'] = 'File';
  284.     $en['File_s'] = 'file(s)';
  285.     $en['Dir_s'] = 'directory(s)';
  286.     $en['To'] = 'to';
  287.     $en['Destination'] = 'Destination';
  288.     $en['Configurations'] = 'Configurations';
  289.     $en['JSError'] = 'JavaScript Error';
  290.     $en['NoSel'] = 'There are no selected itens';
  291.     $en['SelDir'] = 'Select the destination directory on the left tree';
  292.     $en['TypeDir'] = 'Enter the directory name';
  293.     $en['TypeArq'] = 'Enter the file name';
  294.     $en['TypeCmd'] = 'Enter the command';
  295.     $en['TypeArqComp'] = 'Enter the file name.\\nThe extension will define the compression type.\\nEx:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip';
  296.     $en['RemSel'] = 'DELETE selected itens';
  297.     $en['NoDestDir'] = 'There is no selected destination directory';
  298.     $en['DestEqOrig'] = 'Origin and destination directories are equal';
  299.     $en['InvalidDest'] = 'Destination directory is invalid';
  300.     $en['NoNewPerm'] = 'New permission not set';
  301.     $en['CopyTo'] = 'COPY to';
  302.     $en['MoveTo'] = 'MOVE to';
  303.     $en['AlterPermTo'] = 'CHANGE PERMISSIONS to';
  304.     $en['ConfExec'] = 'Confirm EXECUTE';
  305.     $en['ConfRem'] = 'Confirm DELETE';
  306.     $en['EmptyDir'] = 'Empty directory';
  307.     $en['IOError'] = 'I/O Error';
  308.     $en['FileMan'] = 'PHP File Manager';
  309.     $en['TypePass'] = 'Enter the password';
  310.     $en['InvPass'] = 'Invalid Password';
  311.     $en['ReadDenied'] = 'Read Access Denied';
  312.     $en['FileNotFound'] = 'File not found';
  313.     $en['AutoClose'] = 'Close on Complete';
  314.     $en['OutDocRoot'] = 'File beyond DOCUMENT_ROOT';
  315.     $en['NoCmd'] = 'Error: Command not informed';
  316.     $en['ConfTrySave'] = 'File without write permisson.\\nTry to save anyway';
  317.     $en['ConfSaved'] = 'Configurations saved';
  318.     $en['PassSaved'] = 'Password saved';
  319.     $en['FileDirExists'] = 'File or directory already exists';
  320.     $en['NoPhpinfo'] = 'Function phpinfo disabled';
  321.     $en['NoReturn'] = 'no return';
  322.     $en['FileSent'] = 'File sent';
  323.     $en['SpaceLimReached'] = 'Space limit reached';
  324.     $en['InvExt'] = 'Invalid extension';
  325.     $en['FileNoOverw'] = 'File could not be overwritten';
  326.     $en['FileOverw'] = 'File overwritten';
  327.     $en['FileIgnored'] = 'File ignored';
  328.     $en['ChkVer'] = 'Check for new version';
  329.     $en['ChkVerAvailable'] = 'New version, click here to begin download!!';
  330.     $en['ChkVerNotAvailable'] = 'No new version available. :(';
  331.     $en['ChkVerError'] = 'Connection Error.';
  332.     $en['Website'] = 'Website';
  333.     $en['SendingForm'] = 'Sending files, please wait';
  334.     $en['NoFileSel'] = 'No file selected';
  335.     $en['SelAll'] = 'All';
  336.     $en['SelNone'] = 'None';
  337.     $en['SelInverse'] = 'Inverse';
  338.     $en['Selected_s'] = 'selected';
  339.     $en['Total'] = 'total';
  340.     $en['Partition'] = 'Partition';
  341.     $en['RenderTime'] = 'Time to render this page';
  342.     $en['Seconds'] = 'sec';
  343.     $en['ErrorReport'] = 'Error Reporting';
  344.  
  345.     // Portuguese by - Fabricio Seger Kolling
  346.     $pt['Version'] = 'Versão';
  347.     $pt['DocRoot'] = 'Document Root';
  348.     $pt['FLRoot'] = 'File Manager Root';
  349.     $pt['Name'] = 'Nome';
  350.     $pt['And'] = 'e';
  351.     $pt['Enter'] = 'Entrar';
  352.     $pt['Send'] = 'Enviar';
  353.     $pt['Refresh'] = 'Atualizar';
  354.     $pt['SaveConfig'] = 'Salvar Configurações';
  355.     $pt['SavePass'] = 'Salvar Senha';
  356.     $pt['SaveFile'] = 'Salvar Arquivo';
  357.     $pt['Save'] = 'Salvar';
  358.     $pt['Leave'] = 'Sair';
  359.     $pt['Edit'] = 'Editar';
  360.     $pt['View'] = 'Visualizar';
  361.     $pt['Config'] = 'Config';
  362.     $pt['Ren'] = 'Renomear';
  363.     $pt['Rem'] = 'Apagar';
  364.     $pt['Compress'] = 'Compactar';
  365.     $pt['Decompress'] = 'Descompactar';
  366.     $pt['ResolveIDs'] = 'Resolver IDs';
  367.     $pt['Move'] = 'Mover';
  368.     $pt['Copy'] = 'Copiar';
  369.     $pt['ServerInfo'] = 'Server Info';
  370.     $pt['CreateDir'] = 'Criar Diretório';
  371.     $pt['CreateArq'] = 'Criar Arquivo';
  372.     $pt['ExecCmd'] = 'Executar Comando';
  373.     $pt['Upload'] = 'Upload';
  374.     $pt['UploadEnd'] = 'Upload Terminado';
  375.     $pt['Perm'] = 'Perm';
  376.     $pt['Perms'] = 'Permissões';
  377.     $pt['Owner'] = 'Dono';
  378.     $pt['Group'] = 'Grupo';
  379.     $pt['Other'] = 'Outros';
  380.     $pt['Size'] = 'Tamanho';
  381.     $pt['Date'] = 'Data';
  382.     $pt['Type'] = 'Tipo';
  383.     $pt['Free'] = 'livre';
  384.     $pt['Shell'] = 'Shell';
  385.     $pt['Read'] = 'Ler';
  386.     $pt['Write'] = 'Escrever';
  387.     $pt['Exec'] = 'Executar';
  388.     $pt['Apply'] = 'Aplicar';
  389.     $pt['StickyBit'] = 'Sticky Bit';
  390.     $pt['Pass'] = 'Senha';
  391.     $pt['Lang'] = 'Idioma';
  392.     $pt['File'] = 'Arquivo';
  393.     $pt['File_s'] = 'arquivo(s)';
  394.     $pt['Dir_s'] = 'diretorio(s)';
  395.     $pt['To'] = 'para';
  396.     $pt['Destination'] = 'Destino';
  397.     $pt['Configurations'] = 'Configurações';
  398.     $pt['JSError'] = 'Erro de JavaScript';
  399.     $pt['NoSel'] = 'Não há itens selecionados';
  400.     $pt['SelDir'] = 'Selecione o diretório de destino na árvore a esquerda';
  401.     $pt['TypeDir'] = 'Digite o nome do diretório';
  402.     $pt['TypeArq'] = 'Digite o nome do arquivo';
  403.     $pt['TypeCmd'] = 'Digite o commando';
  404.     $pt['TypeArqComp'] = 'Digite o nome do arquivo.\\nA extensão determina o tipo de compactação.\\nEx:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip';
  405.     $pt['RemSel'] = 'APAGAR itens selecionados';
  406.     $pt['NoDestDir'] = 'Não há um diretório de destino selecionado';
  407.     $pt['DestEqOrig'] = 'Diretório de origem e destino iguais';
  408.     $pt['InvalidDest'] = 'Diretório de destino inválido';
  409.     $pt['NoNewPerm'] = 'Nova permissão não foi setada';
  410.     $pt['CopyTo'] = 'COPIAR para';
  411.     $pt['MoveTo'] = 'MOVER para';
  412.     $pt['AlterPermTo'] = 'ALTERAR PERMISSÕES para';
  413.     $pt['ConfExec'] = 'Confirma EXECUTAR';
  414.     $pt['ConfRem'] = 'Confirma APAGAR';
  415.     $pt['EmptyDir'] = 'Diretório vazio';
  416.     $pt['IOError'] = 'Erro de E/S';
  417.     $pt['FileMan'] = 'PHP File Manager';
  418.     $pt['TypePass'] = 'Digite a senha';
  419.     $pt['InvPass'] = 'Senha Inválida';
  420.     $pt['ReadDenied'] = 'Acesso de leitura negado';
  421.     $pt['FileNotFound'] = 'Arquivo não encontrado';
  422.     $pt['AutoClose'] = 'Fechar Automaticamente';
  423.     $pt['OutDocRoot'] = 'Arquivo fora do DOCUMENT_ROOT';
  424.     $pt['NoCmd'] = 'Erro: Comando não informado';
  425.     $pt['ConfTrySave'] = 'Arquivo sem permissão de escrita.\\nTentar salvar assim mesmo';
  426.     $pt['ConfSaved'] = 'Configurações salvas';
  427.     $pt['PassSaved'] = 'Senha salva';
  428.     $pt['FileDirExists'] = 'Arquivo ou diretório já existe';
  429.     $pt['NoPhpinfo'] = 'Função phpinfo desabilitada';
  430.     $pt['NoReturn'] = 'sem retorno';
  431.     $pt['FileSent'] = 'Arquivo enviado';
  432.     $pt['SpaceLimReached'] = 'Limite de espaço alcançado';
  433.     $pt['InvExt'] = 'Extensão inválida';
  434.     $pt['FileNoOverw'] = 'Arquivo não pode ser sobreescrito';
  435.     $pt['FileOverw'] = 'Arquivo sobreescrito';
  436.     $pt['FileIgnored'] = 'Arquivo omitido';
  437.     $pt['ChkVer'] = 'Verificar por nova versão';
  438.     $pt['ChkVerAvailable'] = 'Nova versão, clique aqui para iniciar download!!';
  439.     $pt['ChkVerNotAvailable'] = 'Não há nova versão disponível. :(';
  440.     $pt['ChkVerError'] = 'Erro de conexão.';
  441.     $pt['Website'] = 'Website';
  442.     $pt['SendingForm'] = 'Enviando arquivos, aguarde';
  443.     $pt['NoFileSel'] = 'Nenhum arquivo selecionado';
  444.     $pt['SelAll'] = 'Tudo';
  445.     $pt['SelNone'] = 'Nada';
  446.     $pt['SelInverse'] = 'Inverso';
  447.     $pt['Selected_s'] = 'selecionado(s)';
  448.     $pt['Total'] = 'total';
  449.     $pt['Partition'] = 'Partição';
  450.     $pt['RenderTime'] = 'Tempo para gerar esta página';
  451.     $pt['Seconds'] = 'seg';
  452.     $pt['ErrorReport'] = 'Error Reporting';
  453.  
  454.     // Spanish - by Sh Studios
  455.     $es['Version'] = 'Versión';
  456.     $es['DocRoot'] = 'Raiz del programa';
  457.     $es['FLRoot'] = 'Raiz del administrador de archivos';
  458.     $es['Name'] = 'Nombre';
  459.     $es['And'] = 'y';
  460.     $es['Enter'] = 'Enter';
  461.     $es['Send'] = 'Enviar';
  462.     $es['Refresh'] = 'Refrescar';
  463.     $es['SaveConfig'] = 'Guardar configuraciones';
  464.     $es['SavePass'] = 'Cuardar Contraseña';
  465.     $es['SaveFile'] = 'Guardar Archivo';
  466.     $es['Save'] = 'Guardar';
  467.     $es['Leave'] = 'Salir';
  468.     $es['Edit'] = 'Editar';
  469.     $es['View'] = 'Mirar';
  470.     $es['Config'] = 'Config.';
  471.     $es['Ren'] = 'Renombrar';
  472.     $es['Rem'] = 'Borrar';
  473.     $es['Compress'] = 'Comprimir';
  474.     $es['Decompress'] = 'Decomprimir';
  475.     $es['ResolveIDs'] = 'Resolver IDs';
  476.     $es['Move'] = 'Mover';
  477.     $es['Copy'] = 'Copiar';
  478.     $es['ServerInfo'] = 'Info del Server';
  479.     $es['CreateDir'] = 'Crear Directorio';
  480.     $es['CreateArq'] = 'Crear Archivo';
  481.     $es['ExecCmd'] = 'Ejecutar Comando';
  482.     $es['Upload'] = 'Subir';
  483.     $es['UploadEnd'] = 'Subida exitosa';
  484.     $es['Perm'] = 'Perm';
  485.     $es['Perms'] = 'Permisiones';
  486.     $es['Owner'] = 'Propietario';
  487.     $es['Group'] = 'Grupo';
  488.     $es['Other'] = 'Otro';
  489.     $es['Size'] = 'Tamaño';
  490.     $es['Date'] = 'Fecha';
  491.     $es['Type'] = 'Tipo';
  492.     $es['Free'] = 'libre';
  493.     $es['Shell'] = 'Ejecutar';
  494.     $es['Read'] = 'Leer';
  495.     $es['Write'] = 'Escribir';
  496.     $es['Exec'] = 'Ejecutar';
  497.     $es['Apply'] = 'Aplicar';
  498.     $es['StickyBit'] = 'Sticky Bit';
  499.     $es['Pass'] = 'Contraseña';
  500.     $es['Lang'] = 'Lenguage';
  501.     $es['File'] = 'Archivos';
  502.     $es['File_s'] = 'archivo(s)';
  503.     $es['Dir_s'] = 'directorio(s)';
  504.     $es['To'] = 'a';
  505.     $es['Destination'] = 'Destino';
  506.     $es['Configurations'] = 'Configuracion';
  507.     $es['JSError'] = 'Error de JavaScript';
  508.     $es['NoSel'] = 'No hay items seleccionados';
  509.     $es['SelDir'] = 'Seleccione el directorio de destino en el arbol derecho';
  510.     $es['TypeDir'] = 'Escriba el nombre del directorio';
  511.     $es['TypeArq'] = 'Escriba el nombre del archivo';
  512.     $es['TypeCmd'] = 'Escriba el comando';
  513.     $es['TypeArqComp'] = 'Escriba el nombre del directorio.\\nLa extension definira el tipo de compresion.\\nEj:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip';
  514.     $es['RemSel'] = 'BORRAR items seleccionados';
  515.     $es['NoDestDir'] = 'No se ha seleccionado el directorio de destino';
  516.     $es['DestEqOrig'] = 'El origen y el destino son iguales';
  517.     $es['InvalidDest'] = 'El destino del directorio es invalido';
  518.     $es['NoNewPerm'] = 'Las permisiones no se pudieron establecer';
  519.     $es['CopyTo'] = 'COPIAR a';
  520.     $es['MoveTo'] = 'MOVER a';
  521.     $es['AlterPermTo'] = 'CAMBIAR PERMISIONES a';
  522.     $es['ConfExec'] = 'Confirmar EJECUCION';
  523.     $es['ConfRem'] = 'Confirmar BORRADO';
  524.     $es['EmptyDir'] = 'Directorio Vacio';
  525.     $es['IOError'] = 'Error I/O';
  526.     $es['FileMan'] = 'PHP File Manager';
  527.     $es['TypePass'] = 'Escriba la contraseña';
  528.     $es['InvPass'] = 'Contraseña invalida';
  529.     $es['ReadDenied'] = 'Acceso de lectura denegado';
  530.     $es['FileNotFound'] = 'Archivo no encontrado';
  531.     $es['AutoClose'] = 'Cerrar al completar';
  532.     $es['OutDocRoot'] = 'Archivo antes de DOCUMENT_ROOT';
  533.     $es['NoCmd'] = 'Error: No se ha escrito ningun comando';
  534.     $es['ConfTrySave'] = 'Archivo sin permisos de escritura.\\nIntente guardar en otro lugar';
  535.     $es['ConfSaved'] = 'Configuracion Guardada';
  536.     $es['PassSaved'] = 'Contraseña guardada';
  537.     $es['FileDirExists'] = 'Archivo o directorio ya existente';
  538.     $es['NoPhpinfo'] = 'Funcion phpinfo() inhabilitada';
  539.     $es['NoReturn'] = 'sin retorno';
  540.     $es['FileSent'] = 'Archivo enviado';
  541.     $es['SpaceLimReached'] = 'Limite de espacio en disco alcanzado';
  542.     $es['InvExt'] = 'Extension inalida';
  543.     $es['FileNoOverw'] = 'El archivo no pudo ser sobreescrito';
  544.     $es['FileOverw'] = 'Archivo sobreescrito';
  545.     $es['FileIgnored'] = 'Archivo ignorado';
  546.     $es['ChkVer'] = 'Chequear las actualizaciones';
  547.     $es['ChkVerAvailable'] = 'Nueva version, haga click aqui para descargar!!';
  548.     $es['ChkVerNotAvailable'] = 'Su version es la mas reciente.';
  549.     $es['ChkVerError'] = 'Error de coneccion.';
  550.     $es['Website'] = 'Sitio Web';
  551.     $es['SendingForm'] = 'Enviando archivos, espere!';
  552.     $es['NoFileSel'] = 'Ningun archivo seleccionado';
  553.     $es['SelAll'] = 'Todos';
  554.     $es['SelNone'] = 'Ninguno';
  555.     $es['SelInverse'] = 'Inverso';
  556.     $es['Selected_s'] = 'seleccionado';
  557.     $es['Total'] = 'total';
  558.     $es['Partition'] = 'Particion';
  559.     $es['RenderTime'] = 'Generado en';
  560.     $es['Seconds'] = 'seg';
  561.     $es['ErrorReport'] = 'Reporte de error';
  562.  
  563.     // Korean - by Airplanez
  564.     $kr['Version'] = '버전';
  565.     $kr['DocRoot'] = '웹서버 루트';
  566.     $kr['FLRoot'] = '파일 매니저 루트';
  567.     $kr['Name'] = '이름';
  568.     $kr['Enter'] = '입력';
  569.     $kr['Send'] = '전송';
  570.     $kr['Refresh'] = '새로고침';
  571.     $kr['SaveConfig'] = '환경 저장';
  572.     $kr['SavePass'] = '비밀번호 저장';
  573.     $kr['SaveFile'] = '파일 저장';
  574.     $kr['Save'] = '저장';
  575.     $kr['Leave'] = '나가기';
  576.     $kr['Edit'] = '수정';
  577.     $kr['View'] = '보기';
  578.     $kr['Config'] = '환경';
  579.     $kr['Ren'] = '이름바꾸기';
  580.     $kr['Rem'] = '삭제';
  581.     $kr['Compress'] = '압축하기';
  582.     $kr['Decompress'] = '압축풀기';
  583.     $kr['ResolveIDs'] = '소유자';
  584.     $kr['Move'] = '이동';
  585.     $kr['Copy'] = '복사';
  586.     $kr['ServerInfo'] = '서버 정보';
  587.     $kr['CreateDir'] = '디렉토리 생성';
  588.     $kr['CreateArq'] = '파일 생성';
  589.     $kr['ExecCmd'] = '명령 실행';
  590.     $kr['Upload'] = '업로드';
  591.     $kr['UploadEnd'] = '업로드가 완료되었습니다.';
  592.     $kr['Perm'] = '권한';
  593.     $kr['Perms'] = '권한';
  594.     $kr['Owner'] = '소유자';
  595.     $kr['Group'] = '그룹';
  596.     $kr['Other'] = '모든사용자';
  597.     $kr['Size'] = '크기';
  598.     $kr['Date'] = '날짜';
  599.     $kr['Type'] = '종류';
  600.     $kr['Free'] = '여유';
  601.     $kr['Shell'] = '쉘';
  602.     $kr['Read'] = '읽기';
  603.     $kr['Write'] = '쓰기';
  604.     $kr['Exec'] = '실행';
  605.     $kr['Apply'] = '적용';
  606.     $kr['StickyBit'] = '스티키 비트';
  607.     $kr['Pass'] = '비밀번호';
  608.     $kr['Lang'] = '언어';
  609.     $kr['File'] = '파일';
  610.     $kr['File_s'] = '파일';
  611.     $kr['To'] = '으로';
  612.     $kr['Destination'] = '대상';
  613.     $kr['Configurations'] = '환경';
  614.     $kr['JSError'] = '자바스크립트 오류';
  615.     $kr['NoSel'] = '선택된 것이 없습니다';
  616.     $kr['SelDir'] = '왼쪽리스트에서 대상 디렉토리를 선택하세요';
  617.     $kr['TypeDir'] = '디렉토리명을 입력하세요';
  618.     $kr['TypeArq'] = '파일명을 입력하세요';
  619.     $kr['TypeCmd'] = '명령을 입력하세요';
  620.     $kr['TypeArqComp'] = '파일명을 입력하세요.\\n확장자에 따라 압축형식이 정해집니다.\\n예:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip';
  621.     $kr['RemSel'] = '선택된 것을 삭제했습니다';
  622.     $kr['NoDestDir'] = '선택된 대상 디렉토리가 없습니다.';
  623.     $kr['DestEqOrig'] = '원래 디렉토리와 대상 디렉토리가 같습니다';
  624.     $kr['NoNewPerm'] = '새로운 권한이 설정되지 않았습니다';
  625.     $kr['CopyTo'] = '여기에 복사';
  626.     $kr['MoveTo'] = '여기로 이동';
  627.     $kr['AlterPermTo'] = '으로 권한변경';
  628.     $kr['ConfExec'] = '실행 확인';
  629.     $kr['ConfRem'] = '삭제 확인';
  630.     $kr['EmptyDir'] = '빈 디렉토리';
  631.     $kr['IOError'] = '입/출력 오류';
  632.     $kr['FileMan'] = 'PHP 파일 매니저';
  633.     $kr['TypePass'] = '비밀번호를 입력하세요';
  634.     $kr['InvPass'] = '비밀번호가 틀립니다';
  635.     $kr['ReadDenied'] = '읽기가 거부되었습니다';
  636.     $kr['FileNotFound'] = '파일이 없습니다';
  637.     $kr['AutoClose'] = '완료후 닫기';
  638.     $kr['OutDocRoot'] = 'DOCUMENT_ROOT 이내의 파일이 아닙니다';
  639.     $kr['NoCmd'] = '오류: 명령이 실행되지 않았습니다';
  640.     $kr['ConfTrySave'] = '파일에 쓰기 권한이 없습니다.\\n그래도 저장하시겠습니까';
  641.     $kr['ConfSaved'] = '환경이 저장되었습니다';
  642.     $kr['PassSaved'] = '비밀번호 저장';
  643.     $kr['FileDirExists'] = '파일 또는 디렉토리가 이미 존재합니다';
  644.     $kr['NoPhpinfo'] = 'PHPINFO()를 사용할수 없습니다';
  645.     $kr['NoReturn'] = '반환값 없음';
  646.     $kr['FileSent'] = '파일 전송';
  647.     $kr['SpaceLimReached'] = '저장공가 여유가 없습니다';
  648.     $kr['InvExt'] = '유효하지 않은 확장자';
  649.     $kr['FileNoOverw'] = '파일을 덮어 쓸수 없습니다';
  650.     $kr['FileOverw'] = '파일을 덮어 썼습니다';
  651.     $kr['FileIgnored'] = '파일이 무시되었습니다';
  652.     $kr['ChkVer'] = '에서 새버전 확인';
  653.     $kr['ChkVerAvailable'] = '새로운 버전이 있습니다. 다운받으려면 클릭하세요!!';
  654.     $kr['ChkVerNotAvailable'] = '새로운 버전이 없습니다. :(';
  655.     $kr['ChkVerError'] = '연결 오류';
  656.     $kr['Website'] = '웹사이트';
  657.     $kr['SendingForm'] = '파일을 전송중입니다. 기다리세요';
  658.     $kr['NoFileSel'] = '파일이 선택되지 않았습니다';
  659.     $kr['SelAll'] = '모든';
  660.     $kr['SelNone'] = '제로';
  661.     $kr['SelInverse'] = '역';
  662.  
  663.     // German - by Guido Ogrzal
  664.     $de1['Version'] = 'Version';
  665.     $de1['DocRoot'] = 'Dokument Wurzelverzeichnis';
  666.     $de1['FLRoot'] = 'Dateimanager Wurzelverzeichnis';
  667.     $de1['Name'] = 'Name';
  668.     $de1['And'] = 'und';
  669.     $de1['Enter'] = 'Eintreten';
  670.     $de1['Send'] = 'Senden';
  671.     $de1['Refresh'] = 'Aktualisieren';
  672.     $de1['SaveConfig'] = 'Konfiguration speichern';
  673.     $de1['SavePass'] = 'Passwort speichern';
  674.     $de1['SaveFile'] = 'Datei speichern';
  675.     $de1['Save'] = 'Speichern';
  676.     $de1['Leave'] = 'Verlassen';
  677.     $de1['Edit'] = 'Bearbeiten';
  678.     $de1['View'] = 'Ansehen';
  679.     $de1['Config'] = 'Konfigurieren';
  680.     $de1['Ren'] = 'Umbenennen';
  681.     $de1['Rem'] = 'Löschen';
  682.     $de1['Compress'] = 'Komprimieren';
  683.     $de1['Decompress'] = 'Dekomprimieren';
  684.     $de1['ResolveIDs'] = 'Resolve IDs';
  685.     $de1['Move'] = 'Verschieben';
  686.     $de1['Copy'] = 'Kopieren';
  687.     $de1['ServerInfo'] = 'Server-Info';
  688.     $de1['CreateDir'] = 'Neues Verzeichnis';
  689.     $de1['CreateArq'] = 'Neue Datei';
  690.     $de1['ExecCmd'] = 'Kommando';
  691.     $de1['Upload'] = 'Datei hochladen';
  692.     $de1['UploadEnd'] = 'Datei hochladen beendet';
  693.     $de1['Perm'] = 'Erlaubnis';
  694.     $de1['Perms'] = 'Erlaubnis';
  695.     $de1['Owner'] = 'Besitzer';
  696.     $de1['Group'] = 'Gruppe';
  697.     $de1['Other'] = 'Andere';
  698.     $de1['Size'] = 'Größe';
  699.     $de1['Date'] = 'Datum';
  700.     $de1['Type'] = 'Typ';
  701.     $de1['Free'] = 'frei';
  702.     $de1['Shell'] = 'Shell';
  703.     $de1['Read'] = 'Lesen';
  704.     $de1['Write'] = 'Schreiben';
  705.     $de1['Exec'] = 'Ausführen';
  706.     $de1['Apply'] = 'Bestätigen';
  707.     $de1['StickyBit'] = 'Sticky Bit';
  708.     $de1['Pass'] = 'Passwort';
  709.     $de1['Lang'] = 'Sprache';
  710.     $de1['File'] = 'Datei';
  711.     $de1['File_s'] = 'Datei(en)';
  712.     $de1['Dir_s'] = 'Verzeichniss(e)';
  713.     $de1['To'] = '-&gt;';
  714.     $de1['Destination'] = 'Ziel';
  715.     $de1['Configurations'] = 'Konfiguration';
  716.     $de1['JSError'] = 'JavaScript Fehler';
  717.     $de1['NoSel'] = 'Es gibt keine selektierten Objekte';
  718.     $de1['SelDir'] = 'Selektiere das Zielverzeichnis im linken Verzeichnisbaum';
  719.     $de1['TypeDir'] = 'Trage den Verzeichnisnamen ein';
  720.     $de1['TypeArq'] = 'Trage den Dateinamen ein';
  721.     $de1['TypeCmd'] = 'Gib das Kommando ein';
  722.     $de1['TypeArqComp'] = 'Trage den Dateinamen ein.\\nDie Dateierweiterung wird den Kompressiontyp bestimmen.\\nBsp.:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip';
  723.     $de1['RemSel'] = 'LÖSCHE die selektierten Objekte';
  724.     $de1['NoDestDir'] = 'Das selektierte Zielverzeichnis existiert nicht';
  725.     $de1['DestEqOrig'] = 'Quell- und Zielverzeichnis stimmen überein';
  726.     $de1['InvalidDest'] = 'Zielverzeichnis ist ungültig';
  727.     $de1['NoNewPerm'] = 'Neue Zugriffserlaubnis konnte nicht gesetzt werden';
  728.     $de1['CopyTo'] = 'KOPIERE nach';
  729.     $de1['MoveTo'] = 'VERSCHIEBE nach';
  730.     $de1['AlterPermTo'] = 'ÄNDERE ZUGRIFFSERLAUBSNIS in';
  731.     $de1['ConfExec'] = 'Bestätige AUSFÜHRUNG';
  732.     $de1['ConfRem'] = 'Bestätige LÖSCHEN';
  733.     $de1['EmptyDir'] = 'Leeres Verzeichnis';
  734.     $de1['IOError'] = 'Eingabe/Ausgabe-Fehler';
  735.     $de1['FileMan'] = 'PHP File Manager';
  736.     $de1['TypePass'] = 'Trage das Passwort ein';
  737.     $de1['InvPass'] = 'Ungültiges Passwort';
  738.     $de1['ReadDenied'] = 'Lesezugriff verweigert';
  739.     $de1['FileNotFound'] = 'Datei nicht gefunden';
  740.     $de1['AutoClose'] = 'Schließen, wenn fertig';
  741.     $de1['OutDocRoot'] = 'Datei außerhalb von DOCUMENT_ROOT';
  742.     $de1['NoCmd'] = 'Fehler: Es wurde kein Kommando eingetragen';
  743.     $de1['ConfTrySave'] = 'Keine Schreibberechtigung für die Datei.\\nVersuche trotzdem zu speichern';
  744.     $de1['ConfSaved'] = 'Konfiguration gespeichert';
  745.     $de1['PassSaved'] = 'Passwort gespeichert';
  746.     $de1['FileDirExists'] = 'Datei oder Verzeichnis existiert schon';
  747.     $de1['NoPhpinfo'] = 'Funktion phpinfo ist inaktiv';
  748.     $de1['NoReturn'] = 'keine Rückgabe';
  749.     $de1['FileSent'] = 'Datei wurde gesendet';
  750.     $de1['SpaceLimReached'] = 'Verfügbares Speicherlimit wurde erreicht';
  751.     $de1['InvExt'] = 'Ungültige Dateiendung';
  752.     $de1['FileNoOverw'] = 'Datei kann nicht überschrieben werden';
  753.     $de1['FileOverw'] = 'Datei überschrieben';
  754.     $de1['FileIgnored'] = 'Datei ignoriert';
  755.     $de1['ChkVer'] = 'Prüfe auf neue Version';
  756.     $de1['ChkVerAvailable'] = 'Neue Version verfügbar; klicke hier, um den Download zu starten!!';
  757.     $de1['ChkVerNotAvailable'] = 'Keine neue Version gefunden. :(';
  758.     $de1['ChkVerError'] = 'Verbindungsfehler.';
  759.     $de1['Website'] = 'Webseite';
  760.     $de1['SendingForm'] = 'Sende Dateien... Bitte warten.';
  761.     $de1['NoFileSel'] = 'Keine Datei selektiert';
  762.     $de1['SelAll'] = 'Alle';
  763.     $de1['SelNone'] = 'Keine';
  764.     $de1['SelInverse'] = 'Invertieren';
  765.     $de1['Selected_s'] = 'selektiert';
  766.     $de1['Total'] = 'Gesamt';
  767.     $de1['Partition'] = 'Partition';
  768.     $de1['RenderTime'] = 'Zeit, um die Seite anzuzeigen';
  769.     $de1['Seconds'] = 's';
  770.     $de1['ErrorReport'] = 'Fehlerreport';
  771.  
  772.     // German - by AXL
  773.     $de2['Version'] = 'Version';
  774.     $de2['DocRoot'] = 'Document Stammverzeichnis';
  775.     $de2['FLRoot'] = 'Datei Manager Stammverzeichnis';
  776.     $de2['Name'] = 'Name';
  777.     $de2['And'] = 'und';
  778.     $de2['Enter'] = 'Enter';
  779.     $de2['Send'] = 'Senden';
  780.     $de2['Refresh'] = 'Aktualisieren';
  781.     $de2['SaveConfig'] = 'Konfiguration speichern';
  782.     $de2['SavePass'] = 'Passwort speichern';
  783.     $de2['SaveFile'] = 'Datei speichern';
  784.     $de2['Save'] = 'Speichern';
  785.     $de2['Leave'] = 'Verlassen';
  786.     $de2['Edit'] = 'Bearb.';
  787.     $de2['View'] = 'Anzeigen';
  788.     $de2['Config'] = 'Konfigurieren';
  789.     $de2['Ren'] = 'Umb.';
  790.     $de2['Rem'] = 'Löschen';
  791.     $de2['Compress'] = 'Komprimieren';
  792.     $de2['Decompress'] = 'De-Komprimieren';
  793.     $de2['ResolveIDs'] = 'IDs auflösen';
  794.     $de2['Move'] = 'Versch.';
  795.     $de2['Copy'] = 'Kopie';
  796.     $de2['ServerInfo'] = 'Server Info';
  797.     $de2['CreateDir'] = 'Verzeichnis erstellen';
  798.     $de2['CreateArq'] = 'Datei erstellen';
  799.     $de2['ExecCmd'] = 'Befehl ausführen';
  800.     $de2['Upload'] = 'Upload';
  801.     $de2['UploadEnd'] = 'Upload abgeschlossen';
  802.     $de2['Perm'] = 'Rechte';
  803.     $de2['Perms'] = 'Rechte';
  804.     $de2['Owner'] = 'Besitzer';
  805.     $de2['Group'] = 'Gruppe';
  806.     $de2['Other'] = 'Andere';
  807.     $de2['Size'] = 'Größe';
  808.     $de2['Date'] = 'Datum';
  809.     $de2['Type'] = 'Typ';
  810.     $de2['Free'] = 'frei';
  811.     $de2['Shell'] = 'Shell';
  812.     $de2['Read'] = 'Read';
  813.     $de2['Write'] = 'Write';
  814.     $de2['Exec'] = 'Execute';
  815.     $de2['Apply'] = 'Anwenden';
  816.     $de2['StickyBit'] = 'Sticky Bit';
  817.     $de2['Pass'] = 'Passwort';
  818.     $de2['Lang'] = 'Sprache';
  819.     $de2['File'] = 'Datei';
  820.     $de2['File_s'] = 'Datei(en)';
  821.     $de2['Dir_s'] = 'Verzeichnis(se)';
  822.     $de2['To'] = 'an';
  823.     $de2['Destination'] = 'Ziel';
  824.     $de2['Configurations'] = 'Konfigurationen';
  825.     $de2['JSError'] = 'JavaScript Fehler';
  826.     $de2['NoSel'] = 'Keine Einträge ausgewählt';
  827.     $de2['SelDir'] = 'Wählen Sie das Zeilverzeichnis im Verzeichnis links';
  828.     $de2['TypeDir'] = 'Geben Sie den Verzeichnisnamen ein';
  829.     $de2['TypeArq'] = 'Geben Sie den Dateinamen ein';
  830.     $de2['TypeCmd'] = 'Geben Sie den Befehl ein';
  831.     $de2['TypeArqComp'] = 'Geben Sie den Dateinamen ein.\\nDie Datei-Extension legt den Kopressionstyp fest.\\nBeispiel:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip';
  832.     $de2['RemSel'] = 'Ausgewählte Dateien LÖSCHEN';
  833.     $de2['NoDestDir'] = 'Es wurde kein Zielverzeichnis angegeben';
  834.     $de2['DestEqOrig'] = 'Quell- und Zielverzeichnis sind identisch';
  835.     $de2['InvalidDest'] = 'Zielverzeichnis ungültig';
  836.     $de2['NoNewPerm'] = 'Unzureichende Rechte';
  837.     $de2['CopyTo'] = 'KOPIEREN nach';
  838.     $de2['MoveTo'] = 'VERSCHIEBEN nach';
  839.     $de2['AlterPermTo'] = 'RECHTE ÄNDERN in';
  840.     $de2['ConfExec'] = 'Bestätigung AUSFÜHREN';
  841.     $de2['ConfRem'] = 'Bestätigung LÖSCHEN';
  842.     $de2['EmptyDir'] = 'Leeres Verzeichnis';
  843.     $de2['IOError'] = 'Ein-/Ausgabe-Fehler';
  844.     $de2['FileMan'] = 'PHP File Manager';
  845.     $de2['TypePass'] = 'Bitte geben Sie das Passwort ein';
  846.     $de2['InvPass'] = 'Ungültiges Passwort';
  847.     $de2['ReadDenied'] = 'Leasezugriff verweigert';
  848.     $de2['FileNotFound'] = 'Datei nicht gefunden';
  849.     $de2['AutoClose'] = 'Schliessen nach Beenden';
  850.     $de2['OutDocRoot'] = 'Datei oberhalb DOCUMENT_ROOT';
  851.     $de2['NoCmd'] = 'Fehler: Befehl nicht informed';
  852.     $de2['ConfTrySave'] = 'Datei ohne Schreibberechtigung.\\nTrotzdem versuchen zu speichern';
  853.     $de2['ConfSaved'] = 'Konfigurationen gespeichert';
  854.     $de2['PassSaved'] = 'Passwort gespeichert';
  855.     $de2['FileDirExists'] = 'Datei oder Verzeichnis existiert bereits';
  856.     $de2['NoPhpinfo'] = 'Funktion phpinfo ausgeschaltet';
  857.     $de2['NoReturn'] = 'keine Rückgabe';
  858.     $de2['FileSent'] = 'Datei versandt';
  859.     $de2['SpaceLimReached'] = 'Plattenplatz erschöpft';
  860.     $de2['InvExt'] = 'Ungültige datei-Extension';
  861.     $de2['FileNoOverw'] = 'Datei kann nicht überschrieben werden';
  862.     $de2['FileOverw'] = 'Datei überschrieben';
  863.     $de2['FileIgnored'] = 'Datei ignoriert';
  864.     $de2['ChkVer'] = 'Überprüfe neuer Version';
  865.     $de2['ChkVerAvailable'] = 'Neue Version. Hier klicken für Download!!';
  866.     $de2['ChkVerNotAvailable'] = 'Keine neue Version verfügbar. :(';
  867.     $de2['ChkVerError'] = 'Verbindungsfehler.';
  868.     $de2['Website'] = 'Webseite';
  869.     $de2['SendingForm'] = 'Sende Dateien, bitte warten';
  870.     $de2['NoFileSel'] = 'Keine Dateien ausgewählt';
  871.     $de2['SelAll'] = 'Alle';
  872.     $de2['SelNone'] = 'Keine';
  873.     $de2['SelInverse'] = 'Invers';
  874.     $de2['Selected_s'] = 'ausgewählt';
  875.     $de2['Total'] = 'Total';
  876.     $de2['Partition'] = 'Partition';
  877.     $de2['RenderTime'] = 'Zeit zum Erzeugen der Seite';
  878.     $de2['Seconds'] = 'Sekunden';
  879.     $de2['ErrorReport'] = 'Fehler berichten';
  880.  
  881.     // German - by Mathias Rothe
  882.     $de3['Version'] = 'Version';
  883.     $de3['DocRoot'] = 'Dokumenten Root';
  884.     $de3['FLRoot'] = 'Datei Manager Root';
  885.     $de3['Name'] = 'Name';
  886.     $de3['And'] = 'und';
  887.     $de3['Enter'] = 'Enter';
  888.     $de3['Send'] = 'Senden';
  889.     $de3['Refresh'] = 'Refresh';
  890.     $de3['SaveConfig'] = 'Konfiguration speichern';
  891.     $de3['SavePass'] = 'Passwort speichern';
  892.     $de3['SaveFile'] = 'Datei speichern';
  893.     $de3['Save'] = 'Speichern';
  894.     $de3['Leave'] = 'Abbrechen';
  895.     $de3['Edit'] = 'Bearbeiten';
  896.     $de3['View'] = 'Anzeigen';
  897.     $de3['Config'] = 'Konfiguration';
  898.     $de3['Ren'] = 'Umbenennen';
  899.     $de3['Rem'] = 'Entfernen';
  900.     $de3['Compress'] = 'Packen';
  901.     $de3['Decompress'] = 'Entpacken';
  902.     $de3['ResolveIDs'] = 'IDs aufloesen';
  903.     $de3['Move'] = 'Verschieben';
  904.     $de3['Copy'] = 'Kopie';
  905.     $de3['ServerInfo'] = 'Server Info';
  906.     $de3['CreateDir'] = 'Neuer Ordner';
  907.     $de3['CreateArq'] = 'Neue Datei';
  908.     $de3['ExecCmd'] = 'Befehl ausfuehren';
  909.     $de3['Upload'] = 'Upload';
  910.     $de3['UploadEnd'] = 'Upload beendet';
  911.     $de3['Perm'] = 'Rechte';
  912.     $de3['Perms'] = 'Rechte';
  913.     $de3['Owner'] = 'Eigent';
  914.     $de3['Group'] = 'Gruppe';
  915.     $de3['Other'] = 'Andere';
  916.     $de3['Size'] = 'Groesse';
  917.     $de3['Date'] = 'Datum';
  918.     $de3['Type'] = 'Typ';
  919.     $de3['Free'] = 'frei';
  920.     $de3['Shell'] = 'Shell';
  921.     $de3['Read'] = 'Lesen';
  922.     $de3['Write'] = 'Schreiben';
  923.     $de3['Exec'] = 'Ausfuehren';
  924.     $de3['Apply'] = 'Bestaetigen';
  925.     $de3['StickyBit'] = 'Sticky Bit';
  926.     $de3['Pass'] = 'Passwort';
  927.     $de3['Lang'] = 'Sprache';
  928.     $de3['File'] = 'Datei';
  929.     $de3['File_s'] = 'Datei(en)';
  930.     $de3['Dir_s'] = 'Ordner';
  931.     $de3['To'] = 'nach';
  932.     $de3['Destination'] = 'Ziel';
  933.     $de3['Configurations'] = 'Konfiguration';
  934.     $de3['JSError'] = 'JavaScript Error';
  935.     $de3['NoSel'] = 'Keine Objekte ausgewaehlt';
  936.     $de3['SelDir'] = 'Waehlen Sie links das Zielverzeichnis aus';
  937.     $de3['TypeDir'] = 'Verzeichnisname eingeben';
  938.     $de3['TypeArq'] = 'Dateiname eingeben';
  939.     $de3['TypeCmd'] = 'Befehl eingeben';
  940.     $de3['TypeArqComp'] = 'Dateinamen eingeben.\\nDie Erweiterung definiert den Archiv-Typ.\\nEx:\\nname.zip\\nname.tar\\nname.bzip\\nname.gzip';
  941.     $de3['RemSel'] = 'Entferne ausgewaehlte Objekte';
  942.     $de3['NoDestDir'] = 'Kein Zielverzeichnis ausgewaehlt';
  943.     $de3['DestEqOrig'] = 'Quelle und Zielverzeichnis sind gleich';
  944.     $de3['InvalidDest'] = 'Zielverzeichnis ungueltig';
  945.     $de3['NoNewPerm'] = 'Neue Rechte nicht gesetzt';
  946.     $de3['CopyTo'] = 'Kopiere nach';
  947.     $de3['MoveTo'] = 'Verschiebe nach';
  948.     $de3['AlterPermTo'] = 'Aendere Rechte zu';
  949.     $de3['ConfExec'] = 'Ausfuehren bestaetigen';
  950.     $de3['ConfRem'] = 'Entfernen bestaetigen';
  951.     $de3['EmptyDir'] = 'Leerer Ordner';
  952.     $de3['IOError'] = 'I/O Fehler';
  953.     $de3['FileMan'] = 'PHP Datei Manager';
  954.     $de3['TypePass'] = 'Bitte Passwort eingeben';
  955.     $de3['InvPass'] = 'Falsches Passwort';
  956.     $de3['ReadDenied'] = 'Kein Lesezugriff';
  957.     $de3['FileNotFound'] = 'Datei nicht gefunden';
  958.     $de3['AutoClose'] = 'Beenden bei Fertigstellung';
  959.     $de3['OutDocRoot'] = 'Datei ausserhalb des DOCUMENT_ROOT';
  960.     $de3['NoCmd'] = 'Fehler: unbekannter Befehl';
  961.     $de3['ConfTrySave'] = 'Datei ohne Schreibrecht.\\nVersuche dennoch zu speichern';
  962.     $de3['ConfSaved'] = 'Konfiguration gespeichert';
  963.     $de3['PassSaved'] = 'Passwort gespeichert';
  964.     $de3['FileDirExists'] = 'Datei oder Verzeichnis existiert bereits';
  965.     $de3['NoPhpinfo'] = 'Funktion phpinfo gesperrt';
  966.     $de3['NoReturn'] = 'kein zurueck';
  967.     $de3['FileSent'] = 'Datei gesendet';
  968.     $de3['SpaceLimReached'] = 'Speicherplatz Grenze erreicht';
  969.     $de3['InvExt'] = 'Ungueltige Erweiterung';
  970.     $de3['FileNoOverw'] = 'Datei konnte nicht ueberschrieben werden';
  971.     $de3['FileOverw'] = 'Datei ueberschrieben';
  972.     $de3['FileIgnored'] = 'Datei ignoriert';
  973.     $de3['ChkVer'] = 'Puefe eine neuere Version';
  974.     $de3['ChkVerAvailable'] = 'Neue Version, hier klicken zum Download!!';
  975.     $de3['ChkVerNotAvailable'] = 'Keine neuere Version vorhanden. :(';
  976.     $de3['ChkVerError'] = 'Verbindungsfehler.';
  977.     $de3['Website'] = 'Website';
  978.     $de3['SendingForm'] = 'Dateien werden gesendet, bitte warten';
  979.     $de3['NoFileSel'] = 'Keine Datei ausgewaehlt';
  980.     $de3['SelAll'] = 'Alle';
  981.     $de3['SelNone'] = 'Keine';
  982.     $de3['SelInverse'] = 'Invertiere';
  983.     $de3['Selected_s'] = 'ausgewaehlt';
  984.     $de3['Total'] = 'gesamt';
  985.     $de3['Partition'] = 'Partition';
  986.     $de3['RenderTime'] = 'Zeit zur Erzeugung dieser Seite';
  987.     $de3['Seconds'] = 'sec';
  988.     $de3['ErrorReport'] = 'Fehlermeldungen';
  989.  
  990.     // French - by Jean Bilwes
  991.     $fr1['Version'] = 'Version';
  992.     $fr1['DocRoot'] = 'Racine des documents';
  993.     $fr1['FLRoot'] = 'Racine du gestionnaire de fichers';
  994.     $fr1['Name'] = 'Nom';
  995.     $fr1['And'] = 'et';
  996.     $fr1['Enter'] = 'Enter';
  997.     $fr1['Send'] = 'Envoyer';
  998.     $fr1['Refresh'] = 'Rafraichir';
  999.     $fr1['SaveConfig'] = 'Enregistrer la Configuration';
  1000.     $fr1['SavePass'] = 'Enregistrer le mot de passe';
  1001.     $fr1['SaveFile'] = 'Enregistrer le fichier';
  1002.     $fr1['Save'] = 'Enregistrer';
  1003.     $fr1['Leave'] = 'Quitter';
  1004.     $fr1['Edit'] = 'Modifier';
  1005.     $fr1['View'] = 'Voir';
  1006.     $fr1['Config'] = 'Config';
  1007.     $fr1['Ren'] = 'Renommer';
  1008.     $fr1['Rem'] = 'Detruire';
  1009.     $fr1['Compress'] = 'Compresser';
  1010.     $fr1['Decompress'] = 'Decompresser';
  1011.     $fr1['ResolveIDs'] = 'Resoudre les IDs';
  1012.     $fr1['Move'] = 'Déplacer';
  1013.     $fr1['Copy'] = 'Copier';
  1014.     $fr1['ServerInfo'] = 'info du sreveur';
  1015.     $fr1['CreateDir'] = 'Créer un répertoire';
  1016.     $fr1['CreateArq'] = 'Créer un fichier';
  1017.     $fr1['ExecCmd'] = 'Executer une Commande';
  1018.     $fr1['Upload'] = 'Téléversement(upload)';
  1019.     $fr1['UploadEnd'] = 'Téléversement Fini';
  1020.     $fr1['Perm'] = 'Perm';
  1021.     $fr1['Perms'] = 'Permissions';
  1022.     $fr1['Owner'] = 'Propriétaire';
  1023.     $fr1['Group'] = 'Groupe';
  1024.     $fr1['Other'] = 'Autre';
  1025.     $fr1['Size'] = 'Taille';
  1026.     $fr1['Date'] = 'Date';
  1027.     $fr1['Type'] = 'Type';
  1028.     $fr1['Free'] = 'libre';
  1029.     $fr1['Shell'] = 'Shell';
  1030.     $fr1['Read'] = 'Lecture';
  1031.     $fr1['Write'] = 'Ecriture';
  1032.     $fr1['Exec'] = 'Executer';
  1033.     $fr1['Apply'] = 'Appliquer';
  1034.     $fr1['StickyBit'] = 'Sticky Bit';
  1035.     $fr1['Pass'] = 'Mot de passe';
  1036.     $fr1['Lang'] = 'Langage';
  1037.     $fr1['File'] = 'Fichier';
  1038.     $fr1['File_s'] = 'fichier(s)';
  1039.     $fr1['Dir_s'] = 'répertoire(s)';
  1040.     $fr1['To'] = 'à';
  1041.     $fr1['Destination'] = 'Destination';
  1042.     $fr1['Configurations'] = 'Configurations';
  1043.     $fr1['JSError'] = 'Erreur JavaScript';
  1044.     $fr1['NoSel'] = 'Rien n\'est sélectionné';
  1045.     $fr1['SelDir'] = 'Selectionnez le répertoire de destination dans le panneau gauche';
  1046.     $fr1['TypeDir'] = 'Entrer le nom du répertoire';
  1047.     $fr1['TypeArq'] = 'Entrer le nom du fichier';
  1048.     $fr1['TypeCmd'] = 'Entrer la commande';
  1049.     $fr1['TypeArqComp'] = 'Entrer le nom du fichier.\\nL\'extension définira le type de compression.\\nEx:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip';
  1050.     $fr1['RemSel'] = 'EFFACER les objets sélectionnés';
  1051.     $fr1['NoDestDir'] = 'Aucun répertoire de destination n\'est sélectionné';
  1052.     $fr1['DestEqOrig'] = 'Les répertoires source et destination sont identiques';
  1053.     $fr1['InvalidDest'] = 'Le répertoire de destination est invalide';
  1054.     $fr1['NoNewPerm'] = 'Nouvelle permission non établie';
  1055.     $fr1['CopyTo'] = 'COPIER vers';
  1056.     $fr1['MoveTo'] = 'DEPLACER vers';
  1057.     $fr1['AlterPermTo'] = 'CHANGER LES PERMISSIONS';
  1058.     $fr1['ConfExec'] = 'Confirmer l\'EXECUTION';
  1059.     $fr1['ConfRem'] = 'Confirmer la DESTRUCTION';
  1060.     $fr1['EmptyDir'] = 'Répertoire vide';
  1061.     $fr1['IOError'] = 'I/O Error';
  1062.     $fr1['FileMan'] = 'PHP File Manager';
  1063.     $fr1['TypePass'] = 'Entrer le mot de passe';
  1064.     $fr1['InvPass'] = 'Mot de passe invalide';
  1065.     $fr1['ReadDenied'] = 'Droit de lecture refusé';
  1066.     $fr1['FileNotFound'] = 'Fichier introuvable';
  1067.     $fr1['AutoClose'] = 'Fermer sur fin';
  1068.     $fr1['OutDocRoot'] = 'Fichier au delà de DOCUMENT_ROOT';
  1069.     $fr1['NoCmd'] = 'Erreur: Commande non renseignée';
  1070.     $fr1['ConfTrySave'] = 'Fichier sans permission d\'écriture.\\nJ\'essaie de l\'enregister';
  1071.     $fr1['ConfSaved'] = 'Configurations enreristrée';
  1072.     $fr1['PassSaved'] = 'Mot de passe enreristré';
  1073.     $fr1['FileDirExists'] = 'Le fichier ou le répertoire existe déjà';
  1074.     $fr1['NoPhpinfo'] = 'Function phpinfo désactivée';
  1075.     $fr1['NoReturn'] = 'pas de retour';
  1076.     $fr1['FileSent'] = 'Fichier envoyé';
  1077.     $fr1['SpaceLimReached'] = 'Espace maxi atteint';
  1078.     $fr1['InvExt'] = 'Extension invalide';
  1079.     $fr1['FileNoOverw'] = 'Le fichier ne peut pas etre écrasé';
  1080.     $fr1['FileOverw'] = 'Fichier écrasé';
  1081.     $fr1['FileIgnored'] = 'Fichier ignoré';
  1082.     $fr1['ChkVer'] = 'Verifier nouvelle version';
  1083.     $fr1['ChkVerAvailable'] = 'Nouvelle version, cliquer ici pour la téléchager!!';
  1084.     $fr1['ChkVerNotAvailable'] = 'Aucune mise a jour de disponible. :(';
  1085.     $fr1['ChkVerError'] = 'Erreur de connection.';
  1086.     $fr1['Website'] = 'siteweb';
  1087.     $fr1['SendingForm'] = 'Envoi des fichiers en cours, Patienter';
  1088.     $fr1['NoFileSel'] = 'Aucun fichier sélectionné';
  1089.     $fr1['SelAll'] = 'Tous';
  1090.     $fr1['SelNone'] = 'Aucun';
  1091.     $fr1['SelInverse'] = 'Inverser';
  1092.     $fr1['Selected_s'] = 'selectioné';
  1093.     $fr1['Total'] = 'total';
  1094.     $fr1['Partition'] = 'Partition';
  1095.     $fr1['RenderTime'] = 'Temps pour afficher cette page';
  1096.     $fr1['Seconds'] = 'sec';
  1097.     $fr1['ErrorReport'] = 'Rapport d\'erreur';
  1098.  
  1099.     // French - by Sharky
  1100.     $fr2['Version'] = 'Version';
  1101.     $fr2['DocRoot'] = 'Racine document';
  1102.     $fr2['FLRoot'] = 'Gestion des fichiers racine';
  1103.     $fr2['Name'] = 'Nom';
  1104.     $fr2['And'] = 'et';
  1105.     $fr2['Enter'] = 'Entrer';
  1106.     $fr2['Send'] = 'Envoi';
  1107.     $fr2['Refresh'] = 'Rafraîchir';
  1108.     $fr2['SaveConfig'] = 'Sauver configurations';
  1109.     $fr2['SavePass'] = 'Sauver mot de passe';
  1110.     $fr2['SaveFile'] = 'Sauver fichier';
  1111.     $fr2['Save'] = 'Sauver';
  1112.     $fr2['Leave'] = 'Permission';
  1113.     $fr2['Edit'] = 'Éditer';
  1114.     $fr2['View'] = 'Afficher';
  1115.     $fr2['Config'] = 'config';
  1116.     $fr2['Ren'] = 'Renommer';
  1117.     $fr2['Rem'] = 'Effacer';
  1118.     $fr2['Compress'] = 'Compresser';
  1119.     $fr2['Decompress'] = 'Décompresser';
  1120.     $fr2['ResolveIDs'] = 'Résoudre ID';
  1121.     $fr2['Move'] = 'Déplacer';
  1122.     $fr2['Copy'] = 'Copier';
  1123.     $fr2['ServerInfo'] = 'Information Serveur';
  1124.     $fr2['CreateDir'] = 'Créer un répertoire';
  1125.     $fr2['CreateArq'] = 'Créer un fichier';
  1126.     $fr2['ExecCmd'] = 'Executé une commande';
  1127.     $fr2['Upload'] = 'Transférer';
  1128.     $fr2['UploadEnd'] = 'Transfert terminé';
  1129.     $fr2['Perm'] = 'Perm';
  1130.     $fr2['Perms'] = 'Permissions';
  1131.     $fr2['Owner'] = 'Propriétaire';
  1132.     $fr2['Group'] = 'Groupe';
  1133.     $fr2['Other'] = 'Autre';
  1134.     $fr2['Size'] = 'Taille';
  1135.     $fr2['Date'] = 'date';
  1136.     $fr2['Type'] = 'Type';
  1137.     $fr2['Free'] = 'Libre';
  1138.     $fr2['Shell'] = 'Shell';
  1139.     $fr2['Read'] = 'lecture';
  1140.     $fr2['Write'] = 'écriture';
  1141.     $fr2['Exec'] = 'Execute';
  1142.     $fr2['Apply'] = 'Appliquer';
  1143.     $fr2['StickyBit'] = 'Bit figer';
  1144.     $fr2['Pass'] = 'mot de passe';
  1145.     $fr2['Lang'] = 'Language';
  1146.     $fr2['File'] = 'Fichier';
  1147.     $fr2['File_s'] = 'fichier(s)';
  1148.     $fr2['Dir_s'] = 'répertoire(s)';
  1149.     $fr2['To'] = 'à';
  1150.     $fr2['Destination'] = 'Destination';
  1151.     $fr2['Configurations'] = 'Configurations';
  1152.     $fr2['JSError'] = 'Erreur JavaScript';
  1153.     $fr2['NoSel'] = 'Il n\'y a pas d\'objets sélectionnés';
  1154.     $fr2['SelDir'] = 'Sélectionnez le répertoire de destination sur l\'arborescence de gauche';
  1155.     $fr2['TypeDir'] = 'Entrez le nom du répertoire';
  1156.     $fr2['TypeArq'] = 'Entrez le nom du fichier';
  1157.     $fr2['TypeCmd'] = 'Entrez la commande';
  1158.     $fr2['TypeArqComp'] = 'Entrez le fichier.\\nL\'extension définira le type de compression.\\nEx:\\nnom.zip\\nnom.tar\\nnom.bzip\\nnom.gzip';
  1159.     $fr2['RemSel'] = 'EFFACEZ l\'objet sélectionné';
  1160.     $fr2['NoDestDir'] = 'Il n\'y a aucun répertoire de destination sélectionné';
  1161.     $fr2['DestEqOrig'] = 'Origine et répertoires de destination sont identique';
  1162.     $fr2['InvalidDest'] = 'Répertoire de destination est invalide';
  1163.     $fr2['NoNewPerm'] = 'Nouvelle autorisation n\'a pas été configuré';
  1164.     $fr2['CopyTo'] = 'COPIE dans';
  1165.     $fr2['MoveTo'] = 'DÉPLACER dans';
  1166.     $fr2['AlterPermTo'] = 'CHANGER PERMISSIONS dans';
  1167.     $fr2['ConfExec'] = 'Confirmer EXECUTE';
  1168.     $fr2['ConfRem'] = 'Confirmer EFFACER';
  1169.     $fr2['EmptyDir'] = 'Répertoire vide';
  1170.     $fr2['IOError'] = 'I/O Erreur';
  1171.     $fr2['FileMan'] = 'Gestion de fichiers PHP';
  1172.     $fr2['TypePass'] = 'Entrer le mot de passe';
  1173.     $fr2['InvPass'] = 'Mot de passe invalide';
  1174.     $fr2['ReadDenied'] = 'Accès en lecture refuser';
  1175.     $fr2['FileNotFound'] = 'Fichier non-trouvé';
  1176.     $fr2['AutoClose'] = 'Fermez a la fin';
  1177.     $fr2['OutDocRoot'] = 'Fichier au-delà DOCUMENT_ROOT';
  1178.     $fr2['NoCmd'] = 'Erreur: Commande inconnue';
  1179.     $fr2['ConfTrySave'] = 'Fichier sans permission d\'écriture.\\nEssayez de sauver';
  1180.     $fr2['ConfSaved'] = 'Configurations sauvée';
  1181.     $fr2['PassSaved'] = 'Mot de passe sauvé';
  1182.     $fr2['FileDirExists'] = 'Fichier ou répertoire déjà existant';
  1183.     $fr2['NoPhpinfo'] = 'Function phpinfo désactivé';
  1184.     $fr2['NoReturn'] = 'sans retour possible';
  1185.     $fr2['FileSent'] = 'Fichier envoyé';
  1186.     $fr2['SpaceLimReached'] = 'Limite de d\'espace atteint';
  1187.     $fr2['InvExt'] = 'Extension invalide';
  1188.     $fr2['FileNoOverw'] = 'Fichier ne peut pas être écrasé';
  1189.     $fr2['FileOverw'] = 'Fichier écrasé';
  1190.     $fr2['FileIgnored'] = 'Fichier ignoré';
  1191.     $fr2['ChkVer'] = 'Check nouvelle version';
  1192.     $fr2['ChkVerAvailable'] = 'Nouvelle version, cliquez ici pour commencer le téléchargement!!';
  1193.     $fr2['ChkVerNotAvailable'] = 'Aucune nouvelle version disponible. :(';
  1194.     $fr2['ChkVerError'] = 'Erreur de connection.';
  1195.     $fr2['Website'] = 'Site Web';
  1196.     $fr2['SendingForm'] = 'Envoye de fichier, s\'il vous plaît patientez';
  1197.     $fr2['NoFileSel'] = 'Aucun fichier sélectionné';
  1198.     $fr2['SelAll'] = 'Tout';
  1199.     $fr2['SelNone'] = 'Aucuns';
  1200.     $fr2['SelInverse'] = 'Inverser';
  1201.     $fr2['Selected_s'] = 'sélectionné';
  1202.     $fr2['Total'] = 'total';
  1203.     $fr2['Partition'] = 'Partition';
  1204.     $fr2['RenderTime'] = 'Temps pour afficher la page';
  1205.     $fr2['Seconds'] = 'sec';
  1206.     $fr2['ErrorReport'] = 'Liste des erreurs';
  1207.  
  1208.     // French - by Michel Lainey
  1209.     $fr3['Version'] = 'Version';
  1210.     $fr3['DocRoot'] = 'Racine Document';
  1211.     $fr3['FLRoot'] = 'Racine File Manager';
  1212.     $fr3['Name'] = 'Nom';
  1213.     $fr3['And'] = 'et';
  1214.     $fr3['Enter'] = 'Valider';
  1215.     $fr3['Send'] = 'Envoyer';
  1216.     $fr3['Refresh'] = 'Raffraichir';
  1217.     $fr3['SaveConfig'] = 'Sauvegarder Config';
  1218.     $fr3['SavePass'] = 'Sauvegarder Password';
  1219.     $fr3['SaveFile'] = 'Sauvegarder Fichier';
  1220.     $fr3['Save'] = 'Sauvegarder';
  1221.     $fr3['Leave'] = 'Quitter';
  1222.     $fr3['Edit'] = 'Editer';
  1223.     $fr3['View'] = 'Visualiser';
  1224.     $fr3['Config'] = 'Config';
  1225.     $fr3['Ren'] = 'Renommer';
  1226.     $fr3['Rem'] = 'Supprimer';
  1227.     $fr3['Compress'] = 'Compresser';
  1228.     $fr3['Decompress'] = 'Décompresser';
  1229.     $fr3['ResolveIDs'] = 'Resoudre IDs';
  1230.     $fr3['Move'] = 'Déplacer';
  1231.     $fr3['Copy'] = 'Copier';
  1232.     $fr3['ServerInfo'] = 'Server Info';
  1233.     $fr3['CreateDir'] = 'Créer Répertoire';
  1234.     $fr3['CreateArq'] = 'Créer Fichier';
  1235.     $fr3['ExecCmd'] = 'Executer Commande';
  1236.     $fr3['Upload'] = 'Upload';
  1237.     $fr3['UploadEnd'] = 'Upload Fini';
  1238.     $fr3['Perm'] = 'Perm';
  1239.     $fr3['Perms'] = 'Permissions';
  1240.     $fr3['Owner'] = 'Propriétaire';
  1241.     $fr3['Group'] = 'Groupe';
  1242.     $fr3['Other'] = 'Autres';
  1243.     $fr3['Size'] = 'Taille';
  1244.     $fr3['Date'] = 'Date';
  1245.     $fr3['Type'] = 'Type';
  1246.     $fr3['Free'] = 'libre';
  1247.     $fr3['Shell'] = 'Shell';
  1248.     $fr3['Read'] = 'Lecture';
  1249.     $fr3['Write'] = 'Ecriture';
  1250.     $fr3['Exec'] = 'Execute';
  1251.     $fr3['Apply'] = 'Application';
  1252.     $fr3['StickyBit'] = 'Sticky Bit';
  1253.     $fr3['Pass'] = 'Password';
  1254.     $fr3['Lang'] = 'Language';
  1255.     $fr3['File'] = 'Fichier';
  1256.     $fr3['File_s'] = 'fichier(s)';
  1257.     $fr3['Dir_s'] = 'répertoire(s)';
  1258.     $fr3['To'] = 'à';
  1259.     $fr3['Destination'] = 'Destination';
  1260.     $fr3['Configurations'] = 'Configurations';
  1261.     $fr3['JSError'] = 'Erreur JavaScript';
  1262.     $fr3['NoSel'] = 'Aucun élément sélectionné';
  1263.     $fr3['SelDir'] = "Sélectionner le répertoire de destination dans l'arboresence de gauchethe destination directory on the left tree";
  1264.     $fr3['TypeDir'] = 'Indiquer le nom du répertoire';
  1265.     $fr3['TypeArq'] = 'Indiquer le nom du fichier';
  1266.     $fr3['TypeCmd'] = 'Entrer une commande';
  1267.     $fr3['TypeArqComp'] = "Indiquer le nom du fichier.\\nL'extension définira le type de compression.\\nEx:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip";
  1268.     $fr3['RemSel'] = "SUPPRIMER l'élément sélectionné";
  1269.     $fr3['NoDestDir'] = "Il n'y a pas de répertoire destination sélectionné";
  1270.     $fr3['DestEqOrig'] = 'Répertoire Origine et Destination sont identiques';
  1271.     $fr3['InvalidDest'] = 'Le répertoire de destination est invalide';
  1272.     $fr3['NoNewPerm'] = 'Nouvelle permission non appliquée';
  1273.     $fr3['CopyTo'] = 'COPIER vers';
  1274.     $fr3['MoveTo'] = 'DEPLACER vers';
  1275.     $fr3['AlterPermTo'] = 'CHANGER LES PERMISSIONS vers';
  1276.     $fr3['ConfExec'] = 'Confirmer EXECUTION';
  1277.     $fr3['ConfRem'] = 'Confirmer SUPPRESSION';
  1278.     $fr3['EmptyDir'] = 'Répertoire vide';
  1279.     $fr3['IOError'] = 'Erreur entrée/sortie';
  1280.     $fr3['FileMan'] = 'PHP File Manager';
  1281.     $fr3['TypePass'] = 'Saisir le mot de passe';
  1282.     $fr3['InvPass'] = 'Mot de passe invalide';
  1283.     $fr3['ReadDenied'] = 'Accès en lecture refusé';
  1284.     $fr3['FileNotFound'] = 'Fichier non trouvé';
  1285.     $fr3['AutoClose'] = 'Fermeture en fin de traitement';
  1286.     $fr3['OutDocRoot'] = 'Fichier en dessous de DOCUMENT_ROOT';
  1287.     $fr3['NoCmd'] = 'Erreur : Commande non renseignée';
  1288.     $fr3['ConfTrySave'] = "Fichier sans permission d'écriture.\\nTenter de sauver malgré tout";
  1289.     $fr3['ConfSaved'] = 'Configurations sauvegardée';
  1290.     $fr3['PassSaved'] = 'Password sauvegardé';
  1291.     $fr3['FileDirExists'] = 'Fichier ou répertoire déjà existant';
  1292.     $fr3['NoPhpinfo'] = 'Fonction phpinfo disactivée';
  1293.     $fr3['NoReturn'] = 'pas de retour';
  1294.     $fr3['FileSent'] = 'Fichier envoyé';
  1295.     $fr3['SpaceLimReached'] = 'Capacité maximale atteinte';
  1296.     $fr3['InvExt'] = 'Extension invalide';
  1297.     $fr3['FileNoOverw'] = 'Fichier ne pouvant être remplacé';
  1298.     $fr3['FileOverw'] = 'Fichier remplacé';
  1299.     $fr3['FileIgnored'] = 'Fichier ignoré';
  1300.     $fr3['ChkVer'] = 'Vérifier nouvelle version';
  1301.     $fr3['ChkVerAvailable'] = 'Nouvelle version, cliquer ici pour commencer le téléchargement !';
  1302.     $fr3['ChkVerNotAvailable'] = 'Pas de nouvelle version disponible. :(';
  1303.     $fr3['ChkVerError'] = 'Erreur de connection.';
  1304.     $fr3['Website'] = 'Site Web';
  1305.     $fr3['SendingForm'] = "Fichiers en cours d'envoi, merci de patienter";
  1306.     $fr3['NoFileSel'] = 'Pas de fichier sélectionné';
  1307.     $fr3['SelAll'] = 'Tous';
  1308.     $fr3['SelNone'] = 'Aucun';
  1309.     $fr3['SelInverse'] = 'Inverser';
  1310.     $fr3['Selected_s'] = 'sélectionné';
  1311.     $fr3['Total'] = 'total';
  1312.     $fr3['Partition'] = 'Partition';
  1313.     $fr3['RenderTime'] = 'Temps nécessaire pour obtenir cette page';
  1314.     $fr3['Seconds'] = 'sec';
  1315.     $fr3['ErrorReport'] = 'Erreur de compte rendu';
  1316.  
  1317.     // Dutch - by Leon Buijs
  1318.     $nl['Version'] = 'Versie';
  1319.     $nl['DocRoot'] = 'Document Root';
  1320.     $nl['FLRoot'] = 'File Manager Root';
  1321.     $nl['Name'] = 'Naam';
  1322.     $nl['And'] = 'en';
  1323.     $nl['Enter'] = 'Enter';
  1324.     $nl['Send'] = 'Verzend';
  1325.     $nl['Refresh'] = 'Vernieuw';
  1326.     $nl['SaveConfig'] = 'Configuratie opslaan';
  1327.     $nl['SavePass'] = 'Wachtwoord opslaan';
  1328.     $nl['SaveFile'] = 'Bestand opslaan';
  1329.     $nl['Save'] = 'Opslaan';
  1330.     $nl['Leave'] = 'Verlaten';
  1331.     $nl['Edit'] = 'Wijzigen';
  1332.     $nl['View'] = 'Toon';
  1333.     $nl['Config'] = 'Configuratie';
  1334.     $nl['Ren'] = 'Naam wijzigen';
  1335.     $nl['Rem'] = 'Verwijderen';
  1336.     $nl['Compress'] = 'Comprimeren';
  1337.     $nl['Decompress'] = 'Decomprimeren';
  1338.     $nl['ResolveIDs'] = 'Resolve IDs';
  1339.     $nl['Move'] = 'Verplaats';
  1340.     $nl['Copy'] = 'Kopieer';
  1341.     $nl['ServerInfo'] = 'Serverinformatie';
  1342.     $nl['CreateDir'] = 'Nieuwe map';
  1343.     $nl['CreateArq'] = 'Nieuw bestand';
  1344.     $nl['ExecCmd'] = 'Commando uitvoeren';
  1345.     $nl['Upload'] = 'Upload';
  1346.     $nl['UploadEnd'] = 'Upload voltooid';
  1347.     $nl['Perm'] = 'Rechten';
  1348.     $nl['Perms'] = 'Rechten';
  1349.     $nl['Owner'] = 'Eigenaar';
  1350.     $nl['Group'] = 'Groep';
  1351.     $nl['Other'] = 'Anderen';
  1352.     $nl['Size'] = 'Grootte';
  1353.     $nl['Date'] = 'Datum';
  1354.     $nl['Type'] = 'Type';
  1355.     $nl['Free'] = 'free';
  1356.     $nl['Shell'] = 'Shell';
  1357.     $nl['Read'] = 'Lezen';
  1358.     $nl['Write'] = 'Schrijven';
  1359.     $nl['Exec'] = 'Uitvoeren';
  1360.     $nl['Apply'] = 'Toepassen';
  1361.     $nl['StickyBit'] = 'Sticky Bit';
  1362.     $nl['Pass'] = 'Wachtwoord';
  1363.     $nl['Lang'] = 'Taal';
  1364.     $nl['File'] = 'Bestand';
  1365.     $nl['File_s'] = 'bestand(en)';
  1366.     $nl['Dir_s'] = 'map(pen)';
  1367.     $nl['To'] = 'naar';
  1368.     $nl['Destination'] = 'Bestemming';
  1369.     $nl['Configurations'] = 'Instellingen';
  1370.     $nl['JSError'] = 'Javascriptfout';
  1371.     $nl['NoSel'] = 'Er zijn geen bestanden geselecteerd';
  1372.     $nl['SelDir'] = 'Kies de bestemming in de boom aan de linker kant';
  1373.     $nl['TypeDir'] = 'Voer de mapnaam in';
  1374.     $nl['TypeArq'] = 'Voer de bestandsnaam in';
  1375.     $nl['TypeCmd'] = 'Voer het commando in';
  1376.     $nl['TypeArqComp'] = 'Voer de bestandsnaam in.\\nDe extensie zal het compressietype bepalen.\\nEx:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip';
  1377.     $nl['RemSel'] = 'VERWIJDER geselecteerde itens';
  1378.     $nl['NoDestDir'] = 'Er is geen doelmap geselecteerd';
  1379.     $nl['DestEqOrig'] = 'Bron- en doelmap zijn hetzelfde';
  1380.     $nl['InvalidDest'] = 'Doelmap is ongeldig';
  1381.     $nl['NoNewPerm'] = 'Nieuwe rechten niet geset';
  1382.     $nl['CopyTo'] = 'KOPIEER naar';
  1383.     $nl['MoveTo'] = 'VERPLAATS naar';
  1384.     $nl['AlterPermTo'] = 'VERANDER RECHTEN in';
  1385.     $nl['ConfExec'] = 'Bevestig UITVOEREN';
  1386.     $nl['ConfRem'] = 'Bevestig VERWIJDEREN';
  1387.     $nl['EmptyDir'] = 'Lege map';
  1388.     $nl['IOError'] = 'I/O Error';
  1389.     $nl['FileMan'] = 'PHP File Manager';
  1390.     $nl['TypePass'] = 'Voer het wachtwoord in';
  1391.     $nl['InvPass'] = 'Ongeldig wachtwoord';
  1392.     $nl['ReadDenied'] = 'Leestoegang ontzegd';
  1393.     $nl['FileNotFound'] = 'Bestand niet gevonden';
  1394.     $nl['AutoClose'] = 'Sluit na voltooien';
  1395.     $nl['OutDocRoot'] = 'Bestand buiten DOCUMENT_ROOT';
  1396.     $nl['NoCmd'] = 'Error: Command not informed';
  1397.     $nl['ConfTrySave'] = 'Bestand zonder schrijfrechten.\\nProbeer een andere manier';
  1398.     $nl['ConfSaved'] = 'Instellingen opgeslagen';
  1399.     $nl['PassSaved'] = 'Wachtwoord opgeslagen';
  1400.     $nl['FileDirExists'] = 'Bestand of map bestaat al';
  1401.     $nl['NoPhpinfo'] = 'Functie \'phpinfo\' is uitgeschakeld';
  1402.     $nl['NoReturn'] = 'no return';
  1403.     $nl['FileSent'] = 'Bestand verzonden';
  1404.     $nl['SpaceLimReached'] = 'Opslagruimtelimiet bereikt';
  1405.     $nl['InvExt'] = 'Ongeldige extensie';
  1406.     $nl['FileNoOverw'] = 'Bestand kan niet worden overgeschreven';
  1407.     $nl['FileOverw'] = 'Bestand overgeschreven';
  1408.     $nl['FileIgnored'] = 'Bestand genegeerd';
  1409.     $nl['ChkVer'] = 'Controleer nieuwe versie';
  1410.     $nl['ChkVerAvailable'] = 'Nieuwe versie, klik hier om de download te starten';
  1411.     $nl['ChkVerNotAvailable'] = 'Geen nieuwe versie beschikbaar';
  1412.     $nl['ChkVerError'] = 'Verbindingsfout.';
  1413.     $nl['Website'] = 'Website';
  1414.     $nl['SendingForm'] = 'Bestanden worden verzonden. Even geduld...';
  1415.     $nl['NoFileSel'] = 'Geen bestanden geselecteerd';
  1416.     $nl['SelAll'] = 'Alles';
  1417.     $nl['SelNone'] = 'Geen';
  1418.     $nl['SelInverse'] = 'Keer om';
  1419.     $nl['Selected_s'] = 'geselecteerd';
  1420.     $nl['Total'] = 'totaal';
  1421.     $nl['Partition'] = 'Partitie';
  1422.     $nl['RenderTime'] = 'Tijd voor maken van deze pagina';
  1423.     $nl['Seconds'] = 'sec';
  1424.     $nl['ErrorReport'] = 'Foutenrapport';
  1425.  
  1426.     // Italian - by Valerio Capello
  1427.     $it1['Version'] = 'Versione';
  1428.     $it1['DocRoot'] = 'Document Root';
  1429.     $it1['FLRoot'] = 'File Manager Root';
  1430.     $it1['Name'] = 'Nome';
  1431.     $it1['And'] = 'e';
  1432.     $it1['Enter'] = 'Immetti';
  1433.     $it1['Send'] = 'Invia';
  1434.     $it1['Refresh'] = 'Aggiorna';
  1435.     $it1['SaveConfig'] = 'Salva la Configurazione';
  1436.     $it1['SavePass'] = 'Salva la Password';
  1437.     $it1['SaveFile'] = 'Salva il File';
  1438.     $it1['Save'] = 'Salva';
  1439.     $it1['Leave'] = 'Abbandona';
  1440.     $it1['Edit'] = 'Modifica';
  1441.     $it1['View'] = 'Guarda';
  1442.     $it1['Config'] = 'Configurazione';
  1443.     $it1['Ren'] = 'Rinomina';
  1444.     $it1['Rem'] = 'Elimina';
  1445.     $it1['Compress'] = 'Comprimi';
  1446.     $it1['Decompress'] = 'Decomprimi';
  1447.     $it1['ResolveIDs'] = 'Risolvi IDs';
  1448.     $it1['Move'] = 'Sposta';
  1449.     $it1['Copy'] = 'Copia';
  1450.     $it1['ServerInfo'] = 'Informazioni sul Server';
  1451.     $it1['CreateDir'] = 'Crea Directory';
  1452.     $it1['CreateArq'] = 'Crea File';
  1453.     $it1['ExecCmd'] = 'Esegui Comando';
  1454.     $it1['Upload'] = 'Carica';
  1455.     $it1['UploadEnd'] = 'Caricamento terminato';
  1456.     $it1['Perm'] = 'Perm';
  1457.     $it1['Perms'] = 'Permessi';
  1458.     $it1['Owner'] = 'Proprietario';
  1459.     $it1['Group'] = 'Gruppo';
  1460.     $it1['Other'] = 'Altri';
  1461.     $it1['Size'] = 'Dimensioni';
  1462.     $it1['Date'] = 'Data';
  1463.     $it1['Type'] = 'Tipo';
  1464.     $it1['Free'] = 'liberi';
  1465.     $it1['Shell'] = 'Shell';
  1466.     $it1['Read'] = 'Lettura';
  1467.     $it1['Write'] = 'Scrittura';
  1468.     $it1['Exec'] = 'Esecuzione';
  1469.     $it1['Apply'] = 'Applica';
  1470.     $it1['StickyBit'] = 'Sticky Bit';
  1471.     $it1['Pass'] = 'Password';
  1472.     $it1['Lang'] = 'Lingua';
  1473.     $it1['File'] = 'File';
  1474.     $it1['File_s'] = 'file';
  1475.     $it1['Dir_s'] = 'directory';
  1476.     $it1['To'] = 'a';
  1477.     $it1['Destination'] = 'Destinazione';
  1478.     $it1['Configurations'] = 'Configurazione';
  1479.     $it1['JSError'] = 'Errore JavaScript';
  1480.     $it1['NoSel'] = 'Non ci sono elementi selezionati';
  1481.     $it1['SelDir'] = 'Scegli la directory di destinazione';
  1482.     $it1['TypeDir'] = 'Inserisci il nome della directory';
  1483.     $it1['TypeArq'] = 'Inserisci il nome del file';
  1484.     $it1['TypeCmd'] = 'Inserisci il comando';
  1485.     $it1['TypeArqComp'] = 'Inserisci il nome del file.\\nLa estensione definirà il tipo di compressione.\\nEsempio:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip';
  1486.     $it1['RemSel'] = 'ELIMINA gli elementi selezionati';
  1487.     $it1['NoDestDir'] = 'LA directory di destinazione non è stata selezionata';
  1488.     $it1['DestEqOrig'] = 'La directory di origine e di destinazione sono la stessa';
  1489.     $it1['InvalidDest'] = 'La directory di destinazione non è valida';
  1490.     $it1['NoNewPerm'] = 'Nuovi permessi non attivati';
  1491.     $it1['CopyTo'] = 'COPIA in';
  1492.     $it1['MoveTo'] = 'SPOSTA in';
  1493.     $it1['AlterPermTo'] = 'CAMBIA I PERMESSI: ';
  1494.     $it1['ConfExec'] = 'Conferma ESECUZIONE';
  1495.     $it1['ConfRem'] = 'Conferma ELIMINAZIONE';
  1496.     $it1['EmptyDir'] = 'Directory vuota';
  1497.     $it1['IOError'] = 'Errore di I/O';
  1498.     $it1['FileMan'] = 'PHP File Manager';
  1499.     $it1['TypePass'] = 'Immetti la password';
  1500.     $it1['InvPass'] = 'Password non valida';
  1501.     $it1['ReadDenied'] = 'Permesso di lettura negato';
  1502.     $it1['FileNotFound'] = 'File non trovato';
  1503.     $it1['AutoClose'] = 'Chiudi la finestra al termine';
  1504.     $it1['OutDocRoot'] = 'File oltre DOCUMENT_ROOT';
  1505.     $it1['NoCmd'] = 'Errore: Comando non informato';
  1506.     $it1['ConfTrySave'] = 'File senza permesso di scrittura.\\nProvo a salvare comunque';
  1507.     $it1['ConfSaved'] = 'Configurazione salvata';
  1508.     $it1['PassSaved'] = 'Password salvata';
  1509.     $it1['FileDirExists'] = 'Il file o la directory esiste già';
  1510.     $it1['NoPhpinfo'] = 'La funzione phpinfo è disabilitata';
  1511.     $it1['NoReturn'] = 'senza Return';
  1512.     $it1['FileSent'] = 'File inviato';
  1513.     $it1['SpaceLimReached'] = 'è stato raggiunto il limite di spazio disponibile';
  1514.     $it1['InvExt'] = 'Estensione non valida';
  1515.     $it1['FileNoOverw'] = 'Il file non può essere sovrascritto';
  1516.     $it1['FileOverw'] = 'File sovrascritto';
  1517.     $it1['FileIgnored'] = 'File ignorato';
  1518.     $it1['ChkVer'] = 'Controlla se è disponibile una nuova versione';
  1519.     $it1['ChkVerAvailable'] = 'è disponibile una nuova versione: premi qui per scaricarla.';
  1520.     $it1['ChkVerNotAvailable'] = 'Non è disponibile nessuna nuova versione. :(';
  1521.     $it1['ChkVerError'] = 'Errore di connessione.';
  1522.     $it1['Website'] = 'Sito Web';
  1523.     $it1['SendingForm'] = 'Invio file, attendere prego';
  1524.     $it1['NoFileSel'] = 'Nessun file selezionato';
  1525.     $it1['SelAll'] = 'Tutti';
  1526.     $it1['SelNone'] = 'Nessuno';
  1527.     $it1['SelInverse'] = 'Inverti';
  1528.     $it1['Selected_s'] = 'selezionato';
  1529.     $it1['Total'] = 'totali';
  1530.     $it1['Partition'] = 'Partizione';
  1531.     $it1['RenderTime'] = 'Tempo per elaborare questa pagina';
  1532.     $it1['Seconds'] = 'sec';
  1533.     $it1['ErrorReport'] = 'Error Reporting';
  1534.  
  1535.     // Italian - by Federico Corrà
  1536.     $it2['Version'] = 'Versione';
  1537.     $it2['DocRoot'] = 'Root Documenti';
  1538.     $it2['FLRoot'] = 'Root del File Manager';
  1539.     $it2['Name'] = 'Nome';
  1540.     $it2['And'] = 'e';
  1541.     $it2['Enter'] = 'Invio';
  1542.     $it2['Send'] = 'Spedisci';
  1543.     $it2['Refresh'] = 'Aggiorna';
  1544.     $it2['SaveConfig'] = 'Salva configurazioni';
  1545.     $it2['SavePass'] = 'Salva password';
  1546.     $it2['SaveFile'] = 'Salva file';
  1547.     $it2['Save'] = 'Salva';
  1548.     $it2['Leave'] = 'Esci';
  1549.     $it2['Edit'] = 'Modifica';
  1550.     $it2['View'] = 'Visualizza';
  1551.     $it2['Config'] = 'Configura';
  1552.     $it2['Ren'] = 'Rinomina';
  1553.     $it2['Rem'] = 'Cancella';
  1554.     $it2['Compress'] = 'Comprimi';
  1555.     $it2['Decompress'] = 'Decomprimi';
  1556.     $it2['ResolveIDs'] = 'Risolvi ID';
  1557.     $it2['Move'] = 'Muovi';
  1558.     $it2['Copy'] = 'Copia';
  1559.     $it2['ServerInfo'] = 'Server info';
  1560.     $it2['CreateDir'] = 'Crea cartella';
  1561.     $it2['CreateArq'] = 'Crea file';
  1562.     $it2['ExecCmd'] = 'Esegui comando';
  1563.     $it2['Upload'] = 'Upload';
  1564.     $it2['UploadEnd'] = 'Upload terminato';
  1565.     $it2['Perm'] = 'Perm';
  1566.     $it2['Perms'] = 'Permessi';
  1567.     $it2['Owner'] = 'Owner';
  1568.     $it2['Group'] = 'Grouppo';
  1569.     $it2['Other'] = 'Altro';
  1570.     $it2['Size'] = 'Dimensione';
  1571.     $it2['Date'] = 'Data';
  1572.     $it2['Type'] = 'Tipo';
  1573.     $it2['Free'] = 'liberi';
  1574.     $it2['Shell'] = 'Shell';
  1575.     $it2['Read'] = 'Lettura';
  1576.     $it2['Write'] = 'Scrittura';
  1577.     $it2['Exec'] = 'Esecuzione';
  1578.     $it2['Apply'] = 'Applica';
  1579.     $it2['StickyBit'] = 'Sticky Bit';
  1580.     $it2['Pass'] = 'Password';
  1581.     $it2['Lang'] = 'Lingua';
  1582.     $it2['File'] = 'File';
  1583.     $it2['File_s'] = 'file';
  1584.     $it2['Dir_s'] = 'cartella';
  1585.     $it2['To'] = 'a';
  1586.     $it2['Destination'] = 'Destinazione';
  1587.     $it2['Configurations'] = 'Configurazioni';
  1588.     $it2['JSError'] = 'Errore JavaScript';
  1589.     $it2['NoSel'] = 'Nessun item selezionato';
  1590.     $it2['SelDir'] = 'Scegli la cartella di destinazione sull\'albero a sinistra';
  1591.     $it2['TypeDir'] = 'Inserisci il nome della cartella';
  1592.     $it2['TypeArq'] = 'Inserisci il nome del file';
  1593.     $it2['TypeCmd'] = 'Inserisci il comando';
  1594.     $it2['TypeArqComp'] = 'Inserisci il nome del file.\\nL\'estensione definirà le modalità di compressione.\\nEx:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip';
  1595.     $it2['RemSel'] = 'ELIMINA gli item selezionati';
  1596.     $it2['NoDestDir'] = 'Non è stata selezionata la cartella di destinazione';
  1597.     $it2['DestEqOrig'] = 'La cartella di origine e di destinazione coincidono';
  1598.     $it2['InvalidDest'] = 'La cartella di destinazione non è valida';
  1599.     $it2['NoNewPerm'] = 'Nuovo permesso non definito';
  1600.     $it2['CopyTo'] = 'COPIA in';
  1601.     $it2['MoveTo'] = 'MUOVI in';
  1602.     $it2['AlterPermTo'] = 'CAMBIA PERMESSI in';
  1603.     $it2['ConfExec'] = 'Conferma ESECUZIONE';
  1604.     $it2['ConfRem'] = 'Conferma CANCELLA';
  1605.     $it2['EmptyDir'] = 'Cartella Vuota';
  1606.     $it2['IOError'] = 'Errore I/O';
  1607.     $it2['FileMan'] = 'PHP File Manager';
  1608.     $it2['TypePass'] = 'Inserisci la password';
  1609.     $it2['InvPass'] = 'Password non valida';
  1610.     $it2['ReadDenied'] = 'Accesso in lettura non consentito';
  1611.     $it2['FileNotFound'] = 'File non trovato';
  1612.     $it2['AutoClose'] = 'Chiudi dopo aver completato';
  1613.     $it2['OutDocRoot'] = 'File oltre DOCUMENT_ROOT';
  1614.     $it2['NoCmd'] = 'Errore: comando non informato';
  1615.     $it2['ConfTrySave'] = 'Accesso in scrittura non consentito.\\nProva a salvare comunque';
  1616.     $it2['ConfSaved'] = 'Configurazioni salvate';
  1617.     $it2['PassSaved'] = 'Password salvate';
  1618.     $it2['FileDirExists'] = 'Il file o la cartella esiste già';
  1619.     $it2['NoPhpinfo'] = 'Funzione phpinfo disabilitata';
  1620.     $it2['NoReturn'] = 'Nessun ritorno';
  1621.     $it2['FileSent'] = 'File spedito';
  1622.     $it2['SpaceLimReached'] = 'Limite di spazio raggiunto';
  1623.     $it2['InvExt'] = 'Estensione non valida';
  1624.     $it2['FileNoOverw'] = 'Il file non potrebbe essere sovrascritto';
  1625.     $it2['FileOverw'] = 'File sovrascritto';
  1626.     $it2['FileIgnored'] = 'File ignorato';
  1627.     $it2['ChkVer'] = 'Check nuova versione';
  1628.     $it2['ChkVerAvailable'] = 'Nuova versione, clicca qui per iniziare il download!!';
  1629.     $it2['ChkVerNotAvailable'] = 'Nessuna nuova versione disponibile. :(';
  1630.     $it2['ChkVerError'] = 'Errore di connessione.';
  1631.     $it2['Website'] = 'Sito Web';
  1632.     $it2['SendingForm'] = 'Invio file, prego attendi';
  1633.     $it2['NoFileSel'] = 'Nessun file selezionato';
  1634.     $it2['SelAll'] = 'Tutti';
  1635.     $it2['SelNone'] = 'Nessuno';
  1636.     $it2['SelInverse'] = 'Inverti';
  1637.     $it2['Selected_s'] = 'selezionati';
  1638.     $it2['Total'] = 'totale';
  1639.     $it2['Partition'] = 'Partizione';
  1640.     $it2['RenderTime'] = 'Tempo per renderizzare questa pagina';
  1641.     $it2['Seconds'] = 'sec';
  1642.     $it2['ErrorReport'] = 'Report errori';
  1643.  
  1644.     // Italian - by Luca Zorzi
  1645.     $it3['Version'] = 'Versione';
  1646.     $it3['DocRoot'] = 'Document Root';
  1647.     $it3['FLRoot'] = 'Root del File Manager';
  1648.     $it3['Name'] = 'Nome';
  1649.     $it3['And'] = 'e';
  1650.     $it3['Enter'] = 'Invio';
  1651.     $it3['Send'] = 'Invia';
  1652.     $it3['Refresh'] = 'Aggiorna';
  1653.     $it3['SaveConfig'] = 'Salva le impostazioni';
  1654.     $it3['SavePass'] = 'Salva la Password';
  1655.     $it3['SaveFile'] = 'Salva il File';
  1656.     $it3['Save'] = 'Salva';
  1657.     $it3['Leave'] = 'Annulla';
  1658.     $it3['Edit'] = 'Modifica';
  1659.     $it3['View'] = 'Guarda';
  1660.     $it3['Config'] = 'Impostazioni';
  1661.     $it3['Ren'] = 'Rinomina';
  1662.     $it3['Rem'] = 'Elimina';
  1663.     $it3['Compress'] = 'Comprimi';
  1664.     $it3['Decompress'] = 'Decomprimi';
  1665.     $it3['ResolveIDs'] = 'Risolvi ID';
  1666.     $it3['Move'] = 'Sposta';
  1667.     $it3['Copy'] = 'Copia';
  1668.     $it3['ServerInfo'] = 'Server Info';
  1669.     $it3['CreateDir'] = 'Crea Cartella';
  1670.     $it3['CreateArq'] = 'Crea File';
  1671.     $it3['ExecCmd'] = 'Esegui Comando';
  1672.     $it3['Upload'] = 'Upload';
  1673.     $it3['UploadEnd'] = 'Upload completato';
  1674.     $it3['Perm'] = 'Perm';
  1675.     $it3['Perms'] = 'Permessi';
  1676.     $it3['Owner'] = 'Proprietario';
  1677.     $it3['Group'] = 'Gruppo';
  1678.     $it3['Other'] = 'Altri';
  1679.     $it3['Size'] = 'Dimensione';
  1680.     $it3['Date'] = 'Data';
  1681.     $it3['Type'] = 'Tipo';
  1682.     $it3['Free'] = 'libero';
  1683.     $it3['Shell'] = 'Shell';
  1684.     $it3['Read'] = 'Lettura';
  1685.     $it3['Write'] = 'Scruttura';
  1686.     $it3['Exec'] = 'Esecuzione';
  1687.     $it3['Apply'] = 'Applica';
  1688.     $it3['StickyBit'] = 'Bit Sticky';
  1689.     $it3['Pass'] = 'Password';
  1690.     $it3['Lang'] = 'Lingua';
  1691.     $it3['File'] = 'File';
  1692.     $it3['File_s'] = 'file';
  1693.     $it3['Dir_s'] = 'cartella/e';
  1694.     $it3['To'] = 'a';
  1695.     $it3['Destination'] = 'Destinazione';
  1696.     $it3['Configurations'] = 'Configurazioni';
  1697.     $it3['JSError'] = 'Errore JavaScript';
  1698.     $it3['NoSel'] = 'Non ci sono elementi selezioneti';
  1699.     $it3['SelDir'] = 'Scegli la cartella di destinazione nell\'elenco a sinistra';
  1700.     $it3['TypeDir'] = 'Inserisci il nome della cartella';
  1701.     $it3['TypeArq'] = 'Inserisci il nome del file';
  1702.     $it3['TypeCmd'] = 'Inserisci il comando';
  1703.     $it3['TypeArqComp'] = 'Inserisci il nome del file.\\nIl nome definir &agrave; il tipo della compressione .\\nEs:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip';
  1704.     $it3['RemSel'] = 'ELIMINA gli elementi selezionati';
  1705.     $it3['NoDestDir'] = 'Non hai selezionato la cartella di destinazione';
  1706.     $it3['DestEqOrig'] = 'La cartella di origine e destinazione &egrave; la stessa';
  1707.     $it3['InvalidDest'] = 'La cartella di destinazione non &egrave; valida';
  1708.     $it3['NoNewPerm'] = 'Nuovi permessi non impostati';
  1709.     $it3['CopyTo'] = 'COPIA in';
  1710.     $it3['MoveTo'] = 'SPOSTA in';
  1711.     $it3['AlterPermTo'] = 'CAMBIA I PERMESSI a';
  1712.     $it3['ConfExec'] = 'Conferma ESECUZIONE';
  1713.     $it3['ConfRem'] = 'Conferma ELIMINAZIONE';
  1714.     $it3['EmptyDir'] = 'CArtella vuota';
  1715.     $it3['IOError'] = 'Errore di I/O';
  1716.     $it3['FileMan'] = 'PHP File Manager';
  1717.     $it3['TypePass'] = 'Inserisci la password';
  1718.     $it3['InvPass'] = 'Password errata';
  1719.     $it3['ReadDenied'] = 'Accesso in lettura negato';
  1720.     $it3['FileNotFound'] = 'File non trovato';
  1721.     $it3['AutoClose'] = 'Chiudi alla fine';
  1722.     $it3['OutDocRoot'] = 'File fuori dalla DOCUMENT_ROOT';
  1723.     $it3['NoCmd'] = 'Errore: Comando non informato';
  1724.     $it3['ConfTrySave'] = 'File senza il permesso di scrittura.\\nProvare a salvarlo comunque';
  1725.     $it3['ConfSaved'] = 'Configurazione salvata';
  1726.     $it3['PassSaved'] = 'Password salvata';
  1727.     $it3['FileDirExists'] = 'Il file o la cartella esiste gi&agrave;';
  1728.     $it3['NoPhpinfo'] = 'Funzione phpinfo disabilitata';
  1729.     $it3['NoReturn'] = 'no return';
  1730.     $it3['FileSent'] = 'File inviato';
  1731.     $it3['SpaceLimReached'] = 'Limite di spazio raggiunto';
  1732.     $it3['InvExt'] = 'Estensione non valida';
  1733.     $it3['FileNoOverw'] = 'Il file non pu&ograve; essere sovrascritto';
  1734.     $it3['FileOverw'] = 'File sovrascritto';
  1735.     $it3['FileIgnored'] = 'File ignorato';
  1736.     $it3['ChkVer'] = 'Controlla la presnza di una nuova versione';
  1737.     $it3['ChkVerAvailable'] = 'Nuova versione, clicca qui per avviare il download!!';
  1738.     $it3['ChkVerNotAvailable'] = 'Nessuna nuova versione disponibile. :(';
  1739.     $it3['ChkVerError'] = 'Errore di connessione.';
  1740.     $it3['Website'] = 'Sito';
  1741.     $it3['SendingForm'] = 'Invio dei file, attendi';
  1742.     $it3['NoFileSel'] = 'Nessun file selezionato';
  1743.     $it3['SelAll'] = 'Tutti';
  1744.     $it3['SelNone'] = 'Nessuno';
  1745.     $it3['SelInverse'] = 'Inverti selezione';
  1746.     $it3['Selected_s'] = 'selezionato';
  1747.     $it3['Total'] = 'totale';
  1748.     $it3['Partition'] = 'Partizione';
  1749.     $it3['RenderTime'] = 'Tempo di generazione';
  1750.     $it3['Seconds'] = 'sec';
  1751.     $it3['ErrorReport'] = 'Error Reporting';
  1752.  
  1753.     // Italian - by Gianni
  1754.     $it4['Version'] = 'Versione';
  1755.     $it4['DocRoot'] = 'Root documenti';
  1756.     $it4['FLRoot'] = 'Root file manager';
  1757.     $it4['Name'] = 'Nome';
  1758.     $it4['And'] = 'e';
  1759.     $it4['Enter'] = 'Entra';
  1760.     $it4['Send'] = 'Invia';
  1761.     $it4['Refresh'] = 'Aggiorna';
  1762.     $it4['SaveConfig'] = 'Salva configurazioni';
  1763.     $it4['SavePass'] = 'Salva password';
  1764.     $it4['SaveFile'] = 'Salva file';
  1765.     $it4['Save'] = 'Salva';
  1766.     $it4['Leave'] = 'Esci';
  1767.     $it4['Edit'] = 'Modifica';
  1768.     $it4['View'] = 'Vedi';
  1769.     $it4['Config'] = 'Preferenze';
  1770.     $it4['Ren'] = 'Rinomina';
  1771.     $it4['Rem'] = 'Cancella';
  1772.     $it4['Compress'] = 'Comprimi';
  1773.     $it4['Decompress'] = 'Decomprimi';
  1774.     $it4['ResolveIDs'] = 'Risolvi IDs';
  1775.     $it4['Move'] = 'Sposta';
  1776.     $it4['Copy'] = 'Copia';
  1777.     $it4['ServerInfo'] = 'Versione PHP';
  1778.     $it4['CreateDir'] = 'Crea directory';
  1779.     $it4['CreateArq'] = 'Crea file';
  1780.     $it4['ExecCmd'] = 'Esegui comando';
  1781.     $it4['Upload'] = 'Upload';
  1782.     $it4['UploadEnd'] = 'Upload terminato';
  1783.     $it4['Perm'] = 'Perm';
  1784.     $it4['Perms'] = 'Permessi';
  1785.     $it4['Owner'] = 'Proprietario';
  1786.     $it4['Group'] = 'Gruppo';
  1787.     $it4['Other'] = 'Altro';
  1788.     $it4['Size'] = 'Dimensione';
  1789.     $it4['Date'] = 'Data';
  1790.     $it4['Type'] = 'Tipo';
  1791.     $it4['Free'] = 'liberi';
  1792.     $it4['Shell'] = 'Shell';
  1793.     $it4['Read'] = 'Lettura';
  1794.     $it4['Write'] = 'Scrittura';
  1795.     $it4['Exec'] = 'Esecuzione';
  1796.     $it4['Apply'] = 'Applica';
  1797.     $it4['StickyBit'] = 'Sticky Bit';
  1798.     $it4['Pass'] = 'Password';
  1799.     $it4['Lang'] = 'Lingua';
  1800.     $it4['File'] = 'File';
  1801.     $it4['File_s'] = 'files';
  1802.     $it4['Dir_s'] = 'directory';
  1803.     $it4['To'] = 'in';
  1804.     $it4['Destination'] = 'Destinazione';
  1805.     $it4['Configurations'] = 'Preferenze';
  1806.     $it4['JSError'] = 'Errore JavaScript';
  1807.     $it4['NoSel'] = 'Non ci sono elementi selezionati';
  1808.     $it4['SelDir'] = 'Seleziona una directory di destinazione a sinistra';
  1809.     $it4['TypeDir'] = 'Inserisci il nome della directory';
  1810.     $it4['TypeArq'] = 'Inserisci il nome del file';
  1811.     $it4['TypeCmd'] = 'Inserisci il comando';
  1812.     $it4['TypeArqComp'] = 'Inserisci il nome del file e tipo di compressione\\n(.Zip .Tar .Bzip .Gzip)';
  1813.     $it4['RemSel'] = 'Cancella gli elementi selezionati';
  1814.     $it4['NoDestDir'] = 'Seleziona una directory di destinazione';
  1815.     $it4['DestEqOrig'] = 'Origine e destinazione sono uguali';
  1816.     $it4['InvalidDest'] = 'Directory di destinazione non valida';
  1817.     $it4['NoNewPerm'] = 'Nuovi permessi non impostati';
  1818.     $it4['CopyTo'] = 'Copia in';
  1819.     $it4['MoveTo'] = 'Sposta in';
  1820.     $it4['AlterPermTo'] = 'Cambia permessi in';
  1821.     $it4['ConfExec'] = 'Conferma esecuzione';
  1822.     $it4['ConfRem'] = 'Conferma eliminazione';
  1823.     $it4['EmptyDir'] = 'Directory Vuota';
  1824.     $it4['IOError'] = 'Errore I/O';
  1825.     $it4['FileMan'] = 'PHP File Manager';
  1826.     $it4['TypePass'] = 'Inserisci la password';
  1827.     $it4['InvPass'] = 'Password non valida';
  1828.     $it4['ReadDenied'] = 'Accesso in lettura negato';
  1829.     $it4['FileNotFound'] = 'File non trovato';
  1830.     $it4['AutoClose'] = 'Chiudi al termine';
  1831.     $it4['OutDocRoot'] = 'File fuori dalla Root documenti';
  1832.     $it4['NoCmd'] = 'Errore: comando non informato';
  1833.     $it4['ConfTrySave'] = 'File senza permessi di scrittura.\\nRiprova a salvare';
  1834.     $it4['ConfSaved'] = 'Preferenze salvate';
  1835.     $it4['PassSaved'] = 'Password salvata';
  1836.     $it4['FileDirExists'] = 'Il file o la directory esistono già';
  1837.     $it4['NoPhpinfo'] = 'Funzione phpinfo disabilitata';
  1838.     $it4['NoReturn'] = 'Nessun ritorno';
  1839.     $it4['FileSent'] = 'File inviato';
  1840.     $it4['SpaceLimReached'] = 'Raggiunto spazio limite';
  1841.     $it4['InvExt'] = 'Estensione non valida';
  1842.     $it4['FileNoOverw'] = 'Il file non può essere sovrascritto';
  1843.     $it4['FileOverw'] = 'File sovrascritto';
  1844.     $it4['FileIgnored'] = 'File ignorato';
  1845.     $it4['ChkVer'] = 'Controlla aggiornamenti';
  1846.     $it4['ChkVerAvailable'] = 'Nuova versione, click qui per effettuare il download!';
  1847.     $it4['ChkVerNotAvailable'] = 'Nessuna nuova versione';
  1848.     $it4['ChkVerError'] = 'Errore di connessione';
  1849.     $it4['Website'] = 'Sito';
  1850.     $it4['SendingForm'] = 'Invio files, attendere...';
  1851.     $it4['NoFileSel'] = 'Nessun file selezionato';
  1852.     $it4['SelAll'] = 'Tutti';
  1853.     $it4['SelNone'] = 'Nessuno';
  1854.     $it4['SelInverse'] = 'Inverti';
  1855.     $it4['Selected_s'] = 'selezionati';
  1856.     $it4['Total'] = 'totale';
  1857.     $it4['Partition'] = 'Partizione';
  1858.     $it4['RenderTime'] = 'Tempo per il render di questa pagina';
  1859.     $it4['Seconds'] = 'sec';
  1860.     $it4['ErrorReport'] = 'Report errori';
  1861.  
  1862.     // Turkish - by Necdet Yazilimlari
  1863.     $tr['Version'] = 'Versiyon';
  1864.     $tr['DocRoot'] = 'Kok dosya';
  1865.     $tr['FLRoot'] = 'Kok dosya yoneticisi';
  1866.     $tr['Name'] = 'Isim';
  1867.     $tr['And'] = 've';
  1868.     $tr['Enter'] = 'Giris';
  1869.     $tr['Send'] = 'Yolla';
  1870.     $tr['Refresh'] = 'Yenile';
  1871.     $tr['SaveConfig'] = 'Ayarlari kaydet';
  1872.     $tr['SavePass'] = 'Parolayi kaydet';
  1873.     $tr['SaveFile'] = 'Dosyayi kaydet';
  1874.     $tr['Save'] = 'Kaydet';
  1875.     $tr['Leave'] = 'Ayril';
  1876.     $tr['Edit'] = 'Duzenle';
  1877.     $tr['View'] = 'Goster';
  1878.     $tr['Config'] = 'Yapilandirma';
  1879.     $tr['Ren'] = 'Yeniden adlandir';
  1880.     $tr['Rem'] = 'Sil';
  1881.     $tr['Compress'] = '.Zip';
  1882.     $tr['Decompress'] = '.ZipCoz';
  1883.     $tr['ResolveIDs'] = 'Kimlikleri coz';
  1884.     $tr['Move'] = 'Tasi';
  1885.     $tr['Copy'] = 'Kopyala';
  1886.     $tr['ServerInfo'] = 'Sunucu Bilgisi';
  1887.     $tr['CreateDir'] = 'Dizin olustur';
  1888.     $tr['CreateArq'] = 'Dosya olusutur';
  1889.     $tr['ExecCmd'] = 'Komut calistir';
  1890.     $tr['Upload'] = 'Dosya yukle';
  1891.     $tr['UploadEnd'] = 'Yukleme tamamlandi';
  1892.     $tr['Perm'] = 'Izinler';
  1893.     $tr['Perms'] = 'Izinler';
  1894.     $tr['Owner'] = 'Sahip';
  1895.     $tr['Group'] = 'Grup';
  1896.     $tr['Other'] = 'Diger';
  1897.     $tr['Size'] = 'Boyut';
  1898.     $tr['Date'] = 'Tarih';
  1899.     $tr['Type'] = 'Tip';
  1900.     $tr['Free'] = 'Bos';
  1901.     $tr['Shell'] = 'Kabuk';
  1902.     $tr['Read'] = 'Oku';
  1903.     $tr['Write'] = 'Yaz';
  1904.     $tr['Exec'] = 'Calistir';
  1905.     $tr['Apply'] = 'Uygula';
  1906.     $tr['StickyBit'] = 'Sabit bit';
  1907.     $tr['Pass'] = 'Parola';
  1908.     $tr['Lang'] = 'Dil';
  1909.     $tr['File'] = 'Dosya';
  1910.     $tr['File_s'] = 'Dosya(lar)';
  1911.     $tr['Dir_s'] = 'Dizin(ler)';
  1912.     $tr['To'] = 'icin';
  1913.     $tr['Destination'] = 'Hedef';
  1914.     $tr['Configurations'] = 'Yapilandirmalar';
  1915.     $tr['JSError'] = 'JavaScript hatasi';
  1916.     $tr['NoSel'] = 'Secilen oge yok';
  1917.     $tr['SelDir'] = 'Soldaki hedef dizin agaci secin';
  1918.     $tr['TypeDir'] = 'Dizin adini girin';
  1919.     $tr['TypeArq'] = 'Dosya adini girin';
  1920.     $tr['TypeCmd'] = 'Komut girin';
  1921.     $tr['TypeArqComp'] = 'Dosya ismini yazdiktan sonra sonuna .zip ekleyin';
  1922.     $tr['RemSel'] = 'Secili ogeleri sil';
  1923.     $tr['NoDestDir'] = 'Secili dizin yok';
  1924.     $tr['DestEqOrig'] = 'Kokenli ve esit gidis rehberi';
  1925.     $tr['InvalidDest'] = 'Hedef dizin gecersiz';
  1926.     $tr['NoNewPerm'] = 'Izinler uygun degil';
  1927.     $tr['CopyTo'] = 'Kopya icin';
  1928.     $tr['MoveTo'] = 'Tasi icin';
  1929.     $tr['AlterPermTo'] = 'Permission secin';
  1930.     $tr['ConfExec'] = 'Yapilandirmayi onayla';
  1931.     $tr['ConfRem'] = 'Simeyi onayla';
  1932.     $tr['EmptyDir'] = 'Dizin bos';
  1933.     $tr['IOError'] = 'Hata';
  1934.     $tr['FileMan'] = 'Necdet_Yazilimlari';
  1935.     $tr['TypePass'] = 'Parolayi girin';
  1936.     $tr['InvPass'] = 'Gecersiz parola';
  1937.     $tr['ReadDenied'] = 'Okumaya erisim engellendi';
  1938.     $tr['FileNotFound'] = 'Dosya bulunamadi';
  1939.     $tr['AutoClose'] = 'Otomatik kapat';
  1940.     $tr['OutDocRoot'] = 'Kok klasor disindaki dosya';
  1941.     $tr['NoCmd'] = 'Hata: Komut haberdar degil';
  1942.     $tr['ConfTrySave'] = 'Dosya yazma izniniz yok. Yine de kaydetmeyi deneyebilirsiniz.';
  1943.     $tr['ConfSaved'] = 'Ayarlar kaydedildi';
  1944.     $tr['PassSaved'] = 'Parola kaydedildi';
  1945.     $tr['FileDirExists'] = 'Dosya veya dizin zaten var';
  1946.     $tr['NoPhpinfo'] = 'Php fonksiyon bilgisi devre disi';
  1947.     $tr['NoReturn'] = 'Deger dondurmuyor';
  1948.     $tr['FileSent'] = 'Dosya gonderildi';
  1949.     $tr['SpaceLimReached'] = 'Disk limitine ulasildi';
  1950.     $tr['InvExt'] = 'Gecersiz uzanti';
  1951.     $tr['FileNoOverw'] = 'Dosya degistirilemiyor';
  1952.     $tr['FileOverw'] = 'Dosya degistiribiliyor';
  1953.     $tr['FileIgnored'] = 'Dosya kabul edildi';
  1954.     $tr['ChkVer'] = 'Yeni versiyonu kontrol et';
  1955.     $tr['ChkVerAvailable'] = 'Yeni surum bulundu. Indirmek icin buraya tiklayin.';
  1956.     $tr['ChkVerNotAvailable'] = 'Yeni surum bulunamadi.';
  1957.     $tr['ChkVerError'] = 'Baglanti hatasi';
  1958.     $tr['Website'] = 'Website';
  1959.     $tr['SendingForm'] = 'Dosyalar gonderiliyor, lutfen bekleyin';
  1960.     $tr['NoFileSel'] = 'Secili dosya yok';
  1961.     $tr['SelAll'] = 'Hepsi';
  1962.     $tr['SelNone'] = 'Hicbiri';
  1963.     $tr['SelInverse'] = 'Ters';
  1964.     $tr['Selected_s'] = 'Secili oge(ler)';
  1965.     $tr['Total'] = 'Toplam';
  1966.     $tr['Partition'] = 'Bolme';
  1967.     $tr['RenderTime'] = 'Olusturuluyor';
  1968.     $tr['Seconds'] = 'Saniye';
  1969.     $tr['ErrorReport'] = 'Hata raporu';
  1970.  
  1971.     // Россия - Евгений Рашев
  1972.     $ru['Version']='Версия';
  1973.     $ru['DocRoot']='Документ Root ';
  1974.     $ru['FLRoot']='Файловый менеджер';
  1975.     $ru['Name']='Имя';
  1976.     $ru['And']='и';
  1977.     $ru['Enter']='Enter';
  1978.     $ru['Send']='Отправить';
  1979.     $ru['Refresh']='Обновить';
  1980.     $ru['SaveConfig']='Сохранить конфигурацию';
  1981.     $ru['SavePass']='Сохранить пароль';
  1982.     $ru['SaveFile']='Сохранить файл ';
  1983.     $ru['Save']='Сохранить';
  1984.     $ru['Leave']='Оставь';
  1985.     $ru['Edit']='Изменить';
  1986.     $ru['View']='Просмотр';
  1987.     $ru['Config']='Настройки';
  1988.     $ru['Ren']='Переименовать';
  1989.     $ru['Rem']='Удалить';
  1990.     $ru['Compress']='Сжать';
  1991.     $ru['Decompress']='Распаковать';
  1992.     $ru['ResolveIDs']='Определять id';
  1993.     $ru['Move']='Переместить';
  1994.     $ru['Copy']='Копировать';
  1995.     $ru['ServerInfo']='Инфо о сервере';
  1996.     $ru['CreateDir']='Создать папку';
  1997.     $ru['CreateArq']='Создайте файл ';
  1998.     $ru['ExecCmd']='Выполнить';
  1999.     $ru['Upload']='Загрузить';
  2000.     $ru['UploadEnd']='Загружено';
  2001.     $ru['Perm']='Права';
  2002.     $ru['Perms']='Разрешения';
  2003.     $ru['Owner']='Владелец';
  2004.     $ru['Group']='Группа';
  2005.     $ru['Other']='Другие';
  2006.     $ru['Size']='Размер';
  2007.     $ru['Date']='Дата';
  2008.     $ru['Type']='Тип';
  2009.     $ru['Free']='Свободно';
  2010.     $ru['Shell']='Shell';
  2011.     $ru['Read']='Читать';
  2012.     $ru['Write']='Писать';
  2013.     $ru['Exec']='Выполнять';
  2014.     $ru['Apply']='Применить';
  2015.     $ru['StickyBit']='StickyBit';
  2016.     $ru['Pass']='Пароль';
  2017.     $ru['Lang']='Язык';
  2018.     $ru['File']='Файл';
  2019.     $ru['File_s']='Файл..';
  2020.     $ru['Dir_s']='Пап..';
  2021.     $ru['To']='в';
  2022.     $ru['Destination']='Назначение';
  2023.     $ru['Configurations']='Конфигурация';
  2024.     $ru['JSError']='Ошибка JavaScript';
  2025.     $ru['NoSel']='нет выбранных элементов';
  2026.     $ru['SelDir']='Выберите папку назначения на левом дереве ';
  2027.     $ru['TypeDir']='Введите имя каталога ';
  2028.     $ru['TypeArq']='Введите имя файла';
  2029.     $ru['TypeCmd']='Введите команду ';
  2030.     $ru['TypeArqComp']='Введите имя файла ,расширение\\n это позволит определить тип сжатия \\n Пример:.. \\n nome.zip \\n nome.tar \\n nome.bzip \\n nome.gzip ';
  2031.     $ru['RemSel']='Удалить выбранные элементы';
  2032.     $ru['NoDestDir']='нет выбранного каталога назначения';
  2033.     $ru['DestEqOrig']='Происхождение и назначение каталогов равны ';
  2034.     $ru['InvalidDest']='Назначение каталога недействительно';
  2035.     $ru['NoNewPerm']='Новые разрешения не установлены';
  2036.     $ru['CopyTo']='Копировать в ';
  2037.     $ru['MoveTo']='Переместить в';
  2038.     $ru['AlterPermTo']='Изменение разрешений в ';
  2039.     $ru['ConfExec']='Подтвердить ВЫПОЛНИТЬ ';
  2040.     $ru['ConfRem']='Подтвердить УДАЛЕНИЕ';
  2041.     $ru['EmptyDir']='Пустой каталог ';
  2042.     $ru['IOError']='I/O Error';
  2043.     $ru['FileMan']='PHP Файловый менеджер ';
  2044.     $ru['TypePass']='Введите пароль';
  2045.     $ru['InvPass']='Неверный пароль';
  2046.     $ru['ReadDenied']='Доступ запрещен ';
  2047.     $ru['FileNotFound']='Файл не найден';
  2048.     $ru['AutoClose']='Закрыть полностью ';
  2049.     $ru['OutDocRoot']='Файлы за пределами DOCUMENT_ROOT';
  2050.     $ru['NoCmd']='Ошибка: Не поддерживаемая команда';
  2051.     $ru['ConfTrySave']='Файл без прав на запись. \\n Сохранить в любом случае. ';
  2052.     $ru['ConfSaved']='Конфигурация сохранена';
  2053.     $ru['PassSaved']='Пароль сохранен';
  2054.     $ru['FileDirExists']='Файл или каталог уже существует';
  2055.     $ru['NoPhpinfo']='Функция PHPInfo отключена';
  2056.     $ru['NoReturn']='Нет возврата';
  2057.     $ru['FileSent']='Файл отправлен';
  2058.     $ru['SpaceLimReached']='Достигнут предел Пространства';
  2059.     $ru['InvExt']='Неверное расширение';
  2060.     $ru['FileNoOverw']='Файл не может быть перезаписан ';
  2061.     $ru['FileOverw']='Файл перезаписывается';
  2062.     $ru['FileIgnored']='Файл игнорируется';
  2063.     $ru['ChkVer']='Проверить обновление';
  2064.     $ru['ChkVerAvailable']=' Доступна новая версия, нажмите здесь, чтобы начать загрузку! ';
  2065.     $ru['ChkVerNotAvailable']='Нет новой версии. :(';
  2066.     $ru['ChkVerError']='Ошибка подключения. ';
  2067.     $ru['Website']='Сайт';
  2068.     $ru['SendingForm']='Отправка файлов, пожалуйста, подождите ';
  2069.     $ru['NoFileSel']='Нет выбранных файлов';
  2070.     $ru['SelAll']='Выделить все';
  2071.     $ru['SelNone']='Отмена';
  2072.     $ru['SelInverse']='Обратить';
  2073.     $ru['Selected_s']='Выбран';
  2074.     $ru['Total']='Всего';
  2075.     $ru['Partition']='Раздел';
  2076.     $ru['RenderTime']='Скрипт выполнен за';
  2077.     $ru['Seconds']='Секунд';
  2078.     $ru['ErrorReport']='Отчет об ошибках';
  2079.  
  2080.     // Catalan - by Pere Borràs AKA @Norl
  2081.     $cat['Version'] = 'Versió';
  2082.     $cat['DocRoot'] = 'Arrel del programa';
  2083.     $cat['FLRoot'] = 'Arrel de l`administrador d`arxius';
  2084.     $cat['Name'] = 'Nom';
  2085.     $cat['And'] = 'i';
  2086.     $cat['Enter'] = 'Entrar';
  2087.     $cat['Send'] = 'Enviar';
  2088.     $cat['Refresh'] = 'Refrescar';
  2089.     $cat['SaveConfig'] = 'Desar configuracions';
  2090.     $cat['SavePass'] = 'Desar clau';
  2091.     $cat['SaveFile'] = 'Desar Arxiu';
  2092.     $cat['Save'] = 'Desar';
  2093.     $cat['Leave'] = 'Sortir';
  2094.     $cat['Edit'] = 'Editar';
  2095.     $cat['View'] = 'Mirar';
  2096.     $cat['Config'] = 'Config.';
  2097.     $cat['Ren'] = 'Canviar nom';
  2098.     $cat['Rem'] = 'Esborrar';
  2099.     $cat['Compress'] = 'Comprimir';
  2100.     $cat['Decompress'] = 'Descomprimir';
  2101.     $cat['ResolveIDs'] = 'Resoldre IDs';
  2102.     $cat['Move'] = 'Moure';
  2103.     $cat['Copy'] = 'Copiar';
  2104.     $cat['ServerInfo'] = 'Info del Server';
  2105.     $cat['CreateDir'] = 'Crear Directori';
  2106.     $cat['CreateArq'] = 'Crear Arxiu';
  2107.     $cat['ExecCmd'] = 'Executar Comandament';
  2108.     $cat['Upload'] = 'Pujar';
  2109.     $cat['UploadEnd'] = 'Pujat amb èxit';
  2110.     $cat['Perm'] = 'Perm';
  2111.     $cat['Perms'] = 'Permisos';
  2112.     $cat['Owner'] = 'Propietari';
  2113.     $cat['Group'] = 'Grup';
  2114.     $cat['Other'] = 'Altre';
  2115.     $cat['Size'] = 'Tamany';
  2116.     $cat['Date'] = 'Data';
  2117.     $cat['Type'] = 'Tipus';
  2118.     $cat['Free'] = 'lliure';
  2119.     $cat['Shell'] = 'Executar';
  2120.     $cat['Read'] = 'Llegir';
  2121.     $cat['Write'] = 'Escriure';
  2122.     $cat['Exec'] = 'Executar';
  2123.     $cat['Apply'] = 'Aplicar';
  2124.     $cat['StickyBit'] = 'Sticky Bit';
  2125.     $cat['Pass'] = 'Clau';
  2126.     $cat['Lang'] = 'Llenguatje';
  2127.     $cat['File'] = 'Arxius';
  2128.     $cat['File_s'] = 'arxiu(s)';
  2129.     $cat['Dir_s'] = 'directori(s)';
  2130.     $cat['To'] = 'a';
  2131.     $cat['Destination'] = 'Destí';
  2132.     $cat['Configurations'] = 'Configuracions';
  2133.     $cat['JSError'] = 'Error de JavaScript';
  2134.     $cat['NoSel'] = 'No hi ha items seleccionats';
  2135.     $cat['SelDir'] = 'Seleccioneu el directori de destí a l`arbre de la dreta';
  2136.     $cat['TypeDir'] = 'Escrigui el nom del directori';
  2137.     $cat['TypeArq'] = 'Escrigui el nom de l`arxiu';
  2138.     $cat['TypeCmd'] = 'Escrigui el comandament';
  2139.     $cat['TypeArqComp'] = 'Escrigui el nombre del directorio.\\nL`extensió definirà el tipus de compressió.\\nEx:\\nnom.zip\\nnom.tar\\nnom.bzip\\nnom.gzip';
  2140.     $cat['RemSel'] = 'ESBORRAR items seleccionats';
  2141.     $cat['NoDestDir'] = 'No s`ha seleccionat el directori de destí';
  2142.     $cat['DestEqOrig'] = 'L`origen i el destí són iguals';
  2143.     $cat['InvalidDest'] = 'El destí del directori és invàlid';
  2144.     $cat['NoNewPerm'] = 'Els permisos no s`han pogut establir';
  2145.     $cat['CopyTo'] = 'COPIAR a';
  2146.     $cat['MoveTo'] = 'MOURE a';
  2147.     $cat['AlterPermTo'] = 'CAMBIAR PERMISOS a';
  2148.     $cat['ConfExec'] = 'Confirmar EXECUCIÓ';
  2149.     $cat['ConfRem'] = 'Confirmar ESBORRAT';
  2150.     $cat['EmptyDir'] = 'Directori buit';
  2151.     $cat['IOError'] = 'Error I/O';
  2152.     $cat['FileMan'] = 'PHP File Manager';
  2153.     $cat['TypePass'] = 'Escrigui la clau';
  2154.     $cat['InvPass'] = 'Clau invàlida';
  2155.     $cat['ReadDenied'] = 'Accés de lectura denegat';
  2156.     $cat['FileNotFound'] = 'Arxiu no trobat';
  2157.     $cat['AutoClose'] = 'Tancar al completar';
  2158.     $cat['OutDocRoot'] = 'Arxiu abans de DOCUMENT_ROOT';
  2159.     $cat['NoCmd'] = 'Error: No s`ha escrit cap comandament';
  2160.     $cat['ConfTrySave'] = 'Arxiu sense permisos d`escriptura.\\nIntenteu desar a un altre lloc';
  2161.     $cat['ConfSaved'] = 'Configuració Desada';
  2162.     $cat['PassSaved'] = 'Clau desada';
  2163.     $cat['FileDirExists'] = 'Arxiu o directori ja existent';
  2164.     $cat['NoPhpinfo'] = 'Funció phpinfo() no habilitada';
  2165.     $cat['NoReturn'] = 'sense retorn';
  2166.     $cat['FileSent'] = 'Arxiu enviat';
  2167.     $cat['SpaceLimReached'] = 'Límit d`espaci al disc assolit';
  2168.     $cat['InvExt'] = 'Extensió no vàlida';
  2169.     $cat['FileNoOverw'] = 'L`arxiu no ha pogut ser sobreescrit';
  2170.     $cat['FileOverw'] = 'Arxiu sobreescrit';
  2171.     $cat['FileIgnored'] = 'Arxiu ignorat';
  2172.     $cat['ChkVer'] = 'Revisar les actualitzacions';
  2173.     $cat['ChkVerAvailable'] = 'Nova versió, feu clic aquí per descarregar';
  2174.     $cat['ChkVerNotAvailable'] = 'La vostra versió és la més recent.';
  2175.     $cat['ChkVerError'] = 'Error de connexió.';
  2176.     $cat['Website'] = 'Lloc Web';
  2177.     $cat['SendingForm'] = 'Enviant arxius, esperi';
  2178.     $cat['NoFileSel'] = 'Cap arxiu seleccionat';
  2179.     $cat['SelAll'] = 'Tots';
  2180.     $cat['SelNone'] = 'Cap';
  2181.     $cat['SelInverse'] = 'Invers';
  2182.     $cat['Selected_s'] = 'seleccionat';
  2183.     $cat['Total'] = 'total';
  2184.     $cat['Partition'] = 'Partició';
  2185.     $cat['RenderTime'] = 'Generat en';
  2186.     $cat['Seconds'] = 'seg';
  2187.     $cat['ErrorReport'] = 'Informe d`error';
  2188.  
  2189.     $lang_ = $$lang;
  2190.     if (isset($lang_[$tag])) return html_encode($lang_[$tag]);
  2191.     //else return "[$tag]"; // So we can know what is missing
  2192.     return $en[$tag];
  2193. }
  2194. // +--------------------------------------------------
  2195. // | File System
  2196. // +--------------------------------------------------
  2197. function total_size($arg) {
  2198.     $total = 0;
  2199.     if (file_exists($arg)) {
  2200.         if (is_dir($arg)) {
  2201.             $handle = opendir($arg);
  2202.             while($aux = readdir($handle)) {
  2203.                 if ($aux != "." && $aux != "..") $total += total_size($arg."/".$aux);
  2204.             }
  2205.             @closedir($handle);
  2206.         } else $total = filesize($arg);
  2207.     }
  2208.     return $total;
  2209. }
  2210. function total_delete($arg) {
  2211.     if (file_exists($arg)) {
  2212.         @chmod($arg,0755);
  2213.         if (is_dir($arg)) {
  2214.             $handle = opendir($arg);
  2215.             while($aux = readdir($handle)) {
  2216.                 if ($aux != "." && $aux != "..") total_delete($arg."/".$aux);
  2217.             }
  2218.             @closedir($handle);
  2219.             rmdir($arg);
  2220.         } else unlink($arg);
  2221.     }
  2222. }
  2223. function total_copy($orig,$dest) {
  2224.     $ok = true;
  2225.     if (file_exists($orig)) {
  2226.         if (is_dir($orig)) {
  2227.             mkdir($dest,0755);
  2228.             $handle = opendir($orig);
  2229.             while(($aux = readdir($handle))&&($ok)) {
  2230.                 if ($aux != "." && $aux != "..") $ok = total_copy($orig."/".$aux,$dest."/".$aux);
  2231.             }
  2232.             @closedir($handle);
  2233.         } else $ok = copy((string)$orig,(string)$dest);
  2234.     }
  2235.     return $ok;
  2236. }
  2237. function total_move($orig,$dest) {
  2238.     // Just why doesn't it has a MOVE alias?!
  2239.     return rename((string)$orig,(string)$dest);
  2240. }
  2241. function download(){
  2242.     global $current_dir,$filename;
  2243.     $file = $current_dir.$filename;
  2244.     if(file_exists($file)){
  2245.         $is_denied = false;
  2246.         foreach($download_ext_filter as $key=>$ext){
  2247.             if (eregi($ext,$filename)){
  2248.                 $is_denied = true;
  2249.                 break;
  2250.             }
  2251.         }
  2252.         if (!$is_denied){
  2253.             $size = filesize($file);
  2254.             header("Content-Type: application/save");
  2255.             header("Content-Length: $size");
  2256.             header("Content-Disposition: attachment; filename=\"$filename\"");
  2257.             header("Content-Transfer-Encoding: binary");
  2258.             if ($fh = fopen("$file", "rb")){
  2259.                 fpassthru($fh);
  2260.                 fclose($fh);
  2261.             } else alert(et('ReadDenied').": ".$file);
  2262.         } else alert(et('ReadDenied').": ".$file);
  2263.     } else alert(et('FileNotFound').": ".$file);
  2264. }
  2265. function execute_cmd(){
  2266.     global $cmd;
  2267.     header("Content-type: text/plain");
  2268.     if (strlen($cmd)){
  2269.         echo "# ".$cmd."\n";
  2270.         exec($cmd,$mat);
  2271.         if (count($mat)) echo trim(implode("\n",$mat));
  2272.         else echo "exec(\"$cmd\") ".et('NoReturn')."...";
  2273.     } else echo et('NoCmd');
  2274. }
  2275. function execute_file(){
  2276.     global $current_dir,$filename;
  2277.     header("Content-type: text/plain");
  2278.     $file = $current_dir.$filename;
  2279.     if(file_exists($file)){
  2280.         echo "# ".$file."\n";
  2281.         exec($file,$mat);
  2282.         if (count($mat)) echo trim(implode("\n",$mat));
  2283.     } else alert(et('FileNotFound').": ".$file);
  2284. }
  2285. function save_upload($temp_file,$filename,$dir_dest) {
  2286.     global $upload_ext_filter;
  2287.     $filename = remove_special_chars($filename);
  2288.     $file = $dir_dest.$filename;
  2289.     $filesize = filesize($temp_file);
  2290.     $is_denied = false;
  2291.     foreach($upload_ext_filter as $key=>$ext){
  2292.         if (eregi($ext,$filename)){
  2293.             $is_denied = true;
  2294.             break;
  2295.         }
  2296.     }
  2297.     if (!$is_denied){
  2298.         if (!check_limit($filesize)){
  2299.             if (file_exists($file)){
  2300.                 if (unlink($file)){
  2301.                     if (copy($temp_file,$file)){
  2302.                         @chmod($file,0755);
  2303.                         $out = 6;
  2304.                     } else $out = 2;
  2305.                 } else $out = 5;
  2306.             } else {
  2307.                 if (copy($temp_file,$file)){
  2308.                     @chmod($file,0755);
  2309.                     $out = 1;
  2310.                 } else $out = 2;
  2311.             }
  2312.         } else $out = 3;
  2313.     } else $out = 4;
  2314.     return $out;
  2315. }
  2316. function zip_extract(){
  2317.   global $cmd_arg,$current_dir,$islinux;
  2318.   $zip = zip_open($current_dir.$cmd_arg);
  2319.   if ($zip) {
  2320.     while ($zip_entry = zip_read($zip)) {
  2321.         if (zip_entry_filesize($zip_entry)) {
  2322.             $complete_path = $path.dirname(zip_entry_name($zip_entry));
  2323.             $complete_name = $path.zip_entry_name($zip_entry);
  2324.             if(!file_exists($complete_path)) {
  2325.                 $tmp = '';
  2326.                 foreach(explode('/',$complete_path) AS $k) {
  2327.                     $tmp .= $k.'/';
  2328.                     if(!file_exists($tmp)) {
  2329.                         @mkdir($current_dir.$tmp, 0755);
  2330.                     }
  2331.                 }
  2332.             }
  2333.             if (zip_entry_open($zip, $zip_entry, "r")) {
  2334.                 if ($fd = fopen($current_dir.$complete_name, 'w')){
  2335.                     fwrite($fd, zip_entry_read($zip_entry, zip_entry_filesize($zip_entry)));
  2336.                     fclose($fd);
  2337.                 } else echo "fopen($current_dir.$complete_name) error<br>";
  2338.                 zip_entry_close($zip_entry);
  2339.             } else echo "zip_entry_open($zip,$zip_entry) error<br>";
  2340.         }
  2341.     }
  2342.     zip_close($zip);
  2343.   }
  2344. }
  2345. // +--------------------------------------------------
  2346. // | Data Formating
  2347. // +--------------------------------------------------
  2348. function html_encode($str){
  2349.     global $charSet;
  2350.     $str = preg_replace(array('/&/', '/</', '/>/', '/"/'), array('&amp;', '&lt;', '&gt;', '&quot;'), $str);  // Bypass PHP to allow any charset!!
  2351.     $str = htmlentities($str, ENT_QUOTES, $charSet, false);
  2352.     return $str;
  2353. }
  2354. function rep($x,$y){
  2355.   if ($x) {
  2356.     $aux = "";
  2357.     for ($a=1;$a<=$x;$a++) $aux .= $y;
  2358.     return $aux;
  2359.   } else return "";
  2360. }
  2361. function str_zero($arg1,$arg2){
  2362.     if (strstr($arg1,"-") == false){
  2363.         $aux = intval($arg2) - strlen($arg1);
  2364.         if ($aux) return rep($aux,"0").$arg1;
  2365.         else return $arg1;
  2366.     } else {
  2367.         return "[$arg1]";
  2368.     }
  2369. }
  2370. function replace_double($sub,$str){
  2371.     $out=str_replace($sub.$sub,$sub,$str);
  2372.     while ( strlen($out) != strlen($str) ){
  2373.         $str=$out;
  2374.         $out=str_replace($sub.$sub,$sub,$str);
  2375.     }
  2376.     return $out;
  2377. }
  2378. function remove_special_chars($str){
  2379.     $str = trim($str);
  2380.     $str = strtr($str,"¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ!@#%&*()[]{}+=?",
  2381.                       "YuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy_______________");
  2382.     $str = str_replace("..","",str_replace("/","",str_replace("\\","",str_replace("\$","",$str))));
  2383.     return $str;
  2384. }
  2385. function format_path($str){
  2386.     global $islinux;
  2387.     $str = trim($str);
  2388.     $str = str_replace("..","",str_replace("\\","/",str_replace("\$","",$str)));
  2389.     $done = false;
  2390.     while (!$done) {
  2391.         $str2 = str_replace("//","/",$str);
  2392.         if (strlen($str) == strlen($str2)) $done = true;
  2393.         else $str = $str2;
  2394.     }
  2395.     $tam = strlen($str);
  2396.     if ($tam){
  2397.         $last_char = $tam - 1;
  2398.         if ($str[$last_char] != "/") $str .= "/";
  2399.         if (!$islinux) $str = ucfirst($str);
  2400.     }
  2401.     return $str;
  2402. }
  2403. function array_csort() {
  2404.   $args = func_get_args();
  2405.   $marray = array_shift($args);
  2406.   $msortline = "return(array_multisort(";
  2407.    foreach ($args as $arg) {
  2408.        $i++;
  2409.        if (is_string($arg)) {
  2410.           foreach ($marray as $row) {
  2411.                $sortarr[$i][] = $row[$arg];
  2412.            }
  2413.        } else {
  2414.           $sortarr[$i] = $arg;
  2415.        }
  2416.        $msortline .= "\$sortarr[".$i."],";
  2417.    }
  2418.    $msortline .= "\$marray));";
  2419.    eval($msortline);
  2420.    return $marray;
  2421. }
  2422. function show_perms( $P ) {
  2423.    $sP = "<b>";
  2424.    if($P & 0x1000) $sP .= 'p';            // FIFO pipe
  2425.    elseif($P & 0x2000) $sP .= 'c';        // Character special
  2426.    elseif($P & 0x4000) $sP .= 'd';        // Directory
  2427.    elseif($P & 0x6000) $sP .= 'b';        // Block special
  2428.    elseif($P & 0x8000) $sP .= '&minus;';  // Regular
  2429.    elseif($P & 0xA000) $sP .= 'l';        // Symbolic Link
  2430.    elseif($P & 0xC000) $sP .= 's';        // Socket
  2431.    else $sP .= 'u';                       // UNKNOWN
  2432.    $sP .= "</b>";
  2433.    // owner - group - others
  2434.    $sP .= (($P & 0x0100) ? 'r' : '&minus;') . (($P & 0x0080) ? 'w' : '&minus;') . (($P & 0x0040) ? (($P & 0x0800) ? 's' : 'x' ) : (($P & 0x0800) ? 'S' : '&minus;'));
  2435.    $sP .= (($P & 0x0020) ? 'r' : '&minus;') . (($P & 0x0010) ? 'w' : '&minus;') . (($P & 0x0008) ? (($P & 0x0400) ? 's' : 'x' ) : (($P & 0x0400) ? 'S' : '&minus;'));
  2436.    $sP .= (($P & 0x0004) ? 'r' : '&minus;') . (($P & 0x0002) ? 'w' : '&minus;') . (($P & 0x0001) ? (($P & 0x0200) ? 't' : 'x' ) : (($P & 0x0200) ? 'T' : '&minus;'));
  2437.    return $sP;
  2438. }
  2439. function format_size($arg) {
  2440.     if ($arg>0){
  2441.         $j = 0;
  2442.         $ext = array(" bytes"," Kb"," Mb"," Gb"," Tb");
  2443.         while ($arg >= pow(1024,$j)) ++$j;
  2444.         return round($arg / pow(1024,$j-1) * 100) / 100 . $ext[$j-1];
  2445.     } else return "0 bytes";
  2446. }
  2447. function get_size($file) {
  2448.     return format_size(filesize($file));
  2449. }
  2450. function check_limit($new_filesize=0) {
  2451.     global $fm_current_root;
  2452.     global $quota_mb;
  2453.     if($quota_mb){
  2454.         $total = total_size($fm_current_root);
  2455.         if (floor(($total+$new_filesize)/(1024*1024)) > $quota_mb) return true;
  2456.     }
  2457.     return false;
  2458. }
  2459. function get_user($arg) {
  2460.     global $mat_passwd;
  2461.     $aux = "x:".trim($arg).":";
  2462.     for($x=0;$x<count($mat_passwd);$x++){
  2463.         if (strstr($mat_passwd[$x],$aux)){
  2464.          $mat = explode(":",$mat_passwd[$x]);
  2465.          return $mat[0];
  2466.         }
  2467.     }
  2468.     return $arg;
  2469. }
  2470. function get_group($arg) {
  2471.     global $mat_group;
  2472.     $aux = "x:".trim($arg).":";
  2473.     for($x=0;$x<count($mat_group);$x++){
  2474.         if (strstr($mat_group[$x],$aux)){
  2475.          $mat = explode(":",$mat_group[$x]);
  2476.          return $mat[0];
  2477.         }
  2478.     }
  2479.     return $arg;
  2480. }
  2481. function uppercase($str){
  2482.     global $charset;
  2483.     return mb_strtoupper($str, $charset);
  2484. }
  2485. function lowercase($str){
  2486.     global $charset;
  2487.     return mb_strtolower($str, $charset);
  2488. }
  2489. // +--------------------------------------------------
  2490. // | Interface
  2491. // +--------------------------------------------------
  2492. function html_header($header=""){
  2493.     global $charset,$fm_color;
  2494.     echo "
  2495.     <!DOCTYPE HTML PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
  2496.     <html xmlns=\"http://www.w3.org/1999/xhtml\">
  2497.    <head>    
  2498.     <meta http-equiv=\"content-type\" content=\"text/html; charset=".$charset."\" />   
  2499.     <title>...:::: ".et('FileMan')."</title>
  2500.    <script language=\"Javascript\" type=\"text/javascript\">
  2501.    <!--
  2502.        function Is(){
  2503.            this.appname = navigator.appName;
  2504.            this.appversion = navigator.appVersion;
  2505.            this.platform = navigator.platform;
  2506.            this.useragent = navigator.userAgent.toLowerCase();
  2507.            this.ie = ( this.appname == 'Microsoft Internet Explorer' );
  2508.            if (( this.useragent.indexOf( 'mac' ) != -1 ) || ( this.platform.indexOf( 'mac' ) != -1 )){
  2509.                this.sisop = 'mac';
  2510.            } else if (( this.useragent.indexOf( 'windows' ) != -1 ) || ( this.platform.indexOf( 'win32' ) != -1 )){
  2511.                this.sisop = 'windows';
  2512.            } else if (( this.useragent.indexOf( 'inux' ) != -1 ) || ( this.platform.indexOf( 'linux' ) != -1 )){
  2513.                this.sisop = 'linux';
  2514.            }
  2515.        }
  2516.        var is = new Is();
  2517.        function enterSubmit(keypressEvent,submitFunc){
  2518.            var kCode = (is.ie) ? keypressEvent.keyCode : keypressEvent.which
  2519.            if( kCode == 13) eval(submitFunc);
  2520.        }
  2521.        function getCookieVal (offset) {
  2522.            var endstr = document.cookie.indexOf (';', offset);
  2523.            if (endstr == -1) endstr = document.cookie.length;
  2524.            return unescape(document.cookie.substring(offset, endstr));
  2525.        }
  2526.        function getCookie (name) {
  2527.            var arg = name + '=';
  2528.            var alen = arg.length;
  2529.            var clen = document.cookie.length;
  2530.            var i = 0;
  2531.            while (i < clen) {
  2532.                var j = i + alen;
  2533.                if (document.cookie.substring(i, j) == arg) return getCookieVal (j);
  2534.                i = document.cookie.indexOf(' ', i) + 1;
  2535.                if (i == 0) break;
  2536.            }
  2537.            return null;
  2538.        }
  2539.        function setCookie (name, value, expires) {
  2540.            var argv = setCookie.arguments;
  2541.            var argc = setCookie.arguments.length;
  2542.            var expires = (argc > 2) ? argv[2] : null;
  2543.            var path = (argc > 3) ? argv[3] : null;
  2544.            var domain = (argc > 4) ? argv[4] : null;
  2545.            var secure = (argc > 5) ? argv[5] : false;
  2546.            document.cookie = name + '=' + escape (value) +
  2547.            ((expires == null) ? '' : ('; expires=' + expires.toGMTString())) +
  2548.            ((path == null) ? '' : ('; path=' + path)) +
  2549.            ((domain == null) ? '' : ('; domain=' + domain)) +
  2550.            ((secure == true) ? '; secure' : '');
  2551.        }
  2552.        function delCookie (name) {
  2553.            var exp = new Date();
  2554.            exp.setTime (exp.getTime() - 1);
  2555.            var cval = getCookie (name);
  2556.            document.cookie = name + '=' + cval + '; expires=' + exp.toGMTString();
  2557.        }
  2558.        var frameWidth, frameHeight;
  2559.        function getFrameSize(){
  2560.            if (self.innerWidth){
  2561.                frameWidth = self.innerWidth;
  2562.                frameHeight = self.innerHeight;
  2563.            }else if (document.documentElement && document.documentElement.clientWidth){
  2564.                frameWidth = document.documentElement.clientWidth;
  2565.                frameHeight = document.documentElement.clientHeight;
  2566.            }else if (document.body){
  2567.                frameWidth = document.body.clientWidth;
  2568.                frameHeight = document.body.clientHeight;
  2569.            }else return false;
  2570.            return true;
  2571.        }
  2572.        getFrameSize();
  2573.    //-->
  2574.    </script>
  2575.    $header
  2576.    </head>
  2577.    <script language=\"Javascript\" type=\"text/javascript\">
  2578.    <!--
  2579.        var W = screen.width;
  2580.        var H = screen.height;
  2581.        var FONTSIZE = 0;
  2582.        switch (W){
  2583.            case 640:
  2584.                FONTSIZE = 8;
  2585.            break;
  2586.            case 800:
  2587.                FONTSIZE = 10;
  2588.            break;
  2589.            case 1024:
  2590.                FONTSIZE = 12;
  2591.            break;
  2592.            default:
  2593.                FONTSIZE = 14;
  2594.            break;
  2595.        }
  2596.    ";
  2597.     echo replace_double(" ",str_replace(chr(13),"",str_replace(chr(10),"","
  2598.        document.writeln('
  2599.        <style type=\"text/css\">
  2600.        body {
  2601.            font-family : Arial;
  2602.            font-size: '+FONTSIZE+'px;
  2603.            font-weight : normal;
  2604.            color: #".$fm_color['Text'].";
  2605.            background-color: #".$fm_color['Bg'].";
  2606.        }
  2607.        table {
  2608.            font-family : Arial;
  2609.            font-size: '+FONTSIZE+'px;
  2610.            font-weight : normal;
  2611.            color: #".$fm_color['Text'].";
  2612.            cursor: default;
  2613.        }
  2614.        input {
  2615.            font-family : Arial;
  2616.            font-size: '+FONTSIZE+'px;
  2617.            font-weight : normal;
  2618.            color: #".$fm_color['Text'].";
  2619.        }
  2620.        textarea {
  2621.            font-family : Courier;
  2622.            font-size: 12px;
  2623.            font-weight : normal;
  2624.            color: #".$fm_color['Text'].";
  2625.        }
  2626.        a {
  2627.            font-family : Arial;
  2628.            font-size : '+FONTSIZE+'px;
  2629.            font-weight : bold;
  2630.            text-decoration: none;
  2631.            color: #".$fm_color['Text'].";
  2632.        }
  2633.        a:link {
  2634.            color: #".$fm_color['Text'].";
  2635.        }
  2636.        a:visited {
  2637.            color: #".$fm_color['Text'].";
  2638.        }
  2639.        a:hover {
  2640.            color: #".$fm_color['Link'].";
  2641.        }
  2642.        a:active {
  2643.            color: #".$fm_color['Text'].";
  2644.        }
  2645.        tr.entryUnselected {
  2646.            background-color: #".$fm_color['Entry'].";
  2647.        }
  2648.        tr.entryUnselected:hover {
  2649.            background-color: #".$fm_color['Over'].";
  2650.        }
  2651.        tr.entrySelected {
  2652.            background-color: #".$fm_color['Mark'].";
  2653.        }
  2654.        </style>
  2655.        ');
  2656.    ")));
  2657.     echo "
  2658.    //-->
  2659.    </script>
  2660.    ";
  2661. }
  2662. function reloadframe($ref,$frame_number,$Plus=""){
  2663.     global $current_dir,$path_info;
  2664.     echo "
  2665.    <script language=\"Javascript\" type=\"text/javascript\">
  2666.    <!--
  2667.        ".$ref.".frame".$frame_number.".location.href='".$path_info["basename"]."?frame=".$frame_number."&current_dir=".$current_dir.$Plus."';
  2668.    //-->
  2669.    </script>
  2670.    ";
  2671. }
  2672. function alert($arg){
  2673.     echo "
  2674.    <script language=\"Javascript\" type=\"text/javascript\">
  2675.    <!--
  2676.        alert('$arg');
  2677.    //-->
  2678.    </script>
  2679.    ";
  2680. }
  2681. function tree($dir_before,$dir_current,$indice){
  2682.     global $fm_current_root, $current_dir, $islinux;
  2683.     global $expanded_dir_list;
  2684.     $indice++;
  2685.     $num_dir = 0;
  2686.     $dir_name = str_replace($dir_before,"",$dir_current);
  2687.     $dir_before = str_replace("//","/",$dir_before);
  2688.     $dir_current = str_replace("//","/",$dir_current);
  2689.     $is_denied = false;
  2690.     if ($islinux) {
  2691.         $denied_list = "/proc#/dev";
  2692.         $mat = explode("#",$denied_list);
  2693.         foreach($mat as $key => $val){
  2694.             if ($dir_current == $val){
  2695.                 $is_denied = true;
  2696.                 break;
  2697.             }
  2698.         }
  2699.         unset($mat);
  2700.     }
  2701.     if (!$is_denied){
  2702.         if ($handle = @opendir($dir_current)){
  2703.             // Permitido
  2704.             while ($file = readdir($handle)){
  2705.                 if ($file != "." && $file != ".." && is_dir("$dir_current/$file"))
  2706.                     $mat_dir[] = $file;
  2707.             }
  2708.             @closedir($handle);
  2709.             if (count($mat_dir)){
  2710.                 sort($mat_dir,SORT_STRING);
  2711.                 // with Sub-dir
  2712.                 if ($indice != 0){
  2713.                     for ($aux=1;$aux<$indice;$aux++) echo "&nbsp;&nbsp;&nbsp;&nbsp;";
  2714.                 }
  2715.                 if ($dir_before != $dir_current){
  2716.                     if (strstr($expanded_dir_list,":$dir_current/$dir_name")) $op_str = "[–]";
  2717.                     else $op_str = "[+]";
  2718.                     echo "<nobr><a href=\"JavaScript:go_dir('$dir_current/$dir_name')\">$op_str</a> <a href=\"JavaScript:go('$dir_current')\">$dir_name</a></nobr><br>\n";
  2719.                 } else {
  2720.                     echo "<nobr><a href=\"JavaScript:go('$dir_current')\">$fm_current_root</a></nobr><br>\n";
  2721.                 }
  2722.                 for ($x=0;$x<count($mat_dir);$x++){
  2723.                     if (($dir_before == $dir_current)||(strstr($expanded_dir_list,":$dir_current/$dir_name"))){
  2724.                         tree($dir_current."/",$dir_current."/".$mat_dir[$x],$indice);
  2725.                     } else flush();
  2726.                 }
  2727.             } else {
  2728.               // no Sub-dir
  2729.               if ($dir_before != $dir_current){
  2730.                 for ($aux=1;$aux<$indice;$aux++) echo "&nbsp;&nbsp;&nbsp;&nbsp;";
  2731.                 echo "<b>[&nbsp;&nbsp;]</b>";
  2732.                 echo "<nobr><a href=\"JavaScript:go('$dir_current')\"> $dir_name</a></nobr><br>\n";
  2733.               } else {
  2734.                 echo "<nobr><a href=\"JavaScript:go('$dir_current')\"> $fm_current_root</a></nobr><br>\n";
  2735.               }
  2736.             }
  2737.         } else {
  2738.             // denied
  2739.             if ($dir_before != $dir_current){
  2740.                 for ($aux=1;$aux<$indice;$aux++) echo "&nbsp;&nbsp;&nbsp;&nbsp;";
  2741.                 echo "<b>[&nbsp;&nbsp;]</b>";
  2742.                 echo "<nobr><a href=\"JavaScript:go('$dir_current')\"><font color=red> $dir_name</font></a></nobr><br>\n";
  2743.             } else {
  2744.                 echo "<nobr><a href=\"JavaScript:go('$dir_current')\"><font color=red> $fm_current_root</font></a></nobr><br>\n";
  2745.             }
  2746.  
  2747.         }
  2748.     } else {
  2749.         // denied
  2750.         if ($dir_before != $dir_current){
  2751.             for ($aux=1;$aux<$indice;$aux++) echo "&nbsp;&nbsp;&nbsp;&nbsp;";
  2752.             echo "<b>[&nbsp;&nbsp;]</b>";
  2753.             echo "<nobr><a href=\"JavaScript:go('$dir_current')\"><font color=red> $dir_name</font></a></nobr><br>\n";
  2754.         } else {
  2755.             echo "<nobr><a href=\"JavaScript:go('$dir_current')\"><font color=red> $fm_current_root</font></a></nobr><br>\n";
  2756.         }
  2757.     }
  2758. }
  2759. function show_tree(){
  2760.     global $fm_current_root,$path_info,$setflag,$islinux,$cookie_cache_time;
  2761.     html_header("
  2762.    <script language=\"Javascript\" type=\"text/javascript\">
  2763.    <!--
  2764.        function saveFrameSize(){
  2765.            if (getFrameSize()){
  2766.                var exp = new Date();
  2767.                exp.setTime(exp.getTime()+$cookie_cache_time);
  2768.                setCookie('leftFrameWidth',frameWidth,exp);
  2769.            }
  2770.        }
  2771.        window.onresize = saveFrameSize;
  2772.    //-->
  2773.    </script>");
  2774.     echo "<body marginwidth=\"0\" marginheight=\"0\">\n";
  2775.     echo "
  2776.    <script language=\"Javascript\" type=\"text/javascript\">
  2777.    <!--
  2778.        // Disable text selection, binding the onmousedown, but not for some elements, it must work.
  2779.        function disableTextSelection(e){
  2780.             var type = String(e.target.type);
  2781.             return (type.indexOf('select') != -1 || type.indexOf('button') != -1 || type.indexOf('input') != -1 || type.indexOf('radio') != -1);
  2782.         }
  2783.        function enableTextSelection(){return true}
  2784.        if (is.ie) document.onselectstart=new Function('return false')
  2785.        else {
  2786.            document.body.onmousedown=disableTextSelection
  2787.            document.body.onclick=enableTextSelection
  2788.        }
  2789.        var flag = ".(($setflag)?"true":"false")."
  2790.        function set_flag(arg) {
  2791.            flag = arg;
  2792.        }
  2793.        function go_dir(arg) {
  2794.            var setflag;
  2795.            setflag = (flag)?1:0;
  2796.            document.location.href='".addslashes($path_info["basename"])."?frame=2&setflag='+setflag+'&current_dir=".addslashes($current_dir)."&ec_dir='+arg;
  2797.        }
  2798.        function go(arg) {
  2799.            if (flag) {
  2800.                parent.frame3.set_dir_dest(arg+'/');
  2801.                flag = false;
  2802.            } else {
  2803.                parent.frame3.location.href='".addslashes($path_info["basename"])."?frame=3&current_dir='+arg+'/';
  2804.            }
  2805.        }
  2806.        function set_fm_current_root(arg){
  2807.            document.location.href='".addslashes($path_info["basename"])."?frame=2&set_fm_current_root='+escape(arg);
  2808.        }
  2809.        function atualizar(){
  2810.            document.location.href='".addslashes($path_info["basename"])."?frame=2';
  2811.        }
  2812.    //-->
  2813.    </script>
  2814.    ";
  2815.     echo "<table width=\"100%\" height=\"100%\" border=0 cellspacing=0 cellpadding=5>\n";
  2816.     echo "<form><tr valign=top height=10><td>";
  2817.     if (!$islinux){
  2818.         echo "<select name=drive onchange=\"set_fm_current_root(this.value)\">";
  2819.         $aux="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  2820.         for($x=0;$x<strlen($aux);$x++){
  2821.             if ($handle = opendir($aux[$x].":/")){
  2822.                 @closedir($handle);
  2823.                 if (strstr(uppercase($fm_current_root),$aux[$x].":/")) $is_sel="selected";
  2824.                 else $is_sel="";
  2825.                 echo "<option $is_sel value=\"".$aux[$x].":/\">".$aux[$x].":/";
  2826.             }
  2827.         }
  2828.         echo "</select> ";
  2829.     }
  2830.     echo "<input type=button value=".et('Refresh')." onclick=\"atualizar()\"></tr></form>";
  2831.     echo "<tr valign=top><td>";
  2832.             clearstatcache();
  2833.             tree($fm_current_root,$fm_current_root,-1,0);
  2834.     echo "</td></tr>";
  2835.     echo "
  2836.        <form name=\"login_form\" action=\"".$path_info["basename"]."\" method=\"post\" target=\"_parent\">
  2837.        <input type=hidden name=action value=1>
  2838.        <tr>
  2839.        <td height=10 colspan=2><input type=submit value=\"".et('Leave')."\">
  2840.        </tr>
  2841.        </form>
  2842.    ";
  2843.     echo "</table>\n";
  2844.     echo "</body>\n</html>";
  2845. }
  2846. function getmicrotime(){
  2847.    list($usec, $sec) = explode(" ", microtime());
  2848.    return ((float)$usec + (float)$sec);
  2849. }
  2850. function dir_list_form() {
  2851.     global $fm_current_root,$current_dir,$quota_mb,$resolveIDs,$order_dir_list_by,$islinux,$cmd_name,$ip,$path_info,$fm_color;
  2852.     $ti = getmicrotime();
  2853.     clearstatcache();
  2854.     $out = "<table border=0 cellspacing=1 cellpadding=4 width=\"100%\" bgcolor=\"#eeeeee\">\n";
  2855.     if ($opdir = @opendir($current_dir)) {
  2856.         $has_files = false;
  2857.         $entry_count = 0;
  2858.         $total_size = 0;
  2859.         $entry_list = array();
  2860.         while ($file = readdir($opdir)) {
  2861.           if (($file != ".")&&($file != "..")){
  2862.             $entry_list[$entry_count]["size"] = 0;
  2863.             $entry_list[$entry_count]["sizet"] = 0;
  2864.             $entry_list[$entry_count]["type"] = "none";
  2865.             if (is_file($current_dir.$file)){
  2866.                 $ext = lowercase(strrchr($file,"."));
  2867.                 $entry_list[$entry_count]["type"] = "file";
  2868.                 // Função filetype() returns only "file"...
  2869.                 $entry_list[$entry_count]["size"] = filesize($current_dir.$file);
  2870.                 $entry_list[$entry_count]["sizet"] = format_size($entry_list[$entry_count]["size"]);
  2871.                 if (strstr($ext,".")){
  2872.                     $entry_list[$entry_count]["ext"] = $ext;
  2873.                     $entry_list[$entry_count]["extt"] = $ext;
  2874.                 } else {
  2875.                     $entry_list[$entry_count]["ext"] = "";
  2876.                     $entry_list[$entry_count]["extt"] = "&nbsp;";
  2877.                 }
  2878.                 $has_files = true;
  2879.             } elseif (is_dir($current_dir.$file)) {
  2880.                 // Recursive directory size disabled
  2881.                 // $entry_list[$entry_count]["size"] = total_size($current_dir.$file);
  2882.                 $entry_list[$entry_count]["size"] = 0;
  2883.                 $entry_list[$entry_count]["sizet"] = "&nbsp;";
  2884.                 $entry_list[$entry_count]["type"] = "dir";
  2885.             }
  2886.             $entry_list[$entry_count]["name"] = $file;
  2887.             $entry_list[$entry_count]["date"] = date("Ymd", filemtime($current_dir.$file));
  2888.             $entry_list[$entry_count]["time"] = date("his", filemtime($current_dir.$file));
  2889.             $entry_list[$entry_count]["datet"] = date("d/m/y h:i", filemtime($current_dir.$file));
  2890.             if ($islinux && $resolveIDs){
  2891.                 $entry_list[$entry_count]["p"] = show_perms(fileperms($current_dir.$file));
  2892.                 $entry_list[$entry_count]["u"] = get_user(fileowner($current_dir.$file));
  2893.                 $entry_list[$entry_count]["g"] = get_group(filegroup($current_dir.$file));
  2894.             } else {
  2895.                 $entry_list[$entry_count]["p"] = base_convert(fileperms($current_dir.$file),10,8);
  2896.                 $entry_list[$entry_count]["p"] = substr($entry_list[$entry_count]["p"],strlen($entry_list[$entry_count]["p"])-3);
  2897.                 $entry_list[$entry_count]["u"] = fileowner($current_dir.$file);
  2898.                 $entry_list[$entry_count]["g"] = filegroup($current_dir.$file);
  2899.             }
  2900.             $total_size += $entry_list[$entry_count]["size"];
  2901.             $entry_count++;
  2902.           }
  2903.         }
  2904.         @closedir($opdir);
  2905.  
  2906.         if($entry_count){
  2907.             $or1="1A";
  2908.             $or2="2D";
  2909.             $or3="3A";
  2910.             $or4="4A";
  2911.             $or5="5A";
  2912.             $or6="6D";
  2913.             $or7="7D";
  2914.             switch($order_dir_list_by){
  2915.                 case "1A": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"name",SORT_STRING,SORT_ASC); $or1="1D"; break;
  2916.                 case "1D": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"name",SORT_STRING,SORT_DESC); $or1="1A"; break;
  2917.                 case "2A": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"p",SORT_STRING,SORT_ASC,"g",SORT_STRING,SORT_ASC,"u",SORT_STRING,SORT_ASC); $or2="2D"; break;
  2918.                 case "2D": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"p",SORT_STRING,SORT_DESC,"g",SORT_STRING,SORT_ASC,"u",SORT_STRING,SORT_ASC); $or2="2A"; break;
  2919.                 case "3A": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"u",SORT_STRING,SORT_ASC,"g",SORT_STRING,SORT_ASC); $or3="3D"; break;
  2920.                 case "3D": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"u",SORT_STRING,SORT_DESC,"g",SORT_STRING,SORT_ASC); $or3="3A"; break;
  2921.                 case "4A": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"g",SORT_STRING,SORT_ASC,"u",SORT_STRING,SORT_DESC); $or4="4D"; break;
  2922.                 case "4D": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"g",SORT_STRING,SORT_DESC,"u",SORT_STRING,SORT_DESC); $or4="4A"; break;
  2923.                 case "5A": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"size",SORT_NUMERIC,SORT_ASC); $or5="5D"; break;
  2924.                 case "5D": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"size",SORT_NUMERIC,SORT_DESC); $or5="5A"; break;
  2925.                 case "6A": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"date",SORT_STRING,SORT_ASC,"time",SORT_STRING,SORT_ASC,"name",SORT_STRING,SORT_ASC); $or6="6D"; break;
  2926.                 case "6D": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"date",SORT_STRING,SORT_DESC,"time",SORT_STRING,SORT_DESC,"name",SORT_STRING,SORT_ASC); $or6="6A"; break;
  2927.                 case "7A": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"ext",SORT_STRING,SORT_ASC,"name",SORT_STRING,SORT_ASC); $or7="7D"; break;
  2928.                 case "7D": $entry_list = array_csort ($entry_list,"type",SORT_STRING,SORT_ASC,"ext",SORT_STRING,SORT_DESC,"name",SORT_STRING,SORT_ASC); $or7="7A"; break;
  2929.             }
  2930.         }
  2931.         $out .= "
  2932.        <script language=\"Javascript\" type=\"text/javascript\">
  2933.        <!--
  2934.        function go(arg) {
  2935.            document.location.href='".addslashes($path_info["basename"])."?frame=3&current_dir=".addslashes($current_dir)."'+arg+'/';
  2936.        }
  2937.        function resolveIDs() {
  2938.            document.location.href='".addslashes($path_info["basename"])."?frame=3&set_resolveIDs=1&current_dir=".addslashes($current_dir)."';
  2939.        }
  2940.        var entry_list = new Array();
  2941.        // Custom object constructor
  2942.        function entry(name, type, size, selected){
  2943.            this.name = name;
  2944.            this.type = type;
  2945.            this.size = size;
  2946.            this.selected = false;
  2947.        }
  2948.        // Declare entry_list for selection procedures";
  2949.         foreach ($entry_list as $i=>$data){
  2950.             $out .= "\nentry_list['entry$i'] = new entry('".addslashes($data["name"])."', '".$data["type"]."', ".$data["size"].", false);";
  2951.         }
  2952.         $out .= "
  2953.        // Select/Unselect Rows OnClick/OnMouseOver
  2954.        var lastRows = new Array(null,null);
  2955.        function selectEntry(Row, Action){
  2956.            if (multipleSelection){
  2957.                // Avoid repeated onmouseover events from same Row ( cell transition )
  2958.                if (Row != lastRows[0]){
  2959.                    if (Action == 'over') {
  2960.                        if (entry_list[Row.id].selected){
  2961.                            if (unselect(entry_list[Row.id])) {
  2962.                                Row.className = 'entryUnselected';
  2963.                            }
  2964.                            // Change the last Row when you change the movement orientation
  2965.                            if (lastRows[0] != null && lastRows[1] != null){
  2966.                                var LastRowID = lastRows[0].id;
  2967.                                if (Row.id == lastRows[1].id){
  2968.                                    if (unselect(entry_list[LastRowID])) {
  2969.                                        lastRows[0].className = 'entryUnselected';
  2970.                                    }
  2971.                                }
  2972.                            }
  2973.                        } else {
  2974.                            if (select(entry_list[Row.id])){
  2975.                                Row.className = 'entrySelected';
  2976.                            }
  2977.                            // Change the last Row when you change the movement orientation
  2978.                            if (lastRows[0] != null && lastRows[1] != null){
  2979.                                var LastRowID = lastRows[0].id;
  2980.                                if (Row.id == lastRows[1].id){
  2981.                                    if (select(entry_list[LastRowID])) {
  2982.                                        lastRows[0].className = 'entrySelected';
  2983.                                    }
  2984.                                }
  2985.                            }
  2986.                        }
  2987.                        lastRows[1] = lastRows[0];
  2988.                        lastRows[0] = Row;
  2989.                    }
  2990.                }
  2991.            } else {
  2992.                if (Action == 'click') {
  2993.                    var newClassName = null;
  2994.                    if (entry_list[Row.id].selected){
  2995.                        if (unselect(entry_list[Row.id])) newClassName = 'entryUnselected';
  2996.                    } else {
  2997.                        if (select(entry_list[Row.id])) newClassName = 'entrySelected';
  2998.                    }
  2999.                    if (newClassName) {
  3000.                        lastRows[0] = lastRows[1] = Row;
  3001.                        Row.className = newClassName;
  3002.                    }
  3003.                }
  3004.            }
  3005.            return true;
  3006.        }
  3007.        // Disable text selection and bind multiple selection flag
  3008.        var multipleSelection = false;
  3009.        if (is.ie) {
  3010.            document.onselectstart=new Function('return false');
  3011.            document.onmousedown=switch_flag_on;
  3012.            document.onmouseup=switch_flag_off;
  3013.            // Event mouseup is not generated over scrollbar.. curiously, mousedown is.. go figure.
  3014.            window.onscroll=new Function('multipleSelection=false');
  3015.            window.onresize=new Function('multipleSelection=false');
  3016.        } else {
  3017.            if (document.layers) window.captureEvents(Event.MOUSEDOWN);
  3018.            if (document.layers) window.captureEvents(Event.MOUSEUP);
  3019.            window.onmousedown=switch_flag_on;
  3020.            window.onmouseup=switch_flag_off;
  3021.        }
  3022.        // Using same function and a ternary operator couses bug on double click
  3023.        function switch_flag_on(e) {
  3024.            if (is.ie){
  3025.                multipleSelection = (event.button == 1);
  3026.            } else {
  3027.                multipleSelection = (e.which == 1);
  3028.            }
  3029.             var type = String(e.target.type);
  3030.             return (type.indexOf('select') != -1 || type.indexOf('button') != -1 || type.indexOf('input') != -1 || type.indexOf('radio') != -1);
  3031.        }
  3032.        function switch_flag_off(e) {
  3033.            if (is.ie){
  3034.                multipleSelection = (event.button != 1);
  3035.            } else {
  3036.                multipleSelection = (e.which != 1);
  3037.            }
  3038.            lastRows[0] = lastRows[1] = null;
  3039.            update_sel_status();
  3040.            return false;
  3041.        }
  3042.        var total_dirs_selected = 0;
  3043.        var total_files_selected = 0;
  3044.        function unselect(Entry){
  3045.            if (!Entry.selected) return false;
  3046.            Entry.selected = false;
  3047.            sel_totalsize -= Entry.size;
  3048.            if (Entry.type == 'dir') total_dirs_selected--;
  3049.            else total_files_selected--;
  3050.            return true;
  3051.        }
  3052.        function select(Entry){
  3053.            if(Entry.selected) return false;
  3054.            Entry.selected = true;
  3055.            sel_totalsize += Entry.size;
  3056.            if(Entry.type == 'dir') total_dirs_selected++;
  3057.            else total_files_selected++;
  3058.            return true;
  3059.        }
  3060.        function is_anything_selected(){
  3061.            var selected_dir_list = new Array();
  3062.            var selected_file_list = new Array();
  3063.            for(var x=0;x<".(integer)count($entry_list).";x++){
  3064.                if(entry_list['entry'+x].selected){
  3065.                    if(entry_list['entry'+x].type == 'dir') selected_dir_list.push(entry_list['entry'+x].name);
  3066.                    else selected_file_list.push(entry_list['entry'+x].name);
  3067.                }
  3068.            }
  3069.            document.form_action.selected_dir_list.value = selected_dir_list.join('<|*|>');
  3070.            document.form_action.selected_file_list.value = selected_file_list.join('<|*|>');
  3071.            return (total_dirs_selected>0 || total_files_selected>0);
  3072.        }
  3073.        function format_size (arg) {
  3074.            var resul = '';
  3075.            if (arg>0){
  3076.                var j = 0;
  3077.                var ext = new Array(' bytes',' Kb',' Mb',' Gb',' Tb');
  3078.                while (arg >= Math.pow(1024,j)) ++j;
  3079.                resul = (Math.round(arg/Math.pow(1024,j-1)*100)/100) + ext[j-1];
  3080.            } else resul = 0;
  3081.            return resul;
  3082.        }
  3083.        var sel_totalsize = 0;
  3084.        function update_sel_status(){
  3085.            var t = total_dirs_selected+' ".et('Dir_s')." ".et('And')." '+total_files_selected+' ".et('File_s')." ".et('Selected_s')." = '+format_size(sel_totalsize);
  3086.            //document.getElementById(\"sel_status\").innerHTML = t;
  3087.            window.status = t;
  3088.        }
  3089.        // Select all/none/inverse
  3090.        function selectANI(Butt){
  3091.             cancel_copy_move();
  3092.            for(var x=0;x<". (integer)count($entry_list).";x++){
  3093.                var Row = document.getElementById('entry'+x);
  3094.                var newClassName = null;
  3095.                switch (Butt.value){
  3096.                    case '".et('SelAll')."':
  3097.                        if (select(entry_list[Row.id])) newClassName = 'entrySelected';
  3098.                    break;
  3099.                    case '".et('SelNone')."':
  3100.                        if (unselect(entry_list[Row.id])) newClassName = 'entryUnselected';
  3101.                    break;
  3102.                    case '".et('SelInverse')."':
  3103.                        if (entry_list[Row.id].selected){
  3104.                            if (unselect(entry_list[Row.id])) newClassName = 'entryUnselected';
  3105.                        } else {
  3106.                            if (select(entry_list[Row.id])) newClassName = 'entrySelected';
  3107.                        }
  3108.                    break;
  3109.                }
  3110.                if (newClassName) {
  3111.                    Row.className = newClassName;
  3112.                }
  3113.            }
  3114.            if (Butt.value == '".et('SelAll')."'){
  3115.                for(var i=0;i<2;i++){
  3116.                    document.getElementById('ANI'+i).value='".et('SelNone')."';
  3117.                }
  3118.            } else if (Butt.value == '".et('SelNone')."'){
  3119.                for(var i=0;i<2;i++){
  3120.                    document.getElementById('ANI'+i).value='".et('SelAll')."';
  3121.                }
  3122.            }
  3123.            update_sel_status();
  3124.            return true;
  3125.        }
  3126.        function download(arg){
  3127.            parent.frame1.location.href='".addslashes($path_info["basename"])."?action=3&current_dir=".addslashes($current_dir)."&filename='+escape(arg);
  3128.        }
  3129.        function upload(){
  3130.            var w = 400;
  3131.            var h = 250;
  3132.            window.open('".addslashes($path_info["basename"])."?action=10&current_dir=".addslashes($current_dir)."', '', 'width='+w+',height='+h+',fullscreen=no,scrollbars=no,resizable=yes,status=no,toolbar=no,menubar=no,location=no');
  3133.        }
  3134.        function execute_cmd(){
  3135.            var arg = prompt('".et('TypeCmd').".');
  3136.            if(arg.length>0){
  3137.                if(confirm('".et('ConfExec')." \\' '+arg+' \\' ?')) {
  3138.                    var w = 800;
  3139.                    var h = 600;
  3140.                    window.open('".addslashes($path_info["basename"])."?action=6&current_dir=".addslashes($current_dir)."&cmd='+escape(arg), '', 'width='+w+',height='+h+',fullscreen=no,scrollbars=yes,resizable=yes,status=no,toolbar=no,menubar=no,location=no');
  3141.                }
  3142.            }
  3143.        }
  3144.        function decompress(arg){
  3145.            if(confirm('".uppercase(et('Decompress'))." \\' '+arg+' \\' ?')) {
  3146.                document.form_action.action.value = 72;
  3147.                document.form_action.cmd_arg.value = arg;
  3148.                document.form_action.submit();
  3149.            }
  3150.        }
  3151.        function execute_file(arg){
  3152.            if(arg.length>0){
  3153.                if(confirm('".et('ConfExec')." \\' '+arg+' \\' ?')) {
  3154.                    var w = 800;
  3155.                    var h = 600;
  3156.                    window.open('".addslashes($path_info["basename"])."?action=11&current_dir=".addslashes($current_dir)."&filename='+escape(arg), '', 'width='+w+',height='+h+',fullscreen=no,scrollbars=yes,resizable=yes,status=no,toolbar=no,menubar=no,location=no');
  3157.                }
  3158.            }
  3159.        }
  3160.        function edit_file(arg){
  3161.            var w = 1024;
  3162.            var h = 768;
  3163.            // if(confirm('".uppercase(et('Edit'))." \\' '+arg+' \\' ?'))
  3164.            window.open('".addslashes($path_info["basename"])."?action=7&current_dir=".addslashes($current_dir)."&filename='+escape(arg), '', 'width='+w+',height='+h+',fullscreen=no,scrollbars=no,resizable=yes,status=no,toolbar=no,menubar=no,location=no');
  3165.        }
  3166.        function config(){
  3167.            var w = 650;
  3168.            var h = 400;
  3169.            window.open('".addslashes($path_info["basename"])."?action=2', 'win_config', 'width='+w+',height='+h+',fullscreen=no,scrollbars=yes,resizable=yes,status=no,toolbar=no,menubar=no,location=no');
  3170.        }
  3171.        function server_info(arg){
  3172.            var w = 800;
  3173.            var h = 600;
  3174.            window.open('".addslashes($path_info["basename"])."?action=5', 'win_serverinfo', 'width='+w+',height='+h+',fullscreen=no,scrollbars=yes,resizable=yes,status=no,toolbar=no,menubar=no,location=no');
  3175.        }
  3176.        function shell(){
  3177.            var w = 800;
  3178.            var h = 600;
  3179.            window.open('".addslashes($path_info["basename"])."?action=9', '', 'width='+w+',height='+h+',fullscreen=no,scrollbars=yes,resizable=yes,status=no,toolbar=no,menubar=no,location=no');
  3180.        }
  3181.        function view(arg){
  3182.            var w = 800;
  3183.            var h = 600;
  3184.            if(confirm('".uppercase(et('View'))." \\' '+arg+' \\' ?')) window.open('".addslashes($path_info["basename"])."?action=4&current_dir=".addslashes($current_dir)."&filename='+escape(arg), '', 'width='+w+',height='+h+',fullscreen=no,scrollbars=yes,resizable=yes,status=yes,toolbar=no,menubar=no,location=yes');
  3185.        }
  3186.        function rename(arg){
  3187.            var nome = '';
  3188.            if (nome = prompt('".uppercase(et('Ren'))." \\' '+arg+' \\' ".et('To')." ...')) document.location.href='".addslashes($path_info["basename"])."?frame=3&action=3&current_dir=".addslashes($current_dir)."&old_name='+escape(arg)+'&new_name='+escape(nome);
  3189.        }
  3190.        function set_dir_dest(arg){
  3191.            document.form_action.dir_dest.value=arg;
  3192.            if (document.form_action.action.value.length>0) test(document.form_action.action.value);
  3193.            else alert('".et('JSError').".');
  3194.        }
  3195.        function sel_dir(arg){
  3196.            document.form_action.action.value = arg;
  3197.            document.form_action.dir_dest.value='';
  3198.            if (!is_anything_selected()) alert('".et('NoSel').".');
  3199.            else {
  3200.                if (!getCookie('sel_dir_warn')) {
  3201.                    //alert('".et('SelDir').".');
  3202.                    document.cookie='sel_dir_warn'+'='+escape('true')+';';
  3203.                }
  3204.                set_sel_dir_warn(true);
  3205.                parent.frame2.set_flag(true);
  3206.            }
  3207.        }
  3208.         function set_sel_dir_warn(b){
  3209.             document.getElementById(\"sel_dir_warn\").style.display=(b?'':'none');
  3210.         }
  3211.         function cancel_copy_move(){
  3212.             set_sel_dir_warn(false);
  3213.             parent.frame2.set_flag(false);
  3214.         }
  3215.        function chmod_form(){
  3216.            cancel_copy_move();
  3217.            document.form_action.dir_dest.value='';
  3218.            document.form_action.chmod_arg.value='';
  3219.            if (!is_anything_selected()) alert('".et('NoSel').".');
  3220.            else {
  3221.                var w = 280;
  3222.                var h = 180;
  3223.                window.open('".addslashes($path_info["basename"])."?action=8', '', 'width='+w+',height='+h+',fullscreen=no,scrollbars=no,resizable=yes,status=no,toolbar=no,menubar=no,location=no');
  3224.            }
  3225.        }
  3226.        function set_chmod_arg(arg){
  3227.            cancel_copy_move();
  3228.            if (!is_anything_selected()) alert('".et('NoSel').".');
  3229.            else {
  3230.                 document.form_action.dir_dest.value='';
  3231.                 document.form_action.chmod_arg.value=arg;
  3232.                 test(9);
  3233.             }
  3234.        }
  3235.        function test_action(){
  3236.            if (document.form_action.action.value != 0) return true;
  3237.            else return false;
  3238.        }
  3239.        function test_prompt(arg){
  3240.             cancel_copy_move();
  3241.             var erro='';
  3242.            var conf='';
  3243.            if (arg == 1){
  3244.                document.form_action.cmd_arg.value = prompt('".et('TypeDir').".');
  3245.            } else if (arg == 2){
  3246.                document.form_action.cmd_arg.value = prompt('".et('TypeArq').".');
  3247.            } else if (arg == 71){
  3248.                if (!is_anything_selected()) erro = '".et('NoSel').".';
  3249.                else document.form_action.cmd_arg.value = prompt('".et('TypeArqComp')."');
  3250.            }
  3251.            if (erro!=''){
  3252.                document.form_action.cmd_arg.focus();
  3253.                alert(erro);
  3254.            } else if(document.form_action.cmd_arg.value.length>0) {
  3255.                document.form_action.action.value = arg;
  3256.                document.form_action.submit();
  3257.            }
  3258.        }
  3259.        function strstr(haystack,needle){
  3260.            var index = haystack.indexOf(needle);
  3261.            return (index==-1)?false:index;
  3262.        }
  3263.        function valid_dest(dest,orig){
  3264.            return (strstr(dest,orig)==false)?true:false;
  3265.        }
  3266.        // ArrayAlert - Selection debug only
  3267.        function aa(){
  3268.            var str = 'selected_dir_list:\\n';
  3269.            for (x=0;x<selected_dir_list.length;x++){
  3270.                str += selected_dir_list[x]+'\\n';
  3271.            }
  3272.            str += '\\nselected_file_list:\\n';
  3273.            for (x=0;x<selected_file_list.length;x++){
  3274.                str += selected_file_list[x]+'\\n';
  3275.            }
  3276.            alert(str);
  3277.        }
  3278.        function test(arg){
  3279.             cancel_copy_move();
  3280.            var erro='';
  3281.            var conf='';
  3282.            if (arg == 4){
  3283.                if (!is_anything_selected()) erro = '".et('NoSel').".\\n';
  3284.                conf = '".et('RemSel')." ?\\n';
  3285.            } else if (arg == 5){
  3286.                if (!is_anything_selected()) erro = '".et('NoSel').".\\n';
  3287.                else if(document.form_action.dir_dest.value.length == 0) erro = '".et('NoDestDir').".';
  3288.                else if(document.form_action.dir_dest.value == document.form_action.current_dir.value) erro = '".et('DestEqOrig').".';
  3289.                else if(!valid_dest(document.form_action.dir_dest.value,document.form_action.current_dir.value)) erro = '".et('InvalidDest').".';
  3290.                conf = '".et('CopyTo')." \\' '+document.form_action.dir_dest.value+' \\' ?\\n';
  3291.            } else if (arg == 6){
  3292.                if (!is_anything_selected()) erro = '".et('NoSel').".';
  3293.                else if(document.form_action.dir_dest.value.length == 0) erro = '".et('NoDestDir').".';
  3294.                else if(document.form_action.dir_dest.value == document.form_action.current_dir.value) erro = '".et('DestEqOrig').".';
  3295.                else if(!valid_dest(document.form_action.dir_dest.value,document.form_action.current_dir.value)) erro = '".et('InvalidDest').".';
  3296.                conf = '".et('MoveTo')." \\' '+document.form_action.dir_dest.value+' \\' ?\\n';
  3297.            } else if (arg == 9){
  3298.                if (!is_anything_selected()) erro = '".et('NoSel').".';
  3299.                else if(document.form_action.chmod_arg.value.length == 0) erro = '".et('NoNewPerm').".';
  3300.                //conf = '".et('AlterPermTo')." \\' '+document.form_action.chmod_arg.value+' \\' ?\\n';
  3301.            }
  3302.            if (erro!=''){
  3303.                document.form_action.cmd_arg.focus();
  3304.                alert(erro);
  3305.            } else if(conf!='') {
  3306.                if(confirm(conf)) {
  3307.                    document.form_action.action.value = arg;
  3308.                    document.form_action.submit();
  3309.                } else {
  3310.                    set_sel_dir_warn(false);
  3311.                 }
  3312.            } else {
  3313.                document.form_action.action.value = arg;
  3314.                document.form_action.submit();
  3315.            }
  3316.        }
  3317.        //-->
  3318.        </script>";
  3319.         $out .= "
  3320.        <form name=\"form_action\" action=\"".$path_info["basename"]."\" method=\"post\" onsubmit=\"return test_action();\">
  3321.            <input type=hidden name=\"frame\" value=3>
  3322.            <input type=hidden name=\"action\" value=0>
  3323.            <input type=hidden name=\"dir_dest\" value=\"\">
  3324.            <input type=hidden name=\"chmod_arg\" value=\"\">
  3325.            <input type=hidden name=\"cmd_arg\" value=\"\">
  3326.            <input type=hidden name=\"current_dir\" value=\"$current_dir\">
  3327.            <input type=hidden name=\"dir_before\" value=\"$dir_before\">
  3328.            <input type=hidden name=\"selected_dir_list\" value=\"\">
  3329.            <input type=hidden name=\"selected_file_list\" value=\"\">";
  3330.         $out .= "
  3331.            <tr>
  3332.            <td bgcolor=\"#DDDDDD\" colspan=50><nobr>
  3333.            <input type=button onclick=\"config()\" value=\"".et('Config')."\">
  3334.            <input type=button onclick=\"server_info()\" value=\"".et('ServerInfo')."\">
  3335.            <input type=button onclick=\"test_prompt(1)\" value=\"".et('CreateDir')."\">
  3336.            <input type=button onclick=\"test_prompt(2)\" value=\"".et('CreateArq')."\">
  3337.            <input type=button onclick=\"execute_cmd()\" value=\"".et('ExecCmd')."\">
  3338.            <input type=button onclick=\"upload()\" value=\"".et('Upload')."\">
  3339.            <input type=button onclick=\"shell()\" value=\"".et('Shell')."\">
  3340.            <b>$ip</b>
  3341.            </nobr>";
  3342.         $uplink = "";
  3343.         if ($current_dir != $fm_current_root){
  3344.             $mat = explode("/",$current_dir);
  3345.             $dir_before = "";
  3346.             for($x=0;$x<(count($mat)-2);$x++) $dir_before .= $mat[$x]."/";
  3347.             $uplink = "<a href=\"".$path_info["basename"]."?frame=3&current_dir=$dir_before\"><<</a> ";
  3348.         }
  3349.         if($entry_count){
  3350.             $out .= "
  3351.                <tr bgcolor=\"#DDDDDD\"><td colspan=50><nobr>$uplink <a href=\"".$path_info["basename"]."?frame=3&current_dir=$current_dir\">$current_dir</a></nobr>
  3352.                <tr>
  3353.                <td bgcolor=\"#DDDDDD\" colspan=50><nobr>
  3354.                    <input type=\"button\" style=\"width:80\" onclick=\"selectANI(this)\" id=\"ANI0\" value=\"".et('SelAll')."\">
  3355.                    <input type=\"button\" style=\"width:80\" onclick=\"selectANI(this)\" value=\"".et('SelInverse')."\">
  3356.                    <input type=\"button\" style=\"width:80\" onclick=\"test(4)\" value=\"".et('Rem')."\">
  3357.                    <input type=\"button\" style=\"width:80\" onclick=\"sel_dir(5)\" value=\"".et('Copy')."\">
  3358.                    <input type=\"button\" style=\"width:80\" onclick=\"sel_dir(6)\" value=\"".et('Move')."\">
  3359.                    <input type=\"button\" style=\"width:100\" onclick=\"test_prompt(71)\" value=\"".et('Compress')."\">";
  3360.             if ($islinux) $out .= "
  3361.                    <input type=\"button\" style=\"width:100\" onclick=\"resolveIDs()\" value=\"".et('ResolveIDs')."\">";
  3362.             $out .= "
  3363.                    <input type=\"button\" style=\"width:100\" onclick=\"chmod_form()\" value=\"".et('Perms')."\">";
  3364.             $out .= "
  3365.                </nobr></td>
  3366.                </tr>
  3367.                 <tr>
  3368.                <td bgcolor=\"#DDDDDD\" colspan=50 id=\"sel_dir_warn\" style=\"display:none\"><nobr><font color=\"red\">".et('SelDir')."...</font></nobr></td>
  3369.                </tr>";
  3370.             $file_count = 0;
  3371.             $dir_count = 0;
  3372.             $dir_out = array();
  3373.             $file_out = array();
  3374.             $max_opt = 0;
  3375.             foreach ($entry_list as $ind=>$dir_entry) {
  3376.                 $file = $dir_entry["name"];
  3377.                 if ($dir_entry["type"]=="dir"){
  3378.                     $dir_out[$dir_count] = array();
  3379.                     $dir_out[$dir_count][] = "
  3380.                        <tr ID=\"entry$ind\" class=\"entryUnselected\" onmouseover=\"selectEntry(this, 'over');\" onmousedown=\"selectEntry(this, 'click');\">
  3381.                        <td><nobr><a href=\"JavaScript:go('".addslashes($file)."')\">$file</a></nobr></td>";
  3382.                     $dir_out[$dir_count][] = "<td>".$dir_entry["p"]."</td>";
  3383.                     if ($islinux) {
  3384.                         $dir_out[$dir_count][] = "<td><nobr>".$dir_entry["u"]."</nobr></td>";
  3385.                         $dir_out[$dir_count][] = "<td><nobr>".$dir_entry["g"]."</nobr></td>";
  3386.                     }
  3387.                     $dir_out[$dir_count][] = "<td><nobr>".$dir_entry["sizet"]."</nobr></td>";
  3388.                     $dir_out[$dir_count][] = "<td><nobr>".$dir_entry["datet"]."</nobr></td>";
  3389.                     if ($has_files) $dir_out[$dir_count][] = "<td>&nbsp;</td>";
  3390.                     // Opções de diretório
  3391.                     if ( is_writable($current_dir.$file) ) $dir_out[$dir_count][] = "
  3392.                        <td align=center><a href=\"JavaScript:if(confirm('".et('ConfRem')." \\'".addslashes($file)."\\' ?')) document.location.href='".addslashes($path_info["basename"])."?frame=3&action=8&cmd_arg=".addslashes($file)."&current_dir=".addslashes($current_dir)."'\">".et('Rem')."</a>";
  3393.                     if ( is_writable($current_dir.$file) ) $dir_out[$dir_count][] = "
  3394.                        <td align=center><a href=\"JavaScript:rename('".addslashes($file)."')\">".et('Ren')."</a>";
  3395.                     if (count($dir_out[$dir_count])>$max_opt){
  3396.                         $max_opt = count($dir_out[$dir_count]);
  3397.                     }
  3398.                     $dir_count++;
  3399.                 } else {
  3400.                     $file_out[$file_count] = array();
  3401.                     $file_out[$file_count][] = "
  3402.                        <tr ID=\"entry$ind\" class=\"entryUnselected\" onmouseover=\"selectEntry(this, 'over');\" onmousedown=\"selectEntry(this, 'click');\">
  3403.                        <td><nobr><a href=\"JavaScript:download('".addslashes($file)."')\">$file</a></nobr></td>";
  3404.                     $file_out[$file_count][] = "<td>".$dir_entry["p"]."</td>";
  3405.                     if ($islinux) {
  3406.                         $file_out[$file_count][] = "<td><nobr>".$dir_entry["u"]."</nobr></td>";
  3407.                         $file_out[$file_count][] = "<td><nobr>".$dir_entry["g"]."</nobr></td>";
  3408.                     }
  3409.                     $file_out[$file_count][] = "<td><nobr>".$dir_entry["sizet"]."</nobr></td>";
  3410.                     $file_out[$file_count][] = "<td><nobr>".$dir_entry["datet"]."</nobr></td>";
  3411.                     $file_out[$file_count][] = "<td>".$dir_entry["extt"]."</td>";
  3412.                     // Opções de arquivo
  3413.                     if ( is_writable($current_dir.$file) ) $file_out[$file_count][] = "
  3414.                                <td align=center><a href=\"javascript:if(confirm('".uppercase(et('Rem'))." \\'".addslashes($file)."\\' ?')) document.location.href='".addslashes($path_info["basename"])."?frame=3&action=8&cmd_arg=".addslashes($file)."&current_dir=".addslashes($current_dir)."'\">".et('Rem')."</a>";
  3415.                     else $file_out[$file_count][] = "<td>&nbsp;</td>";
  3416.                     if ( is_writable($current_dir.$file) ) $file_out[$file_count][] = "
  3417.                                <td align=center><a href=\"javascript:rename('".addslashes($file)."')\">".et('Ren')."</a>";
  3418.                     else $file_out[$file_count][] = "<td>&nbsp;</td>";
  3419.                     if ( is_readable($current_dir.$file) && (strpos(".wav#.mp3#.mid#.avi#.mov#.mpeg#.mpg#.rm#.iso#.bin#.img#.dll#.psd#.fla#.swf#.class#.ppt#.tif#.tiff#.pcx#.jpg#.gif#.png#.wmf#.eps#.bmp#.msi#.exe#.com#.rar#.tar#.zip#.bz2#.tbz2#.bz#.tbz#.bzip#.gzip#.gz#.tgz#", $dir_entry["ext"]."#" ) === false)) $file_out[$file_count][] = "
  3420.                                <td align=center><a href=\"javascript:edit_file('".addslashes($file)."')\">".et('Edit')."</a>";
  3421.                     else $file_out[$file_count][] = "<td>&nbsp;</td>";
  3422.                     if ( is_readable($current_dir.$file) && (strpos(".txt#.sys#.bat#.ini#.conf#.swf#.php#.php3#.asp#.html#.htm#.jpg#.gif#.png#.bmp#", $dir_entry["ext"]."#" ) !== false)) $file_out[$file_count][] = "
  3423.                                <td align=center><a href=\"javascript:view('".addslashes($file)."');\">".et('View')."</a>";
  3424.                     else $file_out[$file_count][] = "<td>&nbsp;</td>";
  3425.                     if ( is_readable($current_dir.$file) && strlen($dir_entry["ext"]) && (strpos(".tar#.zip#.bz2#.tbz2#.bz#.tbz#.bzip#.gzip#.gz#.tgz#", $dir_entry["ext"]."#" ) !== false)) $file_out[$file_count][] = "
  3426.                                <td align=center><a href=\"javascript:decompress('".addslashes($file)."')\">".et('Decompress')."</a>";
  3427.                     else $file_out[$file_count][] = "<td>&nbsp;</td>";
  3428.                     if ( is_readable($current_dir.$file) && strlen($dir_entry["ext"]) && (strpos(".exe#.com#.sh#.bat#", $dir_entry["ext"]."#" ) !== false)) $file_out[$file_count][] = "
  3429.                                <td align=center><a href=\"javascript:execute_file('".addslashes($file)."')\">".et('Exec')."</a>";
  3430.                     else $file_out[$file_count][] = "<td>&nbsp;</td>";
  3431.                     if (count($file_out[$file_count])>$max_opt){
  3432.                         $max_opt = count($file_out[$file_count]);
  3433.                     }
  3434.                     $file_count++;
  3435.                 }
  3436.             }
  3437.             if ($dir_count){
  3438.                 $out .= "
  3439.                <tr>
  3440.                      <td bgcolor=\"#DDDDDD\"><nobr><a href=\"".$path_info["basename"]."?frame=3&or_by=$or1&current_dir=$current_dir\">".et('Name')."</a></nobr></td>
  3441.                      <td bgcolor=\"#DDDDDD\"><nobr><a href=\"".$path_info["basename"]."?frame=3&or_by=$or2&current_dir=$current_dir\">".et('Perm')."</a></nobr></td>";
  3442.                 if ($islinux) $out .= "
  3443.                      <td bgcolor=\"#DDDDDD\"><nobr><a href=\"".$path_info["basename"]."?frame=3&or_by=$or3&current_dir=$current_dir\">".et('Owner')."</a></td>
  3444.                      <td bgcolor=\"#DDDDDD\"><nobr><a href=\"".$path_info["basename"]."?frame=3&or_by=$or4&current_dir=$current_dir\">".et('Group')."</a></nobr></td>";
  3445.                 $out .= "
  3446.                      <td bgcolor=\"#DDDDDD\"><nobr><a href=\"".$path_info["basename"]."?frame=3&or_by=$or5&current_dir=$current_dir\">".et('Size')."</a></nobr></td>
  3447.                      <td bgcolor=\"#DDDDDD\"><nobr><a href=\"".$path_info["basename"]."?frame=3&or_by=$or6&current_dir=$current_dir\">".et('Date')."</a></nobr></td>";
  3448.                 if ($file_count) $out .= "
  3449.                      <td bgcolor=\"#DDDDDD\"><nobr><a href=\"".$path_info["basename"]."?frame=3&or_by=$or7&current_dir=$current_dir\">".et('Type')."</a></nobr></td>";
  3450.                 $out .= "
  3451.                      <td bgcolor=\"#DDDDDD\" colspan=50>&nbsp;</td>
  3452.                </tr>";
  3453.  
  3454.             }
  3455.             foreach($dir_out as $k=>$v){
  3456.                 while (count($dir_out[$k])<$max_opt) {
  3457.                     $dir_out[$k][] = "<td>&nbsp;</td>";
  3458.                 }
  3459.                 $out .= implode($dir_out[$k]);
  3460.                 $out .= "</tr>";
  3461.             }
  3462.             if ($file_count){
  3463.                 $out .= "
  3464.                <tr>
  3465.                      <td bgcolor=\"#DDDDDD\"><nobr><a href=\"".$path_info["basename"]."?frame=3&or_by=$or1&current_dir=$current_dir\">".et('Name')."</a></nobr></td>
  3466.                      <td bgcolor=\"#DDDDDD\"><nobr><a href=\"".$path_info["basename"]."?frame=3&or_by=$or2&current_dir=$current_dir\">".et('Perm')."</a></nobr></td>";
  3467.                 if ($islinux) $out .= "
  3468.                      <td bgcolor=\"#DDDDDD\"><nobr><a href=\"".$path_info["basename"]."?frame=3&or_by=$or3&current_dir=$current_dir\">".et('Owner')."</a></td>
  3469.                      <td bgcolor=\"#DDDDDD\"><nobr><a href=\"".$path_info["basename"]."?frame=3&or_by=$or4&current_dir=$current_dir\">".et('Group')."</a></nobr></td>";
  3470.                 $out .= "
  3471.                      <td bgcolor=\"#DDDDDD\"><nobr><a href=\"".$path_info["basename"]."?frame=3&or_by=$or5&current_dir=$current_dir\">".et('Size')."</a></nobr></td>
  3472.                      <td bgcolor=\"#DDDDDD\"><nobr><a href=\"".$path_info["basename"]."?frame=3&or_by=$or6&current_dir=$current_dir\">".et('Date')."</a></nobr></td>
  3473.                      <td bgcolor=\"#DDDDDD\"><nobr><a href=\"".$path_info["basename"]."?frame=3&or_by=$or7&current_dir=$current_dir\">".et('Type')."</a></nobr></td>
  3474.                      <td bgcolor=\"#DDDDDD\" colspan=50>&nbsp;</td>
  3475.                </tr>";
  3476.  
  3477.             }
  3478.             foreach($file_out as $k=>$v){
  3479.                 while (count($file_out[$k])<$max_opt) {
  3480.                     $file_out[$k][] = "<td>&nbsp;</td>";
  3481.                 }
  3482.                 $out .= implode($file_out[$k]);
  3483.                 $out .= "</tr>";
  3484.             }
  3485.             $out .= "
  3486.                <tr>
  3487.                <td bgcolor=\"#DDDDDD\" colspan=50><nobr>
  3488.                      <input type=\"button\" style=\"width:80\" onclick=\"selectANI(this)\" id=\"ANI1\" value=\"".et('SelAll')."\">
  3489.                      <input type=\"button\" style=\"width:80\" onclick=\"selectANI(this)\" value=\"".et('SelInverse')."\">
  3490.                      <input type=\"button\" style=\"width:80\" onclick=\"test(4)\" value=\"".et('Rem')."\">
  3491.                      <input type=\"button\" style=\"width:80\" onclick=\"sel_dir(5)\" value=\"".et('Copy')."\">
  3492.                      <input type=\"button\" style=\"width:80\" onclick=\"sel_dir(6)\" value=\"".et('Move')."\">
  3493.                      <input type=\"button\" style=\"width:100\" onclick=\"test_prompt(71)\" value=\"".et('Compress')."\">";
  3494.             if ($islinux) $out .= "
  3495.                      <input type=\"button\" style=\"width:100\" onclick=\"resolveIDs()\" value=\"".et('ResolveIDs')."\">";
  3496.             $out .= "
  3497.                      <input type=\"button\" style=\"width:100\" onclick=\"chmod_form()\" value=\"".et('Perms')."\">";
  3498.             $out .= "
  3499.                </nobr></td>
  3500.                </tr>";
  3501.             $out .= "
  3502.            </form>";
  3503.             $out .= "
  3504.                <tr><td bgcolor=\"#DDDDDD\" colspan=50><b>$dir_count ".et('Dir_s')." ".et('And')." $file_count ".et('File_s')." = ".format_size($total_size)."</td></tr>";
  3505.             if ($quota_mb) {
  3506.                 $out .= "
  3507.                <tr><td bgcolor=\"#DDDDDD\" colspan=50><b>".et('Partition').": ".format_size(($quota_mb*1024*1024))." ".et('Total')." - ".format_size(($quota_mb*1024*1024)-total_size($fm_current_root))." ".et('Free')."</td></tr>";
  3508.             } else {
  3509.                 $out .= "
  3510.                <tr><td bgcolor=\"#DDDDDD\" colspan=50><b>".et('Partition').": ".format_size(disk_total_space($current_dir))." ".et('Total')." - ".format_size(disk_free_space($current_dir))." ".et('Free')."</td></tr>";
  3511.             }
  3512.             $tf = getmicrotime();
  3513.             $tt = ($tf - $ti);
  3514.             $out .= "
  3515.                <tr><td bgcolor=\"#DDDDDD\" colspan=50><b>".et('RenderTime').": ".substr($tt,0,strrpos($tt,".")+5)." ".et('Seconds')."</td></tr>";
  3516.             $out .= "
  3517.            <script language=\"Javascript\" type=\"text/javascript\">
  3518.            <!--
  3519.                update_sel_status();
  3520.            //-->
  3521.            </script>";
  3522.         } else {
  3523.             $out .= "
  3524.            <tr>
  3525.            <td bgcolor=\"#DDDDDD\" width=\"1%\">$uplink<td bgcolor=\"#DDDDDD\" colspan=50><nobr><a href=\"".$path_info["basename"]."?frame=3&current_dir=$current_dir\">$current_dir</a></nobr>
  3526.            <tr><td bgcolor=\"#DDDDDD\" colspan=50>".et('EmptyDir').".</tr>";
  3527.         }
  3528.     } else $out .= "<tr><td><font color=red>".et('IOError').".<br>$current_dir</font>";
  3529.     $out .= "</table>";
  3530.     echo $out;
  3531. }
  3532. function upload_form(){
  3533.     global $_FILES,$current_dir,$dir_dest,$fechar,$quota_mb,$path_info;
  3534.     $num_uploads = 5;
  3535.     html_header();
  3536.     echo "<body marginwidth=\"0\" marginheight=\"0\">";
  3537.     if (count($_FILES)==0){
  3538.         echo "
  3539.        <table height=\"100%\" border=0 cellspacing=0 cellpadding=2 align=center>
  3540.        <form name=\"upload_form\" action=\"".$path_info["basename"]."\" method=\"post\" ENCTYPE=\"multipart/form-data\">
  3541.        <input type=hidden name=dir_dest value=\"$current_dir\">
  3542.        <input type=hidden name=action value=10>
  3543.        <tr><th colspan=2>".et('Upload')."</th></tr>
  3544.        <tr><td align=right><b>".et('Destination').":<td><b><nobr>$current_dir</nobr>";
  3545.         for ($x=0;$x<$num_uploads;$x++){
  3546.             echo "<tr><td width=1 align=right><b>".et('File').":<td><nobr><input type=\"file\" name=\"file$x\"></nobr>";
  3547.             $test_js .= "(document.upload_form.file$x.value.length>0)||";
  3548.         }
  3549.         echo "
  3550.        <input type=button value=\"".et('Send')."\" onclick=\"test_upload_form()\"></nobr>
  3551.        <tr><td> <td><input type=checkbox name=fechar value=\"1\"> <a href=\"JavaScript:troca();\">".et('AutoClose')."</a>
  3552.        <tr><td colspan=2> </td></tr>
  3553.        </form>
  3554.        </table>
  3555.        <script language=\"Javascript\" type=\"text/javascript\">
  3556.        <!--
  3557.            function troca(){
  3558.                if(document.upload_form.fechar.checked){document.upload_form.fechar.checked=false;}else{document.upload_form.fechar.checked=true;}
  3559.            }
  3560.            foi = false;
  3561.            function test_upload_form(){
  3562.                if(".substr($test_js,0,strlen($test_js)-2)."){
  3563.                    if (foi) alert('".et('SendingForm')."...');
  3564.                    else {
  3565.                        foi = true;
  3566.                        document.upload_form.submit();
  3567.                    }
  3568.                } else alert('".et('NoFileSel').".');
  3569.            }
  3570.            window.moveTo((window.screen.width-400)/2,((window.screen.height-200)/2)-20);
  3571.        //-->
  3572.        </script>";
  3573.     } else {
  3574.         $out = "<tr><th colspan=2>".et('UploadEnd')."</th></tr>
  3575.                <tr><th colspan=2><nobr>".et('Destination').": $dir_dest</nobr>";
  3576.         for ($x=0;$x<$num_uploads;$x++){
  3577.             $temp_file = $_FILES["file".$x]["tmp_name"];
  3578.             $filename = $_FILES["file".$x]["name"];
  3579.             if (strlen($filename)) $resul = save_upload($temp_file,$filename,$dir_dest);
  3580.             else $resul = 7;
  3581.             switch($resul){
  3582.                 case 1:
  3583.                 $out .= "<tr><td><b>".str_zero($x+1,3).".<font color=green><b> ".et('FileSent').":</font><td>".$filename."</td></tr>\n";
  3584.                 break;
  3585.                 case 2:
  3586.                 $out .= "<tr><td colspan=2><font color=red><b>".et('IOError')."</font></td></tr>\n";
  3587.                 $x = $upload_num;
  3588.                 break;
  3589.                 case 3:
  3590.                 $out .= "<tr><td colspan=2><font color=red><b>".et('SpaceLimReached')." ($quota_mb Mb)</font></td></tr>\n";
  3591.                 $x = $upload_num;
  3592.                 break;
  3593.                 case 4:
  3594.                 $out .= "<tr><td><b>".str_zero($x+1,3).".<font color=red><b> ".et('InvExt').":</font><td>".$filename."</td></tr>\n";
  3595.                 break;
  3596.                 case 5:
  3597.                 $out .= "<tr><td><b>".str_zero($x+1,3).".<font color=red><b> ".et('FileNoOverw')."</font><td>".$filename."</td></tr>\n";
  3598.                 break;
  3599.                 case 6:
  3600.                 $out .= "<tr><td><b>".str_zero($x+1,3).".<font color=green><b> ".et('FileOverw').":</font><td>".$filename."</td></tr>\n";
  3601.                 break;
  3602.                 case 7:
  3603.                 $out .= "<tr><td colspan=2><b>".str_zero($x+1,3).".<font color=red><b> ".et('FileIgnored')."</font></td></tr>\n";
  3604.             }
  3605.         }
  3606.         if ($fechar) {
  3607.             echo "
  3608.            <script language=\"Javascript\" type=\"text/javascript\">
  3609.            <!--
  3610.                window.close();
  3611.            //-->
  3612.            </script>
  3613.            ";
  3614.         } else {
  3615.             echo "
  3616.            <table height=\"100%\" border=0 cellspacing=0 cellpadding=2 align=center>
  3617.            $out
  3618.            <tr><td colspan=2> </td></tr>
  3619.            </table>
  3620.            <script language=\"Javascript\" type=\"text/javascript\">
  3621.            <!--
  3622.                window.focus();
  3623.            //-->
  3624.            </script>
  3625.            ";
  3626.         }
  3627.     }
  3628.     echo "</body>\n</html>";
  3629. }
  3630. function chmod_form(){
  3631.     html_header("
  3632.    <script language=\"Javascript\" type=\"text/javascript\">
  3633.    <!--
  3634.    function octalchange()
  3635.    {
  3636.        var val = document.chmod_form.t_total.value;
  3637.        var stickybin = parseInt(val.charAt(0)).toString(2);
  3638.        var ownerbin = parseInt(val.charAt(1)).toString(2);
  3639.        while (ownerbin.length<3) { ownerbin=\"0\"+ownerbin; };
  3640.        var groupbin = parseInt(val.charAt(2)).toString(2);
  3641.        while (groupbin.length<3) { groupbin=\"0\"+groupbin; };
  3642.        var otherbin = parseInt(val.charAt(3)).toString(2);
  3643.        while (otherbin.length<3) { otherbin=\"0\"+otherbin; };
  3644.        document.chmod_form.sticky.checked = parseInt(stickybin.charAt(0));
  3645.        document.chmod_form.owner4.checked = parseInt(ownerbin.charAt(0));
  3646.        document.chmod_form.owner2.checked = parseInt(ownerbin.charAt(1));
  3647.        document.chmod_form.owner1.checked = parseInt(ownerbin.charAt(2));
  3648.        document.chmod_form.group4.checked = parseInt(groupbin.charAt(0));
  3649.        document.chmod_form.group2.checked = parseInt(groupbin.charAt(1));
  3650.        document.chmod_form.group1.checked = parseInt(groupbin.charAt(2));
  3651.        document.chmod_form.other4.checked = parseInt(otherbin.charAt(0));
  3652.        document.chmod_form.other2.checked = parseInt(otherbin.charAt(1));
  3653.        document.chmod_form.other1.checked = parseInt(otherbin.charAt(2));
  3654.        calc_chmod(1);
  3655.    };
  3656.  
  3657.    function calc_chmod(nototals)
  3658.    {
  3659.      var users = new Array(\"owner\", \"group\", \"other\");
  3660.      var totals = new Array(\"\",\"\",\"\");
  3661.      var syms = new Array(\"\",\"\",\"\");
  3662.  
  3663.        for (var i=0; i<users.length; i++)
  3664.        {
  3665.            var user=users[i];
  3666.            var field4 = user + \"4\";
  3667.            var field2 = user + \"2\";
  3668.            var field1 = user + \"1\";
  3669.            var symbolic = \"sym_\" + user;
  3670.            var number = 0;
  3671.            var sym_string = \"\";
  3672.            var sticky = \"0\";
  3673.            var sticky_sym = \" \";
  3674.            if (document.chmod_form.sticky.checked){
  3675.                sticky = \"1\";
  3676.                sticky_sym = \"t\";
  3677.            }
  3678.            if (document.chmod_form[field4].checked == true) { number += 4; }
  3679.            if (document.chmod_form[field2].checked == true) { number += 2; }
  3680.            if (document.chmod_form[field1].checked == true) { number += 1; }
  3681.  
  3682.            if (document.chmod_form[field4].checked == true) {
  3683.                sym_string += \"r\";
  3684.            } else {
  3685.                sym_string += \"-\";
  3686.            }
  3687.            if (document.chmod_form[field2].checked == true) {
  3688.                sym_string += \"w\";
  3689.            } else {
  3690.                sym_string += \"-\";
  3691.            }
  3692.            if (document.chmod_form[field1].checked == true) {
  3693.                sym_string += \"x\";
  3694.            } else {
  3695.                sym_string += \"-\";
  3696.            }
  3697.  
  3698.            totals[i] = totals[i]+number;
  3699.            syms[i] =  syms[i]+sym_string;
  3700.  
  3701.      };
  3702.        if (!nototals) document.chmod_form.t_total.value = sticky + totals[0] + totals[1] + totals[2];
  3703.        document.chmod_form.sym_total.value = syms[0] + syms[1] + syms[2] + sticky_sym;
  3704.    }
  3705.    function sticky_change(){
  3706.        document.chmod_form.sticky.checked = !(document.chmod_form.sticky.checked);
  3707.    }
  3708.     function apply_chmod(){
  3709.        if (confirm('".et('AlterPermTo')." \\' '+document.chmod_form.t_total.value+' \\' ?\\n')){
  3710.            window.opener.set_chmod_arg(document.chmod_form.t_total.value);
  3711.             window.close();
  3712.         }
  3713.     }
  3714.  
  3715.    window.onload=octalchange
  3716.    window.moveTo((window.screen.width-400)/2,((window.screen.height-200)/2)-20);
  3717.    //-->
  3718.    </script>");
  3719.     echo "<body marginwidth=\"0\" marginheight=\"0\">
  3720.    <form name=\"chmod_form\">
  3721.    <TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"4\" ALIGN=CENTER>
  3722.    <tr><th colspan=4>".et('Perms')."</th></tr>
  3723.    <TR ALIGN=\"LEFT\" VALIGN=\"MIDDLE\">
  3724.    <TD><input type=\"text\" name=\"t_total\" value=\"0755\" size=\"4\" onKeyUp=\"octalchange()\"> </TD>
  3725.    <TD><input type=\"text\" name=\"sym_total\" value=\"\" size=\"12\" READONLY=\"1\"></TD>
  3726.    </TR>
  3727.    </TABLE>
  3728.    <table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" ALIGN=CENTER>
  3729.    <tr bgcolor=\"#333333\">
  3730.    <td WIDTH=\"60\" align=\"left\"> </td>
  3731.    <td WIDTH=\"55\" align=\"center\" style=\"color:#FFFFFF\"><b>".et('Owner')."
  3732.    </b></td>
  3733.    <td WIDTH=\"55\" align=\"center\" style=\"color:#FFFFFF\"><b>".et('Group')."
  3734.    </b></td>
  3735.    <td WIDTH=\"55\" align=\"center\" style=\"color:#FFFFFF\"><b>".et('Other')."
  3736.    <b></td>
  3737.    </tr>
  3738.    <tr bgcolor=\"#DDDDDD\">
  3739.    <td WIDTH=\"60\" align=\"left\" nowrap BGCOLOR=\"#FFFFFF\">".et('Read')."</td>
  3740.    <td WIDTH=\"55\" align=\"center\" bgcolor=\"#EEEEEE\">
  3741.    <input type=\"checkbox\" name=\"owner4\" value=\"4\" onclick=\"calc_chmod()\">
  3742.    </td>
  3743.    <td WIDTH=\"55\" align=\"center\" bgcolor=\"#FFFFFF\"><input type=\"checkbox\" name=\"group4\" value=\"4\" onclick=\"calc_chmod()\">
  3744.    </td>
  3745.    <td WIDTH=\"55\" align=\"center\" bgcolor=\"#EEEEEE\">
  3746.    <input type=\"checkbox\" name=\"other4\" value=\"4\" onclick=\"calc_chmod()\">
  3747.    </td>
  3748.    </tr>
  3749.    <tr bgcolor=\"#DDDDDD\">
  3750.    <td WIDTH=\"60\" align=\"left\" nowrap BGCOLOR=\"#FFFFFF\">".et('Write')."</td>
  3751.    <td WIDTH=\"55\" align=\"center\" bgcolor=\"#EEEEEE\">
  3752.    <input type=\"checkbox\" name=\"owner2\" value=\"2\" onclick=\"calc_chmod()\"></td>
  3753.    <td WIDTH=\"55\" align=\"center\" bgcolor=\"#FFFFFF\"><input type=\"checkbox\" name=\"group2\" value=\"2\" onclick=\"calc_chmod()\">
  3754.    </td>
  3755.    <td WIDTH=\"55\" align=\"center\" bgcolor=\"#EEEEEE\">
  3756.    <input type=\"checkbox\" name=\"other2\" value=\"2\" onclick=\"calc_chmod()\">
  3757.    </td>
  3758.    </tr>
  3759.    <tr bgcolor=\"#DDDDDD\">
  3760.    <td WIDTH=\"60\" align=\"left\" nowrap BGCOLOR=\"#FFFFFF\">".et('Exec')."</td>
  3761.    <td WIDTH=\"55\" align=\"center\" bgcolor=\"#EEEEEE\">
  3762.    <input type=\"checkbox\" name=\"owner1\" value=\"1\" onclick=\"calc_chmod()\">
  3763.    </td>
  3764.    <td WIDTH=\"55\" align=\"center\" bgcolor=\"#FFFFFF\"><input type=\"checkbox\" name=\"group1\" value=\"1\" onclick=\"calc_chmod()\">
  3765.    </td>
  3766.    <td WIDTH=\"55\" align=\"center\" bgcolor=\"#EEEEEE\">
  3767.    <input type=\"checkbox\" name=\"other1\" value=\"1\" onclick=\"calc_chmod()\">
  3768.    </td>
  3769.    </tr>
  3770.    </TABLE>
  3771.    <TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"4\" ALIGN=CENTER>
  3772.    <tr><td colspan=2><input type=checkbox name=sticky value=\"1\" onclick=\"calc_chmod()\"> <a href=\"JavaScript:sticky_change();\">".et('StickyBit')."</a><td colspan=2 align=right><input type=button value=\"".et('Apply')."\" onClick=\"apply_chmod()\"></tr>
  3773.    </table>
  3774.    </form>
  3775.    </body>\n</html>";
  3776. }
  3777. function get_mime_type($ext = ''){
  3778.     $mimes = array(
  3779.       'hqx'   =>  'application/mac-binhex40',
  3780.       'cpt'   =>  'application/mac-compactpro',
  3781.       'doc'   =>  'application/msword',
  3782.       'bin'   =>  'application/macbinary',
  3783.       'dms'   =>  'application/octet-stream',
  3784.       'lha'   =>  'application/octet-stream',
  3785.       'lzh'   =>  'application/octet-stream',
  3786.       'exe'   =>  'application/octet-stream',
  3787.       'class' =>  'application/octet-stream',
  3788.       'psd'   =>  'application/octet-stream',
  3789.       'so'    =>  'application/octet-stream',
  3790.       'sea'   =>  'application/octet-stream',
  3791.       'dll'   =>  'application/octet-stream',
  3792.       'oda'   =>  'application/oda',
  3793.       'pdf'   =>  'application/pdf',
  3794.       'ai'    =>  'application/postscript',
  3795.       'eps'   =>  'application/postscript',
  3796.       'ps'    =>  'application/postscript',
  3797.       'smi'   =>  'application/smil',
  3798.       'smil'  =>  'application/smil',
  3799.       'mif'   =>  'application/vnd.mif',
  3800.       'xls'   =>  'application/vnd.ms-excel',
  3801.       'ppt'   =>  'application/vnd.ms-powerpoint',
  3802.       'pptx'  =>  'application/vnd.ms-powerpoint',
  3803.       'wbxml' =>  'application/vnd.wap.wbxml',
  3804.       'wmlc'  =>  'application/vnd.wap.wmlc',
  3805.       'dcr'   =>  'application/x-director',
  3806.       'dir'   =>  'application/x-director',
  3807.       'dxr'   =>  'application/x-director',
  3808.       'dvi'   =>  'application/x-dvi',
  3809.       'gtar'  =>  'application/x-gtar',
  3810.       'php'   =>  'application/x-httpd-php',
  3811.       'php4'  =>  'application/x-httpd-php',
  3812.       'php3'  =>  'application/x-httpd-php',
  3813.       'phtml' =>  'application/x-httpd-php',
  3814.       'phps'  =>  'application/x-httpd-php-source',
  3815.       'js'    =>  'application/x-javascript',
  3816.       'swf'   =>  'application/x-shockwave-flash',
  3817.       'sit'   =>  'application/x-stuffit',
  3818.       'tar'   =>  'application/x-tar',
  3819.       'tgz'   =>  'application/x-tar',
  3820.       'xhtml' =>  'application/xhtml+xml',
  3821.       'xht'   =>  'application/xhtml+xml',
  3822.       'zip'   =>  'application/zip',
  3823.       'mid'   =>  'audio/midi',
  3824.       'midi'  =>  'audio/midi',
  3825.       'mpga'  =>  'audio/mpeg',
  3826.       'mp2'   =>  'audio/mpeg',
  3827.       'mp3'   =>  'audio/mpeg',
  3828.       'aif'   =>  'audio/x-aiff',
  3829.       'aiff'  =>  'audio/x-aiff',
  3830.       'aifc'  =>  'audio/x-aiff',
  3831.       'ram'   =>  'audio/x-pn-realaudio',
  3832.       'rm'    =>  'audio/x-pn-realaudio',
  3833.       'rpm'   =>  'audio/x-pn-realaudio-plugin',
  3834.       'ra'    =>  'audio/x-realaudio',
  3835.       'rv'    =>  'video/vnd.rn-realvideo',
  3836.       'wav'   =>  'audio/x-wav',
  3837.       'bmp'   =>  'image/bmp',
  3838.       'gif'   =>  'image/gif',
  3839.       'jpeg'  =>  'image/jpeg',
  3840.       'jpg'   =>  'image/jpeg',
  3841.       'jpe'   =>  'image/jpeg',
  3842.       'png'   =>  'image/png',
  3843.       'tiff'  =>  'image/tiff',
  3844.       'tif'   =>  'image/tiff',
  3845.       'css'   =>  'text/css',
  3846.       'html'  =>  'text/html',
  3847.       'htm'   =>  'text/html',
  3848.       'shtml' =>  'text/html',
  3849.       'txt'   =>  'text/plain',
  3850.       'text'  =>  'text/plain',
  3851.       'log'   =>  'text/plain',
  3852.       'rtx'   =>  'text/richtext',
  3853.       'rtf'   =>  'text/rtf',
  3854.       'xml'   =>  'text/xml',
  3855.       'xsl'   =>  'text/xml',
  3856.       'mpeg'  =>  'video/mpeg',
  3857.       'mpg'   =>  'video/mpeg',
  3858.       'mpe'   =>  'video/mpeg',
  3859.       'qt'    =>  'video/quicktime',
  3860.       'mov'   =>  'video/quicktime',
  3861.       'avi'   =>  'video/x-msvideo',
  3862.       'movie' =>  'video/x-sgi-movie',
  3863.       'doc'   =>  'application/msword',
  3864.       'docx'  =>  'application/msword',
  3865.       'word'  =>  'application/msword',
  3866.       'xl'    =>  'application/excel',
  3867.       'xls'   =>  'application/excel',
  3868.       'xlsx'  =>  'application/excel',
  3869.       'eml'   =>  'message/rfc822'
  3870.     );
  3871.     return (!isset($mimes[lowercase($ext)])) ? 'application/octet-stream' : $mimes[lowercase($ext)];
  3872. }
  3873. function view(){
  3874.     global $doc_root,$path_info,$url_info,$current_dir,$islinux,$filename,$passthru;
  3875.     if (intval($passthru)){
  3876.         $file = $current_dir.$filename;
  3877.         if(file_exists($file)){
  3878.             $is_denied = false;
  3879.             foreach($download_ext_filter as $key=>$ext){
  3880.                 if (eregi($ext,$filename)){
  3881.                     $is_denied = true;
  3882.                     break;
  3883.                 }
  3884.             }
  3885.             if (!$is_denied){
  3886.                 if ($fh = fopen("$file", "rb")){
  3887.                     fclose($fh);
  3888.                     $ext = pathinfo($file, PATHINFO_EXTENSION);
  3889.                     $ctype = get_mime_type($ext);
  3890.                     if ($ctype == "application/octet-stream") $ctype = "text/plain";
  3891.                     header("Pragma: public");
  3892.                     header("Expires: 0");
  3893.                     header("Connection: close");
  3894.                     header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
  3895.                     header("Cache-Control: public");
  3896.                     header("Content-Description: File Transfer");
  3897.                     header("Content-Type: ".$ctype);
  3898.                     header("Content-Disposition: inline; filename=\"".pathinfo($file, PATHINFO_BASENAME)."\";");
  3899.                     header("Content-Transfer-Encoding: binary");
  3900.                     header("Content-Length: ".filesize($file));
  3901.                     @readfile($file);
  3902.                     exit();
  3903.                 } else alert(et('ReadDenied').": ".$file);
  3904.             } else alert(et('ReadDenied').": ".$file);
  3905.         } else alert(et('FileNotFound').": ".$file);
  3906.         echo "
  3907.         <script language=\"Javascript\" type=\"text/javascript\">
  3908.         <!--
  3909.             window.close();
  3910.         //-->
  3911.         </script>";
  3912.     } else {
  3913.         html_header();
  3914.         echo "<body marginwidth=\"0\" marginheight=\"0\">";
  3915.         $is_reachable_thru_webserver = (stristr($current_dir,$doc_root)!==false);
  3916.         if ($is_reachable_thru_webserver){
  3917.             $url = $url_info["scheme"]."://".$url_info["host"];
  3918.             if (strlen($url_info["port"])) $url .= ":".$url_info["port"];
  3919.             // Malditas variaveis de sistema!! No windows doc_root é sempre em lowercase... cadê o str_ireplace() ??
  3920.             $url .= str_replace($doc_root,"","/".$current_dir).$filename;
  3921.         } else {
  3922.             $url = addslashes($path_info["basename"])."?action=4&current_dir=".addslashes($current_dir)."&filename=".addslashes($filename)."&passthru=1";
  3923.         }
  3924.         echo "
  3925.         <script language=\"Javascript\" type=\"text/javascript\">
  3926.         <!--
  3927.             window.moveTo((window.screen.width-800)/2,((window.screen.height-600)/2)-20);
  3928.             document.location.href='$url';
  3929.         //-->
  3930.         </script>
  3931.         </body>\n</html>";
  3932.     }
  3933. }
  3934. function edit_file_form(){
  3935.     global $current_dir,$filename,$file_data,$save_file,$path_info;
  3936.     $file = $current_dir.$filename;
  3937.     if ($save_file){
  3938.         $fh=fopen($file,"w");
  3939.         fputs($fh,$file_data,strlen($file_data));
  3940.         fclose($fh);
  3941.     }
  3942.     $fh=fopen($file,"r");
  3943.     $file_data=fread($fh, filesize($file));
  3944.     fclose($fh);
  3945.     html_header();
  3946.     echo "<body marginwidth=\"0\" marginheight=\"0\">
  3947.    <table border=0 cellspacing=0 cellpadding=5 align=center>
  3948.    <form name=\"edit_form\" action=\"".$path_info["basename"]."\" method=\"post\">
  3949.    <input type=hidden name=action value=\"7\">
  3950.    <input type=hidden name=save_file value=\"1\">
  3951.    <input type=hidden name=current_dir value=\"$current_dir\">
  3952.    <input type=hidden name=filename value=\"$filename\">
  3953.    <tr><th colspan=2>".$file."</th></tr>
  3954.    <tr><td colspan=2><textarea name=file_data style='width:1000px;height:680px;'>".html_encode($file_data)."</textarea></td></tr>
  3955.    <tr><td><input type=button value=\"".et('Refresh')."\" onclick=\"document.edit_form_refresh.submit()\"></td><td align=right><input type=button value=\"".et('SaveFile')."\" onclick=\"go_save()\"></td></tr>
  3956.    </form>
  3957.    <form name=\"edit_form_refresh\" action=\"".$path_info["basename"]."\" method=\"post\">
  3958.    <input type=hidden name=action value=\"7\">
  3959.    <input type=hidden name=current_dir value=\"$current_dir\">
  3960.    <input type=hidden name=filename value=\"$filename\">
  3961.    </form>
  3962.    </table>
  3963.    <script language=\"Javascript\" type=\"text/javascript\">
  3964.    <!--
  3965.        window.moveTo((window.screen.width-1024)/2,((window.screen.height-728)/2)-20);
  3966.        function go_save(){";
  3967.     if (is_writable($file)) {
  3968.         echo "
  3969.        document.edit_form.submit();";
  3970.     } else {
  3971.         echo "
  3972.        if(confirm('".et('ConfTrySave')." ?')) document.edit_form.submit();";
  3973.     }
  3974.     echo "
  3975.        }
  3976.    //-->
  3977.    </script>
  3978.    </body>\n</html>";
  3979. }
  3980. function config_form(){
  3981.     global $cfg;
  3982.     global $current_dir,$fm_self,$doc_root,$path_info,$fm_current_root,$lang,$error_reporting,$version;
  3983.     global $config_action,$newpass,$newlang,$newerror,$newfm_root;
  3984.     $Warning = "";
  3985.     switch ($config_action){
  3986.         case 1:
  3987.             if ($fh = fopen("http://phpfm.sf.net/latest.php","r")){
  3988.                 $data = "";
  3989.                 while (!feof($fh)) $data .= fread($fh,1024);
  3990.                 fclose($fh);
  3991.                 $data = unserialize($data);
  3992.                 $ChkVerWarning = "<tr><td align=right> ";
  3993.                 if (is_array($data)&&count($data)){
  3994.                     $ChkVerWarning .= "<a href=\"JavaScript:open_win('http://sourceforge.net')\">
  3995.                    <img src=\"http://sourceforge.net/sflogo.php?group_id=114392&type=1\" width=\"88\" height=\"31\" style=\"border: 1px solid #AAAAAA\" alt=\"SourceForge.net Logo\" />
  3996.                     </a>";
  3997.                     if (str_replace(".","",$data['version'])>str_replace(".","",$cfg->data['version'])) $ChkVerWarning .= "<td><a href=\"JavaScript:open_win('http://prdownloads.sourceforge.net/phpfm/phpFileManager-".$data['version'].".zip?download')\"><font color=green>".et('ChkVerAvailable')."</font></a>";
  3998.                     else $ChkVerWarning .= "<td><font color=red>".et('ChkVerNotAvailable')."</font>";
  3999.                 } else $ChkVerWarning .= "<td><font color=red>".et('ChkVerError')."</font>";
  4000.             } else $ChkVerWarning .= "<td><font color=red>".et('ChkVerError')."</font>";
  4001.         break;
  4002.         case 2:
  4003.             $reload = false;
  4004.             if ($cfg->data['lang'] != $newlang){
  4005.                 $cfg->data['lang'] = $newlang;
  4006.                 $lang = $newlang;
  4007.                 $reload = true;
  4008.             }
  4009.             if ($cfg->data['error_reporting'] != $newerror){
  4010.                 $cfg->data['error_reporting'] = $newerror;
  4011.                 $error_reporting = $newerror;
  4012.                 $reload = true;
  4013.             }
  4014.             $newfm_root = format_path($newfm_root);
  4015.             if ($cfg->data['fm_root'] != $newfm_root){
  4016.                 $cfg->data['fm_root'] = $newfm_root;
  4017.                 if (strlen($newfm_root)) $current_dir = $newfm_root;
  4018.                 else $current_dir = $path_info["dirname"]."/";
  4019.                 setcookie("fm_current_root", $newfm_root , 0 , "/");
  4020.                 $reload = true;
  4021.             }
  4022.             $cfg->save();
  4023.             if ($reload){
  4024.                 reloadframe("window.opener.parent",2);
  4025.                 reloadframe("window.opener.parent",3);
  4026.             }
  4027.             $Warning1 = et('ConfSaved')."...";
  4028.         break;
  4029.         case 3:
  4030.             if ($cfg->data['auth_pass'] != md5($newpass)){
  4031.                 $cfg->data['auth_pass'] = md5($newpass);
  4032.                 setcookie("loggedon", md5($newpass) , 0 , "/");
  4033.             }
  4034.             $cfg->save();
  4035.             $Warning2 = et('PassSaved')."...";
  4036.         break;
  4037.     }
  4038.     html_header();
  4039.     echo "<body marginwidth=\"0\" marginheight=\"0\">\n";
  4040.     echo "
  4041.    <table border=0 cellspacing=0 cellpadding=5 align=center width=\"100%\">
  4042.    <tr><td colspan=2 align=center><b>".uppercase(et('Configurations'))."</b></td></tr>
  4043.    </table>
  4044.    <table border=0 cellspacing=0 cellpadding=5 align=center width=\"100%\">
  4045.     <form>
  4046.    <tr><td align=right width=\"1%\">".et('Version').":<td>$version (".get_size($fm_self).")</td></tr>
  4047.    <tr><td align=right>".et('Website').":<td><a href=\"JavaScript:open_win('http://phpfm.sf.net')\">http://phpfm.sf.net</a>&nbsp;&nbsp;&nbsp;<input type=button value=\"".et('ChkVer')."\" onclick=\"test_config_form(1)\"></td></tr>
  4048.     </form>";
  4049.     if (strlen($ChkVerWarning)) echo $ChkVerWarning.$data['warnings'];
  4050.     echo "
  4051.     <style type=\"text/css\">
  4052.         .buymeabeer {
  4053.             background: url('http://phpfm.sf.net/img/buymeabeer.png') 0 0 no-repeat;
  4054.             text-indent: -9999px;
  4055.             width: 128px;
  4056.             height: 31px;
  4057.            border: none;
  4058.             cursor: hand;
  4059.             cursor: pointer;
  4060.         }
  4061.         .buymeabeer:hover {
  4062.             background: url('http://phpfm.sf.net/img/buymeabeer.png') 0 -31px no-repeat;
  4063.         }
  4064.     </style>
  4065.     <tr><td align=right>Like this project?</td><td>
  4066.     <form name=\"buymeabeer_form\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">
  4067.         <input type=\"hidden\" name=\"cmd\" value=\"_xclick\">
  4068.         <input type=\"hidden\" name=\"business\" value=\"dulldusk@gmail.com\">
  4069.         <input type=\"hidden\" name=\"lc\" value=\"BR\">
  4070.         <input type=\"hidden\" name=\"item_name\" value=\"A Beer\">
  4071.         <input type=\"hidden\" name=\"button_subtype\" value=\"services\">
  4072.         <input type=\"hidden\" name=\"currency_code\" value=\"USD\">
  4073.         <input type=\"hidden\" name=\"tax_rate\" value=\"0.000\">
  4074.         <input type=\"hidden\" name=\"shipping\" value=\"0.00\">
  4075.         <input type=\"hidden\" name=\"bn\" value=\"PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest\">
  4076.        <input type=\"submit\" class=\"buymeabeer\" value=\"buy me a beer\">
  4077.             <input type=\"hidden\" name=\"buyer_credit_promo_code\" value=\"\">
  4078.             <input type=\"hidden\" name=\"buyer_credit_product_category\" value=\"\">
  4079.             <input type=\"hidden\" name=\"buyer_credit_shipping_method\" value=\"\">
  4080.             <input type=\"hidden\" name=\"buyer_credit_user_address_change\" value=\"\">
  4081.             <input type=\"hidden\" name=\"tax\" value=\"0\">
  4082.             <input type=\"hidden\" name=\"no_shipping\" value=\"1\">
  4083.             <input type=\"hidden\" name=\"return\" value=\"http://phpfm.sf.net\">
  4084.             <input type=\"hidden\" name=\"cancel_return\" value=\"http://phpfm.sf.net\">
  4085.     </form>
  4086.     </td></tr>
  4087.    <form name=\"config_form\" action=\"".$path_info["basename"]."\" method=\"post\">
  4088.    <input type=hidden name=action value=2>
  4089.    <input type=hidden name=config_action value=0>
  4090.    <tr><td align=right width=1><nobr>".et('DocRoot').":</nobr><td>".$doc_root."</td></tr>
  4091.    <tr><td align=right><nobr>".et('FLRoot').":</nobr><td><input type=text size=60 name=newfm_root value=\"".$cfg->data['fm_root']."\" onkeypress=\"enterSubmit(event,'test_config_form(2)')\"></td></tr>
  4092.    <tr><td align=right>".et('Lang').":<td>
  4093.     <select name=newlang>
  4094.         <option value=cat>Catalan - by Pere Borràs AKA @Norl
  4095.        <option value=nl>Dutch - by Leon Buijs
  4096.         <option value=en>English - by Fabricio Seger Kolling
  4097.         <option value=fr1>French - by Jean Bilwes
  4098.        <option value=fr2>French - by Sharky
  4099.        <option value=fr3>French - by Michel Lainey
  4100.         <option value=de1>German - by Guido Ogrzal
  4101.        <option value=de2>German - by AXL
  4102.        <option value=de3>German - by Mathias Rothe
  4103.        <option value=it1>Italian - by Valerio Capello
  4104.        <option value=it2>Italian - by Federico Corrà
  4105.        <option value=it3>Italian - by Luca Zorzi
  4106.        <option value=it4>Italian - by Gianni
  4107.         <option value=kr>Korean - by Airplanez 
  4108.         <option value=pt>Portuguese - by Fabricio Seger Kolling
  4109.         <option value=es>Spanish - by Sh Studios
  4110.        <option value=ru>Russian - by Евгений Рашев
  4111.        <option value=tr>Turkish - by Necdet Yazilimlari
  4112.     </select></td></tr>
  4113.    <tr><td align=right>".et('ErrorReport').":<td><select name=newerror>
  4114.     <option value=\"0\">Disabled
  4115.     <option value=\"1\">Show Errors
  4116.     <option value=\"2\">Show Errors, Warnings and Notices
  4117.     </select></td></tr>
  4118.    <tr><td> <td><input type=button value=\"".et('SaveConfig')."\" onclick=\"test_config_form(2)\">";
  4119.     if (strlen($Warning1)) echo " <font color=red>$Warning1</font>";
  4120.     echo "
  4121.    <tr><td align=right>".et('Pass').":<td><input type=text size=30 name=newpass value=\"\" onkeypress=\"enterSubmit(event,'test_config_form(3)')\"></td></tr>
  4122.    <tr><td> <td><input type=button value=\"".et('SavePass')."\" onclick=\"test_config_form(3)\">";
  4123.     if (strlen($Warning2)) echo " <font color=red>$Warning2</font>";
  4124.     echo "</td></tr>";
  4125.     echo "
  4126.    </form>
  4127.    </table>
  4128.    <script language=\"Javascript\" type=\"text/javascript\">
  4129.    <!--
  4130.        function set_select(sel,val){
  4131.            for(var x=0;x<sel.length;x++){
  4132.                if(sel.options[x].value==val){
  4133.                    sel.options[x].selected=true;
  4134.                    break;
  4135.                }
  4136.            }
  4137.        }
  4138.        set_select(document.config_form.newlang,'".$cfg->data['lang']."');
  4139.        set_select(document.config_form.newerror,'".$cfg->data['error_reporting']."');
  4140.        function test_config_form(arg){
  4141.            document.config_form.config_action.value = arg;
  4142.            document.config_form.submit();
  4143.        }
  4144.        function open_win(url){
  4145.            var w = 800;
  4146.            var h = 600;
  4147.            window.open(url, '', 'width='+w+',height='+h+',fullscreen=no,scrollbars=yes,resizable=yes,status=yes,toolbar=yes,menubar=yes,location=yes');
  4148.        }
  4149.        window.moveTo((window.screen.width-600)/2,((window.screen.height-400)/2)-20);
  4150.        window.focus();
  4151.    //-->
  4152.    </script>
  4153.    ";
  4154.     echo "</body>\n</html>";
  4155. }
  4156. function shell_form(){
  4157.     global $current_dir,$shell_form,$cmd_arg,$path_info;
  4158.     $data_out = "";
  4159.     if (strlen($cmd_arg)){
  4160.         exec($cmd_arg,$mat);
  4161.         if (count($mat)) $data_out = trim(implode("\n",$mat));
  4162.     }
  4163.     switch ($shell_form){
  4164.         case 1:
  4165.             html_header();
  4166.             echo "
  4167.            <body marginwidth=\"0\" marginheight=\"0\">
  4168.            <table border=0 cellspacing=0 cellpadding=0 align=center>
  4169.            <form name=\"data_form\">
  4170.            <tr><td><textarea name=data_out rows=36 cols=105 READONLY=\"1\"></textarea></td></tr>
  4171.            </form>
  4172.            </table>
  4173.            </body></html>";
  4174.         break;
  4175.         case 2:
  4176.             html_header();
  4177.             echo "
  4178.            <body marginwidth=\"0\" marginheight=\"0\">
  4179.            <table border=0 cellspacing=0 cellpadding=0 align=center>
  4180.            <form name=\"shell_form\" action=\"".$path_info["basename"]."\" method=\"post\">
  4181.            <input type=hidden name=current_dir value=\"$current_dir\">
  4182.            <input type=hidden name=action value=\"9\">
  4183.            <input type=hidden name=shell_form value=\"2\">
  4184.            <tr><td align=center><input type=text size=90 name=cmd_arg></td></tr>
  4185.            </form>";
  4186.             echo "
  4187.            <script language=\"Javascript\" type=\"text/javascript\">
  4188.            <!--";
  4189.             if (strlen($data_out)) echo "
  4190.                var val = '# ".html_encode($cmd_arg)."\\n".html_encode(str_replace("<","[",str_replace(">","]",str_replace("\n","\\n",str_replace("'","\'",str_replace("\\","\\\\",$data_out))))))."\\n';
  4191.                parent.frame1.document.data_form.data_out.value += val;
  4192.                 parent.frame1.document.data_form.data_out.scrollTop = parent.frame1.document.data_form.data_out.scrollHeight;";
  4193.             echo "
  4194.                document.shell_form.cmd_arg.focus();
  4195.            //-->
  4196.            </script>
  4197.            ";
  4198.             echo "
  4199.            </table>
  4200.            </body></html>";
  4201.         break;
  4202.         default:
  4203.             html_header("
  4204.            <script language=\"Javascript\" type=\"text/javascript\">
  4205.            <!--
  4206.                window.moveTo((window.screen.width-800)/2,((window.screen.height-600)/2)-20);
  4207.            //-->
  4208.            </script>");
  4209.             echo "
  4210.            <frameset rows=\"570,*\" framespacing=\"0\" frameborder=no>
  4211.                <frame src=\"".$path_info["basename"]."?action=9&shell_form=1\" name=frame1 border=\"0\" marginwidth=\"0\" marginheight=\"0\">
  4212.                <frame src=\"".$path_info["basename"]."?action=9&shell_form=2\" name=frame2 border=\"0\" marginwidth=\"0\" marginheight=\"0\">
  4213.            </frameset>
  4214.            </html>";
  4215.     }
  4216. }
  4217. function server_info(){
  4218.     if (!@phpinfo()) echo et('NoPhpinfo')."...";
  4219.     echo "<br><br>";
  4220.         $a=ini_get_all();
  4221.         $output="<table border=1 cellspacing=0 cellpadding=4 align=center>";
  4222.         $output.="<tr><th colspan=2>ini_get_all()</td></tr>";
  4223.         while(list($key, $value)=each($a)) {
  4224.             list($k, $v)= each($a[$key]);
  4225.             $output.="<tr><td align=right>$key</td><td>$v</td></tr>";
  4226.         }
  4227.         $output.="</table>";
  4228.     echo $output;
  4229.     echo "<br><br>";
  4230.         $output="<table border=1 cellspacing=0 cellpadding=4 align=center>";
  4231.         $output.="<tr><th colspan=2>\$_SERVER</td></tr>";
  4232.         foreach ($_SERVER as $k=>$v) {
  4233.             $output.="<tr><td align=right>$k</td><td>$v</td></tr>";
  4234.         }
  4235.         $output.="</table>";
  4236.     echo $output;
  4237.     echo "<br><br>";
  4238.     echo "<table border=1 cellspacing=0 cellpadding=4 align=center>";
  4239.     $safe_mode=trim(ini_get("safe_mode"));
  4240.     if ((strlen($safe_mode)==0)||($safe_mode==0)) $safe_mode=false;
  4241.     else $safe_mode=true;
  4242.     $is_windows_server = (uppercase(substr(PHP_OS, 0, 3)) === 'WIN');
  4243.     echo "<tr><td colspan=2>".php_uname();
  4244.     echo "<tr><td>safe_mode<td>".($safe_mode?"on":"off");
  4245.     if ($is_windows_server) echo "<tr><td>sisop<td>Windows<br>";
  4246.     else echo "<tr><td>sisop<td>Linux<br>";
  4247.     echo "</table><br><br><table border=1 cellspacing=0 cellpadding=4 align=center>";
  4248.     $display_errors=ini_get("display_errors");
  4249.     $ignore_user_abort = ignore_user_abort();
  4250.     $max_execution_time = ini_get("max_execution_time");
  4251.     $upload_max_filesize = ini_get("upload_max_filesize");
  4252.     $memory_limit=ini_get("memory_limit");
  4253.     $output_buffering=ini_get("output_buffering");
  4254.     $default_socket_timeout=ini_get("default_socket_timeout");
  4255.     $allow_url_fopen = ini_get("allow_url_fopen");
  4256.     $magic_quotes_gpc = ini_get("magic_quotes_gpc");
  4257.     ignore_user_abort(true);
  4258.     ini_set("display_errors",0);
  4259.     ini_set("max_execution_time",0);
  4260.     ini_set("upload_max_filesize","10M");
  4261.     ini_set("memory_limit","20M");
  4262.     ini_set("output_buffering",0);
  4263.     ini_set("default_socket_timeout",30);
  4264.     ini_set("allow_url_fopen",1);
  4265.     ini_set("magic_quotes_gpc",0);
  4266.     echo "<tr><td> <td>Get<td>Set<td>Get";
  4267.     echo "<tr><td>display_errors<td>$display_errors<td>0<td>".ini_get("display_errors");
  4268.     echo "<tr><td>ignore_user_abort<td>".($ignore_user_abort?"on":"off")."<td>on<td>".(ignore_user_abort()?"on":"off");
  4269.     echo "<tr><td>max_execution_time<td>$max_execution_time<td>0<td>".ini_get("max_execution_time");
  4270.     echo "<tr><td>upload_max_filesize<td>$upload_max_filesize<td>10M<td>".ini_get("upload_max_filesize");
  4271.     echo "<tr><td>memory_limit<td>$memory_limit<td>20M<td>".ini_get("memory_limit");
  4272.     echo "<tr><td>output_buffering<td>$output_buffering<td>0<td>".ini_get("output_buffering");
  4273.     echo "<tr><td>default_socket_timeout<td>$default_socket_timeout<td>30<td>".ini_get("default_socket_timeout");
  4274.     echo "<tr><td>allow_url_fopen<td>$allow_url_fopen<td>1<td>".ini_get("allow_url_fopen");
  4275.     echo "<tr><td>magic_quotes_gpc<td>$magic_quotes_gpc<td>0<td>".ini_get("magic_quotes_gpc");
  4276.     echo "</table><br><br>";
  4277.     echo "
  4278.    <script language=\"Javascript\" type=\"text/javascript\">
  4279.    <!--
  4280.        window.moveTo((window.screen.width-800)/2,((window.screen.height-600)/2)-20);
  4281.        window.focus();
  4282.    //-->
  4283.    </script>";
  4284.     echo "</body>\n</html>";
  4285. }
  4286. // +--------------------------------------------------
  4287. // | Session
  4288. // +--------------------------------------------------
  4289. function logout(){
  4290.     setcookie("loggedon",0,0,"/");
  4291.     login_form();
  4292. }
  4293. function login(){
  4294.     global $pass,$auth_pass,$path_info;
  4295.     if (md5(trim($pass)) == $auth_pass){
  4296.         setcookie("loggedon",$auth_pass,0,"/");
  4297.         header ("Location: ".$path_info["basename"]."");
  4298.     } else header ("Location: ".$path_info["basename"]."?erro=1");
  4299. }
  4300. function login_form(){
  4301.     global $erro,$auth_pass,$path_info;
  4302.     html_header();
  4303.     echo "<body onLoad=\"if(parent.location.href != self.location.href){ parent.location.href = self.location.href } return true;\">\n";
  4304.     if ($auth_pass != md5("")){
  4305.         echo "
  4306.        <table border=0 cellspacing=0 cellpadding=5>
  4307.            <form name=\"login_form\" action=\"".$path_info["basename"]."\" method=\"post\">
  4308.            <tr>
  4309.            <td><b>".et('FileMan')."</b>
  4310.            </tr>
  4311.            <tr>
  4312.            <td align=left><font size=4>".et('TypePass').".</font>
  4313.            </tr>
  4314.            <tr>
  4315.            <td><input name=pass type=password size=10> <input type=submit value=\"".et('Send')."\">
  4316.            </tr>
  4317.        ";
  4318.         if (strlen($erro)) echo "
  4319.            <tr>
  4320.            <td align=left><font color=red size=4>".et('InvPass').".</font>
  4321.            </tr>
  4322.        ";
  4323.         echo "
  4324.            </form>
  4325.        </table>
  4326.             <script language=\"Javascript\" type=\"text/javascript\">
  4327.             <!--
  4328.             document.login_form.pass.focus();
  4329.             //-->
  4330.             </script>
  4331.        ";
  4332.     } else {
  4333.         echo "
  4334.        <table border=0 cellspacing=0 cellpadding=5>
  4335.            <form name=\"login_form\" action=\"".$path_info["basename"]."\" method=\"post\">
  4336.            <input type=hidden name=frame value=3>
  4337.            <input type=hidden name=pass value=\"\">
  4338.            <tr>
  4339.            <td><b>".et('FileMan')."</b>
  4340.            </tr>
  4341.            <tr>
  4342.            <td><input type=submit value=\"".et('Enter')."\">
  4343.            </tr>
  4344.            </form>
  4345.        </table>
  4346.        ";
  4347.     }
  4348.     echo "</body>\n</html>";
  4349. }
  4350. function frame3(){
  4351.     global $islinux,$cmd_arg,$chmod_arg,$zip_dir,$fm_current_root,$cookie_cache_time;
  4352.     global $dir_dest,$current_dir,$dir_before;
  4353.     global $selected_file_list,$selected_dir_list,$old_name,$new_name;
  4354.     global $action,$or_by,$order_dir_list_by;
  4355.     if (!isset($order_dir_list_by)){
  4356.         $order_dir_list_by = "1A";
  4357.         setcookie("order_dir_list_by", $order_dir_list_by , time()+$cookie_cache_time , "/");
  4358.     } elseif (strlen($or_by)){
  4359.         $order_dir_list_by = $or_by;
  4360.         setcookie("order_dir_list_by", $or_by , time()+$cookie_cache_time , "/");
  4361.     }
  4362.     html_header();
  4363.     echo "<body>\n";
  4364.     if ($action){
  4365.         switch ($action){
  4366.             case 1: // create dir
  4367.             if (strlen($cmd_arg)){
  4368.                 $cmd_arg = format_path($current_dir.$cmd_arg);
  4369.                 if (!file_exists($cmd_arg)){
  4370.                     @mkdir($cmd_arg,0755);
  4371.                     @chmod($cmd_arg,0755);
  4372.                     reloadframe("parent",2,"&ec_dir=".$cmd_arg);
  4373.                 } else alert(et('FileDirExists').".");
  4374.             }
  4375.             break;
  4376.             case 2: // create arq
  4377.             if (strlen($cmd_arg)){
  4378.                 $cmd_arg = $current_dir.$cmd_arg;
  4379.                 if (!file_exists($cmd_arg)){
  4380.                     if ($fh = @fopen($cmd_arg, "w")){
  4381.                         @fclose($fh);
  4382.                     }
  4383.                     @chmod($cmd_arg,0644);
  4384.                 } else alert(et('FileDirExists').".");
  4385.             }
  4386.             break;
  4387.             case 3: // rename arq ou dir
  4388.             if ((strlen($old_name))&&(strlen($new_name))){
  4389.                 rename($current_dir.$old_name,$current_dir.$new_name);
  4390.                 if (is_dir($current_dir.$new_name)) reloadframe("parent",2);
  4391.             }
  4392.             break;
  4393.             case 4: // delete sel
  4394.             if(strstr($current_dir,$fm_current_root)){
  4395.                 if (strlen($selected_file_list)){
  4396.                     $selected_file_list = explode("<|*|>",$selected_file_list);
  4397.                     if (count($selected_file_list)) {
  4398.                         for($x=0;$x<count($selected_file_list);$x++) {
  4399.                             $selected_file_list[$x] = trim($selected_file_list[$x]);
  4400.                             if (strlen($selected_file_list[$x])) total_delete($current_dir.$selected_file_list[$x],$dir_dest.$selected_file_list[$x]);
  4401.                         }
  4402.                     }
  4403.                 }
  4404.                 if (strlen($selected_dir_list)){
  4405.                     $selected_dir_list = explode("<|*|>",$selected_dir_list);
  4406.                     if (count($selected_dir_list)) {
  4407.                         for($x=0;$x<count($selected_dir_list);$x++) {
  4408.                             $selected_dir_list[$x] = trim($selected_dir_list[$x]);
  4409.                             if (strlen($selected_dir_list[$x])) total_delete($current_dir.$selected_dir_list[$x],$dir_dest.$selected_dir_list[$x]);
  4410.                         }
  4411.                         reloadframe("parent",2);
  4412.                     }
  4413.                 }
  4414.             }
  4415.             break;
  4416.             case 5: // copy sel
  4417.             if (strlen($dir_dest)){
  4418.                 if(uppercase($dir_dest) != uppercase($current_dir)){
  4419.                     if (strlen($selected_file_list)){
  4420.                         $selected_file_list = explode("<|*|>",$selected_file_list);
  4421.                         if (count($selected_file_list)) {
  4422.                             for($x=0;$x<count($selected_file_list);$x++) {
  4423.                                 $selected_file_list[$x] = trim($selected_file_list[$x]);
  4424.                                 if (strlen($selected_file_list[$x])) total_copy($current_dir.$selected_file_list[$x],$dir_dest.$selected_file_list[$x]);
  4425.                             }
  4426.                         }
  4427.                     }
  4428.                     if (strlen($selected_dir_list)){
  4429.                         $selected_dir_list = explode("<|*|>",$selected_dir_list);
  4430.                         if (count($selected_dir_list)) {
  4431.                             for($x=0;$x<count($selected_dir_list);$x++) {
  4432.                                 $selected_dir_list[$x] = trim($selected_dir_list[$x]);
  4433.                                 if (strlen($selected_dir_list[$x])) total_copy($current_dir.$selected_dir_list[$x],$dir_dest.$selected_dir_list[$x]);
  4434.                             }
  4435.                             reloadframe("parent",2);
  4436.                         }
  4437.                     }
  4438.                     $current_dir = $dir_dest;
  4439.                 }
  4440.             }
  4441.             break;
  4442.             case 6: // move sel
  4443.             if (strlen($dir_dest)){
  4444.                 if(uppercase($dir_dest) != uppercase($current_dir)){
  4445.                     if (strlen($selected_file_list)){
  4446.                         $selected_file_list = explode("<|*|>",$selected_file_list);
  4447.                         if (count($selected_file_list)) {
  4448.                             for($x=0;$x<count($selected_file_list);$x++) {
  4449.                                 $selected_file_list[$x] = trim($selected_file_list[$x]);
  4450.                                 if (strlen($selected_file_list[$x])) total_move($current_dir.$selected_file_list[$x],$dir_dest.$selected_file_list[$x]);
  4451.                             }
  4452.                         }
  4453.                     }
  4454.                     if (strlen($selected_dir_list)){
  4455.                         $selected_dir_list = explode("<|*|>",$selected_dir_list);
  4456.                         if (count($selected_dir_list)) {
  4457.                             for($x=0;$x<count($selected_dir_list);$x++) {
  4458.                                 $selected_dir_list[$x] = trim($selected_dir_list[$x]);
  4459.                                 if (strlen($selected_dir_list[$x])) total_move($current_dir.$selected_dir_list[$x],$dir_dest.$selected_dir_list[$x]);
  4460.                             }
  4461.                             reloadframe("parent",2);
  4462.                         }
  4463.                     }
  4464.                     $current_dir = $dir_dest;
  4465.                 }
  4466.             }
  4467.             break;
  4468.             case 71: // compress sel
  4469.             if (strlen($cmd_arg)){
  4470.                 ignore_user_abort(true);
  4471.                 ini_set("display_errors",0);
  4472.                 ini_set("max_execution_time",0);
  4473.                 $zipfile=false;
  4474.                 if (strstr($cmd_arg,".tar")) $zipfile = new tar_file($cmd_arg);
  4475.                 elseif (strstr($cmd_arg,".zip")) $zipfile = new zip_file($cmd_arg);
  4476.                 elseif (strstr($cmd_arg,".bzip")) $zipfile = new bzip_file($cmd_arg);
  4477.                 elseif (strstr($cmd_arg,".gzip")) $zipfile = new gzip_file($cmd_arg);
  4478.                 if ($zipfile){
  4479.                     $zipfile->set_options(array('basedir'=>$current_dir,'overwrite'=>1,'level'=>3));
  4480.                     if (strlen($selected_file_list)){
  4481.                         $selected_file_list = explode("<|*|>",$selected_file_list);
  4482.                         if (count($selected_file_list)) {
  4483.                             for($x=0;$x<count($selected_file_list);$x++) {
  4484.                                 $selected_file_list[$x] = trim($selected_file_list[$x]);
  4485.                                 if (strlen($selected_file_list[$x])) $zipfile->add_files($selected_file_list[$x]);
  4486.                             }
  4487.                         }
  4488.                     }
  4489.                     if (strlen($selected_dir_list)){
  4490.                         $selected_dir_list = explode("<|*|>",$selected_dir_list);
  4491.                         if (count($selected_dir_list)) {
  4492.                             for($x=0;$x<count($selected_dir_list);$x++) {
  4493.                                 $selected_dir_list[$x] = trim($selected_dir_list[$x]);
  4494.                                 if (strlen($selected_dir_list[$x])) $zipfile->add_files($selected_dir_list[$x]);
  4495.                             }
  4496.                         }
  4497.                     }
  4498.                     $zipfile->create_archive();
  4499.                 }
  4500.                 unset($zipfile);
  4501.             }
  4502.             break;
  4503.             case 72: // decompress arq
  4504.             if (strlen($cmd_arg)){
  4505.                 if (file_exists($current_dir.$cmd_arg)){
  4506.                     $zipfile=false;
  4507.                     if (strstr($cmd_arg,".zip")) zip_extract();
  4508.                     elseif (strstr($cmd_arg,".bzip")||strstr($cmd_arg,".bz2")||strstr($cmd_arg,".tbz2")||strstr($cmd_arg,".bz")||strstr($cmd_arg,".tbz")) $zipfile = new bzip_file($cmd_arg);
  4509.                     elseif (strstr($cmd_arg,".gzip")||strstr($cmd_arg,".gz")||strstr($cmd_arg,".tgz")) $zipfile = new gzip_file($cmd_arg);
  4510.                     elseif (strstr($cmd_arg,".tar")) $zipfile = new tar_file($cmd_arg);
  4511.                     if ($zipfile){
  4512.                         $zipfile->set_options(array('basedir'=>$current_dir,'overwrite'=>1));
  4513.                         $zipfile->extract_files();
  4514.                     }
  4515.                     unset($zipfile);
  4516.                     reloadframe("parent",2);
  4517.                 }
  4518.             }
  4519.             break;
  4520.             case 8: // delete arq/dir
  4521.             if (strlen($cmd_arg)){
  4522.                 if (file_exists($current_dir.$cmd_arg)) total_delete($current_dir.$cmd_arg);
  4523.                 if (is_dir($current_dir.$cmd_arg)) reloadframe("parent",2);
  4524.             }
  4525.             break;
  4526.             case 9: // CHMOD
  4527.             if((strlen($chmod_arg) == 4)&&(strlen($current_dir))){
  4528.                 if ($chmod_arg[0]=="1") $chmod_arg = "0".$chmod_arg;
  4529.                 else $chmod_arg = "0".substr($chmod_arg,strlen($chmod_arg)-3);
  4530.                 $new_mod = octdec($chmod_arg);
  4531.                 if (strlen($selected_file_list)){
  4532.                     $selected_file_list = explode("<|*|>",$selected_file_list);
  4533.                     if (count($selected_file_list)) {
  4534.                         for($x=0;$x<count($selected_file_list);$x++) {
  4535.                             $selected_file_list[$x] = trim($selected_file_list[$x]);
  4536.                             if (strlen($selected_file_list[$x])) @chmod($current_dir.$selected_file_list[$x],$new_mod);
  4537.                         }
  4538.                     }
  4539.                 }
  4540.                 if (strlen($selected_dir_list)){
  4541.                     $selected_dir_list = explode("<|*|>",$selected_dir_list);
  4542.                     if (count($selected_dir_list)) {
  4543.                         for($x=0;$x<count($selected_dir_list);$x++) {
  4544.                             $selected_dir_list[$x] = trim($selected_dir_list[$x]);
  4545.                             if (strlen($selected_dir_list[$x])) @chmod($current_dir.$selected_dir_list[$x],$new_mod);
  4546.                         }
  4547.                     }
  4548.                 }
  4549.             }
  4550.             break;
  4551.         }
  4552.         if ($action != 10) dir_list_form();
  4553.     } else dir_list_form();
  4554.     echo "</body>\n</html>";
  4555. }
  4556. function frame2(){
  4557.     global $expanded_dir_list,$ec_dir;
  4558.     if (!isset($expanded_dir_list)) $expanded_dir_list = "";
  4559.     if (strlen($ec_dir)){
  4560.         if (strstr($expanded_dir_list,":".$ec_dir)) $expanded_dir_list = str_replace(":".$ec_dir,"",$expanded_dir_list);
  4561.         else $expanded_dir_list .= ":".$ec_dir;
  4562.         setcookie("expanded_dir_list", $expanded_dir_list , 0 , "/");
  4563.     }
  4564.     show_tree();
  4565. }
  4566. function frameset(){
  4567.     global $path_info,$leftFrameWidth;
  4568.     if (!isset($leftFrameWidth)) $leftFrameWidth = 300;
  4569.     html_header();
  4570.     echo "
  4571.    <frameset cols=\"".$leftFrameWidth.",*\" framespacing=\"0\">
  4572.        <frameset rows=\"0,*\" framespacing=\"0\" frameborder=\"0\">
  4573.            <frame src=\"".$path_info["basename"]."?frame=1\" name=frame1 border=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\">
  4574.            <frame src=\"".$path_info["basename"]."?frame=2\" name=frame2 border=\"0\" marginwidth=\"0\" marginheight=\"0\">
  4575.        </frameset>
  4576.        <frame src=\"".$path_info["basename"]."?frame=3\" name=frame3 border=\"0\" marginwidth=\"0\" marginheight=\"0\">
  4577.    </frameset>
  4578.    </html>";
  4579. }
  4580. // +--------------------------------------------------
  4581. // | Open Source Contributions
  4582. // +--------------------------------------------------
  4583.  /*-------------------------------------------------
  4584.  | TAR/GZIP/BZIP2/ZIP ARCHIVE CLASSES 2.0
  4585.  | By Devin Doucette
  4586.  | Copyright (c) 2004 Devin Doucette
  4587.  | Email: darksnoopy@shaw.ca
  4588.  +--------------------------------------------------
  4589.  | Email bugs/suggestions to darksnoopy@shaw.ca
  4590.  +--------------------------------------------------
  4591.  | This script has been created and released under
  4592.  | the GNU GPL and is free to use and redistribute
  4593.  | only if this copyright statement is not removed
  4594.  +--------------------------------------------------
  4595.  | Limitations:
  4596.  | - Only USTAR archives are officially supported for extraction, but others may work.
  4597.  | - Extraction of bzip2 and gzip archives is limited to compatible tar files that have
  4598.  | been compressed by either bzip2 or gzip.  For greater support, use the functions
  4599.  | bzopen and gzopen respectively for bzip2 and gzip extraction.
  4600.  | - Zip extraction is not supported due to the wide variety of algorithms that may be
  4601.  | used for compression and newer features such as encryption.
  4602.  +--------------------------------------------------
  4603.  */
  4604. class archive
  4605. {
  4606.     function archive($name)
  4607.     {
  4608.         $this->options = array(
  4609.             'basedir'=>".",
  4610.             'name'=>$name,
  4611.             'prepend'=>"",
  4612.             'inmemory'=>0,
  4613.             'overwrite'=>0,
  4614.             'recurse'=>1,
  4615.             'storepaths'=>1,
  4616.             'level'=>3,
  4617.             'method'=>1,
  4618.             'sfx'=>"",
  4619.             'type'=>"",
  4620.             'comment'=>""
  4621.         );
  4622.         $this->files = array();
  4623.         $this->exclude = array();
  4624.         $this->storeonly = array();
  4625.         $this->error = array();
  4626.     }
  4627.  
  4628.     function set_options($options)
  4629.     {
  4630.         foreach($options as $key => $value)
  4631.         {
  4632.             $this->options[$key] = $value;
  4633.         }
  4634.         if(!empty($this->options['basedir']))
  4635.         {
  4636.             $this->options['basedir'] = str_replace("\\","/",$this->options['basedir']);
  4637.             $this->options['basedir'] = preg_replace("/\/+/","/",$this->options['basedir']);
  4638.             $this->options['basedir'] = preg_replace("/\/$/","",$this->options['basedir']);
  4639.         }
  4640.         if(!empty($this->options['name']))
  4641.         {
  4642.             $this->options['name'] = str_replace("\\","/",$this->options['name']);
  4643.             $this->options['name'] = preg_replace("/\/+/","/",$this->options['name']);
  4644.         }
  4645.         if(!empty($this->options['prepend']))
  4646.         {
  4647.             $this->options['prepend'] = str_replace("\\","/",$this->options['prepend']);
  4648.             $this->options['prepend'] = preg_replace("/^(\.*\/+)+/","",$this->options['prepend']);
  4649.             $this->options['prepend'] = preg_replace("/\/+/","/",$this->options['prepend']);
  4650.             $this->options['prepend'] = preg_replace("/\/$/","",$this->options['prepend']) . "/";
  4651.         }
  4652.     }
  4653.  
  4654.     function create_archive()
  4655.     {
  4656.         $this->make_list();
  4657.  
  4658.         if($this->options['inmemory'] == 0)
  4659.         {
  4660.             $Pwd = getcwd();
  4661.             chdir($this->options['basedir']);
  4662.             if($this->options['overwrite'] == 0 && file_exists($this->options['name'] . ($this->options['type'] == "gzip" || $this->options['type'] == "bzip"? ".tmp" : "")))
  4663.             {
  4664.                 $this->error[] = "File {$this->options['name']} already exists.";
  4665.                 chdir($Pwd);
  4666.                 return 0;
  4667.             }
  4668.             else if($this->archive = @fopen($this->options['name'] . ($this->options['type'] == "gzip" || $this->options['type'] == "bzip"? ".tmp" : ""),"wb+"))
  4669.             {
  4670.                 chdir($Pwd);
  4671.             }
  4672.             else
  4673.             {
  4674.                 $this->error[] = "Could not open {$this->options['name']} for writing.";
  4675.                 chdir($Pwd);
  4676.                 return 0;
  4677.             }
  4678.         }
  4679.         else
  4680.         {
  4681.             $this->archive = "";
  4682.         }
  4683.  
  4684.         switch($this->options['type'])
  4685.         {
  4686.         case "zip":
  4687.             if(!$this->create_zip())
  4688.             {
  4689.                 $this->error[] = "Could not create zip file.";
  4690.                 return 0;
  4691.             }
  4692.             break;
  4693.         case "bzip":
  4694.             if(!$this->create_tar())
  4695.             {
  4696.                 $this->error[] = "Could not create tar file.";
  4697.                 return 0;
  4698.             }
  4699.             if(!$this->create_bzip())
  4700.             {
  4701.                 $this->error[] = "Could not create bzip2 file.";
  4702.                 return 0;
  4703.             }
  4704.             break;
  4705.         case "gzip":
  4706.             if(!$this->create_tar())
  4707.             {
  4708.                 $this->error[] = "Could not create tar file.";
  4709.                 return 0;
  4710.             }
  4711.             if(!$this->create_gzip())
  4712.             {
  4713.                 $this->error[] = "Could not create gzip file.";
  4714.                 return 0;
  4715.             }
  4716.             break;
  4717.         case "tar":
  4718.             if(!$this->create_tar())
  4719.             {
  4720.                 $this->error[] = "Could not create tar file.";
  4721.                 return 0;
  4722.             }
  4723.         }
  4724.  
  4725.         if($this->options['inmemory'] == 0)
  4726.         {
  4727.             fclose($this->archive);
  4728.             @chmod($this->options['name'],0644);
  4729.             if($this->options['type'] == "gzip" || $this->options['type'] == "bzip")
  4730.             {
  4731.                 unlink($this->options['basedir'] . "/" . $this->options['name'] . ".tmp");
  4732.             }
  4733.         }
  4734.     }
  4735.  
  4736.     function add_data($data)
  4737.     {
  4738.         if($this->options['inmemory'] == 0)
  4739.         {
  4740.             fwrite($this->archive,$data);
  4741.         }
  4742.         else
  4743.         {
  4744.             $this->archive .= $data;
  4745.         }
  4746.     }
  4747.  
  4748.     function make_list()
  4749.     {
  4750.         if(!empty($this->exclude))
  4751.         {
  4752.             foreach($this->files as $key => $value)
  4753.             {
  4754.                 foreach($this->exclude as $current)
  4755.                 {
  4756.                     if($value['name'] == $current['name'])
  4757.                     {
  4758.                         unset($this->files[$key]);
  4759.                     }
  4760.                 }
  4761.             }
  4762.         }
  4763.         if(!empty($this->storeonly))
  4764.         {
  4765.             foreach($this->files as $key => $value)
  4766.             {
  4767.                 foreach($this->storeonly as $current)
  4768.                 {
  4769.                     if($value['name'] == $current['name'])
  4770.                     {
  4771.                         $this->files[$key]['method'] = 0;
  4772.                     }
  4773.                 }
  4774.             }
  4775.         }
  4776.         unset($this->exclude,$this->storeonly);
  4777.     }
  4778.  
  4779.  
  4780.     function add_files($list)
  4781.     {
  4782.         $temp = $this->list_files($list);
  4783.         foreach($temp as $current)
  4784.         {
  4785.             $this->files[] = $current;
  4786.         }
  4787.     }
  4788.  
  4789.     function exclude_files($list)
  4790.     {
  4791.         $temp = $this->list_files($list);
  4792.         foreach($temp as $current)
  4793.         {
  4794.             $this->exclude[] = $current;
  4795.         }
  4796.     }
  4797.  
  4798.     function store_files($list)
  4799.     {
  4800.         $temp = $this->list_files($list);
  4801.         foreach($temp as $current)
  4802.         {
  4803.             $this->storeonly[] = $current;
  4804.         }
  4805.     }
  4806.  
  4807.     function list_files($list)
  4808.     {
  4809.         if(!is_array($list))
  4810.         {
  4811.             $temp = $list;
  4812.             $list = array($temp);
  4813.             unset($temp);
  4814.         }
  4815.  
  4816.         $files = array();
  4817.  
  4818.         $Pwd = getcwd();
  4819.         chdir($this->options['basedir']);
  4820.  
  4821.         foreach($list as $current)
  4822.         {
  4823.             $current = str_replace("\\","/",$current);
  4824.             $current = preg_replace("/\/+/","/",$current);
  4825.             $current = preg_replace("/\/$/","",$current);
  4826.             if(strstr($current,"*"))
  4827.             {
  4828.                 $regex = preg_replace("/([\\\^\$\.\[\]\|\(\)\?\+\{\}\/])/","\\\\\\1",$current);
  4829.                 $regex = str_replace("*",".*",$regex);
  4830.                 $dir = strstr($current,"/")? substr($current,0,strrpos($current,"/")) : ".";
  4831.                 $temp = $this->parse_dir($dir);
  4832.                 foreach($temp as $current2)
  4833.                 {
  4834.                     if(preg_match("/^{$regex}$/i",$current2['name']))
  4835.                     {
  4836.                         $files[] = $current2;
  4837.                     }
  4838.                 }
  4839.                 unset($regex,$dir,$temp,$current);
  4840.             }
  4841.             else if(@is_dir($current))
  4842.             {
  4843.                 $temp = $this->parse_dir($current);
  4844.                 foreach($temp as $file)
  4845.                 {
  4846.                     $files[] = $file;
  4847.                 }
  4848.                 unset($temp,$file);
  4849.             }
  4850.             else if(@file_exists($current))
  4851.             {
  4852.                 $files[] = array('name'=>$current,'name2'=>$this->options['prepend'] .
  4853.                     preg_replace("/(\.+\/+)+/","",($this->options['storepaths'] == 0 && strstr($current,"/"))?
  4854.                     substr($current,strrpos($current,"/") + 1) : $current),'type'=>0,
  4855.                     'ext'=>substr($current,strrpos($current,".")),'stat'=>stat($current));
  4856.             }
  4857.         }
  4858.  
  4859.         chdir($Pwd);
  4860.  
  4861.         unset($current,$Pwd);
  4862.  
  4863.         usort($files,array("archive","sort_files"));
  4864.  
  4865.         return $files;
  4866.     }
  4867.  
  4868.     function parse_dir($dirname)
  4869.     {
  4870.         if($this->options['storepaths'] == 1 && !preg_match("/^(\.+\/*)+$/",$dirname))
  4871.         {
  4872.             $files = array(array('name'=>$dirname,'name2'=>$this->options['prepend'] .
  4873.                 preg_replace("/(\.+\/+)+/","",($this->options['storepaths'] == 0 && strstr($dirname,"/"))?
  4874.                 substr($dirname,strrpos($dirname,"/") + 1) : $dirname),'type'=>5,'stat'=>stat($dirname)));
  4875.         }
  4876.         else
  4877.         {
  4878.             $files = array();
  4879.         }
  4880.         $dir = @opendir($dirname);
  4881.  
  4882.         while($file = @readdir($dir))
  4883.         {
  4884.             if($file == "." || $file == "..")
  4885.             {
  4886.                 continue;
  4887.             }
  4888.             else if(@is_dir($dirname."/".$file))
  4889.             {
  4890.                 if(empty($this->options['recurse']))
  4891.                 {
  4892.                     continue;
  4893.                 }
  4894.                 $temp = $this->parse_dir($dirname."/".$file);
  4895.                 foreach($temp as $file2)
  4896.                 {
  4897.                     $files[] = $file2;
  4898.                 }
  4899.             }
  4900.             else if(@file_exists($dirname."/".$file))
  4901.             {
  4902.                 $files[] = array('name'=>$dirname."/".$file,'name2'=>$this->options['prepend'] .
  4903.                     preg_replace("/(\.+\/+)+/","",($this->options['storepaths'] == 0 && strstr($dirname."/".$file,"/"))?
  4904.                     substr($dirname."/".$file,strrpos($dirname."/".$file,"/") + 1) : $dirname."/".$file),'type'=>0,
  4905.                     'ext'=>substr($file,strrpos($file,".")),'stat'=>stat($dirname."/".$file));
  4906.             }
  4907.         }
  4908.  
  4909.         @closedir($dir);
  4910.  
  4911.         return $files;
  4912.     }
  4913.  
  4914.     function sort_files($a,$b)
  4915.     {
  4916.         if($a['type'] != $b['type'])
  4917.         {
  4918.             return $a['type'] > $b['type']? -1 : 1;
  4919.         }
  4920.         else if($a['type'] == 5)
  4921.         {
  4922.             return strcmp(strtolower($a['name']),strtolower($b['name']));
  4923.         }
  4924.         else
  4925.         {
  4926.             if($a['ext'] != $b['ext'])
  4927.             {
  4928.                 return strcmp($a['ext'],$b['ext']);
  4929.             }
  4930.             else if($a['stat'][7] != $b['stat'][7])
  4931.             {
  4932.                 return $a['stat'][7] > $b['stat'][7]? -1 : 1;
  4933.             }
  4934.             else
  4935.             {
  4936.                 return strcmp(strtolower($a['name']),strtolower($b['name']));
  4937.             }
  4938.         }
  4939.         return 0;
  4940.     }
  4941.  
  4942.     function download_file()
  4943.     {
  4944.         if($this->options['inmemory'] == 0)
  4945.         {
  4946.             $this->error[] = "Can only use download_file() if archive is in memory. Redirect to file otherwise, it is faster.";
  4947.             return;
  4948.         }
  4949.         switch($this->options['type'])
  4950.         {
  4951.         case "zip":
  4952.             header("Content-type:application/zip");
  4953.             break;
  4954.         case "bzip":
  4955.             header("Content-type:application/x-compressed");
  4956.             break;
  4957.         case "gzip":
  4958.             header("Content-type:application/x-compressed");
  4959.             break;
  4960.         case "tar":
  4961.             header("Content-type:application/x-tar");
  4962.         }
  4963.         $header = "Content-disposition: attachment; filename=\"";
  4964.         $header .= strstr($this->options['name'],"/")? substr($this->options['name'],strrpos($this->options['name'],"/") + 1) : $this->options['name'];
  4965.         $header .= "\"";
  4966.         header($header);
  4967.         header("Content-length: " . strlen($this->archive));
  4968.         header("Content-transfer-encoding: binary");
  4969.         header("Cache-control: no-cache, must-revalidate, post-check=0, pre-check=0");
  4970.         header("Pragma: no-cache");
  4971.         header("Expires: 0");
  4972.         print($this->archive);
  4973.     }
  4974. }
  4975.  
  4976. class tar_file extends archive
  4977. {
  4978.     function tar_file($name)
  4979.     {
  4980.         $this->archive($name);
  4981.         $this->options['type'] = "tar";
  4982.     }
  4983.  
  4984.     function create_tar()
  4985.     {
  4986.         $Pwd = getcwd();
  4987.         chdir($this->options['basedir']);
  4988.  
  4989.         foreach($this->files as $current)
  4990.         {
  4991.             if($current['name'] == $this->options['name'])
  4992.             {
  4993.                 continue;
  4994.             }
  4995.             if(strlen($current['name2']) > 99)
  4996.             {
  4997.                 $Path = substr($current['name2'],0,strpos($current['name2'],"/",strlen($current['name2']) - 100) + 1);
  4998.                 $current['name2'] = substr($current['name2'],strlen($Path));
  4999.                 if(strlen($Path) > 154 || strlen($current['name2']) > 99)
  5000.                 {
  5001.                     $this->error[] = "Could not add {$Path}{$current['name2']} to archive because the filename is too long.";
  5002.                     continue;
  5003.                 }
  5004.             }
  5005.             $block = pack("a100a8a8a8a12a12a8a1a100a6a2a32a32a8a8a155a12",$current['name2'],decoct($current['stat'][2]),
  5006.                 sprintf("%6s ",decoct($current['stat'][4])),sprintf("%6s ",decoct($current['stat'][5])),
  5007.                 sprintf("%11s ",decoct($current['stat'][7])),sprintf("%11s ",decoct($current['stat'][9])),
  5008.                 "        ",$current['type'],"","ustar","00","Unknown","Unknown","","",!empty($Path)? $Path : "","");
  5009.  
  5010.             $checksum = 0;
  5011.             for($i = 0; $i < 512; $i++)
  5012.             {
  5013.                 $checksum += ord(substr($block,$i,1));
  5014.             }
  5015.             $checksum = pack("a8",sprintf("%6s ",decoct($checksum)));
  5016.             $block = substr_replace($block,$checksum,148,8);
  5017.  
  5018.             if($current['stat'][7] == 0)
  5019.             {
  5020.                 $this->add_data($block);
  5021.             }
  5022.             else if($fp = @fopen($current['name'],"rb"))
  5023.             {
  5024.                 $this->add_data($block);
  5025.                 while($temp = fread($fp,1048576))
  5026.                 {
  5027.                     $this->add_data($temp);
  5028.                 }
  5029.                 if($current['stat'][7] % 512 > 0)
  5030.                 {
  5031.                     $temp = "";
  5032.                     for($i = 0; $i < 512 - $current['stat'][7] % 512; $i++)
  5033.                     {
  5034.                         $temp .= "\0";
  5035.                     }
  5036.                     $this->add_data($temp);
  5037.                 }
  5038.                 fclose($fp);
  5039.             }
  5040.             else
  5041.             {
  5042.                 $this->error[] = "Could not open file {$current['name']} for reading. It was not added.";
  5043.             }
  5044.         }
  5045.  
  5046.         $this->add_data(pack("a512",""));
  5047.  
  5048.         chdir($Pwd);
  5049.  
  5050.         return 1;
  5051.  
  5052.     }
  5053.  
  5054.     function extract_files()
  5055.     {
  5056.         $Pwd = getcwd();
  5057.         chdir($this->options['basedir']);
  5058.  
  5059.         if($fp = $this->open_archive())
  5060.         {
  5061.             if($this->options['inmemory'] == 1)
  5062.             {
  5063.                 $this->files = array();
  5064.             }
  5065.  
  5066.             while($block = fread($fp,512))
  5067.             {
  5068.                 $temp = unpack("a100name/a8mode/a8uid/a8gid/a12size/a12mtime/a8checksum/a1type/a100temp/a6magic/a2temp/a32temp/a32temp/a8temp/a8temp/a155prefix/a12temp",$block);
  5069.                 $file = array(
  5070.                     'name'=>$temp['prefix'] . $temp['name'],
  5071.                     'stat'=>array(
  5072.                         2=>$temp['mode'],
  5073.                         4=>octdec($temp['uid']),
  5074.                         5=>octdec($temp['gid']),
  5075.                         7=>octdec($temp['size']),
  5076.                         9=>octdec($temp['mtime']),
  5077.                     ),
  5078.                     'checksum'=>octdec($temp['checksum']),
  5079.                     'type'=>$temp['type'],
  5080.                     'magic'=>$temp['magic'],
  5081.                 );
  5082.                 if($file['checksum'] == 0x00000000)
  5083.                 {
  5084.                     break;
  5085.                 }
  5086.                 else if($file['magic'] != "ustar")
  5087.                 {
  5088.                     $this->error[] = "This script does not support extracting this type of tar file.";
  5089.                     break;
  5090.                 }
  5091.                 $block = substr_replace($block,"        ",148,8);
  5092.                 $checksum = 0;
  5093.                 for($i = 0; $i < 512; $i++)
  5094.                 {
  5095.                     $checksum += ord(substr($block,$i,1));
  5096.                 }
  5097.                 if($file['checksum'] != $checksum)
  5098.                 {
  5099.                     $this->error[] = "Could not extract from {$this->options['name']}, it is corrupt.";
  5100.                 }
  5101.  
  5102.                 if($this->options['inmemory'] == 1)
  5103.                 {
  5104.                     $file['data'] = fread($fp,$file['stat'][7]);
  5105.                     fread($fp,(512 - $file['stat'][7] % 512) == 512? 0 : (512 - $file['stat'][7] % 512));
  5106.                     unset($file['checksum'],$file['magic']);
  5107.                     $this->files[] = $file;
  5108.                 }
  5109.                 else
  5110.                 {
  5111.                     if($file['type'] == 5)
  5112.                     {
  5113.                         if(!is_dir($file['name']))
  5114.                         {
  5115.                             mkdir($file['name'],0755);
  5116.                             //mkdir($file['name'],$file['stat'][2]);
  5117.                             //chown($file['name'],$file['stat'][4]);
  5118.                             //chgrp($file['name'],$file['stat'][5]);
  5119.                         }
  5120.                     }
  5121.                     else if($this->options['overwrite'] == 0 && file_exists($file['name']))
  5122.                     {
  5123.                         $this->error[] = "{$file['name']} already exists.";
  5124.                     }
  5125.                     else if($new = @fopen($file['name'],"wb"))
  5126.                     {
  5127.                         fwrite($new,fread($fp,$file['stat'][7]));
  5128.                         fread($fp,(512 - $file['stat'][7] % 512) == 512? 0 : (512 - $file['stat'][7] % 512));
  5129.                         fclose($new);
  5130.                         @chmod($file['name'],0644);
  5131.                         //chmod($file['name'],$file['stat'][2]);
  5132.                         //chown($file['name'],$file['stat'][4]);
  5133.                         //chgrp($file['name'],$file['stat'][5]);
  5134.                     }
  5135.                     else
  5136.                     {
  5137.                         $this->error[] = "Could not open {$file['name']} for writing.";
  5138.                     }
  5139.                 }
  5140.                 unset($file);
  5141.             }
  5142.         }
  5143.         else
  5144.         {
  5145.             $this->error[] = "Could not open file {$this->options['name']}";
  5146.         }
  5147.  
  5148.         chdir($Pwd);
  5149.     }
  5150.  
  5151.     function open_archive()
  5152.     {
  5153.         return @fopen($this->options['name'],"rb");
  5154.     }
  5155. }
  5156.  
  5157. class gzip_file extends tar_file
  5158. {
  5159.     function gzip_file($name)
  5160.     {
  5161.         $this->tar_file($name);
  5162.         $this->options['type'] = "gzip";
  5163.     }
  5164.  
  5165.     function create_gzip()
  5166.     {
  5167.         if($this->options['inmemory'] == 0)
  5168.         {
  5169.             $Pwd = getcwd();
  5170.             chdir($this->options['basedir']);
  5171.             if($fp = gzopen($this->options['name'],"wb{$this->options['level']}"))
  5172.             {
  5173.                 fseek($this->archive,0);
  5174.                 while($temp = fread($this->archive,1048576))
  5175.                 {
  5176.                     gzwrite($fp,$temp);
  5177.                 }
  5178.                 gzclose($fp);
  5179.                 chdir($Pwd);
  5180.             }
  5181.             else
  5182.             {
  5183.                 $this->error[] = "Could not open {$this->options['name']} for writing.";
  5184.                 chdir($Pwd);
  5185.                 return 0;
  5186.             }
  5187.         }
  5188.         else
  5189.         {
  5190.             $this->archive = gzencode($this->archive,$this->options['level']);
  5191.         }
  5192.  
  5193.         return 1;
  5194.     }
  5195.  
  5196.     function open_archive()
  5197.     {
  5198.         return @gzopen($this->options['name'],"rb");
  5199.     }
  5200. }
  5201.  
  5202. class bzip_file extends tar_file
  5203. {
  5204.     function bzip_file($name)
  5205.     {
  5206.         $this->tar_file($name);
  5207.         $this->options['type'] = "bzip";
  5208.     }
  5209.  
  5210.     function create_bzip()
  5211.     {
  5212.         if($this->options['inmemory'] == 0)
  5213.         {
  5214.             $Pwd = getcwd();
  5215.             chdir($this->options['basedir']);
  5216.             if($fp = bzopen($this->options['name'],"wb"))
  5217.             {
  5218.                 fseek($this->archive,0);
  5219.                 while($temp = fread($this->archive,1048576))
  5220.                 {
  5221.                     bzwrite($fp,$temp);
  5222.                 }
  5223.                 bzclose($fp);
  5224.                 chdir($Pwd);
  5225.             }
  5226.             else
  5227.             {
  5228.                 $this->error[] = "Could not open {$this->options['name']} for writing.";
  5229.                 chdir($Pwd);
  5230.                 return 0;
  5231.             }
  5232.         }
  5233.         else
  5234.         {
  5235.             $this->archive = bzcompress($this->archive,$this->options['level']);
  5236.         }
  5237.  
  5238.         return 1;
  5239.     }
  5240.  
  5241.     function open_archive()
  5242.     {
  5243.         return @bzopen($this->options['name'],"rb");
  5244.     }
  5245. }
  5246.  
  5247. class zip_file extends archive
  5248. {
  5249.     function zip_file($name)
  5250.     {
  5251.         $this->archive($name);
  5252.         $this->options['type'] = "zip";
  5253.     }
  5254.  
  5255.     function create_zip()
  5256.     {
  5257.         $files = 0;
  5258.         $offset = 0;
  5259.         $central = "";
  5260.  
  5261.         if(!empty($this->options['sfx']))
  5262.         {
  5263.             if($fp = @fopen($this->options['sfx'],"rb"))
  5264.             {
  5265.                 $temp = fread($fp,filesize($this->options['sfx']));
  5266.                 fclose($fp);
  5267.                 $this->add_data($temp);
  5268.                 $offset += strlen($temp);
  5269.                 unset($temp);
  5270.             }
  5271.             else
  5272.             {
  5273.                 $this->error[] = "Could not open sfx module from {$this->options['sfx']}.";
  5274.             }
  5275.         }
  5276.  
  5277.         $Pwd = getcwd();
  5278.         chdir($this->options['basedir']);
  5279.  
  5280.         foreach($this->files as $current)
  5281.         {
  5282.             if($current['name'] == $this->options['name'])
  5283.             {
  5284.                 continue;
  5285.             }
  5286.             $translate =  array('Ç'=>pack("C",128),'ü'=>pack("C",129),'é'=>pack("C",130),'â'=>pack("C",131),'ä'=>pack("C",132),
  5287.                                 'à'=>pack("C",133),'å'=>pack("C",134),'ç'=>pack("C",135),'ê'=>pack("C",136),'ë'=>pack("C",137),
  5288.                                 'è'=>pack("C",138),'ï'=>pack("C",139),'î'=>pack("C",140),'ì'=>pack("C",141),'Ä'=>pack("C",142),
  5289.                                 'Å'=>pack("C",143),'É'=>pack("C",144),'æ'=>pack("C",145),'Æ'=>pack("C",146),'ô'=>pack("C",147),
  5290.                                 'ö'=>pack("C",148),'ò'=>pack("C",149),'û'=>pack("C",150),'ù'=>pack("C",151),'_'=>pack("C",152),
  5291.                                 'Ö'=>pack("C",153),'Ü'=>pack("C",154),'£'=>pack("C",156),'¥'=>pack("C",157),'_'=>pack("C",158),
  5292.                                 'ƒ'=>pack("C",159),'á'=>pack("C",160),'í'=>pack("C",161),'ó'=>pack("C",162),'ú'=>pack("C",163),
  5293.                                 'ñ'=>pack("C",164),'Ñ'=>pack("C",165));
  5294.             $current['name2'] = strtr($current['name2'],$translate);
  5295.  
  5296.             $timedate = explode(" ",date("Y n j G i s",$current['stat'][9]));
  5297.             $timedate = ($timedate[0] - 1980 << 25) | ($timedate[1] << 21) | ($timedate[2] << 16) |
  5298.                 ($timedate[3] << 11) | ($timedate[4] << 5) | ($timedate[5]);
  5299.  
  5300.             $block = pack("VvvvV",0x04034b50,0x000A,0x0000,(isset($current['method']) || $this->options['method'] == 0)? 0x0000 : 0x0008,$timedate);
  5301.  
  5302.             if($current['stat'][7] == 0 && $current['type'] == 5)
  5303.             {
  5304.                 $block .= pack("VVVvv",0x00000000,0x00000000,0x00000000,strlen($current['name2']) + 1,0x0000);
  5305.                 $block .= $current['name2'] . "/";
  5306.                 $this->add_data($block);
  5307.                 $central .= pack("VvvvvVVVVvvvvvVV",0x02014b50,0x0014,$this->options['method'] == 0? 0x0000 : 0x000A,0x0000,
  5308.                     (isset($current['method']) || $this->options['method'] == 0)? 0x0000 : 0x0008,$timedate,
  5309.                     0x00000000,0x00000000,0x00000000,strlen($current['name2']) + 1,0x0000,0x0000,0x0000,0x0000,$current['type'] == 5? 0x00000010 : 0x00000000,$offset);
  5310.                 $central .= $current['name2'] . "/";
  5311.                 $files++;
  5312.                 $offset += (31 + strlen($current['name2']));
  5313.             }
  5314.             else if($current['stat'][7] == 0)
  5315.             {
  5316.                 $block .= pack("VVVvv",0x00000000,0x00000000,0x00000000,strlen($current['name2']),0x0000);
  5317.                 $block .= $current['name2'];
  5318.                 $this->add_data($block);
  5319.                 $central .= pack("VvvvvVVVVvvvvvVV",0x02014b50,0x0014,$this->options['method'] == 0? 0x0000 : 0x000A,0x0000,
  5320.                     (isset($current['method']) || $this->options['method'] == 0)? 0x0000 : 0x0008,$timedate,
  5321.                     0x00000000,0x00000000,0x00000000,strlen($current['name2']),0x0000,0x0000,0x0000,0x0000,$current['type'] == 5? 0x00000010 : 0x00000000,$offset);
  5322.                 $central .= $current['name2'];
  5323.                 $files++;
  5324.                 $offset += (30 + strlen($current['name2']));
  5325.             }
  5326.             else if($fp = @fopen($current['name'],"rb"))
  5327.             {
  5328.                 $temp = fread($fp,$current['stat'][7]);
  5329.                 fclose($fp);
  5330.                 $crc32 = crc32($temp);
  5331.                 if(!isset($current['method']) && $this->options['method'] == 1)
  5332.                 {
  5333.                     $temp = gzcompress($temp,$this->options['level']);
  5334.                     $size = strlen($temp) - 6;
  5335.                     $temp = substr($temp,2,$size);
  5336.                 }
  5337.                 else
  5338.                 {
  5339.                     $size = strlen($temp);
  5340.                 }
  5341.                 $block .= pack("VVVvv",$crc32,$size,$current['stat'][7],strlen($current['name2']),0x0000);
  5342.                 $block .= $current['name2'];
  5343.                 $this->add_data($block);
  5344.                 $this->add_data($temp);
  5345.                 unset($temp);
  5346.                 $central .= pack("VvvvvVVVVvvvvvVV",0x02014b50,0x0014,$this->options['method'] == 0? 0x0000 : 0x000A,0x0000,
  5347.                     (isset($current['method']) || $this->options['method'] == 0)? 0x0000 : 0x0008,$timedate,
  5348.                     $crc32,$size,$current['stat'][7],strlen($current['name2']),0x0000,0x0000,0x0000,0x0000,0x00000000,$offset);
  5349.                 $central .= $current['name2'];
  5350.                 $files++;
  5351.                 $offset += (30 + strlen($current['name2']) + $size);
  5352.             }
  5353.             else
  5354.             {
  5355.                 $this->error[] = "Could not open file {$current['name']} for reading. It was not added.";
  5356.             }
  5357.         }
  5358.  
  5359.         $this->add_data($central);
  5360.  
  5361.         $this->add_data(pack("VvvvvVVv",0x06054b50,0x0000,0x0000,$files,$files,strlen($central),$offset,
  5362.             !empty($this->options['comment'])? strlen($this->options['comment']) : 0x0000));
  5363.  
  5364.         if(!empty($this->options['comment']))
  5365.         {
  5366.             $this->add_data($this->options['comment']);
  5367.         }
  5368.  
  5369.         chdir($Pwd);
  5370.  
  5371.         return 1;
  5372.     }
  5373. }
  5374. // +--------------------------------------------------
  5375. // | THE END
  5376. // +--------------------------------------------------
  5377. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement