// exitrealtime // Params: action, sid, gameid //////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// // exitrealtime // Params: action, sid, gameid //////////////////////////////////////////////////////////////////////////////////////////// case "exitrealtime": if (isSessionIDValid($config, $xsid)) { $session = base64_decode($xsid); list($uniq, $player_id) = preg_split("/\\|/", $session); if ($_GET['gameid'] != "") { //Instantiate theCR3DCQuery Class $oR3DCQuery = new CR3DCQuery($config); $isblack = $oR3DCQuery->IsPlayerBlack($config, $_GET['gameid'], $player_id); $oR3DCQuery->ExitRealTimeGame($config, $_GET['gameid']); $oR3DCQuery->Close(); unset($oR3DCQuery); echo "<RESPONSE>\n"; echo "<EXITRT>true</EXITRT>\n"; echo "</RESPONSE>\n"; } else { echo "<RESPONSE>\n"; echo "<EXITRT>false</EXITRT>\n"; echo "</RESPONSE>\n"; } } else { echo "<RESPONSE>\n"; echo "<ERROR>IDS_SESSION_ID_INVALID</ERROR>\n"; echo "</RESPONSE>\n"; }
if ($cmdRevokeDraw != "") { $oR3DCQuery->RevokeDrawGame($ConfigFile, $gid, $_SESSION['id']); } $cmdDraw = $_GET['cmdDraw']; if ($cmdDraw != "") { if ($isblack) { $oR3DCQuery->DrawGame($config, $gid, "b"); } else { $oR3DCQuery->DrawGame($config, $gid, "w"); } } $isexitrealtime = false; $isdraw = $oR3DCQuery->IsRequestDraw($config, $gid, $isblack); $cmdExitRealtime = $_GET['cmdExitRealtime']; if ($cmdExitRealtime != "") { $oR3DCQuery->ExitRealTimeGame($config, $gid); $isexitrealtime = true; $_SESSION['RealTimeDoOnce'] = 0; } $rtend = $_GET['rtend']; if ($rtend == 1) { $isexitrealtime = true; $_SESSION['RealTimeDoOnce'] = 0; } $cmdSwitchRealtime = $_GET['cmdSwitchRealtime']; $oR3DCQuery->ManageRealTimeGame($config, $gid); if ($cmdSwitchRealtime != "") { if ($isblack) { $oR3DCQuery->RealTimeGame($config, $gid, "b"); } else { $oR3DCQuery->RealTimeGame($config, $gid, "w");