本文整理汇总了PHP中Invitation::GetInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP Invitation::GetInstance方法的具体用法?PHP Invitation::GetInstance怎么用?PHP Invitation::GetInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Invitation
的用法示例。
在下文中一共展示了Invitation::GetInstance方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getInvitationMessage
function getInvitationMessage($invitation)
{
$search = array("\n", "\r");
$replace = array("<br/>", "");
$messageObj = Invitation::GetInstance()->GetInvitationMessageById($invitation['invitemessageid']);
return str_replace($search, $replace, $messageObj['message']);
}
示例2: GetInvitationThread
function GetInvitationThread($visitedpageid)
{
$invitation = Invitation::GetInstance()->GetInvitationByVisitedPageId($visitedpageid);
if (!empty($invitation['threadid'])) {
return Thread::getInstance()->GetThreadById($invitation['threadid']);
}
return NULL;
}
示例3: notifyOperatorOnHideInvitation
function notifyOperatorOnHideInvitation($pageid, $event)
{
$invitation = Invitation::GetInstance()->GetInvitationByVisitedPageId($pageid);
$threadid = $invitation['threadid'];
if (!empty($threadid)) {
$reasonText = null;
if ($event == "reject") {
$reasonText = Resources::Get('invite.visitor.closed.invitation', array(), WEBIM_CURRENT_LOCALE);
} elseif ($event == "timeout") {
$reasonText = Resources::Get('invite.invitation.timout', array(), WEBIM_CURRENT_LOCALE);
} elseif ($event == "left") {
$reasonText = Resources::Get('invite.window.closed', array(), WEBIM_CURRENT_LOCALE);
}
if (!empty($reasonText)) {
ThreadProcessor::GetInstance()->ProcessThread($threadid, 'visitor_invite_close', array('message' => $reasonText));
}
}
}
示例4: time
$hash['operatorid'] = $operator['operatorid'];
$hash['sendername'] = $operator['fullname'];
} else {
//$hash['sendername'] = $visitSession['visitorname'];
$hash['sendername'] = $v['name'];
}
$postedid = ThreadProcessor::getInstance()->ProcessThread($thread['threadid'], $isvisitor ? 'visitor_message' : 'operator_message', $hash);
$_SESSION['LAST_SENT_MESSAGE'] = $message;
$_SESSION['LAST_MESSAGE_TIME'] = time();
$_SESSION['LAST_SENT_THREAD_ID'] = $threadid;
$_SESSION['LAST_SENT_WAS_VISITOR'] = $isvisitor;
if ($isvisitor && empty($thread["shownmessageid"])) {
Thread::getInstance()->CommitThread($thread['threadid'], array('shownmessageid' => $postedid));
}
if (!$isvisitor && $thread['state'] == STATE_INVITE) {
Invitation::GetInstance()->UpdateInvitationMessage($thread['threadid'], $postedid);
}
}
Thread::getInstance()->PrintThreadMessages($thread, $token, $lastid, $isvisitor, $outformat, $viewonly);
exit;
} elseif ($act == "rename") {
if (!Visitor::getInstance()->canVisitorChangeName()) {
show_error("server: forbidden to change name");
}
if (!empty($_REQUEST['name'])) {
$newname = smarticonv('UTF-8', WEBIM_ENCODING, $_REQUEST['name']);
Thread::getInstance()->RenameVisitor($thread, $newname);
Visitor::getInstance()->setVisitorNameCookie($newname);
}
// $data = strtr(base64_encode($newname), '+/=', '-_, ');
show_ok_result("rename");