本文整理汇总了PHP中CIMNotify::MarkNotifyRead方法的典型用法代码示例。如果您正苦于以下问题:PHP CIMNotify::MarkNotifyRead方法的具体用法?PHP CIMNotify::MarkNotifyRead怎么用?PHP CIMNotify::MarkNotifyRead使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CIMNotify
的用法示例。
在下文中一共展示了CIMNotify::MarkNotifyRead方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __SendMessage
private function __SendMessage($senderId, $receiverId, $messageID, $type, $message, $domain = "")
{
if (!$this->isInitialized) {
$this->Initialize();
}
$receiverId = intval($receiverId);
if ($receiverId <= 0) {
return false;
}
$messageID = intval($messageID);
if ($messageID <= 0) {
return false;
}
if (!in_array($type, array("P", "S"))) {
return false;
}
if (strlen($message) <= 0) {
return false;
}
if (!CXMPPUtility::CheckXmppStatusOnline()) {
return false;
}
$senderJId = false;
$receiverJId = false;
$arUserID = array();
$arUserID[] = $receiverId;
$senderId = intval($senderId);
if ($senderId <= 0) {
if ($senderId != -5) {
return false;
}
$senderJId = self::GetSystemJId($domain);
} else {
$arUserID[] = $senderId;
}
if (!($arJID = CXMPPUtility::GetJIdByUserId($arUserID, $domain))) {
return false;
}
if ($senderId > 0) {
$senderJId = $arJID[$senderId];
}
$receiverJId = $arJID[$receiverId];
if (!$senderJId) {
CXMPPUtility::Show("Error senderId=" . $senderId . ", receiverId=" . $receiverId . ", messageID=" . $messageID . " - Sender not found", 0);
return false;
}
if (!$receiverJId) {
CXMPPUtility::Show("Error senderId=" . $senderId . ", receiverId=" . $receiverId . ", messageID=" . $messageID . " - Reseiver not found", 0);
return false;
}
$messageType = "chat";
if ($type == "S") {
$messageType = "normal";
}
$arMessage = CXMPPUtility::GetMessageArray($senderJId, $receiverJId, $messageType, $message, $domain);
$result = false;
if (CXMPPServer::IsServerStarted()) {
$server = CXMPPServer::GetServer();
$result = $server->Send($receiverJId, $arMessage, $domain);
} else {
$result = CXMPPUtility::SendToServer($arMessage, $domain);
}
if ($result === true) {
if (IsModuleInstalled("im") && CModule::IncludeModule("im")) {
if ($type == "S") {
$CIMNotify = new CIMNotify($receiverId);
$CIMNotify->MarkNotifyRead($messageID);
} else {
$CIMMessage = new CIMMessage($receiverId);
$CIMMessage->SetReadMessage($senderId);
}
} else {
CSocNetMessages::MarkMessageRead($receiverId, $messageID);
}
} else {
CXMPPUtility::Show("Error senderId=" . $senderId . ", receiverId=" . $receiverId . ", messageID=" . $messageID . " - Message was not send", 0);
}
return $result;
}
示例2: CIMNotify
$arUsers[$value['USER']['id']] = $value['USER'];
}
$arRecent[] = $value['MESSAGE'];
}
echo CUtil::PhpToJsObject(array('USER_ID' => $USER->GetId(), 'RECENT' => $arRecent, 'USERS' => $arUsers, 'CHAT' => $arChat, 'ERROR' => ''));
} else {
if ($_POST['IM_NOTIFY_VIEWED'] == 'Y') {
$errorMessage = "";
$CIMNotify = new CIMNotify();
$CIMNotify->MarkNotifyRead($_POST['MAX_ID'], true);
echo CUtil::PhpToJsObject(array('ERROR' => $errorMessage));
} else {
if ($_POST['IM_NOTIFY_VIEW'] == 'Y') {
$errorMessage = "";
$CIMNotify = new CIMNotify();
$CIMNotify->MarkNotifyRead($_POST['ID']);
echo CUtil::PhpToJsObject(array('ERROR' => $errorMessage));
} else {
if ($_POST['IM_NOTIFY_CONFIRM'] == 'Y') {
$errorMessage = "";
$CIMNotify = new CIMNotify();
$CIMNotify->Confirm($_POST['NOTIFY_ID'], $_POST['NOTIFY_VALUE']);
echo CUtil::PhpToJsObject(array('NOTIFY_ID' => intval($_POST['NOTIFY_ID']), 'NOTIFY_VALUE' => $_POST['NOTIFY_VALUE'], 'ERROR' => $errorMessage));
} else {
if ($_POST['IM_NOTIFY_REMOVE'] == 'Y') {
$errorMessage = "";
$CIMNotify = new CIMNotify();
$CIMNotify->DeleteWithCheck($_POST['NOTIFY_ID']);
echo CUtil::PhpToJsObject(array('NOTIFY_ID' => intval($_POST['NOTIFY_ID']), 'ERROR' => $errorMessage));
} else {
if ($_POST['IM_NOTIFY_GROUP_REMOVE'] == 'Y') {