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) { 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 ($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) { $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) { if ($strAction == 'auto') $strAction = 'mod'; if ($tabInfos != null) { for ($intCtrInfos = 1; $intCtrInfos <= count($tabInfos); $intCtrInfos++) { $strDisabled0 = $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': if ($strAction == 'mod' && !isset($_SESSION ['no_panier']) && $intPromoteur == 0 && $intCtr == 1) { $strDisabled = "disabled='disabled'"; } else { $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': $tabTelephones[] = $strField; $tabRules[] = $strField . ': { required: ' . $strRequired . ' }'; 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"> ">
'') { $mem_hint = ' '; } 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; ?>
>
$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]); if ($tabProduit != null) { if ($strLangue == 'fr') { // FRANÇAIS $tabNoMore[] = ' Il ne reste plus de quantité pour ' . fxUnescape($tabProduit['pro_nom_fr']) . ' (valeur ' . fxUnescape($tabChoix[$i - 1]) . ')'; } else { // ANGLAIS $tabNoMore[] = ' There is no more stock for ' . fxUnescape($tabProduit['pro_nom_en']) . ' (value ' . fxUnescape($tabChoix[$i - 1]) . ')'; } } } else { if ($blnSelected || $intPromoteur == 1) { $tabChoixSelect[] = array('selected' => $blnSelected, 'value' => $i, 'text' => fxUnescape($tabChoix[$i - 1])); } } } } if (!empty($tabChoixSelect)) { ?> Ce produit n\'est plus disponible.
'; } else { echo ''; } } ?> >
placeholder="" data-target="#cal-">
>
0) { ?>
>
ff
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(ppn_id) FROM resultats_produits_new WHERE 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; }