<h2><?php 
echo erTranslationClassLhTranslation::getInstance()->getTranslation('questionary/previewanswer', 'Preview the answer');
?>
</h2>
<p><?php 
echo erLhcoreClassBBCode::make_clickable(htmlspecialchars($answer->answer));
?>
</p>
<br>
<div class="message-row chatbox-row"><span class="usr-tit radius" data-sender="<?php 
echo htmlspecialchars($msg->name_support);
?>
"><?php 
echo htmlspecialchars($msg->name_support);
?>
<div class="msg-date"><?php 
if (date('Ymd') == date('Ymd', $msg->time)) {
    echo date(erLhcoreClassModule::$dateHourFormat, $msg->time);
} else {
    echo date(erLhcoreClassModule::$dateDateHourFormat, $msg->time);
}
?>
</div></span><?php 
echo erLhcoreClassBBCode::make_clickable(htmlspecialchars($msg->msg));
?>
</div>
{{SPLITTER}}
<div class="message-row-in"><?php 
echo erLhcoreClassBBCode::make_clickable(htmlspecialchars($msg->msg));
?>
</div>
<div class="message-row message-admin"><div class="msg-date"><?php 
echo date(erLhcoreClassModule::$dateHourFormat, time() - 5);
?>
</div><?php 
if ($profileShown == false) {
    ?>
<span class="usr-tit op-tit"><?php 
    echo $visitor->operator_user !== false ? htmlspecialchars($visitor->operator_user->name_support) : (!empty($visitor->operator_user_proactive) ? htmlspecialchars($visitor->operator_user_proactive) : erTranslationClassLhTranslation::getInstance()->getTranslation('chat/startchat', 'Live Support'));
    ?>
</span><?php 
}
echo erLhcoreClassBBCode::make_clickable(htmlspecialchars($visitor->operator_message));
?>
</div>
    echo time();
    ?>
',$(this))">
	<?php 
    if ($voting !== false) {
        ?>
	<h4 class="mt0 mb5"><?php 
        echo htmlspecialchars($voting->question);
        ?>
</h4>

	<?php 
        if ($voting->question_intro != '') {
            ?>
	<p class="fs11 subheader"><?php 
            echo erLhcoreClassBBCode::make_clickable(htmlspecialchars($voting->question_intro));
            ?>
</p>
	<?php 
        }
        ?>

	<?php 
        if (isset($errors)) {
            ?>
			<?php 
            include erLhcoreClassDesign::designtpl('lhkernel/validation_error.tpl.php');
            ?>
	<?php 
        }
        ?>
        ?>

<?php 
        if (isset($errors)) {
            ?>
		<?php 
            include erLhcoreClassDesign::designtpl('lhkernel/validation_error.tpl.php');
        }
        ?>

<?php 
        $hasExtraField = false;
        if ($theme !== false && $theme->explain_text != '') {
            ?>
<p class="start-chat-intro"><?php 
            echo erLhcoreClassBBCode::make_clickable(htmlspecialchars($theme->explain_text));
            ?>
</p>
<?php 
        }
        ?>

<form method="post" id="form-start-chat" action="<?php 
        echo erLhcoreClassDesign::baseurl('chat/chatwidget');
        echo $append_mode;
        $department !== false ? print '/(department)/' . $department : '';
        $input_data->priority !== false ? print '/(priority)/' . $input_data->priority : '';
        $input_data->vid !== false ? print '/(vid)/' . htmlspecialchars($input_data->vid) : '';
        $input_data->hash_resume !== false ? print '/(hash_resume)/' . htmlspecialchars($input_data->hash_resume) : '';
        $leaveamessage == true ? print '/(leaveamessage)/true' : '';
        $forceoffline == true ? print '/(offline)/true' : '';
?>
 <div class="right">IP:<?php 
echo $chat->ip;
?>
, ID: <?php 
echo $chat->id;
?>
</div></h2>
<?php 
if ($chat->remarks != '') {
    ?>
<h3><?php 
    echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/adminchat', 'Remarks');
    ?>
</h3>
<p><?php 
    echo erLhcoreClassBBCode::make_clickable(htmlspecialchars($chat->remarks));
    ?>
</p>
<?php 
}
?>
<h3><?php 
echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/adminchat', 'Messages');
?>
</h3>
<br>
<?php 
include erLhcoreClassDesign::designtpl('lhchat/lists/msg_obj_list_admin.tpl.php');
?>
</div>