<br />
<form method="post" action="">
  <table width="100%" border="0" cellpadding="3" cellspacing="1" class="box_inner">
    <tr>
      <td style="padding:15px" class="row_second" colspan="6">
        <select name="orderby" id="orderby">
          <option value="date" {if $smarty.request.orderby == "date"}selected="selected"{/if}>{$lang.bydate}</option>
          <option value="author" {if $smarty.request.orderby == "author"}selected="selected"{/if}>{$lang.byauthor}</option>
          <option value="title" {if $smarty.request.orderby == "title"}selected="selected"{/if}>{$lang.bytitle}</option>
          <option value="posi" {if $smarty.request.orderby == "posi"}selected="selected"{/if}>{$lang.byposi}</option>
        </select>
        <select name="ascdesc" id="ascdesc">
          <option value="asc" {if $smarty.request.ascdesc == "asc"}selected="selected"{/if}>{$lang.asc_t}</option>
          <option value="desc" {if $smarty.request.ascdesc == "desc"}selected="selected"{/if}>{$lang.desc_t}</option>
        </select>
        <input type="submit" class="button" value="{$lang.buttonsort}" />
       
		<br /><br />
		<a  class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=1&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">[0-9]</a>
		<a  class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=a&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">A</a>
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=b&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">B</a>
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=c&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">C</a>
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=d&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">D</a>
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=e&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">E</a> 
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=f&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">F</a> 
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=g&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">G</a> 
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=h&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">H</a> 
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=i&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">I</a> 
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=j&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">J</a> 
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=k&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">K</a> 
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=l&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">L</a> 
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=m&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">M</a> 
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=n&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">N</a> 
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=o&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">O</a> 
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=p&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">P</a> 
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=q&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">Q</a> 
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=r&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">R</a> 
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=s&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">S</a> 
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=t&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">T</a> 
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=u&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">U</a> 
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=v&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">V</a> 
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=w&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">W</a>
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=x&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">X</a>
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=y&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">Y</a>
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=z&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">Z</a>
		<a class="page_navigation" href="index.php?do=sort&amp;p=gallery&amp;area={$area}&amp;charakter=all&amp;orderby={$smarty.request.orderby}&amp;ascdesc={$smarty.request.ascdesc}">{$lang.all}</a>
		
		</td>
    </tr>
    <tr>
      <td class="box_innerhead">&nbsp;</td>
      <td class="box_innerhead">{$lang.thegalname}</td>
      <td width="5%" class="box_innerhead"><div align="center">{$lang.gallerypicsincluded}</div></td>
      <td width="5%" class="box_innerhead"><div align="center">{$lang.createdon}</div></td>
      <td width="5%" class="box_innerhead"><div align="center">{$lang.author}</div></td>
    </tr>
    {foreach from=$gallery item=item}
		{if $item->parent_id == 0}
    <tr class="{cycle name="c0" values="row_second,row_first"}">
      <td width="1%" class="box_td_spacer">
	  	<a href="{$item->glink}"><img src="system/thumb.php?img_id={$item->galthumb}&amp;smode=1" alt="" border="0" /></a>
	  </td>
      <td class="box_td_spacer">
	  	<strong><a href="{$item->glink}">{$item->visible_title}</a></strong>
		<br />
        <span class="intro">{$item->descr|truncate:200}</span>
			<br />
			{foreach from=$item->subgalleries item=child}
				<a class="light" href="index.php?area={$area}&amp;p=gallery&amp;action=showimages&amp;galid={$child->id}"><small>{$child->title}</small></a> ({$child->pics})&nbsp;&nbsp;
			{/foreach}
	
	  </td>
      <td class="box_td_spacer" nowrap="nowrap"><div align="center">{if $item->pics > 0}{$item->pics}{else}{$lang.nogallerypics}{/if}</div></td>
      <td class="box_td_spacer" nowrap="nowrap"><div align="center">{$item->created}</div></td>
      <td class="box_td_spacer">
	  	<div align="center"><a href="{$item->ulink}">{$item->user}</a></div>
	  </td>
    </tr>
    	{/if}
	{/foreach}
  </table>
</form>
{if $navig}
<br />
{$navig}
{/if}