%
my %opt = @_;
my $pager = '';
if ( $opt{'total'} != $opt{'num_rows'} && $opt{'maxrecords'} ) {
unless ( $opt{'offset'} == 0 ) {
$cgi->param('offset', $opt{'offset'} - $opt{'maxrecords'});
%>
Previous
<%
}
my $page = 0;
for ( my $poff = 0; $poff < $opt{'total'}; $poff += $opt{'maxrecords'} ) {
$page++;
if ( $opt{'offset'} == $poff ) {
%>
<%= $page %>
<%
} else {
$cgi->param('offset', $poff);
%>
$page
<%
}
}
unless ( $opt{'offset'} + $opt{'maxrecords'} > $opt{'total'} ) {
$cgi->param('offset', $opt{'offset'} + $opt{'maxrecords'});
%>
Next
<%
}
}
%>