Gets chats messages, used to review chat etc.
public static getChatMessages ( $chat_id ) |
?> <div id="messages" > <div class="msgBlock" <?php if (erLhcoreClassModelChatConfig::fetch('mheight')->current_value > 0) { ?> style="height:<?php echo (int) erLhcoreClassModelChatConfig::fetch('mheight')->current_value; ?> px"<?php } ?> id="messagesBlock"><?php $lastMessageID = 0; $lastOperatorChanged = false; $lastOperatorId = false; foreach (erLhcoreClassChat::getChatMessages($chat_id) as $msg) { if ($lastOperatorId !== false && $lastOperatorId != $msg['user_id']) { $lastOperatorChanged = true; } else { $lastOperatorChanged = false; } $lastOperatorId = $msg['user_id']; ?> <?php include erLhcoreClassDesign::designtpl('lhchat/lists/user_msg_row.tpl.php'); ?> <?php $lastMessageID = $msg['id']; }
<a title="<?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/chat', 'Show/Hide right column'); ?> " href="#" class="icon-right-circled collapse-right" onclick="lhinst.processCollapse('<?php echo $chat->id; ?> ')"></a> <div class="message-block pb10"> <div class="msgBlock msgBlock-admin" id="messagesBlock-<?php echo $chat->id; ?> "> <?php $LastMessageID = 0; $messages = erLhcoreClassChat::getChatMessages($chat->id); ?> <?php include erLhcoreClassDesign::designtpl('lhchat/syncadmin.tpl.php'); ?> <?php if (isset($msg)) { $LastMessageID = $msg['id']; } ?> <?php if ($chat->user_status == 1) { ?> <?php include erLhcoreClassDesign::designtpl('lhchat/userleftchat.tpl.php');