From c116ce940c33dcd7e37a87a8eb2936e17cc68b11 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 19 Jan 1999 05:14:23 +0000 Subject: [PATCH] for mod_perl: no more top-level my() variables; use vars instead also the last s/create/new/; --- htdocs/browse/agent.cgi | 16 +++++---- htdocs/browse/agent_type.cgi | 14 +++++--- htdocs/browse/cust_main_county.cgi | 14 +++++--- htdocs/browse/part_pkg.cgi | 14 +++++--- htdocs/browse/part_referral.cgi | 14 +++++--- htdocs/browse/part_svc.cgi | 14 +++++--- htdocs/browse/svc_acct_pop.cgi | 14 +++++--- htdocs/edit/agent.cgi | 21 ++++++------ htdocs/edit/agent_type.cgi | 19 ++++++----- htdocs/edit/cust_credit.cgi | 27 +++++++++------- htdocs/edit/cust_main.cgi | 39 +++++++++++++--------- htdocs/edit/cust_main_county-expand.cgi | 19 +++++++---- htdocs/edit/cust_main_county.cgi | 12 ++++--- htdocs/edit/cust_pay.cgi | 23 +++++++------ htdocs/edit/cust_pkg.cgi | 30 +++++++++-------- htdocs/edit/part_pkg.cgi | 22 +++++++------ htdocs/edit/part_referral.cgi | 18 +++++++---- htdocs/edit/part_svc.cgi | 23 +++++++------ htdocs/edit/process/agent.cgi | 18 +++++++---- htdocs/edit/process/agent_type.cgi | 19 ++++++----- htdocs/edit/process/cust_credit.cgi | 16 +++++---- htdocs/edit/process/cust_main.cgi | 20 +++++++----- htdocs/edit/process/cust_main_county-expand.cgi | 17 ++++++---- htdocs/edit/process/cust_main_county.cgi | 11 +++++-- htdocs/edit/process/cust_pay.cgi | 16 +++++---- htdocs/edit/process/cust_pkg.cgi | 19 ++++++----- htdocs/edit/process/part_pkg.cgi | 18 +++++++---- htdocs/edit/process/part_referral.cgi | 15 ++++++--- htdocs/edit/process/part_svc.cgi | 17 ++++++---- htdocs/edit/process/svc_acct.cgi | 17 ++++++---- htdocs/edit/process/svc_acct_pop.cgi | 17 ++++++---- htdocs/edit/process/svc_acct_sm.cgi | 18 +++++++---- htdocs/edit/process/svc_domain.cgi | 16 +++++---- htdocs/edit/svc_acct.cgi | 42 +++++++++++++----------- htdocs/edit/svc_acct_pop.cgi | 20 +++++++----- htdocs/edit/svc_acct_sm.cgi | 25 +++++++------- htdocs/edit/svc_domain.cgi | 28 ++++++++-------- htdocs/misc/bill.cgi | 19 ++++++----- htdocs/misc/cancel-unaudited.cgi | 21 ++++++------ htdocs/misc/cancel_pkg.cgi | 19 +++++++---- htdocs/misc/expire_pkg.cgi | 22 +++++++------ htdocs/misc/link.cgi | 25 ++++++++------ htdocs/misc/print-invoice.cgi | 22 +++++++------ htdocs/misc/process/link.cgi | 16 +++++---- htdocs/misc/susp_pkg.cgi | 19 +++++++---- htdocs/misc/unsusp_pkg.cgi | 19 +++++++---- htdocs/search/cust_bill.cgi | 13 +++++--- htdocs/search/cust_main.cgi | 21 ++++++------ htdocs/search/cust_pkg.cgi | 15 +++++---- htdocs/search/svc_acct.cgi | 15 +++++---- htdocs/search/svc_acct_sm.cgi | 21 ++++++------ htdocs/search/svc_domain.cgi | 16 +++++---- htdocs/view/cust_bill.cgi | 23 +++++++------ htdocs/view/cust_main.cgi | 39 +++++++++++----------- htdocs/view/cust_pkg.cgi | 33 +++++++++++-------- htdocs/view/svc_acct.cgi | 32 ++++++++++-------- htdocs/view/svc_acct_sm.cgi | 43 ++++++++++++++----------- htdocs/view/svc_domain.cgi | 29 ++++++++++------- 58 files changed, 715 insertions(+), 489 deletions(-) diff --git a/htdocs/browse/agent.cgi b/htdocs/browse/agent.cgi index 446401eca..1b459df95 100755 --- a/htdocs/browse/agent.cgi +++ b/htdocs/browse/agent.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: agent.cgi,v 1.9 1999-01-18 09:41:14 ivan Exp $ +# $Id: agent.cgi,v 1.10 1999-01-19 05:13:24 ivan Exp $ # # ivan@sisd.com 97-dec-12 # @@ -15,7 +15,11 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: agent.cgi,v $ -# Revision 1.9 1999-01-18 09:41:14 ivan +# Revision 1.10 1999-01-19 05:13:24 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.9 1999/01/18 09:41:14 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -42,6 +46,7 @@ # use strict; +use vars qw( $ui $cgi $p $agent ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup swapuid); @@ -55,7 +60,7 @@ use FS::agent_type; use FS::UI::CGI; use FS::UI::agent; -my $ui = new FS::UI::agent; +$ui = new FS::UI::agent; $ui->browse; exit; @@ -63,11 +68,11 @@ exit; __END__ -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my($p)=popurl(2); +$p = popurl(2); print $cgi->header( '-expires' => 'now' ), header('Agent Listing', menubar( 'Main Menu' => $p, @@ -88,7 +93,6 @@ END # Agent # # Agent -my($agent); foreach $agent ( sort { $a->getfield('agentnum') <=> $b->getfield('agentnum') } qsearch('agent',{}) ) { diff --git a/htdocs/browse/agent_type.cgi b/htdocs/browse/agent_type.cgi index 8bbf1e291..ff3a68cf6 100755 --- a/htdocs/browse/agent_type.cgi +++ b/htdocs/browse/agent_type.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: agent_type.cgi,v 1.4 1999-01-18 09:41:15 ivan Exp $ +# $Id: agent_type.cgi,v 1.5 1999-01-19 05:13:25 ivan Exp $ # # ivan@sisd.com 97-dec-10 # @@ -11,7 +11,11 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: agent_type.cgi,v $ -# Revision 1.4 1999-01-18 09:41:15 ivan +# Revision 1.5 1999-01-19 05:13:25 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.4 1999/01/18 09:41:15 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -23,6 +27,7 @@ # use strict; +use vars qw( $cgi $p $agent_type ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup swapuid); @@ -32,11 +37,11 @@ use FS::agent_type; use FS::type_pkgs; use FS::part_pkg; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my($p)=popurl(2); +$p = popurl(2); print $cgi->header( '-expires' => 'now' ), header("Agent Type Listing", menubar( 'Main Menu' => $p, )), "Agent types define groups of packages that you can then assign to". @@ -47,7 +52,6 @@ print $cgi->header( '-expires' => 'now' ), header("Agent Type Listing", menubar( END -my($agent_type); foreach $agent_type ( sort { $a->getfield('typenum') <=> $b->getfield('typenum') } qsearch('agent_type',{}) ) { diff --git a/htdocs/browse/cust_main_county.cgi b/htdocs/browse/cust_main_county.cgi index 728f1d937..0e899f246 100755 --- a/htdocs/browse/cust_main_county.cgi +++ b/htdocs/browse/cust_main_county.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_main_county.cgi,v 1.4 1999-01-18 09:41:16 ivan Exp $ +# $Id: cust_main_county.cgi,v 1.5 1999-01-19 05:13:26 ivan Exp $ # # ivan@sisd.com 97-dec-13 # @@ -10,7 +10,11 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: cust_main_county.cgi,v $ -# Revision 1.4 1999-01-18 09:41:16 ivan +# Revision 1.5 1999-01-19 05:13:26 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.4 1999/01/18 09:41:16 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -22,6 +26,7 @@ # use strict; +use vars qw( $cgi $p $cust_main_county ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup swapuid); @@ -29,11 +34,11 @@ use FS::Record qw(qsearch qsearchs); use FS::CGI qw(header menubar popurl table); use FS::cust_main_county; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my($p) = popurl(2); +$p = popurl(2); print $cgi->header( '-expires' => 'now' ), header("Tax Rate Listing", menubar( 'Main Menu' => $p, @@ -52,7 +57,6 @@ print table, < END -my($cust_main_county); foreach $cust_main_county ( qsearch('cust_main_county',{}) ) { my($hashref)=$cust_main_county->hashref; print <header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -25,6 +29,7 @@ # use strict; +use vars qw( $cgi $p $part_pkg ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup swapuid); @@ -34,11 +39,11 @@ use FS::part_pkg; use FS::pkg_svc; use FS::part_svc; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my $p = popurl(2); +$p = popurl(2); print $cgi->header( '-expires' => 'now' ), header("Package Part Listing",menubar( 'Main Menu' => $p, @@ -57,7 +62,6 @@ print $cgi->header( '-expires' => 'now' ), header("Package Part Listing",menubar END -my($part_pkg); foreach $part_pkg ( sort { $a->getfield('pkgpart') <=> $b->getfield('pkgpart') } qsearch('part_pkg',{}) ) { diff --git a/htdocs/browse/part_referral.cgi b/htdocs/browse/part_referral.cgi index 859995af0..e3360567c 100755 --- a/htdocs/browse/part_referral.cgi +++ b/htdocs/browse/part_referral.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: part_referral.cgi,v 1.6 1999-01-18 09:41:18 ivan Exp $ +# $Id: part_referral.cgi,v 1.7 1999-01-19 05:13:28 ivan Exp $ # # ivan@sisd.com 98-feb-23 # @@ -10,7 +10,11 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: part_referral.cgi,v $ -# Revision 1.6 1999-01-18 09:41:18 ivan +# Revision 1.7 1999-01-19 05:13:28 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.6 1999/01/18 09:41:18 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -28,6 +32,7 @@ # use strict; +use vars qw( $cgi $p $part_referral ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup swapuid); @@ -35,11 +40,11 @@ use FS::Record qw(qsearch); use FS::CGI qw(header menubar popurl table); use FS::part_referral; -my $cgi = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my $p = popurl(2); +$p = popurl(2); print $cgi->header( '-expires' => 'now' ), header("Referral Listing", menubar( 'Main Menu' => $p, @@ -50,7 +55,6 @@ print $cgi->header( '-expires' => 'now' ), header("Referral Listing", menubar( END -my($part_referral); foreach $part_referral ( sort { $a->getfield('refnum') <=> $b->getfield('refnum') } qsearch('part_referral',{}) ) { diff --git a/htdocs/browse/part_svc.cgi b/htdocs/browse/part_svc.cgi index 38c05cb7c..5112f5120 100755 --- a/htdocs/browse/part_svc.cgi +++ b/htdocs/browse/part_svc.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: part_svc.cgi,v 1.8 1999-01-18 09:41:19 ivan Exp $ +# $Id: part_svc.cgi,v 1.9 1999-01-19 05:13:29 ivan Exp $ # # ivan@sisd.com 97-nov-14, 97-dec-9 # @@ -10,7 +10,11 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: part_svc.cgi,v $ -# Revision 1.8 1999-01-18 09:41:19 ivan +# Revision 1.9 1999-01-19 05:13:29 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.8 1999/01/18 09:41:19 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -34,6 +38,7 @@ # use strict; +use vars qw( $cgi $p $part_svc ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -41,11 +46,11 @@ use FS::Record qw(qsearch fields); use FS::part_svc; use FS::CGI qw(header menubar popurl table); -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my $p = popurl(2); +$p = popurl(2); print $cgi->header( '-expires' => 'now' ), header('Service Part Listing', menubar( 'Main Menu' => $p, @@ -61,7 +66,6 @@ print table, < END -my($part_svc); foreach $part_svc ( sort { $a->getfield('svcpart') <=> $b->getfield('svcpart') } qsearch('part_svc',{}) ) { diff --git a/htdocs/browse/svc_acct_pop.cgi b/htdocs/browse/svc_acct_pop.cgi index b172e78ea..5f4126137 100755 --- a/htdocs/browse/svc_acct_pop.cgi +++ b/htdocs/browse/svc_acct_pop.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct_pop.cgi,v 1.4 1999-01-18 09:41:20 ivan Exp $ +# $Id: svc_acct_pop.cgi,v 1.5 1999-01-19 05:13:30 ivan Exp $ # # ivan@sisd.com 98-mar-8 # @@ -10,7 +10,11 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: svc_acct_pop.cgi,v $ -# Revision 1.4 1999-01-18 09:41:20 ivan +# Revision 1.5 1999-01-19 05:13:30 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.4 1999/01/18 09:41:20 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -22,6 +26,7 @@ # use strict; +use vars qw( $cgi $p $svc_acct_pop ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup swapuid); @@ -29,11 +34,11 @@ use FS::Record qw(qsearch qsearchs); use FS::CGI qw(header menubar table popurl); use FS::svc_acct_pop; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my $p = popurl(2); +$p = popurl(2); print $cgi->header( '-expires' => 'now' ), header('POP Listing', menubar( 'Main Menu' => $p, @@ -47,7 +52,6 @@ print $cgi->header( '-expires' => 'now' ), header('POP Listing', menubar( END -my($svc_acct_pop); foreach $svc_acct_pop ( sort { $a->getfield('popnum') <=> $b->getfield('popnum') } qsearch('svc_acct_pop',{}) ) { diff --git a/htdocs/edit/agent.cgi b/htdocs/edit/agent.cgi index 291f1b234..85489079b 100755 --- a/htdocs/edit/agent.cgi +++ b/htdocs/edit/agent.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: agent.cgi,v 1.4 1999-01-18 09:41:21 ivan Exp $ +# $Id: agent.cgi,v 1.5 1999-01-19 05:13:31 ivan Exp $ # # ivan@sisd.com 97-dec-12 # @@ -11,7 +11,11 @@ # use FS::CGI, added inline documentation ivan@sisd.com 98-jul-12 # # $Log: agent.cgi,v $ -# Revision 1.4 1999-01-18 09:41:21 ivan +# Revision 1.5 1999-01-19 05:13:31 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.4 1999/01/18 09:41:21 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -23,6 +27,7 @@ # use strict; +use vars qw ( $cgi $agent $action $query $hashref $p $agent_type ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -31,22 +36,21 @@ use FS::Record qw(qsearch qsearchs); use FS::agent; use FS::agent_type; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my($agent,$action); -my($query) = $cgi->keywords; +($query) = $cgi->keywords; if ( $query =~ /^(\d+)$/ ) { #editing $agent=qsearchs('agent',{'agentnum'=>$1}); $action='Edit'; } else { #adding - $agent=create FS::agent {}; + $agent = new FS::agent {}; $action='Add'; } -my($hashref)=$agent->hashref; +$hashref = $agent->hashref; -my $p = popurl(2); +$p = popurl(2); print $cgi->header( '-expires' => 'now' ), header("$action Agent", menubar( 'Main Menu' => $p, @@ -62,7 +66,6 @@ Agent END -my($agent_type); foreach $agent_type (qsearch('agent_type',{})) { print "header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -38,6 +42,7 @@ # use strict; +use vars qw( $cgi $agent_type $action $hashref $p $part_pkg ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -48,23 +53,22 @@ use FS::agent_type; use FS::part_pkg; use FS::type_pkgs; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my($agent_type,$action); if ( $cgi->keywords ) { #editing my( $query ) = $cgi->keywords; $query =~ /^(\d+)$/; $agent_type=qsearchs('agent_type',{'typenum'=>$1}); $action='Edit'; } else { #adding - $agent_type=create FS::agent_type {}; + $agent_type = new FS::agent_type {}; $action='Add'; } -my($hashref)=$agent_type->hashref; +$hashref = $agent_type->hashref; -my($p)=popurl(2); +$p = popurl(2); print $cgi->header( '-expires' => 'now' ), header("$action Agent Type", menubar( 'Main Menu' => "$p", 'View all agent types' => "${p}browse/agent_type.cgi", @@ -78,7 +82,6 @@ print <
Select which packages agents of this type may sell to customers
END -my($part_pkg); foreach $part_pkg ( qsearch('part_pkg',{}) ) { print qq!
header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -37,23 +41,24 @@ # use strict; +use vars qw( $cgi $query $custnum $otaker $p1 $crednum $date $amount $reason ); use Date::Format; use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup getotaker); use FS::CGI qw(header popurl); -my $cgi = new CGI; +$cgi = new CGI; cgisuidsetup($cgi); -my($query) = $cgi->keywords; +($query) = $cgi->keywords; $query =~ /^(\d+)$/; -my($custnum)=$1; +$custnum = $1; -my($otaker)=getotaker; +$otaker = getotaker; -my $p1 = popurl(1); +$p1 = popurl(1); print $cgi->header( '-expires' => 'now' ), header("Post Credit", ''), < @@ -61,7 +66,7 @@ print $cgi->header( '-expires' => 'now' ), header("Post Credit", ''), <!, $crednum ? $crednum : " (NEW)", qq!!; #custnum @@ -71,11 +76,11 @@ print qq!\nCustomer #$custnum!; #date -my($date)=time; +$date = time; print qq!\nDate: !, time2str("%D",$date), qq!!; #amount -my($amount)=''; +$amount = ''; print qq!\nAmount \$!; #refund? @@ -85,7 +90,7 @@ print qq!\nAmount \$!; #reason -my($reason)=''; +$reason = ''; print qq!\nReason !; print <daytime ivan@sisd.com 98-jul-13 # # $Log: cust_main.cgi,v $ -# Revision 1.6 1999-01-18 09:41:24 ivan +# Revision 1.7 1999-01-19 05:13:34 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.6 1999/01/18 09:41:24 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -55,6 +59,10 @@ # use strict; +use vars qw( $cgi $custnum $action $cust_main $p1 @agents $agentnum + $last $first $ss $company $address1 $address2 $city $zip + $daytime $night $fax @invoicing_list $invoicing_list $payinfo + $payname %payby %paybychecked $refnum $otaker ); use CGI::Switch; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup getotaker); @@ -62,12 +70,11 @@ use FS::Record qw(qsearch qsearchs); use FS::CGI qw(header popurl itable table); use FS::cust_main; -my $cgi = new CGI; +$cgi = new CGI; cgisuidsetup($cgi); #get record -my ( $custnum, $action, $cust_main ); if ( $cgi->keywords ) { #editing my( $query ) = $cgi->keywords; $query =~ /^(\d+)$/; @@ -83,7 +90,7 @@ if ( $cgi->keywords ) { #editing # top -my $p1 = popurl(1); +$p1 = popurl(1); print $cgi->header( '-expires' => 'now' ), header("Customer $action", ''), qq!
!, qq!!, @@ -93,8 +100,8 @@ print $cgi->header( '-expires' => 'now' ), header("Customer $action", ''), # agent -my @agents = qsearch( 'agent', {} ); -my $agentnum = $cust_main->agentnum || $agents[0]->agentnum; #default to first +@agents = qsearch( 'agent', {} ); +$agentnum = $cust_main->agentnum || $agents[0]->agentnum; #default to first if ( scalar(@agents) == 1 ) { print qq!!; } else { @@ -111,7 +118,7 @@ if ( scalar(@agents) == 1 ) { # contact info -my($last,$first,$ss,$company,$address1,$address2,$city,$zip)=( +($last,$first,$ss,$company,$address1,$address2,$city,$zip)=( $cust_main->last, $cust_main->first, $cust_main->ss, @@ -143,7 +150,7 @@ foreach ( qsearch('cust_main_county',{}) ) { } print qq!Zip!; -my($daytime,$night,$fax)=( +($daytime,$night,$fax)=( $cust_main->daytime, $cust_main->night, $cust_main->fax, @@ -190,28 +197,28 @@ print "
Billing information", itable("#c0c0c0"), print qq! CHECKED! if $cust_main->tax eq "Y"; print qq!>Tax Exempt!; print qq!invoicing_list; +@invoicing_list = $cust_main->invoicing_list; print qq! CHECKED! if ! @invoicing_list || grep { $_ eq 'POST' } @invoicing_list; print qq!> Postal mail invoice!; -my $invoicing_list = join(', ', grep { $_ ne 'POST' } @invoicing_list ); +$invoicing_list = join(', ', grep { $_ ne 'POST' } @invoicing_list ); print qq!Email invoice !; print ""; print table("#c0c0c0"), ""; -my($payinfo, $payname)=( +($payinfo, $payname)=( $cust_main->payinfo, $cust_main->payname, ); -my %payby = ( +%payby = ( 'CARD' => qq!Credit card

Exp !. expselect("CARD"). qq!
Name on card
!, 'BILL' => qq!Billing
P.O.
Exp !. expselect("BILL", "12-2037"). qq!
Attention
!, 'COMP' => qq!Complimentary
Approved by
Exp !. expselect("COMP"), ); -my %paybychecked = ( +%paybychecked = ( 'CARD' => qq!Credit card

Exp !. expselect("CARD", $cust_main->paydate). qq!
Name on card
!, 'BILL' => qq!Billing
P.O.
Exp !. expselect("BILL", $cust_main->paydate). qq!
Attention
!, 'COMP' => qq!Complimentary
Approved by
Exp !. expselect("COMP", $cust_main->paydate), @@ -229,7 +236,7 @@ print ""; #referral -my $refnum = $cust_main->refnum || 0; +$refnum = $cust_main->refnum || 0; if ( $custnum ) { print qq!!; } else { @@ -246,7 +253,7 @@ if ( $custnum ) { print ""; } -my $otaker = $cust_main->otaker; +$otaker = $cust_main->otaker; print qq!!, qq!

!, diff --git a/htdocs/edit/cust_main_county-expand.cgi b/htdocs/edit/cust_main_county-expand.cgi index 1b231bcec..65629844d 100755 --- a/htdocs/edit/cust_main_county-expand.cgi +++ b/htdocs/edit/cust_main_county-expand.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_main_county-expand.cgi,v 1.4 1999-01-18 09:41:25 ivan Exp $ +# $Id: cust_main_county-expand.cgi,v 1.5 1999-01-19 05:13:35 ivan Exp $ # # ivan@sisd.com 97-dec-16 # @@ -10,7 +10,11 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: cust_main_county-expand.cgi,v $ -# Revision 1.4 1999-01-18 09:41:25 ivan +# Revision 1.5 1999-01-19 05:13:35 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.4 1999/01/18 09:41:25 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -22,6 +26,7 @@ # use strict; +use vars qw( $cgi $query $taxnum $cust_main_county $p1 ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -29,19 +34,19 @@ use FS::Record qw(qsearch qsearchs); use FS::CGI qw(header menubar popurl); use FS::cust_main_county; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my($query) = $cgi->keywords; +($query) = $cgi->keywords; $query =~ /^(\d+)$/ or die "Illegal taxnum!"; -my($taxnum)=$1; +$taxnum = $1; -my($cust_main_county)=qsearchs('cust_main_county',{'taxnum'=>$taxnum}); +$cust_main_county = qsearchs('cust_main_county',{'taxnum'=>$taxnum}); die "Can't expand entry!" if $cust_main_county->getfield('county'); -my $p1 = popurl(1); +$p1 = popurl(1); print $cgi->header( '-expires' => 'now' ), header("Tax Rate (expand)", menubar( 'Main Menu' => popurl(2), )), <header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -23,6 +27,7 @@ # use strict; +use vars qw( $cgi $cust_main_county ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -30,7 +35,7 @@ use FS::Record qw(qsearch qsearchs); use FS::CGI qw(header menubar popurl table); use FS::cust_main_county; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); @@ -46,7 +51,6 @@ print $cgi->header( '-expires' => 'now' ), header("Edit tax rates", menubar( END -my($cust_main_county); foreach $cust_main_county ( qsearch('cust_main_county',{}) ) { my($hashref)=$cust_main_county->hashref; print <header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -23,20 +27,21 @@ # use strict; +use vars qw( $cgi $query $invnum $p1 $date $payby $payinfo ); use Date::Format; use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); use FS::CGI qw(header popurl); -my($cgi) = new CGI; +$cgi = new CGI; cgisuidsetup($cgi); -my($query) = $cgi->keywords; +($query) = $cgi->keywords; $query =~ /^(\d+)$/; -my($invnum)=$1; +$invnum = $1; -my $p1 = popurl(1); +$p1 = popurl(1); print $cgi->header( '-expires' => 'now' ), header("Enter payment", ''), <
@@ -46,18 +51,18 @@ END
 print qq!Invoice #$invnum!;
 
 #date
-my($date)=time;
+$date = time;
 print qq!
Date: !, time2str("%D",$date), qq!!; #paid print qq!
Amount \$!; #payby -my($payby)="BILL"; +$payby = "BILL"; print qq!
Payby: $payby!; #payinfo (check # now as payby="BILL" hardcoded.. what to do later?) -my($payinfo)=""; +$payinfo = ""; print qq!
Check #!; #paybatch diff --git a/htdocs/edit/cust_pkg.cgi b/htdocs/edit/cust_pkg.cgi index 763eeae07..ed4200830 100755 --- a/htdocs/edit/cust_pkg.cgi +++ b/htdocs/edit/cust_pkg.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_pkg.cgi,v 1.3 1999-01-18 09:41:28 ivan Exp $ +# $Id: cust_pkg.cgi,v 1.4 1999-01-19 05:13:38 ivan Exp $ # # this is for changing packages around, not editing things within the package # @@ -25,7 +25,11 @@ # 98-jun-1 # # $Log: cust_pkg.cgi,v $ -# Revision 1.3 1999-01-18 09:41:28 ivan +# Revision 1.4 1999-01-19 05:13:38 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.3 1999/01/18 09:41:28 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -34,6 +38,8 @@ # use strict; +use vars qw( $cgi %pkg %comment $query $custnum $otaker $p1 @cust_pkg + $cust_main $agent $type_pkgs $count ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup getotaker); @@ -41,10 +47,9 @@ use FS::Record qw(qsearch qsearchs); use FS::CGI qw(header popurl); use FS::part_pkg; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my(%pkg,%comment); foreach (qsearch('part_pkg', {})) { $pkg{ $_ -> getfield('pkgpart') } = $_->getfield('pkg'); $comment{ $_ -> getfield('pkgpart') } = $_->getfield('comment'); @@ -52,13 +57,13 @@ foreach (qsearch('part_pkg', {})) { #untaint custnum -my($query) = $cgi->keywords; +($query) = $cgi->keywords; $query =~ /^(\d+)$/; -my($custnum)=$1; +$custnum = $1; -my($otaker)=&getotaker; +$otaker = &getotaker; -my $p1 = popurl(1); +$p1 = popurl(1); print $cgi->header( '-expires' => 'now' ), header("Add/Edit Packages", ''), <
@@ -68,7 +73,7 @@ END print qq!!; #current packages (except cancelled packages) -my(@cust_pkg) = grep ! $_->getfield('cancel'), +@cust_pkg = grep ! $_->getfield('cancel'), qsearch('cust_pkg',{'custnum'=>$custnum}); if (@cust_pkg) { @@ -105,11 +110,10 @@ These are packages the customer can purchase. Specify the quantity to add of each package.

END -my($cust_main)=qsearchs('cust_main',{'custnum'=>$custnum}); -my($agent)=qsearchs('agent',{'agentnum'=> $cust_main->agentnum }); +$cust_main = qsearchs('cust_main',{'custnum'=>$custnum}); +$agent = qsearchs('agent',{'agentnum'=> $cust_main->agentnum }); -my($type_pkgs); -my ($count) = 0 ; +$count = 0 ; print qq!
! ; foreach $type_pkgs ( qsearch('type_pkgs',{'typenum'=> $agent->typenum }) ) { my($pkgpart)=$type_pkgs->pkgpart; diff --git a/htdocs/edit/part_pkg.cgi b/htdocs/edit/part_pkg.cgi index 9870017ad..e7ac2aeb2 100755 --- a/htdocs/edit/part_pkg.cgi +++ b/htdocs/edit/part_pkg.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: part_pkg.cgi,v 1.7 1999-01-18 09:41:29 ivan Exp $ +# $Id: part_pkg.cgi,v 1.8 1999-01-19 05:13:39 ivan Exp $ # # part_pkg.cgi: Add/Edit package (output form) # @@ -13,7 +13,11 @@ # use FS::CGI, added inline documentation ivan@sisd.com 98-jul-12 # # $Log: part_pkg.cgi,v $ -# Revision 1.7 1999-01-18 09:41:29 ivan +# Revision 1.8 1999-01-19 05:13:39 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.7 1999/01/18 09:41:29 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -34,6 +38,7 @@ # use strict; +use vars qw( $cgi $part_pkg $action $query $hashref $part_svc $count ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -43,7 +48,7 @@ use FS::part_svc; use FS::pkg_svc; use FS::CGI qw(header menubar popurl); -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); @@ -58,8 +63,7 @@ if ( $cgi->param('pkgnum') && $cgi->param('pkgnum') =~ /^(\d+)$/ ) { $cgi->param('pkgnum', ''); } -my($part_pkg,$action); -my($query) = $cgi->keywords; +($query) = $cgi->keywords; if ( $cgi->param('clone') ) { $action='Custom Pricing'; my $old_part_pkg = @@ -70,9 +74,9 @@ if ( $cgi->param('clone') ) { $part_pkg=qsearchs('part_pkg',{'pkgpart'=>$1}); } else { $action='Add'; - $part_pkg=create FS::part_pkg {}; + $part_pkg = new FS::part_pkg {}; } -my($hashref)=$part_pkg->hashref; +$hashref = $part_pkg->hashref; print $cgi->header( '-expires' => 'now' ), header("$action Package Definition", menubar( 'Main Menu' => popurl(2), @@ -109,15 +113,13 @@ Enter the quantity of each service this package includes.

END } -my($part_svc); -my($count) = 0 ; foreach $part_svc ( qsearch('part_svc',{}) ) { my($svcpart)=$part_svc->getfield('svcpart'); my($pkg_svc)=qsearchs('pkg_svc',{ 'pkgpart' => $cgi->param('clone') || $part_pkg->getfield('pkgpart'), 'svcpart' => $svcpart, - }) || create FS::pkg_svc({ + }) || new FS::pkg_svc({ 'pkgpart' => $part_pkg->getfield('pkgpart'), 'svcpart' => $svcpart, 'quantity' => 0, diff --git a/htdocs/edit/part_referral.cgi b/htdocs/edit/part_referral.cgi index e159e03ee..6fd75f851 100755 --- a/htdocs/edit/part_referral.cgi +++ b/htdocs/edit/part_referral.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: part_referral.cgi,v 1.3 1999-01-18 09:41:30 ivan Exp $ +# $Id: part_referral.cgi,v 1.4 1999-01-19 05:13:41 ivan Exp $ # # ivan@sisd.com 98-feb-23 # @@ -12,7 +12,11 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: part_referral.cgi,v $ -# Revision 1.3 1999-01-18 09:41:30 ivan +# Revision 1.4 1999-01-19 05:13:41 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.3 1999/01/18 09:41:30 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -21,6 +25,7 @@ # use strict; +use vars qw( $cgi $part_referral $action $hashref $p1 ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -28,21 +33,20 @@ use FS::Record qw(qsearch qsearchs); use FS::part_referral; use FS::CGI qw(header menubar); -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my($part_referral,$action); if ( $cgi->var('QUERY_STRING') =~ /^(\d+)$/ ) { #editing $part_referral=qsearchs('part_referral',{'refnum'=>$1}); $action='Edit'; } else { #adding - $part_referral=create FS::part_referral {}; + $part_referral = new FS::part_referral {}; $action='Add'; } -my($hashref)=$part_referral->hashref; +$hashref = $part_referral->hashref; -my $p1 = popurl(1); +$p1 = popurl(1); print $cgi->header( '-expires' => 'now' ), header("$action Referral", menubar( 'Main Menu' => popurl(2), 'View all referrals' => popurl(2). "browse/part_referral.cgi", diff --git a/htdocs/edit/part_svc.cgi b/htdocs/edit/part_svc.cgi index c17d518fc..58a1e048e 100755 --- a/htdocs/edit/part_svc.cgi +++ b/htdocs/edit/part_svc.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: part_svc.cgi,v 1.6 1999-01-18 09:41:31 ivan Exp $ +# $Id: part_svc.cgi,v 1.7 1999-01-19 05:13:42 ivan Exp $ # # ivan@sisd.com 97-nov-14 # @@ -10,7 +10,11 @@ # use FS::CGI, added inline documentation ivan@sisd.com 98-jul-12 # # $Log: part_svc.cgi,v $ -# Revision 1.6 1999-01-18 09:41:31 ivan +# Revision 1.7 1999-01-19 05:13:42 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.6 1999/01/18 09:41:31 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -25,6 +29,7 @@ # use strict; +use vars qw( $cgi $part_svc $action $query $hashref $p %defs $svcdb ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -32,22 +37,21 @@ use FS::Record qw(qsearchs fields); use FS::part_svc; use FS::CGI qw(header menubar popurl table); -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my($part_svc,$action); -my($query) = $cgi->keywords; +($query) = $cgi->keywords; if ( $query && $query =~ /^(\d+)$/ ) { #editing $part_svc=qsearchs('part_svc',{'svcpart'=>$1}); $action='Edit'; } else { #adding - $part_svc=create FS::part_svc {}; + $part_svc = new FS::part_svc {}; $action='Add'; } -my($hashref)=$part_svc->hashref; +$hashref = $part_svc->hashref; -my $p = popurl(2); +$p = popurl(2); print $cgi->header( '-expires' => 'now' ), header("$action Service Definition", menubar( 'Main Menu' => $p, 'View all services' => "${p}browse/part_svc.cgi", @@ -90,7 +94,7 @@ END #these might belong somewhere else for other user interfaces #pry need to eventually create stuff that's shared amount UIs -my(%defs)=( +%defs = ( 'svc_acct' => { 'dir' => 'Home directory', 'uid' => 'UID (set to fixed and blank for dial-only)', @@ -120,7 +124,6 @@ my(%defs)=( }, ); -my($svcdb); # svc_acct svc_domain svc_acct_sm svc_charge svc_wo foreach $svcdb ( qw( svc_acct svc_domain svc_acct_sm diff --git a/htdocs/edit/process/agent.cgi b/htdocs/edit/process/agent.cgi index dbbfe8055..1dab7601b 100755 --- a/htdocs/edit/process/agent.cgi +++ b/htdocs/edit/process/agent.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: agent.cgi,v 1.5 1999-01-18 22:47:49 ivan Exp $ +# $Id: agent.cgi,v 1.6 1999-01-19 05:13:47 ivan Exp $ # # ivan@sisd.com 97-dec-12 # @@ -10,7 +10,11 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: agent.cgi,v $ -# Revision 1.5 1999-01-18 22:47:49 ivan +# Revision 1.6 1999-01-19 05:13:47 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.5 1999/01/18 22:47:49 ivan # s/create/new/g; and use fields('table_name') # # Revision 1.4 1998/12/30 23:03:26 ivan @@ -24,6 +28,7 @@ # use strict; +use vars qw ( $cgi $agentnum $old $new $error ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -31,25 +36,24 @@ use FS::Record qw(qsearch qsearchs fields); use FS::agent; use FS::CGI qw(idiot popurl); -my($cgi)=new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my($agentnum)=$cgi->param('agentnum'); +$agentnum = $cgi->param('agentnum'); -my($old)=qsearchs('agent',{'agentnum'=>$agentnum}) if $agentnum; +$old = qsearchs('agent',{'agentnum'=>$agentnum}) if $agentnum; #unmunge typenum $cgi->param('typenum') =~ /^(\d+)(:.*)?$/; $cgi->param('typenum',$1); -my($new)=new FS::agent ( { +$new = new FS::agent ( { map { $_, scalar($cgi->param($_)); } fields('agent') } ); -my($error); if ( $agentnum ) { $error=$new->replace($old); } else { diff --git a/htdocs/edit/process/agent_type.cgi b/htdocs/edit/process/agent_type.cgi index 1efef9e46..e13817121 100755 --- a/htdocs/edit/process/agent_type.cgi +++ b/htdocs/edit/process/agent_type.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: agent_type.cgi,v 1.5 1999-01-18 22:47:50 ivan Exp $ +# $Id: agent_type.cgi,v 1.6 1999-01-19 05:13:48 ivan Exp $ # # ivan@sisd.com 97-dec-11 # @@ -10,7 +10,11 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: agent_type.cgi,v $ -# Revision 1.5 1999-01-18 22:47:50 ivan +# Revision 1.6 1999-01-19 05:13:48 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.5 1999/01/18 22:47:50 ivan # s/create/new/g; and use fields('table_name') # # Revision 1.4 1998/12/30 23:03:27 ivan @@ -24,6 +28,7 @@ # use strict; +use vars qw ( $cgi $typenum $old $new $error $part_pkg ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::CGI qw(idiot popurl); @@ -33,19 +38,18 @@ use FS::agent_type; use FS::type_pkgs; use FS::part_pkg; -my($cgi)=new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my($typenum)=$cgi->param('typenum'); -my($old)=qsearchs('agent_type',{'typenum'=>$typenum}) if $typenum; +$typenum = $cgi->param('typenum'); +$old = qsearchs('agent_type',{'typenum'=>$typenum}) if $typenum; -my($new)=new FS::agent_type ( { +$new = new FS::agent_type ( { map { $_, scalar($cgi->param($_)); } fields('agent_type') } ); -my($error); if ( $typenum ) { $error=$new->replace($old); } else { @@ -58,7 +62,6 @@ if ( $error ) { exit; } -my($part_pkg); foreach $part_pkg (qsearch('part_pkg',{})) { my($pkgpart)=$part_pkg->getfield('pkgpart'); diff --git a/htdocs/edit/process/cust_credit.cgi b/htdocs/edit/process/cust_credit.cgi index e88d05769..8f4515e48 100755 --- a/htdocs/edit/process/cust_credit.cgi +++ b/htdocs/edit/process/cust_credit.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_credit.cgi,v 1.3 1999-01-18 22:47:51 ivan Exp $ +# $Id: cust_credit.cgi,v 1.4 1999-01-19 05:13:49 ivan Exp $ # # Usage: post form to: # http://server.name/path/cust_credit.cgi @@ -22,7 +22,11 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: cust_credit.cgi,v $ -# Revision 1.3 1999-01-18 22:47:51 ivan +# Revision 1.4 1999-01-19 05:13:49 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.3 1999/01/18 22:47:51 ivan # s/create/new/g; and use fields('table_name') # # Revision 1.2 1998/12/17 08:40:18 ivan @@ -30,6 +34,7 @@ # use strict; +use vars qw( $cgi $custnum $new $error ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup getotaker); @@ -37,22 +42,21 @@ use FS::CGI qw(popurl eidiot); use FS::Record qw(fields); use FS::cust_credit; -my($cgi)=new CGI; # create form object +$cgi = new CGI; cgisuidsetup($cgi); $cgi->param('custnum') =~ /^(\d*)$/ or die "Illegal custnum!"; -my($custnum)=$1; +$custnum = $1; $cgi->param('otaker',getotaker); -my($new) = new FS::cust_credit ( { +$new = new FS::cust_credit ( { map { $_, scalar($cgi->param($_)); #} qw(custnum _date amount otaker reason) } fields('cust_credit'); } ); -my($error); $error=$new->insert; &eidiot($error) if $error; diff --git a/htdocs/edit/process/cust_main.cgi b/htdocs/edit/process/cust_main.cgi index f65665142..850f2add4 100755 --- a/htdocs/edit/process/cust_main.cgi +++ b/htdocs/edit/process/cust_main.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_main.cgi,v 1.4 1999-01-18 09:22:32 ivan Exp $ +# $Id: cust_main.cgi,v 1.5 1999-01-19 05:13:50 ivan Exp $ # # Usage: post form to: # http://server.name/path/cust_main.cgi @@ -22,7 +22,11 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: cust_main.cgi,v $ -# Revision 1.4 1999-01-18 09:22:32 ivan +# Revision 1.5 1999-01-19 05:13:50 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.4 1999/01/18 09:22:32 ivan # changes to track email addresses for email invoicing # # Revision 1.3 1998/12/17 08:40:19 ivan @@ -33,7 +37,7 @@ # use strict; -#use CGI; +use vars qw( $cgi $payby @invoicing_list $new $custnum ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup getotaker); @@ -41,7 +45,7 @@ use FS::CGI qw(eidiot popurl); use FS::Record qw(qsearchs fields); use FS::cust_main; -my($cgi)=new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); #unmunge stuff @@ -57,7 +61,7 @@ $cgi->param('state', $1); $cgi->param('county', $3 || ''); $cgi->param('country', $4); -my $payby = $cgi->param('payby'); +$payby = $cgi->param('payby'); $cgi->param('payinfo', $cgi->param( $payby. '_payinfo' ) ); $cgi->param('paydate', $cgi->param( $payby. '_month' ). '-'. $cgi->param( $payby. '_year' ) ); @@ -65,12 +69,12 @@ $cgi->param('payname', $cgi->param( $payby. '_payname' ) ); $cgi->param('otaker', &getotaker ); -my @invoicing_list = split( /\s*\,\s*/, $cgi->param('invoicing_list') ); +@invoicing_list = split( /\s*\,\s*/, $cgi->param('invoicing_list') ); push @invoicing_list, 'POST' if $cgi->param('invoicing_list_POST'); #create new record object -my($new) = new FS::cust_main ( { +$new = new FS::cust_main ( { map { $_, scalar($cgi->param($_)) # } qw(custnum agentnum last first ss company address1 address2 city county @@ -98,6 +102,6 @@ if ( $new->custnum eq '' ) { $new->invoicing_list( \@invoicing_list ); } -my $custnum = $new->custnum; +$custnum = $new->custnum; print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum#cust_main"); diff --git a/htdocs/edit/process/cust_main_county-expand.cgi b/htdocs/edit/process/cust_main_county-expand.cgi index e91410f64..94aa8547e 100755 --- a/htdocs/edit/process/cust_main_county-expand.cgi +++ b/htdocs/edit/process/cust_main_county-expand.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_main_county-expand.cgi,v 1.4 1999-01-18 22:47:52 ivan Exp $ +# $Id: cust_main_county-expand.cgi,v 1.5 1999-01-19 05:13:51 ivan Exp $ # # ivan@sisd.com 97-dec-16 # @@ -15,7 +15,11 @@ # ivan@sisd.com 98-sep-2 # # $Log: cust_main_county-expand.cgi,v $ -# Revision 1.4 1999-01-18 22:47:52 ivan +# Revision 1.5 1999-01-19 05:13:51 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.4 1999/01/18 22:47:52 ivan # s/create/new/g; and use fields('table_name') # # Revision 1.3 1998/12/17 08:40:20 ivan @@ -26,6 +30,7 @@ # use strict; +use vars qw ( $cgi $taxnum $cust_main_county @expansion $expansion ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup datasrc); @@ -34,16 +39,15 @@ use FS::CGI qw(eidiot popurl); use FS::cust_main_county; use FS::cust_main; -my($cgi)=new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); $cgi->param('taxnum') =~ /^(\d+)$/ or die "Illegal taxnum!"; -my($taxnum)=$1; -my($cust_main_county)=qsearchs('cust_main_county',{'taxnum'=>$taxnum}) +$taxnum = $1; +$cust_main_county = qsearchs('cust_main_county',{'taxnum'=>$taxnum}) or die ("Unknown taxnum!"); -my(@expansion); if ( $cgi->param('delim') eq 'n' ) { @expansion=split(/\n/,$cgi->param('expansion')); } elsif ( $cgi->param('delim') eq 's' ) { @@ -57,7 +61,6 @@ if ( $cgi->param('delim') eq 'n' ) { $1; } @expansion; -my($expansion); foreach ( @expansion) { my(%hash)=$cust_main_county->hash; my($new)=new FS::cust_main_county \%hash; diff --git a/htdocs/edit/process/cust_main_county.cgi b/htdocs/edit/process/cust_main_county.cgi index 8d274b81f..3b0cdebe9 100755 --- a/htdocs/edit/process/cust_main_county.cgi +++ b/htdocs/edit/process/cust_main_county.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_main_county.cgi,v 1.4 1999-01-18 22:47:53 ivan Exp $ +# $Id: cust_main_county.cgi,v 1.5 1999-01-19 05:13:52 ivan Exp $ # # ivan@sisd.com 97-dec-16 # @@ -10,7 +10,11 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: cust_main_county.cgi,v $ -# Revision 1.4 1999-01-18 22:47:53 ivan +# Revision 1.5 1999-01-19 05:13:52 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.4 1999/01/18 22:47:53 ivan # s/create/new/g; and use fields('table_name') # # Revision 1.3 1998/12/17 08:40:21 ivan @@ -21,6 +25,7 @@ # use strict; +use vars qw( $cgi ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -28,7 +33,7 @@ use FS::CGI qw(eidiot); use FS::Record qw(qsearch qsearchs); use FS::cust_main_county; -my($cgi)=new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); foreach ( $cgi->param ) { diff --git a/htdocs/edit/process/cust_pay.cgi b/htdocs/edit/process/cust_pay.cgi index 4d8770404..21431f48d 100755 --- a/htdocs/edit/process/cust_pay.cgi +++ b/htdocs/edit/process/cust_pay.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_pay.cgi,v 1.4 1999-01-18 22:47:54 ivan Exp $ +# $Id: cust_pay.cgi,v 1.5 1999-01-19 05:13:53 ivan Exp $ # # Usage: post form to: # http://server.name/path/cust_pay.cgi @@ -15,7 +15,11 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: cust_pay.cgi,v $ -# Revision 1.4 1999-01-18 22:47:54 ivan +# Revision 1.5 1999-01-19 05:13:53 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.4 1999/01/18 22:47:54 ivan # s/create/new/g; and use fields('table_name') # # Revision 1.3 1998/12/30 23:03:28 ivan @@ -26,6 +30,7 @@ # use strict; +use vars qw( $cgi $invnum $new $error ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -33,20 +38,19 @@ use FS::CGI qw(idiot popurl); use FS::Record qw(fields); use FS::cust_pay; -my($cgi)=new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); $cgi->param('invnum') =~ /^(\d*)$/ or die "Illegal svcnum!"; -my($invnum)=$1; +$invnum = $1; -my($new) = new FS::cust_pay ( { +$new = new FS::cust_pay ( { map { $_, scalar($cgi->param($_)); #} qw(invnum paid _date payby payinfo paybatch) } fields('cust_pay') } ); -my($error); $error=$new->insert; if ($error) { #error! diff --git a/htdocs/edit/process/cust_pkg.cgi b/htdocs/edit/process/cust_pkg.cgi index 9cd9e02f1..e8493b2de 100755 --- a/htdocs/edit/process/cust_pkg.cgi +++ b/htdocs/edit/process/cust_pkg.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_pkg.cgi,v 1.2 1998-12-17 08:40:23 ivan Exp $ +# $Id: cust_pkg.cgi,v 1.3 1999-01-19 05:13:54 ivan Exp $ # # this is for changing packages around, not for editing things within the # package @@ -21,32 +21,35 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: cust_pkg.cgi,v $ -# Revision 1.2 1998-12-17 08:40:23 ivan +# Revision 1.3 1999-01-19 05:13:54 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.2 1998/12/17 08:40:23 ivan # s/CGI::Request/CGI.pm/; etc # use strict; +use vars qw( $cgi $custnum @remove_pkgnums @pkgparts $pkgpart $error ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); use FS::CGI qw(idiot popurl); use FS::cust_pkg; -my($cgi)=new CGI; # create form object +$cgi = new CGI; # create form object &cgisuidsetup($cgi); #untaint custnum $cgi->param('new_custnum') =~ /^(\d+)$/; -my($custnum)=$1; +$custnum = $1; -my(@remove_pkgnums) = map { +@remove_pkgnums = map { /^(\d+)$/ or die "Illegal remove_pkg value!"; $1; } $cgi->param('remove_pkg'); -my(@pkgparts); -my($pkgpart); foreach $pkgpart ( map /^pkg(\d+)$/ ? $1 : (), $cgi->param ) { my($num_pkgs)=$cgi->param("pkg$pkgpart"); while ( $num_pkgs-- ) { @@ -54,7 +57,7 @@ foreach $pkgpart ( map /^pkg(\d+)$/ ? $1 : (), $cgi->param ) { } } -my($error) = FS::cust_pkg::order($custnum,\@pkgparts,\@remove_pkgnums); +$error = FS::cust_pkg::order($custnum,\@pkgparts,\@remove_pkgnums); if ($error) { idiot($error); diff --git a/htdocs/edit/process/part_pkg.cgi b/htdocs/edit/process/part_pkg.cgi index 55bf4ffaf..3ec31589a 100755 --- a/htdocs/edit/process/part_pkg.cgi +++ b/htdocs/edit/process/part_pkg.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: part_pkg.cgi,v 1.6 1999-01-18 22:47:56 ivan Exp $ +# $Id: part_pkg.cgi,v 1.7 1999-01-19 05:13:55 ivan Exp $ # # process/part_pkg.cgi: Edit package definitions (process form) # @@ -17,7 +17,11 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: part_pkg.cgi,v $ -# Revision 1.6 1999-01-18 22:47:56 ivan +# Revision 1.7 1999-01-19 05:13:55 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.6 1999/01/18 22:47:56 ivan # s/create/new/g; and use fields('table_name') # # Revision 1.5 1998/12/30 23:03:29 ivan @@ -34,6 +38,7 @@ # use strict; +use vars qw( $cgi $pkgpart $old $new $part_svc ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -43,14 +48,14 @@ use FS::part_pkg; use FS::pkg_svc; use FS::cust_pkg; -my($cgi)=new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my($pkgpart)=$cgi->param('pkgpart'); +$pkgpart = $cgi->param('pkgpart'); -my($old)=qsearchs('part_pkg',{'pkgpart'=>$pkgpart}) if $pkgpart; +$old = qsearchs('part_pkg',{'pkgpart'=>$pkgpart}) if $pkgpart; -my($new)=new FS::part_pkg ( { +$new = new FS::part_pkg ( { map { $_, scalar($cgi->param($_)); } fields('part_pkg') @@ -71,7 +76,6 @@ if ( $pkgpart ) { $pkgpart=$new->getfield('pkgpart'); } -my($part_svc); foreach $part_svc (qsearch('part_svc',{})) { # don't update non-changing records in part_svc (causing harmless but annoying # "Records identical" errors). ivan@sisd.com 98-jan-19 diff --git a/htdocs/edit/process/part_referral.cgi b/htdocs/edit/process/part_referral.cgi index b5e479d3b..9886015f9 100755 --- a/htdocs/edit/process/part_referral.cgi +++ b/htdocs/edit/process/part_referral.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: part_referral.cgi,v 1.4 1999-01-18 22:47:57 ivan Exp $ +# $Id: part_referral.cgi,v 1.5 1999-01-19 05:13:56 ivan Exp $ # # ivan@sisd.com 98-feb-23 # @@ -10,7 +10,11 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: part_referral.cgi,v $ -# Revision 1.4 1999-01-18 22:47:57 ivan +# Revision 1.5 1999-01-19 05:13:56 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.4 1999/01/18 22:47:57 ivan # s/create/new/g; and use fields('table_name') # # Revision 1.3 1998/12/30 23:03:30 ivan @@ -21,6 +25,7 @@ # use strict; +use vars qw( $cgi $refnum $new ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -28,12 +33,12 @@ use FS::Record qw(qsearchs fields); use FS::part_referral; use FS::CGI qw(popurl eidiot); -my($cgi)=new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my($refnum)=$cgi->param('refnum'); +$refnum = $cgi->param('refnum'); -my($new)=new FS::part_referral ( { +$new = new FS::part_referral ( { map { $_, scalar($cgi->param($_)); } fields('part_referral') diff --git a/htdocs/edit/process/part_svc.cgi b/htdocs/edit/process/part_svc.cgi index 5b814363b..e25192c1c 100755 --- a/htdocs/edit/process/part_svc.cgi +++ b/htdocs/edit/process/part_svc.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: part_svc.cgi,v 1.5 1999-01-18 22:47:58 ivan Exp $ +# $Id: part_svc.cgi,v 1.6 1999-01-19 05:13:57 ivan Exp $ # # ivan@sisd.com 97-nov-14 # @@ -10,7 +10,11 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: part_svc.cgi,v $ -# Revision 1.5 1999-01-18 22:47:58 ivan +# Revision 1.6 1999-01-19 05:13:57 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.5 1999/01/18 22:47:58 ivan # s/create/new/g; and use fields('table_name') # # Revision 1.4 1998/12/30 23:03:31 ivan @@ -24,6 +28,7 @@ # use strict; +use vars qw ( $cgi $svcpart $old $new ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -31,14 +36,14 @@ use FS::Record qw(qsearchs fields); use FS::part_svc; use FS::CGI qw(eidiot popurl); -my($cgi)=new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my($svcpart)=$cgi->param('svcpart'); +$svcpart = $cgi->param('svcpart'); -my($old)=qsearchs('part_svc',{'svcpart'=>$svcpart}) if $svcpart; +$old = qsearchs('part_svc',{'svcpart'=>$svcpart}) if $svcpart; -my($new)=new FS::part_svc ( { +$new = new FS::part_svc ( { map { $_, scalar($cgi->param($_)); # } qw(svcpart svc svcdb) diff --git a/htdocs/edit/process/svc_acct.cgi b/htdocs/edit/process/svc_acct.cgi index 4e4080da7..7fd87ea84 100755 --- a/htdocs/edit/process/svc_acct.cgi +++ b/htdocs/edit/process/svc_acct.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct.cgi,v 1.3 1999-01-18 22:47:59 ivan Exp $ +# $Id: svc_acct.cgi,v 1.4 1999-01-19 05:13:58 ivan Exp $ # # Usage: post form to: # http://server.name/path/svc_acct.cgi @@ -23,7 +23,11 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: svc_acct.cgi,v $ -# Revision 1.3 1999-01-18 22:47:59 ivan +# Revision 1.4 1999-01-19 05:13:58 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.3 1999/01/18 22:47:59 ivan # s/create/new/g; and use fields('table_name') # # Revision 1.2 1998/12/17 08:40:27 ivan @@ -31,6 +35,7 @@ # use strict; +use vars qw( $cgi $svcnum $old $new ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -38,13 +43,13 @@ use FS::CGI qw(eidiot popurl); use FS::Record qw(qsearchs fields); use FS::svc_acct; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); $cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!"; -my($svcnum)=$1; +$svcnum = $1; -my($old)=qsearchs('svc_acct',{'svcnum'=>$svcnum}) if $svcnum; +$old = qsearchs('svc_acct',{'svcnum'=>$svcnum}) if $svcnum; #unmunge popnum $cgi->param('popnum', (split(/:/, $cgi->param('popnum') ))[0] ); @@ -54,7 +59,7 @@ if ( $cgi->param('_password') eq '*HIDDEN*' ) { $cgi->param('_password',$old->getfield('_password')); } -my($new) = new FS::svc_acct ( { +$new = new FS::svc_acct ( { map { $_, scalar($cgi->param($_)); #} qw(svcnum pkgnum svcpart username _password popnum uid gid finger dir diff --git a/htdocs/edit/process/svc_acct_pop.cgi b/htdocs/edit/process/svc_acct_pop.cgi index fac2fa452..414c6fb28 100755 --- a/htdocs/edit/process/svc_acct_pop.cgi +++ b/htdocs/edit/process/svc_acct_pop.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct_pop.cgi,v 1.4 1999-01-18 22:48:00 ivan Exp $ +# $Id: svc_acct_pop.cgi,v 1.5 1999-01-19 05:13:59 ivan Exp $ # # ivan@sisd.com 98-mar-8 # @@ -10,7 +10,11 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: svc_acct_pop.cgi,v $ -# Revision 1.4 1999-01-18 22:48:00 ivan +# Revision 1.5 1999-01-19 05:13:59 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.4 1999/01/18 22:48:00 ivan # s/create/new/g; and use fields('table_name') # # Revision 1.3 1998/12/30 23:03:32 ivan @@ -21,6 +25,7 @@ # use strict; +use vars qw( $cgi $popnum $old $new ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -28,15 +33,15 @@ use FS::Record qw(qsearch qsearchs fields); use FS::svc_acct_pop; use FS::CGI qw(popurl eidiot); -my($cgi)=new CGI; # create form object +$cgi = new CGI; # create form object &cgisuidsetup($cgi); -my($popnum)=$cgi->param('popnum'); +$popnum = $cgi->param('popnum'); -my($old)=qsearchs('svc_acct_pop',{'popnum'=>$popnum}) if $popnum; +$old = qsearchs('svc_acct_pop',{'popnum'=>$popnum}) if $popnum; -my($new)=new FS::svc_acct_pop ( { +$new = new FS::svc_acct_pop ( { map { $_, scalar($cgi->param($_)); } fields('svc_acct_pop') diff --git a/htdocs/edit/process/svc_acct_sm.cgi b/htdocs/edit/process/svc_acct_sm.cgi index fc723d9de..53650c888 100755 --- a/htdocs/edit/process/svc_acct_sm.cgi +++ b/htdocs/edit/process/svc_acct_sm.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct_sm.cgi,v 1.3 1999-01-18 22:48:01 ivan Exp $ +# $Id: svc_acct_sm.cgi,v 1.4 1999-01-19 05:14:00 ivan Exp $ # # Usage: post form to: # http://server.name/path/svc_acct_sm.cgi @@ -24,7 +24,11 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: svc_acct_sm.cgi,v $ -# Revision 1.3 1999-01-18 22:48:01 ivan +# Revision 1.4 1999-01-19 05:14:00 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.3 1999/01/18 22:48:01 ivan # s/create/new/g; and use fields('table_name') # # Revision 1.2 1998/12/17 08:40:29 ivan @@ -32,32 +36,32 @@ # use strict; +use vars qw( $cgi $svcnum $old $new $error ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); use FS::Record qw(qsearchs fields); use FS::svc_acct_sm; -my($cgi)=new CGI; +$cgi = new CGI; cgisuidsetup($cgi); $cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!"; -my($svcnum)=$1; +$svcnum =$1; -my($old)=qsearchs('svc_acct_sm',{'svcnum'=>$svcnum}) if $svcnum; +$old = qsearchs('svc_acct_sm',{'svcnum'=>$svcnum}) if $svcnum; #unmunge domsvc and domuid $cgi->param('domsvc',(split(/:/, $cgi->param('domsvc') ))[0] ); $cgi->param('domuid',(split(/:/, $cgi->param('domuid') ))[0] ); -my($new) = new FS::svc_acct_sm ( { +$new = new FS::svc_acct_sm ( { map { ($_, scalar($cgi->param($_))); #} qw(svcnum pkgnum svcpart domuser domuid domsvc) } ( fields('svc_acct_sm'), qw( pkgnum svcpart) ) } ); -my($error); if ( $svcnum ) { $error = $new->replace($old); } else { diff --git a/htdocs/edit/process/svc_domain.cgi b/htdocs/edit/process/svc_domain.cgi index 992123cc7..4c96823e2 100755 --- a/htdocs/edit/process/svc_domain.cgi +++ b/htdocs/edit/process/svc_domain.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_domain.cgi,v 1.3 1999-01-18 22:48:02 ivan Exp $ +# $Id: svc_domain.cgi,v 1.4 1999-01-19 05:14:01 ivan Exp $ # # Usage: post form to: # http://server.name/path/svc_domain.cgi @@ -20,7 +20,11 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: svc_domain.cgi,v $ -# Revision 1.3 1999-01-18 22:48:02 ivan +# Revision 1.4 1999-01-19 05:14:01 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.3 1999/01/18 22:48:02 ivan # s/create/new/g; and use fields('table_name') # # Revision 1.2 1998/12/17 08:40:30 ivan @@ -28,6 +32,7 @@ # use strict; +use vars qw( $cgi $svcnum $new $error ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -37,20 +42,19 @@ use FS::svc_domain; #remove this to actually test the domains! $FS::svc_domain::whois_hack = 1; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); $cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!"; -my($svcnum)=$1; +$svcnum = $1; -my($new) = new FS::svc_domain ( { +$new = new FS::svc_domain ( { map { $_, scalar($cgi->param($_)); #} qw(svcnum pkgnum svcpart domain action purpose) } ( fields('svc_domain'), qw( pkgnum svcpart action purpose ) ) } ); -my($error); if ($cgi->param('legal') ne "Yes") { $error = "Customer did not agree to be bound by NSI's ". qq!!. diff --git a/htdocs/edit/svc_acct.cgi b/htdocs/edit/svc_acct.cgi index e5cf4857c..af18654ac 100755 --- a/htdocs/edit/svc_acct.cgi +++ b/htdocs/edit/svc_acct.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct.cgi,v 1.5 1999-01-18 09:41:32 ivan Exp $ +# $Id: svc_acct.cgi,v 1.6 1999-01-19 05:13:43 ivan Exp $ # # Usage: svc_acct.cgi {svcnum} | pkgnum{pkgnum}-svcpart{svcpart} # http://server.name/path/svc_acct.cgi? {svcnum} | pkgnum{pkgnum}-svcpart{svcpart} @@ -18,7 +18,11 @@ # use conf/shells and dbdef username length ivan@sisd.com 98-jul-13 # # $Log: svc_acct.cgi,v $ -# Revision 1.5 1999-01-18 09:41:32 ivan +# Revision 1.6 1999-01-19 05:13:43 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.5 1999/01/18 09:41:32 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -30,7 +34,9 @@ # use strict; -use vars qw($conf); +use vars qw( $conf $cgi @shells $action $svcnum $svc_acct $pkgnum $svcpart + $part_svc $query $svc $otaker $username $password $ulen $ulen2 $p1 + $popnum $uid $gid $finger $dir $shell $quota $slipip ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup getotaker); @@ -39,15 +45,13 @@ use FS::Record qw(qsearch qsearchs fields); use FS::svc_acct; use FS::Conf; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); $conf = new FS::Conf; -my @shells = $conf->config('shells'); - -my($action,$svcnum,$svc_acct,$pkgnum,$svcpart,$part_svc); +@shells = $conf->config('shells'); -my($query) = $cgi->keywords; +($query) = $cgi->keywords; if ( $query =~ /^(\d+)$/ ) { #editing $svcnum=$1; @@ -67,7 +71,7 @@ if ( $query =~ /^(\d+)$/ ) { #editing } else { #adding - $svc_acct=create FS::svc_acct({}); + $svc_acct = new FS::svc_acct({}); foreach $_ (split(/-/,$query)) { $pkgnum=$1 if /^pkgnum(\d+)$/; @@ -99,19 +103,19 @@ if ( $query =~ /^(\d+)$/ ) { #editing } -my($svc)=$part_svc->getfield('svc'); +$svc = $part_svc->getfield('svc'); -my($otaker)=getotaker; +$otaker = getotaker; -my($username,$password)=( +($username,$password)=( $svc_acct->username, $svc_acct->_password ? "*HIDDEN*" : '', ); -my($ulen)=$svc_acct->dbdef_table->column('username')->length; -my($ulen2)=$ulen+2; +$ulen = $svc_acct->dbdef_table->column('username')->length; +$ulen2 = $ulen+2; -my $p1 = popurl(1); +$p1 = popurl(1); print $cgi->header( '-expires' => 'now' ), header("$action $svc account"), < @@ -125,7 +129,7 @@ Username: END #pop -my($popnum)=$svc_acct->popnum || 0; +$popnum = $svc_acct->popnum || 0; if ( $part_svc->svc_acct__popnum_flag eq "F" ) { print qq!!; } else { @@ -143,7 +147,7 @@ if ( $part_svc->svc_acct__popnum_flag eq "F" ) { print ""; } -my($uid,$gid,$finger,$dir)=( +($uid,$gid,$finger,$dir)=( $svc_acct->uid, $svc_acct->gid, $svc_acct->finger, @@ -157,7 +161,7 @@ print < END -my($shell)=$svc_acct->shell; +$shell = $svc_acct->shell; if ( $part_svc->svc_acct__shell_flag eq "F" ) { print qq!!; } else { @@ -170,7 +174,7 @@ if ( $part_svc->svc_acct__shell_flag eq "F" ) { print ""; } -my($quota,$slipip)=( +($quota,$slipip)=( $svc_acct->quota, $svc_acct->slipip, ); diff --git a/htdocs/edit/svc_acct_pop.cgi b/htdocs/edit/svc_acct_pop.cgi index e2c4bcdbe..115c46745 100755 --- a/htdocs/edit/svc_acct_pop.cgi +++ b/htdocs/edit/svc_acct_pop.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct_pop.cgi,v 1.5 1999-01-18 09:41:33 ivan Exp $ +# $Id: svc_acct_pop.cgi,v 1.6 1999-01-19 05:13:44 ivan Exp $ # # ivan@sisd.com 98-mar-8 # @@ -10,7 +10,11 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: svc_acct_pop.cgi,v $ -# Revision 1.5 1999-01-18 09:41:33 ivan +# Revision 1.6 1999-01-19 05:13:44 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.5 1999/01/18 09:41:33 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -26,6 +30,7 @@ # use strict; +use vars qw( $cgi $svc_acct_pop $action $query $hashref $p1 ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -33,22 +38,21 @@ use FS::Record qw(qsearch qsearchs); use FS::svc_acct_pop; use FS::CGI qw(header menubar); -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my($svc_acct_pop,$action); -my($query)=$cgi->keywords; +($query)=$cgi->keywords; if ( $query =~ /^(\d+)$/ ) { #editing $svc_acct_pop=qsearchs('svc_acct_pop',{'popnum'=>$1}); $action='Edit'; } else { #adding - $svc_acct_pop=create FS::svc_acct_pop {}; + $svc_acct_pop = new FS::svc_acct_pop {}; $action='Add'; } -my($hashref)=$svc_acct_pop->hashref; +$hashref = $svc_acct_pop->hashref; -my $p1 = popurl(1); +$p1 = popurl(1); print $cgi->header( '-expires' => 'now' ), header("$action POP", menubar( 'Main Menu' => popurl(2), 'View all POPs' => popurl(2). "browse/svc_acct_pop.cgi", diff --git a/htdocs/edit/svc_acct_sm.cgi b/htdocs/edit/svc_acct_sm.cgi index 9acaed188..0de4fa1ac 100755 --- a/htdocs/edit/svc_acct_sm.cgi +++ b/htdocs/edit/svc_acct_sm.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct_sm.cgi,v 1.6 1999-01-18 09:41:34 ivan Exp $ +# $Id: svc_acct_sm.cgi,v 1.7 1999-01-19 05:13:45 ivan Exp $ # # Usage: svc_acct_sm.cgi {svcnum} | pkgnum{pkgnum}-svcpart{svcpart} # http://server.name/path/svc_acct_sm.cgi? {svcnum} | pkgnum{pkgnum}-svcpart{svcpart} @@ -35,7 +35,11 @@ # /var/spool/freeside/conf/domain ivan@sisd.com 98-jul-26 # # $Log: svc_acct_sm.cgi,v $ -# Revision 1.6 1999-01-18 09:41:34 ivan +# Revision 1.7 1999-01-19 05:13:45 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.6 1999/01/18 09:41:34 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -53,7 +57,8 @@ # use strict; -use vars qw($conf); +use vars qw( $conf $cgi $mydomain $action $svcnum $svc_acct_sm $pkgnum $svcpart + $part_svc $query %username %domain $p1 $domuser $domsvc $domuid ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -62,15 +67,14 @@ use FS::Record qw(qsearch qsearchs fields); use FS::svc_acct_sm; use FS::Conf; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); $conf = new FS::Conf; -my $mydomain = $conf->config('domain'); +$mydomain = $conf->config('domain'); -my($action,$svcnum,$svc_acct_sm,$pkgnum,$svcpart,$part_svc); -my($query) = $cgi->keywords; +($query) = $cgi->keywords; if ( $query =~ /^(\d+)$/ ) { #editing $svcnum=$1; @@ -90,7 +94,7 @@ if ( $query =~ /^(\d+)$/ ) { #editing } else { #adding - $svc_acct_sm=create FS::svc_acct_sm({}); + $svc_acct_sm = new FS::svc_acct_sm({}); foreach $_ (split(/-/,$query)) { #get & untaint pkgnum & svcpart $pkgnum=$1 if /^pkgnum(\d+)$/; @@ -113,7 +117,6 @@ if ( $query =~ /^(\d+)$/ ) { #editing } -my(%username,%domain); if ($pkgnum) { #find all possible uids (and usernames) @@ -171,7 +174,7 @@ if ($pkgnum) { die "\$action eq Add, but \$pkgnum is null!\n"; } -my $p1 = popurl(1); +$p1 = popurl(1); print $cgi->header( '-expires' => 'now' ), header("Mail Alias $action", ''), < END @@ -191,7 +194,7 @@ print qq!!; #svcpart print qq!!; -my($domuser,$domsvc,$domuid)=( +($domuser,$domsvc,$domuid)=( $svc_acct_sm->domuser, $svc_acct_sm->domsvc, $svc_acct_sm->domuid, diff --git a/htdocs/edit/svc_domain.cgi b/htdocs/edit/svc_domain.cgi index d40f9001b..45ff8bb6c 100755 --- a/htdocs/edit/svc_domain.cgi +++ b/htdocs/edit/svc_domain.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_domain.cgi,v 1.6 1999-01-18 09:41:35 ivan Exp $ +# $Id: svc_domain.cgi,v 1.7 1999-01-19 05:13:46 ivan Exp $ # # Usage: svc_domain.cgi pkgnum{pkgnum}-svcpart{svcpart} # http://server.name/path/svc_domain.cgi?pkgnum{pkgnum}-svcpart{svcpart} @@ -17,7 +17,11 @@ # no GOV in instructions ivan@sisd.com 98-jul-17 # # $Log: svc_domain.cgi,v $ -# Revision 1.6 1999-01-18 09:41:35 ivan +# Revision 1.7 1999-01-19 05:13:46 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.6 1999/01/18 09:41:35 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -36,6 +40,8 @@ # use strict; +use vars qw( $cgi $action $svcnum $svc_domain $pkgnum $svcpart $part_svc + $query $svc $otaker $domain $p1 ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup getotaker); @@ -43,12 +49,10 @@ use FS::CGI qw(header popurl); use FS::Record qw(qsearch qsearchs fields); use FS::svc_domain; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my($action,$svcnum,$svc_domain,$pkgnum,$svcpart,$part_svc); - -my($query) = $cgi->keywords; +($query) = $cgi->keywords; if ( $query =~ /^(\d+)$/ ) { #editing $svcnum=$1; @@ -68,7 +72,7 @@ if ( $query =~ /^(\d+)$/ ) { #editing } else { #adding - $svc_domain=create FS::svc_domain({}); + $svc_domain = new FS::svc_domain({}); foreach $_ (split(/-/,$query)) { $pkgnum=$1 if /^pkgnum(\d+)$/; @@ -91,15 +95,13 @@ if ( $query =~ /^(\d+)$/ ) { #editing } -my($svc)=$part_svc->getfield('svc'); +$svc = $part_svc->getfield('svc'); -my($otaker)=getotaker; +$otaker = getotaker; -my($domain)=( - $svc_domain->domain, -); +$domain = $svc_domain->domain; -my $p1 = popurl(1); +$p1 = popurl(1); print $cgi->header( '-expires' => 'now' ), header("$action $svc", ''), < diff --git a/htdocs/misc/bill.cgi b/htdocs/misc/bill.cgi index 430aefa4b..2c17baec7 100755 --- a/htdocs/misc/bill.cgi +++ b/htdocs/misc/bill.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: bill.cgi,v 1.3 1998-12-23 03:01:13 ivan Exp $ +# $Id: bill.cgi,v 1.4 1999-01-19 05:14:02 ivan Exp $ # # s/FS:Search/FS::Record/ and cgisuidsetup($cgi) ivan@sisd.com 98-mar-13 # @@ -8,7 +8,11 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: bill.cgi,v $ -# Revision 1.3 1998-12-23 03:01:13 ivan +# Revision 1.4 1999-01-19 05:14:02 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.3 1998/12/23 03:01:13 ivan # $cgi->keywords instead of $cgi->query_string # # Revision 1.2 1998/12/17 09:12:41 ivan @@ -16,6 +20,7 @@ # use strict; +use vars qw( $cgi $query $custnum $cust_main $error ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -23,18 +28,16 @@ use FS::CGI qw(popurl eidiot); use FS::Record qw(qsearchs); use FS::cust_main; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); #untaint custnum -my($query) = $cgi->keywords; +($query) = $cgi->keywords; $query =~ /^(\d*)$/; -my($custnum)=$1; -my($cust_main)=qsearchs('cust_main',{'custnum'=>$custnum}); +$custnum = $1; +$cust_main = qsearchs('cust_main',{'custnum'=>$custnum}); die "Can't find customer!\n" unless $cust_main; -my($error); - $error = $cust_main->bill( # 'time'=>$time ); diff --git a/htdocs/misc/cancel-unaudited.cgi b/htdocs/misc/cancel-unaudited.cgi index 4c5fbc7f3..b8729440f 100755 --- a/htdocs/misc/cancel-unaudited.cgi +++ b/htdocs/misc/cancel-unaudited.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cancel-unaudited.cgi,v 1.3 1998-12-23 03:02:05 ivan Exp $ +# $Id: cancel-unaudited.cgi,v 1.4 1999-01-19 05:14:03 ivan Exp $ # # Usage: cancel-unaudited.cgi svcnum # http://server.name/path/cancel-unaudited.cgi pkgnum @@ -18,7 +18,11 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: cancel-unaudited.cgi,v $ -# Revision 1.3 1998-12-23 03:02:05 ivan +# Revision 1.4 1999-01-19 05:14:03 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.3 1998/12/23 03:02:05 ivan # $cgi->keywords instead of $cgi->query_string # # Revision 1.2 1998/12/17 09:12:42 ivan @@ -26,6 +30,7 @@ # use strict; +use vars qw( $cgi $query $svcnum $svc_acct $cust_svc $error ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -34,18 +39,18 @@ use FS::Record qw(qsearchs); use FS::cust_svc; use FS::svc_acct; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); #untaint svcnum -my($query) = $cgi->keywords; +($query) = $cgi->keywords; $query =~ /^(\d+)$/; -my($svcnum)=$1; +$svcnum = $1; -my($svc_acct) = qsearchs('svc_acct',{'svcnum'=>$svcnum}); +$svc_acct = qsearchs('svc_acct',{'svcnum'=>$svcnum}); &eidiot("Unknown svcnum!") unless $svc_acct; -my($cust_svc) = qsearchs('cust_svc',{'svcnum'=>$svcnum}); +$cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum}); &eidiot(qq!This account has already been audited. Cancel the package instead.!) @@ -57,8 +62,6 @@ local $SIG{QUIT} = 'IGNORE'; local $SIG{TERM} = 'IGNORE'; local $SIG{TSTP} = 'IGNORE'; -my($error); - $error = $svc_acct->cancel; &eidiot($error) if $error; $error = $svc_acct->delete; diff --git a/htdocs/misc/cancel_pkg.cgi b/htdocs/misc/cancel_pkg.cgi index 45afee8a1..27bc277c0 100755 --- a/htdocs/misc/cancel_pkg.cgi +++ b/htdocs/misc/cancel_pkg.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cancel_pkg.cgi,v 1.3 1998-12-23 03:02:54 ivan Exp $ +# $Id: cancel_pkg.cgi,v 1.4 1999-01-19 05:14:04 ivan Exp $ # # Usage: cancel_pkg.cgi pkgnum # http://server.name/path/cancel_pkg.cgi pkgnum @@ -29,7 +29,11 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: cancel_pkg.cgi,v $ -# Revision 1.3 1998-12-23 03:02:54 ivan +# Revision 1.4 1999-01-19 05:14:04 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.3 1998/12/23 03:02:54 ivan # $cgi->keywords instead of $cgi->query_string # # Revision 1.2 1998/12/17 09:12:43 ivan @@ -37,6 +41,7 @@ # use strict; +use vars qw ( $cgi $query $pkgnum $cust_pkg $error ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -44,17 +49,17 @@ use FS::CGI qw(eidiot popurl); use FS::Record qw(qsearchs); use FS::cust_pkg; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); #untaint pkgnum -my($query) = $cgi->keywords; +($query) = $cgi->keywords; $query =~ /^(\d+)$/ || die "Illegal pkgnum"; -my($pkgnum)=$1; +$pkgnum = $1; -my($cust_pkg) = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); +$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); -my($error)=$cust_pkg->cancel; +$error = $cust_pkg->cancel; eidiot($error) if $error; print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum')); diff --git a/htdocs/misc/expire_pkg.cgi b/htdocs/misc/expire_pkg.cgi index e921c7218..8cf553a26 100755 --- a/htdocs/misc/expire_pkg.cgi +++ b/htdocs/misc/expire_pkg.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: expire_pkg.cgi,v 1.2 1998-12-17 09:12:44 ivan Exp $ +# $Id: expire_pkg.cgi,v 1.3 1999-01-19 05:14:05 ivan Exp $ # # Usage: post form to: # http://server.name/path/expire_pkg.cgi @@ -16,11 +16,16 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: expire_pkg.cgi,v $ -# Revision 1.2 1998-12-17 09:12:44 ivan +# Revision 1.3 1999-01-19 05:14:05 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.2 1998/12/17 09:12:44 ivan # s/CGI::(Request|Base)/CGI.pm/; # use strict; +use vars qw ( $cgi $date $pkgnum $cust_pkg %hash $new $error ); use Date::Parse; use CGI; use CGI::Carp qw(fatalsToBrowser); @@ -29,12 +34,11 @@ use FS::CGI qw(popurl eidiot); use FS::Record qw(qsearchs); use FS::cust_pkg; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); #untaint date & pkgnum -my($date); if ( $cgi->param('date') ) { str2time($cgi->param('date')) =~ /^(\d+)$/ or die "Illegal date"; $date=$1; @@ -43,13 +47,13 @@ if ( $cgi->param('date') ) { } $cgi->param('pkgnum') =~ /^(\d+)$/ or die "Illegal pkgnum"; -my($pkgnum)=$1; +$pkgnum = $1; -my($cust_pkg) = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); -my(%hash)=$cust_pkg->hash; +$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); +%hash = $cust_pkg->hash; $hash{expire}=$date; -my($new)=create FS::cust_pkg ( \%hash ); -my($error) = $new->replace($cust_pkg); +$new = new FS::cust_pkg ( \%hash ); +$error = $new->replace($cust_pkg); &eidiot($error) if $error; print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum')); diff --git a/htdocs/misc/link.cgi b/htdocs/misc/link.cgi index d18cfccc1..208ed8ee5 100755 --- a/htdocs/misc/link.cgi +++ b/htdocs/misc/link.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: link.cgi,v 1.4 1999-01-18 09:41:36 ivan Exp $ +# $Id: link.cgi,v 1.5 1999-01-19 05:14:06 ivan Exp $ # # Note: Should be run setuid freeside as user nobody # @@ -11,7 +11,11 @@ # can also link on some other fields now (about time) ivan@sisd.com 98-jun-24 # # $Log: link.cgi,v $ -# Revision 1.4 1999-01-18 09:41:36 ivan +# Revision 1.5 1999-01-19 05:14:06 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.4 1999/01/18 09:41:36 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -23,13 +27,15 @@ # use strict; +use vars qw ( %link_field $cgi $pkgnum $svcpart $query $part_svc $svc $svcdb + $link_field ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); use FS::CGI qw(popurl); use FS::Record qw(qsearchs); -my(%link_field)=( +%link_field = ( 'svc_acct' => 'username', 'svc_domain' => 'domain', 'svc_acct_sm' => '', @@ -37,20 +43,19 @@ my(%link_field)=( 'svc_wo' => '', ); -my($cgi) = new CGI; +$cgi = new CGI; cgisuidsetup($cgi); -my($pkgnum,$svcpart); -my($query) = $cgi->keywords; +($query) = $cgi->keywords; foreach $_ (split(/-/,$query)) { #get & untaint pkgnum & svcpart $pkgnum=$1 if /^pkgnum(\d+)$/; $svcpart=$1 if /^svcpart(\d+)$/; } -my($part_svc) = qsearchs('part_svc',{'svcpart'=>$svcpart}); -my($svc) = $part_svc->getfield('svc'); -my($svcdb) = $part_svc->getfield('svcdb'); -my($link_field) = $link_field{$svcdb}; +$part_svc = qsearchs('part_svc',{'svcpart'=>$svcpart}); +$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 account"), qq!!; diff --git a/htdocs/misc/print-invoice.cgi b/htdocs/misc/print-invoice.cgi index 0ece4261e..213f15406 100755 --- a/htdocs/misc/print-invoice.cgi +++ b/htdocs/misc/print-invoice.cgi @@ -1,12 +1,16 @@ #!/usr/bin/perl -Tw # -# $Id: print-invoice.cgi,v 1.3 1998-12-23 03:04:24 ivan Exp $ +# $Id: print-invoice.cgi,v 1.4 1999-01-19 05:14:07 ivan Exp $ # # just a kludge for now, since this duplicates in a way it shouldn't stuff from # Bill.pm (like $lpr) ivan@sisd.com 98-jun-16 # # $Log: print-invoice.cgi,v $ -# Revision 1.3 1998-12-23 03:04:24 ivan +# Revision 1.4 1999-01-19 05:14:07 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.3 1998/12/23 03:04:24 ivan # $cgi->keywords instead of $cgi->query_string # # Revision 1.2 1998/12/17 09:12:47 ivan @@ -14,7 +18,7 @@ # use strict; -use vars qw($conf); +use vars qw($conf $cgi $lpr $query $invnum $cust_bill $custnum ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -22,17 +26,17 @@ use FS::CGI qw(popurl); use FS::Record qw(qsearchs); use FS::cust_bill; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); $conf = new FS::Conf; -my $lpr = $conf->config('lpr'); +$lpr = $conf->config('lpr'); #untaint invnum -my($query) = $cgi->keywords; +($query) = $cgi->keywords; $query =~ /^(\d*)$/; -my($invnum)=$1; -my($cust_bill)=qsearchs('cust_bill',{'invnum'=>$invnum}); +$invnum = $1; +$cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); die "Can't find invoice!\n" unless $cust_bill; open(LPR,"|$lpr") or die "Can't open $lpr: $!"; @@ -41,7 +45,7 @@ die "Can't find invoice!\n" unless $cust_bill; or die $! ? "Error closing $lpr: $!" : "Exit status $? from $lpr"; -my($custnum)=$cust_bill->getfield('custnum'); +$custnum = $cust_bill->getfield('custnum'); print $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum#history"); diff --git a/htdocs/misc/process/link.cgi b/htdocs/misc/process/link.cgi index aab26411d..c20b47373 100755 --- a/htdocs/misc/process/link.cgi +++ b/htdocs/misc/process/link.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: link.cgi,v 1.2 1998-12-17 09:15:00 ivan Exp $ +# $Id: link.cgi,v 1.3 1999-01-19 05:14:10 ivan Exp $ # # ivan@voicenet.com 97-feb-5 # @@ -12,11 +12,16 @@ # can also link on some other fields now (about time) ivan@sisd.com 98-jun-24 # # $Log: link.cgi,v $ -# Revision 1.2 1998-12-17 09:15:00 ivan +# Revision 1.3 1999-01-19 05:14:10 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.2 1998/12/17 09:15:00 ivan # s/CGI::Request/CGI.pm/; # use strict; +use vars qw ( $cgi $old $new $error ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::CGI qw(popurlidiot); @@ -24,7 +29,7 @@ use FS::UID qw(cgisuidsetup); use FS::cust_svc; use FS::Record qw(qsearchs); -my($cgi)=new CGI; +$cgi = new CGI; cgisuidsetup($cgi); $cgi->param('pkgnum') =~ /^(\d+)$/; my($pkgnum)=$1; @@ -40,15 +45,14 @@ unless ( $svcnum ) { $svcnum=$svc_acct->svcnum; } -my($old)=qsearchs('cust_svc',{'svcnum'=>$svcnum}); +$old = qsearchs('cust_svc',{'svcnum'=>$svcnum}); die "svcnum not found!" unless $old; -my($new)=create FS::cust_svc ({ +$new = new FS::cust_svc ({ 'svcnum' => $svcnum, 'pkgnum' => $pkgnum, 'svcpart' => $svcpart, }); -my($error); $error = $new->replace($old); unless ($error) { diff --git a/htdocs/misc/susp_pkg.cgi b/htdocs/misc/susp_pkg.cgi index 7b8096470..851a53f7f 100755 --- a/htdocs/misc/susp_pkg.cgi +++ b/htdocs/misc/susp_pkg.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: susp_pkg.cgi,v 1.3 1998-12-23 03:04:56 ivan Exp $ +# $Id: susp_pkg.cgi,v 1.4 1999-01-19 05:14:08 ivan Exp $ # # Usage: susp_pkg.cgi pkgnum # http://server.name/path/susp_pkg.cgi pkgnum @@ -23,7 +23,11 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: susp_pkg.cgi,v $ -# Revision 1.3 1998-12-23 03:04:56 ivan +# Revision 1.4 1999-01-19 05:14:08 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.3 1998/12/23 03:04:56 ivan # $cgi->keywords instead of $cgi->query_string # # Revision 1.2 1998/12/17 09:12:48 ivan @@ -31,23 +35,24 @@ # use strict; +use vars qw( $cgi $query $pkgnum $cust_pkg $error ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); use FS::Record qw(qsearchs); use FS::cust_pkg; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); #untaint pkgnum -my($query) = $cgi->keywords; +($query) = $cgi->keywords; $query =~ /^(\d+)$/ || die "Illegal pkgnum"; -my($pkgnum)=$1; +$pkgnum = $1; -my($cust_pkg) = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); +$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); -my($error)=$cust_pkg->suspend; +$error = $cust_pkg->suspend; &eidiot($error) if $error; print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum')); diff --git a/htdocs/misc/unsusp_pkg.cgi b/htdocs/misc/unsusp_pkg.cgi index 170d85f8a..c8bb4f4a8 100755 --- a/htdocs/misc/unsusp_pkg.cgi +++ b/htdocs/misc/unsusp_pkg.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: unsusp_pkg.cgi,v 1.3 1998-12-23 03:05:25 ivan Exp $ +# $Id: unsusp_pkg.cgi,v 1.4 1999-01-19 05:14:09 ivan Exp $ # # Usage: susp_pkg.cgi pkgnum # http://server.name/path/susp_pkg.cgi pkgnum @@ -23,7 +23,11 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: unsusp_pkg.cgi,v $ -# Revision 1.3 1998-12-23 03:05:25 ivan +# Revision 1.4 1999-01-19 05:14:09 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.3 1998/12/23 03:05:25 ivan # $cgi->keywords instead of $cgi->query_string # # Revision 1.2 1998/12/17 09:12:49 ivan @@ -31,6 +35,7 @@ # use strict; +use vars qw( $cgi $query $pkgnum $cust_pkg $error ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -38,17 +43,17 @@ use FS::CGI qw(popurl eidiot); use FS::Record qw(qsearchs); use FS::cust_pkg; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); #untaint pkgnum -my($query) = $cgi->keywords; +($query) = $cgi->keywords; $query =~ /^(\d+)$/ || die "Illegal pkgnum"; -my($pkgnum)=$1; +$pkgnum = $1; -my($cust_pkg) = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); +$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); -my($error)=$cust_pkg->unsuspend; +$error = $cust_pkg->unsuspend; &eidiot($error) if $error; print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum')); diff --git a/htdocs/search/cust_bill.cgi b/htdocs/search/cust_bill.cgi index 29ff78107..e6dd3e3c7 100755 --- a/htdocs/search/cust_bill.cgi +++ b/htdocs/search/cust_bill.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_bill.cgi,v 1.2 1998-12-17 09:41:07 ivan Exp $ +# $Id: cust_bill.cgi,v 1.3 1999-01-19 05:14:11 ivan Exp $ # # Usage: post form to: # http://server.name/path/cust_bill.cgi @@ -13,22 +13,27 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: cust_bill.cgi,v $ -# Revision 1.2 1998-12-17 09:41:07 ivan +# Revision 1.3 1999-01-19 05:14:11 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.2 1998/12/17 09:41:07 ivan # s/CGI::(Base|Request)/CGI.pm/; # use strict; +use vars qw ( $cgi $invnum ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); use FS::CGI qw(popurl idiot); use FS::Record qw(qsearchs); -my($cgi)=new CGI; +$cgi = new CGI; cgisuidsetup($cgi); $cgi->param('invnum') =~ /^\s*(FS-)?(\d+)\s*$/; -my($invnum)=$2; +$invnum = $2; if ( qsearchs('cust_bill',{'invnum'=>$invnum}) ) { print $cgi->redirect(popurl(2). "view/cust_bill.cgi?$invnum"); #redirect diff --git a/htdocs/search/cust_main.cgi b/htdocs/search/cust_main.cgi index 48e88539b..a50cee88f 100755 --- a/htdocs/search/cust_main.cgi +++ b/htdocs/search/cust_main.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_main.cgi,v 1.5 1999-01-18 09:41:37 ivan Exp $ +# $Id: cust_main.cgi,v 1.6 1999-01-19 05:14:12 ivan Exp $ # # Usage: post form to: # http://server.name/path/cust_main.cgi @@ -19,7 +19,11 @@ # display total, use FS::CGI ivan@sisd.com 98-jul-17 # # $Log: cust_main.cgi,v $ -# Revision 1.5 1999-01-18 09:41:37 ivan +# Revision 1.6 1999-01-19 05:14:12 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.5 1999/01/18 09:41:37 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -38,7 +42,7 @@ # use strict; -use vars qw(%ncancelled_pkgs %all_pkgs); +use vars qw(%ncancelled_pkgs %all_pkgs $cgi @cust_main $sortby ); use CGI; use CGI::Carp qw(fatalsToBrowser); use IO::Handle; @@ -48,12 +52,9 @@ use FS::Record qw(qsearch qsearchs); use FS::CGI qw(header menubar idiot popurl table); use FS::cust_main; -my($cgi)=new CGI; +$cgi = new CGI; cgisuidsetup($cgi); -my(@cust_main); -my($sortby); - if ( $cgi->keywords ) { my($query)=$cgi->keywords; if ( $query eq 'custnum' ) { @@ -72,10 +73,8 @@ if ( $cgi->keywords ) { &companysearch if ( $cgi->param('company_on') && $cgi->param('company_text') ); } -my(%ncancelled_pkgs) = - map { $_->custnum => [ $_->ncancelled_pkgs ] } @cust_main; -my(%all_pkgs) = - map { $_->custnum => [ $_->all_pkgs ] } @cust_main; +%ncancelled_pkgs = map { $_->custnum => [ $_->ncancelled_pkgs ] } @cust_main; +%all_pkgs = map { $_->custnum => [ $_->all_pkgs ] } @cust_main; if ( scalar(@cust_main) == 1 ) { print $cgi->redirect(popurl(2). "view/cust_main.cgi?". $cust_main[0]->custnum); diff --git a/htdocs/search/cust_pkg.cgi b/htdocs/search/cust_pkg.cgi index 248833ce1..6685aea70 100755 --- a/htdocs/search/cust_pkg.cgi +++ b/htdocs/search/cust_pkg.cgi @@ -1,11 +1,15 @@ #!/usr/bin/perl -Tw # -# $Id: cust_pkg.cgi,v 1.5 1999-01-18 09:41:38 ivan Exp $ +# $Id: cust_pkg.cgi,v 1.6 1999-01-19 05:14:13 ivan Exp $ # # based on search/svc_acct.cgi ivan@sisd.com 98-jul-17 # # $Log: cust_pkg.cgi,v $ -# Revision 1.5 1999-01-18 09:41:38 ivan +# Revision 1.6 1999-01-19 05:14:13 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.5 1999/01/18 09:41:38 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -20,18 +24,17 @@ # use strict; +use vars qw ( $cgi @cust_pkg $sortby $query ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); use FS::Record qw(qsearch qsearchs); use FS::CGI qw(header idiot popurl); -my($cgi)=new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my(@cust_pkg,$sortby); - -my($query)=$cgi->keywords; +($query) = $cgi->keywords; #this tree is a little bit redundant if ( $query eq 'pkgnum' ) { $sortby=\*pkgnum_sort; diff --git a/htdocs/search/svc_acct.cgi b/htdocs/search/svc_acct.cgi index 5dd33a678..f3305080b 100755 --- a/htdocs/search/svc_acct.cgi +++ b/htdocs/search/svc_acct.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct.cgi,v 1.5 1999-01-18 09:41:39 ivan Exp $ +# $Id: svc_acct.cgi,v 1.6 1999-01-19 05:14:14 ivan Exp $ # # Usage: post form to: # http://server.name/path/svc_acct.cgi @@ -23,7 +23,11 @@ # give service and customer info too ivan@sisd.com 98-aug-16 # # $Log: svc_acct.cgi,v $ -# Revision 1.5 1999-01-18 09:41:39 ivan +# Revision 1.6 1999-01-19 05:14:14 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.5 1999/01/18 09:41:39 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -38,6 +42,7 @@ # use strict; +use vars qw( $cgi @svc_acct $sortby $query ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -46,12 +51,10 @@ use FS::CGI qw(header idiot popurl); use FS::svc_acct; use FS::cust_main; -my($cgi)=new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my(@svc_acct,$sortby); - -my($query)=$cgi->keywords; +($query)=$cgi->keywords; $query ||= ''; #to avoid use of unitialized value errors #this tree is a little bit redundant if ( $query eq 'svcnum' ) { diff --git a/htdocs/search/svc_acct_sm.cgi b/htdocs/search/svc_acct_sm.cgi index c1c593673..ecdf0bc0c 100755 --- a/htdocs/search/svc_acct_sm.cgi +++ b/htdocs/search/svc_acct_sm.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct_sm.cgi,v 1.4 1999-01-18 09:41:40 ivan Exp $ +# $Id: svc_acct_sm.cgi,v 1.5 1999-01-19 05:14:16 ivan Exp $ # # Usage: post form to: # http://server.name/path/svc_domain.cgi @@ -19,7 +19,11 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: svc_acct_sm.cgi,v $ -# Revision 1.4 1999-01-18 09:41:40 ivan +# Revision 1.5 1999-01-19 05:14:16 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.4 1999/01/18 09:41:40 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -28,7 +32,7 @@ # use strict; -use vars qw($conf); +use vars qw( $conf $cgi $mydomain $domuser $svc_domain $domsvc @svc_acct_sm ); use CGI::Request; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); @@ -36,21 +40,20 @@ use FS::CGI qw(popurl idiot header table); use FS::Record qw(qsearch qsearchs); use FS::Conf; -my($cgi)=new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); $conf = new FS::Conf; -my $mydomain = $conf->config('domain'); +$mydomain = $conf->config('domain'); $cgi->param('domuser') =~ /^([a-z0-9_\-]{0,32})$/; -my($domuser)=$1; +$domuser = $1; $cgi->param('domain') =~ /^([\w\-\.]+)$/ or die "Illegal domain"; -my($svc_domain)=qsearchs('svc_domain',{'domain'=>$1}) +$svc_domain = qsearchs('svc_domain',{'domain'=>$1}) or die "Unknown domain"; -my($domsvc)=$svc_domain->svcnum; +$domsvc = $svc_domain->svcnum; -my(@svc_acct_sm); if ($domuser) { @svc_acct_sm=qsearch('svc_acct_sm',{ 'domuser' => $domuser, diff --git a/htdocs/search/svc_domain.cgi b/htdocs/search/svc_domain.cgi index b902bbe1c..cb704a3c4 100755 --- a/htdocs/search/svc_domain.cgi +++ b/htdocs/search/svc_domain.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_domain.cgi,v 1.3 1998-12-23 03:06:50 ivan Exp $ +# $Id: svc_domain.cgi,v 1.4 1999-01-19 05:14:17 ivan Exp $ # # Usage: post form to: # http://server.name/path/svc_domain.cgi @@ -17,7 +17,11 @@ # display total, use FS::CGI now does browsing too ivan@sisd.com 98-jul-17 # # $Log: svc_domain.cgi,v $ -# Revision 1.3 1998-12-23 03:06:50 ivan +# Revision 1.4 1999-01-19 05:14:17 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.3 1998/12/23 03:06:50 ivan # $cgi->keywords instead of $cgi->query_string # # Revision 1.2 1998/12/17 09:41:12 ivan @@ -25,19 +29,17 @@ # use strict; +use vars qw ( $cgi @svc_domain $sortby $query ); use CGI; use CGI::Carp qw(fatalsToBrowser); use FS::UID qw(cgisuidsetup); use FS::Record qw(qsearch qsearchs); use FS::CGI qw(header idiot popurl); -my($cgi)=new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); -my(@svc_domain); -my($sortby); - -my($query)=$cgi->keywords; +($query)=$cgi->keywords; if ( $query eq 'svcnum' ) { $sortby=\*svcnum_sort; @svc_domain=qsearch('svc_domain',{}); diff --git a/htdocs/view/cust_bill.cgi b/htdocs/view/cust_bill.cgi index ccfc33c81..44e3a4a1b 100755 --- a/htdocs/view/cust_bill.cgi +++ b/htdocs/view/cust_bill.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_bill.cgi,v 1.5 1999-01-18 09:41:42 ivan Exp $ +# $Id: cust_bill.cgi,v 1.6 1999-01-19 05:14:18 ivan Exp $ # # Note: Should be run setuid freeside as user nobody. # @@ -25,7 +25,11 @@ # also print 'printed' field ivan@sisd.com 98-jul-10 # # $Log: cust_bill.cgi,v $ -# Revision 1.5 1999-01-18 09:41:42 ivan +# Revision 1.6 1999-01-19 05:14:18 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.5 1999/01/18 09:41:42 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -40,6 +44,7 @@ # use strict; +use vars qw ( $cgi $query $invnum $cust_bill $custnum $printed $p ); use IO::File; use CGI; use CGI::Carp qw(fatalsToBrowser); @@ -48,21 +53,21 @@ use FS::CGI qw(header popurl menubar); use FS::Record qw(qsearchs); use FS::cust_bill; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); #untaint invnum -my($query) = $cgi->keywords; +($query) = $cgi->keywords; $query =~ /^(\d+)$/; -my($invnum)=$1; +$invnum = $1; -my($cust_bill) = qsearchs('cust_bill',{'invnum'=>$invnum}); +$cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); die "Invoice #$invnum not found!" unless $cust_bill; -my($custnum) = $cust_bill->getfield('custnum'); +$custnum = $cust_bill->getfield('custnum'); -my($printed) = $cust_bill->printed; +$printed = $cust_bill->printed; -my $p = popurl(2); +$p = popurl(2); print $cgi->header( '-expires' => 'now' ), header('Invoice View', menubar( "Main Menu" => $p, "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", diff --git a/htdocs/view/cust_main.cgi b/htdocs/view/cust_main.cgi index 71a4e517e..7c5f4bead 100755 --- a/htdocs/view/cust_main.cgi +++ b/htdocs/view/cust_main.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_main.cgi,v 1.9 1999-01-18 09:41:43 ivan Exp $ +# $Id: cust_main.cgi,v 1.10 1999-01-19 05:14:19 ivan Exp $ # # Usage: cust_main.cgi custnum # http://server.name/path/cust_main.cgi?custnum @@ -33,7 +33,11 @@ # lose background, FS::CGI ivan@sisd.com 98-sep-2 # # $Log: cust_main.cgi,v $ -# Revision 1.9 1999-01-18 09:41:43 ivan +# Revision 1.10 1999-01-19 05:14:19 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.9 1999/01/18 09:41:43 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -60,6 +64,9 @@ # use strict; +use vars qw ( $cgi $query $custnum $cust_main $hashref $agent $referral + @packages $package @history @bills $bill @credits $credit + $balance $item ); use CGI; use CGI::Carp qw(fatalsToBrowser); use Date::Format; @@ -76,7 +83,7 @@ use FS::agent; use FS::cust_main; use FS::cust_refund; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); print $cgi->header( '-expires' => 'now' ), header("Customer View", menubar( @@ -86,12 +93,12 @@ print $cgi->header( '-expires' => 'now' ), header("Customer View", menubar( END die "No customer specified (bad URL)!" unless $cgi->keywords; -my($query) = $cgi->keywords; # needs parens with my, ->keywords returns array +($query) = $cgi->keywords; # needs parens with my, ->keywords returns array $query =~ /^(\d+)$/; -my($custnum)=$1; -my($cust_main)=qsearchs('cust_main',{'custnum'=>$custnum}); +$custnum = $1; +$cust_main = qsearchs('cust_main',{'custnum'=>$custnum}); die "Customer not found!" unless $cust_main; -my($hashref)=$cust_main->hashref; +$hashref = $cust_main->hashref; #custnum print "
Customer #$custnum
", @@ -111,7 +118,7 @@ print qq!
Customer Information!, qq!">Edit this information
!; #agentnum -my($agent)=qsearchs('agent',{ +$agent = qsearchs('agent',{ 'agentnum' => $cust_main->getfield('agentnum') } ); die "Agent not found!" unless $agent; @@ -119,7 +126,7 @@ print "
Agent #" , $agent->getfield('agentnum') , ": " , $agent->getfield('agent') , ""; #refnum -my($referral)=qsearchs('part_referral',{'refnum' => $cust_main->refnum}); +$referral = qsearchs('part_referral',{'refnum' => $cust_main->refnum}); die "Referral not found!" unless $referral; print "
Referral #", $referral->refnum, ": ", $referral->referral, "<\B>"; @@ -215,8 +222,7 @@ print qq!
!, table, "\n", qq!\n!; #get package info -my(@packages)=qsearch('cust_pkg',{'custnum'=>$custnum}); -my($package); +@packages = qsearch('cust_pkg',{'custnum'=>$custnum}); foreach $package (@packages) { my($pref)=$package->hashref; my($part_pkg)=qsearchs('part_pkg',{ @@ -265,10 +271,7 @@ print qq!

Payment History!, # major problem: this whole thing is way too sloppy. # minor problem: the description lines need better formatting. -my(@history); - -my(@bills)=qsearch('cust_bill',{'custnum'=>$custnum}); -my($bill); +@bills = qsearch('cust_bill',{'custnum'=>$custnum}); foreach $bill (@bills) { my($bref)=$bill->hashref; push @history, @@ -292,8 +295,7 @@ foreach $bill (@bills) { } } -my(@credits)=qsearch('cust_credit',{'custnum'=>$custnum}); -my($credit); +@credits = qsearch('cust_credit',{'custnum'=>$custnum}); foreach $credit (@credits) { my($cref)=$credit->hashref; push @history, @@ -328,8 +330,7 @@ END #display payment history -my($balance)=0; -my($item); +$balance = 0; foreach $item (sort keyfield_numerically @history) { my($date,$desc,$charge,$payment,$credit,$refund)=split(/\t/,$item); $charge ||= 0; diff --git a/htdocs/view/cust_pkg.cgi b/htdocs/view/cust_pkg.cgi index 3f6eed614..f1b7b9473 100755 --- a/htdocs/view/cust_pkg.cgi +++ b/htdocs/view/cust_pkg.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_pkg.cgi,v 1.6 1999-01-18 09:41:44 ivan Exp $ +# $Id: cust_pkg.cgi,v 1.7 1999-01-19 05:14:20 ivan Exp $ # # Usage: cust_pkg.cgi pkgnum # http://server.name/path/cust_pkg.cgi?pkgnum @@ -26,7 +26,11 @@ # no FS::Search ivan@sisd.com 98-mar-7 # # $Log: cust_pkg.cgi,v $ -# Revision 1.6 1999-01-18 09:41:44 ivan +# Revision 1.7 1999-01-19 05:14:20 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.6 1999/01/18 09:41:44 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -42,6 +46,9 @@ # use strict; +use vars qw ( $cgi %uiview %uiadd $part_svc $query $pkgnum $cust_pkg $part_pkg + $custnum $susp $cancel $expire $pkg $comment $setup $bill + $otaker ); use Date::Format; use CGI; use CGI::Carp qw(fatalsToBrowser); @@ -54,11 +61,9 @@ use FS::part_pkg; use FS::pkg_svc; use FS::cust_svc; -my($cgi) = new CGI; +$cgi = new CGI; cgisuidsetup($cgi); -my(%uiview,%uiadd); -my($part_svc); foreach $part_svc ( qsearch('part_svc',{}) ) { $uiview{$part_svc->svcpart} = popurl(2). "view/". $part_svc->svcdb . ".cgi"; $uiadd{$part_svc->svcpart}= popurl(2). "edit/". $part_svc->svcdb . ".cgi"; @@ -66,22 +71,22 @@ foreach $part_svc ( qsearch('part_svc',{}) ) { print $cgi->header( '-expires' => 'now' ), header('Package View', ''); -my($query) = $cgi->keywords; +($query) = $cgi->keywords; $query =~ /^(\d+)$/; -my($pkgnum)=$1; +$pkgnum = $1; #get package record -my($cust_pkg)=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); +$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); die "No package!" unless $cust_pkg; -my($part_pkg)=qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->getfield('pkgpart')}); +$part_pkg = qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->getfield('pkgpart')}); #nav bar -my($custnum)=$cust_pkg->getfield('custnum'); +$custnum = $cust_pkg->getfield('custnum'); print qq!
View this customer!, qq! (#$custnum) | Main menu

!; #print info -my($susp,$cancel,$expire)=( +($susp,$cancel,$expire)=( $cust_pkg->getfield('susp'), $cust_pkg->getfield('cancel'), $cust_pkg->getfield('expire'), @@ -91,13 +96,13 @@ print qq!
Package Information!; print qq! | Service Information! unless $cancel; print qq!

\n!; -my($pkg,$comment)=($part_pkg->getfield('pkg'),$part_pkg->getfield('comment')); +($pkg,$comment)=($part_pkg->getfield('pkg'),$part_pkg->getfield('comment')); print qq!
Package Information!, qq!!; print qq!
Edit this information
!; print "

Package: $pkg - $comment"; -my($setup,$bill)=($cust_pkg->getfield('setup'),$cust_pkg->getfield('bill')); +($setup,$bill)=($cust_pkg->getfield('setup'),$cust_pkg->getfield('bill')); print "
Setup: ", $setup ? time2str("%D",$setup) : "(Not setup)" ,""; print "
Next bill: ", $bill ? time2str("%D",$bill) : "" ,""; @@ -125,7 +130,7 @@ if ($cancel) { } #otaker -my($otaker)=$cust_pkg->getfield('otaker'); +$otaker = $cust_pkg->getfield('otaker'); print "

Order taken by $otaker"; unless ($cancel) { diff --git a/htdocs/view/svc_acct.cgi b/htdocs/view/svc_acct.cgi index 1151e1ced..a5b4f4858 100755 --- a/htdocs/view/svc_acct.cgi +++ b/htdocs/view/svc_acct.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct.cgi,v 1.6 1999-01-18 09:41:45 ivan Exp $ +# $Id: svc_acct.cgi,v 1.7 1999-01-19 05:14:21 ivan Exp $ # # Usage: svc_acct.cgi svcnum # http://server.name/path/svc_acct.cgi?svcnum @@ -35,7 +35,11 @@ # displays arbitrary radius attributes ivan@sisd.com 98-aug-16 # # $Log: svc_acct.cgi,v $ -# Revision 1.6 1999-01-18 09:41:45 ivan +# Revision 1.7 1999-01-19 05:14:21 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.6 1999/01/18 09:41:45 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -53,7 +57,8 @@ # use strict; -use vars qw( $conf ); +use vars qw( $conf $cgi $mydomain $query $svcnum $svc_acct $cust_svc $pkgnum + $cust_pkg $custnum $part_svc $p $svc_acct_pop ); use CGI; use CGI::Carp qw( fatalsToBrowser ); use FS::UID qw( cgisuidsetup ); @@ -66,33 +71,32 @@ use FS::cust_pkg; use FS::part_svc; use FS::svc_acct_pop; -my($cgi) = new CGI; +$cgi = new CGI; &cgisuidsetup($cgi); $conf = new FS::Conf; -my $mydomain = $conf->config('domain'); +$mydomain = $conf->config('domain'); #untaint svcnum -my($query) = $cgi->keywords; +($query) = $cgi->keywords; $query =~ /^(\d+)$/; -my($svcnum)=$1; -my($svc_acct)=qsearchs('svc_acct',{'svcnum'=>$svcnum}); +$svcnum = $1; +$svc_acct = qsearchs('svc_acct',{'svcnum'=>$svcnum}); die "Unkonwn svcnum" unless $svc_acct; -my($cust_svc)=qsearchs('cust_svc',{'svcnum'=>$svcnum}); -my($pkgnum)=$cust_svc->getfield('pkgnum'); -my($cust_pkg,$custnum); +$cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum}); +$pkgnum = $cust_svc->getfield('pkgnum'); if ($pkgnum) { $cust_pkg=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); $custnum=$cust_pkg->getfield('custnum'); } -my($part_svc)=qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } ); +$part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } ); die "Unkonwn svcpart" unless $part_svc; print $cgi->header( '-expires' => 'now' ), header('Account View', ''); -my $p = popurl(2); +$p = popurl(2); if ($pkgnum || $custnum) { print <View this package (#$pkgnum) | @@ -131,7 +135,7 @@ if (substr($svc_acct->_password,0,1) eq "*") { } # popnum -> svc_acct_pop record -my($svc_acct_pop)=qsearchs('svc_acct_pop',{'popnum'=>$svc_acct->popnum}); +$svc_acct_pop = qsearchs('svc_acct_pop',{'popnum'=>$svc_acct->popnum}); #pop print "POP: ", $svc_acct_pop->city, ", ", $svc_acct_pop->state, diff --git a/htdocs/view/svc_acct_sm.cgi b/htdocs/view/svc_acct_sm.cgi index ab8450fce..80bd48967 100755 --- a/htdocs/view/svc_acct_sm.cgi +++ b/htdocs/view/svc_acct_sm.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct_sm.cgi,v 1.5 1999-01-18 09:41:46 ivan Exp $ +# $Id: svc_acct_sm.cgi,v 1.6 1999-01-19 05:14:22 ivan Exp $ # # Usage: svc_acct_sm.cgi svcnum # http://server.name/path/svc_acct_sm.cgi?svcnum @@ -22,7 +22,11 @@ # /var/spool/freeside/conf/domain ivan@sisd.com 98-jul-17 # # $Log: svc_acct_sm.cgi,v $ -# Revision 1.5 1999-01-18 09:41:46 ivan +# Revision 1.6 1999-01-19 05:14:22 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.5 1999/01/18 09:41:46 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -37,40 +41,41 @@ # use strict; -use vars qw($conf); +use vars qw($conf $cgi $mydomain $query $svcnum $svc_acct_sm $cust_svc + $pkgnum cust_pkg $custnum $part_svc $p $domsvc,$domuid,$domuser + $svc $svc_domain $domain $svc_acct $username ); use CGI; use FS::UID qw(cgisuidsetup); use FS::CGI qw(header popurl); use FS::Record qw(qsearchs); use FS::Conf; -my($cgi) = new CGI; +$cgi = new CGI; cgisuidsetup($cgi); $conf = new FS::Conf; -my $mydomain = $conf->config('domain'); +$mydomain = $conf->config('domain'); #untaint svcnum -my($query) = $cgi->keywords; +($query) = $cgi->keywords; $query =~ /^(\d+)$/; -my($svcnum)=$1; -my($svc_acct_sm)=qsearchs('svc_acct_sm',{'svcnum'=>$svcnum}); +$svcnum = $1; +$svc_acct_sm = qsearchs('svc_acct_sm',{'svcnum'=>$svcnum}); die "Unknown svcnum" unless $svc_acct_sm; -my($cust_svc)=qsearchs('cust_svc',{'svcnum'=>$svcnum}); -my($pkgnum)=$cust_svc->getfield('pkgnum'); -my($cust_pkg,$custnum); +$cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum}); +$pkgnum = $cust_svc->getfield('pkgnum'); if ($pkgnum) { $cust_pkg=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); $custnum=$cust_pkg->getfield('custnum'); } -my($part_svc)=qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } ); +$part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } ); die "Unkonwn svcpart" unless $part_svc; print $cgi->header( '-expires' => 'now' ), header('Mail Alias View'); -my $p = popurl(2); +$p = popurl(2); if ($pkgnum || $custnum) { print <View this package (#$pkgnum) | @@ -89,16 +94,16 @@ print < END -my($domsvc,$domuid,$domuser)=( +($domsvc,$domuid,$domuser) = ( $svc_acct_sm->domsvc, $svc_acct_sm->domuid, $svc_acct_sm->domuser, ); -my($svc) = $part_svc->svc; -my($svc_domain)=qsearchs('svc_domain',{'svcnum'=>$domsvc}); -my($domain)=$svc_domain->domain; -my($svc_acct)=qsearchs('svc_acct',{'uid'=>$domuid}); -my($username)=$svc_acct->username; +$svc = $part_svc->svc; +$svc_domain = qsearchs('svc_domain',{'svcnum'=>$domsvc}); +$domain = $svc_domain->domain; +$svc_acct = qsearchs('svc_acct',{'uid'=>$domuid}); +$username = $svc_acct->username; #formatting print qq!


!; diff --git a/htdocs/view/svc_domain.cgi b/htdocs/view/svc_domain.cgi index 7fa65e020..a6de40429 100755 --- a/htdocs/view/svc_domain.cgi +++ b/htdocs/view/svc_domain.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_domain.cgi,v 1.5 1999-01-18 09:41:47 ivan Exp $ +# $Id: svc_domain.cgi,v 1.6 1999-01-19 05:14:23 ivan Exp $ # # Usage: svc_domain svcnum # http://server.name/path/svc_domain.cgi?svcnum @@ -15,7 +15,11 @@ # bmccane@maxbaud.net 98-apr-3 # # $Log: svc_domain.cgi,v $ -# Revision 1.5 1999-01-18 09:41:47 ivan +# Revision 1.6 1999-01-19 05:14:23 ivan +# for mod_perl: no more top-level my() variables; use vars instead +# also the last s/create/new/; +# +# Revision 1.5 1999/01/18 09:41:47 ivan # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl # (good idea anyway) # @@ -31,34 +35,35 @@ # use strict; +use vars qw( $cgi $query $svcnum $svc_domain $domain $cust_svc $pkgnum + $cust_pkg $custnum $part_svc $p ); use CGI; use FS::UID qw(cgisuidsetup); use FS::CGI qw(header menubar popurl); use FS::Record qw(qsearchs); -my($cgi) = new CGI; +$cgi = new CGI; cgisuidsetup($cgi); #untaint svcnum -my($query) = $cgi->keywords; +($query) = $cgi->keywords; $query =~ /^(\d+)$/; -my($svcnum)=$1; -my($svc_domain)=qsearchs('svc_domain',{'svcnum'=>$svcnum}); +$svcnum = $1; +$svc_domain = qsearchs('svc_domain',{'svcnum'=>$svcnum}); die "Unknown svcnum" unless $svc_domain; -my($domain)=$svc_domain->domain; +$domain = $svc_domain->domain; -my($cust_svc)=qsearchs('cust_svc',{'svcnum'=>$svcnum}); -my($pkgnum)=$cust_svc->getfield('pkgnum'); -my($cust_pkg,$custnum); +$cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum}); +$pkgnum = $cust_svc->getfield('pkgnum'); if ($pkgnum) { $cust_pkg=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); $custnum=$cust_pkg->getfield('custnum'); } -my($part_svc)=qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } ); +$part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } ); die "Unkonwn svcpart" unless $part_svc; -my $p = popurl(2); +$p = popurl(2); print $cgi->header( '-expires' => 'now' ), header('Domain View', menubar( "Main menu" => $p, "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum", -- 2.11.0