{if ConfigHelper::checkConfig('phpui.short_pagescroller')} {trans("Page:")} {if $page > 1}«««{/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} {$cnt} {/if} {/section} ... {if $lastpage != $page} [{$lastpage}] {/if} {if $page < $lastpage} »»» {/if} {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}
{/if} {/if} {else} {trans("Page:")} {if $page > 1}«««{else}«««{/if} {section name=pcnt loop=$loop step=$pagelimit} {if $page == $smarty.section.pcnt.rownum} [{$smarty.section.pcnt.rownum}] {else} {$smarty.section.pcnt.rownum} {/if} {/section} {if $page < $smarty.section.pcnt.rownum} »»»{else} »»»{/if} {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}