/*** verification securite ***/
 verif_admin_tournois($s_joueur, $s_tournois, $grade['a'], $grade['b'], $grade['t']);
 $db->delete("{$dbprefix}serveurs_tournois");
 $db->where("tournois = {$s_tournois}");
 $db->exec();
 if (count($tab_serveurs) != 0) {
     foreach ($tab_serveurs as $idserveur) {
         $db->insert("{$dbprefix}serveurs_tournois (serveur,tournois)");
         $db->values("{$idserveur},{$s_tournois}");
         $db->exec();
     }
 }
 /*** modification des serveurs dans les matchs de poules ***/
 $index_srv = $index_srv_poule = 0;
 for ($p = 1; $p <= nb_poules($s_tournois); $p++) {
     $nb_tours = nb_tours($p, $s_tournois);
     $index_srv = $index_srv_poule;
     for ($t = 1; $t <= $nb_tours; $t++) {
         $index_srv_poule = $index_srv;
         $db->select("id");
         $db->from("{$dbprefix}matchs");
         $db->where("type = 'P'");
         $db->where("poule = {$p}");
         $db->where("tour = {$t}");
         $db->where("tournois = {$s_tournois}");
         $db->order_by("id");
         $res1 = $db->exec();
         while ($match = $db->fetch($res1)) {
             $index_srv_poule++;
             $index_real_srv = $index_srv_poule % count($tab_serveurs);
             if ($index_real_srv == 0) {
 echo "<form name=form method=post action=?page=maps_tournois&op=modify>";
 /*** Poules ***/
 if (($type_tournois == 'T' || $type_tournois == 'C') && $status_tournois == 'P') {
     echo "<table border=0 cellpadding=0 cellspacing=0>";
     echo "<tr><td class=title align=center>{$strPoules}</td></tr>";
     echo "</table>";
     echo "<table cellspacing=1 cellpadding=2 border=0 class=bordure1>";
     echo "<tr><td class=headerliste>{$strTour}</td>";
     for ($i = 1; $i <= $nb_manches_max_tournois; $i++) {
         echo "<td class=headerliste>{$strMap} {$strManche} {$i}</td>";
     }
     echo "</tr>";
     //calcul du nombre de tour
     $nb_tours_max = 0;
     for ($i = 1; $i <= $nb_poules_tournois; $i++) {
         $nb_tours_poule = nb_tours($i, $s_tournois);
         if ($nb_tours_poule > $nb_tours_max) {
             $nb_tours_max = $nb_tours_poule;
         }
     }
     for ($i = 1; $i <= $nb_tours_max; $i++) {
         echo "<tr><td class=textliste align=center><b>{$i}</b></td>";
         for ($j = 1; $j <= $nb_manches_max_tournois; $j++) {
             $db->select("*");
             $db->from("{$dbprefix}maps_tournois");
             $db->where("tournois = {$s_tournois}");
             $db->where("type = 'P'");
             $db->where("tour = {$i}");
             $db->where("manche = {$j}");
             $res = $db->exec();
             $maptournois = $db->fetch($res);