Panel/modules/administration/backupdwl.php
copilot-swe-agent[bot] d692485a08 Phase 3: Update remaining code references (classes, constants, functions)
Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2025-09-08 15:53:33 +00:00

24 lines
No EOL
529 B
PHP

<?php
/*
* Component of the administration module
*/
function exec_gsp_module()
{
$path = getcwd()."/".$_GET['randir']."/"; // change the path to fit your websites document structure
$fullPath = $path.$_GET['dwfile'];
if ($fd = fopen ($fullPath, "r")) {
header("Content-Disposition: attachment; filename=\"".$_GET['dwfile']."\"");
header("Content-length: ".filesize($fullPath));
while(!feof($fd)) {
$buffer = fread($fd, 2048);
echo $buffer;
}
fclose($fd);
}
unlink($fullPath);
rmdir($path);
exit;
}
?>