コード例 #1
0
 $html = str_replace("<!--switch_to_kb-->", To::BoolString(Communication::ReadParameter("t", "") == "kb" && empty($_GET["hfk"])), $html);
 $html = str_replace("<!--kb_only-->", To::BoolString(!empty($_REQUEST["kbo"])), $html);
 $html = str_replace("<!--is_small-->", To::BoolString(!empty($_GET["s"])), $html);
 $html = str_replace("<!--is_logo-->", To::BoolString(!empty(Server::$Configuration->File["gl_cali"]) || !empty(Server::$Configuration->File["gl_cahi"])), $html);
 $html = str_replace("<!--is_mobile-->", To::BoolString($MobileDetect->isMobile() && !$MobileDetect->isTablet()), $html);
 $html = str_replace("<!--ticket_file_uploads-->", To::BoolString(true), $html);
 $html = str_replace("<!--kb_suggest-->", To::BoolString(Server::$Configuration->File["gl_knbs"]), $html);
 $html = str_replace("<!--kb_query_min_length-->", intval(Server::$Configuration->File["gl_kbml"]), $html);
 $html = str_replace("<!--show_waiting_message-->", To::BoolString(strlen(Server::$Configuration->File["gl_wmes"]) > 0), $html);
 $html = str_replace("<!--waiting_message_time-->", Server::$Configuration->File["gl_wmes"], $html);
 $html = str_replace("<!--extern_frequency-->", Server::$Configuration->File["poll_frequency_clients"], $html);
 $html = str_replace("<!--cbcd-->", To::BoolString(Server::$Configuration->File["gl_cbcd"]), $html);
 $html = str_replace("<!--bookmark_name-->", base64_encode(Server::$Configuration->File["gl_site_name"]), $html);
 $html = str_replace("<!--user_id-->", SESSION, $html);
 $html = str_replace("<!--connection_error_span-->", CONNECTION_ERROR_SPAN, $html);
 $html = GeoTracking::Replace($html);
 $html = str_replace("<!--requested_intern_userid-->", base64_encode(!empty($_GET[GET_EXTERN_INTERN_USER_ID]) && isset(Server::$Operators[Operator::GetSystemId(Encoding::Base64UrlDecode($_GET[GET_EXTERN_INTERN_USER_ID]))]) ? Encoding::Base64UrlDecode($_GET[GET_EXTERN_INTERN_USER_ID]) : ""), $html);
 $html = str_replace("<!--requested_intern_fullname-->", base64_encode(!empty($_GET[GET_EXTERN_INTERN_USER_ID]) && isset(Server::$Operators[Operator::GetSystemId(Encoding::Base64UrlDecode($_GET[GET_EXTERN_INTERN_USER_ID]))]) ? Server::$Operators[Operator::GetSystemId(Encoding::Base64UrlDecode($_GET[GET_EXTERN_INTERN_USER_ID]))]->Fullname : ""), $html);
 $html = str_replace("<!--debug-->", To::BoolString(!empty($_GET["debug"])), $html);
 $html = str_replace("<!--geo_resolute-->", To::BoolString(!empty(Server::$Configuration->File["gl_use_ngl"]) && !(Cookie::Get("geo_data") != null && Cookie::Get("geo_data") > time() - 2592000) && !GeoTracking::SpanExists()), $html);
 $html = str_replace("<!--chat_id-->", !empty($_GET["cid"]) ? getParam("cid") : "", $html);
 $html = str_replace("<!--gtv2_api_key-->", strlen(Server::$Configuration->File["gl_otrs"]) > 1 ? Server::$Configuration->File["gl_otrs"] : "", $html);
 $html = str_replace("<!--template_message_intern-->", base64_encode(str_replace("<!--color-->", ExternalChat::ReadBackgroundColor(), str_replace("<!--dir-->", LocalizationManager::$Direction, IOStruct::GetFile(TEMPLATE_HTML_MESSAGE_INTERN)))), $html);
 $html = str_replace("<!--template_message_extern-->", base64_encode(str_replace("<!--dir-->", LocalizationManager::$Direction, IOStruct::GetFile(TEMPLATE_HTML_MESSAGE_EXTERN))), $html);
 $html = str_replace("<!--template_message_add-->", base64_encode(str_replace("<!--dir-->", LocalizationManager::$Direction, IOStruct::GetFile(TEMPLATE_HTML_MESSAGE_ADD))), $html);
 $html = str_replace("<!--template_message_add_alt-->", base64_encode(str_replace("<!--dir-->", LocalizationManager::$Direction, IOStruct::GetFile(TEMPLATE_HTML_MESSAGE_ADD_ALTERNATE))), $html);
 $html = str_replace("<!--primary_color-->", ExternalChat::ReadBackgroundColor(), $html);
 $html = str_replace("<!--secondary_color-->", ExternalChat::ReadTextColor(), $html);
 $html = str_replace("<!--direct_login-->", To::BoolString(isset($_GET[GET_EXTERN_USER_NAME]) && !isset($_GET[GET_EXTERN_RESET]) || isset($_GET["dl"])), $html);
 $html = str_replace("<!--preselect_ticket-->", To::BoolString(isset($_GET["pt"])), $html);
 $html = str_replace("<!--is_ie-->", To::BoolString(!empty($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false), $html);
コード例 #2
0
 VisitorMonitoring::$Browser->UserData->LoadFromCookie();
 if (empty($_GET[GET_TRACK_NO_SEARCH_ENGINE])) {
     exit(IOStruct::GetFile(TEMPLATE_HTML_SUPPORT));
 }
 VisitorMonitoring::$Visitor->CreateSignature();
 VisitorMonitoring::$Response = IOStruct::GetFile(TEMPLATE_SCRIPT_TRACK);
 VisitorMonitoring::$Response = str_replace("<!--file_chat-->", FILE_CHAT, VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--server_id-->", substr(md5(Server::$Configuration->File["gl_lzid"]), 5, 5), VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--server-->", LIVEZILLA_URL, VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--website-->", Encoding::Base64UrlEncode(Communication::GetParameter("ws", "", $nu, null, null, 255)), VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--area_code-->", Communication::GetParameter(GET_TRACK_SPECIAL_AREA_CODE, "", $nu, null, null, 255, false, false), VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--browser_id-->", htmlentities(CALLER_BROWSER_ID, ENT_QUOTES, "UTF-8"), VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--user_id-->", htmlentities(VisitorMonitoring::$Visitor->UserId, ENT_QUOTES, "UTF-8"), VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--connection_error_span-->", CONNECTION_ERROR_SPAN, VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--poll_frequency-->", VisitorMonitoring::GetPollFrequency(false, false), VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = GeoTracking::Replace(VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--geo_resolute-->", To::BoolString(VisitorMonitoring::$Visitor->UserId == CALLER_USER_ID && !empty(Server::$Configuration->File["gl_use_ngl"]) && VisitorMonitoring::$Visitor->FirstCall && !(!Is::Null(Cookie::Get("geo_data")) && Cookie::Get("geo_data") > time() - 2592000) && !GeoTracking::SpanExists()), VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--alert_html-->", base64_encode(getAlertTemplate()), VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--user_company-->", Encoding::Base64UrlEncode(VisitorMonitoring::$Browser->UserData->Company), VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--user_question-->", Encoding::Base64UrlEncode(VisitorMonitoring::$Browser->UserData->Text), VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--user_phone-->", Encoding::Base64UrlEncode(VisitorMonitoring::$Browser->UserData->Phone), VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--user_language-->", Communication::GetParameter(GET_EXTERN_USER_LANGUAGE, "", $nu, null, null, 5, true, true, true, true), VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--user_header-->", Communication::GetParameter(GET_EXTERN_USER_HEADER, "", $nu, FILTER_SANITIZE_URL, null, 0, true, true, true, true), VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--user_customs-->", getJSCustomArray(VisitorMonitoring::$Browser->UserData->Customs), VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--is_mobile-->", To::BoolString(VisitorMonitoring::$IsMobile), VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--is_ie-->", To::BoolString($detector->BrowserName == "Internet Explorer"), VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--direct_login-->", To::BoolString(Communication::ReadParameter("dl")), VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--is_ovlpos-->", To::BoolString($detector->BrowserName != "Internet Explorer" || $detector->BrowserVersion > 6), VisitorMonitoring::$Response);
 VisitorMonitoring::$Response = str_replace("<!--is_ovlc-->", To::BoolString(!empty($_GET["ovlc"])), VisitorMonitoring::$Response);
 if (!empty($_GET["ovlc"]) && !VisitorMonitoring::$HideOverlayOnMobile) {
     require LIVEZILLA_PATH . "_lib/functions.external.inc.php";