<?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);

?>
