getConnection(); // Exclude removed format types (Écriture, Image) $allFormats = $db->query("SELECT id, name FROM format_types WHERE name NOT IN ('Écriture', 'Image') ORDER BY sort_order, id") ->fetchAll(PDO::FETCH_ASSOC); $selectedFormats = isset($_POST['formats']) && is_array($_POST['formats']) ? array_map('intval', $_POST['formats']) : []; $adminMode = ($_POST['admin_mode'] ?? '0') === '1'; $editMode = ($_POST['edit_mode'] ?? '0') === '1'; $websiteUrl = htmlspecialchars($_POST['website_url'] ?? ''); $websiteLabel = htmlspecialchars($_POST['website_label'] ?? ''); ?>