if ($oR3DCQuery->TGameStatus($GID)) { $oR3DCQuery->GetTGameBoard($config, $GID, $_SESSION['sid'], $_SESSION['id'], $clrl, $clrd); if ($oR3DCQuery->IsPlayersTurn($config, $_SESSION['id'], $GID)) { //echo "Its, ".$_SESSION['user']." turn to play."; echo str_replace("['user']", $_SESSION['user'], GetStringFromStringTable("IDS_TGAME_TXT_3", $config)); } } else { echo "<br>" . GetStringFromStringTable("IDS_TGAME_TXT_3", $config) . ""; } } $oR3DCQuery->Close(); unset($oR3DCQuery); } else { //Instantiate theCR3DCQuery Class $oR3DCQuery = new CR3DCQuery($config); if ($oR3DCQuery->TimeForTGame($config, $GID) == false) { echo "<br>" . GetStringFromStringTable("IDS_TGAME_TXT_1", $config) . ""; } else { if ($oR3DCQuery->TGameStatus($GID)) { $oR3DCQuery->GetTGameBoard($config, $GID, "", 0, $clrl, $clrd); } else { echo "<br>" . GetStringFromStringTable("IDS_TGAME_TXT_2", $config) . ""; } } $oR3DCQuery->Close(); unset($oR3DCQuery); } ?> </body> </html>
window.location.reload(true) } } window.onload=starttime <?php //////////// //Instantiate theCR3DCQuery Class $oR3DCQuery = new CR3DCQuery($config); if ($oR3DCQuery->IsPlayersTurn($config, $_SESSION['id'], $GID) && $oR3DCQuery->TimeForTGame($config, $GID)) { echo "parent.frames['chessboard'].location.reload();"; } elseif ($oR3DCQuery->IsPlayersTurn($config, $_SESSION['id'], $GID) == false && $oR3DCQuery->TimeForTGame($config, $GID) == false) { echo "parent.frames['chessboard'].location.reload();"; } elseif ($oR3DCQuery->TGameStatus($GID) == false) { echo "parent.frames['chessboard'].location.reload();"; } $oR3DCQuery->Close(); unset($oR3DCQuery); /////////// ?> </script> <body> <textarea cols='32' rows='24' class='post'> <?php //Instantiate theCR3DCQuery Class $oR3DCQuery = new CR3DCQuery($config);
$cmdResign = $_GET['cmdResign']; if ($cmdResign != "") { if ($isblack) { $oR3DCQuery->UpdateGameStatus($config, $gid, "C", "W"); } else { $oR3DCQuery->UpdateGameStatus($config, $gid, "C", "B"); } } $oR3DCQuery->Close(); unset($oR3DCQuery); $txtmovefrom = $_GET['txtmovefrom']; $txtmoveto = $_GET['txtmoveto']; if (isset($_SESSION['sid']) && isset($_SESSION['user']) && isset($_SESSION['id']) && $GID != "" && $txtmovefrom != "" && $txtmoveto != "") { //Instantiate theCR3DCQuery Class $oR3DCQuery = new CR3DCQuery($config); if ($oR3DCQuery->IsPlayersTurn($config, $_SESSION['id'], $GID) && $oR3DCQuery->TimeForTGame($config, $GID) && $oR3DCQuery->TGameStatus($GID)) { $movestr2 = $txtmovefrom . "-" . $txtmoveto; // get the fen for the game $fen = $oR3DCQuery->GetHackedFEN($_SESSION['sid'], $GID); //check to see if the move is valid if (is_Move_legal($fen, $movestr2)) { //if ! promotion screen if (!($move_promotion_figur && strlen($movestr2) == 5)) { $Move = $txtmovefrom . "," . $txtmoveto; $oR3DCQuery->CurrentGameMovePiece($config, $gid, $_SESSION['sid'], $_SESSION['id'], $Move); //checkmate if (get_GameState() == 1) { if ($w_player_id == $_SESSION['id']) { $oR3DCQuery->UpdateGameStatus($config, $gid, "C", "B"); $bmove_error = false; } else {