cache foo
authorivan <ivan>
Fri, 26 Oct 2001 10:24:56 +0000 (10:24 +0000)
committerivan <ivan>
Fri, 26 Oct 2001 10:24:56 +0000 (10:24 +0000)
*sigh*

42 files changed:
FS/FS/CGI.pm
htetc/global.asa
htetc/handler.pl
httemplate/browse/agent.cgi
httemplate/browse/agent_type.cgi
httemplate/browse/cust_main_county.cgi
httemplate/browse/nas.cgi
httemplate/browse/part_pkg.cgi
httemplate/browse/part_referral.cgi
httemplate/browse/queue.cgi
httemplate/browse/svc_acct_pop.cgi
httemplate/edit/agent.cgi
httemplate/edit/agent_type.cgi
httemplate/edit/cust_credit.cgi
httemplate/edit/cust_credit_bill.cgi
httemplate/edit/cust_main.cgi
httemplate/edit/cust_main_county-expand.cgi
httemplate/edit/cust_main_county.cgi
httemplate/edit/cust_pay.cgi
httemplate/edit/cust_pkg.cgi
httemplate/edit/part_referral.cgi
httemplate/edit/svc_acct.cgi
httemplate/edit/svc_acct_pop.cgi
httemplate/edit/svc_acct_sm.cgi
httemplate/edit/svc_domain.cgi
httemplate/edit/svc_forward.cgi
httemplate/misc/catchall.cgi
httemplate/misc/delete-customer.cgi
httemplate/misc/link.cgi
httemplate/search/cust_bill.cgi
httemplate/search/cust_main.cgi
httemplate/search/cust_pkg.cgi
httemplate/search/svc_acct.cgi
httemplate/search/svc_acct_sm.cgi
httemplate/search/svc_domain.cgi
httemplate/view/cust_bill.cgi
httemplate/view/cust_main.cgi
httemplate/view/cust_pkg.cgi
httemplate/view/svc_acct.cgi
httemplate/view/svc_acct_sm.cgi
httemplate/view/svc_domain.cgi
httemplate/view/svc_forward.cgi

index 85b91ea..f0fec43 100644 (file)
@@ -1,7 +1,7 @@
 package FS::CGI;
 
 use strict;
-use vars qw(@EXPORT_OK @ISA);
+use vars qw(@EXPORT_OK @ISA @header);
 use Exporter;
 use CGI;
 use URI::URL;
@@ -11,6 +11,10 @@ use FS::UID;
 @ISA = qw(Exporter);
 @EXPORT_OK = qw(header menubar idiot eidiot popurl table itable ntable);
 
+@header = ( '-Expires' => '-1',
+            '-Pragma' => 'no-cache',
+            '-Cache-Control' => 'no-cache' );
+
 =head1 NAME
 
 FS::CGI - Subroutines for the web interface
