本文整理汇总了PHP中CR3DCQuery::CheckGameAccepted方法的典型用法代码示例。如果您正苦于以下问题:PHP CR3DCQuery::CheckGameAccepted方法的具体用法?PHP CR3DCQuery::CheckGameAccepted怎么用?PHP CR3DCQuery::CheckGameAccepted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CR3DCQuery
的用法示例。
在下文中一共展示了CR3DCQuery::CheckGameAccepted方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: list
// Params: action, sid, gameid
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
// revokegame
// Params: action, sid, gameid
////////////////////////////////////////////////////////////////////////////////////////////
case "revokegame":
if (isSessionIDValid($config, $xsid)) {
if ($_GET['gameid'] != "") {
//Instantiate theCR3DCQuery Class
$oR3DCQuery = new CR3DCQuery($config);
$session = base64_decode($xsid);
list($uniq, $player_id) = preg_split("/\\|/", $session);
//Instantiate theCR3DCQuery Class
$oR3DCQuery = new CR3DCQuery($config);
$IsAccepted = $oR3DCQuery->CheckGameAccepted($config, $player_id, $_GET['gameid']);
list($PlayerType, $status) = explode(" ", $IsAccepted, 2);
if ($status == "waiting" || $status == "-") {
if ($PlayerType == "i") {
$oR3DCQuery->RevokeGame2($_GET['gameid'], $player_id);
} else {
$oR3DCQuery->RevokeGame($_GET['gameid'], $player_id);
}
echo "<RESPONSE>\n";
echo "<REVOKEGAME>";
echo "true";
echo "</REVOKEGAME>\n";
echo "</RESPONSE>\n";
} else {
echo "<RESPONSE>\n";
echo "<REVOKEGAME>";
示例2: list
$oR3DCQuery->ConfirmSID($sid, $user, $id);
if ($user != "" && $id != "") {
$_SESSION['sid'] = $sid;
$_SESSION['user'] = $user;
$_SESSION['id'] = $id;
$oR3DCQuery->GetChessBoardColors($config, $_SESSION['id'], $l, $d);
$_SESSION['lcolor'] = $l;
$_SESSION['dcolor'] = $d;
if ($oR3DCQuery->IsPlayerDisabled($id) == false) {
$clrl = $_SESSION['lcolor'];
$clrd = $_SESSION['dcolor'];
$oR3DCQuery->AddOnlinePlayerToGraphData($_SESSION['user']);
$oR3DCQuery->UpdateLastLoginInfo($_SESSION['id']);
$oR3DCQuery->SetPlayerCreditsInit($_SESSION['id']);
//Check if the game is accepted
$IsAccepted = $oR3DCQuery->CheckGameAccepted($config, $_SESSION['id'], $gid);
$gametypecode = $oR3DCQuery->GetGameTypeCode($gid);
list($PlayerType, $status) = preg_split("/\\s/ ", $IsAccepted, 2);
if ($status == "waiting" || $status == "-") {
header("Location: ./chess_game.php?gameid=" . $gid . "");
}
} else {
header('Location: ./chess_logout.php');
}
}
}
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
//Check if the logged in user has access
if (!isset($_SESSION['sid']) && !isset($_SESSION['user']) && !isset($_SESSION['id'])) {
$_SESSION['PageRef'] = $url;