static function ReplaceColors($_html, $_operator)
 {
     $primary = Communication::ReadParameter("ovlc", "#73be28");
     $secondary = Communication::ReadParameter("ovlct", "#ffffff");
     $textshadow = Communication::ReadParameter("ovlts", 1);
     //$textheader = Communication::ReadParameter("ovlch","#ffffff");
     $_html = str_replace("<!--bgc-->", $primary, $_html);
     $_html = str_replace("<!--bgcm-->", Colors::TransformHEX($primary, 30), $_html);
     $_html = str_replace("<!--bgcd-->", Colors::TransformHEX($primary, 50), $_html);
     $_html = str_replace("<!--tc-->", $secondary, $_html);
     $_html = str_replace("<!--tch-->", $secondary, $_html);
     $_html = str_replace("<!--ts-->", $textshadow == 1 ? "text-shadow:1px 1px 0 #6b6b6b;" : "", $_html);
     return str_replace("<!--color-->", $_operator ? Colors::TransformHEX($secondary, 20) : "#000000", $_html);
 }
예제 #2
0
    $html = str_replace("<!--function_knowledgebase-->", To::BoolString(empty($_GET["hfk"]) && !empty(Server::$Configuration->File["gl_knba"])), $html);
    $html = str_replace("<!--hide_group_select_chat-->", To::BoolString(Communication::GetParameter("hcgs", 0, $nu, FILTER_VALIDATE_INT) == "1" || !empty($_GET[GET_EXTERN_DYNAMIC_GROUP])), $html);
    $html = str_replace("<!--hide_group_select_ticket-->", To::BoolString(Communication::GetParameter("htgs", 0, $nu, FILTER_VALIDATE_INT) == "1"), $html);
    $html = str_replace("<!--require_group_selection-->", To::BoolString(Communication::GetParameter("rgs", 0, $nu, FILTER_VALIDATE_INT) == "1"), $html);
    $html = str_replace("<!--offline_message_pop-->", To::BoolString(!empty(Server::$Configuration->File["gl_om_pop_up"]) || empty(Server::$Configuration->File["gl_om_mode"])), $html);
    $html = str_replace("<!--dynamic_group-->", !empty(VisitorChat::$DynamicGroup) ? base64_encode(Server::$Groups[VisitorChat::$DynamicGroup]->Descriptions["EN"]) : "", $html);
} else {
    if ($_GET[GET_EXTERN_TEMPLATE] == "lz_chat_frame_lgin") {
        $html = IOStruct::GetFile(PATH_FRAMES . $_GET[GET_EXTERN_TEMPLATE] . ".tpl");
        $html = isset(Server::$Configuration->File["gl_site_name"]) ? str_replace("<!--config_name-->", Server::$Configuration->File["gl_site_name"], $html) : str_replace("<!--config_name-->", "LiveZilla", $html);
        $html = getChatLoginInputs($html, MAX_INPUT_LENGTH);
        $html = str_replace("<!--alert-->", getAlertTemplate(), $html);
        $html = str_replace("<!--com_chats-->", getChatVoucherTemplate(), $html);
        $html = str_replace("<!--ssl_secured-->", Communication::GetScheme() == SCHEME_HTTP_SECURE && !empty(Server::$Configuration->File["gl_sssl"]) ? "" : "display:none;", $html);
        $html = str_replace("<!--bgc-->", $color = Communication::ReadParameter("epc", "#73be28"), $html);
        $html = str_replace("<!--color-->", Colors::TransformHEX($color, 30), $html);
    } else {
        if ($_GET[GET_EXTERN_TEMPLATE] == "lz_chat_frame_chat") {
            $html = IOStruct::GetFile(PATH_FRAMES . $_GET[GET_EXTERN_TEMPLATE] . ".tpl");
            $html = str_replace("<!--alert-->", getAlertTemplate(), $html);
            $tlanguages = "";
            if (strlen(Server::$Configuration->File["gl_otrs"]) > 1) {
                $mylang = LocalizationManager::GetBrowserLocalization();
                $tlanguages = getLanguageSelects(LocalizationManager::GetBrowserLocalization());
            }
            $html = str_replace("<!--languages-->", $tlanguages, $html);
            Server::InitDataBlock(array("GROUPS"));
            $groupid = $_POST["intgroup"];
            if (!empty($groupid) && isset(Server::$Groups[$groupid])) {
                $html = str_replace("<!--SM_HIDDEN-->", empty(Server::$Groups[$groupid]->ChatFunctions[0]) ? "none" : "", $html);
                $html = str_replace("<!--SO_HIDDEN-->", empty(Server::$Groups[$groupid]->ChatFunctions[1]) ? "none" : "", $html);