本文整理汇总了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);