<h1>{$Lang.WriteAdminTitle}</h1>
<a href="/user" class="back-to-user-menu">Back to user menu</a>
<div class="right-block">
   
   <h3 style="text-align: center;">История сообщений</h3>
    <ul class="list-messages">
        {foreach $ListMessages item=mes key=i}
        {if $mes[5] == 0 && $mes[0] == 'admin'}
            <li class="no-read admin-message"><time>{$mes[2]|date_format:"%D %H:%M"}</time> <span>{$mes[4]}</span></li>
        {elseif $mes[0] == 'admin'}
            <li class="admin-message"><time>{$mes[2]|date_format:"%D %H:%M"}</time> <span>{$mes[4]}</span></li>
        {elseif $mes[5] == 0}
            <li class="no-read">{$mes[4]} <time>{$mes[2]|date_format:"%D %H:%M"}</time></li>
        {else}
            <li>{$mes[4]} <time>{$mes[2]|date_format:"%D %H:%M"}</time></li>
        {/if}
        {/foreach}
        <div style="clear: both"></div>
    </ul>

<form method="POST" action="/user/writeadmin" id="feedback-form">
    Email для связи:
    <input type="email" value="{$OldMessage.email}" name="feedback_email" required placeholder="{$Lang.WriteAdminEmail}" x-autocompletetype="email">
    Ваше сообщение:
    <textarea name="feedback_text" required rows="5">{$OldMessage.text}</textarea>
    <input type="text" name="captcha"><img src="/captcha" style="height: 27px;  margin-top: -3px;" onclick="this.src='/captcha'">
    <br>
    <input name="send_to_admin" type="submit" value="{$Lang.WriteAdminButton}">
</form>
</div>