|
G1 | G2 | G3 | G4 | R1 | R2 | r3 | r4 | B1 | B2 | SD | Tot | $NofGames = 10; $NofCols = 11; } elseif ($rstRound["round"] == 17) { ?>|
Rtng | G1 | G2 | G3 | G4 | G5 | G6 | Rp1 | Rp2 | Bz1 | Bz2 | SD | Total | $NofGames = 10; $NofCols = 11; } else { ?>|
|
G1 | G2 | R1 | R2 | r3 | r4 | B1 | B2 | SD | Tot | $NofGames = 8; $NofCols = 9; } //$sql = mysqli_query($connection,"select * from km2019results where round=$strCode AND color='W' order by round, matchnum, game;"); if ($ln=='ru') { $sql2 = mysqli_query($connection, "select km2019results.*, k.rusname as plname, k1.rusname as opname from km2019results LEFT JOIN km2019players k ON k.id=plcode LEFT JOIN km2019players k1 ON k1.id=opcode where round=".$rstRound["round"]." and (color='W' or color='') order by round desc, matchnum, game;"); } else { $sql2 = mysqli_query($connection, "select * from km2019results where round=".$rstRound["round"]." and (color='W' or color='') order by round desc, matchnum, game;"); } //$NofGames=0; $i = 0; //$NofGames=0; while ($rstSearch = mysqli_fetch_array($sql2)) { $NofGames = $NofGames + 1; $i = $i + 1; if ($rstSearch["score"] == '1.0') { $resW = "1"; $resB = "0"; } elseif ($rstSearch["score"] == '0.5') { $resW = '1/2'; $resB = '1/2'; } elseif ($rstSearch["score"] == '0.0') { $resW = "0"; $resB = "1"; } else { $resW = '*'; $resB = '*'; } if ($prevMatch <> $rstSearch["matchnum"]) { for ($tmpI = 1; $tmpI <= $NofCols - $NofGames; $tmpI++) { if ($i <> 1) { ?>} $botLine = $botLine . " | "; } if ($i <> 1 and $rstSearch['color']<>'') { ?> | |
if ($rstSearch["round"] < 6) { echo say(" Round "," Тур "); echo $rstSearch["round"]; } elseif ($rstSearch["round"] == 6) { echo say("Semifinal","Полуфинал "); } if ($rstSearch["round"] < 7){ echo say(" Match "," Матч ") . $rstSearch["matchnum"];} else { if ($rstSearch['matchnum']=='01'){ echo say('Match for the 1st place','Матч за первое место'); } else { echo say('Match for the 3rd place','Матч за третье место'); } ; } ?> | |||||||||||||
$wTotal = doubleval( $rstSearch["score"]); $bTotal = 1 - doubleval($rstSearch["score"]); $botLine = $botLine . ' | ' . $rstSearch["opname"] . ' (' . $rstSearch["opcountry"] . ') | ';
$botLine = $botLine . '' . $resB . " | "; $whiteCode = $rstSearch["plcode"]; } else { if ($whiteCode <> $rstSearch["plcode"]) { ?>$lastGameColor = "b"; $wTotal = $wTotal + 1 - doubleval($rstSearch["score"]); $bTotal = $bTotal + doubleval($rstSearch["score"]); $botLine = $botLine . ' | ' . $resW . ' | '; } else { ?>$lastGameColor = "w"; $wTotal = $wTotal + doubleval($rstSearch["score"]); $bTotal = $bTotal + 1 - doubleval($rstSearch["score"]); $botLine = $botLine . ' | ' . $resB . ' | '; } } $prevMatch = $rstSearch["matchnum"]; } for ($tmpI = 1; $tmpI <= ($NofCols - $NofGames - 1); $tmpI++) { if ($i <> 1 or true) { ?>} $botLine = $botLine . ' | '; } //replaced '' with 'w' below for last line if (($i <> 1 or true) and $rstSearch['color']<>'w') { ?> | |||||