<{include file='db:wfdownloads_header.html'}>

<div><{$description}></div><br />

<{if $subcategories}>
<fieldset><legend style="font-weight: bold; color: #639ACE;"><{$smarty.const._MD_WFD_SUBCATLISTING}></legend>
<div style="padding: 2px;">
<div align= "left" style="margin-left: 5px; padding: 0px;">
 <table width="80%">
  <tr>
   <{foreach item=subcat from=$subcategories}>
    <td><a href="viewcat.php?cid=<{$subcat.id}>"><{$subcat.title}></a>&nbsp;(<{$subcat.totallinks}>)<br />
<!-- removed below due to issues with subcats display when deeper than 2 levels
		<{if $subcat.infercategories}>
			<{foreach item=subsubcat from=$subcat.infercategories}>
			    <{$subsubcat.title}>
	    	<{/foreach}>
	    <{/if}>
-->
	</td>
	 <{if $subcat.count is div by 2}>
      </tr><tr>
     <{/if}>
   <{/foreach}>
   </tr>
 </table>    
</div></fieldset>
<br />
<{/if}>

<div><b><{$category_path}></b></div><br />

<{if $show_links == true}> 
<div align="center"><small>
<b><{$smarty.const._MD_WFD_SORTBY}></b>&nbsp;<{$smarty.const._MD_WFD_TITLE}> (
<a href="viewcat.php?cid=<{$category_id}>&amp;orderby=titleA">
<img src="images/up.gif" align="middle" alt="" /></a>
<a href="viewcat.php?cid=<{$category_id}>&amp;orderby=titleD">
<img src="images/down.gif" align="middle" alt="" /></a>
)
&nbsp;
<{$smarty.const._MD_WFD_DATE}> (
<a href="viewcat.php?cid=<{$category_id}>&amp;orderby=dateA">
<img src="images/up.gif" align="middle" alt="" /></a>
<a href="viewcat.php?cid=<{$category_id}>&amp;orderby=dateD">
<img src="images/down.gif" align="middle" alt="" /></a>
)
&nbsp;
<{$smarty.const._MD_WFD_RATING}> (
<a href="viewcat.php?cid=<{$category_id}>&amp;orderby=ratingA">
<img src="images/up.gif" align="middle" alt="" /></a>
<a href="viewcat.php?cid=<{$category_id}>&amp;orderby=ratingD">
<img src="images/down.gif" align="middle" alt="" /></a>
)
&nbsp;
<{$smarty.const._MD_WFD_POPULARITY}> (
<a href="viewcat.php?cid=<{$category_id}>&amp;orderby=hitsA">
<img src="images/up.gif" align="middle" alt="" />
</a><a href="viewcat.php?cid=<{$category_id}>&amp;orderby=hitsD">
<img src="images/down.gif" align="middle" alt="" /></a>
)
<br />
<b><{$lang_cursortedby}></b>
</small></div>
<br />
<{/if}>

<{if $page_nav == true}>
<div><{$smarty.const._MD_WFD_PAGES}>: <{$pagenav}></div><br />
<{/if}>

<table width="100%" cellspacing="0" cellpadding="10" border="0">
 <tr>
  <td width="100%">
   <!-- Start link loop -->
   <{section name=i loop=$file}>
     <{include file="db:wfdownloads_download.html" down=$file[i]}>
   <{/section}>
   <!-- End link loop -->
  </td>
 </tr>
</table>

<{if $page_nav == true}>
<div align="right"><{$smarty.const._MD_WFD_PAGES}>: <{$pagenav}></div>
<{/if}>

<{include file='db:wfdownloads_footer.html'}>