fxEscape($clef) . "' ORDER BY trie"; $rec = $objDatabase->fxGetResults($sql); } else { if ($eve_id_don != 0) { $sql = "SELECT * FROM config_tableau WHERE clef = 'LISTEPARTICIPANTEVEGENERIQUEDONS' ORDER BY trie"; $rec = $objDatabase->fxGetResults($sql); } else { $sql = "SELECT * FROM config_tableau WHERE clef = '" . $objDatabase->fxEscape($clef) . "' ORDER BY trie"; $rec = $objDatabase->fxGetResults($sql); if ($rec === null){ $sql = "SELECT * FROM config_tableau WHERE clef = 'LISTEPARTICIPANTEVEGENERIQUE' ORDER BY trie"; $rec = $objDatabase->fxGetResults($sql); } } } return $rec; } function fxchecklangue($strtab,$i,$langues) { if ($strtab[$i]['info1langue'] == 1) return $strtab[$i]['info1'] . "_" . $langues; else return $strtab[$i]['info1']; } function fxGetquery($clef, $eve_id, $eve_id_don) { global $objDatabase; if ($eve_id_don == 895) { $sql = "SELECT * FROM config_query WHERE query_clef = 'rapportinscriptionGENERIQUEDONS895' limit 1"; $rec = $objDatabase->fxGetRow($sql); } else {if ($eve_id_don != 0) { $sql = "SELECT * FROM config_query WHERE query_clef = 'rapportinscriptionGENERIQUEDONS' limit 1"; $rec = $objDatabase->fxGetRow($sql); $rec = str_replace('%eve_id%', $eve_id, $rec); } else { $sql = "SELECT * FROM config_query WHERE query_clef = '" . $objDatabase->fxEscape($clef) . "' limit 1"; $rec = $objDatabase->fxGetRow($sql); if ($rec===null){ $sql = "SELECT * FROM config_query WHERE query_clef = 'rapportinscriptionGENERIQUE' limit 1"; $rec = $objDatabase->fxGetRow($sql); $rec = str_replace('%eve_id%', $eve_id, $rec); } } } return $rec; } function fxlistepreuves($evenement,$langue,$mem_selected) { global $objDatabase; $list_exeption=''; require_once('php/inc_dons.php'); $sqlex = "SELECT * from config_query_exep where type_exep='remove' and eve_id= " . $evenement; $recex = $objDatabase->fxGetRow($sqlex); if ($recex) $list_exeption="ipe.epr_id not in (". $recex['sql'].") and " ; $sqlex = "SELECT * from config_query_exep where type_exep='add' and eve_id= " . $evenement; $list_exeptionadd = $objDatabase->fxGetResults($sqlex); $sql = "SELECT * FROM inscriptions_panier_epreuves_commandees ipec LEFT JOIN inscriptions_panier_epreuves ipe on ipe.epr_id= ipec.epr_id where ".$list_exeption." eve_id= " . $evenement . " group by ipec.epr_id ORDER BY epr_type_" . $langue; $rec = $objDatabase->fxGetResults($sql); if ($mem_selected == "") $mem_select = ' selected="selected"'; else $mem_select = ''; $output = ''; return $output; } global $vDomaine, $strLangue, $tabEvenement, $strCode, $objDatabase; $strEpreuve = afficheTexte('toutlesepreuves',0); $mem_where = ''; $mem_rech_epreuve = ''; // v?rifier les form POST if (isset($_GET['order'])) { $mem_orderby=" order by ".$_GET['order'] ; $mem_orderget=$_GET['order']; }else{ $mem_orderby=""; $mem_orderget=""; } if (isset($_GET['rech_epreuve'])) { if ($_GET['rech_epreuve'] != '') { $mem_rech_epreuve=$_GET['rech_epreuve']; $exep=explode(":",$_GET['rech_epreuve']); if (isset($exep[0])) $expsuite= $exep[0]; else $expsuite=""; if ($exep[0] == 'exp') { $mem_where .= ' and rec.epr_id in( ' .$exep[1].')'; $strEpreuve = $exep[2]; $mem_rech_epreuve= $_GET['rech_epreuve']; } else { $mem_where .= ' and rec.epr_id = ' . $_GET['rech_epreuve']; $mem_rech_epreuve = $_GET['rech_epreuve']; $mem_tabformat = "LISTEPARTICIPANT".$tabEvenement['general']['eve_id']; $intEpreuve = $_GET['rech_epreuve']; // trouver le nom de l'?preuve foreach ($tabEvenement['epreuves'] as $tabEpreuves) { if ($tabEpreuves['epr_id'] == $intEpreuve) { $strEpreuve = fxUnescape($tabEpreuves['epr_type_' . $strLangue]); if (trim($tabEpreuves['epr_nom_' . $strLangue]) != '') $strEpreuve .= ' - ' . fxUnescape($tabEpreuves['epr_nom_' . $strLangue]); } } } } else { $mem_tabformat = "LISTEPARTICIPANT".$tabEvenement['general']['eve_id']; } } $mem_rech_nom=""; $sql = fxGetquery("rapportinscription".$tabEvenement['general']['eve_id'],$tabEvenement['general']['eve_id'], $tabEvenement['general']['eve_id_don']); $mem_equipe=$sql['query_equipe']; if (isset($_GET['rech_nom'])) { if($_GET['rech_nom'] != '') { if ($mem_equipe==0){ $mem_where .= " and concat(par_prenom,' ',par_nom) like '%" . $_GET['rech_nom'] . "%'" ; $mem_rech_nom = $_GET['rech_nom']; } else { $mem_where .= " and (concat(par_prenom,' ',par_nom) like '%" . $_GET['rech_nom'] . "%' or pec_nom_equipe like '%" . $_GET['rech_nom'] . "%')" ; $mem_rech_nom = $_GET['rech_nom']; } } } // MSIN-4172 // text if (intval($tabEvenement['general']['eve_id_don']) > 0) { $sqlText_dons = "SELECT * from inscriptions_evenements WHERE eve_id = " . intval($tabEvenement['general']['eve_id_don']); $arrText_dons = $objDatabase->fxGetRow($sqlText_dons); $strText = $arrText_dons["eve_details_reserver_" . $strLangue]; echo("
"); echo $strText; echo("
"); ?>

