if ($match->finale > 1) { echo "<tr><td class=headerfiche>{$strMatch} 1/{$match->finale} {$strFinale} {$type} #{$match->numero}</td></tr>"; } elseif ($match->finale == 1) { echo "<tr><td class=headerfiche>{$strMatch} {$strFinale} {$type} #{$match->numero}</td></tr>"; } else { echo "<tr><td class=headerfiche>{$strMatch} {$strGrandFinal}</td></tr>"; } } echo "<tr><td>"; echo "<table cellspacing=0 cellpadding=3 border=0 width=100%>"; echo "<tr><td class=text colspan=5><img src=images/spacer.gif></td></tr>"; echo "<tr>"; echo "<td class=text align=left width=120> "; echo $show($match->equipe1, '', '', $seed1); echo "</td>"; echo show_score1($match->score1, $match->score2, $match->frags1, $match->frags2, $match->type, $match->status, $match->statusequipe, $match->modematchscore); echo "<td class=text align=center width=20>{$strVS}</td>"; echo show_score2($match->score1, $match->score2, $match->frags1, $match->frags2, $match->type, $match->status, $match->statusequipe, $match->modematchscore); echo "<td class=text align=right width=120>"; echo $show($match->equipe2, '', '', $seed2, 'right'); echo " </td>"; echo "</tr>"; echo "<tr>"; echo "<td class=text colspan=2 align=left>"; echo "<input type=checkbox name=statusequipe value=F1 onclick=\"oneOrNoCheckboxGroup(this);\" style=\"border: 0px;background-color:transparent;\">{$strForfait} "; echo "<input type=checkbox name=statusequipe value=D1 onclick=\"oneOrNoCheckboxGroup(this);\" style=\"border: 0px;background-color:transparent;\">{$strDisqualifie}"; echo "</td>"; echo "<td class=text></td>"; echo "<td class=text colspan=2 align=right>"; echo "{$strDisqualifie}<input type=checkbox name=statusequipe value=D2 onclick=\"oneOrNoCheckboxGroup(this);\" style=\"border: 0px;background-color:transparent;\"> "; echo "{$strForfait}<input type=checkbox name=statusequipe value=F2 onclick=\"oneOrNoCheckboxGroup(this);\" style=\"border: 0px;background-color:transparent;\">";
function show_match_poule($id, $op = '') { global $db, $dbprefix, $s_joueur, $strVS, $strScore, $strMap; global $strCache, $strActif, $strEnCours, $strValidation, $strConflit, $strTermine, $grade; $match = match($id); if (!$match) { return; } /*** verification securite ***/ //if($op=='admin') verif_admin_tournois($s_joueur,$match->tournois); if ($op == 'admin') { verif_admin_tournois($s_joueur, $match->tournois, $grade['a'], $grade['b'], $grade['t']); } /*** récupération des infos ***/ $seed1 = seed($match->equipe1, $match->tournois); $seed2 = seed($match->equipe2, $match->tournois); $modeequipe_tournois = modeequipe_tournois($match->tournois); $modescore_tournois = modescore_tournois($match->tournois); if ($modeequipe_tournois == 'E') { $show = "show_equipe"; } else { $show = "show_joueur"; } if ($op != 'admin' && $match->status == 'C') { $match = ''; } if ($op) { $op_str = "&op={$op}"; } else { $op_str = ''; } if ($match->status == "C") { $title = $strCache; } if ($match->status == "A") { $title = $strActif; } if ($match->status == "D") { $title = $strEnCours; } if ($match->status == "V") { $title = $strValidation; } if ($match->status == "F") { $title = $strConflit; } if ($match->status == "T") { $title = $strTermine; } // info du match echo '<table cellspacing="0" cellpadding="0" border="0"><tr><td>'; echo '<table cellspacing="0" cellpadding="0" border="0"><tr valign=center>'; if ($op == 'admin') { echo "<td class=\"info\">{$match->status}</td>"; $hauteur = 450; } elseif ($op == 'report') { $hauteur = 400; } else { $hauteur = 350; } echo "<td class=\"info\"><input type=\"radio\" name=\"match\" value=\"{$match->id}\" onclick=\"javascript:ouvrir_fenetre('?page=matchs_gestion{$op_str}&id={$match->id}&header=win','match',{$hauteur},500)\" style=\"border: 0px;background-color:transparent;\" title=\"{$title}\">"; if ($op == 'admin' && ($match->status == 'C' || $match->status == 'A' || $match->status == 'D' && ($modescore_tournois == 'M4' || $modescore_tournois == 'AB'))) { echo "<td class=\"info\"><input type=\"checkbox\" name=\"tab_matches[]\" value=\"{$match->id}\" style=\"border: 0px;background-color:transparent;\"></td>"; } echo '</tr>'; echo '</table>'; echo '</td>'; // ekip 1 echo '<td class="text" align="left" width="120">'; if ($match->statusequipe == 'F1') { echo $show($match->equipe1, $op, 'F', $seed1); } elseif ($match->statusequipe == 'D1') { echo $show($match->equipe1, $op, 'D', $seed1); } else { echo $show($match->equipe1, $op, '', $seed1); } echo '</td>'; echo show_score1($match->score1, $match->score2, $match->frags1, $match->frags2, $match->type, $match->status, $match->statusequipe, $match->modematchscore); echo '<td class="text" align="center" width="20">' . $strVS . '</td>'; echo show_score2($match->score1, $match->score2, $match->frags1, $match->frags2, $match->type, $match->status, $match->statusequipe, $match->modematchscore); // ekip 2 echo '<td class="text" align="right" width="120">'; if ($match->statusequipe == 'F2') { echo $show($match->equipe2, $op, 'F', $seed2, 'right'); } elseif ($match->statusequipe == 'D2') { echo $show($match->equipe2, $op, 'D', $seed2, 'right'); } else { echo $show($match->equipe2, $op, '', $seed2, 'right'); } echo '</td>'; echo '</tr>'; /** info du match **/ if ($op != 'report' && ($match->status != 'T' && $match->status != 'F' && $match->status != 'V' || $op == 'admin')) { $map = ''; /** manche **/ if ($match->status == 'A') { $manches = manches($match->id); for ($i = 0; $i < count($manches); $i++) { if ($manches[$i]->map) { $map .= $manches[$i]->map . ','; } } $map = substr($map, 0, -1); } elseif ($match->status == 'D') { $mancheactive = manche_active($match->id); if ($mancheactive->map) { $map = $mancheactive->map; if (nb_manches($match->id) > 1) { $map .= ': ' . $mancheactive->score1 . '/' . $mancheactive->score2; } } } if ($map) { $map = "- {$map}"; } /** date **/ /*$date_now = time(); $date=strftime(DATESTRING, $match->date); if(!$match->date) $date=''; if($match->date < $date_now && ($match->status=='C' || $match->status=='A')) $date='<font color="red">'.$date.'</font>'; if($match->date && ($match->status=='C' || $match->status=='A')) $date="- $date"; else $date='';*/ echo '<tr height="10">'; echo '<td></td>'; echo '<td class="info" colspan="5" nowrap ><img src="images/next.gif" border="0" align="absmiddle" alt="next"><small>' . $match->id . ' ' . $map . '</small></td>'; echo '</tr>'; } echo '</td></tr></table>'; }