$v) { $b[$k] = strtolower($v[$subkey]); } asort($b); foreach($b as $key=>$val) { $c[] = $a[$key]; } return $c; } $weAreGymImg = 'data:image/png;base64,'.base64_encode(file_get_contents('../../../minisite/img/wearegym.png')); $url = 'http://fig-docs.com/swisstiming/odf/getlatestmessage.php?CompetitionCode=OG2016&DocumentCode=GAW400100&DocumentType=DT_CUMULATIVE_RESULT'; //$url = 'http://www.fig-docs.com/swisstiming/TEV/GA/DT_CUMULATIVE_RESULT-GAM400100.xml'; $rss_file = file_get_contents($url); // Si les XML ne sont pas sur le serveur if($rss_file==""){ if (!isset($_GET['mode']) && $_GET['mode'] !== 'mobileapp'){ echo "

FIG logo
"; } echo"
Results will be displayed here on August 9 at 16:00 local time!

"; if (!isset($_GET['mode']) && $_GET['mode'] !== 'mobileapp'){ echo "Back"; }else{ echo "Back"; } } $xml = new SimpleXMLElement($rss_file) or die ("Results will be published in a minute"); ?>
FIG logo"; } ?> Competition[0]->ExtendedInfos[0]->SportDescription[0]['DisciplineName']; $apparatus = $xml->Competition[0]->ExtendedInfos[0]->SportDescription[0]['SubEventName']; $subdiv = $xml->Competition[0]->ExtendedInfos[0]->ExtendedInfo[0]['Value']; $rotation = $xml->Competition[0]->ExtendedInfos[0]->ExtendedInfo[1]['Value']; echo "

2016 Games of the XXXI Olympiad RIO DE JANEIRO (BRA) - $disc $apparatus

