
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr valign="top">
    <td>&nbsp;</td>
  </tr>
  <tr valign="top">
    <td> {if $smarty.request.showlink==1}
      <!-- LINK ANZEIGEN // -->
      {include file="links/detail.tpl"} {else}
      <!-- UEBERSICHT ANZEIGEN // -->
      {assign var="cols" value=3} {assign var="maxsubs" value=3}
      <table width="100%"  border="0" cellpadding="4" cellspacing="1" class="box_inner">
        <tr>
          <td class="box_innerhead">{$headernav}</td>
        </tr>
        <tr>
          <td  style="padding:0px;"> {if $showsearch==1}
            <table width="100%"  border="0" cellspacing="1" cellpadding="3">
              <tr>
                <td class="box_outerhead">{$lang.filename}</td>
                <td width="1%" nowrap="nowrap" class="box_outerhead"><div align="center">{$lang.downloads}</div></td>
                <td width="1%" nowrap="nowrap" class="box_outerhead"><div align="center">{$lang.date}</div></td>
              </tr>
              {foreach from=$results item=res}
              <tr>
                <td><a href="index.php?showlink=1&amp;fid={$res->id}&amp;p=links&amp;area={$smarty.request.area}&amp;categ={$res->catid}">{$res->title}</a></td>
                <td nowrap="nowrap"><div align="center">{$res->hits}</div></td>
                <td nowrap="nowrap"><div align="center">{$res->ctime}</div></td>
              </tr>
              {/foreach}
            </table>
            {else}
            <table width="100%"  border="0" cellpadding="8" cellspacing="0">
              <tr> {foreach from=$dlcat item=item name=dl} {assign var="newtr" value=$newtr+1}
                <td width="{math equation='( x / z )' x=100 z=$cols}%" valign="top" ><table width="100%"  border="0" cellspacing="1" cellpadding="1">
                    <tr>
                      <td><img src="templates/{$theme}/img/page/folder.gif" alt=""  class="absmiddle" /><a title="{$item->visible_title}" class="download_link_title" href="index.php?categ={$item->catid}&amp;parent={$item->parent_id}&amp;p=links&amp;area={$area}">{$item->visible_title}</a> </td>
                    </tr>
                    <tr>
                      <td> {foreach from=$item->sub item=sub name=subs} {if $smarty.request.categ==""} {assign var="num" value=$num+1} {if ($num <= $maxsubs) } <img src="templates/{$theme}/img/page/folder_small.gif" alt="" hspace="6" vspace="0" class="absmiddle" /> <a title="{$sub->visible_title}" href="index.php?categ={$sub->catid}&amp;parent={$sub->parent_id}&amp;p=links&amp;area={$area}">{$sub->visible_title}</a> {if !$smarty.foreach.subs.last}<br />
                        {/if} {else} <img src="templates/{$theme}/img/page/folder_small.gif" alt="" hspace="6" vspace="0" class="absmiddle" /> <a href="index.php?categ={$item->catid}&amp;parent={$item->parent_id}&amp;p=links&amp;area={$area}">{$lang.showallcategs}</a>{/if} {else} <img src="templates/{$theme}/img/page/folder_small.gif" alt="" hspace="6" vspace="0" class="absmiddle" /> <a title="{$sub->visible_title}" href="index.php?categ={$sub->catid}&amp;parent={$sub->parent_id}&amp;p=links&amp;area={$area}">{$sub->visible_title}</a> ...{$sub->data}{if !$smarty.foreach.subs.last}<br />
                        {/if} {/if} {/foreach} {assign var="num" value=0} </td>
                    </tr>
                  </table></td>
                {if $newtr % $cols == 0}</tr>
              <tr>{/if} {/foreach} </tr>
            </table>
            {/if} </td>
        </tr>
      </table>
      {if $files} <br />
      <table width="100%"  border="0" cellpadding="4" cellspacing="1" class="box_inner">
        <tr>
          <td colspan="4" class="box_innerhead">{$lang.links_in_categ}</td>
        </tr>
        <tr>
          <td class="box_outerhead"><a href="index.php?pp={$smarty.request.pp}&amp;sort=name&amp;categ={$smarty.request.categ}&amp;parent={$smarty.request.parent}&amp;p=links&amp;area={$smarty.request.area}">{$lang.linkname}</a></td>
          <td width="2%" class="box_outerhead"><div align="center"><a href="index.php?pp={$smarty.request.pp}&amp;sort=hits&amp;categ={$smarty.request.categ}&amp;parent={$smarty.request.parent}&amp;p=links&amp;area={$smarty.request.area}">{$lang.hits}</a></div></td>
          <td class="box_outerhead"><div align="center"><a href="index.php?pp={$smarty.request.pp}&amp;sort=date&amp;categ={$smarty.request.categ}&amp;parent={$smarty.request.parent}&amp;p=links&amp;area={$smarty.request.area}">{$lang.date}</a></div></td>
          <td class="box_outerhead">&nbsp;</td>
        </tr>
        {foreach from=$files item=file name=fl}
        <tr>
          <td><a href="index.php?showlink=1&amp;fid={$file->id}&amp;p=links&amp;area={$smarty.request.area}&amp;categ={$smarty.request.categ}">{$file->title}</a></td>
          <td width="1%" nowrap="nowrap"><div align="center">{$file->hits}</div></td>
          <td width="1%" nowrap="nowrap"><div align="center">{$file->ctime}</div></td>
          <td width="1%" nowrap="nowrap"><div align="center"><a title="{$lang.quicklink}" href="javascript:getLink('{$area}','{$file->id}');"><img src="templates/{$theme}/img/page/quicklink.gif" alt="{$lang.quicklink}" border="0" class="absmiddle" /></a></div></td>
        </tr>
        {/foreach}
      </table>
	  
	  	   <br />
	   <table width="100%"  border="0" cellpadding="4" cellspacing="1" class="box_inner">
         <tr>
           <td>
		   <form name="dls" method="get" action="index.php">
		   <table  border="0" cellspacing="1" cellpadding="0">
             <tr>
               <td>
