本文整理汇总了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 .= ",";
}
示例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;
}
示例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);
}
}
}
}