0) { // affiche therdmomètre dons global // calculer les dons équipes $sqlTotalDonsEquipes = "SELECT COUNT(d.pd_id) AS nb, SUM(d.pd_montant) AS total FROM inscriptions_panier_acheteurs a, inscriptions_panier_dons d, resultats_epreuves_commandees e WHERE d.eve_id_don = " . intval($tabEvenement['general']['eve_id_don']) . " AND d.no_panier = a.no_panier AND d.pec_id = e.pec_id_original AND d.par_id = 0 AND e.is_cancelled = 0 AND a.sta_id = 3"; $arrTotalDonsEquipes = $objDatabase->fxGetRow($sqlTotalDonsEquipes); // calculer les dons particicpants $sqlTotalDonsParticipants = "SELECT COUNT(d.pd_id) AS nb, SUM(d.pd_montant) AS total FROM inscriptions_panier_acheteurs a, inscriptions_panier_dons d, resultats_epreuves_commandees e, resultats_participants p WHERE d.eve_id_don = " . intval($tabEvenement['general']['eve_id_don']) . " AND d.no_panier = a.no_panier AND d.pec_id = e.pec_id_original AND d.par_id = p.par_id_original AND d.pec_id = p.pec_id AND e.is_cancelled = 0 AND p.is_cancelled = 0 AND a.sta_id = 3"; $arrTotalDonsParticipants = $objDatabase->fxGetRow($sqlTotalDonsParticipants); // trouverd l'objectif dons global et dons offline $sqlTotalObjectifDonsGlobal = "SELECT SUM(c.epr_objectif_dons_global) AS objectif, SUM(c.epr_montant_dons_offline) AS dons_offine FROM inscriptions_evenements e, inscriptions_epreuves c WHERE e.eve_id = " . intval($tabEvenement['general']['eve_id']) . " AND e.eve_id = c.eve_id"; $arrTotalObjectifDonsGlobal = $objDatabase->fxGetRow($sqlTotalObjectifDonsGlobal); $fltTotalObjectifDons = $arrTotalObjectifDonsGlobal['objectif']; if (floatval($fltTotalObjectifDons) <= 0) { // si objectif global = 0, calculer les obectifs de dons // calculer les oobjectifs équipes $sqlTotalObjectifDonsEquipes = "SELECT SUM(e.epr_objectif_dons) AS objectif FROM resultats_epreuves_commandees e WHERE e.eve_id = " . intval($tabEvenement['general']['eve_id']) . " AND e.is_cancelled = 0"; $fltTotalObjectifDonsEquipes = $objDatabase->fxGetVar($sqlTotalObjectifDonsEquipes); // calculer les oobjectifs particicpants $sqlTotalObjectifDonsParticipants = "SELECT SUM(p.epr_objectif_dons) AS objectif FROM resultats_epreuves_commandees e, resultats_participants p WHERE e.eve_id = " . intval($tabEvenement['general']['eve_id']) . " AND e.pec_id_original = p.pec_id AND e.is_cancelled = 0 AND p.is_cancelled = 0"; $fltTotalObjectifDonsParticipants = $objDatabase->fxGetVar($sqlTotalObjectifDonsParticipants); $fltTotalObjectifDons = $fltTotalObjectifDonsEquipes + $fltTotalObjectifDonsParticipants; } $arrTotalDons = array( 'nb' => intval($arrTotalDonsEquipes['nb']) + intval($arrTotalDonsParticipants['nb']), 'objectif' => intval($fltTotalObjectifDons), 'total' => floatval($arrTotalDonsEquipes['total']) + floatval($arrTotalDonsParticipants['total'] + floatval($arrTotalObjectifDonsGlobal['dons_offine'])) ); if ($strLangue == 'fr') { $strObjectif = "Objectif"; $strMontant = "Montant amassé"; $strTitre = 'Total des dons'; } else { $strObjectif = "Goal"; $strMontant = "Gathered"; $strTitre = 'Donations total'; } ?>

fxShow('h', 0, 'money', '', $strMontant, $strObjectif, $strLangue); }else{ ?>

Recherche :Search :

fxGetResults($sql['query_query']); $strtab = fxGetchamps("LISTETOTALEVE".$tabEvenement['general']['eve_id'], $tabEvenement['general']['eve_id_don']); $strResults = '

' . afficheTexte('listeparticipantsresume', 0) . '

'; //entete pour le tableau for ($i = 1; $i <= count($strtab); $i++) { $strResults .= ' '; } $strResults .= ' '; //contenue le tableau for ($x = 1; $x <= count($strliste); $x++) { $strResults .= ''; for ($i = 1; $i <= count($strtab); $i++) { if ($strtab[$i]['multiple'] == 1) { $mem_field = preg_split('/,/', $strtab[$i]['info1']); $mem_affiche = $strliste[$x][$mem_field[0]] . ' ' . $strliste[$x][$mem_field[1]]; } else { $mem_affiche = $strliste[$x][fxchecklangue($strtab, $i, $strLangue)]; } if ($strLangue == 'fr') $MEM_SUITE = 'inscrits'; else $MEM_SUITE='registered'; $strResults .= ' '; } $strResults .= ""; } $strResults .= "
' . $strtab[$i]['info2_' . $strLangue] . '
' . $mem_affiche . '
"; echo $strResults; } //liste des participants $sql = fxGetquery("rapportinscription".$tabEvenement['general']['eve_id'],$tabEvenement['general']['eve_id'], $tabEvenement['general']['eve_id_don']); $sql = str_replace('%where%', $mem_where, $sql['query_query']); $sql = str_replace('%orderby%', $mem_orderby,$sql); $mem_equipe=$sql['query_equipe']; $strliste = $objDatabase->fxGetResults($sql); $strtab = fxGetchamps($mem_tabformat, $tabEvenement['general']['eve_id_don']); //echo($mem_tabformat); echo '

' . $strEpreuve . '

'; if ($stradm!="") echo '

' . afficheTexte('nombreinscription', 0) . ' ' . count($strliste) . '


'; $strResults = '
'; //entete pour le tableau for ($i = 1; $i <= count($strtab); $i++){ if ($strtab[$i]['info2']=="trie") { if ($strLangue == 'fr') $MEM_SUITE = 'inscrits'; else $MEM_SUITE='registered'; if ($strtab[$i]['info1langue']==0) { $mem_order=$strtab[$i]['field_order']; } else { $mem_order = $strtab[$i]['field_order'] . "_" . $strLangue; } $fa_trie='fa-sort-asc'; if ($mem_order==$mem_orderget) { $fa_trie='fa-sort-desc'; if ($strtab[$i]['multiple'] == 1) { $mem_field=preg_split('/,/',$strtab[$i]['info1']); $mem_order = $mem_field[0] .' desc, '. $mem_field[1] .' desc'; } else { $mem_order=$mem_order. " desc"; } } $strResults .= ''; } else { $strResults .= ''; } } $strResults .= ' '; // contenue le tableau for ($x = 1; $x <= count($strliste); $x++) { $strResults .= ''; for ($i = 1; $i <= count($strtab); $i++) { $mem_affiche=""; if ($strtab[$i]['convert']=='donsequipe') { if (intval($tabEvenement['general']['eve_id']) != 646) { // patch pour défi 808 2021 $mem_field = preg_split('/,/',$strtab[$i]['info1']); if ($strliste[$x][ $mem_field[1]]==1 && $strliste[$x]['epr_id_don'] != '0') { // stephan MSIN-2002 if ($strLangue == 'fr') $MEM_donsequipe = ' à l\'équipe'; else $MEM_donsequipe=' to the team'; $mem_affiche = fxGetLinksDonationParticipant($strliste[$x][$mem_field[0]], 0, $strLangue); $mem_affiche = ' ' . $mem_affiche['label'].$MEM_donsequipe . ' '; } } } else { if ($strtab[$i]['convert']=='dons') { if ($strliste[$x]['epr_id_don'] != '0') { $mem_field = preg_split('/,/',$strtab[$i]['info1']); $mem_affiche = fxGetLinksDonationParticipant($strliste[$x][ $mem_field[0]], $strliste[$x][ $mem_field[1]], $strLangue); $mem_affiche = ' ' . $mem_affiche['label'] . ' '; } } else { if ($strtab[$i]['multiple']==1) { $mem_field=preg_split('/,/',$strtab[$i]['info1']); $mem_affiche = $strliste[$x][ $mem_field[0]].' '.$strliste[$x][ $mem_field[1]]; } else $mem_affiche = $strliste[$x][ fxchecklangue($strtab,$i,$strLangue)]; } } $strResults .= ''; } $strResults .= ""; } $strResults .= "
' . $strtab[$i]['info2_' . $strLangue] . ' ' . $strtab[$i]['info2_' . $strLangue] . '
' . $mem_affiche . '
"; echo $strResults;