Пример #1
0
             $USER->AddFunctionCall("lz_chat_invite_timer=setTimeout('lz_chat_change_state(false,false);',5000);", false);
             $USER->AddFunctionCall("lz_chat_set_talk_to_human(true,false);", false);
             $USER->AddFunctionCall("lz_chat_set_chat_request('" . $USER->Browsers[1]->ChatRequest->Id . "');", 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]->InternalUser) && $USER->Browsers[0]->InternalUser->Typing == $USER->Browsers[0]->SystemId ? "'" . base64_encode(str_replace("<!--operator_name-->", $USER->Browsers[0]->InternalUser->Fullname, $LZLANG["client_representative_is_typing"])) . "'" : "null";
 $USER->AddFunctionCall("lz_chat_set_typing(" . $tymes . ",false);", false);
 $maxposts = 30;
 $spkthtml = speakingToHTML();
 $posthtml = "";
 $pstrchngreq = $psound = $spkt = false;
 $oppostcount = 0;
 $LASTPOST = "";
 $lppflag = $LASTPOSTER;
 $rand = rand();
 if (!$USER->Browsers[0]->Declined && ($result = queryDB(true, "SELECT * FROM `" . DB_PREFIX . DATABASE_POSTS . "` WHERE `chat_id`='" . DBManager::RealEscape($USER->Browsers[0]->ChatId) . "' AND `chat_id`!='' AND `chat_id`!='0' AND (`receiver`='" . DBManager::RealEscape($USER->Browsers[0]->SystemId) . "' OR (`sender`='" . DBManager::RealEscape($USER->Browsers[0]->SystemId) . "' AND `repost`=0)) GROUP BY `id` ORDER BY `time` ASC, `micro` ASC;"))) {
     $all = DBManager::GetRowCount($result);
     $toshow = min($maxposts, $all);
     if ($all > 0) {
         $count = $maxposts - $all;
         while ($row = DBManager::FetchArray($result)) {
             if ($count++ >= 0) {
                 $postobj = new Post($row);
                 if (empty($INTERNAL[$postobj->Sender])) {
Пример #2
0
             $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]->InternalUser) && $USER->Browsers[0]->InternalUser->Typing == $USER->Browsers[0]->SystemId ? "'" . base64_encode(str_replace("<!--operator_name-->", $USER->Browsers[0]->InternalUser->Fullname, $LZLANG["client_representative_is_typing"])) . "'" : "null";
 $USER->AddFunctionCall("lz_chat_set_typing(" . $tymes . ",false);", false);
 $maxposts = 50;
 $spkthtml = speakingToHTML($opId);
 $posthtml = "";
 $pstrchngreq = $psound = $spkt = false;
 $oppostcount = 0;
 $LASTPOST = "";
 $lppflag = $LASTPOSTER;
 $rand = rand();
 if (!$USER->Browsers[0]->Declined && ($result = queryDB(true, "SELECT * FROM `" . DB_PREFIX . DATABASE_POSTS . "` WHERE `chat_id`='" . DBManager::RealEscape($USER->Browsers[0]->ChatId) . "' AND `chat_id`!='' AND `chat_id`!='0' AND (`receiver`='" . DBManager::RealEscape($USER->Browsers[0]->SystemId) . "' OR (`sender`='" . DBManager::RealEscape($USER->Browsers[0]->SystemId) . "' AND `repost`=0)) GROUP BY `id` ORDER BY `time` ASC, `micro` ASC;"))) {
     $all = DBManager::GetRowCount($result);
     $toshow = min($maxposts, $all);
     if ($all > 0) {
         $count = $maxposts - $all;
         while ($row = DBManager::FetchArray($result)) {
             if ($count++ >= 0) {
                 $postobj = new Post($row);
                 if (empty($INTERNAL[$postobj->Sender])) {