{include file="header.tpl"}
<div class="directory">

<h3>{t}Links Directory{/t}</h3>

{if $frm.say == 'added'}
<div class="ok">{t}Thank you. Your link has been accepted and will be alive after admin approve it.{/t}</div>
{/if}

{section name=c loop=$cats}
<div class="subs"><a href="{"?a=directory&cat=`$cats[c].id`"|encurl}">{$cats[c].name|escape:htmlall}</a></div>
{if $smarty.section.c.index % 2 == 1}<div class="clearall"></div>{/if}
{/section}
<div class="clearall"></div>

<div class="list">
 <div class="header clearfix">
 <h1><a href="{"?a=directory"|encurl}">Main</a> {foreach from=$path item=p} :: <a href="{"?a=directory&cat=`$p.id`"|encurl}">{$p.name}</a>{/foreach}</h1>
 <a href="{"?a=directory&action=add_form&cat=`$cat.id`"|encurl}" class="staff">{t}Add Link{/t}</a>
 </div>
</div>
<br>
{if $links}
{foreach from=$links item=l}
<div class="link clearfix">
   <div class="info">
   <a href="{"?a=directory&out=`$l.id`"|encurl}">{$l.title|escape:htmlall}</a>
   {t date=$l.fdate in=$l.t_in out=$l.t_out}(Added: %date - In/Out: %in/%out){/t}<br>
   {$l.description|escape:htmlall}<br>
   <small>{$l.url|escape:htmlall}</small>
   </div>
   <div class="button"><a href="{"?a=directory&out=`$l.id`"|encurl}"><img src="{$l.button_url|escape:htmlall}" width=120 height=60></a></div>
</div>
{/foreach}
{elseif $cat}
<br>
{t}No listings in this category.{/t}
{/if}

</div>

{include file="footer.tpl"}