{literal}
<style type="text/css">
    div.c-block {
        margin-right: 10px;
        margin-bottom: 15px;
    }
    .t-title {
        margin-right: 10px;
        background: url(/modules/mod_fromboard/images/ar.png) center left no-repeat;
        padding-left: 7px;
        display: inline-block;
        float: left;
    }
     span.city {
        float: right;
      color: rgb(136, 136, 136);  
    }
    .t-title a {
        font-size: 17px;
        color: #333;
        padding-left: 10px;
        text-decoration: none;
    }
    .item_block, .ttitle {
        margin-right: 5px;
    }
    div.t-date {
        font-size: 12px;
        color: #9fb2bd;
    }
    div.t_new {
        background: #ad0707;
        color: #fff;
        text-transform: uppercase;
        font-size: 8px;
        display: inline-block;
        padding: 0px 10px;
        border-radius: 3px;
    }
    div.t_border {
        border-left:1px solid #ccc;
        padding-left: 10px;
        font-size:16px;
    }
    a.t_lnk{
        color: #4d4d4d;
        font-size: 12px;
        text-decoration: none
    }
    a.t_lnk:hover {
        text-decoration: underline
    }
    table.t_list td {
        border-bottom: 1px solid #ccc;
        padding: 5px 2px;
    }
</style>
{/literal}
<script type="text/javascript" src="/modules/mod_fromboard/js/unitip.js"></script>

<link href="/modules/mod_fromboard/css/unitip.css" rel="stylesheet" type="text/css" /> 

 <table width="100%" border="0"> 
	{foreach key=tid item=category from=$categories}
 {assign var="q" value="1"} 
  {if $q==1} <tr> {/if}   <td>
        <div class="c-block">
            <div class="ttitle">
                <div class="t-title"><a href="/board/{$category.id}">{$category.title}</a> ({$category.count})</div>
                <div style="clear: both "></div>
            </div>
            <div class="item_block">
      
    <table class="t_list" width="100%">
	
{foreach key=tid item=item from=$items}     
{if $item.category_id==$category.id} 

           <tr>
      <td width="90px;">   
             {if $item.pubdate==1}  <div class="t_new"> <img src="/upload/board/cat_icons/{$category.icon}" width="15px;">  
                                    Новое
                                </div>
                                   {else}
                        <div class="t-date"> <img src="/upload/board/cat_icons/{$category.icon}" width="25px;"> 
                                {$item.pubdate}
                            </div>             
                           {/if}        
                                   
                            </td>
                            <td>
                                <div class="t_border">
{if $item.img }                  
             <a class="tip" href="#" img="/images/board/medium/{$item.file}"><img src="/modules/mod_fromboard/images/foto.png"></a>                 
{else}
<img src="/modules/mod_fromboard/images/nofoto.png">                
{/if}
      <a href="/board/read{$item.id}.html">{$item.title} </a><span class="city"> - {$item.city} </span>
                                  
                                </div>
                            </td>
                           
                        </tr>

 {/if} 

{/foreach}      

    </table>
            </div>
        </div>
   </td>   {if $q==1} </tr> {assign var="q" value="1"} {else} {math equation="x + 1" x=$q assign="q"} {/if}

	{/foreach}
</table>   
<div style="clear: both;"></div>
                                         