CVE-2022-0935 (published 2022-04-07T19:15Z)

Host Header injection in password Reset in GitHub repository livehelperchat/livehelperchat prior to 3.97.

Severity: MEDIUM
CVSS v2 base score: 6.8 (AV:N/AC:M/Au:N/C:P/I:P/A:P)
CVSS v3 base score: 8.8, HIGH (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H)

Weakness information:
cwe_id: CWE-116
cwe_name: Improper Encoding or Escaping of Output
description: The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.
extended_description: 
            Improper encoding or escaping can allow attackers to change the commands that are sent to another component, inserting malicious commands instead.
            Most products follow a certain protocol that uses structured messages for communication between components, such as queries or commands. These structured messages can contain raw data interspersed with metadata or control information. For example, "GET /index.html HTTP/1.1" is a structured message containing a command ("GET") with a single argument ("/index.html") and metadata about which protocol version is being used ("HTTP/1.1").
            If an application uses attacker-supplied inputs to construct a structured message without properly encoding or escaping, then the attacker could insert special characters that will cause the data to be interpreted as control information or metadata. Consequently, the component that receives the output will perform the wrong operations, or otherwise interpret the data incorrectly.
         
         

Fix information:
repo_url: https://github.com/livehelperchat/livehelperchat
commit_details: repo_url: https://github.com/livehelperchat/livehelperchat
author: Remigijus Kiminas
author_date: 2022-04-06 13:07:00+03:00
msg: Migrate to static HTTP_HOST (#1754)

Static HTTP_HOST option and security section in update page.
repository: repo_url: https://github.com/livehelperchat/livehelperchat
repo_name: LiveHelperChat/livehelperchat
description: Live Helper Chat - live support for your website. Featuring web and mobile apps, Voice & Video & ScreenShare. Supports Telegram, Twilio (whatsapp), Facebook messenger including building a bot.
repo_language: PHP
owner: livehelperchat
file_changes: filename: install.php
change_type: ModificationType.MODIFY
diff: @@ -1267,9 +1267,9 @@ class Install
                   PRIMARY KEY (`identifier`)
                 ) ENGINE=InnoDB CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;");
 
-            $randomHash = erLhcoreClassModelForgotPassword::randomPassword(9);
+            $randomHash = erLhcoreClassModelForgotPassword::randomPassword(80);
             $randomHashLength = strlen($randomHash);
