';
if (fxInscrGestionShouldShowListBack((int)$_SESSION['com_id'])) {
fxInscrGestionRenderNavBack($strBackUrl, fxInscrGestionListBackLabel($strLangue));
}
fxInscrGestionRenderPageHead(fxInscrGestionT('inscr_gestion_title'), $strEveNom);
fxInscrGestionRenderQrPanel($intEveId, $strLangue);
// Recherche + filtres dans un seul panneau (repliable — ouvert par défaut tant qu'aucune recherche n'a été lancée).
global $objDatabase;
$tabEpreuves = $objDatabase->fxGetResults(
'SELECT * FROM inscriptions_epreuves e WHERE e.eve_id = ' . intval($intEveId) . ' AND epr_actif = 1 ORDER BY epr_id'
);
echo '';
echo '';
fxInscrGestionRenderPanelSummary(fxInscrGestionT('txt_recherche'), 'fa-search');
echo '';
echo '
';
echo '
';
echo '
';
// Tant qu'aucune recherche n'a été lancée, on n'affiche aucune inscription : seulement une invite.
if (!$blnSearchActive) {
echo '
';
// En-tete de colonnes (memes colonnes que les lignes ; masque en vue cellulaire).
// aria-hidden : purement visuel — libellés Info (pas de FR/EN en dur).
echo '
';
$strDetailsType = $blnEquipe && fxIsParEquipe($arrRow['pec_id_original'], $arrRow['epr_id'])
? fxInscrGestionT('promoteur_bib_show_teamates')
: fxInscrGestionT('epreuve_individuelle');
fxInscrGestionRenderFicheSectionStart(
'details',
fxInscrGestionT('inscr_gestion_details'),
'fa-info-circle',
($blnForceSectionsOpen || !$blnFromQr)
);
fxInscrGestionRenderKvListOpen(true);
fxInscrGestionRenderKvRow(fxInscrGestionT('inscr_gestion_epreuve'), fxInscrGestionEpreuveLabel($arrRow['epr_id'], $strLangue));
fxInscrGestionRenderKvRow(fxInscrGestionT('inscr_gestion_type'), $strDetailsType);
if ($blnEquipe) {
$strTeamNoFiche = trim(fxUnescape(isset($arrRow['no_equipe']) ? $arrRow['no_equipe'] : ''));
if ($strTeamNoFiche !== '') {
fxInscrGestionRenderKvRow(
fxInscrGestionT('inscr_gestion_list_team_no_label'),
$strTeamNoFiche
);
}
$strTeamNameFiche = trim(fxUnescape(isset($arrRow['pec_nom_equipe']) ? $arrRow['pec_nom_equipe'] : ''));
if ($strTeamNameFiche !== '') {
fxInscrGestionRenderKvRow(
fxInscrGestionT('inscr_gestion_list_team_name_label'),
$strTeamNameFiche
);
}
}
if ($blnCancelled) {
// MSIN-4405 — Detail de l'annulation (transferee / annulee) derive en lecture seule.
$strCause = fxGetAnnulationCause($arrRow['pec_id_original'], $arrRow['pec_actif']);
$strCancelVal = ''
. fxInscrGestionEsc(fxInscrGestionT('inscr_gestion_statut_' . $strCause)) . '';
if ($blnCanAudit && !empty($arrAuditFieldsWithLogs['is_cancelled'])) {
ob_start();
fxInscrGestionRenderAuditBang($intParId, 'is_cancelled', $blnCanAudit, $arrAuditFieldsWithLogs);
$strCancelVal .= ob_get_clean();
}
fxInscrGestionRenderKvRow(
fxInscrGestionT('inscr_gestion_annulation_titre'),
$strCancelVal,
true
);
}
fxInscrGestionRenderKvRow(fxInscrGestionT('inscr_gestion_modified'), fxCheckMAJ($arrRow['pec_id_original'], $intParId, $strLangue), true);
fxInscrGestionRenderFicheProfileKvRows($arrRow, $strLangue);
fxInscrGestionRenderKvListClose();
fxInscrGestionRenderFicheSectionEnd();
$strStyleEdit = $strStyleCancel = '';
$strStyleRetablir = ' d-none';
if ($blnCancelled) {
$strStyleEdit = $strStyleCancel = ' d-none';
$strStyleRetablir = '';
}
// Libelle du bouton de renvoi (facture/invitation) : passe par la table info pour etre editable.
$strRenvoi = fxInscrGestionT('inscr_gestion_renvoi');
if ($blnHasGestion || $blnInspect) {
// MSIN — a l'ouverture de la fiche, seul l'onglet Détails reste deploye (sauf kit sections ouvertes).
fxInscrGestionRenderFicheSectionStart(
'gestion',
fxInscrGestionT('inscr_gestion_section_management'),
'fa-cog',
$blnForceSectionsOpen
);
echo '
';
// MSIN-4401 — Chaque action = wrap [controle][cadenas a droite] (evite badge orphelin a gauche).
if ($blnCanInvoice) {
fxInscrGestionActionItemOpen();
echo '' . fxInscrGestionEsc(fxInscrGestionT('inscr_gestion_show_invoice')) . '';
echo '' . fxInscrGestionEsc($arrRow['no_commande']) . '';
fxInscrGestionPermInspectEcho('inscriptions_gestion.invoice');
fxInscrGestionActionItemClose();
} elseif ($blnInspect) {
fxInscrGestionActionItemOpen('inscr-gestion-action-item--inspect-only');
fxInscrGestionPermInspectEchoHidden('inscriptions_gestion.invoice', fxInscrGestionT('inscr_gestion_show_invoice'));
fxInscrGestionActionItemClose();
}
if ($blnCanTransaction) {
fxInscrGestionActionItemOpen();
echo '';
fxInscrGestionPermInspectEcho('inscriptions_gestion.transaction');
fxInscrGestionActionItemClose();
} elseif ($blnInspect) {
fxInscrGestionActionItemOpen('inscr-gestion-action-item--inspect-only');
fxInscrGestionPermInspectEchoHidden('inscriptions_gestion.transaction', fxInscrGestionT('inscr_gestion_show_transaction'));
fxInscrGestionActionItemClose();
}
if ($blnCanEdit) {
// d-none sur le wrap entier (pas seulement le bouton) pour ne pas laisser le cadenas orphelin.
fxInscrGestionActionItemOpen(trim($strStyleEdit));
echo '';
fxInscrGestionPermInspectEcho('inscriptions_gestion.edit');
fxInscrGestionActionItemClose();
} elseif ($blnInspect) {
fxInscrGestionActionItemOpen('inscr-gestion-action-item--inspect-only');
fxInscrGestionPermInspectEchoHidden('inscriptions_gestion.edit', fxInscrGestionT('inscr_gestion_modifier_participant'));
fxInscrGestionActionItemClose();
}
if ($blnCanRefund) {
fxInscrGestionActionItemOpen();
echo '';
fxInscrGestionPermInspectEcho('inscriptions_gestion.refund');
fxInscrGestionActionItemClose();
} elseif ($blnInspect) {
fxInscrGestionActionItemOpen('inscr-gestion-action-item--inspect-only');
fxInscrGestionPermInspectEchoHidden('inscriptions_gestion.refund', fxInscrGestionT('inscr_gestion_remboursement'));
fxInscrGestionActionItemClose();
}
if ($blnCanCancel) {
fxInscrGestionActionItemOpen(trim($strStyleCancel));
echo '';
fxInscrGestionPermInspectEcho('inscriptions_gestion.cancel');
fxInscrGestionActionItemClose();
} elseif ($blnInspect) {
fxInscrGestionActionItemOpen('inscr-gestion-action-item--inspect-only');
fxInscrGestionPermInspectEchoHidden('inscriptions_gestion.cancel', fxInscrGestionT('btn_annulerinscriptions'));
fxInscrGestionActionItemClose();
}
if ($blnCanRestore) {
fxInscrGestionActionItemOpen(trim($strStyleRetablir));
echo '';
fxInscrGestionPermInspectEcho('inscriptions_gestion.restore');
fxInscrGestionActionItemClose();
} elseif ($blnInspect) {
fxInscrGestionActionItemOpen('inscr-gestion-action-item--inspect-only');
fxInscrGestionPermInspectEchoHidden('inscriptions_gestion.restore', fxInscrGestionT('btn_retablirinscriptions'));
fxInscrGestionActionItemClose();
}
// MSIN-4464 — historique annulation si pas deja affiche a cote du badge (fiche active).
if ($blnCanAudit && !empty($arrAuditFieldsWithLogs['is_cancelled']) && !$blnCancelled) {
fxInscrGestionActionItemOpen();
echo ''
. fxInscrGestionEsc(fxInscrGestionT('inscr_gestion_audit_field_is_cancelled'));
fxInscrGestionRenderAuditBang($intParId, 'is_cancelled', $blnCanAudit, $arrAuditFieldsWithLogs);
echo '';
fxInscrGestionActionItemClose();
}
if ($blnInspect) {
fxInscrGestionPermInspectEcho('inscriptions_gestion.audit_view');
}
if ($blnCanRenvoi) {
fxInscrGestionActionItemOpen();
echo '';
fxInscrGestionPermInspectEcho('inscriptions_gestion.renvoi');
fxInscrGestionActionItemClose();
} elseif ($blnInspect) {
fxInscrGestionActionItemOpen('inscr-gestion-action-item--inspect-only');
fxInscrGestionPermInspectEchoHidden('inscriptions_gestion.renvoi', $strRenvoi);
fxInscrGestionActionItemClose();
}
echo '
';
if ($blnCanRefund) {
// Panneau de remboursement : vide au depart, rempli en AJAX a la 1ere ouverture (action=refund_form).
// data-loaded evite de recharger inutilement ; data-no_panier identifie la commande cote serveur.
// Place AVANT le panneau transaction pour qu'a l'ouverture le formulaire apparaisse au-dessus du detail.
echo '';
}
// Panneau de transaction : vide au depart, rempli en AJAX a la 1ere ouverture (action=transaction_resume).
// Sous les boutons, repliable, accessible a tout moment (independant du remboursement).
if ($blnCanTransaction) {
echo '';
}
fxInscrGestionRenderFicheSectionEnd();
}
if ($blnHasEditable || $blnInspect) {
// MSIN — champs modifiables fermes par defaut ; ouverts si scan QR ou kit « sections ouvertes ».
fxInscrGestionRenderFicheSectionStart(
'editable',
fxInscrGestionT('inscr_gestion_section_editable'),
'fa-pencil-square-o',
($blnForceSectionsOpen || $blnFromQr)
);
if ($blnCanBib) {
$strFullBibInputId = $strBibInputId . $intParId;
// Scanner OCR toujours offert sur la fiche de gestion : la saisie se fait
// souvent au cellulaire / a une table d'inscription. La lecture est 100%
// cote client (Tesseract.js) et ne touche aucun endpoint serveur protege.
$blnCanBibScan = true;
echo '
';
if ($blnCanBibScan) {
fxInscrGestionRenderBibScanBlock($strFullBibInputId, $strLangue);
}
echo '
';
echo '';
// MSIN-4430 — OK avant camera (action principale a gauche du scan).
echo '';
if ($blnCanBibScan) {
echo '';
}
fxInscrGestionPermInspectEcho('inscriptions_gestion.bib_edit');
echo '