hit the database slightly less. this page still takes forever with lots of
[freeside.git] / httemplate / search / cust_main.cgi
index 0744744..a52321d 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: cust_main.cgi,v 1.8 2001-10-10 05:42:19 ivan Exp $ -->
+#<!-- $Id: cust_main.cgi,v 1.13 2001-11-01 00:16:24 ivan Exp $ -->
 
 use strict;
 #use vars qw( $conf %ncancelled_pkgs %all_pkgs $cgi @cust_main $sortby );
@@ -59,7 +59,7 @@ if ( scalar(@cust_main) == 1 && ! $cgi->param('referral_custnum') ) {
 } else { 
 
   my($total)=scalar(@cust_main);
-  print $cgi->header( '-expires' => 'now' ), header("Customer Search Results",menubar(
+  print header("Customer Search Results",menubar(
     'Main Menu', popurl(2)
   )), "$total matching customers found ";
   if ( $cgi->param('showcancelledcustomers') eq '0' #see if it was set by me
@@ -172,9 +172,9 @@ END
       my($pkg) = $_->part_pkg->pkg;
       my $comment = $_->part_pkg->comment;
       my($pkgview) = popurl(2). "/view/cust_pkg.cgi?$pkgnum";
-      #my(@cust_svc) = shift @lol_cust_svc;
-      my(@cust_svc) = qsearch( 'cust_svc', { 'pkgnum' => $_->pkgnum } );
-      my($rowspan) = scalar(@cust_svc) || 1;
+      my @cust_svc = @{shift @lol_cust_svc};
+      #my(@cust_svc) = qsearch( 'cust_svc', { 'pkgnum' => $_->pkgnum } );
+      my $rowspan = scalar(@cust_svc) || 1;
 
       print $n1, qq!<TD ROWSPAN=$rowspan><A HREF="$pkgview"><FONT SIZE=-1>$pkg - $comment</FONT></A></TD>!;
       my($n2)='';