<script type="text/javascript" src="/modules/mod_alfacontent/js/alfa.js"></script>

<div style="text-align: center;">
{foreach key=y item=con from=$cons}
    {if $con.url == '1'}

        <a href="#" onclick="getalfa('{$con.alf}', '{$module_id}');  return false;">{$con.alf}</a>
        {else}
        {$con.alf}
    {/if}
{/foreach}
</div>
<div style="display: block; overflow: hidden;">

{foreach key=y item=cat from=$cats}

    <div style="width:50%; float:left;">
        <div style="margin-right: 10px">
        <a href="#" onclick="getcat('{$cat.id}', '{$module_id}');  return false;"
           style="font-size: 18px;color: #333;text-decoration: none;">{$cat.title}  ({$cat.num})</a>
        <br>
        {foreach key=y item=pcat from=$pcats}
            {if $cat.id == $pcat.parent_id}
            <div style="padding-left: 10px" class="links">
                <a href="#" onclick="getcat('{$pcat.id}', '{$module_id}');  return false;"
                   style="font-size: 10px; color: #333; text-decoration: none;">{$pcat.title}  ({$pcat.num})</a>
            </div>
            {/if}
        {/foreach}
        </div>
    </div>
{/foreach}
</div>
<form action="/modules/mod_alfacontent/ajax/search.php" method="post">
    <input type="text" name="word" id="search_wor" class='search_wor'/>
    <input type="submit" value="Поиск" class="search_button" id="{$module_id}" style="float: left; margin: 0 !important; height: 34px !important;"/>
    <div class="clear"></div>
    <span>Соритировать по: </span>
    <select name="orderby" id="search_orderb" class='search_orderb'>
        <option value="fpubdate">По дате</option>
        <option value="con.hits">По просмотрам</option>
        <option value="con.rating">По рейтингу</option>
    </select>
</form>

<div id="alfacon" class="update" style="display: block; overflow: hidden; margin-top:30px;">
    <script type="text/javascript" src="/modules/mod_alfacontent/js/rating.js"></script>

{foreach key=k item=artle from=$artles}
<div style="width:100%; height: 120px;">
<table>
<tr>
<td style="padding-top:0; width:30px;">
<div>
    {if $artle.rat}<a href="#">
    <div class="rating" id="{$artle.id}" rat="pos">
    {/if}
    <div style="width:30px; height:39px; text-align: center; line-height:39px; background:url(/modules/mod_alfacontent/1-1.jpg) repeat-x; overflow:hidden;">

        <b style="display:block; margin-top:-7px; color:#777777;
">
            {$artle.pos}</b>
    </div>{if $artle.rat}</a></div><a href="#">
<div class="rating" id="{$artle.id}" rat="neg">{/if}
    <div style="width:30px; height:39px; text-align: center; line-height:39px; background:url(/modules/mod_alfacontent/2-2.jpg) repeat-y; overflow:hidden;
">


        <b style="display:block; margin-top:-7px; color:#777777;
">{$artle.neg}</b>
    </div>{if $artle.rat}</a></div>{/if}
</div>
</td>
<td>
<td>
    <div style=" float:left;">

        <img src="{$artle.image}" width="{$cfg.widtchi}px" height="{$cfg.heighti}px"/>
    </div>
</td>
<td style="padding-top:0; width:100%;">
    <div style="width:100%; float:left; margin-left:10px; margin-top:0; display:block; overflow:hidden;">

        <c style="font-size: 11px;color: #198fcf;">{$artle.fpubdate} {$artle.author}</c>
        <br>
        <b style="font-size: 14px;color: #1e92d0;">{$artle.title}</b>
        <b style="color:#000; font-size: 12px; margin-left:10px;">{$artle.description|truncate:$cfg.counttit:"..."}</b>
    </div>
    <div style="width:auto; float:right; margin:0; margin-right:20px; display:block; overflow:hidden;
">
        <c style="font-size: 11px;color: #198fcf;">просмотров {$artle.hits} | комментариев {$artle.comments} </c>
        <a style="font-size: 11px;color: #fff; background: #f00; padding: 2px 10px ;" href="{$artle.seolink}.html">подробнее...</a>

    </div>
</td></tr></table>
</div>
{/foreach}

</div>