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

<h3>Links Directory:</h3>

{if $frm.say == 'added'}
<div class="ok">Thank you. Your link has been accepted and will be alive after admin approve it.</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">Add Link</a>
 </div>
</div>
<br>
{if $links}
{section name=l loop=$links}
<div class="link clearfix">
   <div class="info">
   <a href="{"?a=directory&out=`$links[l].id`"|encurl}">{$links[l].title|escape:htmlall}</a>
   (Added: {$links[l].fdate|escape:htmlall} - In/Out: {$links[l].t_in}/{$links[l].t_out})<br>
   {$links[l].description|escape:htmlall}<br>
   <small>{$links[l].url|escape:htmlall}</small>
   </div>
   <div class="button"><a href="{"?a=directory&out=`$links[l].id`"|encurl}"><img src="{$links[l].button_url|escape:htmlall}" width=120 height=60></a></div>
</div>
{/section}
{elseif $cat}
<br>
No listings in this category.
{/if}

</div>

{include file="footer.tpl"}