{if $ActiveList.showsortlinks || $ActiveList.showfilter || $ActiveList.showperpage || $ActiveList.showsearch}
<br>
<form name="form1" method="get" action="list.php">
{$HiddenFields}
{cycle values="row1,row2" print=false advance=true}
<table width="100%" border="0" cellspacing="1" cellpadding="5" class="tblback">
{/if}
{if $ActiveList.showfilter}
<tr valign="middle" class="{cycle}">
<td align="left"> {$lang.strShowOnly}
{* print out the FILTER (the listboxes) *}
{foreach key=kProp item=iProp name=Prop from=$PropAll}
{if $iProp.PropVals|default:0}
<select name='Filter[{$iProp.ID}]' onChange='form.submit();'>
<option value='0'>{$iProp.ListHeader}</option>
{foreach item=PropVal from=$iProp.PropVals}
<option value='{$PropVal.ID}'{if $PropVal.selected} selected{/if}>{$PropVal.DisplayText}</option>
{/foreach}
</select>
{/if}
{/foreach}
</td>
{/if}
{if $ActiveList.showsortlinks}
{if ! $ActiveList.showfilter}
<tr class="{cycle}">
{/if}
<td width="50%" {if $ActiveList.showfilter && ($ActiveList.showperpage || $ActiveList.showsearch)}rowspan="2" {/if}align="left">
[<a href='index.php{$CFG.GlobalArg}Sort=-1'>{$lang.strMostClickedEntries}</a>]<br>
[<a href='index.php{$CFG.GlobalArg}Sort=0'>{$lang.strNewEntries}</a>]
</td>
{/if}
{if $ActiveList.showfilter || $ActiveList.showsortlinks}
</tr>
{/if}
{if $ActiveList.showperpage || $ActiveList.showsearch}
<tr class={cycle}>
<td align="left">
{/if}
{if $ActiveList.showperpage}
{$lang.strSqlPerPage}<input type='text' name='Display' size=3 value='{$sDisplay.PerPage}'>
{/if}
{if $ActiveList.showsearch}
{$lang.strSearchFor}:
<input type='text' name='Search' size='31' value='{$sDisplay.SearchText|escape:"html"}'>
{/if}
{if $ActiveList.showsearch || $ActiveList.showperpage}
<input type='submit' value='{$lang.strFilterButtonValue}'>
</td>
</tr>
{/if}
{if $ActiveList.showsortlinks || $ActiveList.showfilter || $ActiveList.showperpage || $ActiveList.showsearch}
</table>
</form>
{/if}