{if ConfigHelper::checkConfig('phpui.short_pagescroller')}
    <B>{trans("Page:")}
    {if $page > 1}<A HREF="?m={$layout.module}{$adlink}{if $listdata.id}{if is_array($listdata.id)}&id[]={implode('&id[]=', $listdata.id)}{else}&id={$listdata.id}{/if}{/if}{if $listdata.customer}&c={$listdata.customer}{/if}{if $listdata.type}&t={$listdata.type}{/if}{if $listdata.state}{if is_array($listdata.state)}&s[]={implode('&s[]=', $listdata.state)}{else}s={$listdata.state}{/if}{/if}{if $listdata.kind}&amp;k={$listdata.kind}{/if}{if $listdata.order}&amp;o={$listdata.order},{$listdata.direction}{/if}&amp;page={math equation="x - 1" x=$page}">&laquo;&laquo;&laquo;</A>{/if}
    {math assign=lastpage equation="ceil(x/y)" x=$listdata.total y=$pagelimit}
    {if $page == $lastpage}{math assign=scroller_start equation="max(0,x-3)*y" x=$page y=$pagelimit}
    {elseif $page > 1 && $page < $lastpage}{math assign=scroller_start equation="max(0,x-2)*y" x=$page y=$pagelimit}{/if}
    {section name=pcnt loop=$loop step=$pagelimit start=$scroller_start|default:0 max=3}
	{math assign=cnt equation="ceil(x/y)+z" x=$scroller_start|default:0 y=$pagelimit z=$smarty.section.pcnt.rownum}
	{if $page == $cnt}
            [{$cnt}]
        {else}
            <A HREF="?m={$layout.module}{$adlink}{if $listdata.id}{if is_array($listdata.id)}&id[]={implode('&id[]=', $listdata.id)}{else}&id={$listdata.id}{/if}{/if}{if $listdata.customer}&c={$listdata.customer}{/if}{if $listdata.type}&t={$listdata.type}{/if}{if $listdata.state}{if is_array($listdata.state)}&s[]={implode('&s[]=', $listdata.state)}{else}s={$listdata.state}{/if}{/if}{if $listdata.kind}&amp;k={$listdata.kind}{/if}{if $listdata.order}&amp;o={$listdata.order},{$listdata.direction}{/if}&amp;page={$cnt}">{$cnt}</A>
        {/if}
    {/section}
    ... 
    {if $lastpage != $page}
        <A HREF="?m={$layout.module}{$adlink}{if $listdata.id}{if is_array($listdata.id)}&id[]={implode('&id[]=', $listdata.id)}{else}&id={$listdata.id}{/if}{/if}{if $listdata.customer}&c={$listdata.customer}{/if}{if $listdata.type}&t={$listdata.type}{/if}{if $listdata.state}{if is_array($listdata.state)}&s[]={implode('&s[]=', $listdata.state)}{else}s={$listdata.state}{/if}{/if}{if $listdata.kind}&amp;k={$listdata.kind}{/if}{if $listdata.order}&amp;o={$listdata.order},{$listdata.direction}{/if}&amp;page={$lastpage}">[{$lastpage}]</A>
    {/if}
    {if $page < $lastpage}
        <A HREF="?m={$layout.module}{$adlink}{if $listdata.id}{if is_array($listdata.id)}&id[]={implode('&id[]=', $listdata.id)}{else}&id={$listdata.id}{/if}{/if}{if $listdata.customer}&c={$listdata.customer}{/if}{if $listdata.type}&t={$listdata.type}{/if}{if $listdata.state}{if is_array($listdata.state)}&s[]={implode('&s[]=', $listdata.state)}{else}s={$listdata.state}{/if}{/if}{if $listdata.kind}&amp;k={$listdata.kind}{/if}{if $listdata.order}&amp;o={$listdata.order},{$listdata.direction}{/if}&amp;page={math equation="x + 1" x=$page}">&raquo;&raquo;&raquo;</A>
    {/if}
    </B>
    {math equation="x + 1" x=$start assign=startx}
    {if $start + $pagelimit > $listdata.total}{assign var=endx value=$listdata.total}{else}{math equation="x + y" x=$start y=$pagelimit assign=endx}{/if}
    ({t a=$startx b=$endx c=$listdata.total}records $a - $b of $c{/t})
    {if $lastpage > 3}
    {if !$scrollerno}
    <form method="get" action="?m={$layout.module}" name="scroller">
    <input type="hidden" name="m" value="{$layout.module}">
    {/if}
    {if $listdata.id}<input type="hidden" name="id" value="{$listdata.id}">{/if}
    {if $listdata.type}<input type="hidden" name="t" value="{$listdata.type}">{/if}
    {if $listdata.state}<input type="hidden" name="s" value="{$listdata.state}">{/if}
    {if $listdata.kind}<input type="hidden" name="k" value="{$listdata.kind}">{/if}
    {if $listdata.customer}<input type="hidden" name="c" value="{$listdata.customer}">{/if}
    {if $listdata.order}<input type="hidden" name="o" value="{$listdata.order},{$listdata.direction}">{/if}
    {if $scrollerno}
    {t a="<input class=\"scroller\" type=\"text\" name=\"page`$scrollerno`\" value=\"\" size=\"3\">"}Go to $a page{/t} <a href="javascript: pagechange{$scrollerno}();">&raquo;&raquo;&raquo;</a>
    {else}
    {t a="<input class=\"scroller\" type=\"text\" name=\"page\" value=\"\" size=\"3\">"}Go to $a page{/t} <a href="javascript: void(0);" onclick="{if $submit_function}{$submit_function}(){else}this.parentNode.submit(){/if};">&raquo;&raquo;&raquo;</a>
    </form>
    {/if}
    {/if}
{else}
    <B>{trans("Page:")}
    {if $page > 1}<A HREF="?m={$layout.module}{$adlink}{if $listdata.id}{if is_array($listdata.id)}&id[]={implode('&id[]=', $listdata.id)}{else}&id={$listdata.id}{/if}{/if}{if $listdata.customer}&c={$listdata.customer}{/if}{if $listdata.type}&t={$listdata.type}{/if}{if $listdata.state}{if is_array($listdata.state)}&s[]={implode('&s[]=', $listdata.state)}{else}s={$listdata.state}{/if}{/if}{if $listdata.kind}&amp;k={$listdata.kind}{/if}{if $listdata.order}&amp;o={$listdata.order},{$listdata.direction}{/if}&amp;page={math equation="x - 1" x=$page}">&laquo;&laquo;&laquo;</A>{else}&laquo;&laquo;&laquo;{/if}
    {section name=pcnt loop=$loop step=$pagelimit}
	{if $page == $smarty.section.pcnt.rownum}
            [{$smarty.section.pcnt.rownum}]
        {else}
            <A HREF="?m={$layout.module}{$adlink}{if $listdata.id}{if is_array($listdata.id)}&id[]={implode('&id[]=', $listdata.id)}{else}&id={$listdata.id}{/if}{/if}{if $listdata.customer}&c={$listdata.customer}{/if}{if $listdata.type}&t={$listdata.type}{if $listdata.state}{if is_array($listdata.state)}&s[]={implode('&s[]=', $listdata.state)}{else}s={$listdata.state}{/if}{/if}{/if}{if $listdata.kind}&amp;k={$listdata.kind}{/if}{if $listdata.order}&amp;o={$listdata.order},{$listdata.direction}{/if}&amp;page={$smarty.section.pcnt.rownum}">{$smarty.section.pcnt.rownum}</A>
        {/if}
    {/section}
    {if $page < $smarty.section.pcnt.rownum} <A HREF="?m={$layout.module}{$adlink}{if $listdata.id}{if is_array($listdata.id)}&id[]={implode('&id[]=', $listdata.id)}{else}&id={$listdata.id}{/if}{/if}{if $listdata.customer}&c={$listdata.customer}{/if}{if $listdata.type}&t={$listdata.type}{/if}{if $listdata.state}{if is_array($listdata.state)}&s[]={implode('&s[]=', $listdata.state)}{else}s={$listdata.state}{/if}{/if}{if $listdata.kind}&amp;k={$listdata.kind}{/if}{if $listdata.order}&amp;o={$listdata.order},{$listdata.direction}{/if}&amp;page={math equation="x + 1" x=$page}">&raquo;&raquo;&raquo;</A>{else} &raquo;&raquo;&raquo;{/if}
    </B> 
    {math equation="x + 1" x=$start assign=startx}
    {if $start + $pagelimit > $listdata.total}{assign var=endx value=$listdata.total}{else}{math equation="x + y" x=$start y=$pagelimit assign=endx}{/if}
    ({t a=$startx b=$endx c=$listdata.total}records $a - $b of $c{/t})
{/if}

