<?php
require_once '../../system/bootstrap.php';
require_auth();

$id = (int)($_GET['declaration_id'] ?? 0);
$path = get_pdf_path($id);

header('Content-Type: application/pdf');
header('Content-Disposition: inline; filename="MD_'.$id.'.pdf"');
readfile($path);
