AddOn - Reports

This commit is contained in:
Christian Paminger
2014-06-24 22:19:49 +00:00
parent c9a7814f44
commit 28e25f1a38
+8 -1
View File
@@ -113,11 +113,18 @@ switch ($outputformat)
echo $html;
break;
case 'csv':
header("Content-type: text/csv");
header("Content-Disposition: attachment; filename=data.csv");
header("Pragma: no-cache");
header("Expires: 0");
echo $csv;
break;
case 'json':
header("Content-type: application/json");
header("Content-Disposition: attachment; filename=data.json");
header("Pragma: no-cache");
header("Expires: 0");
//$array= array_map("str_getcsv",explode("\n", $csv));
echo json_encode($json);
}
?>