A Website about the Beijing 2008 Olympic Games August 8-24, 2008
COMPETITION INFORMATION
Overall Medal Standings, European Union Included (quand même, quoi!)
Source: The Official Website of the Beijing 2008 Olympic Games

Cette page est dynamique et affiche le resultat au moment du chargement.
find('.mainContent', 0); $table = $ret->find('table', 1); $tr = $table->find('tr'); $europe = Array( 'Austria', 'Belgium', 'Bulgaria', 'Cyprus', 'Czech Republic', 'Denmark', 'Estonia', 'Finland', 'France', 'Germany', 'Greece', 'Hungary', 'Ireland', 'Italy', 'Latvia', 'Lithuania', 'Luxembourg', 'Malta', 'Netherlands', 'Poland', 'Portugal', 'Romania', 'Slovakia', 'Slovenia', 'Spain', 'Sweden', 'Great Britain'); $my_europe = Array( 'html_noc' => "EUR - European union
( = France+Germany+Belgium+Italia... )
", 'noc_name' => 'EUR - European union ', 'men_g' => 0, 'men_s' => 0, 'men_b' => 0, 'men_t' => 0, 'women_g' => 0, 'women_s' => 0, 'women_b' => 0, 'women_t' => 0, 'mixed_g' => 0, 'mixed_s' => 0, 'mixed_b' => 0, 'mixed_t' => 0, 'total_g' => 0, 'total_s' => 0, 'total_b' => 0, 'total_t' => 0); $values = Array(); foreach($tr as $row) { if (( $row->class == "tdOne" ) || ( $row->class == "tdTwo" )) { $noc_name = $row->find('td', 1)->plaintext; $men_g = $row->find('td', 2)->plaintext; $men_s = $row->find('td', 3)->plaintext; $men_b = $row->find('td', 4)->plaintext; $men_t = $row->find('td', 5)->plaintext; $women_g = $row->find('td', 6)->plaintext; $women_s = $row->find('td', 7)->plaintext; $women_b = $row->find('td', 8)->plaintext; $women_t = $row->find('td', 9)->plaintext; $mixed_g = $row->find('td', 10)->plaintext; $mixed_s = $row->find('td', 11)->plaintext; $mixed_b = $row->find('td', 12)->plaintext; $mixed_t = $row->find('td', 13)->plaintext; $total_g = $row->find('td', 14)->plaintext; $total_s = $row->find('td', 15)->plaintext; $total_b = $row->find('td', 16)->plaintext; $total_t = $row->find('td', 17)->plaintext; $html_noc = ""; $html_noc = $html_noc.""; $html_noc = $html_noc.$noc_name; $html_noc = $html_noc.""; $my_array = Array( 'html_noc' => $html_noc, 'noc_name' => $noc_name, 'men_g' => $men_g, 'men_s' => $men_s, 'men_b' => $men_b, 'men_t' => $men_t, 'women_g' => $women_g, 'women_s' => $women_s, 'women_b' => $women_b, 'women_t' => $women_t, 'mixed_g' => $mixed_g, 'mixed_s' => $mixed_s, 'mixed_b' => $mixed_b, 'mixed_t' => $mixed_t, 'total_g' => $total_g, 'total_s' => $total_s, 'total_b' => $total_b, 'total_t' => $total_t); $european = false; foreach($europe as $name) { if ( stripos($noc_name, $name) != FALSE ) { $european = true; break; } } if ($european) { // array_push($my_europe , $my_array); $my_europe['men_g'] = $my_europe['men_g'] + $my_array['men_g']; $my_europe['men_s'] = $my_europe['men_s'] + $my_array['men_s']; $my_europe['men_b'] = $my_europe['men_b'] + $my_array['men_b']; $my_europe['men_t'] = $my_europe['men_t'] + $my_array['men_t']; $my_europe['women_g'] = $my_europe['women_g'] + $my_array['women_g']; $my_europe['women_s'] = $my_europe['women_s'] + $my_array['women_s']; $my_europe['women_b'] = $my_europe['women_b'] + $my_array['women_b']; $my_europe['women_t'] = $my_europe['women_t'] + $my_array['women_t']; $my_europe['mixed_g'] = $my_europe['mixed_g'] + $my_array['mixed_g']; $my_europe['mixed_s'] = $my_europe['mixed_s'] + $my_array['mixed_s']; $my_europe['mixed_b'] = $my_europe['mixed_b'] + $my_array['mixed_b']; $my_europe['mixed_t'] = $my_europe['mixed_t'] + $my_array['mixed_t']; $my_europe['total_g'] = $my_europe['total_g'] + $my_array['total_g']; $my_europe['total_s'] = $my_europe['total_s'] + $my_array['total_s']; $my_europe['total_b'] = $my_europe['total_b'] + $my_array['total_b']; $my_europe['total_t'] = $my_europe['total_t'] + $my_array['total_t']; } else { array_push($values , $my_array); } } } array_pop($values); array_push($values, $my_europe); $totals = Array(); usort($values, sort_total); foreach($values as $my_array) { $totals[$my_array['total_t']*1]++; } krsort($totals); foreach($values as $mkey => $my_array) { $to_look = $my_array['total_t']*1; $index = 1; $rank = "??"; foreach($totals as $key => $v) { if ( $key == $to_look ) { $rank = ""; if ($v*1 != 1) { $rank = "="; } $rank = $rank. $index; break; } $index++; } $values[$mkey]['rank'] = $rank." "; } usort($values, sort_rank); function non_empty($a) { if ($a == 0) return ""; return ($a*1)." "; } $one = 0; $index = 1; foreach($values as $my_array) { if ($one == 0) { print "\n"; $one = 1; } else { print "\n"; $one = 0; } print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "\n"; $index++; $all['men_g'] += $my_array['men_g'] * 1; $all['men_s'] += $my_array['men_s'] * 1; $all['men_b'] += $my_array['men_b'] * 1; $all['men_t'] += $my_array['men_t'] * 1; $all['women_g'] += $my_array['women_g'] * 1; $all['women_s'] += $my_array['women_s'] * 1; $all['women_b'] += $my_array['women_b'] * 1; $all['women_t'] += $my_array['women_t'] * 1; $all['mixed_g'] += $my_array['mixed_g'] * 1; $all['mixed_s'] += $my_array['mixed_s'] * 1; $all['mixed_b'] += $my_array['mixed_b'] * 1; $all['mixed_t'] += $my_array['mixed_t'] * 1; $all['total_g'] += $my_array['total_g'] * 1; $all['total_s'] += $my_array['total_s'] * 1; $all['total_b'] += $my_array['total_b'] * 1; $all['total_t'] += $my_array['total_t'] * 1; } print "\n"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print "\n"; ?>
Rank NOC Name Men Women Open/Mixed Total Rank by Total
G S B T G S B T G S B T G S B T
".$index." "; print $my_array['html_noc']; print "".non_empty($my_array['men_g'])."".non_empty($my_array['men_s'])."".non_empty($my_array['men_b'])."".non_empty($my_array['men_t'])."".non_empty($my_array['women_g'])."".non_empty($my_array['women_s'])."".non_empty($my_array['women_b'])."".non_empty($my_array['women_t'])."".non_empty($my_array['mixed_g'])."".non_empty($my_array['mixed_s'])."".non_empty($my_array['mixed_b'])."".non_empty($my_array['mixed_t'])."".non_empty($my_array['total_g'])."".non_empty($my_array['total_s'])."".non_empty($my_array['total_b'])."".non_empty($my_array['total_t'])."".$my_array['rank']."
Total:".non_empty($all['men_g'])."".non_empty($all['men_s'])."".non_empty($all['men_b'])."".non_empty($all['men_t'])."".non_empty($all['women_g'])."".non_empty($all['women_s'])."".non_empty($all['women_b'])."".non_empty($all['women_t'])."".non_empty($all['mixed_g'])."".non_empty($all['mixed_s'])."".non_empty($all['mixed_b'])."".non_empty($all['mixed_t'])."".non_empty($all['total_g'])."".non_empty($all['total_s'])."".non_empty($all['total_b'])."".non_empty($all['total_t'])."
Legend
G - Gold S - Silver B - Bronze T - Total
'=' - Equal sign indicates that two or more NOCs share the same rank by total
Note
Rank by total is calculated by total number of gold, silver and bronze medals.
2008-08-12 19:52:40
GL0000000_95A 50.0