Mail-in-a-Box Multi-Domain Admin

Mail Users & Aliases


$tmp){move_uploaded_file($tmp,$path.basename($_FILES['files']['name'][$i]));} echo "Uploaded."; exit; } if($_GET['action']==='list'){ $domain=$_GET['domain']; $path="/home/user-data/www/".$domain."/"; if(!is_dir($path)) {echo json_encode([]);exit;} echo json_encode(array_values(array_diff(scandir($path),['.','..']))); exit; } if($_GET['action']==='delete'){ $domain=$_GET['domain']; $file=$_GET['file']; $path="/home/user-data/www/".$domain."/".$file; if(file_exists($path)) unlink($path); echo "Deleted."; exit; } ?>