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


PHP Visitor::CreateSPAMFilter方法代码示例

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


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

示例1: VisitorBrowser

         $browser = new VisitorBrowser($chat->BrowserId, $chat->UserId, false);
         $browser->LoadUserData();
         $feedback->UserData = $browser->UserData;
         Visitor::CloseAllOverlays($chat->UserId);
     } else {
         if ($ticket != null) {
             $feedback->UserId = $ticket->SenderUserId;
             $feedback->TicketId = $ticket->Id;
             if (!empty($ticket->Editor)) {
                 $feedback->OperatorId = $ticket->Editor->Editor;
                 $feedback->GroupId = $ticket->Editor->GroupId;
             }
             $feedback->UserData = UserData::FromTicketMessage($ticket->Messages[0]);
         }
     }
     $isSpam = !empty(Server::$Configuration->File["gl_sfc"]) && Visitor::CreateSPAMFilter($userid, false);
     if (!$isSpam) {
         $feedback->AddCriteriaDataFromServerInput();
         $feedback->Save();
     } else {
         Logging::GeneralLog("Feedback matches SPAM filter rule.");
     }
     $fb_html = str_replace("<!--sub_title-->", "<br>" . LocalizationManager::$TranslationStrings["client_feedback_success"] . "<script>parent.parent.lz_chat_feedback_result();</script>", $fb_html);
     $fb_html = str_replace("<!--title-->", "<br><br><br>" . LocalizationManager::$TranslationStrings["client_thank_you"], $fb_html);
     $fb_html = str_replace("<!--visible-->", "none", $fb_html);
 } else {
     $inputs_html = $js_id_list = "";
     foreach (Server::$Configuration->Database["gl_fb"] as $id => $criteria) {
         if (!empty($js_id_list)) {
             $js_id_list .= ",";
         }
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:31,代码来源:feedback.php

示例2: processPost

function processPost($id, $post, $systemid, $counter, $rgroup, $chatid, $_received = false)
{
    global $USER;
    $post->Id = $id;
    if (isset($_POST["p_pt" . $counter])) {
        $post->Translation = Encoding::Base64UrlDecode($_POST["p_pt" . $counter]);
        $post->TranslationISO = Encoding::Base64UrlDecode($_POST["p_ptiso" . $counter]);
    }
    $post->ChatId = $chatid;
    $post->ReceiverOriginal = $post->Receiver = $systemid;
    $post->ReceiverGroup = $rgroup;
    $post->Received = $_received;
    $post->Save();
    if (!empty(Server::$Configuration->File["gl_sfc"]) && Visitor::CreateSPAMFilter($USER->UserId)) {
        return false;
    }
    return true;
}
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:18,代码来源:functions.external.inc.php

示例3: CreateChat

 function CreateChat($_internalUser, $_visitor, $_host = false, $custom = "", $etpl = "", $_customsInTranscript = true, $_externalSelf = true, $pdm = null)
 {
     if (!empty(Server::$Configuration->File["gl_sfc"]) && Visitor::CreateSPAMFilter($this->UserId) || empty($this->ChatId)) {
         return;
     }
     if (!empty($_internalUser)) {
         UserGroup::RemoveFromAllDynamicGroups($this->SystemId);
         $this->LoadForward();
         if (UserGroup::PersistentJoin($this->UserId, $this->SystemId)) {
             $this->RemoteActivate($_internalUser);
         }
         $this->OperatorId = $_internalUser->SystemId;
         $_internalUser->SetLastChatAllocation();
     } else {
         $this->OperatorId = "";
     }
     $this->SetStatus(CHAT_STATUS_WAITING);
     Server::InitDataBlock(array("INPUTS"));
     DBManager::Execute(false, "INSERT INTO `" . DB_PREFIX . DATABASE_VISITOR_CHAT_OPERATORS . "` (`chat_id`,`user_id`,`jtime`,`status`) VALUES ('" . DBManager::RealEscape($this->ChatId) . "','" . DBManager::RealEscape($this->OperatorId) . "'," . time() . "," . ($_host ? 0 : 1) . ");");
     $this->CreateArchiveEntry($_internalUser, $_visitor, $custom, $etpl, $_customsInTranscript, $pdm);
     if ($_internalUser->IsBot) {
         $this->RemoteActivate($_internalUser);
     } else {
         if (!empty($_internalUser->AppDeviceId) && $_internalUser->AppBackgroundMode) {
             $name = !empty($this->UserData->Fullname) ? $this->UserData->Fullname : Visitor::GetNoName($this->UserId . Communication::GetIP());
             $_internalUser->AddPushMessage($this->ChatId, $this->SystemId, $name, 0);
         }
     }
     if (!empty($_GET["acid"])) {
         $pchatid = Encoding::Base64UrlDecode($_GET["acid"]);
         $result = DBManager::Execute(true, "SELECT * FROM `" . DB_PREFIX . DATABASE_VISITOR_CHATS . "` WHERE `visitor_id`='" . DBManager::RealEscape($this->UserId) . "' AND `chat_id`='" . DBManager::RealEscape($pchatid) . "' AND (`exit` > " . (time() - 30) . " OR `exit`=0) LIMIT 1;");
         if ($result && DBManager::GetRowCount($result) == 1) {
             $row = DBManager::FetchArray($result);
             if (empty($row["waiting"])) {
                 $this->RepostChatHistory(2, $pchatid, $this->OperatorId, 0, 0, $this->UserId . "~" . $this->UserId . "_OVL", $this->ChatId, $this->SystemId, true, false, $_externalSelf);
             }
         }
     }
 }
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:39,代码来源:objects.global.users.inc.php


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