getMessage(); } } } } $to = (string)($_POST['report_email'] ?? setting_get('report_email', '')); $daily = $_SERVER['REQUEST_METHOD'] === 'POST' && ($_POST['action'] ?? '') === 'email' ? isset($_POST['report_daily']) : setting_get('report_daily') === '1'; $hour = max(0, min(23, (int)($_POST['report_hour'] ?? setting_get('report_hour', '7')))); $status = setting_get('report_last_status'); $scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http'; $base = rtrim(str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME'])), '/'); $cronUrl = $scheme . '://' . ($_SERVER['HTTP_HOST'] ?? 'localhost') . $base . '/cron.php?token=' . cron_token(); page_header('Report & CSV'); ?>

Email report

Last report:

The report lists every spool (lowest first) with the full inventory attached as CSV. The morning email goes out on the first visit to the site after the chosen hour; for delivery at exactly that time, point a cron job or uptime monitor at:

CSV export

Download the whole inventory as a spreadsheet-friendly CSV — also handy as a backup.

Download CSV

CSV import

The first row must be a header row. Files from the export above round-trip as-is; at minimum a type column is required — weights that are missing are assumed to be full spools. A database backup is taken before every import.