?>
	    <input class="form-control" type="text" class="mt5 mb0" placholder="Nick" title="Nick" value="<?php 
            echo htmlspecialchars(erLhcoreClassChatbox::getVisitorName(), ENT_QUOTES);
            ?>
" id="CSChatNick" />
	    <?php 
        }
        ?>
	</div>

    <div class="pt5">
    	<?php 
        if (isset($_GET['dnc']) && $_GET['dnc'] == 'true') {
            ?>
    		<span><?php 
            echo htmlspecialchars(erLhcoreClassChatbox::getVisitorName(), ENT_QUOTES);
            ?>
</span>
    	<?php 
        }
        ?>
        <textarea class="form-control" rows="4" name="ChatMessage" placeholder="<?php 
        echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/chat', 'Enter your message');
        ?>
" id="CSChatMessage"></textarea>
        <script type="text/javascript">
        jQuery('#CSChatMessage').bind('keydown', 'return', function (evt){
            lhinst.addmsguserchatbox();
            return false;
        });
        </script>
Example #2
0
<?php

header('P3P: CP="NOI ADM DEV COM NAV OUR STP"');
header('Content-type: text/javascript');
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', time() + 60 * 60 * 8) . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
$theme = false;
if (isset($Params['user_parameters_unordered']['theme']) && (int) $Params['user_parameters_unordered']['theme'] > 0) {
    $theme = (int) $Params['user_parameters_unordered']['theme'];
} else {
    $defaultTheme = erLhcoreClassModelChatConfig::fetch('default_theme_id')->current_value;
    if ($defaultTheme > 0) {
        $theme = (int) $defaultTheme;
    }
}
$tpl = erLhcoreClassTemplate::getInstance('lhchatbox/embed.tpl.php');
$tpl->set('heightchatcontent', !is_null($Params['user_parameters_unordered']['chat_height']) && (int) $Params['user_parameters_unordered']['chat_height'] > 0 ? (int) $Params['user_parameters_unordered']['chat_height'] : 220);
$tpl->set('nick', erLhcoreClassChatbox::getVisitorName());
$tpl->set('theme', $theme);
echo $tpl->fetch();
exit;
Example #3
0
         $prevNick = '';
         if ($Params['user_parameters']['message_id'] > 0 && count($Messages) > 1) {
             $lastMessage = array_shift($Messages);
             if ($lastMessage['id'] == $Params['user_parameters']['message_id']) {
                 $prevNick = $lastMessage['user_id'] == 0 ? $lastMessage['name_support'] : $chat->nick;
             } else {
                 array_unshift($Messages, $lastMessage);
             }
         }
         $tpl = erLhcoreClassTemplate::getInstance('lhchatbox/syncuser.tpl.php');
         $tpl->set('messages', $Messages);
         $tpl->set('chat', $chat);
         $tpl->set('prev_nick', $prevNick);
         $tpl->set('sync_mode', isset($Params['user_parameters_unordered']['mode']) ? $Params['user_parameters_unordered']['mode'] : '');
         $content = $tpl->fetch();
         $visitorName = erLhcoreClassChatbox::getVisitorName();
         foreach ($Messages as $msg) {
             if ($msg['name_support'] != $visitorName) {
                 $userOwner = 'false';
                 break;
             }
         }
         $LastMessageIDs = array_pop($Messages);
         $LastMessageID = $LastMessageIDs['id'];
         $breakSync = true;
     }
 }
 if ($chat->is_operator_typing == true && $Params['user_parameters_unordered']['ot'] != 't') {
     $ott = $chat->operator_typing_user !== false ? $chat->operator_typing_user->name_support . ' ' . erTranslationClassLhTranslation::getInstance()->getTranslation('chat/chat', 'is typing now...') : erTranslationClassLhTranslation::getInstance()->getTranslation('chat/chat', 'Operator is typing now...');
     $breakSync = true;
 } elseif ($Params['user_parameters_unordered']['ot'] == 't' && $chat->is_operator_typing == false) {