<select name="pp" id="pp">
{section name=pp loop=95 step=5}
<option value="{$smarty.section.pp.index+15}" {if $pp == $smarty.section.pp.index+15}selected{/if}>{$smarty.section.pp.index+15} / {$lang.eachsite}</option>
{/section}
 </select>
 </td>
<td>
<input name="categ" type="hidden" value="{$smarty.request.categ}" />
<input name="parent" type="hidden" value="{$smarty.request.parent}" />
<input name="p" type="hidden" value="links" />
<input name="area" type="hidden" value="{$area}" />
<input name="page" type="hidden" value="{$smarty.request.page}" />
<input type="submit" class="button" value="{$lang.show}">
				 </td>
               </tr>
           </table>
		   </form>
		   </td>
         </tr>
       </table>
	   {if $nav}
	  <br />
	  {$nav}
	  <br />
	  {/if}
      {/if}
	 {/if}
	 
	 
	 <br />
      {if $smarty.request.showlink!=1}
	  <br />
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="50%"><!-- BELIEBTEST LINKS (sort='hits') // -->
{getlinks template='links_top_last.tpl' sort='hits'}</td>
          <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          <td width="50%"><!-- NEUESTE LINKS(sort='last') // -->
{getlinks template='links_top_last.tpl' sort='last'}</td>
        </tr>
      </table>
      <!-- LINKS SUCHEN // -->
<form method="get" action="index.php">
  <table width="100%"  border="0" cellpadding="4" cellspacing="1" class="box_inner">
    <tr>
      <td class="box_innerhead">{$lang.search_link}</td>
    </tr>
    <tr>
      <td>          <input name="qlink" id="qlink" value="{$qlink}" size="50" />          <input type="submit" class="button" value="{$lang.search}" />          <input name="p" type="hidden" id="p" value="links" />          <input name="area" type="hidden" id="area" value="{$smarty.request.area}" />          <input name="do" type="hidden" id="do" value="search" />      </td>
    </tr>
  </table>
</form>
<!-- // LINK SUCHEN -->      
	  {/if}
	  <br />
    </td>
  </tr>
  <tr valign="top">
    <td>{if $numcomm} <a name="comments" id="comments"></a> {$comments} {/if} {$commentform} </td>
  </tr>
</table>
