<?php if(($pg['pages']??1)>1):$query=$_GET;unset($query['page']);?><nav class="admin-pagination"><?php for($i=max(1,$pg['page']-2);$i<=min($pg['pages'],$pg['page']+2);$i++):$query['page']=$i;?><a class="<?=$i===$pg['page']?'active':''?>" href="?<?=esc(http_build_query($query))?>"><?=$i?></a><?php endfor;?></nav><?php endif;?>
