fxGetResults($sqlInfos); return $tabInfos; } // récupère les questions à demander aux participants ou pour une épreuve (JSP) // param: type (par ou epr), id de l'événement, id de l'épreuve // créé: 2014-08-15 function fxGetQuestions($strType, $intEvenement, $intEpreuve, $strAction, $intPromoteur = 0, $intquestechue = 0) { global $objDatabase; $strWhere = ''; if (isset($_SESSION['no_panier']) && $strAction == 'mod') { $strAction = 'add'; } if ($strType == 'epr') $strWhere .= "AND que_epreuve = 1"; else $strWhere .= "AND que_epreuve <> 1"; if ($intquestechue == 1 && $strAction == 'add') { $sqlQuestions = "SELECT * FROM inscriptions_questions WHERE que_actif = 1 AND eve_id = " . intval($intEvenement) . " AND (FIND_IN_SET(" . intval($intEpreuve) . ", que_epreuves_incluses) OR que_epreuves_incluses = '') " . $strWhere . " ORDER BY que_tri, que_id"; } else { if ($strAction == 'add') { $sqlQuestions = "SELECT * FROM inscriptions_questions WHERE que_actif = 1 AND (que_date_limite = '0000-00-00' OR que_date_limite = '' OR que_date_limite IS NULL OR que_date_limite >= '" . fxGetDate() . "') AND eve_id = " . intval($intEvenement) . " AND (FIND_IN_SET(" . intval($intEpreuve) . ", que_epreuves_incluses) OR que_epreuves_incluses = '') " . $strWhere . " ORDER BY que_tri, que_id"; } else { if ($intPromoteur == 1 || $intquestechue == 1) { $sqlQuestions = "SELECT * FROM inscriptions_questions WHERE que_actif = 1 AND eve_id = " . intval($intEvenement) . " AND (FIND_IN_SET(" . intval($intEpreuve) . ", que_epreuves_incluses) OR que_epreuves_incluses = '') " . $strWhere . " ORDER BY que_tri, que_id"; } else { $sqlQuestions = "SELECT * FROM inscriptions_questions WHERE que_actif = 1 AND (que_date_limite = '0000-00-00' OR que_date_limite = '' OR que_date_limite IS NULL OR que_date_limite >= '" . fxGetDate() . "') AND eve_id = " . intval($intEvenement) . " AND (FIND_IN_SET(" . intval($intEpreuve) . ", que_epreuves_incluses) OR que_epreuves_incluses = '') " . $strWhere . " ORDER BY que_tri, que_id"; } } } $tabQuestions = $objDatabase->fxGetResults($sqlQuestions); return $tabQuestions; } function fxShowInfosParticipants(&$tabRules, &$tabMessages, &$tabCalendriers, $tabInfos, $tabDates, $tabProvinces, $tabPays, $tabEpreuve, $tabParticipant, $intCtr, $intNbParticipantsMin, $strAction, $strDisabled, $strReadonly, $strStyle, $strLangue, $intPromoteur, $blnDon = false, &$tabCodepostal, &$tabTelephones) { global $strHintModal; $arrEvenement = fxGetEvenementsId($tabEpreuve['eve_id']); if ($strAction == 'auto') $strAction = 'mod'; if ($tabInfos != null) { for ($intCtrInfos = 1; $intCtrInfos <= count($tabInfos); $intCtrInfos++) { $strDisabled = $strFieldDisabled = $mem_hint = $strAsterix = ''; if ($tabInfos[$intCtrInfos]['inf_required'] == 1) { if ($intCtr <= $intNbParticipantsMin) { $strRequired = 'true'; } else { $strRequired = ' function(element){ return $("#' . $tabInfos[1]['cha_nom'] . '_' . $intCtr . '").val().length + $("#' . $tabInfos[2]['cha_nom'] . '_' . $intCtr . '").val().length > 0; } '; } } else { $strRequired = 'false'; } $strField = $tabInfos[$intCtrInfos]['cha_nom'] . '_' . $intCtr; if ($strRequired == 'true') { $strAsterix = ' * '; } if ($tabInfos[$intCtrInfos]['inf_participant1'] == 0 || ($tabInfos[$intCtrInfos]['inf_participant1'] == 1 && $intCtr == 1)) { switch ($tabInfos[$intCtrInfos]['cha_nom']) { case 'par_naissance': $tabCalendriers[] = $strField; $tabRules[] = $strField . ': { required: ' . $strRequired . ', dateCA: true, daterange: ["' . $tabDates['min_date'] . '", "' . $tabDates['max_date'] . '"] }'; if ($strLangue == 'fr') $tabMessages[] = $strField . ': { required: "Veuillez entrer la date de naissance", dateCA: "La date de naissance doit être sous le format AAAA-MM-JJ", daterange: "La date de naissance doit être entre {0} et {1}" }'; else $tabMessages[] = $strField . ': { required: "Please enter the birthdate", dateCA: "The birthdate must be in the format YYYY-MM-DD", daterange: "The birthdate must be between {0} and {1}" }'; break; // enlever (sl) case 'par_codepostalbad': $tabRules[] = $strField . ': { required: ' . $strRequired . ' }'; if ($strLangue == 'fr') $tabMessages[] = $strField . ': { required: "Veuillez entrer le code postal/zip", postalCodeCA: "Veuillez entrer un code postal canadien valide", zipcodeUS: "Veuillez entrer un code zip américain valide" }'; else $tabMessages[] = $strField . ': { required: "Please enter the postal/zip code", postalCodeCA: "Please enter a valid Canadian postal code", zipcodeUS: "Please enter a valid US zip code" }'; break; case 'par_telephone1': case 'par_telephone2': case 'par_contact_urgence_telephone': $tabTelephones[] = $strField; $tabRules[] = $strField . ': { required: ' . $strRequired . ', phoneUS: true }'; if ($strLangue == 'fr') $tabMessages[] = $strField . ': { required: "Veuillez entrer le numéro de téléphone", phoneUS: "Le numéro de téléphone doit être sous le format 555-555-5555" }'; else $tabMessages[] = $strField . ': { required: "Please enter the phone number", phoneUS: "The phone number must be under the format 555-555-5555" }'; break; case 'par_courriel': $tabRules[] = $strField . ': { required: ' . $strRequired . ', email: true }'; if ($strLangue == 'fr') $tabMessages[] = $strField . ': { required: "Veuillez entrer le courriel", email: "Le courriel doit être une adresse valide" }'; else $tabMessages[] = $strField . ': { required: "Please enter the email", email: "The email must be a valid address" }'; break; default: $tabRules[] = $strField . ': { required: ' . $strRequired . ' }'; if ($strLangue == 'fr') $tabMessages[] = $strField . ': { required: "Veuillez entrer une valeur" }'; else $tabMessages[] = $strField . ': { required: "Please enter a value" }'; if ($tabInfos[$intCtrInfos]['cha_nom'] == 'par_prenom' && $blnDon) { if ($strLangue == 'fr') { // FRANÇAIS $strMessage = "Si vous voulez un reçu au nom d'une entreprise, utilisez les deux champs prénom et nom pour entrer le nom de la compagnie.
Exemple, pour MS1 Timing Inc. Entrez :
Prénom : MS1
Nom : Timing Inc."; } else { // ANGLAIS $strMessage = " If you wish to issued the receipt to a company name, use both first and last name field for your company name.
Example: for MS1 Timing Inc. Enter :
firstname : MS1
Lastname : Timing Inc."; } $mem_hint = ' '; } } // afficher que les champ pour identifier un abonnement if ($tabInfos[$intCtrInfos]['cha_abonnement'] == 0 && $tabEpreuve['tep_id'] == 4) { $mem_hidden = 'style="display: none;'; } else { $mem_hidden = ' '; } ?>
>
">
"> " maxlength="" placeholder="" required aria-describedby="_HelpInline"> ">
intval($intNbParticipantsMin) && intval($tabQuestions[$intCtr3]['que_required']) == 1) { $strRequired = 'function(element){return $("#par_prenom_' . $intCtr . '").val().length + $("#par_nom_' . $intCtr . '").val().length > 0; } '; } if (intval($tabQuestions[$intCtr3]['que_hidden']) == 1) $mem_hide = 'style="display: none;"'; if (trim($tabQuestions[$intCtr3]['que_hint_' . $strLangue]) <> '') { foreach ($arrWidth as $strWidth) { $arrHint[$strWidth] = ' '; $strHintModal .= '
info
' . fxUpdateLiensInternes(trim($tabQuestions[$intCtr3]['que_hint_' . $strLangue])) . '
'; } } if (trim($tabQuestions[$intCtr3]['que_pdf_' . $strLangue]) <> '') { if ($strLangue == 'fr') $strTitle = 'Modèle / Charte des grandeurs'; else $strTitle = 'Model / Size chart'; // $strPdf = ''; $strPdf = ' '; } if ($strRequired == 'true') { $strAsterix = ' * '; } switch ($tabQuestions[$intCtr3]['que_validation']) { case 'date': ?>

À propos de cette inscriptionAbout this registrationQuestions

0 && $mem_question_premier == 0 && ($intNbInscriptions != 0 && $intCtr <= $intNbInscriptions)) { if ($strAction == 'mod' || trim($strNoTransfert) != '') { $tabModQuestions = $tabModQuestions[$intCtr]; } } $mem_question_premier = 1; // MSIN-4173 $strMessDisabled = ""; if ($tabQuestions[$intCtr3]["que_date_limite"] != '0000-00-00' && date('Y-m-d') > $tabQuestions[$intCtr3]["que_date_limite"]) { // On a dépassé la date limite $strDisabled = "disabled"; $strMessDisabled = afficheTexte('plusmodifiable', 0); } ?>
>
0 && $tabProduit['pro_prix'] > 4.99) { $afficheprixfrais = ' (' . fxShowPrix($prixfrais, $strLangue) . ' ' . afficheTexte('text_frais_inclus', 0) . ')'; } $tabChoix[$i - 1]=$tabChoix[$i - 1].$afficheprixfrais; $blnProduit = fxCheckStockProduits($tabProduits[$i - 1], $intEpreuveCommandee, $intParticipant); if ($blnProduit==1) { if($tabProduit["echue"]==1){ $blnProduit=0; } } } } if ($blnProduit) { // si produit toujours disponible ou si aucun produit rattaché $tabChoixSelect[] = array('selected' => $blnSelected, 'value' => $i, 'text' => fxUnescape($tabChoix[$i - 1])); } else { if ($strAction == 'add' && trim($strNoTransfert) == '') { // si stock du produit épuisé // obtenir les infos du produit épuisé $tabProduit = fxGetProduits($tabProduits[$i - 1],$intEvenement,"",0); // msin-3882 remmetre le message if ($tabProduit != null) { if ($strLangue == 'fr') { // FRANÇAIS $tabNoMore[] = ' Non disponible pour ' . fxUnescape($tabProduit['pro_nom_fr']) . ''; } else { // ANGLAIS $tabNoMore[] = ' Not available ' . fxUnescape($tabProduit['pro_nom_en']) . ' '; } } } else { if ($blnSelected || $intPromoteur == 1) { $tabChoixSelect[] = array('selected' => $blnSelected, 'value' => $i, 'text' => fxUnescape($tabChoix[$i - 1])); } } } } if (!empty($tabChoixSelect)) { if (intval($tabQuestions[$intCtr3]['que_choix_multiple']) == 1) { $strSelect2 = 'select2-multi'; } else { $strSelect2 = 'select2-single'; } ?> Ce produit n\'est plus disponible.
'; } else { echo ''; } } ?> >
placeholder="" data-target="#cal-">
>
0) { ?>
>

0) { ?> " . intval($intEpreuveCommandee); } if ($intParticipant != 0) { $strWhere .= " AND p.par_id <> " . intval($intParticipant); } $sqlRestant = " SELECT (SELECT pro_qte FROM inscriptions_produits_new WHERE pro_id = " . intval($intProduit) . ") AS dispo, ( (SELECT COUNT(p2.pro_id) FROM resultats_produits_new p2, resultats_epreuves_commandees c WHERE c.pec_id_original = p2.pec_id AND c.is_cancelled = 0 AND p2.pro_id = " . intval($intProduit) . ") + (SELECT COUNT(p.ppn_id) FROM inscriptions_panier_produits_new p, inscriptions_panier_acheteurs a WHERE a.no_panier = p.no_panier AND a.sta_id = 1 AND p.pro_id = " . intval($intProduit) . " $strWhere) ) AS vendu FROM DUAL "; $tabRestant = $objDatabase->fxGetRow($sqlRestant); if ($tabRestant != null) { if (intval($tabRestant['dispo']) > intval($tabRestant['vendu'])) return true; else return false; } else return false; } // modif MSIN-3922 function fxCheckNomclub($que_id, $strLangue) { global $objDatabase; //$strWhere = "SELECT m.mem_numero,mr.mr_reponse FROM memberships m JOIN memberships_reponses mr on mr.mem_numero=m.mem_numero WHERE mt_id = '4' AND mem_actif = '1' and mr.mq_id =15 order by m.mem_numero"; $strWhere = "SELECT m.mem_numero,mr.mr_reponse FROM memberships m JOIN memberships_reponses mr on mr.mem_numero=m.mem_numero WHERE mt_id = '4' AND mem_actif = '1' and mr.mq_id =15 and mem_date_fin>now() order by mr.mr_reponse"; $result = $objDatabase->fxGetResults($strWhere); //a faire corriger langue $liste['fr'] = "--Veuillez choisir--"; $liste['en'] = "--Veuillez choisir--"; $liste['fr'] .= ",Je ne fais parti d’aucun club"; $liste['en'] .= ",I am not part of any club"; foreach ($result as $list) { $club = str_replace(',', ' ', $list['mr_reponse']); $liste['en'] = $liste['en'] . "," . $club . ' (' . $list['mem_numero'] . ')'; $liste['fr'] = $liste['fr'] . "," . $club . ' (' . $list['mem_numero'] . ')'; } $sqlUpdate = "UPDATE inscriptions_questions SET que_choix_fr = '" . $objDatabase->fxEscape($liste['fr']) . "', que_choix_en = '" . $objDatabase->fxEscape($liste['en']) . "' WHERE que_id = " . $que_id; $qryUpdate = $objDatabase->fxQuery($sqlUpdate); return $liste[$strLangue]; }