$BROWSER->Question = $INPUTS[114]->GetServerInput(); } else { if (isset($INPUTS[114]->Cookie) && $INPUTS[114]->Cookie) { $BROWSER->Question = getCookieValue("form_114"); } } if ($INPUTS[116]->IsServerInput()) { $BROWSER->Phone = $INPUTS[116]->GetServerInput(); } else { if (isset($INPUTS[116]->Cookie) && $INPUTS[116]->Cookie) { $BROWSER->Phone = getCookieValue("form_116"); } } if (JAVASCRIPT) { if (isset($_GET[GET_TRACK_RESOLUTION_WIDTH])) { if (!BaseURL::IsInputURL()) { abortTracking(3); } $currentURL = new HistoryURL(BaseURl::GetInputURL(), getOParam(GET_TRACK_SPECIAL_AREA_CODE, "", $nu, null, null, 255), getOParam(GET_EXTERN_DOCUMENT_TITLE, "", $nu, null, null, 255), getOParam(GET_TRACK_REFERRER, "", $nu, FILTER_SANITIZE_URL, null, 510), time()); if ($currentURL->Referrer->IsInternalDomain()) { $currentURL->Referrer = new BaseUrl(""); } if ($currentURL->Url->Excluded) { abortTracking(4); } if ($monitoringActive) { if (isset($_GET[GET_TRACK_TIMEZONE_OFFSET])) { $EXTERNALUSER->Save($CONFIG, array(getOParam(GET_TRACK_RESOLUTION_WIDTH, "", $nu, FILTER_SANITIZE_SPECIAL_CHARS, null, 32), getOParam(GET_TRACK_RESOLUTION_HEIGHT, "", $nu, FILTER_SANITIZE_SPECIAL_CHARS, null, 32)), getOParam(GET_TRACK_COLOR_DEPTH, "", $nu, FILTER_SANITIZE_SPECIAL_CHARS, null, 32), getOParam(GET_TRACK_TIMEZONE_OFFSET, "", $nu, FILTER_SANITIZE_SPECIAL_CHARS, null, 32), getOParam(GEO_LATITUDE, -522, $nu, FILTER_VALIDATE_FLOAT, array(), 0, true, false), getOParam(GEO_LONGITUDE, -522, $nu, FILTER_VALIDATE_FLOAT, array(), 0, true, false), getOParam(GEO_COUNTRY_ISO_2, "", $nu, null, null, 32, true, false), getOParam(GEO_CITY, "", $nu, null, null, 255, true, false), getOParam(GEO_REGION, "", $nu, null, null, 255, true, false), getOParam(GEO_TIMEZONE, "", $nu, null, null, 24, true, false), getOParam(GEO_ISP, "", $nu, null, null, 255, true, false), getOParam(GEO_SSPAN, 0, $nu, FILTER_VALIDATE_INT, array(), 0, false, false), getOParam(GEO_RESULT_ID, "", $nu, FILTER_VALIDATE_INT, array(), 32, false, false)); } } }
$oppostcount = -1; } if (!empty($spkthtml) && !$spkt) { addHTML($spkthtml, "sys", "SPKT" . $USER->Browsers[0]->InternalUser->SystemId); } if (!empty($posthtml)) { addHTML($posthtml, $lppflag); } if (!empty($LASTPOST)) { $USER->AddFunctionCall("lz_chat_set_last_post('" . base64_encode(trim(html_entity_decode($LASTPOST, ENT_COMPAT, "UTF-8"))) . "');", false); } if ($psound) { $USER->AddFunctionCall("lz_chat_play_sound('message');", false); } if (!empty($_GET["tid"])) { if ($ticket = $USER->SaveTicket(getOParam("eg", "", $c), $USER->GeoCountryISO2, false, true, BaseURL::GetInputURL())) { $USER->Browsers[0]->SaveLoginData(); Visitor::SendTicketAutoresponder($ticket, $USER->Language); } } $HTML = str_replace("<!--server-->", LIVEZILLA_URL, $HTML); if ($LANGUAGE) { $HTML = applyReplacements($HTML, $LANGUAGE, false); } 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); }
function LoadReferrerTable($_id, $_maxlength, $_table, $_fullUrl, $_total, $_group = "", $counter = 0) { if (!empty($_group)) { $amount = "SUM(`amount`)"; $groupBy = " GROUP BY " . $_group; } else { $amount = "`amount`"; $groupBy = ""; } $row = DBManager::FetchArray(queryDB(true, "SELECT SUM(`amount`) as `total` FROM `" . DB_PREFIX . $_table . "` INNER JOIN `" . DB_PREFIX . DATABASE_VISITOR_DATA_PAGES . "` ON `" . DB_PREFIX . $_table . "`.`referrer` = `" . DB_PREFIX . DATABASE_VISITOR_DATA_PAGES . "`.`id` INNER JOIN `" . DB_PREFIX . DATABASE_VISITOR_DATA_DOMAINS . "` ON `" . DB_PREFIX . DATABASE_VISITOR_DATA_PAGES . "`.`domain` = `" . DB_PREFIX . DATABASE_VISITOR_DATA_DOMAINS . "`.`id` INNER JOIN `" . DB_PREFIX . DATABASE_VISITOR_DATA_PATHS . "` ON `" . DB_PREFIX . DATABASE_VISITOR_DATA_PAGES . "`.`path` = `" . DB_PREFIX . DATABASE_VISITOR_DATA_PATHS . "`.`id` AND `" . DB_PREFIX . DATABASE_VISITOR_DATA_DOMAINS . "`.`domain` != '' WHERE" . $this->GetDateMatch() . " LIMIT " . DBManager::RealEscape(StatisticProvider::$DayItemAmount) . ";")); $_total = $row["total"]; $result = queryDB(true, "SELECT `" . DB_PREFIX . DATABASE_VISITOR_DATA_DOMAINS . "`.`domain`,`" . DB_PREFIX . DATABASE_VISITOR_DATA_PATHS . "`.`path`," . $amount . " AS `tam` FROM `" . DB_PREFIX . $_table . "` INNER JOIN `" . DB_PREFIX . DATABASE_VISITOR_DATA_PAGES . "` ON `" . DB_PREFIX . $_table . "`.`referrer` = `" . DB_PREFIX . DATABASE_VISITOR_DATA_PAGES . "`.`id` INNER JOIN `" . DB_PREFIX . DATABASE_VISITOR_DATA_DOMAINS . "` ON `" . DB_PREFIX . DATABASE_VISITOR_DATA_PAGES . "`.`domain` = `" . DB_PREFIX . DATABASE_VISITOR_DATA_DOMAINS . "`.`id` INNER JOIN `" . DB_PREFIX . DATABASE_VISITOR_DATA_PATHS . "` ON `" . DB_PREFIX . DATABASE_VISITOR_DATA_PAGES . "`.`path` = `" . DB_PREFIX . DATABASE_VISITOR_DATA_PATHS . "`.`id` WHERE" . $this->GetDateMatch() . "" . $groupBy . " ORDER BY `tam` DESC LIMIT " . DBManager::RealEscape(StatisticProvider::$DayItemAmount) . ";"); while ($row = DBManager::FetchArray($result)) { if (!empty($row["domain"])) { $url = new BaseURL($row["domain"], $_fullUrl ? $row["path"] : "", "", ""); $title = "<a href=\"" . @htmlentities(StatisticProvider::$Dereferrer . $url->GetAbsoluteUrl(), ENT_QUOTES, 'UTF-8') . "\" target=\"_blank\">" . @htmlentities(substr($url->GetAbsoluteUrl(), 0, $_maxlength), ENT_QUOTES, 'UTF-8') . "</a>"; $this->Tops[$_id][++$counter] = array($title, @round(100 * $row["tam"] / $_total, StatisticProvider::$RoundPrecision), 100 - floor(100 * $row["tam"] / $_total), $row["tam"]); } } if ($counter == 0) { $this->Tops[$_id][++$counter] = array("<!--lang_stats_none-->", 0, 100, 0); } }
$OVERLAY->OperatorPostCount = -1; } if (!empty($OVERLAY->SpeakingToHTML) && !$OVERLAY->SpeakingToAdded) { $OVERLAY->AddHTML($OVERLAY->SpeakingToHTML, "sys", "SPKT" . Server::$Operators[$USER->Browsers[0]->OperatorId]->SystemId); } if (!empty($OVERLAY->PostHTML)) { $OVERLAY->AddHTML($OVERLAY->PostHTML, $OVERLAY->Flags["LPP"]); } if (!empty($OVERLAY->LastPost)) { $USER->AddFunctionCall("lz_chat_set_last_post('" . base64_encode(trim(html_entity_decode($OVERLAY->LastPost, ENT_COMPAT, "UTF-8"))) . "');", false); } if ($OVERLAY->PlaySound) { $USER->AddFunctionCall("lz_chat_play_sound('message');", false); } if (!empty($_GET["tid"])) { if ($ticket = $USER->SaveTicket(Communication::GetParameter("eg", "", $c), $USER->GeoCountryISO2, false, true, BaseURL::GetInputURL())) { $USER->Browsers[1]->ForceUpdate(); $ticket->SendAutoresponder($USER, $USER->Browsers[0]); } } $OVERLAY->OverlayHTML = str_replace("<!--server-->", LIVEZILLA_URL, $OVERLAY->OverlayHTML); 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); }