diff options
author | ivan <ivan> | 2001-12-03 11:33:19 +0000 |
---|---|---|
committer | ivan <ivan> | 2001-12-03 11:33:19 +0000 |
commit | 301ef098a56e1fc011d26d1f108a48e99ad701f4 (patch) | |
tree | 3dc67723ccb9849d9b7bc3c65709cb7c50bb5de2 /httemplate/search/cust_pkg.cgi | |
parent | 63ec39a8c2a32b5ac325c4973945a26398678347 (diff) |
paged service browse!!
Diffstat (limited to 'httemplate/search/cust_pkg.cgi')
-rwxr-xr-x | httemplate/search/cust_pkg.cgi | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi index e862cefab..9f13dbb33 100755 --- a/httemplate/search/cust_pkg.cgi +++ b/httemplate/search/cust_pkg.cgi @@ -1,5 +1,5 @@ <% -# <!-- $Id: cust_pkg.cgi,v 1.7 2001-12-03 10:59:25 ivan Exp $ --> +# <!-- $Id: cust_pkg.cgi,v 1.8 2001-12-03 11:33:19 ivan Exp $ --> use strict; use vars qw ( $cgi @cust_pkg $sortby $query %part_pkg @@ -31,13 +31,11 @@ $limit .= " OFFSET $offset" if $offset; my $total; -($query) = $cgi->keywords; my $unconf = ''; -#this tree is a little bit redundant +($query) = $cgi->keywords; if ( $query eq 'pkgnum' ) { $sortby=\*pkgnum_sort; - } elsif ( $query eq 'APKG_pkgnum' ) { $sortby=\*pkgnum_sort; @@ -86,7 +84,7 @@ my $sth = dbh->prepare($statement) or die dbh->errstr. " doing $statement"; $sth->execute or die "Error executing \"$statement\": ". $sth->errstr; -$total = @{$sth->fetchrow_arrayref}[0]; +$total = $sth->fetchrow_arrayref->[0]; @cust_pkg = qsearch('cust_pkg',{}, '', "$unconf ORDER BY pkgnum $limit" ); @@ -100,6 +98,7 @@ if ( scalar(@cust_pkg) == 1 ) { } else { $total ||= scalar(@cust_pkg); + #begin pager my $pager = ''; if ( $total != scalar(@cust_pkg) && $maxrecords ) { unless ( $offset == 0 ) { @@ -124,6 +123,7 @@ if ( scalar(@cust_pkg) == 1 ) { '"><B><FONT SIZE="+1">Next</FONT></B></A> '; } } + #end pager print header('Package Search Results',''), "$total matching packages found<BR><BR>$pager", &table(), <<END; |