{if $header_id neq true}
    {include file="1549864.tpl"}
{/if}
<table width=100%>
    <tr>
        <td valign="top" width="23%">
            {include file="1549793.tpl"}
        </td>
        <td valign="top">
            <form enctype="multipart/form-data" method="post" name="formular" id="formular">
            {get_date assign="today"}{get_date assign="prevmonth" add="-2592000"}

between <input type="text" name="date_from" style="width: 70px;" value="{if $post_vars.date_from neq false}{$post_vars.date_from}{else}{$prevmonth.mday}.{$prevmonth.mon}.{$prevmonth.year}{/if}" />
and <input type="text" name="date_to" style="width: 70px;" value="{if $post_vars.date_to neq false}{$post_vars.date_to}{else}{$today.mday}.{$today.mon}.{$today.year}{/if}" />&nbsp;
<input type="text" name="search_text" value="{if $post_vars.search_text neq ''}{$post_vars.search_text}{/if}" />&nbsp;
<select name="search_type"><option value="text">content</option></select>&nbsp;
<input type="submit" name="template_event" value="filter_by" />

                {if $template_event eq 'filter_by'}
                    {if $post_vars.search_text neq ''}
                        {get_mail_archive date_from=$post_vars.date_from date_to=$post_vars.date_to listing_amount=$listing_amount offset=$offset search=$post_vars.search_text search_type=$post_vars.search_type}
                    {else}
                        {get_mail_archive date_from=$post_vars.date_from date_to=$post_vars.date_to listing_amount=$listing_amount offset=$offset}
                    {/if}
                {else}
                    {get_mail_archive date_from=$prevmonth.full date_to=$today.full listing_amount=$listing_amount offset=$offset}
                {/if}

                {section name=msg loop=$get_mail_archive}
                <div class='msg' style=' margin-bottom:0.5em; position:relative;'>
                    <img width='50' src='{get_image_link id=$get_mail_archive[msg].user_from}' style='float:left; margin-left:5px;' alt='{$get_mail_archive[msg].user_from_name}' />
                    <div class='header' style='height:auto; margin-left:61px; padding-left:0.1em'>
                        <a href="#">{$get_mail_archive[msg].user_from_name}</a>
                        &nbsp;&nbsp;-->&nbsp;&nbsp;
                        <a href="#">{$get_mail_archive[msg].user_to_name}</a>
                        &nbsp;&nbsp;--&nbsp;&nbsp;
                    <input type='checkbox' name='msg[{$get_mail_archive[msg].mail_archive_id}]' id='msg_{$smarty.section.msg.index}' class="mail_checkbox" /><br />
                    {$get_mail_archive[msg].date|date_format:"%H:%M:%S - %d.%m.%Y"}
                    </div>
                    <div class='content' style='margin:0; margin-left:61px;'>
                        {$get_mail_archive[msg].text|nl2br|stripslashes|imagestrip}
                    </div>
                    <hr style='clear:left; height: 1px; border: none; margin:0; visibility: hidden;'>
                </div>
                {/section}
            </form>
        </td>
    </tr>
</table>
{include file="1549377.tpl"}