コード例 #1
0
         }
     }
 }
 if (!$OVERLAY->Botmode && empty($_GET["tth"]) && ($USER->Browsers[0]->Status > CHAT_STATUS_OPEN || isset($_GET["mi0"]))) {
     $USER->AddFunctionCall("lz_chat_set_talk_to_human(true,true);", false);
 }
 $OVERLAY->BotTitle = $OVERLAY->Botmode && !empty(Server::$Operators[$USER->Browsers[0]->DesiredChatPartner]) && Server::$Operators[$USER->Browsers[0]->DesiredChatPartner]->IsBot ? base64_encode(str_replace(array("%name%", "%operator_name%"), Server::$Operators[$USER->Browsers[0]->DesiredChatPartner]->Fullname, LocalizationManager::$TranslationStrings["client_bot_overlay_title"])) : "";
 if ($OVERLAY->IsChatAvailable && !Visitor::$OpenChatExternal && !empty($USER->Browsers[1]->ChatRequest) && Server::$Operators[$USER->Browsers[1]->ChatRequest->SenderSystemId]->IsExternal(Server::$Groups, null, null)) {
     if (!$USER->Browsers[1]->ChatRequest->Closed && !$USER->Browsers[1]->ChatRequest->Accepted) {
         $sound = !empty(Server::$Configuration->File["gl_cips"]) && !$USER->Browsers[1]->ChatRequest->Displayed ? "lz_chat_play_sound(\\'wind\\');" : "";
         if ($OVERLAY->FullLoad) {
             $USER->Browsers[1]->ChatRequest->Displayed = false;
         }
         if (!$USER->Browsers[1]->ChatRequest->Displayed) {
             $USER->Browsers[1]->ChatRequest->Load();
             $OVERLAY->AddHTML($OVERLAY->GetInviteHTML($USER->Browsers[1]->ChatRequest->SenderSystemId, $USER->Browsers[1]->ChatRequest->Text, $USER->Browsers[1]->ChatRequest->Id), "sys", "");
             $USER->AddFunctionCall("lz_desired_operator='" . Server::$Operators[$USER->Browsers[1]->ChatRequest->SenderSystemId]->UserId . "';", false);
             $USER->AddFunctionCall("lz_chat_invite_timer=setTimeout('lz_chat_change_state(false,false);" . $sound . "',2500);", false);
             $USER->AddFunctionCall("lz_chat_set_group('" . base64_encode($USER->Browsers[1]->ChatRequest->SenderGroupId) . "');", false);
             $USER->AddFunctionCall("lz_chat_set_talk_to_human(true,false);", false);
             $USER->AddFunctionCall("lz_chat_prepare_data_form();", false);
             $USER->Browsers[1]->ChatRequest->SetStatus(true, false, false);
             $USER->Browsers[1]->ChatRequest->Displayed = true;
         }
         if (!empty($_GET["mi0"])) {
             $USER->Browsers[1]->ChatRequest->SetStatus(true, true, false, true);
             $USER->Browsers[1]->ForceUpdate();
         }
     }
 }
 $tymes = !empty($USER->Browsers[0]->OperatorId) && Server::$Operators[$USER->Browsers[0]->OperatorId]->Typing == $USER->Browsers[0]->SystemId ? "'" . base64_encode(str_replace("<!--operator_name-->", Server::$Operators[$USER->Browsers[0]->OperatorId]->Fullname, LocalizationManager::$TranslationStrings["client_representative_is_typing"])) . "'" : "null";