Ejemplo n.º 1
0
 }
 if ($psound) {
     $USER->AddFunctionCall("lz_chat_play_sound();", false);
 }
 if (!empty($_GET["tid"])) {
     if ($ticket = $USER->SaveTicket($USER->Browsers[0]->DesiredChatGroup, base64UrlDecode($_GET["tin"]), base64UrlDecode($_GET["tie"]), "", $USER->GeoCountryISO2, "", false, base64UrlDecode($_GET["tim"]), true, getOParam(GET_TRACK_URL, "", $nu, FILTER_SANITIZE_URL, null, 512))) {
         $USER->Browsers[0]->SaveLoginData();
         Visitor::SendTicketAutoresponder($ticket, $USER->Language, false);
     }
 }
 $HTML = str_replace("<!--server-->", LIVEZILLA_URL, $HTML);
 if ($LANGUAGE) {
     $HTML = applyReplacements($HTML, $LANGUAGE, false);
 }
 if (!$chat_available && !$USER->Browsers[0]->Declined) {
     addHTML(statusHTML(@$LZLANG["client_chat_not_available"]), "sys", "OFM01");
 }
 if (!empty($HTML)) {
     $USER->AddFunctionCall("lz_chat_add_html_element('" . base64_encode($HTML) . "',true," . $lpr . "," . $LMR . ",'" . base64_encode($LASTPOSTER) . "','" . @$_GET["lp"] . "'," . $oppostcount . ");", false);
 }
 $USER->AddFunctionCall("lz_chat_set_connecting(" . parseBool(!$BOTMODE && (!empty($USER->Browsers[0]->ChatId) && !$USER->Browsers[0]->InternalActivation && !$USER->Browsers[0]->Closed && !$USER->Browsers[0]->Declined)) . ",'" . $USER->Browsers[0]->SystemId . "'," . parseBool(!empty($USER->Browsers[0]->InternalUser) && $USER->Browsers[0]->InternalUser->Status == USER_STATUS_AWAY) . ");", false);
 if ($REPOLL) {
     $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 ($FULL) {
     $USER->AddFunctionCall("lz_chat_change_fullname(lz_external.Username);", false);
Ejemplo n.º 2
0
function speakingToHTML($_opId)
{
    global $USER, $LZLANG, $INTERNAL;
    $html = "";
    if (!empty($USER->Browsers[0]->InternalUser)) {
        if (!empty($_opId) && $_opId != $USER->Browsers[0]->InternalUser->SystemId) {
            $_opId = "";
        }
        if ($USER->Browsers[0]->DesiredChatPartner != $USER->Browsers[0]->InternalUser->SystemId) {
            $USER->Browsers[0]->DesiredChatPartner = $USER->Browsers[0]->InternalUser->SystemId;
            $USER->Browsers[0]->Save();
        }
        if (!$USER->Browsers[0]->Closed && $USER->Browsers[0]->InternalActivation && empty($_opId)) {
            $text = $LZLANG["client_now_speaking_to"];
            if ($USER->Browsers[0]->InternalUser->IsBot) {
                return;
            }
            $html .= statusHTML(str_replace("<!--operator_name-->", $USER->Browsers[0]->InternalUser->Fullname, $text));
            if (!$USER->Browsers[0]->ExternalActivation) {
                $USER->Browsers[0]->ExternalActivate();
            }
            $USER->AddFunctionCall("lz_chat_set_host('" . $USER->Browsers[0]->InternalUser->SystemId . "','" . $USER->Browsers[0]->ChatId . "','" . $USER->Browsers[0]->DesiredChatGroup . "','" . $USER->Browsers[0]->InternalUser->UserId . "','" . strtoupper($INTERNAL[$USER->Browsers[0]->DesiredChatPartner]->Language) . "');", false);
        }
    }
    return $html;
}