Feature: Added alerts output to capture system (#4574)

* Feature: Added alerts output to capture system

* Renamed $output to $content

* removed duplicate functions
This commit is contained in:
Neil Lathwood
2016-09-26 22:27:27 +01:00
committed by Tony Murray
parent 601074606d
commit 9936aa77ff
5 changed files with 92 additions and 14 deletions

View File

@ -1343,3 +1343,21 @@ function ipmiSensorName($hardwareId, $sensorIpmi, $rewriteArray)
return $sensorIpmi;
}
}
/**
* @param $filename
* @param $content
*/
function file_download($filename, $content)
{
$length = strlen($content);
header('Content-Description: File Transfer');
header('Content-Type: text/plain');
header("Content-Disposition: attachment; filename=$filename");
header('Content-Transfer-Encoding: binary');
header('Content-Length: ' . $length);
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Expires: 0');
header('Pragma: public');
echo $content;
}