
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr valign="top">
    <td>&nbsp;</td>
  </tr>
  <tr valign="top">
    <td>{if $smarty.request.showfile==1}
      <!-- DOWNLOAD ANZEIGEN // -->
      {include file="download/detail.tpl"}
      <!-- GALERIEN ZU DER DATEI // -->
{if $row_f->gallery}
<table width="100%"  border="0" cellpadding="4" cellspacing="1" class="box_inner">
  <tr>
    <td class="box_innerhead">{$lang.download_galleries}</td>
  </tr>
  <tr>
    <td style="padding:0px"><div align="center"> {$linkedgaleries} </div></td>
  </tr>
</table>
<br />
{/if}
<!-- // GALERIEN ZU DER DATEI  -->{else}
      <!-- UEBERSICHT ANZEIGEN // -->
      {assign var="cols" value=2}
      {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.filesize}
                  </div></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?showfile=1&amp;fid={$res->id}&amp;p=downloads&amp;area={$smarty.request.area}&amp;categ={$res->catid}">
                  {$res->title}
                  </a></td>
                <td nowrap="nowrap"><div align="center">
                    {$res->size}
                  </div></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=downloads&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=downloads&amp;area={$area}">
                        {$sub->visible_title}
                        </a>
                        {if !$smarty.foreach.subs.last}
                        <br />
                        {/if}
                        {else}
						{if $smarty.foreach.subs.last}
                        <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=downloads&amp;area={$area}">
                        {$lang.showallcategs}
                        </a>
						{/if}
                        {/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=downloads&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="5" class="box_innerhead">{$lang.downloads_files}</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=downloads&amp;area={$smarty.request.area}">
            {$lang.filename}
            </a></td>
          <td width="18%" class="box_outerhead"><div align="center"><a href="index.php?pp={$smarty.request.pp}&amp;sort=size&amp;categ={$smarty.request.categ}&amp;parent={$smarty.request.parent}&amp;p=downloads&amp;area={$smarty.request.area}">
              {$lang.filesize}
              </a></div></td>
          <td width="14%" 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=downloads&amp;area={$smarty.request.area}">
              {$lang.downloads}
              </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=downloads&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?showfile=1&amp;fid={$file->id}&amp;p=downloads&amp;area={$smarty.request.area}&amp;categ={$smarty.request.categ}">
            {$file->title}
            </a>
            {if $file->password!=""}
&nbsp;<img class="absmiddle" src="templates/{$theme}/img/page/password_protect.gif" alt="" />
            {/if}
          </td>
          <td width="1%" nowrap="nowrap"><div align="center">
              {$file->size}
            </div></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:getFile('{$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="downloads" />
                 <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>
	   <br />
	   <table width="100%"  border="0" cellspacing="0" cellpadding="0">
         <tr>
           <td width="50%"><!-- BELIEBTEST DOWNLOADS (sort='hits') // -->
      {getdownloads template='downloads_top_last.tpl' sort='hits'}</td>
           <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
           <td width="50%"><!-- NEUESTE DOWNLOADS (sort='last') // -->
      {getdownloads template='downloads_top_last.tpl' sort='last'}</td>
         </tr>
       </table>
	   <!-- DOWNLOAD 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_download}</td>
           </tr>
           <tr>
             <td>                <input name="qdownload" type="text" value="{$qdownload}" size="50" />               <input type="submit" class="button" value="{$lang.search}" />               <input name="p" type="hidden" value="downloads" />               <input name="area" type="hidden"  value="{$area}" />               <input name="do" type="hidden"  value="search" />             </td>
           </tr>
         </table>
       </form>
       <!-- // DOWNLOAD SUCHEN -->{if $nav}
	  <br />
	  {$nav}
	  <br />
	  {/if}
      {/if}
      {/if}
      <br />
      <br />
    </td>
  </tr>
  <tr valign="top">
    <td>{if $numcomm}
      <a name="comments" id="comments"></a>
      {$comments}
      {/if}
      {$commentform}
    </td>
  </tr>
</table>
