{if $pager.last_page>0}
<p class="content" align="center">

{if $pager.block > 1}
<a href="{$smarty.server.PHP_SELF}?page={$pager.block*$pager.pages_per_block-$pager.pages_per_block}&sort_ord={$pager.sort_ord}&sort_by={$pager.sort_by}&{$custom_query}" title="Предыдущие {$pager.pages_per_block} страниц"><<</a>&nbsp;&nbsp;
{else}
<<&nbsp;&nbsp;
{/if}	
{section name=pages loop=$pager.last_page+1 step=1 start=$pager.first_page}
	{if $pager.page eq $smarty.section.pages.index}
{$smarty.section.pages.index}
	{else}
<a href="{$smarty.server.PHP_SELF}?page={$smarty.section.pages.index}&sort_ord={$pager.sort_ord}&sort_by={$pager.sort_by}&{$custom_query}" title="{$smarty.section.pages.index}">{$smarty.section.pages.index}</a>
{/if}	
{/section}
{if ($pager.block*$pager.pages_per_block+1) <= $pager.num_pages}
&nbsp;&nbsp;<a href="{$smarty.server.PHP_SELF}?page={$pager.last_page+1}&sort_ord={$pager.sort_ord}&sort_by={$pager.sort_by}&{$custom_query}" title="Следующие {$pager.pages_per_block} страниц">>></a>
{else}
&nbsp;&nbsp;>> 
{/if}	
</p>
{/if}