コード例 #1
0
    $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();
    $USER->Browsers[0]->Load();
}
$OVERLAY->DefineTargets();
$OVERLAY->DefineModes();
if (defined("IGNORE_WM") && (empty($USER->Browsers[0]->DesiredChatGroup) || !$OVERLAY->Human)) {
    $USER->AddFunctionCall("lz_chat_set_talk_to_human(false,false);", false);
}
$OVERLAY->IsHumanChatAvailable = $OVERLAY->OperatorCount > 0;
$OVERLAY->CreateChatTemplate();
$USER->Browsers[0]->ReplaceLoginDetails($USER);
if (($USER->Browsers[0]->Status > CHAT_STATUS_OPEN || !empty($USER->Browsers[0]->InitChatWith) || $USER->Browsers[0]->Waiting) && !$USER->Browsers[0]->Closed) {
    Visitor::$IsActiveOverlayChat = $OVERLAY->IsHumanChatAvailable = !$USER->Browsers[0]->Declined;
} else {
    if ($USER->Browsers[0]->Closed && $USER->Browsers[0]->LastActive > time() - Server::$Configuration->File["timeout_chats"] || !empty($_GET["mi0"])) {
        Visitor::$IsActiveOverlayChat = !$USER->Browsers[0]->Declined;
    }
}
if (!empty($USER->Browsers[0]->DesiredChatGroup) && !(IS_FILTERED && !FILTER_ALLOW_CHATS && !FILTER_ALLOW_TICKETS)) {
    $changed = Visitor::$PollCount != 1 ? $USER->Browsers[0]->ApplyOverlayInputValues() : false;
    if (empty($USER->Browsers[0]->UserData->Text) && !empty($_GET["mp0"])) {
        $USER->Browsers[0]->UserData->Text = cutString(Encoding::Base64UrlDecode($_GET["mp0"]), 255);
        $changed = true;
    }
    if (Communication::ReadParameter("tc", -1) != -1) {