"; echo 'Subdivision : '. $subdiv.' '.'Rotation : '.$rotation; ?>
Back"; }else{ echo "Back"; } ?> Competition[0]->Result[$i]['Rank']; $so = (string)$xml->Competition[0]->Result[$i]['SortOrder']; $point = (string)$xml->Competition[0]->Result[$i]['Result']; if($point == ""){ $lastname = ""; $NOC = ""; $id = ""; $score = ""; $diff = ""; $exec = ""; $pen = ""; }else{ $a=0; $NOC = (string)$xml->Competition[0]->Result[$i]->Competitor[0]['Organisation']; $app1 = (string)$xml->Competition[0]->Result[$i]->Competitor[0]->ExtendedResults[0]->ExtendedResult[1]['Value']; $app2 = (string)$xml->Competition[0]->Result[$i]->Competitor[0]->ExtendedResults[0]->ExtendedResult[2]['Value']; $app3 = (string)$xml->Competition[0]->Result[$i]->Competitor[0]->ExtendedResults[0]->ExtendedResult[3]['Value']; $app4 = (string)$xml->Competition[0]->Result[$i]->Competitor[0]->ExtendedResults[0]->ExtendedResult[4]['Value']; $type1 = (string)$xml->Competition[0]->Result[$i]->Competitor[0]->ExtendedResults[0]->ExtendedResult[1]['ValueType']; $type2 = (string)$xml->Competition[0]->Result[$i]->Competitor[0]->ExtendedResults[0]->ExtendedResult[2]['ValueType']; $type3 = (string)$xml->Competition[0]->Result[$i]->Competitor[0]->ExtendedResults[0]->ExtendedResult[3]['ValueType']; $type4 = (string)$xml->Competition[0]->Result[$i]->Competitor[0]->ExtendedResults[0]->ExtendedResult[4]['ValueType']; $tab_gym[$i]['place']=$place; $tab_gym[$i]['note']=$point; for($x=0;$x<=6;$x++){ $tab_gym[$i]['nom'.$x]=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[$x]->Description[0]['FamilyName']; $tab_gym[$i]['prenom'.$x]=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[$x]->Description[0]['GivenName']; $tab_gym[$i]['id_profile'.$x]=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[$x]->Description[0]['IFId']; } $tab_gym[$i]['vt']['gym1']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->ExtendedResults[0]->ExtendedResult[0]['Value']; $tab_gym[$i]['vt']['gym2']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[1]->ExtendedResults[0]->ExtendedResult[0]['Value']; $tab_gym[$i]['vt']['gym3']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[2]->ExtendedResults[0]->ExtendedResult[0]['Value']; $tab_gym[$i]['vt']['gym4']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[3]->ExtendedResults[0]->ExtendedResult[0]['Value']; $tab_gym[$i]['vt']['gym5']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[4]->ExtendedResults[0]->ExtendedResult[0]['Value']; $tab_gym[$i]['vt']['gym6']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[5]->ExtendedResults[0]->ExtendedResult[0]['Value']; $tab_gym[$i]['vt']['gym7']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[6]->ExtendedResults[0]->ExtendedResult[0]['Value']; $tab_gym[$i]['ub']['gym1']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->ExtendedResults[0]->ExtendedResult[1]['Value']; $tab_gym[$i]['ub']['gym2']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[1]->ExtendedResults[0]->ExtendedResult[1]['Value']; $tab_gym[$i]['ub']['gym3']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[2]->ExtendedResults[0]->ExtendedResult[1]['Value']; $tab_gym[$i]['ub']['gym4']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[3]->ExtendedResults[0]->ExtendedResult[1]['Value']; $tab_gym[$i]['ub']['gym5']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[4]->ExtendedResults[0]->ExtendedResult[1]['Value']; $tab_gym[$i]['ub']['gym6']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[5]->ExtendedResults[0]->ExtendedResult[1]['Value']; $tab_gym[$i]['ub']['gym7']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[6]->ExtendedResults[0]->ExtendedResult[1]['Value']; $tab_gym[$i]['bb']['gym1']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->ExtendedResults[0]->ExtendedResult[2]['Value']; $tab_gym[$i]['bb']['gym2']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[1]->ExtendedResults[0]->ExtendedResult[2]['Value']; $tab_gym[$i]['bb']['gym3']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[2]->ExtendedResults[0]->ExtendedResult[2]['Value']; $tab_gym[$i]['bb']['gym4']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[3]->ExtendedResults[0]->ExtendedResult[2]['Value']; $tab_gym[$i]['bb']['gym5']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[4]->ExtendedResults[0]->ExtendedResult[2]['Value']; $tab_gym[$i]['bb']['gym6']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[5]->ExtendedResults[0]->ExtendedResult[2]['Value']; $tab_gym[$i]['bb']['gym7']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[6]->ExtendedResults[0]->ExtendedResult[2]['Value']; $tab_gym[$i]['fx']['gym1']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[0]->ExtendedResults[0]->ExtendedResult[3]['Value']; $tab_gym[$i]['fx']['gym2']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[1]->ExtendedResults[0]->ExtendedResult[3]['Value']; $tab_gym[$i]['fx']['gym3']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[2]->ExtendedResults[0]->ExtendedResult[3]['Value']; $tab_gym[$i]['fx']['gym4']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[3]->ExtendedResults[0]->ExtendedResult[3]['Value']; $tab_gym[$i]['fx']['gym5']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[4]->ExtendedResults[0]->ExtendedResult[3]['Value']; $tab_gym[$i]['fx']['gym6']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[5]->ExtendedResults[0]->ExtendedResult[3]['Value']; $tab_gym[$i]['fx']['gym7']=(string)$xml->Competition[0]->Result[$i]->Competitor[0]->Composition[0]->Athlete[6]->ExtendedResults[0]->ExtendedResult[3]['Value']; $tab_gym[$i]['prenom']=$firstname; $tab_gym[$i]['so']=$so; $tab_gym[$i]['pays']=$NOC; $tab_gym[$i]['app1']=$app1; $tab_gym[$i]['app2']=$app2; $tab_gym[$i]['app3']=$app3; $tab_gym[$i]['app4']=$app4; $tab_gym[$i]['type1']=$type1; $tab_gym[$i]['type2']=$type2; $tab_gym[$i]['type3']=$type3; $tab_gym[$i]['type4']=$type4; } } if($tab_gym != ""){ $tab_gym = subval_sort($tab_gym,'so'); } $i=0; while ($tab_gym[$i]['note'] != ""){ ?>
Rk NF Names Vault Uneven Bars Beam Floor Total
<? echo $tab_gym[$i]['pays'] ?>




Total apparatus"; ?>
 
0){ ?>  : 
0){ ?>  : 
0){ ?>  : 
0){ ?>  : 
0){ ?>  : 
Total vault :
0){ ?>  : 
0){ ?>  : 
0){ ?>  : 
0){ ?>  : 
0){ ?>  : 
Total uneven bars :
0){ ?>  : 
0){ ?>  : 
0){ ?>  : 
0){ ?>  : 
0){ ?>  : 
Total balance beam :
0){ ?>  : 
0){ ?>  : 
0){ ?>  : 
0){ ?>  : 
0){ ?>  : 
Total floor :

Back"; }else{ echo "Back"; } ?>