fxGetVar($sqlEpreuvesCommandee);
if ($intEpreuveCommandee != null) {
$intpec_id = $_GET['pec_id'] = $intEpreuveCommandee;
} else {
die('erreur');
}
}
if (isset($_SESSION['no_panier'])) {
$boolTable = false;
$intId = $intpec_id;
} else {
$boolTable = true;
$intId = $_GET['pec_id'];
}
$tabInscription = fxGetPanierParticipantsEpreuve($intId, $boolTable, $intpec_id);
$tabParticipant = $tabInscription['participants'];
$tabPartQuestions = $tabInscription['questions'];
// enlever reponce tq;
//MSIN-4313
if(trim($strNoTransfert) != ''){
if (trim($strNoTransfert) !== '') {
foreach ($tabPartQuestions[1] as $que_id => $question) {
if (!empty($question['que_transfert_bloquer']) && (int)$question['que_transfert_bloquer'] === 1) {
unset($tabPartQuestions[1][$que_id]);
}
}
}
}
$tabEpreuveQuestions = $tabInscription['questions_epreuve'];
$tabInfosEpreuve = $tabInscription['epreuve'];
if ($tabParticipant == null)
$intNbParticipants = 0;
}
$tabDates = fxGetDatesAge($intEpreuve);
// initialiser les variables
$strRules = $strMessages = '';
$tabCalendriers = $tabCodepostal = $tabTelephones = array();
if ($tabEpreuve['tep_id'] == 4){
echo afficheTexte('participant-text-membre', 0);
echo('
');
}
if ($strAction != 'mod' && $intInvitation == 0) {// bouton copier les infos...
if (isset($_SESSION['com_id'])) {
$strFirstName = fxUnescape($_SESSION['com_info']['com_prenom']);
$intDateAge = $tabEpreuve['epr_date_age'];
$intAge = filter_var(fxGetAge($_SESSION['com_info']['com_naissance'], $intDateAge), FILTER_SANITIZE_NUMBER_INT);
// vérifier si on peut copier les infos du compte
echo $strBouton = fxShowCopyButtons($tabEvenement, $tabEpreuve, $tabChampsValues, $strFirstName, $intAge, $intDateAge, $_SESSION['com_id'], $_SESSION['com_info'], 'compte', $strLangue);
// ajouter les bouton copy pour membres affilier (sl)
// liste des compte affilie
$infoAffilie = fxGetInfosAffilies($_SESSION['com_id']);
// print("
".print_r($infoAffilie,true)."
");
if ($infoAffilie != null){
foreach ($infoAffilie as $intCtr => $arrAff) {
$intDateAge = $tabEpreuve['epr_date_age'];
$blnShowButton = true;
$strMessageUser = '';
$strFirstName = fxUnescape($arrAff['com_prenom']);
$intAge = filter_var(fxGetAge($arrAff['com_naissance'], $intDateAge), FILTER_SANITIZE_NUMBER_INT);
echo $strBouton = fxShowCopyButtons($tabEvenement, $tabEpreuve, $tabChampsValues, $strFirstName, $intAge, $intDateAge, $arrAff['com_id'], $arrAff, 'affilie', $strLangue);
}
}
}
}
// si ces un abbonement mettre en read (sl)
if ($tabEpreuve['tep_id'] == 4) {
$strReadonly = ' readonly';
$strDisabled = ' disabled';
}
if (isset($_SESSION['no_panier']) && $strAction != 'mod' && $intInvitation == 0) {
$tabParticipants = fxGetPanierParticipants($_SESSION['no_panier']);
$tabChampsValues = fxGetInfosChamps($tabEvenement['general']['eve_id'], 'par');
// si abonnement pas de Copier les informations d'un participant du panier:
if ($tabParticipants != null && $tabEpreuve['tep_id'] != 4) {
?>
|
|
$value) {
echo $strBouton = fxShowCopyButtons($tabEvenement, $tabEpreuve, $tabChampsValues, $value['nom'], 0, 0, $x, $_SESSION['panier_info'][$x], 'panier', $strLangue);
$x++;
}
?>
« Retour
« Back
fxGetVar($sqlCategoriePrix);
if ($intCategoriePrix != NULL)
$strWhere = " AND c.cp_id = " . intval($intCategoriePrix);
}
$sqlPrix = "SELECT p.eve_id,p.ep_montant, p.ep_frais_montant, p.ep_frais_tps, p.ep_frais_tvq, p.ep_id, p.ep_prix_participant, c.cp_id, c.cp_details_fr, c.cp_details_en, p.ep_montant_don FROM inscriptions_epreuves_prix p, inscriptions_categories_prix c WHERE p.cp_id = c.cp_id AND p.epr_id = " . intval($intEpreuve) . " AND p.ep_date_limite >= '" . fxGetDate() . "'" . $strWhere . " ORDER BY p.ep_date_limite LIMIT 1";
$tabPrix = $objDatabase->fxGetRow($sqlPrix);
// MSIN-4296
// caculer les frais d'administration
// info événements
$sqlEvenements = "SELECT * FROM inscriptions_panier_evenements WHERE eve_id = " . intval($tabPrix['eve_id']);
$tabEvenements = $objDatabase->fxGetRow($sqlEvenements);
$fltSousTotal2=$tabPrix['ep_montant']+$tabPrix['ep_frais_montant']+$tabPrix['ep_frais_tps']+$tabPrix['ep_frais_tvq'];
// afaire fxCalculerFrais(
if ($tabEvenements['eve_frais'] > 0) {
$fltTotalTaxesFrais=0;
$sqlFrais = "SELECT fra_avant_tx, fra_avant_tx AS fra_total, fra_pourcent FROM inscriptions_frais WHERE fra_actif = 1 AND fra_montant_max >= " . floatval($fltSousTotal2) . " AND fra_montant_min <= " . floatval($fltSousTotal2) . " AND eve_frais = " . intval($tabEvenements['eve_frais']);
$tabFrais2 = $objDatabase->fxGetRow($sqlFrais);
$fltFraisAvantTaxes = 0;
if ($tabFrais2 != null) {
if ($tabFrais2['fra_pourcent'] > 0) {
$fltFraisAvantTaxes = round($fltSousTotal2 * ($tabFrais2['fra_pourcent'] / 100), 2);
$fltPourcent = $tabFrais2['fra_pourcent'];
} else {
$fltFraisAvantTaxes = $tabFrais2['fra_avant_tx'];
$fltPourcent = 0;
}
if ($tabEvenements['tt_id'] > 1) {
$sqlTaux = "SELECT t.tau_nom_fr, t.tau_nom_en, t.tau_taux, t.tau_numero_client, t.tau_numero_ms1 FROM inscriptions_taux t, inscriptions_taux_types_taux ttt WHERE t.tau_id = ttt.tau_id AND ttt.tt_id = " . intval($tabEvenements['tt_id']) . " ORDER BY ttt.ttt_tri";
$tabTaux = $objDatabase->fxGetResults($sqlTaux);
if ($tabTaux != null) {
for ($intCtr = 1; $intCtr <= count($tabTaux); $intCtr++) {
$fltMontantTaxesFrais = round($fltFraisAvantTaxes * ($tabTaux[$intCtr]['tau_taux'] / 100), 2);
$tabTaxesFrais[$intCtr] = array('label_fr' => $tabTaux[$intCtr]['tau_nom_fr'] . ' (' . $tabTaux[$intCtr]['tau_taux'] . '%)', 'label_en' => $tabTaux[$intCtr]['tau_nom_en'] . ' (' . $tabTaux[$intCtr]['tau_taux'] . '%)', 'montant' => $fltMontantTaxesFrais, 'taux' => $tabTaux[$intCtr]['tau_taux'], 'numero' => $tabTaux[$intCtr]['tau_numero_ms1']);
$fltTotalTaxesFrais += $fltMontantTaxesFrais;
}
} else {
fxcreer_log("Il y a eu une erreur lors de la récupération des taxes:\n" . $sqlTaux);
}
}
$tabFrais = array('fra_avant_tx' => $fltFraisAvantTaxes, 'fra_total' => $fltFraisAvantTaxes + $fltTotalTaxesFrais, 'fra_pourcent' => $fltPourcent);
$tabPrix["fra_avant_tx"]=$fltFraisAvantTaxes;
$tabPrix["fra_total"]=$fltFraisAvantTaxes + $fltTotalTaxesFrais;
$tabPrix["fra_pourcent"]=$fltPourcent;
} else {
fxcreer_log("Il y a eu une erreur lors de la récupération des frais de l'événement:\n" . $sqlFrais);
$tabFrais = array('fra_avant_tx' => 0, 'fra_total' => 0, 'fra_pourcent' => 0);
}
} else {
$tabPrix["fra_avant_tx"]=0;
$tabPrix["fra_total"]=0;
$tabPrix["fra_pourcent"]=0;
}
return $tabPrix;
}
function fxCheckNomEquipe($intEpreuve, $strNomEquipe, $int_Pecid = 0) {
global $objDatabase;
$sqlNbEquipe = "SELECT COUNT(e.pec_nom_equipe) FROM inscriptions_panier_epreuves_commandees e, inscriptions_panier_acheteurs a WHERE e.no_panier = a.no_panier AND e.epr_id = " . intval($intEpreuve) . " AND (a.sta_id = 3 OR a.sta_id = 1) AND e.pec_nom_equipe = '" . $objDatabase->fxEscape($strNomEquipe) . "' AND e.pec_id <> " . intval($int_Pecid);
$intNbEquipe = $objDatabase->fxGetVar($sqlNbEquipe);
return $intNbEquipe;
}
function fxChecktriathlon($strNumero, $strNaissancee) {
global $objDatabase;
$sqltriathlon = "SELECT count(tq_no) FROM inscriptions_tq WHERE tq_no = '" . trim($strNumero) . "' AND tq_naissance = '" . trim($strNaissancee) . "'";
$inttriathlon = $objDatabase->fxGetVar($sqltriathlon);
return $inttriathlon;
}
function fxCheckfnq($strNumero, $strNaissancee) {
global $objDatabase;
$sqltriathlon = "SELECT count(tq_no) FROM inscriptions_fnq WHERE tq_no = '" . trim($strNumero) . "' AND tq_naissance = '" . trim($strNaissancee) . "'";
$inttriathlon = $objDatabase->fxGetVar($sqltriathlon);
return $inttriathlon;
}
/* Description : fxchangevalueparticipant (SL/JSP)
* Parametres : champs, donnnés, provenance (compte, participant)
* Date : 2013-04-24
* : 2013-11-21
*/
function fxCreateJavaChange($mem_change, $mem_value, $provenance, $strFunctionName, $arrData) {
$list_change = explode(",", $mem_change);
$list_value = explode(",", $mem_value);
$tabDate = array();
$intCountryKey = 0;
$strOutput = '
';
return $strOutput;
}
function fxCreateJavaChangeaffilie($mem_change, $mem_value, $provenance, $intIndex = 0, $arrAff) {
$list_change = explode(",", $mem_change);
$list_value = explode(",", $mem_value);
$tabDate = array();
$intCountryKey = 0;
?>
fxGetRow($sqlAges);
return $tabAges;
}
// fonction pour trouver le data des participants a une epreuve
// le parametre resultat va servir plus tard pour choisir si on modifie le cart ou resultat
function fxGetPanierParticipantsEpreuve($par_id, $resultat = 'true', $intpec_id) {
global $objDatabase;
$tabQuestions = $tabQuestionsEpreuve = $tabEpreuve = null;
// parametrer table pour requete sql; quelle table interroger selon que l'on est dans le cart ou dans la liste d'inscriptions
if ($resultat == 'true') {
$strTablePart = "resultats_participants";
$strTableQuestion = "resultats_questions";
$strTableEpreuve = "resultats_epreuves_commandees";
$sqlParticipants = "SELECT * FROM " . $strTablePart . " WHERE pec_id = " . intval($intpec_id) . " ORDER BY par_id";
$tabParticipants = $objDatabase->fxGetResults($sqlParticipants);
} else {
$strTablePart = "inscriptions_panier_participants";
$strTableQuestion = "inscriptions_panier_questions";
$strTableEpreuve = "inscriptions_panier_epreuves_commandees";
$sqlParticipants = "SELECT * FROM " . $strTablePart . " WHERE pec_id = " . intval($intpec_id) . " ORDER BY par_id";
$tabParticipants = $objDatabase->fxGetResults($sqlParticipants);
}
if ($tabParticipants != null) {
for ($intCtr = 1; $intCtr <= count($tabParticipants); $intCtr++) {
// info questions
if ($resultat == 'true') {
//MSIN-4313
$sqlQuestions = "SELECT rq.que_id, rq.pqu_id, rq.par_id, rq.pec_id, rq.que_choix_fr, rq.que_choix_en, rq.que_modifiable, rq.no_panier,
iq.que_transfert_bloquer FROM " . $strTableQuestion . " rq LEFT JOIN inscriptions_questions iq
ON iq.que_id = rq.que_id WHERE rq.que_actif = 1 AND rq.pec_id = " . intval($intpec_id) . " AND rq.par_id = " . intval($tabParticipants[$intCtr]['par_id_original']);
} else {
$sqlQuestions = "SELECT que_id, pqu_id, par_id, pec_id, que_choix_fr, que_choix_en, que_modifiable, no_panier FROM " . $strTableQuestion . " WHERE pec_id = " . intval($intpec_id) . " AND par_id = " . intval($tabParticipants[$intCtr]['par_id']);
}
$recQuestions = $objDatabase->fxGetResultsKey($sqlQuestions);
$tabQuestions[$intCtr] = $recQuestions;
}
}
// sortir les questions de l'épreuve
if ($resultat == 'true') {
$sqlQuestionsEpreuve = "SELECT que_id, pqu_id, par_id, pec_id, que_choix_fr, que_choix_en, que_modifiable, no_panier FROM " . $strTableQuestion . " WHERE que_actif = 1 AND pec_id = " . intval($intpec_id) . " AND par_id = 0";
$sqlEpreuve = "SELECT * FROM " . $strTableEpreuve . " WHERE pec_id_original = " . intval($intpec_id);
} else {
$sqlQuestionsEpreuve = "SELECT que_id, pqu_id, par_id, pec_id, que_choix_fr, que_choix_en, que_modifiable, no_panier FROM " . $strTableQuestion . " WHERE pec_id = " . intval($intpec_id) . " AND par_id = 0";
$sqlEpreuve = "SELECT * FROM " . $strTableEpreuve . " WHERE pec_id = " . intval($intpec_id);
}
$tabQuestionsEpreuve = $objDatabase->fxGetResultsKey($sqlQuestionsEpreuve);
// sortir les infos de l'épreuve
$tabEpreuve = $objDatabase->fxGetResults($sqlEpreuve);
$mem_return['participants'] = $tabParticipants;
$mem_return['questions'] = $tabQuestions;
$mem_return['questions_epreuve'] = $tabQuestionsEpreuve;
$mem_return['epreuve'] = $tabEpreuve;
return $mem_return;
}
// fonction qui vérifie le nombre max de réservation d'épreuves par client pour un événement (JSP)
// param : id de l'événement, id du compte client, langue d'affichage
// créé : 2014-07-16
function fxCheckMaxEpreuves($intEvenement, $intCompte, $strLangue) {
global $objDatabase;
$sqlMax = "SELECT eve_nb_max AS max, (SELECT COUNT(e.pec_id) FROM inscriptions_panier_epreuves_commandees e, inscriptions_panier_acheteurs a WHERE a.no_panier = e.no_panier AND a.sta_id IN(1,3) AND e.eve_id = " . intval($intEvenement) . " AND e.com_id = " . intval($intCompte) . ") AS nb, eve_label_url FROM inscriptions_evenements WHERE eve_id = " . intval($intEvenement);
$tabMax = $objDatabase->fxGetRow($sqlMax);
if ($tabMax != null) {
if ($tabMax['max'] != 0 && $tabMax['nb'] >= $tabMax['max']) {
// message d'erreur et redirection
if ($strLangue == 'fr')
$_SESSION['msg'] = 'e129';
else
$_SESSION['msg'] = 'e529';
header('Location: ' . $GLOBALS['vDomaine'] . '/' . $tabMax['eve_label_url'] . '/' . $strLangue);
exit;
} else
return true;
} else
return true;
}
function fxCheckAccesEpreuve($strAction, $intEpreuve, $intEvenement, $intpec_id, $intPromoteur, $strNoTransfert) {
global $objDatabase;
$strWhere = "";
$blnReturn = false;
if ($strAction == 'add' && intval($intpec_id) == 0) {
$sqlEpreuve = "SELECT COUNT(*) FROM inscriptions_epreuves WHERE eve_id = " . intval($intEvenement) . " AND epr_id = " . intval($intEpreuve);
$nbEpreuve = $objDatabase->fxGetVar($sqlEpreuve);
if ($nbEpreuve != null && intval($nbEpreuve) == 1) {
$blnReturn = true;
}
} else {
if (!isset($_GET['switch'])) {
$strWhere = " AND epr_id = " . intval($intEpreuve);
}
if (trim($strNoTransfert) != '' && intval($intpec_id) != 0) {
$strWhere = str_replace('epr_id', 'e.epr_id', $strWhere);
$sqlTransfert = "SELECT COUNT(*) FROM inscriptions_transferts t, resultats_epreuves_commandees e WHERE t.ts_id IN(1, 5) AND t.pec_id = " . intval($intpec_id) . " AND t.pec_id = e.pec_id_original AND t.no_transfert = '" . $objDatabase->fxEscape($strNoTransfert) . "'" . $strWhere;
$nbTransfert = $objDatabase->fxGetVar($sqlTransfert);
if ($nbTransfert != null && intval($nbTransfert) == 1) {
$blnReturn = true;
}
} elseif (intval($intPromoteur) == 1 && isset($_SESSION['com_info']) && intval($intpec_id) != 0) { // si modif par promoteur
// MSIN-4474 — legacy CSV + super-admin + accès v2 (sinon Suivant changement d'épreuve absent)
$strCsvPromoteur = isset($_SESSION['com_info']['com_eve_promoteur'])
? (string)$_SESSION['com_info']['com_eve_promoteur']
: '';
$arrEvenements = array();
foreach (array_map('trim', explode(',', $strCsvPromoteur)) as $strEveId) {
if ($strEveId !== '') {
$arrEvenements[] = intval($strEveId);
}
}
if (in_array(intval($intEvenement), $arrEvenements, true)) {
$blnReturn = true;
}
if (!$blnReturn) {
if (!function_exists('fxEveAccesIsSuperAdminSession')) {
require_once dirname(__FILE__) . '/inc_fx_eve_acces.php';
}
if (fxEveAccesIsSuperAdminSession()) {
$blnReturn = true;
} elseif (!empty($_SESSION['com_info']['com_id'])
&& fxEveAccesHasInscrGestionWebAccess(intval($_SESSION['com_info']['com_id']), intval($intEvenement))) {
$blnReturn = true;
}
}
} elseif (intval($intPromoteur) == 0 && isset($_SESSION['com_info']) && !isset($_SESSION['no_panier']) && intval($intpec_id) != 0) { // si modif d'une épreuve déjà commandée
$sqlEpreuve = "SELECT COUNT(*) FROM resultats_epreuves_commandees WHERE pec_id_original = " . intval($intpec_id) . " AND com_id = " . intval($_SESSION['com_info']['com_id']) . $strWhere;
$nbEpreuve = $objDatabase->fxGetVar($sqlEpreuve);
if ($nbEpreuve != null && intval($nbEpreuve) == 1) {
$blnReturn = true;
}
} elseif (intval($intPromoteur) == 0 && isset($_SESSION['no_panier']) && intval($intpec_id) != 0) { // si modif d'une épreuve du panier en cours
$sqlEpreuve = "SELECT COUNT(*) FROM inscriptions_panier_epreuves_commandees WHERE pec_id = " . intval($intpec_id) . " AND no_panier = '" . $objDatabase->fxEscape($_SESSION['no_panier']) . "'";
$nbEpreuve = $objDatabase->fxGetVar($sqlEpreuve);
if ($nbEpreuve != null && intval($nbEpreuve) == 1) {
$blnReturn = true;
}
}
}
return $blnReturn;
}
function fxShowCopyButtons($tabEvenement, $tabEpreuve, $tabChampsValues, $strFirstName, $intAge, $intDateAge, $intCompte, $arrData, $strProvenance, $strLangue) {
global $vDomaine;
$blnShowButton = true;
$strOutput = $strButton = $strMessageUser = $strClass = '';
if (trim($strProvenance) == 'panier') {
$strFunctionName = "change_value_" . $strProvenance . "_" . $intCompte . "()";
$strOutput = fxCreateJavaChange($tabChampsValues['champs'], $tabChampsValues['values'], $strProvenance, $strFunctionName, $arrData);
$strOutput .= '
|
' . $strFirstName . '
|
|
';
} else {
if (intval($tabEvenement['general']['eve_id_membership']) != 0) {
$arrEvenemenMembership = fxGetEvenementsId($tabEvenement['general']['eve_id_membership']);
$strLangueLink = ($strLangue) == 'fr' ? '' : '/en';
// valide l'âge de la personne
if ($intAge >= $tabEpreuve['epr_age_min'] && $intAge <= $tabEpreuve['epr_age_max']) {
$mem_abon = fxGetAbonnement(0, 1, $intCompte, 0);
if ($mem_abon == null) { //pas membre
$blnShowButton = true;
$strClass = 'warning';
$strMessageUser .= afficheTexte('participant-text-non-membre-athlete', 0);
$strMessageUser = str_replace('%membership%', '' . $arrEvenemenMembership['eve_nom_' . $strLangue] . '', $strMessageUser);
$strMessageUser = str_replace('%link%', $vDomaine . '/' . $arrEvenemenMembership['eve_label_url'] . $strLangueLink, $strMessageUser);
} else { // si déjà membre
// vérifier si l'adhésion est valide à la date de l'épreuve
if ($mem_abon['mem_date_debut'] <= $tabEpreuve['epr_date'] && $mem_abon['mem_date_fin'] >= $tabEpreuve['epr_date']) {
$blnShowButton = true;
$strClass = 'success';
$strMessageUser .= afficheTexte('participant-text-membre-athlete', 0);
$strMessageUser = str_replace('%membership%', '' . $arrEvenemenMembership['eve_nom_' . $strLangue] . '', $strMessageUser);
$strMessageUser = str_replace('%number%', '#' . $mem_abon['mem_numero'] . '', $strMessageUser);
$strMessageUser = str_replace('%date_debut%', '' . fxShowDate($mem_abon['mem_date_debut'], $strLangue) . '', $strMessageUser);
$strMessageUser = str_replace('%date_fin%', '' . fxShowDate($mem_abon['mem_date_fin'], $strLangue) . '', $strMessageUser);
} else {
$blnShowButton = true;
$strClass = 'warning';
$strMessageUser .= afficheTexte('participant-text-non-membre-athlete-date', 0);
$strMessageUser = str_replace('%membership%', '' . $arrEvenemenMembership['eve_nom_' . $strLangue] . '', $strMessageUser);
$strMessageUser = str_replace('%link%', $vDomaine . '/' . $arrEvenemenMembership['eve_label_url'] . $strLangueLink, $strMessageUser);
}
}
} else {
$blnShowButton = false;
$strClass = 'danger';
$strMessageUser .= afficheTexte('participant-text-insription-age', 0);
$strMessageUser = str_replace('%age%', '' . $tabEpreuve['epr_age_min'] . '-' . $tabEpreuve['epr_age_max'] . '', $strMessageUser);
$strMessageUser = str_replace('%date%', '' . fxShowDate($intDateAge, $strLangue) . '', $strMessageUser);
}
} elseif ($tabEpreuve['tep_id'] == 4) { // si c'est un abonnement, voir s'il est valide
$mem_abon = fxGetAbonnement(0, $tabEpreuve['mt_id'], $intCompte, $tabEpreuve['epr_id']);
if ($mem_abon == null) { //pas membre
// valide l'âge de la personne
if ($intAge >= $tabEpreuve['epr_age_min'] && $intAge <= $tabEpreuve['epr_age_max']) {
$blnShowButton = true;
} else {
$blnShowButton = false;
$strClass = 'danger';
$strMessageUser .= afficheTexte('participant-text-membre-age', 0);
$strMessageUser = str_replace('%age%', '' . $tabEpreuve['epr_age_min'] . '-' . $tabEpreuve['epr_age_max'] . '', $strMessageUser);
$strMessageUser = str_replace('%date%', '' . fxShowDate($intDateAge, $strLangue) . '', $strMessageUser);
}
} else { // si déjà membre
$blnShowButton = false;
$strClass = 'success';
$strMessageUser .= afficheTexte('participant-text-membre-deja', 0);
$strMessageUser = str_replace('%date%', '' . fxShowDate($mem_abon['mem_date_fin'], $strLangue) . '', $strMessageUser);
}
} else {
// valide l'âge de la personne
if ($intAge >= $tabEpreuve['epr_age_min'] && $intAge <= $tabEpreuve['epr_age_max']) {
$blnShowButton = true;
} else {
$blnShowButton = false;
$strClass = 'danger';
$strMessageUser .= afficheTexte('participant-text-insription-age', 0);
$strMessageUser = str_replace('%age%', '' . $tabEpreuve['epr_age_min'] . '-' . $tabEpreuve['epr_age_max'] . '', $strMessageUser);
$strMessageUser = str_replace('%date%', '' . fxShowDate($intDateAge, $strLangue) . '', $strMessageUser);
}
}
if ($blnShowButton) {
$strFunctionName = "change_value_" . $strProvenance;
if (trim($strProvenance) == 'affilie') {
$strFunctionName .= "_" . $intCompte;
}
$strFunctionName .= "()";
$strOutput = fxCreateJavaChange($tabChampsValues['champs'] . ",com_id_1", $tabChampsValues['values'] . ",com_id", $strProvenance, $strFunctionName, $arrData);
$strButton .= '
';
}
if (trim($strMessageUser) != '') {
$strMessageUser = str_replace('%nom%', '' . $strFirstName . '', $strMessageUser);
$strButton = str_replace('mb-3', 'mr-3', $strButton);
$strOutput .= '
' . $strButton . '
' . $strMessageUser . '
';
} else {
$strOutput .= $strButton;
}
}
return $strOutput;
}