当前位置: 首页>>代码示例>>PHP>>正文


PHP CR3DCQuery::SendMessage方法代码示例

本文整理汇总了PHP中CR3DCQuery::SendMessage方法的典型用法代码示例。如果您正苦于以下问题:PHP CR3DCQuery::SendMessage方法的具体用法?PHP CR3DCQuery::SendMessage怎么用?PHP CR3DCQuery::SendMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CR3DCQuery的用法示例。


在下文中一共展示了CR3DCQuery::SendMessage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: list

 ////////////////////////////////////////////////////////////////////////////////////////////
 // sendmsg
 // Params: action, sid, rplayerid, message
 ////////////////////////////////////////////////////////////////////////////////////////////
 case "sendmsg":
     if (isSessionIDValid($config, $xsid)) {
         if ($_GET['rplayerid'] != "" && $_GET['message']) {
             $txtmsg = $_GET['message'];
             $session = base64_decode($xsid);
             list($uniq, $player_id) = preg_split("/\\|/", $session);
             //Instantiate theCR3DCQuery Class
             $oR3DCQuery = new CR3DCQuery($config);
             $aToReplace = array("<", ">", "\\'", "\\\"", "“", "”", "„", "‘", "’", "‚");
             $aReplaceWith = array("&lt;", "&gt;", "&#x27;", "&#x22;", "&#x201C;", "&#x201D;", "&#x201E;", "&#x2018;", "&#x2019;", "&#x201A;");
             $txtmsg = str_replace($aToReplace, $aReplaceWith, $txtmsg);
             $oR3DCQuery->SendMessage($_GET['rplayerid'], $xsid, $player_id, $txtmsg);
             $oR3DCQuery->Close();
             unset($oR3DCQuery);
             echo "<RESPONSE>\n";
             echo "<SENT>true</SENT>\n";
             echo "</RESPONSE>\n";
         } else {
             echo "<RESPONSE>\n";
             echo "<SENT>false</SENT>\n";
             echo "</RESPONSE>\n";
         }
     } else {
         echo "<RESPONSE>\n";
         echo "<ERROR>IDS_SESSION_ID_INVALID</ERROR>\n";
         echo "</RESPONSE>\n";
     }
开发者ID:robertohernando,项目名称:phpchess,代码行数:31,代码来源:mobile.php

示例2: trim

    }
}
///////////////////////////////////////////////////////////////////////
$slctUsers = trim($_GET['slctUsers']);
if ($slctUsers == "") {
    $slctUsers = trim($_POST['slctUsers']);
}
$txtmsg = trim($_POST['txtmsg']);
$cmdSend = trim($_POST['cmdSend']);
$bMessageSent = false;
// Send message
if ($cmdSend != "" && $slctUsers != "-" && $txtmsg != "") {
    $aToReplace = array("<", ">", "\\'", "\\\"", "“", "”", "„", "‘", "’", "‚");
    $aReplaceWith = array("&lt;", "&gt;", "&#x27;", "&#x22;", "&#x201C;", "&#x201D;", "&#x201E;", "&#x2018;", "&#x2019;", "&#x201A;");
    $txtmsg = str_replace($aToReplace, $aReplaceWith, $txtmsg);
    $oR3DCQuery->SendMessage($slctUsers, $_SESSION['sid'], $_SESSION['id'], $txtmsg);
    $bMessageSent = true;
}
$cmdDelete = trim($_POST['cmdDelete']);
$cmdSave = trim($_POST['cmdSave']);
$txtIbID = trim($_POST['txtIbID']);
$achkID = $_POST['chkMessage'];
$cmdDeleteAll = $_POST['cmdDeleteAll'];
// Delete All Messages
if ($cmdDeleteAll != "" && $achkID != "") {
    $ncount = count($achkID);
    $i = 0;
    while ($i < $ncount) {
        $oR3DCQuery->DeleteMessageFromInbox($config, $achkID[$i]);
        $i++;
    }
开发者ID:robertohernando,项目名称:phpchess,代码行数:31,代码来源:chess_msg_center.php


注:本文中的CR3DCQuery::SendMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。