query("SELECT nomcourse, Sexe, sitecourse, code FROM enomcourse, epays WHERE enomcourse.idcoursenom='$Id_Race' AND enomcourse.idpaysnomcoursept=epays.idpays"); while ($donnees = $ResultNomCourse->fetch()) { $Sexe_Course="$donnees[Sexe]"; $NomDeCourse="$donnees[nomcourse]"; ?> closeCursor(); ?>

query("SELECT idcourse, datecourse, nometape, nbkm, Code_Cat_Race, uci, coursetype, iduci, idnewscat,idnumeroetapept FROM enewscat, enomcourse, ecourses, esaison, uci WHERE esaison.idsaison=ecourses.idsaisonpt AND esaison.idsaison='$Id_Saison' AND enewscat.idnewscat=ecourses.Id_Cat_Race AND ecourses.idcoursenompt=enomcourse.idcoursenom AND ecourses.Id_UCI=uci.iduci AND enomcourse.idcoursenom = '$Id_Race' ORDER BY ecourses.idnumeroetapept ASC, ecourses.coursetype ASC, ecourses.datecourse ASC"); while ($donnees = $Listecourse->fetch()) { //$datecourse ="$table[1]"; //$id_Course = "$table[0]"; //$nometape = "$table[2]"; //$nbkm = "$table[3]"; $id_Type = "$donnees[coursetype]"; $id_Num = "$donnees[idnumeroetapept]"; if ( $id_Num == 1 ){ $id_UCI = "$donnees[iduci]"; $id_Cat = "$donnees[idnewscat]"; ?> closeCursor(); ?>
query("SELECT idcourse, datecourse, nometape, nbkm, Code_Cat_Race, uci, coursetype, iduci, idnewscat,idnumeroetapept FROM enewscat, enomcourse, ecourses, esaison, uci WHERE esaison.idsaison=ecourses.idsaisonpt AND esaison.idsaison='$Id_Saison' AND enewscat.idnewscat=ecourses.Id_Cat_Race AND ecourses.idcoursenompt=enomcourse.idcoursenom AND ecourses.Id_UCI=uci.iduci AND enomcourse.idcoursenom = '$Id_Race' ORDER BY ecourses.idnumeroetapept ASC, ecourses.coursetype ASC, ecourses.datecourse ASC"); while ($donnees = $Listecourse->fetch()) { $datecourse ="$donnees[datecourse]"; $id_Course = "$donnees[idcourse]"; $nometape = "$donnees[nometape]"; $nbkm = "$donnees[nbkm]"; $id_Type = "$donnees[coursetype]"; $id_Num = "$donnees[idnumeroetapept]"; $tablePoint="0"; $tabPointsUci = array(); switch ($Sexe_Course) { case "F" : switch ($Id_Race) { case "1451" : $tablePoint="CH_Monde_Ligne_Femmes"; // CM Ligne break; case "1450" : $tablePoint="CH_Monde_CLM_Femmes";// CM CLM break; case "1490" : $tablePoint="CH_Monde_Ligne_Femmes";// JO Ligne break; case "1491" : $tablePoint="CH_Monde_CLM_Femmes";// JO CLM break; case "1494" : $tablePoint="C1_Ligne_Femmes";// conti Euro ligne break; case "1495" : $tablePoint="C1_Ligne_Femmes";// conti Euro CLM break; case "1486" : $tablePoint="C1_Ligne_Femmes";// conti America ligne break; case "1485" : $tablePoint="C1_CLM_Femmes";// conti America CLM break; case "1459" : $tablePoint="C3_Ligne_Femmes";// conti OCEANIA ligne break; case "1458" : $tablePoint="C3_CLM_Femmes";// conti OCEANIA CLM break; case "1492" : $tablePoint="C2_Ligne_Femmes";// conti ASIA ligne break; case "1492" : $tablePoint="C2_CLM_Femmes";// conti ASIA CLM break; default : switch ($id_Cat) { case "9" : //Championnat $pos = stripos($NomDeCourse, 'CLM'); if ($pos !== false) { //CLM $tablePoint="CH_Nat_CLM_Femmes"; } else { //Ligne $tablePoint="CH_Nat_Ligne_Femmes"; } break; case "28" : $tablePoint="CDM_Femmes";//CDM break; case "30" : $tablePoint="1_GEN_Femmes";//1.1 break; case "38" : //2.1 switch ($id_Num) { case "1" : $tablePoint="1_GEN_Femmes"; break; default : switch ($id_Type) { case "0" : $tablePoint="1_ETA_Femmes"; break; case "3" : $tablePoint="Port_Maillot_Femmes"; break; } break; } break; case "31" : $tablePoint="2_GEN_Femmes";//1.2 break; case "39" : //2.2 switch ($id_Num) { case "1" : $tablePoint="2_GEN_Femmes"; break; default : switch ($id_Type) { case "0" : $tablePoint="2_ETA_Femmes"; break; case "3" : $tablePoint="Port_Maillot_Femmes"; break; } break; } break; } break; } break; default : switch ($id_UCI) { case "1": break; case "7": break; case "8": break; case "9": break; default : switch ($id_Cat) { case "2" : $tablePoint="epointgenhc";// 1.HC break; case "5" : // 2.HC switch ($id_Num) { case "1" : $tablePoint="epointgenhc"; break; default : switch ($id_Type) { case "0" : $tablePoint="epointetahc"; break; case "3" : $tablePoint="epointmaillot"; break; } } break; case "3" : $tablePoint="epointgenclass1"; // 1.1 break; case "6" : // 2.1 switch ($id_Num) { case "1" : $tablePoint="epointgenclass1"; break; default : switch ($id_Type) { case "0" : $tablePoint="epointetaclass1"; break; case "3" : $tablePoint="epointmaillot"; break; } } break; case "4" : $tablePoint="epointgenclass2";// 1.2 break; case "7" : // 2.2 switch ($id_Num) { case "1" : $tablePoint="epointgenclass2"; break; default : switch ($id_Type) { case "0" : $tablePoint="epointetaclass2"; break; case "3" : $tablePoint="epointmaillot"; break; } } break; case "16" : $tablePoint="epointgenclass2";// 1.2U23 break; case "17" : // 2.2U23 switch ($id_Num) { case "1" : $tablePoint="epointgenclass2"; break; default : switch ($id_Type) { case "0" : $tablePoint="epointetaclass2"; break; case "3" : $tablePoint="epointmaillot"; break; } } break; case "22" : $tablePoint="epointgenclass2";// 1.2cup break; case "23" : // 2.2cup switch ($id_Num) { case "1" : $tablePoint="epointgenclass2"; break; default : switch ($id_Type) { case "0" : $tablePoint="epointetaclass2"; break; case "3" : $tablePoint="epointmaillot"; break; } } break; case "14" : $tablePoint="epointconti";// conti line break; case "15" : $tablePoint="epointconticlm";// conti CLM break; } break; } break; } //echo "$tablePoint "; if ($tablePoint != "0") { //echo " $tablePoint "; $Listepoint = $bdd->query("SELECT * FROM $tablePoint"); while ($datas = $Listepoint->fetch()) { $Place = $datas['ID_Place'] ; //echo " $Place "; $TabPointsUci["$Place"] = $datas['Points']; //echo $TabPointsUci[4]; }$Listepoint->closeCursor(); } //echo $TabPointsUci[4]; switch ($id_Type) { case "1" : ?>