} LocalizationManager::AutoLoad(); Server::InitDataBlock(array("INTERNAL", "GROUPS", "FILTERS", "INPUTS")); $OVERLAY = new OverlayChat(); $USER = VisitorMonitoring::$Visitor; $USER->Browsers[0] = new VisitorChat($USER->UserId, $USER->UserId . "_OVL"); $USER->Browsers[1] = VisitorMonitoring::$Browser; $OVERLAY->GroupBuilder = new GroupBuilder($USER->Browsers[0]->DesiredChatGroup, $USER->Browsers[0]->DesiredChatPartner, false); $OVERLAY->GroupBuilder->Generate(null, true); $USER->Browsers[0]->Overlay = true; $USER->Browsers[0]->Load(); $USER->Browsers[0]->LoadUserData(); if ($USER->Browsers[0]->FirstCall) { $USER->AddFunctionCall("lz_chat_init_data_change(null);", false); } $OVERLAY->KnowledgebaseSearch(); if (IS_FILTERED && !FILTER_ALLOW_CHATS) { $USER->Browsers[0]->CloseChat(); $USER->Browsers[0]->Destroy(); if (!FILTER_ALLOW_TICKETS) { $USER->AddFunctionCall("lz_tracking_remove_overlay_chat();", true); } } if (!$USER->FirstCall) { $USER->Browsers[0]->LoadForward(false); } if (!empty($USER->Browsers[0]->Forward) && (!Server::$Groups[$USER->Browsers[0]->Forward->TargetGroupId]->IsHumanAvailable(true, true) || !empty($USER->Browsers[0]->Forward->TargetSessId) && @Server::$Operators[$USER->Browsers[0]->Forward->TargetSessId]->UserStatus >= USER_STATUS_OFFLINE)) { $USER->Browsers[0]->Forward->Destroy(); $USER->Browsers[0]->Forward = null; $USER->Browsers[0]->ExternalClose(); $USER->Browsers[0]->Save();