本文整理汇总了PHP中CR3DCQuery::SendGChat方法的典型用法代码示例。如果您正苦于以下问题:PHP CR3DCQuery::SendGChat方法的具体用法?PHP CR3DCQuery::SendGChat怎么用?PHP CR3DCQuery::SendGChat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CR3DCQuery
的用法示例。
在下文中一共展示了CR3DCQuery::SendGChat方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: list
////////////////////////////////////////////////////////////////////////////////////////////
// sendgamechat
// Params: action, sid, gameid, msg
////////////////////////////////////////////////////////////////////////////////////////////
case "sendgamechat":
if (isSessionIDValid($config, $xsid)) {
$session = base64_decode($xsid);
list($uniq, $player_id) = preg_split("/\\|/", $session);
if ($_GET['gameid'] != "" && $_GET['msg'] != "") {
//Instantiate theCR3DCQuery Class
$oR3DCQuery = new CR3DCQuery($config);
$message = "<" . $oR3DCQuery->GetUserIDByPlayerID($config, $player_id) . "> " . $_GET['msg'];
$aToReplace = array("<", ">", "\\'", "\\\"", "“", "”", "„", "‘", "’", "‚");
$aReplaceWith = array("<", ">", "'", """, "“", "”", "„", "‘", "’", "‚");
$message = str_replace($aToReplace, $aReplaceWith, $message);
$oR3DCQuery->SendGChat($config, $_GET['gameid'], $message);
$oR3DCQuery->Close();
unset($oR3DCQuery);
echo "<RESPONSE>\n";
echo "<SENTMSG>true</SENTMSG>\n";
echo "</RESPONSE>\n";
} else {
echo "<RESPONSE>\n";
echo "<SENTMSG>false</SENTMSG>\n";
echo "</RESPONSE>\n";
}
} else {
echo "<RESPONSE>\n";
echo "<ERROR>IDS_SESSION_ID_INVALID</ERROR>\n";
echo "</RESPONSE>\n";
}
示例2: GetStringFromStringTable
$cmdSwitchRealtime = $_GET['cmdSwitchRealtime'];
$oR3DCQuery->ManageRealTimeGame($config, $gid);
if ($cmdSwitchRealtime != "") {
if ($isblack) {
$oR3DCQuery->RealTimeGame($config, $gid, "b");
} else {
$oR3DCQuery->RealTimeGame($config, $gid, "w");
}
}
$isrealtime = $oR3DCQuery->IsRequestRealTime($config, $gid, $isblack);
if ($txtChatMessage != "" && $cmdChat != "") {
if ($_SESSION['CHAT_MESSAGE'] != $txtChatMessage) {
$txtChatMessage = str_replace("\\'", "'", $txtChatMessage);
$txtChatMessage = str_replace("\\`", "'", $txtChatMessage);
$message = "<" . $_SESSION['user'] . "> " . $txtChatMessage;
$oR3DCQuery->SendGChat($ConfigFile, $gid, $message);
$_SESSION['CHAT_MESSAGE'] = $txtChatMessage;
}
}
?>
<html>
<head>
<title><?php
echo GetStringFromStringTable("IDS_PAGETITLES_23", $config);
?>
</title>
<META NAME="keywords" CONTENT="">
<META NAME="DESCRIPTION" CONTENT="">
<META NAME="OWNER" CONTENT="Christian">