@@ -91,12 +95,12 @@ sub idiot {
   #warn "idiot depriciated";
   my($error)=@_;
   my $cgi = &FS::UID::cgi();
-  if ( $cgi->isa('CGI::Base') ) {
-    no strict 'subs';
-    &CGI::Base::SendHeaders;
-  } else {
-    print $cgi->header( '-expires' => 'now' );
-  }
+#  if ( $cgi->isa('CGI::Base') ) {
+#    no strict 'subs';
+#    &CGI::Base::SendHeaders;
+#  } else {
+    print $cgi->header( @FS::CGI::header );
+#  }
   print <<END;
 <HTML>
   <HEAD>
index a5863c3..dc75822 100644 (file)
@@ -23,7 +23,7 @@ sub Script_OnStart {
 
 sub Script_OnFlush {
   my $ref = $Response->{BinaryRef};
-  $$ref = $cgi->header( '-expires' => 'now' ) . $$ref;
+  $$ref = $cgi->header( @FS::CGI::header ) . $$ref;
   if ( dbh->can('sprintProfile') ) {
 
     $$ref =~ s/<\/BODY>[\s\n]*<\/HTML>[\s\n]*$//i
index e537d26..f01d3cd 100644 (file)
@@ -75,6 +75,8 @@ sub handler
     }
     $r->content_type('text/html');
     #eorar
+
+    # @FS::CGI::@headers or some other way to set no-cache headers!!!
     
     my $status = $ah->handle_request($r);
     
index bb0ee24..0f51d00 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: agent.cgi,v 1.4 2001-09-04 14:44:06 ivan Exp $ -->
+#<!-- $Id: agent.cgi,v 1.5 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $ui $cgi $p $agent );
@@ -28,7 +28,7 @@ $cgi = new CGI;
 
 $p = popurl(2);
 
-print $cgi->header( '-expires' => 'now' ), header('Agent Listing', menubar(
+print $cgi->header( @FS::CGI::header ), header('Agent Listing', menubar(
   'Main Menu'   => $p,
   'Agent Types' => $p. 'browse/agent_type.cgi',
 #  'Add new agent' => '../edit/agent.cgi'
index 30b8000..d1f8c6e 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: agent_type.cgi,v 1.4 2001-09-04 14:44:06 ivan Exp $ -->
+#<!-- $Id: agent_type.cgi,v 1.5 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $cgi $p $agent_type );
@@ -17,7 +17,7 @@ $cgi = new CGI;
 &cgisuidsetup($cgi);
 
 $p = popurl(2);
-print $cgi->header( '-expires' => 'now' ), header("Agent Type Listing", menubar(
+print $cgi->header( @FS::CGI::header ), header("Agent Type Listing", menubar(
   'Main Menu' => $p,
 )), "Agent types define groups of packages that you can then assign to".
     " particular agents.<BR><BR>", &table(), <<END;
index f7c749c..7db581f 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: cust_main_county.cgi,v 1.3 2001-08-21 09:34:13 ivan Exp $ -->
+#<!-- $Id: cust_main_county.cgi,v 1.4 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $cgi $p $cust_main_county );
@@ -16,7 +16,7 @@ $cgi = new CGI;
 
 $p = popurl(2);
 
-print $cgi->header( '-expires' => 'now' ), header("Tax Rate Listing", menubar(
+print $cgi->header( @FS::CGI::header ), header("Tax Rate Listing", menubar(
   'Main Menu' => $p,
   'Edit tax rates' => $p. "edit/cust_main_county.cgi",
 )),<<END;
index 89d5e46..5125bac 100755 (executable)
@@ -17,7 +17,7 @@ $cgi = new CGI;
 
 $p=popurl(2);
 
-print $cgi->header( '-expires' => 'now' ), header('NAS ports', menubar(
+print $cgi->header( @FS::CGI::header ), header('NAS ports', menubar(
   'Main Menu' => $p,
 ));
 
index 30f9948..9a699d5 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: part_pkg.cgi,v 1.6 2001-10-20 12:17:59 ivan Exp $ -->
+#<!-- $Id: part_pkg.cgi,v 1.7 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $cgi $p $part_pkg );
@@ -18,7 +18,7 @@ $cgi = new CGI;
 
 $p = popurl(2);
 
-print $cgi->header( '-expires' => 'now' ), header("Package Definition Listing",menubar(
+print $cgi->header( @FS::CGI::header ), header("Package Definition Listing",menubar(
   'Main Menu' => $p,
 )), "One or more services are grouped together into a package and given",
   " pricing information. Customers purchase packages",
index f283ad4..6481b66 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: part_referral.cgi,v 1.4 2001-09-04 14:44:06 ivan Exp $ -->
+#<!-- $Id: part_referral.cgi,v 1.5 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $cgi $p $part_referral );
@@ -16,7 +16,7 @@ $cgi = new CGI;
 
 $p = popurl(2);
 
-print $cgi->header( '-expires' => 'now' ), header("Referral Listing", menubar(
+print $cgi->header( @FS::CGI::header ), header("Referral Listing", menubar(
   'Main Menu' => $p,
 #  'Add new referral' => "../edit/part_referral.cgi",
 )), "Where a customer heard about your service. Tracked for informational purposes.<BR><BR>", &table(), <<END;
index 76eed13..ba69573 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: queue.cgi,v 1.3 2001-10-24 00:59:56 ivan Exp $ -->
+#<!-- $Id: queue.cgi,v 1.4 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $cgi $p ); # $part_referral );
@@ -17,7 +17,7 @@ $cgi = new CGI;
 
 $p = popurl(2);
 
-print $cgi->header( '-expires' => 'now' ), header("Job Queue", menubar(
+print $cgi->header( @FS::CGI::header ), header("Job Queue", menubar(
   'Main Menu' => $p,
 #  'Add new referral' => "../edit/part_referral.cgi",
 )), &table(), <<END;
index c58ce33..e5a6117 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: svc_acct_pop.cgi,v 1.4 2001-08-31 08:43:41 ivan Exp $ -->
+#<!-- $Id: svc_acct_pop.cgi,v 1.5 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $cgi $p $svc_acct_pop );
@@ -16,7 +16,7 @@ $cgi = new CGI;
 
 $p = popurl(2);
 
-print $cgi->header( '-expires' => 'now' ), header('POP Listing', menubar(
+print $cgi->header( @FS::CGI::header ), header('POP Listing', menubar(
   'Main Menu' => $p,
 )), "Points of Presence<BR><BR>", &table(), <<END;
       <TR>
index 236d050..ea68b47 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: agent.cgi,v 1.3 2001-08-29 09:11:30 ivan Exp $ -->
+#<!-- $Id: agent.cgi,v 1.4 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw ( $cgi $agent $action $hashref $p $agent_type );
@@ -31,7 +31,7 @@ $hashref = $agent->hashref;
 
 $p = popurl(2);
 
-print $cgi->header( '-expires' => 'now' ), header("$action Agent", menubar(
+print $cgi->header( @FS::CGI::header ), header("$action Agent", menubar(
   'Main Menu' => $p,
   'View all agents' => $p. 'browse/agent.cgi',
 ));
index ac41eec..eba2c23 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: agent_type.cgi,v 1.3 2001-09-04 15:06:03 ivan Exp $ -->
+#<!-- $Id: agent_type.cgi,v 1.4 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $cgi $agent_type $action $hashref $p $part_pkg );
@@ -32,7 +32,7 @@ $action = $agent_type->typenum ? 'Edit' : 'Add';
 $hashref = $agent_type->hashref;
 
 $p = popurl(2);
-print $cgi->header( '-expires' => 'now' ), header("$action Agent Type", menubar(
+print $cgi->header( @FS::CGI::header ), header("$action Agent Type", menubar(
   'Main Menu' => "$p",
   'View all agent types' => "${p}browse/agent_type.cgi",
 ));
index 9b21538..3bfbfc8 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: cust_credit.cgi,v 1.3 2001-09-03 22:07:39 ivan Exp $ -->
+#<!-- $Id: cust_credit.cgi,v 1.4 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $cgi $query $custnum $otaker $p1 $crednum $_date $amount $reason );
@@ -36,7 +36,7 @@ $otaker = getotaker;
 
 $p1 = popurl(1);
 
-print $cgi->header( '-expires' => 'now' ), header("Post Credit", '');
+print $cgi->header( @FS::CGI::header ), header("Post Credit", '');
 print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
       "</FONT>"
   if $cgi->param('error');
index 13bad18..d2d50cb 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: cust_credit_bill.cgi,v 1.3 2001-09-03 22:07:39 ivan Exp $ -->
+#<!-- $Id: cust_credit_bill.cgi,v 1.4 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $cgi $query $custnum $invnum $otaker $p1 $crednum $amount $reason $cust_credit );
@@ -38,7 +38,7 @@ $otaker = getotaker;
 
 $p1 = popurl(1);
 
-print $cgi->header( '-expires' => 'now' ), header("Apply Credit", '');
+print $cgi->header( @FS::CGI::header ), header("Apply Credit", '');
 print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
       "</FONT><BR><BR>"
   if $cgi->param('error');
index d271dad..f5662fd 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: cust_main.cgi,v 1.7 2001-10-15 11:35:28 ivan Exp $ -->
+#<!-- $Id: cust_main.cgi,v 1.8 2001-10-26 10:24:56 ivan Exp $ -->
 
 use vars qw( $cgi $custnum $action $cust_main $p1 @agents $agentnum 
              $last $first $ss $company $address1 $address2 $city $zip 
@@ -74,7 +74,7 @@ $action = $custnum ? 'Edit' : 'Add';
 # top
 
 $p1 = popurl(1);
-print $cgi->header( '-expires' => 'now' ), header("Customer $action", '');
+print $cgi->header( @FS::CGI::header ), header("Customer $action", '');
 print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $error, "</FONT>"
   if $error;
 
index 4460ee8..c344e91 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: cust_main_county-expand.cgi,v 1.3 2001-08-31 07:28:00 ivan Exp $ -->
+#<!-- $Id: cust_main_county-expand.cgi,v 1.4 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $cgi $taxnum $cust_main_county $p1 $delim $expansion );
@@ -32,7 +32,7 @@ $cust_main_county = qsearchs('cust_main_county',{'taxnum'=>$taxnum})
 die "Can't expand entry!" if $cust_main_county->getfield('county');
 
 $p1 = popurl(1);
-print $cgi->header( '-expires' => 'now' ), header("Tax Rate (expand)", menubar(
+print $cgi->header( @FS::CGI::header ), header("Tax Rate (expand)", menubar(
   'Main Menu' => popurl(2),
 ));
 
index 6be349b..c25b6ed 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: cust_main_county.cgi,v 1.3 2001-08-21 02:31:56 ivan Exp $ -->
+#<!-- $Id: cust_main_county.cgi,v 1.4 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $cgi $cust_main_county );
@@ -14,7 +14,7 @@ $cgi = new CGI;
 
 &cgisuidsetup($cgi);
 
-print $cgi->header( '-expires' => 'now' ), header("Edit tax rates", menubar(
+print $cgi->header( @FS::CGI::header ), header("Edit tax rates", menubar(
   'Main Menu' => popurl(2),
 ));
 
index c83f585..a9506c8 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: cust_pay.cgi,v 1.3 2001-09-03 22:07:39 ivan Exp $ -->
+#<!-- $Id: cust_pay.cgi,v 1.4 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $cgi $link $linknum $p1 $_date $payby $payinfo $paid );
@@ -38,7 +38,7 @@ if ( $cgi->param('error') ) {
 $_date = time;
 
 $p1 = popurl(1);
-print $cgi->header( '-expires' => 'now' ), header("Enter payment", '');
+print $cgi->header( @FS::CGI::header ), header("Enter payment", '');
 
 print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
       "</FONT>"
index 729fc7c..ea92ac0 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: cust_pkg.cgi,v 1.2 2001-08-21 02:31:56 ivan Exp $ -->
+#<!-- $Id: cust_pkg.cgi,v 1.3 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $cgi %pkg %comment $custnum $p1 @cust_pkg 
@@ -33,7 +33,7 @@ if ( $cgi->param('error') ) {
 }
 
 $p1 = popurl(1);
-print $cgi->header( '-expires' => 'now' ), header("Add/Edit Packages", '');
+print $cgi->header( @FS::CGI::header ), header("Add/Edit Packages", '');
 
 print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
       "</FONT>"
index 9ed8977..06f4169 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: part_referral.cgi,v 1.2 2001-08-21 02:31:56 ivan Exp $ -->
+#<!-- $Id: part_referral.cgi,v 1.3 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $cgi $part_referral $action $hashref $p1 $query );
@@ -29,7 +29,7 @@ $action = $part_referral->refnum ? 'Edit' : 'Add';
 $hashref = $part_referral->hashref;
 
 $p1 = popurl(1);
-print $cgi->header( '-expires' => 'now' ), header("$action Referral", menubar(
+print $cgi->header( @FS::CGI::header ), header("$action Referral", menubar(
   'Main Menu' => popurl(2),
   'View all referrals' => popurl(2). "browse/part_referral.cgi",
 ));
index 3d0bb01..8a55861 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: svc_acct.cgi,v 1.10 2001-10-20 12:18:00 ivan Exp $ -->
+#<!-- $Id: svc_acct.cgi,v 1.11 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $conf $cgi @shells $action $svcnum $svc_acct $pkgnum $svcpart
@@ -101,7 +101,7 @@ $ulen = $svc_acct->dbdef_table->column('username')->length;
 $ulen2 = $ulen+2;
 
 $p1 = popurl(1);
-print $cgi->header( '-expires' => 'now' ), header("$action $svc account");
+print $cgi->header( @FS::CGI::header ), header("$action $svc account");
 
 print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
       "</FONT><BR><BR>"
index 5f1d15e..3ba0f14 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: svc_acct_pop.cgi,v 1.2 2001-08-21 02:31:56 ivan Exp $ -->
+#<!-- $Id: svc_acct_pop.cgi,v 1.3 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $cgi $svc_acct_pop $action $query $hashref $p1 );
@@ -27,7 +27,7 @@ $action = $svc_acct_pop->popnum ? 'Edit' : 'Add';
 $hashref = $svc_acct_pop->hashref;
 
 $p1 = popurl(1);
-print $cgi->header( '-expires' => 'now' ), header("$action POP", menubar(
+print $cgi->header( @FS::CGI::header ), header("$action POP", menubar(
   'Main Menu' => popurl(2),
   'View all POPs' => popurl(2). "browse/svc_acct_pop.cgi",
 ));
index 21bd6a9..4497b5f 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: svc_acct_sm.cgi,v 1.4 2001-09-11 23:44:01 ivan Exp $ -->
+#<!-- $Id: svc_acct_sm.cgi,v 1.5 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $conf $cgi $mydomain $action $svcnum $svc_acct_sm $pkgnum $svcpart
@@ -128,7 +128,7 @@ if ($pkgnum) {
 }
 
 $p1 = popurl(1);
-print $cgi->header( '-expires' => 'now' ), header("Mail Alias $action", '');
+print $cgi->header( @FS::CGI::header ), header("Mail Alias $action", '');
 
 print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
       "</FONT>"
index a1a6172..971088d 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: svc_domain.cgi,v 1.4 2001-10-25 21:24:12 ivan Exp $ -->
+#<!-- $Id: svc_domain.cgi,v 1.5 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $cgi $action $svcnum $svc_domain $pkgnum $svcpart $part_svc
@@ -77,7 +77,7 @@ $otaker = getotaker;
 $domain = $svc_domain->domain;
 
 $p1 = popurl(1);
-print $cgi->header( '-expires' => 'now' ), header("$action $svc", '');
+print $cgi->header( @FS::CGI::header ), header("$action $svc", '');
 
 print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
       "</FONT>"
index 287833e..0529c2b 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-# <!-- $Id: svc_forward.cgi,v 1.4 2001-09-11 23:44:01 ivan Exp $ -->
+# <!-- $Id: svc_forward.cgi,v 1.5 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $conf $cgi $mydomain $action $svcnum $svc_forward $pkgnum $svcpart
@@ -128,7 +128,7 @@ if ($pkgnum) {
 #display
 
 $p1 = popurl(1);
-print $cgi->header( '-expires' => 'now' ), header("Mail Forward $action", '',
+print $cgi->header( @FS::CGI::header ), header("Mail Forward $action", '',
       " onLoad=\"visualize()\"");
 
 %>
index 9ebec66..7e90ac4 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: catchall.cgi,v 1.2 2001-08-21 02:31:56 ivan Exp $ -->
+#<!-- $Id: catchall.cgi,v 1.3 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $conf $cgi $action $svcnum $svc_domain $pkgnum $svcpart
@@ -94,7 +94,7 @@ if ($pkgnum) {
 $email{0} = "(none)";
 
 $p1 = popurl(1);
-print $cgi->header( '-expires' => 'now' ), header("Domain Catchall Edit", '');
+print $cgi->header( @FS::CGI::header ), header("Domain Catchall Edit", '');
 
 print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
       "</FONT>"
index 3a73309..ec1f734 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: delete-customer.cgi,v 1.3 2001-08-21 02:31:56 ivan Exp $ -->
+#<!-- $Id: delete-customer.cgi,v 1.4 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $cgi $conf $query $custnum $new_custnum $cust_main );
@@ -28,7 +28,7 @@ if ( $cgi->param('error') ) {
 $cust_main = qsearchs( 'cust_main', { 'custnum' => $custnum } )
   or die "Customer not found: $custnum";
 
-print $cgi->header ( '-expires' => 'now' ), header('Delete customer');
+print $cgi->header ( @FS::CGI::header ), header('Delete customer');
 
 print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
       "</FONT>"
index f4b70f7..cd873cc 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: link.cgi,v 1.2 2001-08-21 02:31:56 ivan Exp $ -->
+#<!-- $Id: link.cgi,v 1.3 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw ( %link_field $cgi $pkgnum $svcpart $query $part_svc $svc $svcdb 
@@ -32,7 +32,7 @@ $svc = $part_svc->getfield('svc');
 $svcdb = $part_svc->getfield('svcdb');
 $link_field = $link_field{$svcdb};
 
-print $cgi->header( '-expires' => 'now' ), header("Link to existing $svc"),
+print $cgi->header( @FS::CGI::header ), header("Link to existing $svc"),
       qq!<FORM ACTION="!, popurl(1), qq!process/link.cgi" METHOD=POST>!;
 
 if ( $link_field ) { 
index d6d942b..02dbf55 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: cust_bill.cgi,v 1.3 2001-09-01 12:35:39 ivan Exp $ -->
+#<!-- $Id: cust_bill.cgi,v 1.4 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw ( $cgi $invnum $query $sortby @cust_bill );
@@ -67,7 +67,7 @@ if ( scalar(@cust_bill) == 1 ) {
   eidiot("Invoice not found.");
 } else {
   my $total = scalar(@cust_bill);
-  print $cgi->header( '-expires' => 'now' ),
+  print $cgi->header( @FS::CGI::header ),
         &header("Invoice Search Results", menubar(
           'Main Menu', popurl(2)
         )), "$total matching invoices found<BR>", &table(), <<END;
index 4a37821..d8cd0a0 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: cust_main.cgi,v 1.10 2001-10-10 06:22:22 thalakan Exp $ -->
+#<!-- $Id: cust_main.cgi,v 1.11 2001-10-26 10:24:56 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 $cgi->header( @FS::CGI::header ), 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
index 8a0dfd1..f7cb506 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-# <!-- $Id: cust_pkg.cgi,v 1.4 2001-08-21 02:03:32 ivan Exp $ -->
+# <!-- $Id: cust_pkg.cgi,v 1.5 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw ( $cgi @cust_pkg $sortby $query %part_pkg );
@@ -58,7 +58,7 @@ if ( scalar(@cust_pkg) == 1 ) {
   eidiot("No packages found");
 } else {
   my($total)=scalar(@cust_pkg);
-  print $cgi->header( '-expires' => 'now' ),
+  print $cgi->header( @FS::CGI::header ),
         header('Package Search Results',''),
         "$total matching packages found<BR>", &table(), <<END;
       <TR>
index 64085ea..5fc8154 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-# <!-- $Id: svc_acct.cgi,v 1.6 2001-10-24 15:29:31 ivan Exp $ -->
+# <!-- $Id: svc_acct.cgi,v 1.7 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $cgi @svc_acct $sortby $query $mydomain );
@@ -59,7 +59,7 @@ if ( scalar(@svc_acct) == 1 ) {
   idiot("Account not found");
 } else {
   my($total)=scalar(@svc_acct);
-  print $cgi->header( '-expires' => 'now' ),
+  print $cgi->header( @FS::CGI::header ),
         header("Account Search Results",''),
         "$total matching accounts found",
         &table(), <<END;
index 4350c32..24b3040 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: svc_acct_sm.cgi,v 1.2 2001-08-21 02:31:57 ivan Exp $ -->
+#<!-- $Id: svc_acct_sm.cgi,v 1.3 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $conf $cgi $mydomain $domuser $svc_domain $domsvc @svc_acct_sm );
@@ -40,7 +40,7 @@ if ( scalar(@svc_acct_sm) == 1 ) {
   my($svcnum)=$svc_acct_sm[0]->svcnum;
   print $cgi->redirect(popurl(2). "view/svc_acct_sm.cgi?$svcnum");
 } elsif ( scalar(@svc_acct_sm) > 1 ) {
-  print $cgi->header( '-expires' => 'now' ),
+  print $cgi->header( @FS::CGI::header ),
         header('Mail Alias Search Results'),
         &table(), <<END;
       <TR>
index fb386e2..1b80e5b 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-# <!-- $Id: svc_domain.cgi,v 1.3 2001-08-21 02:31:57 ivan Exp $ -->
+# <!-- $Id: svc_domain.cgi,v 1.4 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw ( $cgi @svc_domain $sortby $query $conf $mydomain );
@@ -54,7 +54,7 @@ if ( scalar(@svc_domain) == 1 ) {
 } else {
 
   my($total)=scalar(@svc_domain);
-  print $cgi->header( '-expires' => 'now' ),
+  print $cgi->header( @FS::CGI::header ),
         header("Domain Search Results",''), <<END;
 
     $total matching domains found
index 1e024f3..5719319 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-# <!-- $Id: cust_bill.cgi,v 1.3 2001-09-03 22:07:39 ivan Exp $ -->
+# <!-- $Id: cust_bill.cgi,v 1.4 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw ( $cgi $query $invnum $cust_bill $custnum $printed $p );
@@ -26,7 +26,7 @@ $custnum = $cust_bill->getfield('custnum');
 $printed = $cust_bill->printed;
 
 $p = popurl(2);
-print $cgi->header( '-expires' => 'now' ), header('Invoice View', menubar(
+print $cgi->header( @FS::CGI::header ), header('Invoice View', menubar(
   "Main Menu" => $p,
   "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
 ));
index 650c6cf..7deaeb9 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: cust_main.cgi,v 1.12 2001-09-21 03:47:26 ivan Exp $ -->
+#<!-- $Id: cust_main.cgi,v 1.13 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw ( $cgi $query $custnum $cust_main $hashref $agent $referral 
@@ -29,7 +29,7 @@ $cgi = new CGI;
 
 $conf = new FS::Conf;
 
-print $cgi->header( '-expires' => 'now' ), header("Customer View", menubar(
+print $cgi->header( @FS::CGI::header ), header("Customer View", menubar(
   'Main Menu' => popurl(2)
 ));
 
index 6dd1d24..5ddb17a 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-# <!-- $Id: cust_pkg.cgi,v 1.3 2001-10-15 14:58:03 ivan Exp $ -->
+# <!-- $Id: cust_pkg.cgi,v 1.4 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw ( $cgi %uiview %uiadd $part_svc $query $pkgnum $cust_pkg $part_pkg
@@ -35,7 +35,7 @@ die "No package!" unless $cust_pkg;
 $part_pkg = qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->getfield('pkgpart')});
 
 $custnum = $cust_pkg->getfield('custnum');
-print $cgi->header( '-expires' => 'now' ), header('Package View', menubar(
+print $cgi->header( @FS::CGI::header ), header('Package View', menubar(
   "View this customer (#$custnum)" => popurl(2). "view/cust_main.cgi?$custnum",
   'Main Menu' => popurl(2)
 ));
index 01019c5..e4c328f 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-# <!-- $Id: svc_acct.cgi,v 1.6 2001-09-27 20:41:37 ivan Exp $ -->
+# <!-- $Id: svc_acct.cgi,v 1.7 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $conf $cgi $domain $query $svcnum $svc_acct $cust_svc $pkgnum
@@ -55,7 +55,7 @@ if ( $svc_acct->domsvc ) {
 }
 
 $p = popurl(2);
-print $cgi->header( '-expires' => 'now' ), header('Account View', menubar(
+print $cgi->header( @FS::CGI::header ), header('Account View', menubar(
   ( ( $pkgnum || $custnum )
     ? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum",
         "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
index ff665d3..2a69c85 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-#<!-- $Id: svc_acct_sm.cgi,v 1.2 2001-08-21 02:31:57 ivan Exp $ -->
+#<!-- $Id: svc_acct_sm.cgi,v 1.3 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw($conf $cgi $mydomain $query $svcnum $svc_acct_sm $cust_svc
@@ -43,7 +43,7 @@ $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } )
   or die "Unkonwn svcpart";
 
 $p = popurl(2);
-print $cgi->header( '-expires' => 'now' ), header('Mail Alias View', menubar(
+print $cgi->header( @FS::CGI::header ), header('Mail Alias View', menubar(
   ( ( $pkgnum || $custnum )
     ? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum",
         "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
index cc60df6..81b5922 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-# <!-- $Id: svc_domain.cgi,v 1.3 2001-08-21 02:31:57 ivan Exp $ -->
+# <!-- $Id: svc_domain.cgi,v 1.4 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw( $cgi $query $svcnum $svc_domain $domain $cust_svc $pkgnum 
@@ -44,7 +44,7 @@ if ($svc_domain->catchall) {
 $domain = $svc_domain->domain;
 
 $p = popurl(2);
-print $cgi->header( '-expires' => 'now' ), header('Domain View', menubar(
+print $cgi->header( @FS::CGI::header ), header('Domain View', menubar(
   ( ( $pkgnum || $custnum )
     ? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum",
         "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
index e40935b..4a636c6 100755 (executable)
@@ -1,5 +1,5 @@
 <%
-# <!-- $Id: svc_forward.cgi,v 1.2 2001-08-21 02:31:57 ivan Exp $ -->
+# <!-- $Id: svc_forward.cgi,v 1.3 2001-10-26 10:24:56 ivan Exp $ -->
 
 use strict;
 use vars qw($conf $cgi $query $svcnum $svc_forward $cust_svc
@@ -41,7 +41,7 @@ $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } )
   or die "Unkonwn svcpart";
 
 $p = popurl(2);
-print $cgi->header( '-expires' => 'now' ), header('Mail Forward View', menubar(
+print $cgi->header( @FS::CGI::header ), header('Mail Forward View', menubar(
   ( ( $pkgnum || $custnum )
     ? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum",
         "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",