Пример #1
0
 //echo "setInterval ( \"afficheClassementVirtuel($id_pool,$id_saison,$gerant_sel,'div_classement_virtuel',$index_ajax,'$poolName')\", 60000 );\n";
 echo "</script>\n";
 echo "</div>\n";
 echo "</div>\n";
 $index_ajax++;
 // liste des gérants (le gérant sélectionné en premier...)
 $gerantsA = $playoffs2->getListeGerantsTabEquipes($id_pool, $id_saison, $pool, $gerant_sel);
 if (count($gerantsA) > 0) {
     ksort($gerantsA);
     $i = 0;
     foreach ($gerantsA as $item) {
         list($id_gerant, $nickname, $logo) = split("\\^", $item);
         $ordre_gerantsA["{$id_gerant}"] = $i;
         $i++;
         // nbre de points officiels du gérant
         $pts_officiels = $playoffs2->getGerantPtsOfficielsForTabLive($id_pool, $id_saison, $id_gerant, $pool);
         $pts_officiels_gerantsA["{$id_gerant}"] = $pts_officiels;
         $total_pts_live_gerantsA["{$id_gerant}"] = $playoffs2->getGerantPtsLiveForTabLive($id_pool, $id_saison, $id_gerant, $pool);
         $total_pts_virtuels_gerantsA["{$id_gerant}"] = $pts_officiels + $total_pts_live_gerantsA[$id_gerant];
     }
     arsort($total_pts_virtuels_gerantsA);
     foreach ($total_pts_virtuels_gerantsA as $id_gerant => $pts_virtuel) {
         $index = $ordre_gerantsA["{$id_gerant}"];
         $item = $gerantsA["{$index}"];
         list($id_gerant, $nickname, $logo) = split("\\^", $item);
         if ($total_pts_live_gerantsA["{$id_gerant}"] > 0) {
             $str_pts = "{$pts_virtuel} pts ({$pts_officiels_gerantsA[$id_gerant]} officiels)";
         } else {
             $str_pts = "{$pts_officiels_gerantsA[$id_gerant]} pts";
         }
         echo "<DIV ID=\"playoffs2\" style=\"width:500px;margin-bottom: 5px;\">\n";