| 1 | <?php |
| 2 | require_once __DIR__ . '/inc/auth.php'; |
| 3 | require_once __DIR__ . '/inc/report.php'; |
| 4 | |
| 5 | require_login(); |
| 6 | |
| 7 | $csv = inventory_csv(); |
| 8 | header('Content-Type: text/csv; charset=UTF-8'); |
| 9 | header('Content-Disposition: attachment; filename="filaments-' . date('Y-m-d') . '.csv"'); |
| 10 | header('Content-Length: ' . strlen($csv)); |
| 11 | header('Cache-Control: no-store'); |
| 12 | echo $csv; |
| 13 |