コード例 #1
0
    if ($OVERLAY->LanguageRequired) {
        $OVERLAY->OverlayHTML = Server::Replace($OVERLAY->OverlayHTML, $OVERLAY->LanguageRequired, false);
    }
    if (!empty($OVERLAY->OverlayHTML)) {
        $USER->AddFunctionCall("lz_chat_add_html_element('" . base64_encode($OVERLAY->OverlayHTML) . "',true," . $OVERLAY->LastPostReceived . "," . $OVERLAY->LastMessageReceived . ",'" . base64_encode($OVERLAY->LastPoster) . "','" . base64_encode(Communication::ReadParameter("lp", "")) . "'," . $OVERLAY->OperatorPostCount . ");", false);
    }
    $USER->AddFunctionCall("lz_chat_set_connecting(" . To::BoolString(!$OVERLAY->Botmode && (!empty($USER->Browsers[0]->ChatId) && !$USER->Browsers[0]->InternalActivation && !$USER->Browsers[0]->Closed && !$USER->Browsers[0]->Declined)) . ",'" . $USER->Browsers[0]->SystemId . "'," . To::BoolString(!empty($USER->Browsers[0]->OperatorId) && Server::$Operators[$USER->Browsers[0]->OperatorId]->Status == USER_STATUS_AWAY) . "," . $OVERLAY->GetWaitingMessage() . "," . intval(Server::$Configuration->File["gl_wmes"]) . ");", false);
    if ($OVERLAY->RepollRequired) {
        $USER->AddFunctionCall("lz_tracking_poll_server(1211);", false);
    }
    if ($USER->Browsers[0]->TranslationSettings != null) {
        $USER->AddFunctionCall("lz_chat_set_translation(" . $USER->Browsers[0]->TranslationSettings[0] . ",'" . base64_encode($USER->Browsers[0]->TranslationSettings[1]) . "','" . base64_encode($USER->Browsers[0]->TranslationSettings[2]) . "');", false);
    } else {
        $USER->AddFunctionCall("lz_chat_set_translation(null,null,null);", false);
    }
    if ($OVERLAY->FullLoad) {
        $USER->AddFunctionCall("lz_chat_load_input_values();", false);
    }
    $USER->ReloadGroups(true, Visitor::$PollCount == 1);
    if (!empty($USER->Browsers[0]->DesiredChatGroup)) {
        $USER->AddFunctionCall("lz_chat_set_input_fields();", false);
    } else {
        $USER->AddFunctionCall(false, false, false, false);
    }
    $USER->AddFunctionCall("lz_chat_set_application(" . To::BoolString($OVERLAY->IsChatAvailable) . "," . To::BoolString($OVERLAY->Botmode) . "," . To::BoolString($OVERLAY->HumanGeneral) . ",'" . $OVERLAY->BotTitle . "'," . $OVERLAY->GetChatStatus() . "," . To::BoolString($USER->Browsers[0]->Declined) . ");", false);
    if (Visitor::$PollCount == 1) {
        $USER->AddFunctionCall("lz_chat_set_focus();", false);
    }
}
OverlayChat::$Response = $USER->Response;