-            $exportHash = erLhcoreClassModelForgotPassword::randomPassword(9);
+            $exportHash = erLhcoreClassModelForgotPassword::randomPassword(80);
 
             if (extension_loaded('bcmath')){
                 $geoRow = "('geo_data','a:5:{i:0;b:0;s:21:\"geo_detection_enabled\";i:1;s:22:\"geo_service_identifier\";s:8:\"max_mind\";s:23:\"max_mind_detection_type\";s:7:\"country\";s:22:\"max_mind_city_location\";s:37:\"var/external/geoip/GeoLite2-City.mmdb\";}',0,'',1)";

programming_language: PHP
filename: getstatus.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -54,7 +54,7 @@ var lhc_BrowseOffer = {
         var th = document.getElementsByTagName('head')[0];
         var s = document.createElement('script');
         s.setAttribute('type','text/javascript');
-        s.setAttribute('src','<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('browseoffer/widgetclosed')?>/<?php echo $invite->hash?>');
+        s.setAttribute('src','<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('browseoffer/widgetclosed')?>/<?php echo $invite->hash?>');
         th.appendChild(s);
         this.removeById('lhc_container_browseoffer');
         this.removeById('lhc_browseoffer-bg');
@@ -73,7 +73,7 @@ var lhc_BrowseOffer = {
 		
    		  <?php if ($invite->custom_iframe_url != '' || $invite->lhc_iframe_content == 1) : ?>
    		  this.iframe_html = '<iframe id="lhcbrowseoffer_iframe" allowTransparency="true" scrolling="no" frameborder="0" ' +
-                       ' src="<?php if ($invite->custom_iframe_url != '') : ?><?php echo $invite->custom_iframe_url ?><?php else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('browseoffer/widget')?>/<?php echo $invite->hash?><?php endif;?>"' +                    
+                       ' src="<?php if ($invite->custom_iframe_url != '') : ?><?php echo $invite->custom_iframe_url ?><?php else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('browseoffer/widget')?>/<?php echo $invite->hash?><?php endif;?>"' +
                        ' style="width: 100%; height: <?php echo $size_height?>px;"></iframe>';
          <?php else : ?>
          this.iframe_html = "<div id=\"lhcbrowseoffer_content\">"+<?php echo json_encode($invite->content)?>+"</div>";
@@ -102,7 +102,7 @@ var lhc_BrowseOffer = {
          var th = document.getElementsByTagName('head')[0];
          var s = document.createElement('script');
          s.setAttribute('type','text/javascript');
-         s.setAttribute('src','<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('browseoffer/addhit')?>/<?php echo $invite->hash?>');
+         s.setAttribute('src','<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('browseoffer/addhit')?>/<?php echo $invite->hash?>');
          th.appendChild(s);
          
          if (<?php echo $browseofferOptionsVariable;?>.openCallback) {

programming_language: PHP
filename: htmlcode.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -96,7 +96,7 @@ function generateEmbedCode(){
         'var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;'+"\n"+
         'var referrer = (document.referrer) ? encodeURIComponent(document.referrer.substr(document.referrer.indexOf(\'://\')+1)) : \'\';'+"\n"+
         'var location  = (document.location) ? encodeURIComponent(window.location.href.substring(window.location.protocol.length)) : \'\';'+"\n"+
-        'po.src = \''+$('#HttpMode').val()+'//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect()?>'+siteAccess+'browseoffer/getstatus'+size+id_size_height+topposition+id_timeout+id_show_overlay+id_identifier+id_canreopen+'?r=\'+referrer+\'&l=\'+location;'+"\n"+
+        'po.src = \''+$('#HttpMode').val()+'//<?php echo str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost())?><?php echo erLhcoreClassDesign::baseurldirect()?>'+siteAccess+'browseoffer/getstatus'+size+id_size_height+topposition+id_timeout+id_show_overlay+id_identifier+id_canreopen+'?r=\'+referrer+\'&l=\'+location;'+"\n"+
         'var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);'+"\n"+
       '})();'+"\n"+
     '</scr'+'ipt>';

programming_language: PHP
filename: id.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -1,5 +1,5 @@
 <?php if (isset($orderInformation['id']['enabled']) && $orderInformation['id']['enabled'] == true) : ?>
 <div class="col-6 pb-1">
-    <span class="material-icons user-select-none">vpn_key</span><span><?php echo $chat->id;?></span><button data-success="Copied" class="ml-1 btn btn-xs btn-link text-muted py-1" data-copy="<?php echo (erLhcoreClassSystem::$httpsMode == true ? 'https:' : 'http:') . '//' . $_SERVER['HTTP_HOST'] ?><?php echo erLhcoreClassDesign::baseurl('front/default')?>/(cid)/<?php echo $chat->id?>/#!#chat-id-<?php echo $chat->id?>" onclick="lhinst.copyContent($(this))" type="button"><i class="material-icons">link</i>Copy link</button>
+    <span class="material-icons user-select-none">vpn_key</span><span><?php echo $chat->id;?></span><button data-success="Copied" class="ml-1 btn btn-xs btn-link text-muted py-1" data-copy="<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('front/default')?>/(cid)/<?php echo $chat->id?>/#!#chat-id-<?php echo $chat->id?>" onclick="lhinst.copyContent($(this))" type="button"><i class="material-icons">link</i>Copy link</button>
 </div>
 <?php endif; ?>
\ No newline at end of file

programming_language: PHP
filename: chatcheckoperatormessage.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -11,7 +11,7 @@ lh_inst.stopCheckNewMessage();
     setTimeout(function() {
     <?php endif; ?>
 
-        var invitationURL =  '<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('chat/readoperatormessage')?><?php $department !== false ? print '/(department)/'.$department : '' ?><?php $theme !== false ? print '/(theme)/'.$theme : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : ''?><?php $tag !== false ? print '/(tag)/' . $tag : ''?><?php $survey !== false ? print '/(survey)/'.$survey : ''?>/(vid)/<?php echo $vid;?><?php $visitor->invitation_assigned == true ? print '/(playsound)/true' : ''?>/(fullheight)/<?= $fullheight ? 'true' : 'false' ?>';
+        var invitationURL =  '<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('chat/readoperatormessage')?><?php $department !== false ? print '/(department)/'.$department : '' ?><?php $theme !== false ? print '/(theme)/'.$theme : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : ''?><?php $tag !== false ? print '/(tag)/' . $tag : ''?><?php $survey !== false ? print '/(survey)/'.$survey : ''?>/(vid)/<?php echo $vid;?><?php $visitor->invitation_assigned == true ? print '/(playsound)/true' : ''?>/(fullheight)/<?= $fullheight ? 'true' : 'false' ?>';
 
         <?php if (isset($visitor->invitation->design_data_array['mobile_html']) && $visitor->invitation->design_data_array['mobile_html'] != '') : ?>
 
@@ -19,7 +19,7 @@ lh_inst.stopCheckNewMessage();
                 <?php
                     $replaceStyleArray = array();
                     for ($i = 1; $i < 5; $i++) {
-                        $replaceStyleArray['{proactive_img_' . $i . '}'] =  erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value . '//' . $_SERVER['HTTP_HOST'] . $visitor->invitation->{'design_data_img_' . $i . '_url'};
+                        $replaceStyleArray['{proactive_img_' . $i . '}'] = erLhcoreClassSystem::getHost() . $visitor->invitation->{'design_data_img_' . $i . '_url'};
                     }
                 ?>
                 <?php
@@ -55,7 +55,7 @@ lh_inst.stopCheckNewMessage();
             <?php if ($visitor->invitation instanceof erLhAbstractModelProactiveChatInvitation && (($visitor->invitation_assigned == false && $visitor->invitation->delay > 0) || $visitor->invitation->delay_init > 0)) : ?>
                 setTimeout(function() {
             <?php endif; ?>
-            var urlInvitation = '<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('chat/readoperatormessage')?><?php $department !== false ? print '/(department)/'.$department : '' ?><?php $theme !== false ? print '/(theme)/'.$theme : ''?><?php $tag !== false ? print '/(tag)/' . $tag : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : ''?><?php $survey !== false ? print '/(survey)/'.$survey : ''?>/(vid)/<?php echo $vid;?><?php $visitor->invitation_assigned == true ? print '/(playsound)/true' : ''?>/(fullheight)/<?= $fullheight ? 'true' : 'false' ?>';
+            var urlInvitation = '<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('chat/readoperatormessage')?><?php $department !== false ? print '/(department)/'.$department : '' ?><?php $theme !== false ? print '/(theme)/'.$theme : ''?><?php $tag !== false ? print '/(tag)/' . $tag : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : ''?><?php $survey !== false ? print '/(survey)/'.$survey : ''?>/(vid)/<?php echo $vid;?><?php $visitor->invitation_assigned == true ? print '/(playsound)/true' : ''?>/(fullheight)/<?= $fullheight ? 'true' : 'false' ?>';
             <?php if ($visitor->invitation instanceof erLhAbstractModelProactiveChatInvitation && isset($visitor->invitation->design_data_array['api_do_not_show']) && $visitor->invitation->design_data_array['api_do_not_show'] == 1) : ?>
                 lh_inst.showBasicInvitation(urlInvitation);
             <?php else : ?>

programming_language: PHP
filename: operator_profile.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -3,7 +3,7 @@
         <?php if ($user->has_photo) : ?>
             <img width="20" height="20" src="<?php echo $user->photo_path?>" alt="<?php echo htmlspecialchars($user->name_support)?>" />
         <?php else : ?>
-            <img width="20" height="20" src="<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect('widgetrestapi/avatar')?>/<?php echo htmlspecialchars($user->avatar)?>" alt="<?php echo htmlspecialchars($user->name_support)?>" />
+            <img width="20" height="20" src="<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurldirect('widgetrestapi/avatar')?>/<?php echo htmlspecialchars($user->avatar)?>" alt="<?php echo htmlspecialchars($user->name_support)?>" />
         <?php endif; ?>
     <?php else : ?>
         <i class="icon-assistant material-icons mr-0"><?php if (isset($react) && $react === true) : ?>&#xf10d;<?php else : ?>account_box<?php endif; ?></i>

programming_language: PHP
filename: getstatus.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -51,7 +51,7 @@ var lh_inst  = {
 	is_full_height : <?= isset($currentPosition['full_height']) && $currentPosition['full_height'] ? 'true' : 'false' ?>,
 	online_tracked : false,
     urlopen : function(){
-    	return "<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>"+this.lang+"/chat/startchat<?php $leaveamessage == true ? print '/(leaveamessage)/true' : ''?><?php is_object($theme) ? print '/(theme)/'.$theme->id : ''?><?php $department !== false ? print '/(department)/'.$department : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : ''?>"+this.survey_id;
+    	return "<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>"+this.lang+"/chat/startchat<?php $leaveamessage == true ? print '/(leaveamessage)/true' : ''?><?php is_object($theme) ? print '/(theme)/'.$theme->id : ''?><?php $department !== false ? print '/(department)/'.$department : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : ''?>"+this.survey_id;
     },
 	<?php include(erLhcoreClassDesign::designtpl('lhchat/getstatus/custom_get_status_lh_inst_js.tpl.php')); ?>
     hasSurvey : <?php echo $survey !== false ? 'true ': 'false'?>,
@@ -266,7 +266,7 @@ var lh_inst  = {
             var th = document.getElementsByTagName('head')[0];
             var s = document.createElement('script');
             s.setAttribute('type','text/javascript');
-            s.setAttribute('src','<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>'+this.lang+'/chat/chatwidgetclosed'+this.getAppendCookieArguments()+'?ts='+Date.now());
+            s.setAttribute('src','<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>'+this.lang+'/chat/chatwidgetclosed'+this.getAppendCookieArguments()+'?ts='+Date.now());
             th.appendChild(s);
             this.toggleStatusWidget(false);
 
@@ -593,7 +593,7 @@ var lh_inst  = {
 
     updateAttribute : function(attributes) {
         var xhr = new XMLHttpRequest();
-        xhr.open( "POST", '<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>'+this.lang+'/chat/updateattribute'+this.getAppendCookieArguments(), true);
+        xhr.open( "POST", '<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>'+this.lang+'/chat/updateattribute'+this.getAppendCookieArguments(), true);
      	xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      	xhr.send( "data=" + encodeURIComponent( this.JSON.stringify(attributes) ) );
     },
@@ -610,7 +610,7 @@ var lh_inst  = {
             var s = document.createElement('script');
             s.setAttribute('id','lhc_operator_message');
             s.setAttribute('type','text/javascript');
-            s.setAttribute('src','<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>'+lh_inst.lang+'/chat/chatcheckoperatormessage<?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $theme !== false ? print '/(theme)/'.$theme->id : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $department !== false ? print '/(department)/'.$department : ''?><?php $identifier !== false ? print '/(identifier)/'.htmlspecialchars($identifier) : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : '' ?><?= isset($currentPosition['full_height']) && $currentPosition['full_height'] ?  '/(fullheight)/true' : '/(fullheight)/false' ?>/(vid)/'+vid + lh_inst.survey_id + '/(uactiv)/'+lh_inst.userActive+'/(wopen)/'+lh_inst.timeoutStatusWidgetOpen+dynamic+'?l='+locationCurrent+inst.tag+'&dt='+encodeURIComponent(document.title)+'&ts='+Date.now());
+            s.setAttribute('src','<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>'+lh_inst.lang+'/chat/chatcheckoperatormessage<?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $theme !== false ? print '/(theme)/'.$theme->id : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $department !== false ? print '/(department)/'.$department : ''?><?php $identifier !== false ? print '/(identifier)/'.htmlspecialchars($identifier) : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : '' ?><?= isset($currentPosition['full_height']) && $currentPosition['full_height'] ?  '/(fullheight)/true' : '/(fullheight)/false' ?>/(vid)/'+vid + lh_inst.survey_id + '/(uactiv)/'+lh_inst.userActive+'/(wopen)/'+lh_inst.timeoutStatusWidgetOpen+dynamic+'?l='+locationCurrent+inst.tag+'&dt='+encodeURIComponent(document.title)+'&ts='+Date.now());
             th.appendChild(s);
             lh_inst.startNewMessageCheck();
         }, <?php echo (int)(erLhcoreClassModelChatConfig::fetch('sync_sound_settings')->data['check_for_operator_msg']*1000); ?> );*/ ?>
@@ -652,7 +652,7 @@ var lh_inst  = {
 
             s.setAttribute('id','lhc_operator_message');
             s.setAttribute('type','text/javascript');
-            s.setAttribute('src','<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>'+this.lang+'/chat/chatcheckoperatormessage<?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php is_object($theme) ? print '/(theme)/'.$theme->id : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $department !== false ? print '/(department)/'.$department : ''?><?php $identifier !== false ? print '/(identifier)/'.htmlspecialchars($identifier) : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : '' ?><?= isset($currentPosition['full_height']) && $currentPosition['full_height'] ?  '/(fullheight)/true' : '/(fullheight)/false' ?>/(tz)/' + tzOffset + this.survey_id + '/(count_page)/1/(vid)/'+vid+'/(uactiv)/'+lh_inst.userActive+'/(wopen)/'+lh_inst.timeoutStatusWidgetOpen+dynamic+'?l='+locationCurrent+this.tag+this.parseStorageArguments()+this.parseOptionsOnline()+this.parseOptions()+'&dt='+encodeURIComponent(document.title)+'&ts='+Date.now());
+            s.setAttribute('src','<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>'+this.lang+'/chat/chatcheckoperatormessage<?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php is_object($theme) ? print '/(theme)/'.$theme->id : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $department !== false ? print '/(department)/'.$department : ''?><?php $identifier !== false ? print '/(identifier)/'.htmlspecialchars($identifier) : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : '' ?><?= isset($currentPosition['full_height']) && $currentPosition['full_height'] ?  '/(fullheight)/true' : '/(fullheight)/false' ?>/(tz)/' + tzOffset + this.survey_id + '/(count_page)/1/(vid)/'+vid+'/(uactiv)/'+lh_inst.userActive+'/(wopen)/'+lh_inst.timeoutStatusWidgetOpen+dynamic+'?l='+locationCurrent+this.tag+this.parseStorageArguments()+this.parseOptionsOnline()+this.parseOptions()+'&dt='+encodeURIComponent(document.title)+'&ts='+Date.now());
             th.appendChild(s);
         }
     },
@@ -665,13 +665,13 @@ var lh_inst  = {
         var tzOffset = this.getTzOffset();
         s.setAttribute('id','lhc_log_pageview');
         s.setAttribute('type','text/javascript');
-        s.setAttribute('src','<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>'+this.lang+'/chat/logpageview<?php $department !== false ? print '/(department)/'.$department : ''?><?php $identifier !== false ? print '/(identifier)/'.htmlspecialchars($identifier) : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : '' ?>/(tz)/'+tzOffset+'/(vid)/' + vid + this.survey_id + '/(uactiv)/'+lh_inst.userActive+'/(wopen)/'+lh_inst.timeoutStatusWidgetOpen+'?l='+locationCurrent+this.parseStorageArguments()+this.parseOptionsOnline()+'&dt='+encodeURIComponent(document.title)+'&ts='+Date.now());
+        s.setAttribute('src','<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>'+this.lang+'/chat/logpageview<?php $department !== false ? print '/(department)/'.$department : ''?><?php $identifier !== false ? print '/(identifier)/'.htmlspecialchars($identifier) : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : '' ?>/(tz)/'+tzOffset+'/(vid)/' + vid + this.survey_id + '/(uactiv)/'+lh_inst.userActive+'/(wopen)/'+lh_inst.timeoutStatusWidgetOpen+'?l='+locationCurrent+this.parseStorageArguments()+this.parseOptionsOnline()+'&dt='+encodeURIComponent(document.title)+'&ts='+Date.now());
         th.appendChild(s);
     },
 
     updateJSVars : function(vars){
         var xhr = new XMLHttpRequest();
-        xhr.open( "POST", '<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>'+this.lang+'/chat/updatejsvars'+this.getAppendCookieArguments(), true);
+        xhr.open( "POST", '<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>'+this.lang+'/chat/updatejsvars'+this.getAppendCookieArguments(), true);
         xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
         xhr.send( "data=" + encodeURIComponent( this.JSON.stringify(vars) ) );
     },
@@ -680,7 +680,7 @@ var lh_inst  = {
         if (typeof <?php echo $chatOptionsVariable?>.events != 'undefined') {
             if (<?php echo $chatOptionsVariable?>.events.length > 0) {
                  var xhr = new XMLHttpRequest();
-                 xhr.open( "POST", '<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>'+this.lang+'/chat/logevent'+this.getAppendCookieArguments(), true);
+                 xhr.open( "POST", '<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>'+this.lang+'/chat/logevent'+this.getAppendCookieArguments(), true);
              	 xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
              	 xhr.send( "data=" + encodeURIComponent( this.JSON.stringify(<?php echo $chatOptionsVariable?>.events) ) );
              	 <?php echo $chatOptionsVariable?>.events = new Array();
@@ -724,7 +724,7 @@ var lh_inst  = {
             this.cookieDataPers['ex'] = Math.round(Date.now()/100000000)+10;
             this.storePersistenCookie();
             var xhr = new XMLHttpRequest();
-            xhr.open( "GET", '<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>'+this.lang+'/chat/extendcookie/'+this.cookieDataPers.vid, true);
+            xhr.open( "GET", '<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>'+this.lang+'/chat/extendcookie/'+this.cookieDataPers.vid, true);
             xhr.send();
         }
     },
@@ -746,7 +746,7 @@ var lh_inst  = {
 				var inst = this;
 				setTimeout(function(){
 					var xhr = new XMLHttpRequest();
-			        xhr.open( "POST", '<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>'+inst.lang+'/chat/setnewvid', true);
+			        xhr.open( "POST", '<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>'+inst.lang+'/chat/setnewvid', true);
 			     	xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
 			     	xhr.send( "data=" + encodeURIComponent( inst.JSON.stringify({'vid':old,'new':vid}) ) );
 				},1000);
@@ -809,7 +809,7 @@ var lh_inst  = {
 		   		var th = document.getElementsByTagName('head')[0];
 		        var s = document.createElement('script');
 		        s.setAttribute('type','text/javascript');
-		        s.setAttribute('src','<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('js/html2canvas.min.js');?>');
+		        s.setAttribute('src','<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('js/html2canvas.min.js');?>');
 		        th.appendChild(s);
 		        s.onreadystatechange = s.onload = function(){
 		        	inst.makeScreenshot();
@@ -819,7 +819,7 @@ var lh_inst  = {
 				  	html2canvas(document.body, {
 						  onrendered: function(canvas) {
 						         var xhr = new XMLHttpRequest();
-						         xhr.open( "POST", '<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>'+lh_inst.lang+'/file/storescreenshot'+inst.getAppendCookieArguments(), true);
+						         xhr.open( "POST", '<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>'+lh_inst.lang+'/file/storescreenshot'+inst.getAppendCookieArguments(), true);
 							     xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
 							     xhr.send( "data=" + encodeURIComponent( canvas.toDataURL() ) );
 						  }
@@ -843,7 +843,7 @@ var lh_inst  = {
         var tzOffset = this.getTzOffset();
         s.setAttribute('id','lhc_finish_shr');
         s.setAttribute('type','text/javascript');
-        s.setAttribute('src','<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>'+lh_inst.lang+'/cobrowse/finishsession/(sharemode)/'+lh_inst.sharemode+lh_inst.getAppendCookieArguments());
+        s.setAttribute('src','<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>'+lh_inst.lang+'/cobrowse/finishsession/(sharemode)/'+lh_inst.sharemode+lh_inst.getAppendCookieArguments());
         th.appendChild(s);
         this.cobrowser = null;
     },
@@ -863,7 +863,7 @@ var lh_inst  = {
 			   		var th = document.getElementsByTagName('head')[0];
 			        var s = document.createElement('script');
 			        s.setAttribute('type','text/javascript');
-			        s.setAttribute('src','<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::designJS('js/cobrowse/compiled/cobrowse.visitor.min.js');?>');
+			        s.setAttribute('src','<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::designJS('js/cobrowse/compiled/cobrowse.visitor.min.js');?>');
 			        th.appendChild(s);
 			        s.onreadystatechange = s.onload = function(){
 			        	inst.startCoBrowse(inst.sharehash,this.sharemode);
@@ -969,7 +969,7 @@ var lh_inst  = {
         var s = document.createElement('script');
         s.setAttribute('id','lhc_check_status');
         s.setAttribute('type','text/javascript');
-        s.setAttribute('src','<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>'+this.lang+'/chat/chatcheckstatus<?php $department !== false ? print '/(department)/'.$department : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : '' ?><?php $disable_online_tracking === true ? print '/(dot)/true' : ''?><?php $hide_offline == 'true' ? print '/(hide_offline)/true' : ''?>/(status)/' + this.isOnline + this.survey_id + (this.cookieDataPers.vid ? '/(vid)/'+this.cookieDataPers.vid : '')+ hashAppend + hashResume + '/(uactiv)/'+this.userActive+'/(wopen)/'+this.timeoutStatusWidgetOpen + '/(uaction)/'+sender+'/(isproactive)/'+this.isProactivePending+'/?ts='+Date.now());
+        s.setAttribute('src','<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>'+this.lang+'/chat/chatcheckstatus<?php $department !== false ? print '/(department)/'.$department : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : '' ?><?php $disable_online_tracking === true ? print '/(dot)/true' : ''?><?php $hide_offline == 'true' ? print '/(hide_offline)/true' : ''?>/(status)/' + this.isOnline + this.survey_id + (this.cookieDataPers.vid ? '/(vid)/'+this.cookieDataPers.vid : '')+ hashAppend + hashResume + '/(uactiv)/'+this.userActive+'/(wopen)/'+this.timeoutStatusWidgetOpen + '/(uaction)/'+sender+'/(isproactive)/'+this.isProactivePending+'/?ts='+Date.now());
         th.appendChild(s);
     },
 
@@ -986,7 +986,7 @@ var lh_inst  = {
 
     refreshCustomFields : function() {
         var xhr = new XMLHttpRequest();
-        xhr.open( "POST", '<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>'+lh_inst.lang+'/chat/refreshcustomfields'+this.getAppendCookieArguments() , true);
+        xhr.open( "POST", '<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>'+lh_inst.lang+'/chat/refreshcustomfields'+this.getAppendCookieArguments() , true);
 	    xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
 	    xhr.send(this.parseOptions());
     },
@@ -1032,7 +1032,7 @@ var lh_inst  = {
         var s = document.createElement('script');
         s.setAttribute('type','text/javascript');
         var optionsParts = options.split('_');
-        s.setAttribute('src','<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>'+this.lang+'/chat/htmlsnippet/'+messageId+'/'+optionsParts[0]+"/"+optionsParts[1]+'<?php $department !== false ? print '/(department)/'.$department : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : '' ?><?php $disable_online_tracking === true ? print '/(dot)/true' : ''?><?php $hide_offline == 'true' ? print '/(hide_offline)/true' : ''?>/(status)/' + this.isOnline + this.survey_id + (this.cookieDataPers.vid ? '/(vid)/'+this.cookieDataPers.vid : '')+ hashAppend + hashResume + '/(uactiv)/'+this.userActive+'/(wopen)/'+this.timeoutStatusWidgetOpen + '/(isproactive)/'+this.isProactivePending+'/?ts='+Date.now());
+        s.setAttribute('src','<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>'+this.lang+'/chat/htmlsnippet/'+messageId+'/'+optionsParts[0]+"/"+optionsParts[1]+'<?php $department !== false ? print '/(department)/'.$department : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : '' ?><?php $disable_online_tracking === true ? print '/(dot)/true' : ''?><?php $hide_offline == 'true' ? print '/(hide_offline)/true' : ''?>/(status)/' + this.isOnline + this.survey_id + (this.cookieDataPers.vid ? '/(vid)/'+this.cookieDataPers.vid : '')+ hashAppend + hashResume + '/(uactiv)/'+this.userActive+'/(wopen)/'+this.timeoutStatusWidgetOpen + '/(isproactive)/'+this.isProactivePending+'/?ts='+Date.now());
         th.appendChild(s);
     },
 
@@ -1045,7 +1045,7 @@ var lh_inst  = {
 
         // We allow to send events only from chat installation or page where script is embeded.
         if (
-            originDomain !== '<?php echo $_SERVER['HTTP_HOST']?>' &&
+            originDomain !== '<?php echo str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost())?>' &&
             originDomain !== document.domain &&
             action != 'lhc_sizing_chat_survey' &&
             action != 'lh_survey_runed' &&

programming_language: PHP
filename: container.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -8,15 +8,15 @@ $iconsStatuses['offline_image_url'] = ($theme !== false && $theme->offline_image
 ?>
 <?php if ($theme !== false && $theme->modern_look == 0) : ?>
 this.iframe_html = '<div id="<?php echo $chatCSSLayoutOptions['container_id']?>" <?= isset($currentPosition['full_height']) && $currentPosition['full_height'] ? 'style="height:100%"' : '' ?>>' +
-    '<?php if ($theme !== false && isset($theme->bot_configuration_array['custom_html_header'])) : ?><?php echo str_replace(array("\n","\r"), '',$theme->bot_configuration_array['custom_html_header'])?><?php endif?><div id="<?php echo $chatCSSPrefix?>_header"><?php if ($theme !== false && isset($theme->bot_configuration_array['custom_html_header_body'])) : ?><?php echo str_replace(array("\n","\r"), '',$theme->bot_configuration_array['custom_html_header_body'])?><?php endif?><?php if ($theme === false || $theme->hide_close == 0) : ?><a href="#" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" id="<?php echo $chatCSSPrefix?>_close"><img src="<?php if ($theme !== false && $theme->close_image_url != '') : ?><?php echo $theme->close_image_url;?><?php else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/icons/cancel.png');?><?php endif;?>" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" alt="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" /></a><?php endif;?><?php if (erLhcoreClassModelChatConfig::fetch('disable_popup_restore')->current_value == 0 && ($theme === false || $theme->hide_popup == 0)) : ?><a href="#" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Open in a new window')?>" id="<?php echo $chatCSSPrefix?>_remote_window"><img src="<?php if ($theme !== false && $theme->popup_image_url != '') : ?><?php echo $theme->popup_image_url;?><?php else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/icons/application_double.png');?><?php endif;?>" alt="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Open in a new window')?>" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Open in a new window')?>" /></a><?php endif; ?><a href="#" id="<?php echo $chatCSSPrefix?>_min" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Minimize/Restore')?>"></a><i title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','New messages')?>" id="<?php echo $chatCSSPrefix?>-msg-number"></i></div>' +
+    '<?php if ($theme !== false && isset($theme->bot_configuration_array['custom_html_header'])) : ?><?php echo str_replace(array("\n","\r"), '',$theme->bot_configuration_array['custom_html_header'])?><?php endif?><div id="<?php echo $chatCSSPrefix?>_header"><?php if ($theme !== false && isset($theme->bot_configuration_array['custom_html_header_body'])) : ?><?php echo str_replace(array("\n","\r"), '',$theme->bot_configuration_array['custom_html_header_body'])?><?php endif?><?php if ($theme === false || $theme->hide_close == 0) : ?><a href="#" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" id="<?php echo $chatCSSPrefix?>_close"><img src="<?php if ($theme !== false && $theme->close_image_url != '') : ?><?php echo $theme->close_image_url;?><?php else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/icons/cancel.png');?><?php endif;?>" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" alt="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" /></a><?php endif;?><?php if (erLhcoreClassModelChatConfig::fetch('disable_popup_restore')->current_value == 0 && ($theme === false || $theme->hide_popup == 0)) : ?><a href="#" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Open in a new window')?>" id="<?php echo $chatCSSPrefix?>_remote_window"><img src="<?php if ($theme !== false && $theme->popup_image_url != '') : ?><?php echo $theme->popup_image_url;?><?php else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/icons/application_double.png');?><?php endif;?>" alt="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Open in a new window')?>" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Open in a new window')?>" /></a><?php endif; ?><a href="#" id="<?php echo $chatCSSPrefix?>_min" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Minimize/Restore')?>"></a><i title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','New messages')?>" id="<?php echo $chatCSSPrefix?>-msg-number"></i></div>' +
     this.iframe_html + '</div>';
-raw_css = "#<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-min {overflow:hidden}#<?php echo $chatCSSPrefix?>_remote_window{padding-left:5px;}.<?php echo $chatCSSPrefix?>-min #<?php echo $chatCSSPrefix?>_header{min-width:107px} .<?php echo $chatCSSPrefix?>-min #<?php echo $chatCSSPrefix?>_iframe_container{display:none} .<?php echo $chatCSSPrefix?>-no-transition{ -webkit-transition: none !important; -moz-transition: none !important;-o-transition: none !important;-ms-transition: none !important;transition: none !important;}\n#<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-delayed{visibility:hidden;position: fixed;left: -90000px!important;right: auto!important;}#<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-delayed .<?php echo $chatCSSPrefix?>-cf{display:none}\n#<?php echo $chatCSSLayoutOptions['container_id']?> * {line-height:100%;direction:<?php (erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == 'ltr' || erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == '') ? print 'ltr;text-align:left;' : print 'rtl;text-align:right;'; ?>;font-family:arial;font-size:12px;line-height:100%;box-sizing: content-box;-moz-box-sizing:content-box;padding:0;margin:0;}\n#<?php echo $chatCSSLayoutOptions['container_id']?> img {border:0;}\n#<?php echo $chatCSSPrefix?>_header{position:relative;z-index:2147483640;height:<?php ($theme !== false && $theme->header_height > 0) ? print $theme->header_height : print '17' ?>px;overflow:hidden;text-align:right;clear:both;background-color:#<?php $theme !== false ? print $theme->header_background : print '525252' ?>;padding:<?php ($theme !== false && $theme->header_padding > 0) ? print $theme->header_padding : print '5' ?>px;}#<?php echo $chatCSSPrefix?>-msg-number{float: left;color: #FFF;font-size: 12px;font-weight: bold;padding-left: 5px;line-height: 20px;} \n#<?php echo $chatCSSPrefix?>_min{float:left;padding:2px;}#<?php echo $chatCSSPrefix?>_remote_window,#<?php echo $chatCSSPrefix?>_close{padding:2px;float:right;}.<?php echo $chatCSSPrefix?>-min #<?php echo $chatCSSPrefix?>_min:before{content:url(<?php if ($theme !== false && $theme->restore_image_url != '') : ?><?php echo $theme->restore_image_url;?><?php else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/icons/restore.png');?><?php endif;?>)}#<?php echo $chatCSSPrefix?>_min:before{content: url('<?php if ($theme !== false && $theme->minimize_image_url != '') : ?><?php echo $theme->minimize_image_url;?><?php else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/icons/min.png');?><?php endif;?>'); position: relative;left:0;top;0} #<?php echo $chatCSSPrefix?>_min{width:14px;height:14px;}\n#<?php echo $chatCSSPrefix?>_close:hover,#<?php echo $chatCSSPrefix?>_min:hover,#<?php echo $chatCSSPrefix?>_remote_window:hover{opacity:0.4;}\n#<?php echo $chatCSSLayoutOptions['container_id']?> {background-color:#FFF;-moz-user-select:none; -khtml-user-drag:element;cursor: move;cursor: -moz-grab;cursor: -webkit-grab;max-height: 100%;overflow: auto;\nz-index:2147483640;\n position: fixed;<?php echo $currentPosition['position_body']?>;-webkit-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-moz-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px; }\n#<?php echo $chatCSSLayoutOptions['container_id']?> iframe{position:relative;display:block;}\n#<?php echo $chatCSSLayoutOptions['container_id']?> #<?php echo $chatCSSPrefix?>_iframe_container{border:<?php ($theme !== false && $theme->widget_border_width > 0) ? print $theme->widget_border_width : print '1' ?>px solid #<?php $theme !== false ? print $theme->widget_border_color : print 'cccccc' ?>;border-top: 0;border-bottom-left-radius: 5px;border-bottom-right-radius: 5px;overflow: hidden;}\n#<?php echo $chatCSSLayoutOptions['container_id']?> iframe.<?php echo $chatCSSPrefix?>-loading{\nbackground: #FFF url(<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/general/loading.gif');?>) no-repeat center center; }\n@media only screen and (max-device-width : <?php ($theme !== false && $theme->widget_response_width > 0) ? print $theme->widget_response_width : print 992?>px) { .<?php echo $chatCSSPrefix?>-opened{position: fixed; overflow: hidden; right: 0px; left: 0px; top: 0px; bottom: 0px;} #<?php echo $chatCSSPrefix?>_header{height:30px;} #<?php echo $chatCSSPrefix?>_header a{padding:7px;}#<?php echo $chatCSSLayoutOptions['container_id']?>{position:fixed;left:0!important;right:0!important;bottom:0!important;top:0!important;border:0;border-radius:0}#<?php echo $chatCSSLayoutOptions['container_id']?> #<?php echo $chatCSSPrefix?>_iframe_container{border:0;height: calc(100% - 40px)}#<?php echo $chatCSSLayoutOptions['container_id']?> iframe{width:100% !important;height: 100%!important} .<?php echo $chatCSSPrefix?>-min #<?php echo $chatCSSPrefix?>_header a{padding:2px;} #<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-min{<?php echo $currentPosition['mobile_position']?>}}";
+raw_css = "#<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-min {overflow:hidden}#<?php echo $chatCSSPrefix?>_remote_window{padding-left:5px;}.<?php echo $chatCSSPrefix?>-min #<?php echo $chatCSSPrefix?>_header{min-width:107px} .<?php echo $chatCSSPrefix?>-min #<?php echo $chatCSSPrefix?>_iframe_container{display:none} .<?php echo $chatCSSPrefix?>-no-transition{ -webkit-transition: none !important; -moz-transition: none !important;-o-transition: none !important;-ms-transition: none !important;transition: none !important;}\n#<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-delayed{visibility:hidden;position: fixed;left: -90000px!important;right: auto!important;}#<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-delayed .<?php echo $chatCSSPrefix?>-cf{display:none}\n#<?php echo $chatCSSLayoutOptions['container_id']?> * {line-height:100%;direction:<?php (erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == 'ltr' || erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == '') ? print 'ltr;text-align:left;' : print 'rtl;text-align:right;'; ?>;font-family:arial;font-size:12px;line-height:100%;box-sizing: content-box;-moz-box-sizing:content-box;padding:0;margin:0;}\n#<?php echo $chatCSSLayoutOptions['container_id']?> img {border:0;}\n#<?php echo $chatCSSPrefix?>_header{position:relative;z-index:2147483640;height:<?php ($theme !== false && $theme->header_height > 0) ? print $theme->header_height : print '17' ?>px;overflow:hidden;text-align:right;clear:both;background-color:#<?php $theme !== false ? print $theme->header_background : print '525252' ?>;padding:<?php ($theme !== false && $theme->header_padding > 0) ? print $theme->header_padding : print '5' ?>px;}#<?php echo $chatCSSPrefix?>-msg-number{float: left;color: #FFF;font-size: 12px;font-weight: bold;padding-left: 5px;line-height: 20px;} \n#<?php echo $chatCSSPrefix?>_min{float:left;padding:2px;}#<?php echo $chatCSSPrefix?>_remote_window,#<?php echo $chatCSSPrefix?>_close{padding:2px;float:right;}.<?php echo $chatCSSPrefix?>-min #<?php echo $chatCSSPrefix?>_min:before{content:url(<?php if ($theme !== false && $theme->restore_image_url != '') : ?><?php echo $theme->restore_image_url;?><?php else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/icons/restore.png');?><?php endif;?>)}#<?php echo $chatCSSPrefix?>_min:before{content: url('<?php if ($theme !== false && $theme->minimize_image_url != '') : ?><?php echo $theme->minimize_image_url;?><?php else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/icons/min.png');?><?php endif;?>'); position: relative;left:0;top;0} #<?php echo $chatCSSPrefix?>_min{width:14px;height:14px;}\n#<?php echo $chatCSSPrefix?>_close:hover,#<?php echo $chatCSSPrefix?>_min:hover,#<?php echo $chatCSSPrefix?>_remote_window:hover{opacity:0.4;}\n#<?php echo $chatCSSLayoutOptions['container_id']?> {background-color:#FFF;-moz-user-select:none; -khtml-user-drag:element;cursor: move;cursor: -moz-grab;cursor: -webkit-grab;max-height: 100%;overflow: auto;\nz-index:2147483640;\n position: fixed;<?php echo $currentPosition['position_body']?>;-webkit-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-moz-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px; }\n#<?php echo $chatCSSLayoutOptions['container_id']?> iframe{position:relative;display:block;}\n#<?php echo $chatCSSLayoutOptions['container_id']?> #<?php echo $chatCSSPrefix?>_iframe_container{border:<?php ($theme !== false && $theme->widget_border_width > 0) ? print $theme->widget_border_width : print '1' ?>px solid #<?php $theme !== false ? print $theme->widget_border_color : print 'cccccc' ?>;border-top: 0;border-bottom-left-radius: 5px;border-bottom-right-radius: 5px;overflow: hidden;}\n#<?php echo $chatCSSLayoutOptions['container_id']?> iframe.<?php echo $chatCSSPrefix?>-loading{\nbackground: #FFF url(<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/general/loading.gif');?>) no-repeat center center; }\n@media only screen and (max-device-width : <?php ($theme !== false && $theme->widget_response_width > 0) ? print $theme->widget_response_width : print 992?>px) { .<?php echo $chatCSSPrefix?>-opened{position: fixed; overflow: hidden; right: 0px; left: 0px; top: 0px; bottom: 0px;} #<?php echo $chatCSSPrefix?>_header{height:30px;} #<?php echo $chatCSSPrefix?>_header a{padding:7px;}#<?php echo $chatCSSLayoutOptions['container_id']?>{position:fixed;left:0!important;right:0!important;bottom:0!important;top:0!important;border:0;border-radius:0}#<?php echo $chatCSSLayoutOptions['container_id']?> #<?php echo $chatCSSPrefix?>_iframe_container{border:0;height: calc(100% - 40px)}#<?php echo $chatCSSLayoutOptions['container_id']?> iframe{width:100% !important;height: 100%!important} .<?php echo $chatCSSPrefix?>-min #<?php echo $chatCSSPrefix?>_header a{padding:2px;} #<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-min{<?php echo $currentPosition['mobile_position']?>}}";
 <?php else : ?>
 this.iframe_html = '<div id="<?php echo $chatCSSLayoutOptions['container_id']?>" <?= isset($currentPosition['full_height']) && $currentPosition['full_height'] ? 'style="height:100%"' : '' ?>>' +
                               '<a class="status-icon ' +
                               (this.isOnline == true ? 'online-status-icon' : 'offline-status-icon') +
-                              '" id="<?php echo $chatCSSPrefix?>_status-icon-restore" href="#" ><i title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','New messages')?>" id="<?php echo $chatCSSPrefix?>-msg-number"></i></a><div id="<?php echo $chatCSSPrefix?>_header"><ul class="<?php echo $chatCSSPrefix?>-cf"><li><a href="#">&#9776;</a><ul class="<?php echo $chatCSSPrefix?>-cf"><?php if ($theme === false || $theme->hide_close == 0) : ?><li><a href="#" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" id="<?php echo $chatCSSPrefix?>_close"><img src="<?php if ($theme !== false && $theme->close_image_url != '') : ?><?php echo $theme->close_image_url;?><?php else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/icons/cancel.png');?><?php endif;?>" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" alt="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" /></a></li><?php endif;?><?php if (erLhcoreClassModelChatConfig::fetch('disable_popup_restore')->current_value == 0 && ($theme === false || $theme->hide_popup == 0)) : ?><li><a href="#" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Open in a new window')?>" id="<?php echo $chatCSSPrefix?>_remote_window"><img src="<?php if ($theme !== false && $theme->popup_image_url != '') : ?><?php echo $theme->popup_image_url;?><?php else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/icons/application_double.png');?><?php endif;?>" alt="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Open in a new window')?>" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Open in a new window')?>" /></a></li><?php endif; ?></ul></li></ul><a href="#" id="<?php echo $chatCSSPrefix?>_min" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Minimize/Restore')?>"></a></div>' +
+                              '" id="<?php echo $chatCSSPrefix?>_status-icon-restore" href="#" ><i title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','New messages')?>" id="<?php echo $chatCSSPrefix?>-msg-number"></i></a><div id="<?php echo $chatCSSPrefix?>_header"><ul class="<?php echo $chatCSSPrefix?>-cf"><li><a href="#">&#9776;</a><ul class="<?php echo $chatCSSPrefix?>-cf"><?php if ($theme === false || $theme->hide_close == 0) : ?><li><a href="#" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" id="<?php echo $chatCSSPrefix?>_close"><img src="<?php if ($theme !== false && $theme->close_image_url != '') : ?><?php echo $theme->close_image_url;?><?php else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/icons/cancel.png');?><?php endif;?>" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" alt="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" /></a></li><?php endif;?><?php if (erLhcoreClassModelChatConfig::fetch('disable_popup_restore')->current_value == 0 && ($theme === false || $theme->hide_popup == 0)) : ?><li><a href="#" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Open in a new window')?>" id="<?php echo $chatCSSPrefix?>_remote_window"><img src="<?php if ($theme !== false && $theme->popup_image_url != '') : ?><?php echo $theme->popup_image_url;?><?php else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/icons/application_double.png');?><?php endif;?>" alt="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Open in a new window')?>" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Open in a new window')?>" /></a></li><?php endif; ?></ul></li></ul><a href="#" id="<?php echo $chatCSSPrefix?>_min" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Minimize/Restore')?>"></a></div>' +
                               this.iframe_html + '</div>';
 
-raw_css = "#<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-min {overflow:hidden}#<?php echo $chatCSSLayoutOptions['container_id']?> .status-icon{display:none;}#<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-min .status-icon{display:inline-block;<?php echo $currentPosition['border_status_modern']?>;<?php echo $currentPosition['widget_radius_modern']?>;-webkit-box-shadow: <?php echo $currentPosition['shadow_modern']?> rgba(50, 50, 50, 0.5);-moz-box-shadow:<?php echo $currentPosition['shadow_modern']?> rgba(50, 50, 50, 0.5);box-shadow: <?php echo $currentPosition['shadow_modern']?> rgba(50, 50, 50, 0.5);text-decoration:none;height:41px;width:41px;font-weight:bold;color:<?php $theme !== false ? print '#'.$theme->text_color : print '#000' ?>;display:block;padding:10px;background:#<?php $theme !== false ? print $theme->onl_bcolor : print '0c8fc4' ?> url('<?php if ($theme !== false && $theme->online_image_url !== false) : print $theme->online_image_url; else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/getstatus/online.svg');?><?php endif;?>') no-repeat center center}#<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-min .status-icon.offline-status-icon{background:#888888 url('<?php if ($theme !== false && $theme->offline_image_url !== false) : print $theme->offline_image_url; else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/getstatus/offline.svg');?><?php endif;?>') no-repeat center center}<?php include(erLhcoreClassDesign::designtpl('lhchat/getstatus/burger_menu_css.tpl.php')); ?> #<?php echo $chatCSSPrefix?>_remote_window{padding-left:5px;}.<?php echo $chatCSSPrefix?>-min #<?php echo $chatCSSPrefix?>_header{min-width:107px} .<?php echo $chatCSSPrefix?>-min #<?php echo $chatCSSPrefix?>_iframe_container{display:none} .<?php echo $chatCSSPrefix?>-no-transition{ -webkit-transition: none !important; -moz-transition: none !important;-o-transition: none !important;-ms-transition: none !important;transition: none !important;}\n#<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-delayed{visibility:hidden;position: fixed;left: -90000px!important;right: auto!important;}#<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-delayed .<?php echo $chatCSSPrefix?>-cf{display:none}\n#<?php echo $chatCSSLayoutOptions['container_id']?> * {line-height:100%;direction:<?php (erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == 'ltr' || erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == '') ? print 'ltr;text-align:left;' : print 'rtl;text-align:right;'; ?>;font-family:arial;font-size:12px;line-height:100%;box-sizing: content-box;-moz-box-sizing:content-box;padding:0;margin:0;}\n#<?php echo $chatCSSLayoutOptions['container_id']?> img {border:0;max-width: none}\n#<?php echo $chatCSSPrefix?>_header{position:relative;z-index:2147483640;height:<?php ($theme !== false && $theme->header_height > 0) ? print $theme->header_height : print '17' ?>px;text-align:right;clear:both;background-color:#<?php $theme !== false ? print $theme->header_background : print '525252' ?>;padding:<?php ($theme !== false && $theme->header_padding > 0) ? print $theme->header_padding : print '5' ?>px;}#<?php echo $chatCSSPrefix?>-msg-number{float: left;color: #ffffff;font-size: 12px;font-weight: normal;line-height: 23px;position: absolute;background-color: red;border-radius: 37px;display: inline-block;padding-left: 8px;padding-right: 8px;margin-top: -5px;margin-left: -4px;} \n#<?php echo $chatCSSPrefix?>_min{float:right;padding:2px;}.<?php echo $chatCSSPrefix?>-min #<?php echo $chatCSSPrefix?>_min:before{content:url(<?php if ($iconsStatuses['restore_image_url'] == false) : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php endif; if ($theme !== false && $theme->restore_image_url != '') : ?><?php echo $theme->restore_image_url;?><?php else : ?><?php echo erLhcoreClassDesign::design('images/icons/restore.png');?><?php endif;?>)}#<?php echo $chatCSSPrefix?>_min:before{content: url('<?php if ($theme !== false && $theme->minimize_image_url != '') : ?><?php echo $theme->minimize_image_url;?><?php else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/icons/min.png');?><?php endif;?>'); position: relative;left:0;top;0} #<?php echo $chatCSSPrefix?>_min{width:14px;height:14px;}\n#<?php echo $chatCSSPrefix?>_min:hover{opacity:0.4;}\n#<?php echo $chatCSSLayoutOptions['container_id']?> {background-color:#FFF;-moz-user-select:none; -khtml-user-drag:element;cursor: move;cursor: -moz-grab;cursor: -webkit-grab;max-height: 100%;	overflow: auto;\nz-index:2147483640;\n position: fixed;<?php echo $currentPosition['position_body']?>;-webkit-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-moz-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px; }\n#<?php echo $chatCSSLayoutOptions['container_id']?> iframe{position:relative;display:block;}\n#<?php echo $chatCSSLayoutOptions['container_id']?> #<?php echo $chatCSSPrefix?>_iframe_container{border:<?php ($theme !== false && $theme->widget_border_width > 0) ? print $theme->widget_border_width : print '1' ?>px solid #<?php $theme !== false ? print $theme->widget_border_color : print 'cccccc' ?>;border-top: 0;border-bottom-left-radius: 5px;border-bottom-right-radius: 5px;overflow: hidden;}\n#<?php echo $chatCSSLayoutOptions['container_id']?> iframe.<?php echo $chatCSSPrefix?>-loading{\nbackground: #FFF url(<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/general/loading.gif');?>) no-repeat center center; }\n@media only screen and (max-device-width : <?php ($theme !== false && $theme->widget_response_width > 0) ? print $theme->widget_response_width : print 992?>px) {ul.<?php echo $chatCSSPrefix?>-cf li ul a{padding:8px 14px!important} ul.<?php echo $chatCSSPrefix?>-cf li:hover ul, ul.<?php echo $chatCSSPrefix?>-cf li ul {top: 30px;} .<?php echo $chatCSSPrefix?>-opened{position: fixed; overflow: hidden; right: 0px; left: 0px; top: 0px; bottom: 0px;} #<?php echo $chatCSSPrefix?>_header{height:30px;} #<?php echo $chatCSSPrefix?>_header a{padding:7px;}#<?php echo $chatCSSLayoutOptions['container_id']?>{position:fixed;left:0!important;right:0!important;bottom:0!important;top:0!important;border:0;border-radius:0}#<?php echo $chatCSSLayoutOptions['container_id']?> #<?php echo $chatCSSPrefix?>_iframe_container{border:0;height: calc(100% - 40px)}#<?php echo $chatCSSLayoutOptions['container_id']?> iframe{width:100% !important;height: 100%!important}} .<?php echo $chatCSSPrefix?>-min #<?php echo $chatCSSPrefix?>_header{display:none;}.<?php echo $chatCSSPrefix?>-min #<?php echo $chatCSSPrefix?>_header a{padding:2px;} #<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-min .status-icon{<?php echo $currentPosition['border_status_modern']?>;<?php echo $currentPosition['widget_radius_modern']?>;-webkit-box-shadow: <?php echo $currentPosition['shadow_modern']?> rgba(50, 50, 50, 0.5);-moz-box-shadow:<?php echo $currentPosition['shadow_modern']?> rgba(50, 50, 50, 0.5);box-shadow: <?php echo $currentPosition['shadow_modern']?> rgba(50, 50, 50, 0.5);text-decoration:none;height:41px;width:41px;}#<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-min{<?php echo $currentPosition['mobile_position_modern']?>}";
+raw_css = "#<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-min {overflow:hidden}#<?php echo $chatCSSLayoutOptions['container_id']?> .status-icon{display:none;}#<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-min .status-icon{display:inline-block;<?php echo $currentPosition['border_status_modern']?>;<?php echo $currentPosition['widget_radius_modern']?>;-webkit-box-shadow: <?php echo $currentPosition['shadow_modern']?> rgba(50, 50, 50, 0.5);-moz-box-shadow:<?php echo $currentPosition['shadow_modern']?> rgba(50, 50, 50, 0.5);box-shadow: <?php echo $currentPosition['shadow_modern']?> rgba(50, 50, 50, 0.5);text-decoration:none;height:41px;width:41px;font-weight:bold;color:<?php $theme !== false ? print '#'.$theme->text_color : print '#000' ?>;display:block;padding:10px;background:#<?php $theme !== false ? print $theme->onl_bcolor : print '0c8fc4' ?> url('<?php if ($theme !== false && $theme->online_image_url !== false) : print $theme->online_image_url; else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/getstatus/online.svg');?><?php endif;?>') no-repeat center center}#<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-min .status-icon.offline-status-icon{background:#888888 url('<?php if ($theme !== false && $theme->offline_image_url !== false) : print $theme->offline_image_url; else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/getstatus/offline.svg');?><?php endif;?>') no-repeat center center}<?php include(erLhcoreClassDesign::designtpl('lhchat/getstatus/burger_menu_css.tpl.php')); ?> #<?php echo $chatCSSPrefix?>_remote_window{padding-left:5px;}.<?php echo $chatCSSPrefix?>-min #<?php echo $chatCSSPrefix?>_header{min-width:107px} .<?php echo $chatCSSPrefix?>-min #<?php echo $chatCSSPrefix?>_iframe_container{display:none} .<?php echo $chatCSSPrefix?>-no-transition{ -webkit-transition: none !important; -moz-transition: none !important;-o-transition: none !important;-ms-transition: none !important;transition: none !important;}\n#<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-delayed{visibility:hidden;position: fixed;left: -90000px!important;right: auto!important;}#<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-delayed .<?php echo $chatCSSPrefix?>-cf{display:none}\n#<?php echo $chatCSSLayoutOptions['container_id']?> * {line-height:100%;direction:<?php (erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == 'ltr' || erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == '') ? print 'ltr;text-align:left;' : print 'rtl;text-align:right;'; ?>;font-family:arial;font-size:12px;line-height:100%;box-sizing: content-box;-moz-box-sizing:content-box;padding:0;margin:0;}\n#<?php echo $chatCSSLayoutOptions['container_id']?> img {border:0;max-width: none}\n#<?php echo $chatCSSPrefix?>_header{position:relative;z-index:2147483640;height:<?php ($theme !== false && $theme->header_height > 0) ? print $theme->header_height : print '17' ?>px;text-align:right;clear:both;background-color:#<?php $theme !== false ? print $theme->header_background : print '525252' ?>;padding:<?php ($theme !== false && $theme->header_padding > 0) ? print $theme->header_padding : print '5' ?>px;}#<?php echo $chatCSSPrefix?>-msg-number{float: left;color: #ffffff;font-size: 12px;font-weight: normal;line-height: 23px;position: absolute;background-color: red;border-radius: 37px;display: inline-block;padding-left: 8px;padding-right: 8px;margin-top: -5px;margin-left: -4px;} \n#<?php echo $chatCSSPrefix?>_min{float:right;padding:2px;}.<?php echo $chatCSSPrefix?>-min #<?php echo $chatCSSPrefix?>_min:before{content:url(<?php if ($iconsStatuses['restore_image_url'] == false) : ?><?php echo erLhcoreClassSystem::getHost()?><?php endif; if ($theme !== false && $theme->restore_image_url != '') : ?><?php echo $theme->restore_image_url;?><?php else : ?><?php echo erLhcoreClassDesign::design('images/icons/restore.png');?><?php endif;?>)}#<?php echo $chatCSSPrefix?>_min:before{content: url('<?php if ($theme !== false && $theme->minimize_image_url != '') : ?><?php echo $theme->minimize_image_url;?><?php else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/icons/min.png');?><?php endif;?>'); position: relative;left:0;top;0} #<?php echo $chatCSSPrefix?>_min{width:14px;height:14px;}\n#<?php echo $chatCSSPrefix?>_min:hover{opacity:0.4;}\n#<?php echo $chatCSSLayoutOptions['container_id']?> {background-color:#FFF;-moz-user-select:none; -khtml-user-drag:element;cursor: move;cursor: -moz-grab;cursor: -webkit-grab;max-height: 100%;	overflow: auto;\nz-index:2147483640;\n position: fixed;<?php echo $currentPosition['position_body']?>;-webkit-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-moz-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px; }\n#<?php echo $chatCSSLayoutOptions['container_id']?> iframe{position:relative;display:block;}\n#<?php echo $chatCSSLayoutOptions['container_id']?> #<?php echo $chatCSSPrefix?>_iframe_container{border:<?php ($theme !== false && $theme->widget_border_width > 0) ? print $theme->widget_border_width : print '1' ?>px solid #<?php $theme !== false ? print $theme->widget_border_color : print 'cccccc' ?>;border-top: 0;border-bottom-left-radius: 5px;border-bottom-right-radius: 5px;overflow: hidden;}\n#<?php echo $chatCSSLayoutOptions['container_id']?> iframe.<?php echo $chatCSSPrefix?>-loading{\nbackground: #FFF url(<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/general/loading.gif');?>) no-repeat center center; }\n@media only screen and (max-device-width : <?php ($theme !== false && $theme->widget_response_width > 0) ? print $theme->widget_response_width : print 992?>px) {ul.<?php echo $chatCSSPrefix?>-cf li ul a{padding:8px 14px!important} ul.<?php echo $chatCSSPrefix?>-cf li:hover ul, ul.<?php echo $chatCSSPrefix?>-cf li ul {top: 30px;} .<?php echo $chatCSSPrefix?>-opened{position: fixed; overflow: hidden; right: 0px; left: 0px; top: 0px; bottom: 0px;} #<?php echo $chatCSSPrefix?>_header{height:30px;} #<?php echo $chatCSSPrefix?>_header a{padding:7px;}#<?php echo $chatCSSLayoutOptions['container_id']?>{position:fixed;left:0!important;right:0!important;bottom:0!important;top:0!important;border:0;border-radius:0}#<?php echo $chatCSSLayoutOptions['container_id']?> #<?php echo $chatCSSPrefix?>_iframe_container{border:0;height: calc(100% - 40px)}#<?php echo $chatCSSLayoutOptions['container_id']?> iframe{width:100% !important;height: 100%!important}} .<?php echo $chatCSSPrefix?>-min #<?php echo $chatCSSPrefix?>_header{display:none;}.<?php echo $chatCSSPrefix?>-min #<?php echo $chatCSSPrefix?>_header a{padding:2px;} #<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-min .status-icon{<?php echo $currentPosition['border_status_modern']?>;<?php echo $currentPosition['widget_radius_modern']?>;-webkit-box-shadow: <?php echo $currentPosition['shadow_modern']?> rgba(50, 50, 50, 0.5);-moz-box-shadow:<?php echo $currentPosition['shadow_modern']?> rgba(50, 50, 50, 0.5);box-shadow: <?php echo $currentPosition['shadow_modern']?> rgba(50, 50, 50, 0.5);text-decoration:none;height:41px;width:41px;}#<?php echo $chatCSSLayoutOptions['container_id']?>.<?php echo $chatCSSPrefix?>-min{<?php echo $currentPosition['mobile_position_modern']?>}";
 <?php endif; ?>

programming_language: PHP
filename: dynamic_events.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -13,7 +13,7 @@ lh_inst.outWindowCallback = function(e) {
         var from = e.relatedTarget || e.toElement;
         if (!from || from.nodeName == "HTML") {                
             lh_inst.stopCheckNewMessage();
-            lh_inst.showStartWindow('<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('chat/readoperatormessage')?>/(inv)/<?php echo $invitation->id?><?php $department !== false ? print '/(department)/'.$department : '' ?><?php $theme !== false ? print '/(theme)/'.$theme : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : ''?><?php $survey !== false ? print '/(survey)/'.$survey : ''?>/(vid)/<?php echo $vid;?><?php $visitor->invitation_assigned == true ? print '/(playsound)/true' : ''?>/(fullheight)/<?= $fullheight ? 'true' : 'false' ?>',true);
+            lh_inst.showStartWindow('<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('chat/readoperatormessage')?>/(inv)/<?php echo $invitation->id?><?php $department !== false ? print '/(department)/'.$department : '' ?><?php $theme !== false ? print '/(theme)/'.$theme : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : ''?><?php $survey !== false ? print '/(survey)/'.$survey : ''?>/(vid)/<?php echo $vid;?><?php $visitor->invitation_assigned == true ? print '/(playsound)/true' : ''?>/(fullheight)/<?= $fullheight ? 'true' : 'false' ?>',true);
             lh_inst.removeEvent(document,"mouseout",lh_inst.outWindowCallback);
         }
     }
@@ -36,7 +36,7 @@ lh_inst.iddleEventResetActivity = function() {
         clearTimeout(_that.iddleTimeoutActivity); 
         
         lh_inst.stopCheckNewMessage();
-        lh_inst.showStartWindow('<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('chat/readoperatormessage')?>/(inv)/<?php echo $invitation->id?><?php $department !== false ? print '/(department)/'.$department : '' ?><?php $theme !== false ? print '/(theme)/'.$theme : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : ''?><?php $survey !== false ? print '/(survey)/'.$survey : ''?>/(vid)/<?php echo $vid;?><?php $visitor->invitation_assigned == true ? print '/(playsound)/true' : ''?>/(fullheight)/<?= $fullheight ? 'true' : 'false' ?>',true);
+        lh_inst.showStartWindow('<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('chat/readoperatormessage')?>/(inv)/<?php echo $invitation->id?><?php $department !== false ? print '/(department)/'.$department : '' ?><?php $theme !== false ? print '/(theme)/'.$theme : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : ''?><?php $survey !== false ? print '/(survey)/'.$survey : ''?>/(vid)/<?php echo $vid;?><?php $visitor->invitation_assigned == true ? print '/(playsound)/true' : ''?>/(fullheight)/<?= $fullheight ? 'true' : 'false' ?>',true);
  
         ['mousemove','mousedown','click','scroll','keypress','load'].forEach(function(element) {
             lh_inst.removeEvent(window,element,lh_inst.resetTimeoutIddle);   

programming_language: PHP
filename: show_survey.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -2,6 +2,6 @@ showSurvey : function() {
     if (lh_inst.cookieData.hash && lh_inst.hasSurvey == true && lh_inst.surveyShown == false){
         var locationCurrent = encodeURIComponent(window.location.href.substring(window.location.protocol.length));
         this.surveyShown = true;
-        document.getElementById('<?php echo $chatCSSPrefix?>_iframe').contentWindow.location.replace("<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>"+this.lang+"/survey/fillwidget<?php $leaveamessage == true ? print '/(leaveamessage)/true' : ''?><?php $department !== false ? print '/(department)/'.$department : ''?><?php is_object($theme) ? print '/(theme)/'.$theme->id : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : '' ?>"+this.getAppendCookieArguments()+'?URLReferer='+locationCurrent+this.parseOptions()+this.parseStorageArguments()+'&dt='+encodeURIComponent(document.title));
+        document.getElementById('<?php echo $chatCSSPrefix?>_iframe').contentWindow.location.replace("<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>"+this.lang+"/survey/fillwidget<?php $leaveamessage == true ? print '/(leaveamessage)/true' : ''?><?php $department !== false ? print '/(department)/'.$department : ''?><?php is_object($theme) ? print '/(theme)/'.$theme->id : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : '' ?>"+this.getAppendCookieArguments()+'?URLReferer='+locationCurrent+this.parseOptions()+this.parseStorageArguments()+'&dt='+encodeURIComponent(document.title));
     }
 },
\ No newline at end of file

programming_language: PHP
filename: show_survey_page.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -2,6 +2,6 @@ showSurvey : function() {
     if (this.cookieData.hash && this.hasSurvey == true && this.surveyShown == false){
         var locationCurrent = encodeURIComponent(window.location.href.substring(window.location.protocol.length));
         this.surveyShown = true;
-        document.getElementById('<?php echo $chatCSSPrefix?>_iframe_page').contentWindow.location.replace("<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>"+this.lang+"/survey/fillwidget/(mode)/embed<?php $leaveamessage == true ? print '/(leaveamessage)/true' : ''?><?php $department !== false ? print '/(department)/'.$department : ''?><?php is_object($theme) ? print '/(theme)/'.$theme->id : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : '' ?>"+this.getAppendCookieArguments()+'?URLReferer='+locationCurrent+this.parseOptions()+this.parseStorageArguments()+'&dt='+encodeURIComponent(document.title));
+        document.getElementById('<?php echo $chatCSSPrefix?>_iframe_page').contentWindow.location.replace("<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>"+this.lang+"/survey/fillwidget/(mode)/embed<?php $leaveamessage == true ? print '/(leaveamessage)/true' : ''?><?php $department !== false ? print '/(department)/'.$department : ''?><?php is_object($theme) ? print '/(theme)/'.$theme->id : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : '' ?>"+this.getAppendCookieArguments()+'?URLReferer='+locationCurrent+this.parseOptions()+this.parseStorageArguments()+'&dt='+encodeURIComponent(document.title));
     }
 },
\ No newline at end of file

programming_language: PHP
filename: send_notification.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -76,7 +76,7 @@ sendNotification : function() {
         });
 
         var xhr = new XMLHttpRequest();
-        xhr.open( "POST", '<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>'+that.lang+'/notifications/subscribe<?php $theme !== false ? print '/(theme)/' . (is_object($theme) ? $theme->id : $theme) : ''?>' + (subscribe == true ? '/(action)/sub' : '/(action)/unsub') + that.getAppendCookieArguments(), true);
+        xhr.open( "POST", '<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>'+that.lang+'/notifications/subscribe<?php $theme !== false ? print '/(theme)/' . (is_object($theme) ? $theme->id : $theme) : ''?>' + (subscribe == true ? '/(action)/sub' : '/(action)/unsub') + that.getAppendCookieArguments(), true);
         xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
         xhr.send( "data=" + encodeURIComponent( payload ) );
     }
@@ -142,6 +142,6 @@ sendNotification : function() {
 readNotification : function(chat_id, hash) {
     <?php $notificationsSettings = erLhcoreClassModelChatConfig::fetch('notifications_settings')->data_value;?>
     <?php if (isset($notificationsSettings['enabled']) && $notificationsSettings['enabled'] == 1) : ?>
-        this.showStartWindow("<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>"+this.lang+"/notifications/read/<?php $theme !== false ? print '/(theme)/'.(is_object($theme) ? $theme->id : $theme) : ''?>/(id)/"+chat_id+"/(hashread)/"+hash+"/(mode)/widget");
+        this.showStartWindow("<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>"+this.lang+"/notifications/read/<?php $theme !== false ? print '/(theme)/'.(is_object($theme) ? $theme->id : $theme) : ''?>/(id)/"+chat_id+"/(hashread)/"+hash+"/(mode)/widget");
     <?php endif; ?>
 },

programming_language: PHP
filename: show_start_window.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -13,7 +13,7 @@ preloadWidget : function() {
         widgetHeightUnit = '%';
     }
 
-    this.initial_iframe_url = "<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>"+this.lang+"/chat/chatwidget<?php $leaveamessage == true ? print '/(leaveamessage)/true' : ''?><?= isset($currentPosition['full_height']) && $currentPosition['full_height'] ?  '/(fullheight)/true' : '/(fullheight)/false' ?><?php $department !== false ? print '/(department)/'.$department : ''?><?php $theme !== false ? print '/(theme)/'.$theme->id : ''?><?php $bot_id !== null ? print '/(bot_id)/'.$bot_id : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : '' ?>"+this.getAppendCookieArguments()+'?URLReferer='+locationCurrent+this.parseOptions()+this.parseStorageArguments()+'&dt='+encodeURIComponent(document.title);
+    this.initial_iframe_url = "<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>"+this.lang+"/chat/chatwidget<?php $leaveamessage == true ? print '/(leaveamessage)/true' : ''?><?= isset($currentPosition['full_height']) && $currentPosition['full_height'] ?  '/(fullheight)/true' : '/(fullheight)/false' ?><?php $department !== false ? print '/(department)/'.$department : ''?><?php $theme !== false ? print '/(theme)/'.$theme->id : ''?><?php $bot_id !== null ? print '/(bot_id)/'.$bot_id : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : '' ?>"+this.getAppendCookieArguments()+'?URLReferer='+locationCurrent+this.parseOptions()+this.parseStorageArguments()+'&dt='+encodeURIComponent(document.title);
 
     this.iframePreloaded = true;
 
@@ -77,7 +77,7 @@ showStartWindow : function(url_to_open,delayShow) {
             this.iframeCustomUrl = true;
       } else {
       		this.chatOpenedCallback(this.isOnline == false ? 'internal_offline' : 'internal');	
-            this.initial_iframe_url = "<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>"+this.lang+"/chat/chatwidget<?php $leaveamessage == true ? print '/(leaveamessage)/true' : ''?><?= isset($currentPosition['full_height']) && $currentPosition['full_height'] ?  '/(fullheight)/true' : '/(fullheight)/false' ?><?php $department !== false ? print '/(department)/'.$department : ''?><?php $bot_id !== null ? print '/(bot_id)/'.$bot_id : ''?><?php $theme !== false ? print '/(theme)/'.$theme->id : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : '' ?>"+this.getAppendCookieArguments()+'?URLReferer='+locationCurrent+this.parseOptions()+this.parseStorageArguments()+'&dt='+encodeURIComponent(document.title);
+            this.initial_iframe_url = "<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>"+this.lang+"/chat/chatwidget<?php $leaveamessage == true ? print '/(leaveamessage)/true' : ''?><?= isset($currentPosition['full_height']) && $currentPosition['full_height'] ?  '/(fullheight)/true' : '/(fullheight)/false' ?><?php $department !== false ? print '/(department)/'.$department : ''?><?php $bot_id !== null ? print '/(bot_id)/'.$bot_id : ''?><?php $theme !== false ? print '/(theme)/'.$theme->id : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : '' ?>"+this.getAppendCookieArguments()+'?URLReferer='+locationCurrent+this.parseOptions()+this.parseStorageArguments()+'&dt='+encodeURIComponent(document.title);
       };
        
       this.addClass(document.body,'<?php echo $chatCSSPrefix?>-opened');

programming_language: PHP
filename: show_status_widget.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -17,7 +17,7 @@ showStatusWidget : function() {
       	    'offline_image_url' => ($theme !== false && $theme->offline_image_url !== false && strpos($theme->offline_image_url, 'http') !== false)
       	);          	          	
       	?>
-    	var raw_css = "#<?php echo $chatCSSPrefix?>_status_container.hide-status,#<?php echo $chatCSSPrefix?>_status_container.hide-status-delay{display:none!important;}#<?php echo $chatCSSPrefix?>_status_container * {direction:<?php (erConfigClassLhConfig::getInstance()->getOverrideValue('site','dir_language') == 'ltr' || erConfigClassLhConfig::getInstance()->getOverrideValue('site','dir_language') == '') ? print 'ltr;text-align:left;' : print 'rtl;text-align:right;'; ?>;font-family:arial;font-size:12px;box-sizing: content-box;zoom:1;margin:0;padding:0}\n#<?php echo $chatCSSPrefix?>_status_container .status-icon{text-decoration:none;font-size:12px;font-weight:bold;color:<?php $theme !== false ? print '#'.$theme->text_color : print '#000' ?>;display:block;padding:<?php echo $currentPosition['padding_text']?>;background:url('<?php if ($theme !== false && $theme->online_image_url !== false) : print $theme->online_image_url; else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/icons/user_green_chat.png');?><?php endif;?>') no-repeat <?php echo $currentPosition['background_position']?> center}\n#<?php echo $chatCSSPrefix?>_status_container:hover{<?php echo $currentPosition['widget_hover']?>}\n#<?php echo $chatCSSPrefix?>_status_container #offline-icon{background-image:url('<?php if ($theme !== false && $theme->offline_image_url !== false) : print $theme->offline_image_url; else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/icons/user_gray_chat.png');?><?php endif;?>')}\n#<?php echo $chatCSSPrefix?>_status_container{box-sizing: content-box;<?php echo $currentPosition['widget_radius']?>-webkit-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);<?php echo $currentPosition['border_widget']?>;-moz-box-shadow:<?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);padding:5px 0px 0px 5px;width:190px;font-family:arial;font-size:12px;transition: 1s;position:fixed;<?php echo $currentPosition['position']?>;background-color:#<?php $theme !== false ? print $theme->onl_bcolor : print 'f6f6f6' ?>;z-index:2147483647;}@media only screen and (max-width : 640px) {#<?php echo $chatCSSPrefix?>_need_help_container{display:none;}#<?php echo $chatCSSPrefix?>_status_container .status-icon{padding:32px 15px 9px 31px;background-position:center center;}#<?php echo $chatCSSPrefix?>_status_container .<?php echo $chatCSSPrefix?>-text-status{display:none} #<?php echo $chatCSSPrefix?>_status_container{<?php echo $currentPosition['mobile_position_status']?>}}\n";
+    	var raw_css = "#<?php echo $chatCSSPrefix?>_status_container.hide-status,#<?php echo $chatCSSPrefix?>_status_container.hide-status-delay{display:none!important;}#<?php echo $chatCSSPrefix?>_status_container * {direction:<?php (erConfigClassLhConfig::getInstance()->getOverrideValue('site','dir_language') == 'ltr' || erConfigClassLhConfig::getInstance()->getOverrideValue('site','dir_language') == '') ? print 'ltr;text-align:left;' : print 'rtl;text-align:right;'; ?>;font-family:arial;font-size:12px;box-sizing: content-box;zoom:1;margin:0;padding:0}\n#<?php echo $chatCSSPrefix?>_status_container .status-icon{text-decoration:none;font-size:12px;font-weight:bold;color:<?php $theme !== false ? print '#'.$theme->text_color : print '#000' ?>;display:block;padding:<?php echo $currentPosition['padding_text']?>;background:url('<?php if ($theme !== false && $theme->online_image_url !== false) : print $theme->online_image_url; else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/icons/user_green_chat.png');?><?php endif;?>') no-repeat <?php echo $currentPosition['background_position']?> center}\n#<?php echo $chatCSSPrefix?>_status_container:hover{<?php echo $currentPosition['widget_hover']?>}\n#<?php echo $chatCSSPrefix?>_status_container #offline-icon{background-image:url('<?php if ($theme !== false && $theme->offline_image_url !== false) : print $theme->offline_image_url; else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/icons/user_gray_chat.png');?><?php endif;?>')}\n#<?php echo $chatCSSPrefix?>_status_container{box-sizing: content-box;<?php echo $currentPosition['widget_radius']?>-webkit-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);<?php echo $currentPosition['border_widget']?>;-moz-box-shadow:<?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);padding:5px 0px 0px 5px;width:190px;font-family:arial;font-size:12px;transition: 1s;position:fixed;<?php echo $currentPosition['position']?>;background-color:#<?php $theme !== false ? print $theme->onl_bcolor : print 'f6f6f6' ?>;z-index:2147483647;}@media only screen and (max-width : 640px) {#<?php echo $chatCSSPrefix?>_need_help_container{display:none;}#<?php echo $chatCSSPrefix?>_status_container .status-icon{padding:32px 15px 9px 31px;background-position:center center;}#<?php echo $chatCSSPrefix?>_status_container .<?php echo $chatCSSPrefix?>-text-status{display:none} #<?php echo $chatCSSPrefix?>_status_container{<?php echo $currentPosition['mobile_position_status']?>}}\n";
     	this.addCss(raw_css<?php ($theme !== false && $theme->custom_status_css_front !== '') ? print '+\''.str_replace(array("\n","\r","'"), array('','','\\\''), $theme->custom_status_css_front).'\'' : '' ?>);
 	};
     <?php else : ?>
@@ -31,7 +31,7 @@ showStatusWidget : function() {
             'offline_image_url' => ($theme !== false && $theme->offline_image_url !== false && strpos($theme->offline_image_url, 'http') !== false)
         );
         ?>
-        var raw_css = "#<?php echo $chatCSSPrefix?>_status_container.hide-status,#<?php echo $chatCSSPrefix?>_status_container.hide-status-delay{display:none!important;}#<?php echo $chatCSSPrefix?>_status_container * {direction:<?php (erConfigClassLhConfig::getInstance()->getOverrideValue('site','dir_language') == 'ltr' || erConfigClassLhConfig::getInstance()->getOverrideValue('site','dir_language') == '') ? print 'ltr;text-align:left;' : print 'rtl;text-align:right;'; ?>;font-family:arial;font-size:12px;box-sizing: content-box;zoom:1;margin:0;padding:0}#<?php echo $chatCSSPrefix?>_status_container .<?php echo $chatCSSPrefix?>-invitation-status{display:none;position:absolute;}#<?php echo $chatCSSPrefix?>_status_container.<?php echo $chatCSSPrefix?>_invitation-mode .<?php echo $chatCSSPrefix?>-invitation-status{width: 16px;height:16px;padding: 2px;border-radius: 10px;text-align: center;font-weight: bold;color: #FFF;background-color: red;display: inline-block;}\n#<?php echo $chatCSSPrefix?>_status_container .status-icon{<?php echo $currentPosition['border_status_modern']?>;<?php echo $currentPosition['widget_radius_modern']?>;-webkit-box-shadow: <?php echo $currentPosition['shadow_modern']?> rgba(50, 50, 50, 0.5);-moz-box-shadow:<?php echo $currentPosition['shadow_modern']?> rgba(50, 50, 50, 0.5);box-shadow: <?php echo $currentPosition['shadow_modern']?> rgba(50, 50, 50, 0.5);text-decoration:none;height:41px;width:41px;font-weight:bold;color:<?php $theme !== false ? print '#'.$theme->text_color : print '#000' ?>;display:block;padding:10px;background:#<?php $theme !== false ? print $theme->onl_bcolor : print '0c8fc4' ?> url('<?php if ($theme !== false && $theme->online_image_url !== false) : print $theme->online_image_url; else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/getstatus/online.svg');?><?php endif;?>') no-repeat center center}\n#<?php echo $chatCSSPrefix?>_status_container:hover{<?php echo $currentPosition['widget_hover_modern']?>}\n#<?php echo $chatCSSPrefix?>_status_container #offline-icon{background:#888888 url('<?php if ($theme !== false && $theme->offline_image_url !== false) : print $theme->offline_image_url; else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/getstatus/offline.svg');?><?php endif;?>') no-repeat center}\n#<?php echo $chatCSSPrefix?>_status_container{box-sizing: content-box;padding:5px 0px 0px 5px;font-family:arial;font-size:12px;transition: 1s;position:fixed;<?php echo $currentPosition['position_modern']?>;z-index:2147483647;}@media only screen and (max-width : 640px) {#<?php echo $chatCSSPrefix?>_need_help_container{display:none;}#<?php echo $chatCSSPrefix?>_status_container .status-icon{background-position:center center;}#<?php echo $chatCSSPrefix?>_status_container .<?php echo $chatCSSPrefix?>-text-status{display:none} #<?php echo $chatCSSPrefix?>_status_container{<?php echo $currentPosition['mobile_position_status_modern']?>}}\n";
+        var raw_css = "#<?php echo $chatCSSPrefix?>_status_container.hide-status,#<?php echo $chatCSSPrefix?>_status_container.hide-status-delay{display:none!important;}#<?php echo $chatCSSPrefix?>_status_container * {direction:<?php (erConfigClassLhConfig::getInstance()->getOverrideValue('site','dir_language') == 'ltr' || erConfigClassLhConfig::getInstance()->getOverrideValue('site','dir_language') == '') ? print 'ltr;text-align:left;' : print 'rtl;text-align:right;'; ?>;font-family:arial;font-size:12px;box-sizing: content-box;zoom:1;margin:0;padding:0}#<?php echo $chatCSSPrefix?>_status_container .<?php echo $chatCSSPrefix?>-invitation-status{display:none;position:absolute;}#<?php echo $chatCSSPrefix?>_status_container.<?php echo $chatCSSPrefix?>_invitation-mode .<?php echo $chatCSSPrefix?>-invitation-status{width: 16px;height:16px;padding: 2px;border-radius: 10px;text-align: center;font-weight: bold;color: #FFF;background-color: red;display: inline-block;}\n#<?php echo $chatCSSPrefix?>_status_container .status-icon{<?php echo $currentPosition['border_status_modern']?>;<?php echo $currentPosition['widget_radius_modern']?>;-webkit-box-shadow: <?php echo $currentPosition['shadow_modern']?> rgba(50, 50, 50, 0.5);-moz-box-shadow:<?php echo $currentPosition['shadow_modern']?> rgba(50, 50, 50, 0.5);box-shadow: <?php echo $currentPosition['shadow_modern']?> rgba(50, 50, 50, 0.5);text-decoration:none;height:41px;width:41px;font-weight:bold;color:<?php $theme !== false ? print '#'.$theme->text_color : print '#000' ?>;display:block;padding:10px;background:#<?php $theme !== false ? print $theme->onl_bcolor : print '0c8fc4' ?> url('<?php if ($theme !== false && $theme->online_image_url !== false) : print $theme->online_image_url; else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/getstatus/online.svg');?><?php endif;?>') no-repeat center center}\n#<?php echo $chatCSSPrefix?>_status_container:hover{<?php echo $currentPosition['widget_hover_modern']?>}\n#<?php echo $chatCSSPrefix?>_status_container #offline-icon{background:#888888 url('<?php if ($theme !== false && $theme->offline_image_url !== false) : print $theme->offline_image_url; else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/getstatus/offline.svg');?><?php endif;?>') no-repeat center}\n#<?php echo $chatCSSPrefix?>_status_container{box-sizing: content-box;padding:5px 0px 0px 5px;font-family:arial;font-size:12px;transition: 1s;position:fixed;<?php echo $currentPosition['position_modern']?>;z-index:2147483647;}@media only screen and (max-width : 640px) {#<?php echo $chatCSSPrefix?>_need_help_container{display:none;}#<?php echo $chatCSSPrefix?>_status_container .status-icon{background-position:center center;}#<?php echo $chatCSSPrefix?>_status_container .<?php echo $chatCSSPrefix?>-text-status{display:none} #<?php echo $chatCSSPrefix?>_status_container{<?php echo $currentPosition['mobile_position_status_modern']?>}}\n";
         this.addCss(raw_css<?php ($theme !== false && $theme->custom_status_css_front !== '') ? print '+\''.str_replace(array("\n","\r","'"), array('','','\\\''), $theme->custom_status_css_front).'\'' : '' ?>);
     };
     <?php endif; ?>

programming_language: PHP
filename: getstatus_migrate.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -42,9 +42,9 @@ lh_inst.lh_openchatWindow = function(){
 <?php $lang = erLhcoreClassSystem::instance()->SiteAccess != 'site_admin' ?  erLhcoreClassSystem::instance()->SiteAccess . '/' : ''; ?>
 
 var LHC_API = LHC_API||{};
-LHC_API.args = {'lang':'<?php echo $lang?>',mode:'<?php echo $mode?>'<?php (isset($position) && $position == 'api') ? print ",position:'api'" : ''?>,lhc_base_url:'//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect('/')?>',domain: lhc_domain, wheight:<?php isset($wheight) ? print (int)$wheight : print 450?>, wwidth:<?php isset($wwidth) ? print (int)$wwidth : print 350?>,pheight:520,pwidth:500<?php if (is_array($depId) && !empty($depId)) : ?>,department:[<?php echo implode(',',$depId)?>]<?php endif;?><?php if ($leaveamessage == true) : ?>,leaveamessage:true<?php endif; ?><?php if ($disable_pro_active == true) : ?>,proactive:false<?php else : ?>,check_messages:true<?php endif;?><?php isset($uparams['theme']) & is_numeric($uparams['theme']) ? print ',theme:' . (int)$uparams['theme'] : ''?>};
+LHC_API.args = {'lang':'<?php echo $lang?>',mode:'<?php echo $mode?>'<?php (isset($position) && $position == 'api') ? print ",position:'api'" : ''?>,lhc_base_url:'<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurldirect('/')?>',domain: lhc_domain, wheight:<?php isset($wheight) ? print (int)$wheight : print 450?>, wwidth:<?php isset($wwidth) ? print (int)$wwidth : print 350?>,pheight:520,pwidth:500<?php if (is_array($depId) && !empty($depId)) : ?>,department:[<?php echo implode(',',$depId)?>]<?php endif;?><?php if ($leaveamessage == true) : ?>,leaveamessage:true<?php endif; ?><?php if ($disable_pro_active == true) : ?>,proactive:false<?php else : ?>,check_messages:true<?php endif;?><?php isset($uparams['theme']) & is_numeric($uparams['theme']) ? print ',theme:' . (int)$uparams['theme'] : ''?>};
 (function() {
 var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
-var date = new Date();po.src = '//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('js/widgetv2/index.js');?>?v1'+(""+date.getFullYear() + date.getMonth() + date.getDate());
+var date = new Date();po.src = '<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('js/widgetv2/index.js');?>?v1'+(""+date.getFullYear() + date.getMonth() + date.getDate());
 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
 })();

programming_language: Batchfile
filename: native_placement.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -1 +1 @@
-document.getElementById('<?php echo $chatCSSPrefix?>_status_container').innerHTML = '<p class="<?php echo $chatCSSPrefix?>-status-native-'+(this.isOnline == true ? 'online' : 'offline')+'"><a href="#" onclick="return lh_inst.lh_openchatWindow()">'+(this.isOnline == true ? '<img src="<?php if ($theme !== false && $theme->online_image_url !== false) : print $theme->online_image_url; else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/icons/user_green_chat.png');?><?php endif;?>" alt="" /><?php if ($theme !== false && $theme->online_text !== '') : print htmlspecialchars_decode($theme->online_text,ENT_QUOTES); else : ?><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Live help is online...')?><?php endif?>' : '<img src="<?php if ($theme !== false && $theme->offline_image_url !== false) : print $theme->offline_image_url; else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/icons/user_gray_chat.png');?><?php endif;?>" alt="" /><?php if ($theme !== false && $theme->offline_text != '') : print htmlspecialchars_decode($theme->offline_text,ENT_QUOTES); else : ?><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Live help is offline...')?><?php endif;?>')+'</a></p>';
+document.getElementById('<?php echo $chatCSSPrefix?>_status_container').innerHTML = '<p class="<?php echo $chatCSSPrefix?>-status-native-'+(this.isOnline == true ? 'online' : 'offline')+'"><a href="#" onclick="return lh_inst.lh_openchatWindow()">'+(this.isOnline == true ? '<img src="<?php if ($theme !== false && $theme->online_image_url !== false) : print $theme->online_image_url; else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/icons/user_green_chat.png');?><?php endif;?>" alt="" /><?php if ($theme !== false && $theme->online_text !== '') : print htmlspecialchars_decode($theme->online_text,ENT_QUOTES); else : ?><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Live help is online...')?><?php endif?>' : '<img src="<?php if ($theme !== false && $theme->offline_image_url !== false) : print $theme->offline_image_url; else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/icons/user_gray_chat.png');?><?php endif;?>" alt="" /><?php if ($theme !== false && $theme->offline_text != '') : print htmlspecialchars_decode($theme->offline_text,ENT_QUOTES); else : ?><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Live help is offline...')?><?php endif;?>')+'</a></p>';

programming_language: PHP
filename: we_here_substatus.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -1,7 +1,7 @@
 var titleText = (typeof <?php echo $chatOptionsVariable;?>.opt.nh_title_text != 'undefined') ? <?php echo $chatOptionsVariable;?>.opt.nh_title_text : <?php if ($theme !== false && $theme->need_help_header !== '') : print json_encode($theme->need_help_header); else : ?><?php echo json_encode(htmlspecialchars_decode(erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Need help?'),ENT_QUOTES))?><?php endif;?>;
 var subTitleText = (typeof <?php echo $chatOptionsVariable;?>.opt.nh_sub_title_text != 'undefined') ? <?php echo $chatOptionsVariable;?>.opt.nh_sub_title_text : <?php if ($theme !== false && $theme->need_help_text !== '') : print json_encode($theme->need_help_text); else : ?><?php echo json_encode(htmlspecialchars_decode(erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Our staff are always ready to help'),ENT_QUOTES))?><?php endif;?>;
 <?php $iconsStatuses['need_help_image_url'] = ($theme !== false && $theme->need_help_image_url !== false && strpos($theme->need_help_image_url, 'http') !== false); ?>
-var imageTooltip = (typeof <?php echo $chatOptionsVariable;?>.opt.nh_image != 'undefined') ? <?php echo $chatOptionsVariable;?>.opt.nh_image : '<?php if ($theme !== false && $theme->need_help_image_url !== false) : print $theme->need_help_image_url; else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/general/operator.png');?><?php endif;?>';
+var imageTooltip = (typeof <?php echo $chatOptionsVariable;?>.opt.nh_image != 'undefined') ? <?php echo $chatOptionsVariable;?>.opt.nh_image : '<?php if ($theme !== false && $theme->need_help_image_url !== false) : print $theme->need_help_image_url; else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/general/operator.png');?><?php endif;?>';
 
 subStatus = '<div id="<?php echo $chatCSSPrefix?>_need_help_container" style="<?php echo $currentPosition[$nh_hor_pos]?>">'+
 '<span id="<?php echo $chatCSSPrefix?>_need_help_triangle" style="<?php echo $currentPosition['nh_tr_pos']?>"></span>'+

programming_language: PHP
filename: getstatusembed.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -34,7 +34,7 @@ var lh_inst_page  = {
             var th = document.getElementsByTagName('head')[0];
             var s = document.createElement('script');
             s.setAttribute('type','text/javascript');
-            s.setAttribute('src','<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('chat/chatwidgetclosed')?>/(eclose)/t'+this.getAppendCookieArguments());
+            s.setAttribute('src','<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('chat/chatwidgetclosed')?>/(eclose)/t'+this.getAppendCookieArguments());
             th.appendChild(s);
             s.onreadystatechange = s.onload = function(){
                 lh_inst_page.removeCookieAttr('hash');
@@ -178,7 +178,7 @@ var lh_inst_page  = {
         if ( url_to_open != undefined ) {
             this.initial_iframe_url = url_to_open+this.getAppendCookieArguments()+'?URLReferer='+locationCurrent+this.parseOptions()+'&dt='+encodeURIComponent(document.title)+this.parseStorageArguments();
         } else {
-            this.initial_iframe_url = "<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('chat/chatwidget')?><?php $leaveamessage == true ? print '/(leaveamessage)/true' : ''?><?php $department !== false ? print '/(department)/'.$department : ''?><?php $theme !== false ? print '/(theme)/'.$theme : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $bot_id !== null ? print '/(bot_id)/'.$bot_id : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : ''?>/(mode)/embed" + (mobileFullHeight === false ? '/(mobile)/false' : '') + this.getAppendCookieArguments()+'?URLReferer='+locationCurrent+this.parseOptions()+this.parseStorageArguments();
+            this.initial_iframe_url = "<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('chat/chatwidget')?><?php $leaveamessage == true ? print '/(leaveamessage)/true' : ''?><?php $department !== false ? print '/(department)/'.$department : ''?><?php $theme !== false ? print '/(theme)/'.$theme : ''?><?php $operator !== false ? print '/(operator)/'.$operator : ''?><?php $priority !== false ? print '/(priority)/'.$priority : ''?><?php $bot_id !== null ? print '/(bot_id)/'.$bot_id : ''?><?php $uarguments !== false ? print '/(ua)/'.$uarguments : ''?>/(mode)/embed" + (mobileFullHeight === false ? '/(mobile)/false' : '') + this.getAppendCookieArguments()+'?URLReferer='+locationCurrent+this.parseOptions()+this.parseStorageArguments();
         };
 
         if (mobileFullHeight === true) {

programming_language: PHP
filename: op_msg_row_nick.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -10,7 +10,7 @@
             <?php if ($chat->bot->has_photo) : ?>
             <img class="profile-msg-pic" src="<?php echo $chat->bot->photo_path?>" alt="">
             <?php else : ?>
-            <img class="profile-msg-pic" src="<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect('widgetrestapi/avatar')?>/<?php echo htmlspecialchars($chat->bot->avatar)?>" alt="" />
+            <img class="profile-msg-pic" src="<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurldirect('widgetrestapi/avatar')?>/<?php echo htmlspecialchars($chat->bot->avatar)?>" alt="" />
             <?php endif; ?>
         </i>
     <?php elseif ($msg['user_id'] > 0 && isset($theme) && $theme !== false && isset($theme->bot_configuration_array['bubble_style_profile']) && $theme->bot_configuration_array['bubble_style_profile'] == 1 &&
@@ -20,7 +20,7 @@
                 <?php if ($userMessage->has_photo) : ?>
                     <img class="profile-msg-pic" src="<?php echo $userMessage->photo_path?>" alt="">
                 <?php else : ?>
-                    <img class="profile-msg-pic" src="<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect('widgetrestapi/avatar')?>/<?php echo htmlspecialchars($userMessage->avatar)?>" alt="" />
+                    <img class="profile-msg-pic" src="<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurldirect('widgetrestapi/avatar')?>/<?php echo htmlspecialchars($userMessage->avatar)?>" alt="" />
                 <?php endif; ?>
             </i>
     <?php elseif (isset($theme) && $theme !== false && isset($theme->bot_configuration_array['bubble_style_profile']) && $theme->bot_configuration_array['bubble_style_profile'] == 1 && $theme->operator_image_avatar !== false) : ?>
@@ -28,7 +28,7 @@
             <?php if ($theme->operator_image_url !== false) : ?>
                 <img class="profile-msg-pic" src="<?php echo $theme->operator_image_url?>" alt="">
             <?php else : ?>
-                <img class="profile-msg-pic" src="<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect('widgetrestapi/avatar')?>/<?php echo htmlspecialchars($theme->bot_configuration_array['operator_avatar'])?>" alt="" />
+                <img class="profile-msg-pic" src="<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurldirect('widgetrestapi/avatar')?>/<?php echo htmlspecialchars($theme->bot_configuration_array['operator_avatar'])?>" alt="" />
             <?php endif; ?>
         </i>
     <?php else : ?>

programming_language: PHP
filename: operator_profile_name_support_img.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -1,5 +1,5 @@
 <?php if ($user->has_photo) : ?>
 <img width="48" height="48" src="<?php echo $user->photo_path?>" alt="<?php echo htmlspecialchars($user->name_support)?>" />
 <?php else : ?>
-<img width="48" height="48" src="<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect('widgetrestapi/avatar')?>/<?php echo htmlspecialchars($user->avatar)?>" alt="<?php echo htmlspecialchars($user->name_support)?>" />
+<img width="48" height="48" src="<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurldirect('widgetrestapi/avatar')?>/<?php echo htmlspecialchars($user->avatar)?>" alt="<?php echo htmlspecialchars($user->name_support)?>" />
 <?php endif; ?>

programming_language: PHP
filename: operator_profile_start_chat.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -5,7 +5,7 @@
         <?php if ($theme->operator_image_url !== false) : ?>
      			<img width="48" height="48" src="<?php echo $theme->operator_image_url?>" alt="" />
         <?php else : ?>
-                <img width="48" height="48" src="<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect('widgetrestapi/avatar')?>/<?php echo htmlspecialchars($theme->bot_configuration_array['operator_avatar'])?>" alt="" />
+                <img width="48" height="48" src="<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurldirect('widgetrestapi/avatar')?>/<?php echo htmlspecialchars($theme->bot_configuration_array['operator_avatar'])?>" alt="" />
         <?php endif; ?>
 
      	<?php else : ?>

programming_language: PHP
filename: chatbox.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -1 +1 @@
-<?php if ($theme === false || $theme->show_copyright == 1) : ?><span id="lhc_chatbox_title"><a title="<?php $theme !== false && $theme->widget_copyright_url != '' ? print '' : print 'Powered by Live Helper Chat' ?>" href="<?php $theme !== false && $theme->widget_copyright_url != '' ? print htmlspecialchars($theme->widget_copyright_url) : print 'http://livehelperchat.com' ?>" rel="noreferrer" target="_blank"><img src="<?php if ($theme !== false && $theme->copyright_image_url !== false) : print $theme->copyright_image_url; else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/general/logo_grey.png');?><?php endif;?>" alt="Live Helper Chat" /></a></span><?php endif;?>
\ No newline at end of file
+<?php if ($theme === false || $theme->show_copyright == 1) : ?><span id="lhc_chatbox_title"><a title="<?php $theme !== false && $theme->widget_copyright_url != '' ? print '' : print 'Powered by Live Helper Chat' ?>" href="<?php $theme !== false && $theme->widget_copyright_url != '' ? print htmlspecialchars($theme->widget_copyright_url) : print 'http://livehelperchat.com' ?>" rel="noreferrer" target="_blank"><img src="<?php if ($theme !== false && $theme->copyright_image_url !== false) : print $theme->copyright_image_url; else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/general/logo_grey.png');?><?php endif;?>" alt="Live Helper Chat" /></a></span><?php endif;?>
\ No newline at end of file

programming_language: PHP
filename: faq.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -1 +1 @@
-<?php if ($theme === false || $theme->show_copyright == 1) : ?><span id="lhc_faq_title"><a title="<?php $theme !== false && $theme->widget_copyright_url != '' ? print '' : print 'Powered by Live Helper Chat' ?>" href="<?php $theme !== false && $theme->widget_copyright_url != '' ? print htmlspecialchars($theme->widget_copyright_url) : print 'http://livehelperchat.com' ?>" target="_blank" rel="noreferrer"><img src="<?php if ($theme !== false && $theme->copyright_image_url !== false) : print $theme->copyright_image_url; else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/general/logo_grey.png');?><?php endif;?>" alt="Live Helper Chat" /></a></span><?php endif;?>
\ No newline at end of file
+<?php if ($theme === false || $theme->show_copyright == 1) : ?><span id="lhc_faq_title"><a title="<?php $theme !== false && $theme->widget_copyright_url != '' ? print '' : print 'Powered by Live Helper Chat' ?>" href="<?php $theme !== false && $theme->widget_copyright_url != '' ? print htmlspecialchars($theme->widget_copyright_url) : print 'http://livehelperchat.com' ?>" target="_blank" rel="noreferrer"><img src="<?php if ($theme !== false && $theme->copyright_image_url !== false) : print $theme->copyright_image_url; else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/general/logo_grey.png');?><?php endif;?>" alt="Live Helper Chat" /></a></span><?php endif;?>
\ No newline at end of file

programming_language: PHP
filename: live_help.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -1,2 +1,2 @@
 <?php $iconsStatuses['copyright_image_url'] = ($theme !== false && $theme->copyright_image_url !== false && strpos($theme->copyright_image_url, 'http') !== false);          	          	
-if ($theme === false || $theme->show_copyright == 1) : ?><span id="lhc_title"><a title="<?php $theme !== false && $theme->widget_copyright_url != '' ? print '' : print 'Powered by Live Helper Chat' ?>" href="<?php $theme !== false && $theme->widget_copyright_url != '' ? print htmlspecialchars($theme->widget_copyright_url) : print 'http://livehelperchat.com' ?>" target="_blank"><img src="<?php if ($theme !== false && $theme->copyright_image_url !== false) : print $theme->copyright_image_url; else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/general/logo_grey.png');?><?php endif;?>" alt="Live Helper Chat" /></a></span><?php endif;?>
\ No newline at end of file
+if ($theme === false || $theme->show_copyright == 1) : ?><span id="lhc_title"><a title="<?php $theme !== false && $theme->widget_copyright_url != '' ? print '' : print 'Powered by Live Helper Chat' ?>" href="<?php $theme !== false && $theme->widget_copyright_url != '' ? print htmlspecialchars($theme->widget_copyright_url) : print 'http://livehelperchat.com' ?>" target="_blank"><img src="<?php if ($theme !== false && $theme->copyright_image_url !== false) : print $theme->copyright_image_url; else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/general/logo_grey.png');?><?php endif;?>" alt="Live Helper Chat" /></a></span><?php endif;?>
\ No newline at end of file

programming_language: PHP
filename: questionary.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -1 +1 @@
-<?php if ($theme === false || $theme->show_copyright == 1) : ?><span id="lhc_questionary_title"><a rel="noreferrer" title="<?php $theme !== false && $theme->widget_copyright_url != '' ? print '' : print 'Powered by Live Helper Chat' ?>" href="<?php $theme !== false && $theme->widget_copyright_url != '' ? print htmlspecialchars($theme->widget_copyright_url) : print 'http://livehelperchat.com' ?>" target="_blank"><img src="<?php if ($theme !== false && $theme->copyright_image_url !== false) : print $theme->copyright_image_url; else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/general/logo_grey.png');?><?php endif;?>" alt="Live Helper Chat" /></a></span><?php endif;?>
\ No newline at end of file
+<?php if ($theme === false || $theme->show_copyright == 1) : ?><span id="lhc_questionary_title"><a rel="noreferrer" title="<?php $theme !== false && $theme->widget_copyright_url != '' ? print '' : print 'Powered by Live Helper Chat' ?>" href="<?php $theme !== false && $theme->widget_copyright_url != '' ? print htmlspecialchars($theme->widget_copyright_url) : print 'http://livehelperchat.com' ?>" target="_blank"><img src="<?php if ($theme !== false && $theme->copyright_image_url !== false) : print $theme->copyright_image_url; else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/general/logo_grey.png');?><?php endif;?>" alt="Live Helper Chat" /></a></span><?php endif;?>
\ No newline at end of file

programming_language: PHP
filename: embed.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -9,7 +9,7 @@ var lhc_ChatboxPage = {
 
 	showVotingForm : function() {
 		  var locationCurrent = encodeURIComponent(window.location.href.substring(window.location.protocol.length));
-   		  this.initial_iframe_url = "<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('chatbox/chatwidget')?>/(chat_height)/<?php echo $heightchatcontent;?><?php $theme !== false ? print '/(theme)/'.$theme : ''?>/(mode)/embed/(identifier)/"+<?php echo $chatboxOptionsVariablePage;?>.identifier+'/(hashchatbox)/'+<?php echo $chatboxOptionsVariablePage;?>.hashchatbox+this.getAppendCookieArguments()+'?URLReferer='+locationCurrent+this.getAppendRequestArguments();
+   		  this.initial_iframe_url = "<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('chatbox/chatwidget')?>/(chat_height)/<?php echo $heightchatcontent;?><?php $theme !== false ? print '/(theme)/'.$theme : ''?>/(mode)/embed/(identifier)/"+<?php echo $chatboxOptionsVariablePage;?>.identifier+'/(hashchatbox)/'+<?php echo $chatboxOptionsVariablePage;?>.hashchatbox+this.getAppendCookieArguments()+'?URLReferer='+locationCurrent+this.getAppendRequestArguments();
 
    		  this.iframe_html = '<iframe id="lhc_sizing_chatbox_page" allowTransparency="true" scrolling="no" frameborder="0" ' +
                        ( this.initial_iframe_url != '' ? ' src="'    + this.initial_iframe_url + '"' : '' ) +

programming_language: PHP
filename: embedcode.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -55,7 +55,7 @@ function generateEmbedCode(){
     var script = '<script type="text/javascript">'+"\nvar <?php echo $chatboxOptionsVariablePage?> = {hashchatbox:'empty',identifier:'default'};\n"+
       '(function() {'+"\n"+
         'var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;'+"\n"+
-        'po.src = \''+$('#HttpMode').val()+'//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect()?>'+siteAccess+'chatbox/embed'+chat_height+id_theme+"';\n"+
+        'po.src = \''+$('#HttpMode').val()+'//<?php echo str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost())?><?php echo erLhcoreClassDesign::baseurldirect()?>'+siteAccess+'chatbox/embed'+chat_height+id_theme+"';\n"+
         'var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);'+"\n"+
       '})();'+"\n"+
     '</scr'+'ipt>';

programming_language: PHP
filename: getstatus.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -194,7 +194,7 @@ var lhc_Chatbox = {
     	var th = document.getElementsByTagName('head')[0];
         var s = document.createElement('script');
         s.setAttribute('type','text/javascript');
-        s.setAttribute('src','<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('chatbox/chatwidgetclosed')?>');
+        s.setAttribute('src','<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('chatbox/chatwidgetclosed')?>');
         th.appendChild(s);
         this.removeById('lhc_container_chatbox');
         this.removeCookieAttr('pos');
@@ -243,7 +243,7 @@ var lhc_Chatbox = {
    		  this.removeById('lhc_container_chatbox');
 		  var locationCurrent = encodeURIComponent(window.location.href.substring(window.location.protocol.length));
 		  
-   		  this.initial_iframe_url = "<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('chatbox/chatwidget')?>/(chat_height)/<?php echo $heightchatcontent;?><?php $theme !== false ? print '/(theme)/'.$theme->id : ''?>/(identifier)/"+<?php echo $chatboxOptionsVariable;?>.identifier+'/(hashchatbox)/'+<?php echo $chatboxOptionsVariable;?>.hashchatbox+this.getAppendCookieArguments()+'?URLReferer='+locationCurrent+this.getAppendRequestArguments();
+   		  this.initial_iframe_url = "<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('chatbox/chatwidget')?>/(chat_height)/<?php echo $heightchatcontent;?><?php $theme !== false ? print '/(theme)/'.$theme->id : ''?>/(identifier)/"+<?php echo $chatboxOptionsVariable;?>.identifier+'/(hashchatbox)/'+<?php echo $chatboxOptionsVariable;?>.hashchatbox+this.getAppendCookieArguments()+'?URLReferer='+locationCurrent+this.getAppendRequestArguments();
 
    		  if (window.innerWidth < 1024) {
           		window.open(this.initial_iframe_url,"_blank");
@@ -259,10 +259,10 @@ var lhc_Chatbox = {
                        ' style="width: <?php echo $widthwidget?>px; height: <?php echo $heightwidget?>px;"></iframe></div>';
 
           this.iframe_html = '<div id="lhc_container_chatbox">' +
-                              '<div id="lhc_chatbox_header"><?php include(erLhcoreClassDesign::designtpl('lhchat/widget_brand/chatbox.tpl.php')); ?><?php if ($show_content === false) : ?><a href="#" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" id="lhc_chatbox_close"><img src="<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php if ($theme !== false && $theme->close_image_url != '') : ?><?php echo $theme->close_image_url;?><?php else : ?><?php echo erLhcoreClassDesign::design('images/icons/cancel.png');?><?php endif;?>" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" alt="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" /></a><?php endif;?><?php if ($disable_min === false) : ?><a href="#" id="lhc_chatbox_min" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Minimize/Restore')?>"></a><?php endif;?></div><div id="lhc_iframe_container">' +
+                              '<div id="lhc_chatbox_header"><?php include(erLhcoreClassDesign::designtpl('lhchat/widget_brand/chatbox.tpl.php')); ?><?php if ($show_content === false) : ?><a href="#" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" id="lhc_chatbox_close"><img src="<?php echo erLhcoreClassSystem::getHost()?><?php if ($theme !== false && $theme->close_image_url != '') : ?><?php echo $theme->close_image_url;?><?php else : ?><?php echo erLhcoreClassDesign::design('images/icons/cancel.png');?><?php endif;?>" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" alt="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" /></a><?php endif;?><?php if ($disable_min === false) : ?><a href="#" id="lhc_chatbox_min" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Minimize/Restore')?>"></a><?php endif;?></div><div id="lhc_iframe_container">' +
                               this.iframe_html + '</div></div>';
 
-          raw_css = ".lhc-no-transition{ -webkit-transition: none !important; -moz-transition: none !important;-o-transition: none !important;-ms-transition: none !important;transition: none !important;}\n.lhc-min{height:35px !important}\n#lhc_container_chatbox * {direction:<?php (erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == 'ltr' || erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == '') ? print 'ltr;text-align:left;' : print 'rtl;text-align:right;'; ?>;font-family:arial\;font-size:12px\;line-height:100%\;box-sizing: content-box\;-moz-box-sizing:content-box;padding:0;margin:0;}\n#lhc_container_chatbox img {border:0;}\n#lhc_chatbox_title{float:left;}\n#lhc_chatbox_header{position:relative;z-index:9990;height:<?php ($theme !== false && $theme->header_height > 0) ? print $theme->header_height : print '15' ?>px;overflow:hidden;background-color:#<?php $theme !== false ? print $theme->header_background : print '525252' ?>;text-align:right;clear:both;padding:<?php ($theme !== false && $theme->header_padding > 0) ? print $theme->header_padding : print '5' ?>px;}\n#lhc_chatbox_close,#lhc_chatbox_min{padding:2px;float:right;}.lhc-min #lhc_chatbox_min{background-image:url(<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php if ($theme !== false && $theme->restore_image_url != '') : ?><?php echo $theme->restore_image_url;?><?php else : ?><?php echo erLhcoreClassDesign::design('images/icons/restore.png');?><?php endif;?>)}#lhc_chatbox_min{width:14px;height:14px;background:url(<?php if ($theme !== false && $theme->minimize_image_url != '') : ?><?php echo $theme->minimize_image_url;?><?php else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/icons/min.png');?><?php endif;?>) no-repeat center center;}\n\n#lhc_chatbox_close:hover,#lhc_chatbox_min:hover{opacity:0.4}\n#lhc_container_chatbox {overflow: hidden;transition-property: height;transition-duration: 0.4s;-webkit-transition: height 0.4s ease-in-out;transition: height 0.4s;background-color:#FFF\;\nz-index:9990;\n position: fixed;<?php echo $currentPosition['position_body']?>;-webkit-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-moz-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;-moz-user-select:none; -khtml-user-drag:element;cursor: move;cursor: -moz-grab;cursor: -webkit-grab; }\n#lhc_container_chatbox iframe{position:relative;display:block;transition-property: height;transition-duration: 0.4s;-webkit-transition: height 0.4s ease-in-out;transition: height 0.4s;}\n#lhc_container_chatbox iframe.lhc-loading{\nbackground: #FFF url(<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/general/loading.gif');?>) no-repeat center center; }\n#lhc_container_chatbox #lhc_iframe_container{border:<?php ($theme !== false && $theme->widget_border_width > 0) ? print $theme->widget_border_width : print '1' ?>px solid #<?php $theme !== false ? print $theme->widget_border_color : print 'cccccc' ?>;border-top: 0;border-bottom-left-radius: 5px;border-bottom-right-radius: 5px;overflow: hidden;}\n@media only screen and (max-width : 640px) {#lhc_container_chatbox{margin-bottom:5px;position:relative;right:0 !important;bottom:0 !important;top:0 !important}#lhc_container_chatbox iframe{width:100% !important}}";
+          raw_css = ".lhc-no-transition{ -webkit-transition: none !important; -moz-transition: none !important;-o-transition: none !important;-ms-transition: none !important;transition: none !important;}\n.lhc-min{height:35px !important}\n#lhc_container_chatbox * {direction:<?php (erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == 'ltr' || erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == '') ? print 'ltr;text-align:left;' : print 'rtl;text-align:right;'; ?>;font-family:arial\;font-size:12px\;line-height:100%\;box-sizing: content-box\;-moz-box-sizing:content-box;padding:0;margin:0;}\n#lhc_container_chatbox img {border:0;}\n#lhc_chatbox_title{float:left;}\n#lhc_chatbox_header{position:relative;z-index:9990;height:<?php ($theme !== false && $theme->header_height > 0) ? print $theme->header_height : print '15' ?>px;overflow:hidden;background-color:#<?php $theme !== false ? print $theme->header_background : print '525252' ?>;text-align:right;clear:both;padding:<?php ($theme !== false && $theme->header_padding > 0) ? print $theme->header_padding : print '5' ?>px;}\n#lhc_chatbox_close,#lhc_chatbox_min{padding:2px;float:right;}.lhc-min #lhc_chatbox_min{background-image:url(<?php echo erLhcoreClassSystem::getHost()?><?php if ($theme !== false && $theme->restore_image_url != '') : ?><?php echo $theme->restore_image_url;?><?php else : ?><?php echo erLhcoreClassDesign::design('images/icons/restore.png');?><?php endif;?>)}#lhc_chatbox_min{width:14px;height:14px;background:url(<?php if ($theme !== false && $theme->minimize_image_url != '') : ?><?php echo $theme->minimize_image_url;?><?php else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/icons/min.png');?><?php endif;?>) no-repeat center center;}\n\n#lhc_chatbox_close:hover,#lhc_chatbox_min:hover{opacity:0.4}\n#lhc_container_chatbox {overflow: hidden;transition-property: height;transition-duration: 0.4s;-webkit-transition: height 0.4s ease-in-out;transition: height 0.4s;background-color:#FFF\;\nz-index:9990;\n position: fixed;<?php echo $currentPosition['position_body']?>;-webkit-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-moz-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;-moz-user-select:none; -khtml-user-drag:element;cursor: move;cursor: -moz-grab;cursor: -webkit-grab; }\n#lhc_container_chatbox iframe{position:relative;display:block;transition-property: height;transition-duration: 0.4s;-webkit-transition: height 0.4s ease-in-out;transition: height 0.4s;}\n#lhc_container_chatbox iframe.lhc-loading{\nbackground: #FFF url(<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/general/loading.gif');?>) no-repeat center center; }\n#lhc_container_chatbox #lhc_iframe_container{border:<?php ($theme !== false && $theme->widget_border_width > 0) ? print $theme->widget_border_width : print '1' ?>px solid #<?php $theme !== false ? print $theme->widget_border_color : print 'cccccc' ?>;border-top: 0;border-bottom-left-radius: 5px;border-bottom-right-radius: 5px;overflow: hidden;}\n@media only screen and (max-width : 640px) {#lhc_container_chatbox{margin-bottom:5px;position:relative;right:0 !important;bottom:0 !important;top:0 !important}#lhc_container_chatbox iframe{width:100% !important}}";
 
           if (!this.cssWasAdded) {
           		this.cssWasAdded = true;
@@ -293,7 +293,7 @@ var lhc_Chatbox = {
    showStatusWidget : function() {
    		<?php if ($show_content === false) : ?>
        var statusTEXT = '<a id="chatbox-icon" class="status-icon" href="#" >'+<?php echo $chatboxOptionsVariable;?>.status_text+'</a>';
-       var raw_css = "#lhc_chatbox_container * {direction:<?php (erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == 'ltr' || erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == '') ? print 'ltr;text-align:left;' : print 'rtl;text-align:right;'; ?>;font-family:arial;font-size:12px;line-height:100%;box-sizing: content-box;zoom:1;margin:0;padding:0}\n#lhc_chatbox_container .status-icon{text-decoration:none;font-size:12px;font-weight:bold;color:#<?php $theme !== false ? print $theme->text_color : print '000' ?>;display:block;padding:<?php echo $currentPosition['padding_text']?>;background:url('<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/icons/emotion_amazing.png');?>') no-repeat <?php echo $currentPosition['background_position']?> center}\n#lhc_chatbox_container:hover{<?php echo $currentPosition['widget_hover']?>}\n#lhc_chatbox_container{box-sizing: content-box;<?php echo $currentPosition['widget_radius']?>-webkit-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-moz-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);<?php echo $currentPosition['border_widget']?>;padding:5px 0px 3px 5px;width:190px;font-family:arial;font-size:12px;line-height:100%;transition: 1s;position:fixed;<?php echo $currentPosition['position']?>;background-color:#<?php $theme !== false ? print $theme->onl_bcolor : print 'f6f6f6' ?>;z-index:9989;}\n<?php if ($noresponse == false) : ?>@media only screen and (max-width : 640px) {#lhc_chatbox_container{position:relative;top:0;right:0;bottom:0;left:0;width:auto;border-radius:2px;box-shadow:none;border:1px solid #e3e3e3;margin-bottom:5px;}}\n<?php endif;?>";
+       var raw_css = "#lhc_chatbox_container * {direction:<?php (erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == 'ltr' || erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == '') ? print 'ltr;text-align:left;' : print 'rtl;text-align:right;'; ?>;font-family:arial;font-size:12px;line-height:100%;box-sizing: content-box;zoom:1;margin:0;padding:0}\n#lhc_chatbox_container .status-icon{text-decoration:none;font-size:12px;font-weight:bold;color:#<?php $theme !== false ? print $theme->text_color : print '000' ?>;display:block;padding:<?php echo $currentPosition['padding_text']?>;background:url('<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/icons/emotion_amazing.png');?>') no-repeat <?php echo $currentPosition['background_position']?> center}\n#lhc_chatbox_container:hover{<?php echo $currentPosition['widget_hover']?>}\n#lhc_chatbox_container{box-sizing: content-box;<?php echo $currentPosition['widget_radius']?>-webkit-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-moz-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);<?php echo $currentPosition['border_widget']?>;padding:5px 0px 3px 5px;width:190px;font-family:arial;font-size:12px;line-height:100%;transition: 1s;position:fixed;<?php echo $currentPosition['position']?>;background-color:#<?php $theme !== false ? print $theme->onl_bcolor : print 'f6f6f6' ?>;z-index:9989;}\n<?php if ($noresponse == false) : ?>@media only screen and (max-width : 640px) {#lhc_chatbox_container{position:relative;top:0;right:0;bottom:0;left:0;width:auto;border-radius:2px;box-shadow:none;border:1px solid #e3e3e3;margin-bottom:5px;}}\n<?php endif;?>";
        this.addCss(raw_css<?php ($theme !== false && $theme->custom_status_css !== '') ? print '+\''.str_replace(array("\n","\r"), '', $theme->custom_status_css).'\'' : '' ?>);
        var htmlStatus = '<div id="lhc_chatbox_container">'+statusTEXT+'</div>';
        var fragment = this.appendHTML(htmlStatus);

programming_language: PHP
filename: htmlcode.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -126,7 +126,7 @@ function generateEmbedCode(){
     var script = '<script type="text/javascript">'+"\nvar <?php echo $chatboxOptionsVariable?> = {hashchatbox:'empty',identifier:'default',status_text:'"+textStatus+"'};\n"+
       '(function() {'+"\n"+
         'var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;'+"\n"+
-        'po.src = \''+$('#HttpMode').val()+'//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect()?>'+siteAccess+'chatbox/getstatus'+id_position+top+id_disable_responsive+topposition+widthwidget+id_theme+heightwidget+chat_height+show_content+show_min+dis_min+"';\n"+
+        'po.src = \''+$('#HttpMode').val()+'//<?php echo str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost())?><?php echo erLhcoreClassDesign::baseurldirect()?>'+siteAccess+'chatbox/getstatus'+id_position+top+id_disable_responsive+topposition+widthwidget+id_theme+heightwidget+chat_height+show_content+show_min+dis_min+"';\n"+
         'var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);'+"\n"+
       '})();'+"\n"+
     '</scr'+'ipt>';

programming_language: PHP
filename: operatorinit.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -1 +1 @@
-var lhcbrowserOpeator = new LHCCoBrowserOperator(window,document,{'mode':'chat','lhcbase':'<?php echo (erLhcoreClassSystem::$httpsMode == true ? 'https://' : 'http://').$_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('cobrowse/proxycss')?>','httpsmode':<?php echo erLhcoreClassSystem::$httpsMode == true ? 'true' : 'false'?>,'disableiframe':<?php echo erLhcoreClassModelChatConfig::fetch('disable_iframe_sharing')->current_value == 1 ? 'true' : 'false'?>,'disablejs':<?php echo erLhcoreClassModelChatConfig::fetch('disable_js_execution')->current_value == 1 ? 'true' : 'false'?>,options:{opcontrol:$('#status-icon-control'),opscroll:$('#sync-user-scroll'),opmouse:$('#show-operator-mouse'),scroll:$('#scroll-user-window')},'cpos':{w:<?php echo $browse->w?>,wh:<?php echo $browse->wh?>},'cursor':'<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/icons/cursor.png')?>','nodejssettings':{'nodejssocket':<?php echo json_encode(erLhcoreClassModelChatConfig::fetch('sharing_nodejs_sllocation')->current_value)?>,'nodejshost':<?php echo json_encode(erLhcoreClassModelChatConfig::fetch('sharing_nodejs_socket_host')->current_value != '' ? erLhcoreClassModelChatConfig::fetch('sharing_nodejs_socket_host')->current_value : $_SERVER['HTTP_HOST'])?>,'path':'<?php echo erLhcoreClassModelChatConfig::fetch('sharing_nodejs_path')->current_value?>','secure':<?php if ((int)erLhcoreClassModelChatConfig::fetch('sharing_nodejs_secure')->current_value == 1) : ?>true<?php else : ?>false<?php endif;?>},'nodejsenabled':<?php echo (int)erLhcoreClassModelChatConfig::fetch('sharing_nodejs_enabled')->current_value?>,'chat_hash':'<?php echo $browse->chat->hash?>','chat_id':<?php echo $browse->chat_id?>, 'base':<?php echo json_encode($browse->url)?>, 'initialize' : <?php echo $browse->initialize != '' ? $browse->initialize : 'null'?>});
\ No newline at end of file
+var lhcbrowserOpeator = new LHCCoBrowserOperator(window,document,{'mode':'chat','lhcbase':'<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('cobrowse/proxycss')?>','httpsmode':<?php echo erLhcoreClassSystem::$httpsMode == true ? 'true' : 'false'?>,'disableiframe':<?php echo erLhcoreClassModelChatConfig::fetch('disable_iframe_sharing')->current_value == 1 ? 'true' : 'false'?>,'disablejs':<?php echo erLhcoreClassModelChatConfig::fetch('disable_js_execution')->current_value == 1 ? 'true' : 'false'?>,options:{opcontrol:$('#status-icon-control'),opscroll:$('#sync-user-scroll'),opmouse:$('#show-operator-mouse'),scroll:$('#scroll-user-window')},'cpos':{w:<?php echo $browse->w?>,wh:<?php echo $browse->wh?>},'cursor':'<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/icons/cursor.png')?>','nodejssettings':{'nodejssocket':<?php echo json_encode(erLhcoreClassModelChatConfig::fetch('sharing_nodejs_sllocation')->current_value)?>,'nodejshost':<?php echo json_encode(erLhcoreClassModelChatConfig::fetch('sharing_nodejs_socket_host')->current_value != '' ? erLhcoreClassModelChatConfig::fetch('sharing_nodejs_socket_host')->current_value : str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost()))?>,'path':'<?php echo erLhcoreClassModelChatConfig::fetch('sharing_nodejs_path')->current_value?>','secure':<?php if ((int)erLhcoreClassModelChatConfig::fetch('sharing_nodejs_secure')->current_value == 1) : ?>true<?php else : ?>false<?php endif;?>},'nodejsenabled':<?php echo (int)erLhcoreClassModelChatConfig::fetch('sharing_nodejs_enabled')->current_value?>,'chat_hash':'<?php echo $browse->chat->hash?>','chat_id':<?php echo $browse->chat_id?>, 'base':<?php echo json_encode($browse->url)?>, 'initialize' : <?php echo $browse->initialize != '' ? $browse->initialize : 'null'?>});
\ No newline at end of file

programming_language: PHP
filename: operatorinit_onlineuser.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -1 +1 @@
-var lhcbrowserOpeator = new LHCCoBrowserOperator(window,document,{'mode':'onlineuser','lhcbase':'<?php echo (erLhcoreClassSystem::$httpsMode == true ? 'https://' : 'http://').$_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('cobrowse/proxycss')?>','httpsmode':<?php echo erLhcoreClassSystem::$httpsMode == true ? 'true' : 'false'?>,'disableiframe':<?php echo erLhcoreClassModelChatConfig::fetch('disable_iframe_sharing')->current_value == 1 ? 'true' : 'false'?>,'disablejs':<?php echo erLhcoreClassModelChatConfig::fetch('disable_js_execution')->current_value == 1 ? 'true' : 'false'?>,options:{opcontrol:$('#status-icon-control'),opscroll:$('#sync-user-scroll'),opmouse:$('#show-operator-mouse'),scroll:$('#scroll-user-window')},'cpos':{w:<?php echo $browse->w?>,wh:<?php echo $browse->wh?>},'cursor':'<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/icons/cursor.png')?>','nodejssettings':{'nodejssocket':<?php echo json_encode(erLhcoreClassModelChatConfig::fetch('sharing_nodejs_sllocation')->current_value)?>,'nodejshost':<?php echo json_encode(erLhcoreClassModelChatConfig::fetch('sharing_nodejs_socket_host')->current_value)?>,'path':'<?php echo erLhcoreClassModelChatConfig::fetch('sharing_nodejs_path')->current_value?>','secure':<?php if ((int)erLhcoreClassModelChatConfig::fetch('sharing_nodejs_secure')->current_value == 1) : ?>true<?php else : ?>false<?php endif;?>},'nodejsenabled':<?php echo (int)erLhcoreClassModelChatConfig::fetch('sharing_nodejs_enabled')->current_value?>,'online_user_hash':'<?php echo $browse->online_user->vid?>','online_user_id':<?php echo $browse->online_user_id?>, 'base':<?php echo json_encode($browse->url)?>, 'initialize' : <?php echo $browse->initialize != '' ? $browse->initialize : 'null'?>});
\ No newline at end of file
+var lhcbrowserOpeator = new LHCCoBrowserOperator(window,document,{'mode':'onlineuser','lhcbase':'<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('cobrowse/proxycss')?>','httpsmode':<?php echo erLhcoreClassSystem::$httpsMode == true ? 'true' : 'false'?>,'disableiframe':<?php echo erLhcoreClassModelChatConfig::fetch('disable_iframe_sharing')->current_value == 1 ? 'true' : 'false'?>,'disablejs':<?php echo erLhcoreClassModelChatConfig::fetch('disable_js_execution')->current_value == 1 ? 'true' : 'false'?>,options:{opcontrol:$('#status-icon-control'),opscroll:$('#sync-user-scroll'),opmouse:$('#show-operator-mouse'),scroll:$('#scroll-user-window')},'cpos':{w:<?php echo $browse->w?>,wh:<?php echo $browse->wh?>},'cursor':'<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/icons/cursor.png')?>','nodejssettings':{'nodejssocket':<?php echo json_encode(erLhcoreClassModelChatConfig::fetch('sharing_nodejs_sllocation')->current_value)?>,'nodejshost':<?php echo json_encode(erLhcoreClassModelChatConfig::fetch('sharing_nodejs_socket_host')->current_value)?>,'path':'<?php echo erLhcoreClassModelChatConfig::fetch('sharing_nodejs_path')->current_value?>','secure':<?php if ((int)erLhcoreClassModelChatConfig::fetch('sharing_nodejs_secure')->current_value == 1) : ?>true<?php else : ?>false<?php endif;?>},'nodejsenabled':<?php echo (int)erLhcoreClassModelChatConfig::fetch('sharing_nodejs_enabled')->current_value?>,'online_user_hash':'<?php echo $browse->online_user->vid?>','online_user_id':<?php echo $browse->online_user_id?>, 'base':<?php echo json_encode($browse->url)?>, 'initialize' : <?php echo $browse->initialize != '' ? $browse->initialize : 'null'?>});
\ No newline at end of file

programming_language: PHP
filename: userinit.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -1,3 +1,3 @@
 if(typeof formsEnabled == "undefined") var formsEnabled = false;
-this.cobrowser = new LHCCoBrowser({'formsenabled':formsEnabled,'chat_hash':this.sharehash,'nodejssettings':{'nodejssocket':<?php echo json_encode(erLhcoreClassModelChatConfig::fetch('sharing_nodejs_sllocation')->current_value)?>,'nodejshost':<?php echo json_encode(erLhcoreClassModelChatConfig::fetch('sharing_nodejs_socket_host')->current_value != '' ? erLhcoreClassModelChatConfig::fetch('sharing_nodejs_socket_host')->current_value : $_SERVER['HTTP_HOST'])?>,'path':'<?php echo erLhcoreClassModelChatConfig::fetch('sharing_nodejs_path')->current_value?>','secure':<?php if ((int)erLhcoreClassModelChatConfig::fetch('sharing_nodejs_secure')->current_value == 1) : ?>true<?php else : ?>false<?php endif;?>},'nodejsenabled':<?php echo (int)erLhcoreClassModelChatConfig::fetch('sharing_nodejs_enabled')->current_value?>,'trans':{'operator_watching':<?php echo json_encode(htmlspecialchars_decode(erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Screen shared, click to finish'),ENT_QUOTES))?>},'url':'<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurlsite()?>'+lh_inst.lang+'/cobrowse/storenodemap/(sharemode)/'+inst.sharemode+inst.getAppendCookieArguments()+'/?url='+encodeURIComponent(location.href.match(/^(.*\/)[^\/]*$/)[1])});
+this.cobrowser = new LHCCoBrowser({'formsenabled':formsEnabled,'chat_hash':this.sharehash,'nodejssettings':{'nodejssocket':<?php echo json_encode(erLhcoreClassModelChatConfig::fetch('sharing_nodejs_sllocation')->current_value)?>,'nodejshost':<?php echo json_encode(erLhcoreClassModelChatConfig::fetch('sharing_nodejs_socket_host')->current_value != '' ? erLhcoreClassModelChatConfig::fetch('sharing_nodejs_socket_host')->current_value : str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost()))?>,'path':'<?php echo erLhcoreClassModelChatConfig::fetch('sharing_nodejs_path')->current_value?>','secure':<?php if ((int)erLhcoreClassModelChatConfig::fetch('sharing_nodejs_secure')->current_value == 1) : ?>true<?php else : ?>false<?php endif;?>},'nodejsenabled':<?php echo (int)erLhcoreClassModelChatConfig::fetch('sharing_nodejs_enabled')->current_value?>,'trans':{'operator_watching':<?php echo json_encode(htmlspecialchars_decode(erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Screen shared, click to finish'),ENT_QUOTES))?>},'url':'<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurlsite()?>'+lh_inst.lang+'/cobrowse/storenodemap/(sharemode)/'+inst.sharemode+inst.getAppendCookieArguments()+'/?url='+encodeURIComponent(location.href.match(/^(.*\/)[^\/]*$/)[1])});
 this.cobrowser.startMirroring();
\ No newline at end of file

programming_language: PHP
filename: xml.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -2,7 +2,7 @@
 <?php echo '<?xml version="1.0" encoding="utf-8"?>';?>
 <chat>
 <id><![CDATA[ <?php echo $chat->id?> ]]></id>
-<url><![CDATA[http://<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('chat/single')?>/<?php echo $chat->id?>]]></url>
+<url><![CDATA[<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('chat/single')?>/<?php echo $chat->id?>]]></url>
 <requested_by><![CDATA[ <?php echo htmlspecialchars($chat->email)?> ]]></requested_by>
 <created_at type="datetime"><?php echo date('c',$chat->time)?></created_at>
 <page_url><![CDATA[ <?php echo htmlspecialchars($chat->referrer)?> ]]></page_url>

programming_language: PHP
filename: embed.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -3,7 +3,7 @@ var lhc_FAQEmbed = function() {
 	var self = this;
 	this.showVotingForm = function() {
 		  var locationCurrent = encodeURIComponent(window.location.href.substring(window.location.protocol.length));
-   		  this.initial_iframe_url = "<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('faq/faqwidget')?>/(mode)/embed<?php $theme !== false ? print '/(theme)/'.$theme : ''?>"+'?URLReferer='+locationCurrent+'&URLModule='+encodeURIComponent(<?php echo $faqOptionsVariable;?>.url)+'&identifier='+encodeURIComponent(<?php echo $faqOptionsVariable;?>.identifier);
+   		  this.initial_iframe_url = "<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('faq/faqwidget')?>/(mode)/embed<?php $theme !== false ? print '/(theme)/'.$theme : ''?>"+'?URLReferer='+locationCurrent+'&URLModule='+encodeURIComponent(<?php echo $faqOptionsVariable;?>.url)+'&identifier='+encodeURIComponent(<?php echo $faqOptionsVariable;?>.identifier);
    		  this.iframe_html = '<iframe id="lhcfaq_iframe_embed" allowTransparency="true" scrolling="no" class="loading" frameborder="0" ' +
                        ( this.initial_iframe_url != '' ? ' src="'    + this.initial_iframe_url + '"' : '' ) +
                        ' width="100%"' +

programming_language: PHP
filename: embedcode.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -49,7 +49,7 @@ function generateEmbedCode(){
     var script = '<script type="text/javascript">'+"\nvar <?php echo $faqOptionsVariable;?> = {url:'replace_me_with_dynamic_url',identifier:''};\n"+
       '(function() {'+"\n"+
         'var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;'+"\n"+
-        'po.src = \''+$('#HttpMode').val()+'//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect()?>'+siteAccess+'faq/embed'+id_theme+"';\n"+
+        'po.src = \''+$('#HttpMode').val()+'//<?php echo str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost())?><?php echo erLhcoreClassDesign::baseurldirect()?>'+siteAccess+'faq/embed'+id_theme+"';\n"+
         'var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);'+"\n"+
       '})();'+"\n"+
     '</scr'+'ipt>';

programming_language: PHP
filename: getstatus.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -144,7 +144,7 @@ var lhc_FAQ = {
    		  this.removeById('lhc_container_faq');
 
    		  var locationCurrent = encodeURIComponent(window.location.href.substring(window.location.protocol.length));
-   		  this.initial_iframe_url = "<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('faq/faqwidget')?><?php $theme !== false ? print '/(theme)/'.$theme->id : ''?>"+'?URLReferer='+locationCurrent+'&URLModule='+encodeURIComponent(<?php echo $faqOptionsVariable;?>.url)+'&identifier='+encodeURIComponent(<?php echo $faqOptionsVariable;?>.identifier);
+   		  this.initial_iframe_url = "<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('faq/faqwidget')?><?php $theme !== false ? print '/(theme)/'.$theme->id : ''?>"+'?URLReferer='+locationCurrent+'&URLModule='+encodeURIComponent(<?php echo $faqOptionsVariable;?>.url)+'&identifier='+encodeURIComponent(<?php echo $faqOptionsVariable;?>.identifier);
 
    		  if (window.innerWidth < 1024) {
           		window.open(this.initial_iframe_url,"_blank");
@@ -158,10 +158,10 @@ var lhc_FAQ = {
                        ' style="width: 490px; height: 350px;"></iframe>';
 
           this.iframe_html = '<div id="lhc_container_faq">' +
-                              '<div id="lhc_faq_header"><?php include(erLhcoreClassDesign::designtpl('lhchat/widget_brand/faq.tpl.php')); ?><a href="#" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" id="lhc_faq_close"><img src="<?php if ($theme !== false && $theme->close_image_url != '') : ?><?php echo $theme->close_image_url;?><?php else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/icons/cancel.png');?><?php endif;?>" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" alt="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" /></a></div><div id="lhc_iframe_container">' +
+                              '<div id="lhc_faq_header"><?php include(erLhcoreClassDesign::designtpl('lhchat/widget_brand/faq.tpl.php')); ?><a href="#" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" id="lhc_faq_close"><img src="<?php if ($theme !== false && $theme->close_image_url != '') : ?><?php echo $theme->close_image_url;?><?php else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/icons/cancel.png');?><?php endif;?>" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" alt="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" /></a></div><div id="lhc_iframe_container">' +
                               this.iframe_html + '</div></div>';
 
-          raw_css = "#lhc_container_faq * {direction:<?php (erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == 'ltr' || erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == '') ? print 'ltr;text-align:left;' : print 'rtl;text-align:right;'; ?>;font-family:arial\;line-height:100%\;font-size:12px\;box-sizing: content-box\;-moz-box-sizing:content-box;padding:0;margin:0;}\n#lhc_container_faq img {border:0;}\n#lhc_faq_title{float:left;}\n#lhc_faq_header{position:relative;z-index:9990;height:<?php ($theme !== false && $theme->header_height > 0) ? print $theme->header_height : print '15' ?>px;overflow:hidden;background-color:#<?php $theme !== false ? print $theme->header_background : print '525252' ?>;text-align:right;clear:both;padding:<?php ($theme !== false && $theme->header_padding > 0) ? print $theme->header_padding : print '5' ?>px;}\n#lhc_faq_close{padding:2px;float:right;}\n#lhc_faq_close:hover{opacity:0.4;}\n#lhc_container_faq {-moz-user-select:none; -khtml-user-drag:element;cursor: move;cursor: -moz-grab;cursor: -webkit-grab; overflow: hidden;transition-property: height;transition-duration: 0.4s;-webkit-transition: height 0.4s ease-in-out;transition: height 0.4s;background-color:#FFF\;width:490px;\nz-index:9990;\n position: fixed;<?php echo $currentPosition['position_body']?>;-webkit-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-moz-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px; }\n#lhc_container_faq iframe{position:relative;display:block;transition-property: height;transition-duration: 0.4s;-webkit-transition: height 0.4s ease-in-out;transition: height 0.4s;}\n#lhc_container_faq iframe.lhc-loading{\nbackground: #FFF url(<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/general/loading.gif');?>) no-repeat center center; }\n#lhc_container_faq #lhc_iframe_container{border:<?php ($theme !== false && $theme->widget_border_width > 0) ? print $theme->widget_border_width : print '1' ?>px solid #<?php $theme !== false ? print $theme->widget_border_color : print 'cccccc' ?>;border-top: 0;border-bottom-left-radius: 5px;border-bottom-right-radius: 5px;overflow: hidden;}\n@media only screen and (max-width : 640px) {#lhc_container_faq{margin-bottom:5px;position:relative;right:0;bottom:0;top:0;width:100%;}#lhc_container_faq iframe{width:100% !important}}";
+          raw_css = "#lhc_container_faq * {direction:<?php (erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == 'ltr' || erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == '') ? print 'ltr;text-align:left;' : print 'rtl;text-align:right;'; ?>;font-family:arial\;line-height:100%\;font-size:12px\;box-sizing: content-box\;-moz-box-sizing:content-box;padding:0;margin:0;}\n#lhc_container_faq img {border:0;}\n#lhc_faq_title{float:left;}\n#lhc_faq_header{position:relative;z-index:9990;height:<?php ($theme !== false && $theme->header_height > 0) ? print $theme->header_height : print '15' ?>px;overflow:hidden;background-color:#<?php $theme !== false ? print $theme->header_background : print '525252' ?>;text-align:right;clear:both;padding:<?php ($theme !== false && $theme->header_padding > 0) ? print $theme->header_padding : print '5' ?>px;}\n#lhc_faq_close{padding:2px;float:right;}\n#lhc_faq_close:hover{opacity:0.4;}\n#lhc_container_faq {-moz-user-select:none; -khtml-user-drag:element;cursor: move;cursor: -moz-grab;cursor: -webkit-grab; overflow: hidden;transition-property: height;transition-duration: 0.4s;-webkit-transition: height 0.4s ease-in-out;transition: height 0.4s;background-color:#FFF\;width:490px;\nz-index:9990;\n position: fixed;<?php echo $currentPosition['position_body']?>;-webkit-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-moz-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px; }\n#lhc_container_faq iframe{position:relative;display:block;transition-property: height;transition-duration: 0.4s;-webkit-transition: height 0.4s ease-in-out;transition: height 0.4s;}\n#lhc_container_faq iframe.lhc-loading{\nbackground: #FFF url(<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/general/loading.gif');?>) no-repeat center center; }\n#lhc_container_faq #lhc_iframe_container{border:<?php ($theme !== false && $theme->widget_border_width > 0) ? print $theme->widget_border_width : print '1' ?>px solid #<?php $theme !== false ? print $theme->widget_border_color : print 'cccccc' ?>;border-top: 0;border-bottom-left-radius: 5px;border-bottom-right-radius: 5px;overflow: hidden;}\n@media only screen and (max-width : 640px) {#lhc_container_faq{margin-bottom:5px;position:relative;right:0;bottom:0;top:0;width:100%;}#lhc_container_faq iframe{width:100% !important}}";
 
           if (!this.cssWasAdded) {
           		this.cssWasAdded = true;
@@ -184,7 +184,7 @@ var lhc_FAQ = {
 
     showStatusWidget : function() {
        var statusTEXT = '<a id="faq-icon" class="status-icon" href="#" >'+<?php echo $faqOptionsVariable;?>.status_text+'</a>';
-       var raw_css = "#lhc_faq_container * {direction:<?php (erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == 'ltr' || erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == '') ? print 'ltr;text-align:left;' : print 'rtl;text-align:right;'; ?>;font-family:arial;line-height:100%;font-size:12px;box-sizing: content-box;zoom:1;margin:0;padding:0;}\n#lhc_faq_container .status-icon{text-decoration:none;font-size:12px;font-weight:bold;color:#<?php $theme !== false ? print $theme->text_color : print '000' ?>;display:block;padding:<?php echo $currentPosition['padding_text']?>;background:url('<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/icons/help.png');?>') no-repeat <?php echo $currentPosition['background_position']?> center}\n#lhc_faq_container:hover{<?php echo $currentPosition['widget_hover']?>}\n#lhc_faq_container{box-sizing: content-box;<?php echo $currentPosition['widget_radius']?>-webkit-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-moz-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);<?php echo $currentPosition['border_widget']?>;padding:5px 0px 3px 5px;width:190px;font-family:arial;font-size:12px;transition: 1s;position:fixed;<?php echo $currentPosition['position']?>;background-color:#<?php $theme !== false ? print $theme->onl_bcolor : print 'f6f6f6' ?>;z-index:9989;}\n<?php if ($noresponse == false) : ?>@media only screen and (max-width : 640px) {#lhc_faq_container{position:relative;top:0;right:0;bottom:0;left:0;width:auto;border-radius:2px;box-shadow:none;border:1px solid #e3e3e3;margin-bottom:5px;}}\n<?php endif;?>";
+       var raw_css = "#lhc_faq_container * {direction:<?php (erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == 'ltr' || erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == '') ? print 'ltr;text-align:left;' : print 'rtl;text-align:right;'; ?>;font-family:arial;line-height:100%;font-size:12px;box-sizing: content-box;zoom:1;margin:0;padding:0;}\n#lhc_faq_container .status-icon{text-decoration:none;font-size:12px;font-weight:bold;color:#<?php $theme !== false ? print $theme->text_color : print '000' ?>;display:block;padding:<?php echo $currentPosition['padding_text']?>;background:url('<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/icons/help.png');?>') no-repeat <?php echo $currentPosition['background_position']?> center}\n#lhc_faq_container:hover{<?php echo $currentPosition['widget_hover']?>}\n#lhc_faq_container{box-sizing: content-box;<?php echo $currentPosition['widget_radius']?>-webkit-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-moz-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);<?php echo $currentPosition['border_widget']?>;padding:5px 0px 3px 5px;width:190px;font-family:arial;font-size:12px;transition: 1s;position:fixed;<?php echo $currentPosition['position']?>;background-color:#<?php $theme !== false ? print $theme->onl_bcolor : print 'f6f6f6' ?>;z-index:9989;}\n<?php if ($noresponse == false) : ?>@media only screen and (max-width : 640px) {#lhc_faq_container{position:relative;top:0;right:0;bottom:0;left:0;width:auto;border-radius:2px;box-shadow:none;border:1px solid #e3e3e3;margin-bottom:5px;}}\n<?php endif;?>";
        this.addCss(raw_css<?php ($theme !== false && $theme->custom_status_css_front !== '') ? print '+\''.str_replace(array("\n","\r"), '', $theme->custom_status_css_front).'\'' : '' ?>);
        var htmlStatus = '<div id="lhc_faq_container">'+statusTEXT+'</div>';
        var fragment = this.appendHTML(htmlStatus);

programming_language: PHP
filename: htmlcode.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -88,7 +88,7 @@ function generateEmbedCode(){
     var script = '<script type="text/javascript">'+"\nvar <?php echo $faqOptionsVariable;?> = {status_text:'"+textStatus+"',url:'replace_me_with_dynamic_url',identifier:''};\n"+
       '(function() {'+"\n"+
         'var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;'+"\n"+
-        'po.src = \''+$('#HttpMode').val()+'//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect()?>'+siteAccess+'faq/getstatus'+id_position+top+topposition+id_theme+id_disable_responsive+"';\n"+
+        'po.src = \''+$('#HttpMode').val()+'//<?php echo str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost())?><?php echo erLhcoreClassDesign::baseurldirect()?>'+siteAccess+'faq/getstatus'+id_position+top+topposition+id_theme+id_disable_responsive+"';\n"+
         'var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);'+"\n"+
       '})();'+"\n"+
     '</scr'+'ipt>';

programming_language: PHP
filename: collected.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -6,7 +6,7 @@
 	
 	<div class="input-group">
         <div class="input-group-prepend"><span class="input-group-text"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('form/collected','URL');?></span></div>
-      <input type="text" class="form-control" value="<?php echo erLhcoreClassXMP::getBaseHost(). $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect('form/fill')?>/<?php echo $form->id?>">
+      <input type="text" class="form-control" value="<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurldirect('form/fill')?>/<?php echo $form->id?>">
     </div>
     
 	</div>

programming_language: PHP
filename: embed.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -3,7 +3,7 @@
 var lhc_FormEmbed = function() {
 	var self = this;
 	this.showVotingForm = function() {
-   		  this.initial_iframe_url = "<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('form/formwidget')?>/<?php echo $form_id,$identifier?>";
+   		  this.initial_iframe_url = "<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('form/formwidget')?>/<?php echo $form_id,$identifier?>";
    		  this.iframe_html = '<iframe id="lhcform_iframe_embed" allowTransparency="true" scrolling="no" class="loading" frameborder="0" ' +
                        ( this.initial_iframe_url != '' ? ' src="'    + this.initial_iframe_url + '"' : '' ) +
                        ' width="100%"' +

programming_language: JavaScript
filename: embedcode.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -54,7 +54,7 @@ function generateEmbedCode(){
     var script = '<script type="text/javascript">'+"\nvar <?php echo $formOptionsVariable?> = {};\n"+
       '(function() {'+"\n"+
         'var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;'+"\n"+
-        'po.src = \''+$('#HttpMode').val()+'//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect()?>'+siteAccess+'form/embed/'+formid+identifier+"';\n"+
+        'po.src = \''+$('#HttpMode').val()+'//<?php echo str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost())?><?php echo erLhcoreClassDesign::baseurldirect()?>'+siteAccess+'form/embed/'+formid+identifier+"';\n"+
         'var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);'+"\n"+
       '})();'+"\n"+
     '</scr'+'ipt>';

programming_language: PHP
filename: quick_replies.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -7,7 +7,7 @@
             <li class="list-inline-item">
                 <a rel="noreferrer" <?php if (isset($item['content']['button_id']) && $item['content']['button_id'] != '') : ?>id="<?php echo htmlspecialchars($item['content']['button_id'])?>"<?php endif;?> <?php if (isset($item['content']['payload_message']) && $item['content']['payload_message'] != '') : ?>data-payload=<?php echo json_encode($item['content']['payload_message'])?> data-id="<?php echo $messageId?>" onclick='lhinst.buttonClicked(<?php echo json_encode($item['content']['payload_message'])?>,<?php echo $messageId?>,$(this))'<?php endif;?> class="btn btn-sm btn-outline-primary btn-bot" target="_blank" href="<?php echo htmlspecialchars($item['content']['payload'])?>"><i class="material-icons"><?php if (isset($react) && $react == true) : ?>&#xf106;<?php else : ?>open_in_new<?php endif; ?></i><?php echo htmlspecialchars($item['content']['name'])?></a>
             </li>
-            <?php elseif ($item['type'] == 'file') : $fileReply = erLhcoreClassModelChatFile::fetch($item['content']['payload']); if ($fileReply instanceof erLhcoreClassModelChatFile) : $fileLink = '//'. $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurldirect('file/downloadfile') . "/{$fileReply->id}/{$fileReply->security_hash}"; ?>
+            <?php elseif ($item['type'] == 'file') : $fileReply = erLhcoreClassModelChatFile::fetch($item['content']['payload']); if ($fileReply instanceof erLhcoreClassModelChatFile) : $fileLink = erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurldirect('file/downloadfile') . "/{$fileReply->id}/{$fileReply->security_hash}"; ?>
             <li class="list-inline-item">
                 <a rel="noreferrer" <?php if (isset($item['content']['button_id']) && $item['content']['button_id'] != '') : ?>id="<?php echo htmlspecialchars($item['content']['button_id'])?>"<?php endif;?> <?php if (isset($item['content']['payload_message']) && $item['content']['payload_message'] != '') : ?>data-payload=<?php echo json_encode($item['content']['payload_message'])?> data-id="<?php echo $messageId?>" onclick='lhinst.buttonClicked(<?php echo json_encode($item['content']['payload_message'])?>,<?php echo $messageId?>,$(this))'<?php endif;?> class="btn btn-sm btn-outline-primary btn-bot" target="_blank" href="<?php echo $fileLink?>"><i class="material-icons"><?php if (isset($react) && $react == true) : ?>&#xf10e;<?php else : ?>attach_file<?php endif; ?></i><?php echo htmlspecialchars($item['content']['name'])?></a>
             </li>

programming_language: PHP
filename: settings.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -44,18 +44,18 @@
 
     <div class="form-group">
         <label><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('notifications/notifications','HTTP Host*')?></label>
-        <input type="text" class="form-control" name="http_host" value="<?php (isset($n_settings['http_host']) && !empty($n_settings['http_host'])) ? print htmlspecialchars($n_settings['http_host']) : print $_SERVER['HTTP_HOST']?>">
+        <input type="text" class="form-control" name="http_host" value="<?php (isset($n_settings['http_host']) && !empty($n_settings['http_host'])) ? print htmlspecialchars($n_settings['http_host']) : print str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost())?>">
         <small><i>You must provide host for notifications images.</i></small>
     </div>
 
     <div class="form-group">
         <label><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('notifications/notifications','Default Icon')?></label>
-        <input type="text" class="form-control" name="icon" value="<?php if (isset($n_settings['icon'])) : ?><?php print htmlspecialchars($n_settings['icon']); else : ?>https://<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/general/logo.png');?><?php endif;?>">
+        <input type="text" class="form-control" name="icon" value="<?php if (isset($n_settings['icon'])) : ?><?php print htmlspecialchars($n_settings['icon']); else : ?>https://<?php echo str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost())?><?php echo erLhcoreClassDesign::design('images/general/logo.png');?><?php endif;?>">
     </div>
 
     <div class="form-group">
         <label><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('notifications/notifications','Badge Icon')?></label>
-        <input type="text" class="form-control" name="badge" value="<?php if (isset($n_settings['badge'])) : ?><?php print htmlspecialchars($n_settings['badge']); else : ?>https://<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/general/logo.png');?><?php endif;?>">
+        <input type="text" class="form-control" name="badge" value="<?php if (isset($n_settings['badge'])) : ?><?php print htmlspecialchars($n_settings['badge']); else : ?>https://<?php echo str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost())?><?php echo erLhcoreClassDesign::design('images/general/logo.png');?><?php endif;?>">
         <p><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('notifications/notifications','Notification badges are only being used on mobile, at least at the time of writing. It is used to replace the browser icon that is shown by default.')?></p>
     </div>
 

programming_language: PHP
filename: embed.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -3,7 +3,7 @@ var lhc_QuestionaryPage = function() {
 
 	this.showVotingForm = function() {
 		  var locationCurrent = encodeURIComponent(window.location.href.substring(window.location.protocol.length));
-   		  this.initial_iframe_url = "<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('questionary/votingwidget')?>/(mode)/embed<?php $theme !== false ? print '/(theme)/'.$theme : ''?>"+'?URLReferer='+locationCurrent;
+   		  this.initial_iframe_url = "<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('questionary/votingwidget')?>/(mode)/embed<?php $theme !== false ? print '/(theme)/'.$theme : ''?>"+'?URLReferer='+locationCurrent;
 
    		  this.iframe_html = '<iframe id="lhc_sizing_questionary_page" allowTransparency="true" scrolling="no" frameborder="0" ' +
                        ( this.initial_iframe_url != '' ? ' src="'    + this.initial_iframe_url + '"' : '' ) +

programming_language: JavaScript
filename: embedcode.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -44,7 +44,7 @@ function generateEmbedCode(){
     var script = '<script type="text/javascript">'+"\n"+
       '(function() {'+"\n"+
         'var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;'+"\n"+
-        'po.src = \''+$('#HttpMode').val()+'//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect()?>'+siteAccess+'questionary/embed'+id_theme+'\';'+"\n"+
+        'po.src = \''+$('#HttpMode').val()+'//<?php echo str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost())?><?php echo erLhcoreClassDesign::baseurldirect()?>'+siteAccess+'questionary/embed'+id_theme+'\';'+"\n"+
         'var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);'+"\n"+
       '})();'+"\n"+
     '</scr'+'ipt>';

programming_language: PHP
filename: getstatus.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -114,7 +114,7 @@ var lhc_Questionary = {
         var th = document.getElementsByTagName('head')[0];
         var s = document.createElement('script');
         s.setAttribute('type','text/javascript');
-        s.setAttribute('src','<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('questionary/votingwidgetclosed')?>');
+        s.setAttribute('src','<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('questionary/votingwidgetclosed')?>');
         th.appendChild(s);
         this.removeById('lhc_container_questionary');
         this.addCookieAttribute('was_opened',true);
@@ -149,7 +149,7 @@ var lhc_Questionary = {
 
    		  this.removeById('lhc_container_questionary');
 	      var locationCurrent = encodeURIComponent(window.location.href.substring(window.location.protocol.length));
-   		  this.initial_iframe_url = "<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('questionary/votingwidget')?>"+'?URLReferer='+locationCurrent;
+   		  this.initial_iframe_url = "<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('questionary/votingwidget')?>"+'?URLReferer='+locationCurrent;
 		  
 		  if (window.innerWidth < 1024) {
           		window.open(this.initial_iframe_url,"_blank");
@@ -163,10 +163,10 @@ var lhc_Questionary = {
                        ' style="width: <?php echo $widthwidget?>px; height: <?php echo $heightwidget?>px;"></iframe>';
 
           this.iframe_html = '<div id="lhc_container_questionary">' +
-                              '<div id="lhc_questionary_header"><?php include(erLhcoreClassDesign::designtpl('lhchat/widget_brand/questionary.tpl.php')); ?><a href="#" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" id="lhc_questionary_close"><img src="<?php if ($theme !== false && $theme->close_image_url != '') : ?><?php echo $theme->close_image_url;?><?php else : ?><?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/icons/cancel.png');?><?php endif;?>" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" alt="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" /></a></div><div id="lhc_iframe_container">' +
+                              '<div id="lhc_questionary_header"><?php include(erLhcoreClassDesign::designtpl('lhchat/widget_brand/questionary.tpl.php')); ?><a href="#" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" id="lhc_questionary_close"><img src="<?php if ($theme !== false && $theme->close_image_url != '') : ?><?php echo $theme->close_image_url;?><?php else : ?><?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/icons/cancel.png');?><?php endif;?>" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" alt="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus','Close')?>" /></a></div><div id="lhc_iframe_container">' +
                               this.iframe_html + '</div></div>';
 
-          raw_css = "#lhc_container_questionary * {direction:<?php (erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == 'ltr' || erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == '') ? print 'ltr;text-align:left;' : print 'rtl;text-align:right;'; ?>;font-family:arial\;line-height:100%\;font-size:12px\;box-sizing: content-box\;-moz-box-sizing:content-box;padding:0;margin:0;}\n#lhc_container_questionary img {border:0;}\n#lhc_questionary_title{float:left;}\n#lhc_questionary_header{position:relative;z-index:9990;height:<?php ($theme !== false && $theme->header_height > 0) ? print $theme->header_height : print '15' ?>px;overflow:hidden;background-color:#<?php $theme !== false ? print $theme->header_background : print '525252' ?>;text-align:right;clear:both;padding:<?php ($theme !== false && $theme->header_padding > 0) ? print $theme->header_padding : print '5' ?>px;}\n#lhc_questionary_close{padding:2px;float:right;}\n#lhc_questionary_close:hover{opacity:0.4;}\n#lhc_container_questionary {overflow: hidden;transition-property: height;transition-duration: 0.4s;-webkit-transition: height 0.4s ease-in-out;transition: height 0.4s;background-color:#FFF;z-index:9990;position: fixed;<?php echo $currentPosition['position_body']?>;-webkit-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-moz-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;-moz-user-select:none; -khtml-user-drag:element;cursor: move;cursor: -moz-grab;cursor: -webkit-grab; }\n#lhc_container_questionary iframe{position:relative;display:block;transition-property: height;transition-duration: 0.4s;-webkit-transition: height 0.4s ease-in-out;transition: height 0.4s;}\n#lhc_container_questionary iframe.lhc-loading{\nbackground: #FFF url(<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/general/loading.gif');?>) no-repeat center center; }#lhc_container_questionary #lhc_iframe_container{border: <?php ($theme !== false && $theme->widget_border_width > 0) ? print $theme->widget_border_width : print '1' ?>px solid #<?php $theme !== false ? print $theme->widget_border_color : print 'cccccc' ?>;border-top: 0;border-bottom-left-radius: 5px;border-bottom-right-radius: 5px;overflow: hidden;}@media only screen and (max-width : 640px) {#lhc_container_questionary{margin-bottom:5px;position:relative;right:0;bottom:0;top:0;}#lhc_container_questionary iframe{width:100% !important}}";
+          raw_css = "#lhc_container_questionary * {direction:<?php (erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == 'ltr' || erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == '') ? print 'ltr;text-align:left;' : print 'rtl;text-align:right;'; ?>;font-family:arial\;line-height:100%\;font-size:12px\;box-sizing: content-box\;-moz-box-sizing:content-box;padding:0;margin:0;}\n#lhc_container_questionary img {border:0;}\n#lhc_questionary_title{float:left;}\n#lhc_questionary_header{position:relative;z-index:9990;height:<?php ($theme !== false && $theme->header_height > 0) ? print $theme->header_height : print '15' ?>px;overflow:hidden;background-color:#<?php $theme !== false ? print $theme->header_background : print '525252' ?>;text-align:right;clear:both;padding:<?php ($theme !== false && $theme->header_padding > 0) ? print $theme->header_padding : print '5' ?>px;}\n#lhc_questionary_close{padding:2px;float:right;}\n#lhc_questionary_close:hover{opacity:0.4;}\n#lhc_container_questionary {overflow: hidden;transition-property: height;transition-duration: 0.4s;-webkit-transition: height 0.4s ease-in-out;transition: height 0.4s;background-color:#FFF;z-index:9990;position: fixed;<?php echo $currentPosition['position_body']?>;-webkit-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-moz-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;-moz-user-select:none; -khtml-user-drag:element;cursor: move;cursor: -moz-grab;cursor: -webkit-grab; }\n#lhc_container_questionary iframe{position:relative;display:block;transition-property: height;transition-duration: 0.4s;-webkit-transition: height 0.4s ease-in-out;transition: height 0.4s;}\n#lhc_container_questionary iframe.lhc-loading{\nbackground: #FFF url(<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/general/loading.gif');?>) no-repeat center center; }#lhc_container_questionary #lhc_iframe_container{border: <?php ($theme !== false && $theme->widget_border_width > 0) ? print $theme->widget_border_width : print '1' ?>px solid #<?php $theme !== false ? print $theme->widget_border_color : print 'cccccc' ?>;border-top: 0;border-bottom-left-radius: 5px;border-bottom-right-radius: 5px;overflow: hidden;}@media only screen and (max-width : 640px) {#lhc_container_questionary{margin-bottom:5px;position:relative;right:0;bottom:0;top:0;}#lhc_container_questionary iframe{width:100% !important}}";
 
           if (!this.cssWasAdded) {
           		this.cssWasAdded = true;
@@ -187,7 +187,7 @@ var lhc_Questionary = {
 
     showStatusWidget : function() {
        var statusTEXT = '<a id="questionary-icon" class="status-icon" href="#" >'+<?php echo $questionaryOptionsVariable?>.status_text+'</a>';
-       var raw_css = "#lhc_questionary_container * {direction:<?php (erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == 'ltr' || erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == '') ? print 'ltr;text-align:left;' : print 'rtl;text-align:right;'; ?>;font-family:arial;line-height:100%;font-size:12px;box-sizing: content-box;zoom:1;margin:0;padding:0}\n#lhc_questionary_container .status-icon{text-decoration:none;font-size:12px;font-weight:bold;color:#<?php $theme !== false ? print $theme->text_color : print '000' ?>;display:block;padding:<?php echo $currentPosition['padding_text']?>;background:url('<?php echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value?>//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('images/icons/plant.png');?>') no-repeat <?php echo $currentPosition['background_position']?> center}\n#lhc_questionary_container:hover{<?php echo $currentPosition['widget_hover']?>}\n#lhc_questionary_container{box-sizing: content-box;<?php echo $currentPosition['widget_radius']?>-webkit-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-moz-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);<?php echo $currentPosition['border_widget']?>;padding:5px 0px 3px 5px;width:190px;font-family:arial;font-size:12px;transition: 1s;position:fixed;<?php echo $currentPosition['position']?>;background-color:#<?php $theme !== false ? print $theme->onl_bcolor : print 'f6f6f6' ?>;z-index:9989;}\n<?php if ($noresponse == false) : ?>@media only screen and (max-width : 640px) {#lhc_questionary_container{position:relative;top:0;right:0;bottom:0;left:0;width:auto;border-radius:2px;box-shadow:none;border:1px solid #e3e3e3;margin-bottom:5px;}}\n<?php endif;?>";
+       var raw_css = "#lhc_questionary_container * {direction:<?php (erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == 'ltr' || erConfigClassLhConfig::getInstance()->getOverrideValue('site', 'dir_language') == '') ? print 'ltr;text-align:left;' : print 'rtl;text-align:right;'; ?>;font-family:arial;line-height:100%;font-size:12px;box-sizing: content-box;zoom:1;margin:0;padding:0}\n#lhc_questionary_container .status-icon{text-decoration:none;font-size:12px;font-weight:bold;color:#<?php $theme !== false ? print $theme->text_color : print '000' ?>;display:block;padding:<?php echo $currentPosition['padding_text']?>;background:url('<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('images/icons/plant.png');?>') no-repeat <?php echo $currentPosition['background_position']?> center}\n#lhc_questionary_container:hover{<?php echo $currentPosition['widget_hover']?>}\n#lhc_questionary_container{box-sizing: content-box;<?php echo $currentPosition['widget_radius']?>-webkit-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);-moz-box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);box-shadow: <?php echo $currentPosition['shadow']?> rgba(50, 50, 50, 0.17);<?php echo $currentPosition['border_widget']?>;padding:5px 0px 3px 5px;width:190px;font-family:arial;font-size:12px;transition: 1s;position:fixed;<?php echo $currentPosition['position']?>;background-color:#<?php $theme !== false ? print $theme->onl_bcolor : print 'f6f6f6' ?>;z-index:9989;}\n<?php if ($noresponse == false) : ?>@media only screen and (max-width : 640px) {#lhc_questionary_container{position:relative;top:0;right:0;bottom:0;left:0;width:auto;border-radius:2px;box-shadow:none;border:1px solid #e3e3e3;margin-bottom:5px;}}\n<?php endif;?>";
        this.addCss(raw_css<?php ($theme !== false && $theme->custom_status_css !== '') ? print '+\''.str_replace(array("\n","\r"), '', $theme->custom_status_css).'\'' : '' ?>);
        var htmlStatus = '<div id="lhc_questionary_container">'+statusTEXT+'</div>';
        var fragment = this.appendHTML(htmlStatus);

programming_language: PHP
filename: htmlcode.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -115,7 +115,7 @@ function generateEmbedCode(){
     var script = '<script type="text/javascript">'+"\nvar <?php echo $questionaryOptionsVariable?> = {status_text:'"+textStatus+"'};\n"+
       '(function() {'+"\n"+
         'var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;'+"\n"+
-        'po.src = \''+$('#HttpMode').val()+'//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect()?>'+siteAccess+'questionary/getstatus'+id_position+id_disable_responsive+id_show_widget_on_open+top+topposition+widthwidget+id_theme+heightwidget+"';\n"+
+        'po.src = \''+$('#HttpMode').val()+'//<?php echo str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost())?><?php echo erLhcoreClassDesign::baseurldirect()?>'+siteAccess+'questionary/getstatus'+id_position+id_disable_responsive+id_show_widget_on_open+top+topposition+widthwidget+id_theme+heightwidget+"';\n"+
         'var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);'+"\n"+
       '})();'+"\n"+
     '</scr'+'ipt>';

programming_language: PHP
filename: embedcode.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -76,7 +76,7 @@
 
 
 <p class="explain"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/htmlcode','Copy the code from the text area to the page where you want your status to appear');?></p>
-<textarea style="width: 100%; height: 180px; font-size: 12px;" id="HMLTContent"><?php echo htmlspecialchars('<script type="text/javascript" src="//'.$_SERVER['HTTP_HOST'].erLhcoreClassDesign::baseurl('chat/getstatus').'"></script>')?></textarea>
+<textarea style="width: 100%; height: 180px; font-size: 12px;" id="HMLTContent"><?php echo htmlspecialchars('<script type="text/javascript" src="' . erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurl('chat/getstatus').'"></script>')?></textarea>
 
 <script type="text/javascript">
 var default_site_access = '<?php echo erConfigClassLhConfig::getInstance()->getSetting( 'site', 'default_site_access' ); ?>/';
@@ -107,7 +107,7 @@ function generateEmbedCode() {
         'var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;'+"\n"+
         'var referrer = (document.referrer) ? encodeURIComponent(document.referrer.substr(document.referrer.indexOf(\'://\')+1)) : \'\';'+"\n"+
         'var location  = (document.location) ? encodeURIComponent(window.location.href.substring(window.location.protocol.length)) : \'\';'+"\n"+
-        'po.src = \''+$('#HttpMode').val()+'//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect()?>'+siteAccess+'chat/getstatusembed<?php isset($userArgument) ? print $userArgument : ''?>'+uaArguments+id_hide_then_offline+id_theme+id_operator+id_show_leave_form+id_department+'?r=\'+referrer+\'&l=\'+location;'+"\n"+
+        'po.src = \''+$('#HttpMode').val()+'//<?php echo str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost())?><?php echo erLhcoreClassDesign::baseurldirect()?>'+siteAccess+'chat/getstatusembed<?php isset($userArgument) ? print $userArgument : ''?>'+uaArguments+id_hide_then_offline+id_theme+id_operator+id_show_leave_form+id_department+'?r=\'+referrer+\'&l=\'+location;'+"\n"+
         'var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);'+"\n"+
       '})();'+"\n"+
     '</scr'+'ipt>';

programming_language: PHP
filename: htmlcode.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -211,7 +211,7 @@
 
 
 <p class="explain"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/htmlcode','Copy the code from the text area to the page where you want your status to appear');?></p>
-<textarea style="width: 100%; height: 200px; font-size: 11px;" class="form-control" id="HMLTContent"><?php echo htmlspecialchars('<script type="text/javascript" src="http://'.$_SERVER['HTTP_HOST'].erLhcoreClassDesign::baseurl('chat/getstatus').'"></script>')?></textarea>
+<textarea style="width: 100%; height: 200px; font-size: 11px;" class="form-control" id="HMLTContent"><?php echo htmlspecialchars('<script type="text/javascript" src="'. erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurl('chat/getstatus') .'"></script>')?></textarea>
 
 <script type="text/javascript">
 
@@ -287,7 +287,7 @@ function generateEmbedCode(){
         'var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;'+"\n"+
         'var referrer = (document.referrer) ? encodeURIComponent(document.referrer.substr(document.referrer.indexOf(\'://\')+1)) : \'\';'+"\n"+
         'var location  = (document.location) ? encodeURIComponent(window.location.href.substring(window.location.protocol.length)) : \'\';'+"\n"+
-        'po.src = \''+$('#HttpMode').val()+'//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect()?>'+(id_detect_language == false ? siteAccess : '\'+_l+\'')+'chat/getstatus<?php isset($userArgument) ? print $userArgument : ''?>'+uaArguments+id_internal_popup+id_position+id_ma+id_hide_then_offline+id_disable_online_tracking+id_check_operator_message+top+topposition+id_show_leave_form+id_department+id_operator+id_identifier+id_disable_pro_active_invitations+id_theme+id_product+id_survey+'?r=\'+referrer+\'&l=\'+location;'+"\n"+
+        'po.src = \''+$('#HttpMode').val()+'//<?php echo str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost())?><?php echo erLhcoreClassDesign::baseurldirect()?>'+(id_detect_language == false ? siteAccess : '\'+_l+\'')+'chat/getstatus<?php isset($userArgument) ? print $userArgument : ''?>'+uaArguments+id_internal_popup+id_position+id_ma+id_hide_then_offline+id_disable_online_tracking+id_check_operator_message+top+topposition+id_show_leave_form+id_department+id_operator+id_identifier+id_disable_pro_active_invitations+id_theme+id_product+id_survey+'?r=\'+referrer+\'&l=\'+location;'+"\n"+
         'var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);'+"\n"+
       '})();'+"\n"+
     '</scr'+'ipt>';

programming_language: PHP
filename: htmlcodebeta.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -271,7 +271,7 @@
                     var operator = $('#id_operator').val() > 0 ? '/(operator)/'+$('#id_operator').val() : '';
                     var theme = $('#ThemeID').val() != 0 ? '/(theme)/'+$('#ThemeID').val() : '';
 
-                    var baseURL = '<?php echo erLhcoreClassXMP::getBaseHost()?><?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurl('restapi/onlineimage')?>' + department + operator + theme + '?' + onlineText + offlineText + width;
+                    var baseURL = '<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurl('restapi/onlineimage')?>' + department + operator + theme + '?' + onlineText + offlineText + width;
 
                     $('#static-image-url').attr('src', baseURL);
                     $('#static-image-code').val('<a href="'+$('#static-url-generated').val()+'">'+'<img src="' + baseURL + '" alt="" /></a>');
@@ -396,15 +396,15 @@
                 "} else {_l = _l[0].toLowerCase() + _l[1].toLowerCase(); if ('<?php echo erConfigClassLhConfig::getInstance()->getSetting( 'site', 'default_site_access' )?>' == _l) {_l = ''} else {LHC_API.args.lang = _l + '/';}}\n";
         }
 
-        $('#static-url-generated').val($('#HttpMode').val()+'//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect()?>'+siteAccessStatic +'chat/start'+id_survey_static+id_operator_static+id_fresh_status+id_department_static+id_theme_static+id_identifier_static);
+        $('#static-url-generated').val($('#HttpMode').val()+'//<?php echo str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost())?><?php echo erLhcoreClassDesign::baseurldirect()?>'+siteAccessStatic +'chat/start'+id_survey_static+id_operator_static+id_fresh_status+id_department_static+id_theme_static+id_identifier_static);
         staticImageGeneration();
 
         var script = '<script>'+
-            'var LHC_API = LHC_API||{};'+"\n"+'LHC_API.args = {mode:\''+id_widget_mode+'\',lhc_base_url:\'' + $('#HttpMode').val() + '//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect()?>\',wheight:'+$('#id_widget_height').val()+',wwidth:'+$('#id_widget_width').val()+',pheight:'+$('#id_popup_height').val()+',pwidth:'+$('#id_popup_width').val()+id_operator+id_embed_domain+id_fresh+id_show_leave_form+id_department+id_theme+id_survey+id_widget_position+id_check_messages_operator+id_disable_pro_active_invitations+id_identifier+siteAccess+id_position_placement+'};\n'+
+            'var LHC_API = LHC_API||{};'+"\n"+'LHC_API.args = {mode:\''+id_widget_mode+'\',lhc_base_url:\'' + $('#HttpMode').val() + '//<?php echo str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost())?><?php echo erLhcoreClassDesign::baseurldirect()?>\',wheight:'+$('#id_widget_height').val()+',wwidth:'+$('#id_widget_width').val()+',pheight:'+$('#id_popup_height').val()+',pwidth:'+$('#id_popup_width').val()+id_operator+id_embed_domain+id_fresh+id_show_leave_form+id_department+id_theme+id_survey+id_widget_position+id_check_messages_operator+id_disable_pro_active_invitations+id_identifier+siteAccess+id_position_placement+'};\n'+
             '(function() {'+"\n"+langDetectScript+
             'var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.setAttribute(\'crossorigin\',\'anonymous\'); po.async = true;'+"\n"+
             'var date = new Date();'+
-            'po.src = \''+$('#HttpMode').val()+'//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('js/widgetv2/index.js')?>?\'+(""+date.getFullYear() + date.getMonth() + date.getDate());'+"\n"+
+            'po.src = \''+$('#HttpMode').val()+'//<?php echo str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost())?><?php echo erLhcoreClassDesign::design('js/widgetv2/index.js')?>?\'+(""+date.getFullYear() + date.getMonth() + date.getDate());'+"\n"+
             'var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);'+"\n"+
             '})();'+"\n"+
             '</scr'+'ipt>';

programming_language: PHP
filename: update.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -9,7 +9,43 @@
 		<h5><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','Your version')?> - <?php echo sprintf("%0.2f", erLhcoreClassUpdate::LHC_RELEASE/100);?></h5>
 		<h5><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','Current version')?> - <span class="text-success" id="recent-version">...</span></h5>
 
-        <p class="font-weight-bold">More information</p>
+        <p class="font-weight-bold"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','Status/security checks')?></p>
+        <ul>
+            <li><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','Strong secret hash')?> -
+            <?php if (strlen(erConfigClassLhConfig::getInstance()->getSetting( 'site', 'secrethash' )) < 50) : ?>
+                <span class="badge badge-danger"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','Weak')?></span>
+            <?php else : ?>
+                <span class="badge badge-success"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','Strong')?></span>
+            <?php endif; ?>
+                <a target="_blank" href="https://doc.livehelperchat.com/docs/security#secret-hash"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','More information')?></a>
+            </li>
+            <li><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','Strong export hash')?> -
+            <?php if (strlen(erLhcoreClassModelChatConfig::fetch('export_hash')->current_value) < 50) : ?>
+                <span class="badge badge-danger"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','Weak')?></span>
+            <?php else : ?>
+                <span class="badge badge-success"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','Strong')?></span>
+            <?php endif; ?>
+                <a target="_blank" href="https://doc.livehelperchat.com/docs/security#export-hash"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','More information')?></a>
+            </li>
+            <li><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','Trusted host')?> -
+            <?php if (!is_array(erConfigClassLhConfig::getInstance()->getSetting( 'site', 'trusted_host_patterns', false )) || empty(erConfigClassLhConfig::getInstance()->getSetting( 'site', 'trusted_host_patterns', false ))) : ?>
+                <span class="badge badge-danger"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','not set')?></span>
+            <?php else : ?>
+                <span class="badge badge-success"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','set')?></span>
+            <?php endif; ?>
+                <a target="_blank" href="https://doc.livehelperchat.com/docs/security#trusted-hosts-and-site-address"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','More information')?></a>
+            </li>
+            <li><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','Site address')?> -
+            <?php if (!erConfigClassLhConfig::getInstance()->getSetting( 'site', 'site_address', false )) : ?>
+                <span class="badge badge-danger"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','not set')?></span>
+            <?php else : ?>
+                <span class="badge badge-success"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','set')?> - <?php echo htmlspecialchars(erConfigClassLhConfig::getInstance()->getSetting( 'site', 'site_address', false )); ?></span>
+            <?php endif; ?>
+                <a target="_blank" href="https://doc.livehelperchat.com/docs/security#trusted-hosts-and-site-address"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','More information')?></a>
+            </li>
+        </ul>
+
+        <p class="font-weight-bold"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','More information')?></p>
 
         <ul>
             <li><a rel="noreferrer" href="http://livehelperchat.com/news-5c.html" target="_blank"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/update','News')?></a></li>

programming_language: PHP
filename: autologinconfig.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -106,7 +106,7 @@
                     <div class="col-12">
                         <div class="form-group">
                             <div class="input-group">
-                                <input type="text" class="form-control" readonly="readonly" id="copy-url-<?php echo $i?>" data-original-url="<?php echo erLhcoreClassSystem::$httpsMode == 'true' ? 'https://' : 'http://'?><?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::baseurldirect('/')?>" value="">
+                                <input type="text" class="form-control" readonly="readonly" id="copy-url-<?php echo $i?>" data-original-url="<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurldirect('/')?>" value="">
                                 <div class="input-group-append"><span class="input-group-text"><a onclick="copyURL($(this))" data-index="<?php echo $i?>" data-original-title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('users/autologin','Copied!')?>" title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('users/autologin','Copy URL to clipboard')?>"><i class="material-icons mr-0">&#xE14D;</i></a></span></div>
                             </div>
                         </div>

programming_language: PHP
filename: form_incoming.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -20,7 +20,7 @@
 
 <div class="form-group">
     <label><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/webhooks','URL to put in third party Rest API service');?></label>
-    <input type="text" ng-non-bindable class="form-control form-control-sm" id="api-incoming-url" data-base="<?php echo erLhcoreClassXMP::getBaseHost().(isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '')?><?php echo erLhcoreClassDesign::baseurldirect('webhooks/incoming')?>/" value="<?php echo erLhcoreClassXMP::getBaseHost().(isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '')?><?php echo erLhcoreClassDesign::baseurldirect('webhooks/incoming')?>/<?php echo htmlspecialchars($item->identifier);?>">
+    <input type="text" ng-non-bindable class="form-control form-control-sm" id="api-incoming-url" data-base="<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurldirect('webhooks/incoming')?>/" value="<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::baseurldirect('webhooks/incoming')?>/<?php echo htmlspecialchars($item->identifier);?>">
 </div>
 
 <div class="form-group">

programming_language: PHP
filename: xmp.tpl.php
change_type: ModificationType.MODIFY
diff: @@ -109,7 +109,7 @@
 		        <label><input type="radio" name="use_standard_xmp" value="1" <?php isset($xmp_data['use_standard_xmp']) && ($xmp_data['use_standard_xmp'] == '1') ? print 'checked="checked"' : '' ?> /> <?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/xmpp','Use GTalk for messaging'); ?></label>
 				<h4><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/xmpp','Information for your google app')?></h4>	
 				<label><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/xmpp','Redirect URL, this url you will have to enter in your google app configuration')?></label>
-				<input class="form-control" type="text" value="<?php echo htmlspecialchars(erLhcoreClassXMP::getBaseHost().$_SERVER['HTTP_HOST'])?><?php echo erLhcoreClassDesign::baseurl('xmp/configuration')?>/(gtalkoauth)/true" />
+				<input class="form-control" type="text" value="<?php echo htmlspecialchars(erLhcoreClassSystem::getHost())?><?php echo erLhcoreClassDesign::baseurl('xmp/configuration')?>/(gtalkoauth)/true" />
 				
 				
 				<h4><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('system/xmpp','Enter your app information bellow')?></h4>						

programming_language: PHP
filename: lhbbcode.php
change_type: ModificationType.MODIFY
diff: @@ -795,18 +795,7 @@ class erLhcoreClassBBCode
    }
 
    public static function getHost() {
-
-       if (isset($_SERVER['HTTP_HOST'])) {
-           $site_address = (erLhcoreClassSystem::$httpsMode == true ? 'https:' : 'http:') . '//' . $_SERVER['HTTP_HOST'] ;
-       } else if (class_exists('erLhcoreClassInstance')) {
-           $site_address = 'https://' . erLhcoreClassInstance::$instanceChat->address . '.' . erConfigClassLhConfig::getInstance()->getSetting( 'site', 'seller_domain');
-       } else if (class_exists('erLhcoreClassExtensionLhcphpresque')) {
-           $site_address = erLhcoreClassModule::getExtensionInstance('erLhcoreClassExtensionLhcphpresque')->settings['site_address'];
-       } else {
-           $site_address = '';
-       }
-
-       return $site_address;
+        return erLhcoreClassSystem::getHost();
    }
 
    public static function _make_upload_link($matches){

programming_language: PHP
filename: lhbbcode_cleanup.php
change_type: ModificationType.MODIFY
diff: @@ -831,18 +831,7 @@ class erLhcoreClassBBCodePlain
     }
 
     public static function getHost() {
-
-        if (isset($_SERVER['HTTP_HOST'])) {
-            $site_address = (erLhcoreClassSystem::$httpsMode == true ? 'https:' : 'http:') . '//' . $_SERVER['HTTP_HOST'] ;
-        } else if (class_exists('erLhcoreClassInstance')) {
-            $site_address = 'https://' . erLhcoreClassInstance::$instanceChat->address . '.' . erConfigClassLhConfig::getInstance()->getSetting( 'site', 'seller_domain');
-        } else if (class_exists('erLhcoreClassExtensionLhcphpresque')) {
-            $site_address = erLhcoreClassModule::getExtensionInstance('erLhcoreClassExtensionLhcphpresque')->settings['site_address'];
-        } else {
-            $site_address = '';
-        }
-
-        return $site_address;
+        return erLhcoreClassSystem::getHost();
     }
 
     public static function _make_url_survey($matches)

programming_language: PHP
filename: lhchatcommand.php
change_type: ModificationType.MODIFY
diff: @@ -56,7 +56,7 @@ class erLhcoreClassChatCommand
         $URL = array_shift($paramsURL);
 
         if (is_numeric($URL)) {
-            $URL =  (erLhcoreClassSystem::$httpsMode == true ? 'https:' : 'http:') . '//' . (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '') . erLhcoreClassDesign::baseurldirect('form/formwidget') . '/' . $URL;
+            $URL = erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurldirect('form/formwidget') . '/' . $URL;
         }
 
         // Store as message to visitor

programming_language: PHP
filename: lhchatexport.php
change_type: ModificationType.MODIFY
diff: @@ -498,7 +498,7 @@ class erLhcoreClassChatExport {
                 	$from = null;
                 }
 
-                $url = erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurl('user/login').'/(r)/'.rawurlencode(base64_encode('chat/single/'.$item->id));
+                $url = erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurl('user/login').'/(r)/'.rawurlencode(base64_encode('chat/single/'.$item->id));
 
                 $chat_actions = '';
 

programming_language: PHP
filename: lhchatmail.php
change_type: ModificationType.MODIFY
diff: @@ -115,7 +115,7 @@ class erLhcoreClassChatMail {
 
         $cfgSite = erConfigClassLhConfig::getInstance();
         $secretHash = $cfgSite->getSetting( 'site', 'secrethash' );
-        $url = erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurldirect('chat/readchatmail') . '/' . $chat->id . '/' . sha1($secretHash . $chat->hash . $chat->id);
+        $url = erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurldirect('chat/readchatmail') . '/' . $chat->id . '/' . sha1($secretHash . $chat->hash . $chat->id);
 
     	$sendMail->content = str_replace(array('{user_chat_nick}','{messages_content}','{chat_id}','{survey}','{operator_name}','{chat_link}'), array($chat->nick, $tpl->fetch(), $chat->id, $surveyContent, $chat->plain_user_name, $url), $sendMail->content);
     	
@@ -218,7 +218,7 @@ class erLhcoreClassChatMail {
 
     	$mail->Subject = $sendMail->subject;
     	
-    	$mail->Body = str_replace(array('{email}','{question}','{url_request}','{url_question}'), array($faq->email,$faq->question,erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurl('user/login').'/(r)/'.rawurlencode(base64_encode('faq/view/'.$faq->id)),$faq->url), $sendMail->content);
+    	$mail->Body = str_replace(array('{email}','{question}','{url_request}','{url_question}'), array($faq->email,$faq->question,erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurl('user/login').'/(r)/'.rawurlencode(base64_encode('faq/view/'.$faq->id)),$faq->url), $sendMail->content);
     	
     	if ($sendMail->recipient != '') { // Perhaps template has default recipient
     		$emailRecipient = explode(',',$sendMail->recipient);
@@ -280,7 +280,7 @@ class erLhcoreClassChatMail {
     	
     	$prefillchat = '-'; 
     	if (isset($params['chatprefill']) && $params['chatprefill'] instanceof erLhcoreClassModelChat){
-    		$prefillchat = erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurl('user/login').'/(r)/'.rawurlencode(base64_encode('chat/single/'.$params['chatprefill']->id));
+    		$prefillchat = erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurl('user/login').'/(r)/'.rawurlencode(base64_encode('chat/single/'.$params['chatprefill']->id));
     	}
     	
     	// Format user friendly additional data
@@ -415,7 +415,7 @@ class erLhcoreClassChatMail {
     	    	
     	foreach ($emailRecipient as $receiver) {   
     		$veryfyEmail = 	sha1(sha1($receiver.$secretHash).$secretHash);
-    		$mail->Body = str_replace(array('{survey}','{chat_duration}','{waited}','{created}','{user_left}','{user_name}','{chat_id}','{phone}','{name}','{email}','{message}','{additional_data}','{url_request}','{ip}','{department}','{url_accept}','{country}','{city}'), array($surveyContent, ($chat->chat_duration > 0 ? $chat->chat_duration_front : '-'), ($chat->wait_time > 0 ? $chat->wait_time_front : '-'), $chat->time_created_front, ($chat->user_closed_ts > 0 && $chat->user_status == 1 ? $chat->user_closed_ts_front : '-'),$chat->user_name,$chat->id,$chat->phone,$chat->nick,$chat->email,$messagesContent,$additional_data,$chat->referrer,erLhcoreClassIPDetect::getIP(),(string)$chat->department, erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurl('chat/accept').'/'.erLhcoreClassModelChatAccept::generateAcceptLink($chat).'/'.$veryfyEmail.'/'.$receiver,$chat->country_name,$chat->city), $sendMail->content);
+    		$mail->Body = str_replace(array('{survey}','{chat_duration}','{waited}','{created}','{user_left}','{user_name}','{chat_id}','{phone}','{name}','{email}','{message}','{additional_data}','{url_request}','{ip}','{department}','{url_accept}','{country}','{city}'), array($surveyContent, ($chat->chat_duration > 0 ? $chat->chat_duration_front : '-'), ($chat->wait_time > 0 ? $chat->wait_time_front : '-'), $chat->time_created_front, ($chat->user_closed_ts > 0 && $chat->user_status == 1 ? $chat->user_closed_ts_front : '-'),$chat->user_name,$chat->id,$chat->phone,$chat->nick,$chat->email,$messagesContent,$additional_data,$chat->referrer,erLhcoreClassIPDetect::getIP(),(string)$chat->department, erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurl('chat/accept').'/'.erLhcoreClassModelChatAccept::generateAcceptLink($chat).'/'.$veryfyEmail.'/'.$receiver,$chat->country_name,$chat->city), $sendMail->content);
     		$mail->AddAddress( $receiver );
     		$mail->Send();
     		$mail->ClearAddresses();
@@ -426,7 +426,7 @@ class erLhcoreClassChatMail {
     		foreach ($recipientsBCC as $receiver) {
     			$receiver = trim($receiver);
     			$veryfyEmail = 	sha1(sha1($receiver.$secretHash).$secretHash);
-    			$mail->Body = str_replace(array('{survey}','{chat_duration}','{waited}','{created}','{user_left}','{user_name}','{chat_id}','{phone}','{name}','{email}','{message}','{additional_data}','{url_request}','{ip}','{department}','{url_accept}','{country}','{city}'), array($surveyContent, ($chat->chat_duration > 0 ? $chat->chat_duration_front : '-'), ($chat->wait_time > 0 ? $chat->wait_time_front : '-'), $chat->time_created_front, ($chat->user_closed_ts > 0 && $chat->user_status == 1 ? $chat->user_closed_ts_front : '-'),$chat->user_name,$chat->id,$chat->phone,$chat->nick,$chat->email,$messagesContent,$additional_data,$chat->referrer,erLhcoreClassIPDetect::getIP(),(string)$chat->department, erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurl('chat/accept').'/'.erLhcoreClassModelChatAccept::generateAcceptLink($chat).'/'.$veryfyEmail.'/'.$receiver,$chat->country_name,$chat->city), $sendMail->content);
+    			$mail->Body = str_replace(array('{survey}','{chat_duration}','{waited}','{created}','{user_left}','{user_name}','{chat_id}','{phone}','{name}','{email}','{message}','{additional_data}','{url_request}','{ip}','{department}','{url_accept}','{country}','{city}'), array($surveyContent, ($chat->chat_duration > 0 ? $chat->chat_duration_front : '-'), ($chat->wait_time > 0 ? $chat->wait_time_front : '-'), $chat->time_created_front, ($chat->user_closed_ts > 0 && $chat->user_status == 1 ? $chat->user_closed_ts_front : '-'),$chat->user_name,$chat->id,$chat->phone,$chat->nick,$chat->email,$messagesContent,$additional_data,$chat->referrer,erLhcoreClassIPDetect::getIP(),(string)$chat->department, erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurl('chat/accept').'/'.erLhcoreClassModelChatAccept::generateAcceptLink($chat).'/'.$veryfyEmail.'/'.$receiver,$chat->country_name,$chat->city), $sendMail->content);
     			$mail->AddAddress( $receiver );
     			$mail->Send();
     			$mail->ClearAddresses();    			
@@ -491,7 +491,7 @@ class erLhcoreClassChatMail {
     	
     	$mail->FromName = $sendMail->from_name;    	
     	$mail->Subject = str_replace(array('{form_name}'),array($formCollected->form),$sendMail->subject);   	     	
-    	$mail->Body = str_replace(array('{identifier}','{form_name}','{content}','{ip}','{url_download}','{url_view}'), array($formCollected->identifier,(string)$formCollected->form, $formCollected->form_content, $formCollected->ip, erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurldirect('user/login').'/(r)/'.rawurlencode(base64_encode('form/downloaditem/'.$formCollected->id)), erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurldirect('user/login').'/(r)/'.rawurlencode(base64_encode('form/viewcollected/'.$formCollected->id))), $sendMail->content);
+    	$mail->Body = str_replace(array('{identifier}','{form_name}','{content}','{ip}','{url_download}','{url_view}'), array($formCollected->identifier,(string)$formCollected->form, $formCollected->form_content, $formCollected->ip, erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurldirect('user/login').'/(r)/'.rawurlencode(base64_encode('form/downloaditem/'.$formCollected->id)), erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurldirect('user/login').'/(r)/'.rawurlencode(base64_encode('form/viewcollected/'.$formCollected->id))), $sendMail->content);
 
     	$emailRecipient = array();
     	if ($formCollected->form->recipient != '') {
@@ -655,7 +655,7 @@ class erLhcoreClassChatMail {
 
     	foreach ($emailRecipient as $receiver) {   
     		$veryfyEmail = 	sha1(sha1($receiver.$secretHash).$secretHash);
-    		$mail->Body = str_replace(array('{survey}','{chat_duration}','{waited}','{created}','{user_left}','{chat_id}','{phone}','{name}','{email}','{message}','{additional_data}','{url_request}','{ip}','{department}','{url_accept}','{operator}','{country}','{city}'), array($surveyContent,($chat->chat_duration > 0 ? $chat->chat_duration_front : '-'), ($chat->wait_time > 0 ? $chat->wait_time_front : '-'), $chat->time_created_front, ($chat->user_closed_ts > 0 && $chat->user_status == 1 ? $chat->user_closed_ts_front : '-'),$chat->id,$chat->phone,$chat->nick,$chat->email,$messagesContent,$additional_data,$chat->referrer,$chat->ip,(string)$chat->department,(isset($_SERVER['HTTP_HOST'])) ?  erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] : erLhcoreClassModelChatConfig::fetch('customer_site_url')->current_value . erLhcoreClassDesign::baseurl('chat/accept').'/'.erLhcoreClassModelChatAccept::generateAcceptLink($chat).'/'.$veryfyEmail.'/'.$receiver,$operator,$chat->country_name,$chat->city), $sendMail->content);
+    		$mail->Body = str_replace(array('{survey}','{chat_duration}','{waited}','{created}','{user_left}','{chat_id}','{phone}','{name}','{email}','{message}','{additional_data}','{url_request}','{ip}','{department}','{url_accept}','{operator}','{country}','{city}'), array($surveyContent,($chat->chat_duration > 0 ? $chat->chat_duration_front : '-'), ($chat->wait_time > 0 ? $chat->wait_time_front : '-'), $chat->time_created_front, ($chat->user_closed_ts > 0 && $chat->user_status == 1 ? $chat->user_closed_ts_front : '-'),$chat->id,$chat->phone,$chat->nick,$chat->email,$messagesContent,$additional_data,$chat->referrer,$chat->ip,(string)$chat->department,erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurl('chat/accept').'/'.erLhcoreClassModelChatAccept::generateAcceptLink($chat).'/'.$veryfyEmail.'/'.$receiver,$operator,$chat->country_name,$chat->city), $sendMail->content);
     		$mail->AddAddress( $receiver );    		    		
     		$mail->Send();
     		$mail->ClearAddresses();
@@ -666,7 +666,7 @@ class erLhcoreClassChatMail {
     		foreach ($recipientsBCC as $receiver) {    			
     			$receiver = trim($receiver);
     			$veryfyEmail = 	sha1(sha1($receiver.$secretHash).$secretHash);
-	    		$mail->Body = str_replace(array('{survey}','{chat_duration}','{waited}','{created}','{user_left}','{chat_id}','{phone}','{name}','{email}','{message}','{additional_data}','{url_request}','{ip}','{department}','{url_accept}','{operator}','{country}','{city}'), array($surveyContent,($chat->chat_duration > 0 ? $chat->chat_duration_front : '-'), ($chat->wait_time > 0 ? $chat->wait_time_front : '-'), $chat->time_created_front, ($chat->user_closed_ts > 0 && $chat->user_status == 1 ? $chat->user_closed_ts_front : '-'),$chat->id,$chat->phone,$chat->nick,$chat->email,$messagesContent,$additional_data,$chat->referrer,$chat->ip,(string)$chat->department,(isset($_SERVER['HTTP_HOST'])) ?  erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] : erLhcoreClassModelChatConfig::fetch('customer_site_url')->current_value . erLhcoreClassDesign::baseurl('chat/accept').'/'.erLhcoreClassModelChatAccept::generateAcceptLink($chat).'/'.$veryfyEmail.'/'.$receiver,$operator,$chat->country_name,$chat->city), $sendMail->content);
+	    		$mail->Body = str_replace(array('{survey}','{chat_duration}','{waited}','{created}','{user_left}','{chat_id}','{phone}','{name}','{email}','{message}','{additional_data}','{url_request}','{ip}','{department}','{url_accept}','{operator}','{country}','{city}'), array($surveyContent,($chat->chat_duration > 0 ? $chat->chat_duration_front : '-'), ($chat->wait_time > 0 ? $chat->wait_time_front : '-'), $chat->time_created_front, ($chat->user_closed_ts > 0 && $chat->user_status == 1 ? $chat->user_closed_ts_front : '-'),$chat->id,$chat->phone,$chat->nick,$chat->email,$messagesContent,$additional_data,$chat->referrer,$chat->ip,(string)$chat->department,erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurl('chat/accept').'/'.erLhcoreClassModelChatAccept::generateAcceptLink($chat).'/'.$veryfyEmail.'/'.$receiver,$operator,$chat->country_name,$chat->city), $sendMail->content);
 	    		$mail->AddAddress( $receiver );    		    		
 	    		$mail->Send();
 	    		$mail->ClearAddresses();    			 
@@ -796,7 +796,7 @@ class erLhcoreClassChatMail {
                 $item->referrer,
                 $item->ip,
                 ($chat instanceof erLhcoreClassModelChat ? (string)$chat->department : '-'),
-                (isset($_SERVER['HTTP_HOST']) ? erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] . $appendURL : erLhcoreClassModelChatConfig::fetch('customer_site_url')->current_value . $appendURL),
+                erLhcoreClassSystem::getHost() . $appendURL,
                 $item->user_country_name,
                 $item->city),
                 $sendMail->content);
@@ -843,7 +843,7 @@ class erLhcoreClassChatMail {
                     $item->referrer,
                     $item->ip,
                     ($chat instanceof erLhcoreClassModelChat ? (string)$chat->department : '-'),
-                    (isset($_SERVER['HTTP_HOST']) ? erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] . $appendURL : erLhcoreClassModelChatConfig::fetch('customer_site_url')->current_value . $appendURL),
+                    erLhcoreClassSystem::getHost() . $appendURL,
                     $item->user_country_name,
                     $item->city),
                     $sendMail->content);

programming_language: PHP
filename: lhsys.php
change_type: ModificationType.MODIFY
diff: @@ -469,7 +469,54 @@ class erLhcoreClassSystem{
     		}    		
     	}
     }
-    
+
+    public static function validHttpHost($host) {
+        return substr_count($host, '.') <= 100
+            && substr_count($host, ':') <= 100
+            && preg_match('/^\[?(?:[a-zA-Z0-9-:\]_]+\.?)+$/', $host)
+            && self::isTrustedHost($host);
+    }
+
+    // Borrowed from Drupal
+    public static function isTrustedHost($host) {
+        $trusted_host_patterns = erConfigClassLhConfig::getInstance()->getSetting( 'site', 'trusted_host_patterns', false);
+        if (PHP_SAPI !== 'cli' && is_array($trusted_host_patterns) && !empty($trusted_host_patterns)) {
+            foreach ($trusted_host_patterns as $pattern) {
+                $pattern = sprintf('{%s}i', str_replace('}', '\\}', $pattern));
+                if (preg_match($pattern, $host)) {
+                    return true;
+                }
+            }
+            return false;
+        }
+        return false;
+    }
+
+    public static function getHost() {
+
+        static $site_address = null;
+
+        if ($site_address !== null) {
+            return $site_address;
+        }
+
+        if (isset($_SERVER['HTTP_HOST']) && self::validHttpHost($_SERVER['HTTP_HOST'])) {
+            $site_address = (erLhcoreClassSystem::$httpsMode == true || erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value == 'https:' ? 'https:' : 'http:') . '//' . $_SERVER['HTTP_HOST'] ;
+        } else if (class_exists('erLhcoreClassInstance')) {
+            $site_address = 'https://' . erLhcoreClassInstance::$instanceChat->address . '.' . erConfigClassLhConfig::getInstance()->getSetting( 'site', 'seller_domain');
+        } else if (($site_address = erConfigClassLhConfig::getInstance()->getSetting( 'site', 'site_address', false)) && $site_address != '') {
+            return $site_address;
+        } else if (class_exists('erLhcoreClassExtensionLhcphpresque')) {
+            $site_address = erLhcoreClassModule::getExtensionInstance('erLhcoreClassExtensionLhcphpresque')->settings['site_address'];
+        } elseif (isset($_SERVER['HTTP_HOST']) && (!is_array(erConfigClassLhConfig::getInstance()->getSetting( 'site', 'trusted_host_patterns', false)) || empty(erConfigClassLhConfig::getInstance()->getSetting( 'site', 'trusted_host_patterns', false)))) {
+            $site_address = (erLhcoreClassSystem::$httpsMode == true || erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value == 'https:' ? 'https:' : 'http:') . '//' . $_SERVER['HTTP_HOST'] ; // trust only if match array not set
+        } else {
+            $site_address = 'http://localhost'; // We could not determine any valid host
+        }
+
+        return $site_address;
+    }
+
     function wwwDir()
     {
         return (self::$prependDomain ? (self::$httpsMode == true ? 'https:' : '') . '//' . $_SERVER['HTTP_HOST'] : '') . $this->WWWDir;

programming_language: PHP
filename: lhupdate.php
change_type: ModificationType.MODIFY
diff: @@ -12,6 +12,7 @@ class erLhcoreClassUpdate
         $errorMessages = array();
 
 		try {
+            $db->query('SET GLOBAL innodb_strict_mode = 0;');
             $db->query('SET GLOBAL innodb_file_per_table=1;');
             $db->query('SET GLOBAL innodb_large_prefix=1;');
         } catch (Exception $e) {

programming_language: PHP
filename: lhformrenderer.php
change_type: ModificationType.MODIFY
diff: @@ -635,7 +635,7 @@ class erLhcoreClassFormRenderer {
     	} else {
     		if (isset(self::$collectedInfo[$params['name']]['value'])){
     			$valueContent = self::$collectedInfo[$params['name']]['value'];
-    			$downloadLink = "<a href=\"http://".$_SERVER['HTTP_HOST'].erLhcoreClassDesign::baseurl('form/download').'/'.self::$collectedObject->id.'/'.self::$collectedObject->hash.'/'.$params['name']."\">Download (".htmlspecialchars($valueContent['name']).")</a>";
+    			$downloadLink = "<a href=\"".erLhcoreClassSystem::getHost().erLhcoreClassDesign::baseurl('form/download').'/'.self::$collectedObject->id.'/'.self::$collectedObject->hash.'/'.$params['name']."\">Download (".htmlspecialchars($valueContent['name']).")</a>";
     		}
     	}
     	

programming_language: PHP
filename: lhgenericbotactionrestapi.php
change_type: ModificationType.MODIFY
diff: @@ -240,16 +240,7 @@ class erLhcoreClassGenericBotActionRestapi
                 $file = erLhcoreClassModelChatFile::fetch($fileID);
                 if (is_object($file) && $hash == $file->security_hash) {
 
-                    if (isset($_SERVER['HTTP_HOST'])) {
-                        $url = (erLhcoreClassSystem::$httpsMode == true ? 'https:' : 'http:') . '//' . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurldirect('file/downloadfile') . "/{$file->id}/{$hash}";
-                    } else {
-                        if (class_exists('erLhcoreClassInstance')) {
-                            $site_address = 'https://' . erLhcoreClassInstance::$instanceChat->address . '.' . erConfigClassLhConfig::getInstance()->getSetting( 'site', 'seller_domain');
-                        } else {
-                            $site_address = erLhcoreClassModule::getExtensionInstance('erLhcoreClassExtensionLhcphpresque')->settings['site_address'];
-                        }
-                        $url = $site_address . erLhcoreClassDesign::baseurldirect('file/downloadfile') . "/{$file->id}/{$hash}";
-                    }
+                    $url = erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurldirect('file/downloadfile') . "/{$file->id}/{$hash}";;
 
                     $media[] = array(
                         'id' => $file->id,
@@ -361,31 +352,13 @@ class erLhcoreClassGenericBotActionRestapi
 
                 if ($mediaFile->remote_file !== true) {
                     $file_body = 'data:'.$mediaFile->type.';base64,'.base64_encode(file_get_contents($mediaFile->file_path_server));
-                    if (isset($_SERVER['HTTP_HOST'])) {
-                        $file_url = (erLhcoreClassSystem::$httpsMode == true ? 'https:' : 'http:') . '//' . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurldirect('file/downloadfile') . "/{$mediaFile->id}/{$mediaFile->security_hash}";
-                    } else {
-                        if (class_exists('erLhcoreClassInstance')) {
-                            $site_address = 'https://' . erLhcoreClassInstance::$instanceChat->address . '.' . erConfigClassLhConfig::getInstance()->getSetting( 'site', 'seller_domain');
-                        } else {
-                            $site_address = erLhcoreClassModule::getExtensionInstance('erLhcoreClassExtensionLhcphpresque')->settings['site_address'];
-                        }
-                        $file_url = $site_address . erLhcoreClassDesign::baseurldirect('file/downloadfile') . "/{$mediaFile->id}/{$mediaFile->security_hash}";
-                    }
+                    $file_url = erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurldirect('file/downloadfile') . "/{$mediaFile->id}/{$mediaFile->security_hash}";
                 } else {
                     $file_body = '';
                     if (strpos($file->remote_url,'http://') !== false || strpos($file->remote_url,'https://') !== false) {
                         $file_url = $file->remote_url;
                     } else {
-                        if (isset($_SERVER['HTTP_HOST'])) {
-                            $file_url = (erLhcoreClassSystem::$httpsMode == true ? 'https:' : 'http:') . '//' . $_SERVER['HTTP_HOST'] . $file->remote_url;
-                        } else {
-                            if (class_exists('erLhcoreClassInstance')) {
-                                $site_address = 'https://' . erLhcoreClassInstance::$instanceChat->address . '.' . erConfigClassLhConfig::getInstance()->getSetting( 'site', 'seller_domain');
-                            } else {
-                                $site_address = erLhcoreClassModule::getExtensionInstance('erLhcoreClassExtensionLhcphpresque')->settings['site_address'];
-                            }
-                            $file_url = $site_address . $file->remote_url;
-                        }
+                        $file_url = erLhcoreClassSystem::getHost() . $file->remote_url;;
                     }
                 }
              }

programming_language: PHP
filename: lhrestapivalidator.php
change_type: ModificationType.MODIFY
diff: @@ -713,7 +713,7 @@ class erLhcoreClassRestAPIHandler
 
         if (in_array('link',$prefillFields)) {
             foreach ($chats as $index => $chat) {
-                $chats[$index]->link = erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurl('user/login').'/(r)/'.rawurlencode(base64_encode('chat/single/'.$chat->id));
+                $chats[$index]->link = erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurl('user/login').'/(r)/'.rawurlencode(base64_encode('chat/single/'.$chat->id));
             }
         }
 

programming_language: PHP
filename: lhxmp.php
change_type: ModificationType.MODIFY
diff: @@ -247,14 +247,14 @@ class erLhcoreClassXMP {
 					
 					foreach ($emailRecipient as $email) {			
 						$veryfyEmail = 	sha1(sha1($email.$secretHash).$secretHash);
-						$messagesParsed = str_replace(array('{messages}','{url_accept}','{chat_id}','{user_name}','{department}'), array($messagesContent,self::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurl('chat/accept').'/'.erLhcoreClassModelChatAccept::generateAcceptLink($chat).'/'.$veryfyEmail.'/'.$email,$chat->id,$chat->user_name,(string)$chat->department),$data[$templateMessage]);
+						$messagesParsed = str_replace(array('{messages}','{url_accept}','{chat_id}','{user_name}','{department}'), array($messagesContent,erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurl('chat/accept').'/'.erLhcoreClassModelChatAccept::generateAcceptLink($chat).'/'.$veryfyEmail.'/'.$email,$chat->id,$chat->user_name,(string)$chat->department),$data[$templateMessage]);
 						$conn->message($email,$messagesParsed);
 					}
 					
 					foreach ($groupRecipients as $email) {
 						list($emailGroup) = explode('/',$email);
 						$veryfyEmail = 	sha1(sha1($emailGroup.$secretHash).$secretHash);
-						$messagesParsed = str_replace(array('{messages}','{url_accept}','{chat_id}','{user_name}','{department}'), array($messagesContent,self::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurl('chat/accept').'/'.erLhcoreClassModelChatAccept::generateAcceptLink($chat).'/'.$veryfyEmail.'/'.$emailGroup,$chat->id,$chat->user_name,(string)$chat->department),$data[$templateMessage]);
+						$messagesParsed = str_replace(array('{messages}','{url_accept}','{chat_id}','{user_name}','{department}'), array($messagesContent,erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurl('chat/accept').'/'.erLhcoreClassModelChatAccept::generateAcceptLink($chat).'/'.$veryfyEmail.'/'.$emailGroup,$chat->id,$chat->user_name,(string)$chat->department),$data[$templateMessage]);
 						$conn->message($emailGroup,$messagesParsed,'groupchat');						
 					}
 
@@ -320,7 +320,7 @@ class erLhcoreClassXMP {
 						
 						foreach ($emailRecipient as $email) {
 							$veryfyEmail = 	sha1(sha1($email.$secretHash).$secretHash);
-							$conn->message($email,str_replace(array('{messages}','{url_accept}','{chat_id}','{user_name}','{department}'), array($messagesContent,self::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurl('chat/accept').'/'.erLhcoreClassModelChatAccept::generateAcceptLink($chat).'/'.$veryfyEmail.'/'.$email, $chat->id,$chat->user_name,(string)$chat->department),$data[$templateMessage]));
+							$conn->message($email,str_replace(array('{messages}','{url_accept}','{chat_id}','{user_name}','{department}'), array($messagesContent,erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurl('chat/accept').'/'.erLhcoreClassModelChatAccept::generateAcceptLink($chat).'/'.$veryfyEmail.'/'.$email, $chat->id,$chat->user_name,(string)$chat->department),$data[$templateMessage]));
 						}
 
 						$conn->disconnect();

programming_language: PHP
filename: erlhabstractmodelformcollected.php
change_type: ModificationType.MODIFY
diff: @@ -67,7 +67,7 @@ class erLhAbstractModelFormCollected
         $dataCollected = array();
         foreach ($this->content_array as $nameAttr => $contentArray) {
             if (isset($contentArray['definition']['type']) && $contentArray['definition']['type'] == 'file') {
-                $dataCollected[] = $contentArray['definition']['name_literal'] . " - " . erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurldirect('user/login') . '/(r)/' . rawurlencode(base64_encode('form/download/' . $this->id . '/' . $nameAttr));
+                $dataCollected[] = $contentArray['definition']['name_literal'] . " - " . erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurldirect('user/login') . '/(r)/' . rawurlencode(base64_encode('form/download/' . $this->id . '/' . $nameAttr));
             } elseif (isset($contentArray['definition']['type']) && $contentArray['definition']['type'] == 'checkbox') {
                 $dataCollected[] = $contentArray['definition']['name_literal'] . " - " . ($contentArray['value'] == 1 ? 'Y' : 'N');
             } else {

programming_language: PHP
filename: erlhabstractmodelwidgettheme.php
change_type: ModificationType.MODIFY
diff: @@ -260,7 +260,7 @@ class erLhAbstractModelWidgetTheme {
 
            case 'replace_array':
 
-               $host = '//'.$_SERVER['HTTP_HOST'];
+               $host = erLhcoreClassSystem::getHost();
 
                $this->replace_array = array(
                    'search' => array(
@@ -309,7 +309,7 @@ class erLhAbstractModelWidgetTheme {
 	   	       $attr = str_replace('_url', '', $var);	   	       	   	       
 	   	       $this->$var = false;	   	        
 	   	       if ($this->$attr != ''){
-	   	           $this->$var =  ($this->{$attr.'_path'} != '' ? (erLhcoreClassSystem::$httpsMode == true ? 'https:' : 'http:') . '//' . $_SERVER['HTTP_HOST'] . erLhcoreClassSystem::instance()->wwwDir() : erLhcoreClassSystem::instance()->wwwImagesDir() ) . '/' . $this->{$attr.'_path'} . $this->$attr;
+	   	           $this->$var =  ($this->{$attr.'_path'} != '' ? erLhcoreClassSystem::getHost() . erLhcoreClassSystem::instance()->wwwDir() : erLhcoreClassSystem::instance()->wwwImagesDir() ) . '/' . $this->{$attr.'_path'} . $this->$attr;
 	   	       }	   	        
 	   	       return $this->$var;
 	   	    break;
@@ -327,7 +327,7 @@ class erLhAbstractModelWidgetTheme {
 	   	        $attr = str_replace('_url_img', '', $var);	   	    
 	   			$this->$var = false;	   		
 	   			if($this->$attr != ''){
-	   				$this->$var = '<img src="'.($this->{$attr.'_path'} != '' ? (erLhcoreClassSystem::$httpsMode == true ? 'https:' : 'http:') . '//' . $_SERVER['HTTP_HOST'] . erLhcoreClassSystem::instance()->wwwDir() : erLhcoreClassSystem::instance()->wwwImagesDir() ) .'/'.$this->{$attr.'_path'} . $this->$attr.'"/>';
+	   				$this->$var = '<img src="'.($this->{$attr.'_path'} != '' ? erLhcoreClassSystem::getHost() . erLhcoreClassSystem::instance()->wwwDir() : erLhcoreClassSystem::instance()->wwwImagesDir() ) .'/'.$this->{$attr.'_path'} . $this->$attr.'"/>';
 	   			}
 	   			return $this->$var;
 	   		break;

programming_language: PHP
filename: erlhcoreclassmodelgenericbotbot.php
change_type: ModificationType.MODIFY
diff: @@ -89,7 +89,7 @@ class erLhcoreClassModelGenericBotBot {
                 break;
 
             case 'photo_path':
-                $this->photo_path = ($this->filepath != '' ? '//' . $_SERVER['HTTP_HOST'] . erLhcoreClassSystem::instance()->wwwDir() : erLhcoreClassSystem::instance()->wwwImagesDir() ) .'/'. $this->filepath . $this->filename;
+                $this->photo_path = ($this->filepath != '' ? erLhcoreClassSystem::getHost() . erLhcoreClassSystem::instance()->wwwDir() : erLhcoreClassSystem::instance()->wwwImagesDir() ) .'/'. $this->filepath . $this->filename;
                 return $this->photo_path;
                 break;
 

programming_language: PHP
filename: erlhcoreclassmodelgenericbottrgroup.php
change_type: ModificationType.MODIFY
diff: @@ -50,7 +50,7 @@ class erLhcoreClassModelGenericBotTrGroup {
                 break;
 
             case 'photo_path':
-                $this->photo_path = ($this->filepath != '' ? '//' . $_SERVER['HTTP_HOST'] . erLhcoreClassSystem::instance()->wwwDir() : erLhcoreClassSystem::instance()->wwwImagesDir() ) .'/'. $this->filepath . $this->filename;
+                $this->photo_path = ($this->filepath != '' ? erLhcoreClassSystem::getHost() . erLhcoreClassSystem::instance()->wwwDir() : erLhcoreClassSystem::instance()->wwwImagesDir() ) .'/'. $this->filepath . $this->filename;
                 return $this->photo_path;
                 break;
 

programming_language: PHP
filename: erlhcoreclassmodeluser.php
change_type: ModificationType.MODIFY
diff: @@ -120,7 +120,7 @@ class erLhcoreClassModelUser {
        	    	return $this->filename != '' || $this->avatar != '';
 
        	case 'photo_path':
-       			$this->photo_path = ($this->filepath != '' ? '//' . $_SERVER['HTTP_HOST'] . erLhcoreClassSystem::instance()->wwwDir() : erLhcoreClassSystem::instance()->wwwImagesDir() ) .'/'. $this->filepath . $this->filename;
+       			$this->photo_path = ($this->filepath != '' ? erLhcoreClassSystem::getHost() . erLhcoreClassSystem::instance()->wwwDir() : erLhcoreClassSystem::instance()->wwwImagesDir() ) .'/'. $this->filepath . $this->filename;
        			return $this->photo_path;
 
        	case 'file_path_server':

programming_language: PHP
filename: proxycss.php
change_type: ModificationType.MODIFY
diff: @@ -29,7 +29,7 @@ if (!in_array($url['scheme'],['http','https']) || (isset($url['port']) && !in_ar
 }
 
 // Some basic validation
-if (isset($url['host']) && $url['host'] != '' && strpos($_GET['css'], $_SERVER['HTTP_HOST']) === false) {
+if (isset($url['host']) && $url['host'] != '' && strpos($_GET['css'], erLhcoreClassSystem::getHost()) === false) {
 
     $urlCSS = parse_url($_GET['css']);
 

programming_language: PHP
filename: test.php
change_type: ModificationType.MODIFY
diff: @@ -6,4 +6,6 @@
  *
  * */
 
+echo erLhcoreClassBBCode::getHost();
+
 ?>
\ No newline at end of file

programming_language: PHP
filename: getchat.php
change_type: ModificationType.MODIFY
diff: @@ -6,6 +6,11 @@ $format = (string)$Params['user_parameters_unordered']['format'] == 'xml' ? 'xml
 $hashSecret = erLhcoreClassModelChatConfig::fetch('export_hash')->current_value;
 
 try {
+
+    if (strlen($hashSecret) < 50) {
+        throw new Exception('Export hash to short!');
+    }
+
 	if ( sha1('getchat'.$hashSecret) == $hash ) {
 
 		$chat = erLhcoreClassModelChat::fetch((string)$Params['user_parameters']['chat_id']);

programming_language: PHP
filename: getcount.php
change_type: ModificationType.MODIFY
diff: @@ -6,6 +6,11 @@ $format = (string)$Params['user_parameters_unordered']['format'] == 'xml' ? 'xml
 $hashSecret = erLhcoreClassModelChatConfig::fetch('export_hash')->current_value;
 
 try {
+    
+    if (strlen($hashSecret) < 50) {
+        throw new Exception('Export hash to short!');
+    }
+
 	if ( sha1('getcount'.$hashSecret) == $hash ) {
 
 		$filter = array();

programming_language: PHP
filename: getlist.php
change_type: ModificationType.MODIFY
diff: @@ -6,6 +6,11 @@ $format = (string)$Params['user_parameters_unordered']['format'] == 'xml' ? 'xml
 $hashSecret = erLhcoreClassModelChatConfig::fetch('export_hash')->current_value;
 
 try {
+    
+    if (strlen($hashSecret) < 50) {
+        throw new Exception('Export hash to short!');
+    }
+
 	if ( sha1('getlist'.$hashSecret) == $hash ) {
 
 		$filter = array();

programming_language: PHP
filename: downloadcollected.php
change_type: ModificationType.MODIFY
diff: @@ -42,7 +42,7 @@ foreach ($items as $item) {
 	$y = 0;
 	foreach ($form->xls_columns_data as $data) {					
 		if (isset($item->content_array[$data['attr_name']]['definition']['type']) && $item->content_array[$data['attr_name']]['definition']['type'] == 'file') {			
-			$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($y, $i, erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurldirect('user/login').'/(r)/'.rawurlencode(base64_encode('form/download/'.$item->id.'/'.$data['attr_name'])));
+			$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($y, $i, erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurldirect('user/login').'/(r)/'.rawurlencode(base64_encode('form/download/'.$item->id.'/'.$data['attr_name'])));
 		} else {
 			if (strpos($data['attr_name'], ',') === false){
 				$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($y, $i, $item->content_array[$data['attr_name']]['value']);

programming_language: PHP
filename: downloaditem.php
change_type: ModificationType.MODIFY
diff: @@ -46,7 +46,7 @@ try {
 	$y = 0;
 	foreach ($form->xls_columns_data as $data) {
 		if (isset($item->content_array[$data['attr_name']]['definition']['type']) && $item->content_array[$data['attr_name']]['definition']['type'] == 'file') {
-			$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($y, $i, erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurldirect('user/login').'/(r)/'.rawurlencode(base64_encode('form/download/'.$item->id.'/'.$data['attr_name'])));
+			$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($y, $i, erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurldirect('user/login').'/(r)/'.rawurlencode(base64_encode('form/download/'.$item->id.'/'.$data['attr_name'])));
 		} else {
 			if (strpos($data['attr_name'], ',') === false){
 				$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($y, $i, $item->content_array[$data['attr_name']]['value']);

programming_language: PHP
filename: install.php
change_type: ModificationType.MODIFY
diff: @@ -1438,9 +1438,9 @@ try {
                   PRIMARY KEY (`identifier`)
                 ) ENGINE=InnoDB CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;");
 
-                    $randomHash = erLhcoreClassModelForgotPassword::randomPassword(9);
+                    $randomHash = erLhcoreClassModelForgotPassword::randomPassword(80);
                     $randomHashLength = strlen($randomHash);
-                    $exportHash = erLhcoreClassModelForgotPassword::randomPassword(9);
+                    $exportHash = erLhcoreClassModelForgotPassword::randomPassword(80);
 
                     if (extension_loaded('bcmath')){
                         $geoRow = "('geo_data','a:5:{i:0;b:0;s:21:\"geo_detection_enabled\";i:1;s:22:\"geo_service_identifier\";s:8:\"max_mind\";s:23:\"max_mind_detection_type\";s:7:\"country\";s:22:\"max_mind_city_location\";s:37:\"var/external/geoip/GeoLite2-City.mmdb\";}',0,'',1)";

programming_language: PHP
filename: explorer.php
change_type: ModificationType.MODIFY
diff: @@ -21,7 +21,7 @@ if ($Params['user_parameters_unordered']['action'] == 1) {
                 $url = [];
                 if (isset($function['url'])) {
                     foreach ($function['url'] as $urlData) {
-                        $url[] = (erLhcoreClassSystem::$httpsMode == true ? 'https:' : 'http:') . '//' . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurl('/') . preg_replace('/^lh/', '', $urlData);
+                        $url[] = erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurl('/') . preg_replace('/^lh/', '', $urlData);
                     }
                 }
                 fputcsv($fp, [

programming_language: PHP
filename: fetchchatmessages.php
change_type: ModificationType.MODIFY
diff: @@ -120,7 +120,7 @@ try {
                         $file = erLhcoreClassModelChatFile::fetch($fileID);
                         if (is_object($file) && $hash == $file->security_hash) {
 
-                            $url = (erLhcoreClassSystem::$httpsMode == true ? 'https:' : 'http:') . '//' . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurldirect('file/downloadfile') . "/{$file->id}/{$hash}";
+                            $url = erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurldirect('file/downloadfile') . "/{$file->id}/{$hash}";
 
                             $media[] = array(
                                 'id' => $file->id,

programming_language: PHP
filename: generateautologin.php
change_type: ModificationType.MODIFY
diff: @@ -57,7 +57,7 @@ try
 
         $hashValidation = sha1($params['secret_hash'].sha1($params['secret_hash'].implode(',', $dataRequest)));
 
-        return $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurldirect("user/autologin") . "/{$hashValidation}".implode('', $dataRequestAppend);
+        return erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurldirect("user/autologin") . "/{$hashValidation}".implode('', $dataRequestAppend);
     }
 
     $requestBody['secret_hash'] = $data['secret_hash'];

programming_language: PHP
filename: loginbytoken.php
change_type: ModificationType.MODIFY
diff: @@ -32,7 +32,7 @@ try {
                 header('Location: ' .erLhcoreClassDesign::baseurldirect('site_admin').'/'.ltrim($r, '/'));
                 exit;
             } else {
-                echo json_encode(array('error' => false, 'msg' => 'Session started', 'url' => erLhcoreClassXMP::getBaseHost() . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurldirect('site_admin').'/'.ltrim($r,'/')));
+                echo json_encode(array('error' => false, 'msg' => 'Session started', 'url' => erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurldirect('site_admin').'/'.ltrim($r,'/')));
                 exit;
             }
         } else {

programming_language: PHP
filename: swagger.php
change_type: ModificationType.MODIFY
diff: @@ -35,7 +35,7 @@ erLhcoreClassChatEventDispatcher::getInstance()->dispatch('restapi.swagger', arr
 
 echo str_replace(
     array('{{base_path}}','{{ts}}','{{host}}','{{append_definitions}}','{{append_paths}}', '{{chats_parameters}}','{{append_elastic_definitions}}','{{append_elastic_mail_definitions}}'),
-    array(erLhcoreClassDesign::baseurldirect(),time(),$_SERVER['HTTP_HOST'], $append_definitions, $append_paths, $chats_parameters,$elastic_definition,$elastic_mail)
+    array(erLhcoreClassDesign::baseurldirect(),time(),str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost()), $append_definitions, $append_paths, $chats_parameters,$elastic_definition,$elastic_mail)
     , $content);
 
 exit;

programming_language: PHP
filename: forgotpassword.php
change_type: ModificationType.MODIFY
diff: @@ -59,7 +59,7 @@ if (isset($_POST['Forgotpassword'])) {
 
 		if (($userID = erLhcoreClassModelUser::fetchUserByEmail($form->Email)) !== false) {
 
-			$host = $_SERVER['HTTP_HOST'];
+			$host = erLhcoreClassSystem::getHost();
 
 			$adminEmail = erConfigClassLhConfig::getInstance()->getSetting( 'site', 'site_admin_email' );
 

programming_language: PHP
filename: checkinvitation.php
change_type: ModificationType.MODIFY
diff: @@ -127,7 +127,7 @@ if (isset($reopen_chat)) {
                 $replaceStyleArray = array();
 
                 for ($i = 1; $i < 5; $i++) {
-                    $replaceStyleArray['{proactive_img_' . $i . '}'] = erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value . '//' . $_SERVER['HTTP_HOST'] . $userInstance->invitation->{'design_data_img_' . $i . '_url'};
+                    $replaceStyleArray['{proactive_img_' . $i . '}'] = erLhcoreClassSystem::getHost() . $userInstance->invitation->{'design_data_img_' . $i . '_url'};
                 }
 
                 $contentCSS = str_replace(array_keys($replaceStyleArray), array_values($replaceStyleArray), $userInstance->invitation->design_data_array['mobile_style']);

programming_language: PHP
filename: screensharesettings.php
change_type: ModificationType.MODIFY
diff: @@ -4,19 +4,19 @@ erLhcoreClassRestAPIHandler::setHeaders();
 $settings = array(
     'nodejssettings' => array(
         'nodejssocket' => erLhcoreClassModelChatConfig::fetch('sharing_nodejs_sllocation')->current_value,
-        'nodejshost' => (erLhcoreClassModelChatConfig::fetch('sharing_nodejs_socket_host')->current_value != '' ? erLhcoreClassModelChatConfig::fetch('sharing_nodejs_socket_host')->current_value : $_SERVER['HTTP_HOST']),
+        'nodejshost' => (erLhcoreClassModelChatConfig::fetch('sharing_nodejs_socket_host')->current_value != '' ? erLhcoreClassModelChatConfig::fetch('sharing_nodejs_socket_host')->current_value : str_replace(['http://','https://'],'',erLhcoreClassSystem::getHost())),
         'path' => erLhcoreClassModelChatConfig::fetch('sharing_nodejs_path')->current_value,
         'secure' => ((int)erLhcoreClassModelChatConfig::fetch('sharing_nodejs_secure')->current_value == 1 ? true : false)
     ),
     'auto_share' => (int)erLhcoreClassModelChatConfig::fetch('sharing_auto_allow')->current_value,
-    'cobrowser' => erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value . '//' . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::designJS('js/cobrowse/compiled/cobrowse.visitor.min.js'),
+    'cobrowser' => erLhcoreClassSystem::getHost() . erLhcoreClassDesign::designJS('js/cobrowse/compiled/cobrowse.visitor.min.js'),
     'nodejsenabled' => (int)erLhcoreClassModelChatConfig::fetch('sharing_nodejs_enabled')->current_value,
     'trans' => array(
         'operator_watching' => erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus', 'Screen shared, click to finish'),
         'start_share' => erTranslationClassLhTranslation::getInstance()->getTranslation('chat/screenshare','Start screen share session'),
         'deny' => erTranslationClassLhTranslation::getInstance()->getTranslation('chat/screenshare','Deny screen share'),
     ),
-    'url' => erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value . '//' . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurlsite() . '/cobrowse/storenodemap/(sharemode)/chat'
+    'url' => erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurlsite() . '/cobrowse/storenodemap/(sharemode)/chat'
 );
 
 erLhcoreClassChatEventDispatcher::getInstance()->dispatch('widgetrestapi.screensharesettings', array('output' => & $settings));

programming_language: PHP
filename: settings.php
change_type: ModificationType.MODIFY
diff: @@ -353,9 +353,9 @@ if ($disableNeedHelp === false && ((isset($theme) && $theme instanceof erLhAbstr
 
         if ($theme->need_help_image_url === false) {
             if ((isset($theme->bot_configuration_array['nh_avatar']) && $theme->bot_configuration_array['nh_avatar'] != '')) {
-                $replaceVars['replace'][8] = erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value . '//' . $_SERVER['HTTP_HOST'] .erLhcoreClassDesign::baseurldirect('widgetrestapi/avatar') . '/' . $theme->bot_configuration_array['nh_avatar'];
+                $replaceVars['replace'][8] = erLhcoreClassSystem::getHost() .erLhcoreClassDesign::baseurldirect('widgetrestapi/avatar') . '/' . $theme->bot_configuration_array['nh_avatar'];
             } else {
-                $replaceVars['replace'][8] = erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value . '//' . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::design('images/general/operator.png');
+                $replaceVars['replace'][8] = erLhcoreClassSystem::getHost() . erLhcoreClassDesign::design('images/general/operator.png');
             }
         }
 
@@ -372,7 +372,7 @@ if ($disableNeedHelp === false && ((isset($theme) && $theme instanceof erLhAbstr
                 '{{need_help_body}}',
             ),
             'replace' => array(
-                '//' . $_SERVER['HTTP_HOST'] . erLhcoreClassDesign::design('images/general/operator.png'),
+                erLhcoreClassSystem::getHost() . erLhcoreClassDesign::design('images/general/operator.png'),
                 $translationInstance->getTranslation('chat/getstatus', 'Need help?'),
                 $translationInstance->getTranslation('chat/getstatus', 'Our staff are ready to help!')
             )
@@ -480,13 +480,7 @@ if (isset($gaOptions['ga_enabled']) && $gaOptions['ga_enabled'] == true) {
     }
 }
 
-$host = erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value;
-
-if ($host == '') {
-    $host = erLhcoreClassBBCode::getHost();
-} else {
-    $host .= '//' . $_SERVER['HTTP_HOST'];
-}
+$host = erLhcoreClassSystem::getHost();
 
 $outputResponse['static'] = array(
     'screenshot' =>  $host . erLhcoreClassDesign::design('js/html2canvas.min.js'). '?v=' . $outputResponse['v'],
@@ -506,7 +500,7 @@ $outputResponse['static'] = array(
 );
 
 $outputResponse['chunks_location'] = $host . erLhcoreClassDesign::design('js/widgetv2');
-$outputResponse['domain_lhc'] = $_SERVER['HTTP_HOST'];
+$outputResponse['domain_lhc'] = str_replace(['http://','https://'],'',$host);
 
 erLhcoreClassChatEventDispatcher::getInstance()->dispatch('widgetrestapi.settings', array('output' => & $outputResponse));
 

programming_language: PHP
filename: updatejs.php
change_type: ModificationType.MODIFY
diff: @@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="//<?php echo $_SERVER['HTTP_HOST']?><?php echo erLhcoreClassDesign::design('js/widgetv2/index.js')?>?t=<?php echo time()?>"></script>
+    <script src="<?php echo erLhcoreClassSystem::getHost()?><?php echo erLhcoreClassDesign::design('js/widgetv2/index.js')?>?t=<?php echo time()?>"></script>
     <meta http-equiv="cache-control" content="no-cache, must-revalidate, post-check=0, pre-check=0" />
     <meta http-equiv="cache-control" content="max-age=0" />
     <meta http-equiv="expires" content="0" />

programming_language: PHP
filename: configuration.php
change_type: ModificationType.MODIFY
diff: @@ -61,7 +61,7 @@ if ($Params['user_parameters_unordered']['gtalkoauth'] == 'true') {
 	$client->setClientSecret($data['gtalk_client_secret']);
 	$client->setApprovalPrompt('force');
 	$client->setAccessType('offline');
-	$client->setRedirectUri(erLhcoreClassXMP::getBaseHost().$_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurl('xmp/configuration').'/(gtalkoauth)/true');
+	$client->setRedirectUri(erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurl('xmp/configuration').'/(gtalkoauth)/true');
 		
 	if (isset($_GET['code'])) {
 		try {			
@@ -168,7 +168,7 @@ if ( isset($_POST['StoreXMPGTalkSettings']) || isset($_POST['StoreXMPGTalkSettin
 		$client->setClientSecret($data['gtalk_client_secret']);
 		$client->setApprovalPrompt('force');
 		$client->setAccessType('offline');
-		$client->setRedirectUri(erLhcoreClassXMP::getBaseHost().$_SERVER['HTTP_HOST'] . erLhcoreClassDesign::baseurl('xmp/configuration').'/(gtalkoauth)/true');
+		$client->setRedirectUri(erLhcoreClassSystem::getHost() . erLhcoreClassDesign::baseurl('xmp/configuration').'/(gtalkoauth)/true');
 			
 		if ( !$client->getAccessToken() ) {
 			header('Location: '.$client->createAuthUrl());
@@ -176,7 +176,7 @@ if ( isset($_POST['StoreXMPGTalkSettings']) || isset($_POST['StoreXMPGTalkSettin
 		}
 	}
 	
-	$tpl->set('updated','done');	
+	$tpl->set('updated','done');
 }
 
 

programming_language: PHP
filename: settings.ini.default.php
change_type: ModificationType.MODIFY
diff: @@ -26,6 +26,9 @@ return array (
                     'maps_api_key' => false,
                     'default_group' => '',
                     'default_user' => '',
+                    'site_address' => '',
+                    'trusted_host_patterns' => [
+                    ],
                     'extensions' =>
                         array (
                             // 0 => 'customstatus',

programming_language: PHP