當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Invitation::GetInstance方法代碼示例

本文整理匯總了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']);
}
開發者ID:Nikitian,項目名稱:fl-ru-damp,代碼行數:7,代碼來源:invite.php

示例2: GetInvitationThread

 function GetInvitationThread($visitedpageid)
 {
     $invitation = Invitation::GetInstance()->GetInvitationByVisitedPageId($visitedpageid);
     if (!empty($invitation['threadid'])) {
         return Thread::getInstance()->GetThreadById($invitation['threadid']);
     }
     return NULL;
 }
開發者ID:Nikitian,項目名稱:fl-ru-damp,代碼行數:8,代碼來源:class.visitedpage.php

示例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));
        }
    }
}
開發者ID:Nikitian,項目名稱:fl-ru-damp,代碼行數:18,代碼來源:track.php

示例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");
開發者ID:notUserDeveloper,項目名稱:fl-ru-damp,代碼行數:31,代碼來源:thread.php


注:本文中的Invitation::GetInstance方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。