本文整理匯總了PHP中CSession::initialise方法的典型用法代碼示例。如果您正苦於以下問題:PHP CSession::initialise方法的具體用法?PHP CSession::initialise怎麽用?PHP CSession::initialise使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CSession
的用法示例。
在下文中一共展示了CSession::initialise方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isSessionIDValid
function isSessionIDValid($config, $xsid)
{
$bValid = false;
//Instantiate the CR3DCQuery Class
$oR3DCQuery = new CR3DCQuery($config);
//$oR3DCQuery->CheckSIDTimeout();
CSession::initialise($config);
CSession::CheckSIDTimeout();
if ($xsid != "") {
//if($oR3DCQuery->CheckLogin($config, $xsid))
if (CSession::CheckLogin($xsid)) {
$session = base64_decode($xsid);
// list($uniq, $player_id) = preg_split("/\|/", $session);
list($uniq, $player_id) = explode("|", $session);
if ($uniq != "" && is_numeric($player_id)) {
$bValid = true;
//$oR3DCQuery->UpdateSIDTimeout($config, $xsid);
CSession::UpdateSIDTimeout($xsid);
$oR3DCQuery->SetPlayerCreditsInit($player_id);
}
}
}
if ($oR3DCQuery->ELOIsActive()) {
$oR3DCQuery->ELOCreateRatings();
}
$oR3DCQuery->MangeGameTimeOuts();
$oR3DCQuery->Close();
unset($oR3DCQuery);
return $bValid;
}
示例2: join
echo $conf['chat_refresh_rate'];
?>
* 1000, move: <?php
echo $conf['last_move_check_rate'];
?>
* 1000, game_over: <?php
echo $conf['last_move_check_rate'];
?>
* 2000};
settings['initial_game_state'] = "<?php
include $Root_Path . "CChess2.php";
include $Root_Path . "CChessBoard.php";
include $Root_Path . "CChessBoardUtilities.php";
include $Root_Path . "CSession.php";
CSession::initialise($config);
ChessHelper::load_chess_game($gid);
$str = "<RESPONSE><PGN>";
$str .= ChessHelper::get_game_pgn();
$str .= "</PGN>\n";
$pieces = ChessHelper::get_captured_pieces();
$str .= "<CAPTURED_BY_WHITE>" . join(', ', $pieces['white']) . "</CAPTURED_BY_WHITE>\n";
$str .= "<CAPTURED_BY_BLACK>" . join(', ', $pieces['black']) . "</CAPTURED_BY_BLACK>\n";
$str .= "<GAME_STATE>";
$str .= ChessHelper::get_game_state();
$str .= "</GAME_STATE>\n";
$str .= "<GAME_RESULT>";
$str .= ChessHelper::get_game_result();
$str .= "</GAME_RESULT>\n";
$str .= "<DRAWCODE>";
$str .= $oR3DCQuery->IsRequestDraw($config, $_GET['gameid'], $player == 'black' ? TRUE : FALSE);