From: ivan Date: Fri, 26 Oct 2001 10:24:56 +0000 (+0000) Subject: cache foo X-Git-Tag: freeside_1_4_0pre11~259 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=91387f8f489e561deaf1de052d80ef800a4970a3 cache foo *sigh* --- diff --git a/FS/FS/CGI.pm b/FS/FS/CGI.pm index 85b91eab2..f0fec434d 100644 --- a/FS/FS/CGI.pm +++ b/FS/FS/CGI.pm @@ -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 < diff --git a/htetc/global.asa b/htetc/global.asa index a5863c327..dc75822ff 100644 --- a/htetc/global.asa +++ b/htetc/global.asa @@ -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 diff --git a/htetc/handler.pl b/htetc/handler.pl index e537d26fc..f01d3cd0b 100644 --- a/htetc/handler.pl +++ b/htetc/handler.pl @@ -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); diff --git a/httemplate/browse/agent.cgi b/httemplate/browse/agent.cgi index bb0ee2402..0f51d00de 100755 --- a/httemplate/browse/agent.cgi +++ b/httemplate/browse/agent.cgi @@ -1,5 +1,5 @@ <% -# +# 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' diff --git a/httemplate/browse/agent_type.cgi b/httemplate/browse/agent_type.cgi index 30b80000c..d1f8c6e6e 100755 --- a/httemplate/browse/agent_type.cgi +++ b/httemplate/browse/agent_type.cgi @@ -1,5 +1,5 @@ <% -# +# 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.

", &table(), < +# 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", )),<header( '-expires' => 'now' ), header('NAS ports', menubar( +print $cgi->header( @FS::CGI::header ), header('NAS ports', menubar( 'Main Menu' => $p, )); diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 30f994872..9a699d5ef 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -1,5 +1,5 @@ <% -# +# 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", diff --git a/httemplate/browse/part_referral.cgi b/httemplate/browse/part_referral.cgi index f283ad419..6481b6668 100755 --- a/httemplate/browse/part_referral.cgi +++ b/httemplate/browse/part_referral.cgi @@ -1,5 +1,5 @@ <% -# +# 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.

", &table(), < +# 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(), < +# 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

", &table(), < diff --git a/httemplate/edit/agent.cgi b/httemplate/edit/agent.cgi index 236d05001..ea68b4768 100755 --- a/httemplate/edit/agent.cgi +++ b/httemplate/edit/agent.cgi @@ -1,5 +1,5 @@ <% -# +# 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', )); diff --git a/httemplate/edit/agent_type.cgi b/httemplate/edit/agent_type.cgi index ac41eec5c..eba2c2305 100755 --- a/httemplate/edit/agent_type.cgi +++ b/httemplate/edit/agent_type.cgi @@ -1,5 +1,5 @@ <% -# +# 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", )); diff --git a/httemplate/edit/cust_credit.cgi b/httemplate/edit/cust_credit.cgi index 9b215389a..3bfbfc8c4 100755 --- a/httemplate/edit/cust_credit.cgi +++ b/httemplate/edit/cust_credit.cgi @@ -1,5 +1,5 @@ <% -# +# 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!Error: !, $cgi->param('error'), "" if $cgi->param('error'); diff --git a/httemplate/edit/cust_credit_bill.cgi b/httemplate/edit/cust_credit_bill.cgi index 13bad1852..d2d50cbf6 100755 --- a/httemplate/edit/cust_credit_bill.cgi +++ b/httemplate/edit/cust_credit_bill.cgi @@ -1,5 +1,5 @@ <% -# +# 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!Error: !, $cgi->param('error'), "

" if $cgi->param('error'); diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index d271dad46..f5662fd87 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -1,5 +1,5 @@ <% -# +# 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!Error: !, $error, "" if $error; diff --git a/httemplate/edit/cust_main_county-expand.cgi b/httemplate/edit/cust_main_county-expand.cgi index 4460ee8ad..c344e91ae 100755 --- a/httemplate/edit/cust_main_county-expand.cgi +++ b/httemplate/edit/cust_main_county-expand.cgi @@ -1,5 +1,5 @@ <% -# +# 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), )); diff --git a/httemplate/edit/cust_main_county.cgi b/httemplate/edit/cust_main_county.cgi index 6be349bc4..c25b6edd0 100755 --- a/httemplate/edit/cust_main_county.cgi +++ b/httemplate/edit/cust_main_county.cgi @@ -1,5 +1,5 @@ <% -# +# 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), )); diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index c83f585d1..a9506c8ed 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -1,5 +1,5 @@ <% -# +# 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!Error: !, $cgi->param('error'), "" diff --git a/httemplate/edit/cust_pkg.cgi b/httemplate/edit/cust_pkg.cgi index 729fc7c98..ea92ac05e 100755 --- a/httemplate/edit/cust_pkg.cgi +++ b/httemplate/edit/cust_pkg.cgi @@ -1,5 +1,5 @@ <% -# +# 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!Error: !, $cgi->param('error'), "" diff --git a/httemplate/edit/part_referral.cgi b/httemplate/edit/part_referral.cgi index 9ed8977cd..06f416903 100755 --- a/httemplate/edit/part_referral.cgi +++ b/httemplate/edit/part_referral.cgi @@ -1,5 +1,5 @@ <% -# +# 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", )); diff --git a/httemplate/edit/svc_acct.cgi b/httemplate/edit/svc_acct.cgi index 3d0bb0134..8a558613e 100755 --- a/httemplate/edit/svc_acct.cgi +++ b/httemplate/edit/svc_acct.cgi @@ -1,5 +1,5 @@ <% -# +# 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!Error: !, $cgi->param('error'), "

