"ru") $ln = "en"; @$strCat = 'cat'; @$strCode = $instance; if ($strCode <= 0 or $strCode > 10) $strCode = 7; if ($_SERVER['SERVER_NAME'] == 'localhost') { $connection = mysqli_connect("localhost", "chessdaily", "gisellism", "ratings"); $db = mysqli_select_db($connection, "ratings") or die("Unable to connect to FIDE ratings database. Try again or contact webmaster admin@fide.com."); } else { $connection = mysqli_connect("134.213.138.208", "cup2019results", "_!sdsds33fdljk4", "cup2019_results"); $db = mysqli_select_db($connection, "cup2019_results") or die("Unable to connect to FIDE ratings database. Try again or contact webmaster admin@fide.com."); }; $sql = mysqli_query($connection, "select distinct round from km2019results where color='W' or color='' order by round desc;"); if (mysqli_num_rows($sql) > 0) { $rstRound = mysqli_fetch_array($sql); $curRound=$rstRound['round']; @$NofCols = 7; ?>
'.say("Final","Финал").'
'.say("Semifinal","Полуфинал").'
'.say("Round","Тур").' 5
'.say("Round","Тур").' 4
'.say("Round","Тур").' 3
'.say("Round","Тур").' 2
'.say("Round","Тур").' 1
'; break; case (string) 6: echo '
'.say("Semifinal","Полуфинал").'
'.say("Round","Тур").' 5
'.say("Round","Тур").' 4
'.say("Round","Тур").' 3
'.say("Round","Тур").' 2
'.say("Round","Тур").' 1
'; break; case (string) 5: echo '
'.say("Round","Тур").' 5
'.say("Round","Тур").' 4
'.say("Round","Тур").' 3
'.say("Round","Тур").' 2
'.say("Round","Тур").' 1
'; break; case (string) 4: echo '
'.say("Round","Тур").' 4
'.say("Round","Тур").' 3
'.say("Round","Тур").' 2
'.say("Round","Тур").' 1
'; break; case (string) 3: echo '
'.say("Round","Тур").' 3
'.say("Round","Тур").' 2
'.say("Round","Тур").' 1
'; break; case (string) 2: echo '
'.say("Round","Тур").' 2
'.say("Round","Тур").' 1
'; break; case (string) 1: echo '
'.say("Round","Тур").' 1
'; break; } ?>
$rstSearch["matchnum"]) { for ($tmpI = 1; $tmpI <= $NofCols - $NofGames; $tmpI++) { if ($i <> 1) { ?> "; } if ($i <> 1 and $rstSearch['color']<>'') { ?> $bTotal) or ( $wTotal == $bTotal and $wTotal + $bTotal == $NofCols and $lastGameColor == "b")) { echo ''; $botLine = str_replace('style="font-weight:bold;" ', ' ', $botLine); } if ($wTotal == $bTotal and $wTotal + $bTotal <> $NofCols) { $botLine = str_replace('style="font-weight:bold;" ', ' ', $botLine); } if ($rstSearch['color']=='') { $botLine = str_replace('style="font-weight:bold;" ', ' ', $botLine); }; echo $botLine; $botLine = ""; $NofGames = 0; if ($i <> 1 and $rstSearch['color']<>'') { ?>

' . $rstSearch["opname"] . ' (' . $rstSearch["opcountry"] . ')

'; $botLine = $botLine . '"; $whiteCode = $rstSearch["plcode"]; } else { if ($whiteCode <> $rstSearch["plcode"]) { ?> ' . $resW . ''; } else { ?> ''?'black-cell':'').'">' . $resB . ''; } } $prevMatch = $rstSearch["matchnum"]; } for ($tmpI = 1; $tmpI <= ($NofCols - $NofGames - 1); $tmpI++) { if ($i <> 1 or true) { ?> '; } //replaced '' with 'w' below for last line if (($i <> 1 or true) and $rstSearch['color']<>'w') { ?> $bTotal) or ( $wTotal == $bTotal and $wTotal + $bTotal == $NofCols and $lastGameColor == "b")) { echo ''; $botLine = str_replace('style="font-weight:bold;" ', ' ', $botLine); } if ($wTotal == $bTotal and $wTotal + $bTotal <> $NofCols) { $botLine = str_replace('style="font-weight:bold;" ', ' ', $botLine); } if ($rstSearch['color']=='' and false) { $botLine = str_replace('style="font-weight:bold;" ', ' ', $botLine); }; echo $botLine; $botLine = ""; $NofGames = 0; //replaced '' with 'w' below for last line if (($i <> 1 or true ) and $rstSearch['color']<>'w') { ?>

      

G1 G2 G3 G4 R1 R2 r3 r4 B1 B2 SD Tot
          Rtng G1 G2 G3 G4 G5 G6 Rp1 Rp2 Bz1 Bz2 SD Total

      

G1 G2 R1 R2 r3 r4 B1 B2 SD Tot  

st place','Матч за первое место'); } else { echo say('Match for the 3rd place','Матч за третье место'); } ; } ?>

()

' . $resB . "