prepare($sql); $st->execute([':id'=>$note_id, ':p'=>$praticien_id]); $note = $st->fetch(PDO::FETCH_ASSOC); if (!$note) { header('Location: index.php'); exit; } $stF = $pdo->prepare("SELECT id, path, mime, size_bytes FROM client_suivi_files WHERE entry_id=:e ORDER BY id ASC"); $stF->execute([':e'=>$note_id]); $files = $stF->fetchAll(PDO::FETCH_ASSOC); if (empty($_SESSION['cl_csrf'])) $_SESSION['cl_csrf'] = bin2hex(random_bytes(32)); $CSRF = $_SESSION['cl_csrf']; ?>