add balance report
This commit is contained in:
25
_include/include_download_report.php
Normal file
25
_include/include_download_report.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
|
||||
# REPORT DOWNLOAD
|
||||
|
||||
if ($this->is_id()) {
|
||||
|
||||
if (!file_exists("./balance-report/{$this->get_id()}.csv")) {
|
||||
return;
|
||||
}
|
||||
|
||||
header('Content-type: application/csv');
|
||||
header("Content-disposition: attachment; filename=\"".$this->get_id().".csv\"");
|
||||
ob_clean();
|
||||
flush();
|
||||
readfile("./balance-report/{$this->get_id()}.csv");
|
||||
}
|
||||
|
||||
else {
|
||||
# NEM LEHET
|
||||
}
|
||||
|
||||
exit(1);
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user