當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。