" diff --git a/httemplate/edit/svc_acct_pop.cgi b/httemplate/edit/svc_acct_pop.cgi index 5f1d15e26..3ba0f1439 100755 --- a/httemplate/edit/svc_acct_pop.cgi +++ b/httemplate/edit/svc_acct_pop.cgi @@ -1,5 +1,5 @@ <% -# +# 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", )); diff --git a/httemplate/edit/svc_acct_sm.cgi b/httemplate/edit/svc_acct_sm.cgi index 21bd6a9ee..4497b5f59 100755 --- a/httemplate/edit/svc_acct_sm.cgi +++ b/httemplate/edit/svc_acct_sm.cgi @@ -1,5 +1,5 @@ <% -# +# 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!Error: !, $cgi->param('error'), "" diff --git a/httemplate/edit/svc_domain.cgi b/httemplate/edit/svc_domain.cgi index a1a61723d..971088d21 100755 --- a/httemplate/edit/svc_domain.cgi +++ b/httemplate/edit/svc_domain.cgi @@ -1,5 +1,5 @@ <% -# +# 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!Error: !, $cgi->param('error'), "" diff --git a/httemplate/edit/svc_forward.cgi b/httemplate/edit/svc_forward.cgi index 287833e53..0529c2b86 100755 --- a/httemplate/edit/svc_forward.cgi +++ b/httemplate/edit/svc_forward.cgi @@ -1,5 +1,5 @@ <% -# +# 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()\""); %> diff --git a/httemplate/misc/catchall.cgi b/httemplate/misc/catchall.cgi index 9ebec6688..7e90ac4e0 100755 --- a/httemplate/misc/catchall.cgi +++ b/httemplate/misc/catchall.cgi @@ -1,5 +1,5 @@ <% -# +# 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!Error: !, $cgi->param('error'), "" diff --git a/httemplate/misc/delete-customer.cgi b/httemplate/misc/delete-customer.cgi index 3a7330960..ec1f734f1 100755 --- a/httemplate/misc/delete-customer.cgi +++ b/httemplate/misc/delete-customer.cgi @@ -1,5 +1,5 @@ <% -# +# 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!Error: !, $cgi->param('error'), "" diff --git a/httemplate/misc/link.cgi b/httemplate/misc/link.cgi index f4b70f76a..cd873cc8d 100755 --- a/httemplate/misc/link.cgi +++ b/httemplate/misc/link.cgi @@ -1,5 +1,5 @@ <% -# +# 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!
!; if ( $link_field ) { diff --git a/httemplate/search/cust_bill.cgi b/httemplate/search/cust_bill.cgi index d6d942b1b..02dbf558f 100755 --- a/httemplate/search/cust_bill.cgi +++ b/httemplate/search/cust_bill.cgi @@ -1,5 +1,5 @@ <% -# +# 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
", &table(), < +# 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 diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi index 8a0dfd132..f7cb50674 100755 --- a/httemplate/search/cust_pkg.cgi +++ b/httemplate/search/cust_pkg.cgi @@ -1,5 +1,5 @@ <% -# +# 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
", &table(), < diff --git a/httemplate/search/svc_acct.cgi b/httemplate/search/svc_acct.cgi index 64085ea93..5fc815453 100755 --- a/httemplate/search/svc_acct.cgi +++ b/httemplate/search/svc_acct.cgi @@ -1,5 +1,5 @@ <% -# +# 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(), < +# 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(), < diff --git a/httemplate/search/svc_domain.cgi b/httemplate/search/svc_domain.cgi index fb386e2cf..1b80e5b32 100755 --- a/httemplate/search/svc_domain.cgi +++ b/httemplate/search/svc_domain.cgi @@ -1,5 +1,5 @@ <% -# +# 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",''), < +# 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", )); diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index 650c6cfeb..7deaeb9f4 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -1,5 +1,5 @@ <% -# +# 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) )); diff --git a/httemplate/view/cust_pkg.cgi b/httemplate/view/cust_pkg.cgi index 6dd1d2455..5ddb17aee 100755 --- a/httemplate/view/cust_pkg.cgi +++ b/httemplate/view/cust_pkg.cgi @@ -1,5 +1,5 @@ <% -# +# 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) )); diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi index 01019c552..e4c328f1f 100755 --- a/httemplate/view/svc_acct.cgi +++ b/httemplate/view/svc_acct.cgi @@ -1,5 +1,5 @@ <% -# +# 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", diff --git a/httemplate/view/svc_acct_sm.cgi b/httemplate/view/svc_acct_sm.cgi index ff665d312..2a69c858f 100755 --- a/httemplate/view/svc_acct_sm.cgi +++ b/httemplate/view/svc_acct_sm.cgi @@ -1,5 +1,5 @@ <% -# +# 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", diff --git a/httemplate/view/svc_domain.cgi b/httemplate/view/svc_domain.cgi index cc60df68a..81b5922f8 100755 --- a/httemplate/view/svc_domain.cgi +++ b/httemplate/view/svc_domain.cgi @@ -1,5 +1,5 @@ <% -# +# 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", diff --git a/httemplate/view/svc_forward.cgi b/httemplate/view/svc_forward.cgi index e40935bc4..4a636c60e 100755 --- a/httemplate/view/svc_forward.cgi +++ b/httemplate/view/svc_forward.cgi @@ -1,5 +1,5 @@ <% -# +# 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",