0) { $prod = $produits[0]; $prod['referencement'] = array (); for ($i = 0; $i < count ($referencements); $i++) { $prod['referencement'][$i] = $referencements[$i]['client']; } $tmpfile = tempnam ($tmpdir, "lutece"); $prod['what'] = 'full'; $prod['lut'] = $lut; make_pdf ($prod, $tmpfile); $p_ref = $prod['ref']; header ("Content-Type: application/pdf"); header ("Content-Disposition: attachment ; filename=prod_$p_ref.pdf"); readfile ($tmpfile); unlink ($tmpfile); } else { echo "Erreur, l'identifiant de produit demandé n'existe pas...."; } ?>