$vDomaine . '/ajax_promoteur_hub.php', 'preloaderWait' => $strWait, 'i18n' => [ 'ajaxError' => $strAjaxError, ], ]; } /** Config injectée dans window.MS1_V2_INSCR_GESTION avant inscr-gestion.js */ function fxV2InscrGestionConfig($strLangue) { global $vDomaine; $strLangue = ($strLangue === 'en') ? 'en' : 'fr'; return [ 'domain' => $vDomaine, 'lang' => $strLangue, // MSIN-4401 — true = OCR dossard via serveur (Vision), pas Tesseract local. 'bibOcrCloud' => function_exists('fxInscrGestionBibOcrCloudEnabled') ? (bool)fxInscrGestionBibOcrCloudEnabled() : false, 'preloaderWait' => afficheTexte('preloader_wait', 0, 0, 1), 'refundCancelHint' => function_exists('fxInscrGestionT') ? fxInscrGestionT('inscr_gestion_refund_cancel_hint') : '', 'loginMessages' => [ 'txt_login' => function_exists('fxInscrGestionT') ? fxInscrGestionT('inscr_gestion_login_err_user') : '', 'txt_password' => function_exists('fxInscrGestionT') ? fxInscrGestionT('inscr_gestion_login_err_pass') : '', ], // MSIN-4401 — libellés Info injectés (pas de FR/EN en dur dans le JS). 'i18n' => function_exists('fxInscrGestionT') ? [ 'errLoad' => fxInscrGestionT('inscr_gestion_err_load'), 'errNetwork' => fxInscrGestionT('inscr_gestion_err_network'), 'errRefund' => fxInscrGestionT('inscr_gestion_err_refund'), 'refundOk' => fxInscrGestionT('inscr_gestion_refund_ok'), 'bibOcrNotConfigured' => fxInscrGestionT('inscr_gestion_bib_ocr_not_configured'), 'bibOcrVisionPrefix' => fxInscrGestionT('inscr_gestion_bib_ocr_vision_prefix'), 'bibOcrImageInvalid' => fxInscrGestionT('inscr_gestion_bib_ocr_image_invalid'), 'bibOcrNetwork' => fxInscrGestionT('inscr_gestion_bib_ocr_network'), 'bibOcrUnreadable' => fxInscrGestionT('inscr_gestion_bib_scan_invalid'), ] : [], ]; } /** À appeler dans inc_footer.php après inc_footer_scripts.php */ function fxV2RenderFooterScripts() { global $MS1_V2_SCRIPTS, $vDomaine, $strLangue; if (empty($MS1_V2_SCRIPTS) || !is_array($MS1_V2_SCRIPTS)) { return; } $mapFiles = [ 'bib-assignments' => '/js/v2/bib-assignments.js', 'inscr-gestion' => '/js/v2/inscr-gestion.js', 'promoteur-hub' => '/js/v2/promoteur-hub.js', ]; if (in_array('promoteur-hub', $MS1_V2_SCRIPTS, true)) { $cfg = fxV2PromoteurHubConfig($strLangue ?? 'fr'); echo '' . "\n"; } if (in_array('inscr-gestion', $MS1_V2_SCRIPTS, true)) { $cfg = fxV2InscrGestionConfig($strLangue ?? 'fr'); echo '' . "\n"; } foreach ($MS1_V2_SCRIPTS as $strName) { if (!isset($mapFiles[$strName])) { continue; } $strSrc = htmlspecialchars($vDomaine . $mapFiles[$strName], ENT_QUOTES, 'UTF-8'); echo '' . "\n"; } } }