summaryrefslogtreecommitdiff
path: root/htdocs/edit
diff options
context:
space:
mode:
Diffstat (limited to 'htdocs/edit')
-rwxr-xr-xhtdocs/edit/agent.cgi21
-rwxr-xr-xhtdocs/edit/agent_type.cgi19
-rwxr-xr-xhtdocs/edit/cust_credit.cgi27
-rwxr-xr-xhtdocs/edit/cust_main.cgi39
-rwxr-xr-xhtdocs/edit/cust_main_county-expand.cgi19
-rwxr-xr-xhtdocs/edit/cust_main_county.cgi12
-rwxr-xr-xhtdocs/edit/cust_pay.cgi23
-rwxr-xr-xhtdocs/edit/cust_pkg.cgi30
-rwxr-xr-xhtdocs/edit/part_pkg.cgi22
-rwxr-xr-xhtdocs/edit/part_referral.cgi18
-rwxr-xr-xhtdocs/edit/part_svc.cgi23
-rwxr-xr-xhtdocs/edit/process/agent.cgi18
-rwxr-xr-xhtdocs/edit/process/agent_type.cgi19
-rwxr-xr-xhtdocs/edit/process/cust_credit.cgi16
-rwxr-xr-xhtdocs/edit/process/cust_main.cgi20
-rwxr-xr-xhtdocs/edit/process/cust_main_county-expand.cgi17
-rwxr-xr-xhtdocs/edit/process/cust_main_county.cgi11
-rwxr-xr-xhtdocs/edit/process/cust_pay.cgi16
-rwxr-xr-xhtdocs/edit/process/cust_pkg.cgi19
-rwxr-xr-xhtdocs/edit/process/part_pkg.cgi18
-rwxr-xr-xhtdocs/edit/process/part_referral.cgi15
-rwxr-xr-xhtdocs/edit/process/part_svc.cgi17
-rwxr-xr-xhtdocs/edit/process/svc_acct.cgi17
-rwxr-xr-xhtdocs/edit/process/svc_acct_pop.cgi17
-rwxr-xr-xhtdocs/edit/process/svc_acct_sm.cgi18
-rwxr-xr-xhtdocs/edit/process/svc_domain.cgi16
-rwxr-xr-xhtdocs/edit/svc_acct.cgi42
-rwxr-xr-xhtdocs/edit/svc_acct_pop.cgi20
-rwxr-xr-xhtdocs/edit/svc_acct_sm.cgi25
-rwxr-xr-xhtdocs/edit/svc_domain.cgi28
30 files changed, 371 insertions, 251 deletions
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 <INPUT TYPE="text" NAME="agent" SIZE=32 VALUE="$hashre
Agent type <SELECT NAME="typenum" SIZE=1>
END
-my($agent_type);
foreach $agent_type (qsearch('agent_type',{})) {
print "<OPTION";
print " SELECTED"
diff --git a/htdocs/edit/agent_type.cgi b/htdocs/edit/agent_type.cgi
index b9da2a283..b12c4e28f 100755
--- a/htdocs/edit/agent_type.cgi
+++ b/htdocs/edit/agent_type.cgi
@@ -1,6 +1,6 @@
#!/usr/bin/perl -Tw
#
-# $Id: agent_type.cgi,v 1.8 1999-01-18 09:41:22 ivan Exp $
+# $Id: agent_type.cgi,v 1.9 1999-01-19 05:13:32 ivan Exp $
#
# agent_type.cgi: Add/Edit agent type (output form)
#
@@ -13,7 +13,11 @@
# use FS::CGI, added inline documentation ivan@sisd.com 98-jul-12
#
# $Log: agent_type.cgi,v $
-# Revision 1.8 1999-01-18 09:41:22 ivan
+# Revision 1.9 1999-01-19 05:13:32 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:22 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 $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 <<END;
<BR><BR>Select which packages agents of this type may sell to customers<BR>
END
-my($part_pkg);
foreach $part_pkg ( qsearch('part_pkg',{}) ) {
print qq!<BR><INPUT TYPE="checkbox" NAME="pkgpart!,
$part_pkg->getfield('pkgpart'), qq!" !,
diff --git a/htdocs/edit/cust_credit.cgi b/htdocs/edit/cust_credit.cgi
index 4b7276f4b..fdb821fa6 100755
--- a/htdocs/edit/cust_credit.cgi
+++ b/htdocs/edit/cust_credit.cgi
@@ -1,6 +1,6 @@
#!/usr/bin/perl -Tw
#
-# $Id: cust_credit.cgi,v 1.4 1999-01-18 09:41:23 ivan Exp $
+# $Id: cust_credit.cgi,v 1.5 1999-01-19 05:13:33 ivan Exp $
#
# Usage: cust_credit.cgi custnum [ -paybatch ]
# http://server.name/path/cust_credit?custnum [ -paybatch ]
@@ -25,7 +25,11 @@
# rewrite ivan@sisd.com 98-mar-16
#
# $Log: cust_credit.cgi,v $
-# Revision 1.4 1999-01-18 09:41:23 ivan
+# Revision 1.5 1999-01-19 05:13:33 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:23 ivan
# all $cgi->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", ''), <<END;
<FORM ACTION="${p1}process/cust_credit.cgi" METHOD=POST>
@@ -61,7 +66,7 @@ print $cgi->header( '-expires' => 'now' ), header("Post Credit", ''), <<END;
END
#crednum
-my($crednum)="";
+$crednum = "";
print qq!Credit #<B>!, $crednum ? $crednum : " <I>(NEW)</I>", qq!</B><INPUT TYPE="hidden" NAME="crednum" VALUE="$crednum">!;
#custnum
@@ -71,11 +76,11 @@ print qq!\nCustomer #<B>$custnum</B><INPUT TYPE="hidden" NAME="custnum" VALUE="$
print qq!<INPUT TYPE="hidden" NAME="paybatch" VALUE="">!;
#date
-my($date)=time;
+$date = time;
print qq!\nDate: <B>!, time2str("%D",$date), qq!</B><INPUT TYPE="hidden" NAME="_date" VALUE="$date">!;
#amount
-my($amount)='';
+$amount = '';
print qq!\nAmount \$<INPUT TYPE="text" NAME="amount" VALUE="$amount" SIZE=8 MAXLENGTH=8>!;
#refund?
@@ -85,7 +90,7 @@ print qq!\nAmount \$<INPUT TYPE="text" NAME="amount" VALUE="$amount" SIZE=8 MAXL
print qq!<INPUT TYPE="hidden" NAME="otaker" VALUE="$otaker">!;
#reason
-my($reason)='';
+$reason = '';
print qq!\nReason <INPUT TYPE="text" NAME="reason" VALUE="$reason" SIZE=72>!;
print <<END;
diff --git a/htdocs/edit/cust_main.cgi b/htdocs/edit/cust_main.cgi
index 174c7986f..1c2ba4cd4 100755
--- a/htdocs/edit/cust_main.cgi
+++ b/htdocs/edit/cust_main.cgi
@@ -1,6 +1,6 @@
#!/usr/bin/perl -Tw
#
-# $Id: cust_main.cgi,v 1.6 1999-01-18 09:41:24 ivan Exp $
+# $Id: cust_main.cgi,v 1.7 1999-01-19 05:13:34 ivan Exp $
#
# Usage: cust_main.cgi custnum
# http://server.name/path/cust_main.cgi?custnum
@@ -40,7 +40,11 @@
# fixed one missed day->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!<FORM ACTION="${p1}process/cust_main.cgi" METHOD=POST>!,
qq!<INPUT TYPE="hidden" NAME="custnum" VALUE="$custnum">!,
@@ -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!<INPUT TYPE="hidden" NAME="agentnum" VALUE="$agentnum">!;
} 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!</SELECT></TD><TH>Zip</TH><TD><INPUT TYPE="text" NAME="zip" VALUE="$zip" SIZE=10></TD></TR>!;
-my($daytime,$night,$fax)=(
+($daytime,$night,$fax)=(
$cust_main->daytime,
$cust_main->night,
$cust_main->fax,
@@ -190,28 +197,28 @@ print "<BR>Billing information", itable("#c0c0c0"),
print qq! CHECKED! if $cust_main->tax eq "Y";
print qq!>Tax Exempt!;
print qq!</TD></TR><TR><TD><INPUT TYPE="checkbox" NAME="invoicing_list_POST" VALUE="POST"!;
-my @invoicing_list = $cust_main->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!</TD></TR><TR><TD>Email invoice <INPUT TYPE="text" NAME="invoicing_list" VALUE="$invoicing_list"></TD>!;
print "</TD></TR></TABLE>";
print table("#c0c0c0"), "<TR>";
-my($payinfo, $payname)=(
+($payinfo, $payname)=(
$cust_main->payinfo,
$cust_main->payname,
);
-my %payby = (
+%payby = (
'CARD' => qq!Credit card<BR><INPUT TYPE="text" NAME="CARD_payinfo" VALUE="" MAXLENGTH=19><BR>Exp !. expselect("CARD"). qq!<BR>Name on card<BR><INPUT TYPE="text" NAME="CARD_payname" VALUE="">!,
'BILL' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE=""><BR>Exp !. expselect("BILL", "12-2037"). qq!<BR>Attention<BR><INPUT TYPE="text" NAME="BILL_payname" VALUE="Accounts Payable">!,
'COMP' => qq!Complimentary<BR>Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE=""><BR>Exp !. expselect("COMP"),
);
-my %paybychecked = (
+%paybychecked = (
'CARD' => qq!Credit card<BR><INPUT TYPE="text" NAME="CARD_payinfo" VALUE="$payinfo" MAXLENGTH=19><BR>Exp !. expselect("CARD", $cust_main->paydate). qq!<BR>Name on card<BR><INPUT TYPE="text" NAME="CARD_payname" VALUE="$payname">!,
'BILL' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE="$payinfo"><BR>Exp !. expselect("BILL", $cust_main->paydate). qq!<BR>Attention<BR><INPUT TYPE="text" NAME="BILL_payname" VALUE="$payname">!,
'COMP' => qq!Complimentary<BR>Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE="$payinfo"><BR>Exp !. expselect("COMP", $cust_main->paydate),
@@ -229,7 +236,7 @@ print "</TR></TABLE>";
#referral
-my $refnum = $cust_main->refnum || 0;
+$refnum = $cust_main->refnum || 0;
if ( $custnum ) {
print qq!<INPUT TYPE="hidden" NAME="refnum" VALUE="$refnum">!;
} else {
@@ -246,7 +253,7 @@ if ( $custnum ) {
print "</SELECT>";
}
-my $otaker = $cust_main->otaker;
+$otaker = $cust_main->otaker;
print qq!<INPUT TYPE="hidden" NAME="otaker" VALUE="$otaker">!,
qq!<BR><BR><INPUT TYPE="submit" VALUE="!,
$custnum ? "Apply Changes" : "Add Customer", 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),
)), <<END;
diff --git a/htdocs/edit/cust_main_county.cgi b/htdocs/edit/cust_main_county.cgi
index 7d5468bed..05c072786 100755
--- a/htdocs/edit/cust_main_county.cgi
+++ b/htdocs/edit/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:26 ivan Exp $
+# $Id: cust_main_county.cgi,v 1.5 1999-01-19 05:13:36 ivan Exp $
#
# ivan@sisd.com 97-dec-13-16
#
@@ -11,7 +11,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:26 ivan
+# Revision 1.5 1999-01-19 05:13:36 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:26 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 $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(
</TR>
END
-my($cust_main_county);
foreach $cust_main_county ( qsearch('cust_main_county',{}) ) {
my($hashref)=$cust_main_county->hashref;
print <<END;
diff --git a/htdocs/edit/cust_pay.cgi b/htdocs/edit/cust_pay.cgi
index 929c9e7e4..4cd95de55 100755
--- a/htdocs/edit/cust_pay.cgi
+++ b/htdocs/edit/cust_pay.cgi
@@ -1,6 +1,6 @@
#!/usr/bin/perl -Tw
#
-# $Id: cust_pay.cgi,v 1.3 1999-01-18 09:41:27 ivan Exp $
+# $Id: cust_pay.cgi,v 1.4 1999-01-19 05:13:37 ivan Exp $
#
# Usage: cust_pay.cgi invnum
# http://server.name/path/cust_pay.cgi?invnum
@@ -14,7 +14,11 @@
# rewrite ivan@sisd.com 98-mar-16
#
# $Log: cust_pay.cgi,v $
-# Revision 1.3 1999-01-18 09:41:27 ivan
+# Revision 1.4 1999-01-19 05:13:37 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:27 ivan
# all $cgi->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", ''), <<END;
<FORM ACTION="${p1}process/cust_pay.cgi" METHOD=POST>
<HR><PRE>
@@ -46,18 +51,18 @@ END
print qq!Invoice #<B>$invnum</B><INPUT TYPE="hidden" NAME="invnum" VALUE="$invnum">!;
#date
-my($date)=time;
+$date = time;
print qq!<BR>Date: <B>!, time2str("%D",$date), qq!</B><INPUT TYPE="hidden" NAME="_date" VALUE="$date">!;
#paid
print qq!<BR>Amount \$<INPUT TYPE="text" NAME="paid" VALUE="" SIZE=8 MAXLENGTH=8>!;
#payby
-my($payby)="BILL";
+$payby = "BILL";
print qq!<BR>Payby: <B>$payby</B><INPUT TYPE="hidden" NAME="payby" VALUE="$payby">!;
#payinfo (check # now as payby="BILL" hardcoded.. what to do later?)
-my($payinfo)="";
+$payinfo = "";
print qq!<BR>Check #<INPUT TYPE="text" NAME="payinfo" VALUE="$payinfo">!;
#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", ''), <<END;
<FORM ACTION="${p1}process/cust_pkg.cgi" METHOD=POST>
<HR>
@@ -68,7 +73,7 @@ END
print qq!<INPUT TYPE="hidden" NAME="new_custnum" VALUE="$custnum">!;
#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.<BR><BR>
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!<CENTER><TABLE>! ;
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.<BR><BR>
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!<A HREF="http://rs.internic.net/help/agreement.txt">!.
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"), <<END;
<FORM ACTION="${p1}process/svc_acct.cgi" METHOD=POST>
<INPUT TYPE="hidden" NAME="svcnum" VALUE="$svcnum">
@@ -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!<INPUT TYPE="hidden" NAME="popnum" VALUE="$popnum">!;
} else {
@@ -143,7 +147,7 @@ if ( $part_svc->svc_acct__popnum_flag eq "F" ) {
print "</SELECT>";
}
-my($uid,$gid,$finger,$dir)=(
+($uid,$gid,$finger,$dir)=(
$svc_acct->uid,
$svc_acct->gid,
$svc_acct->finger,
@@ -157,7 +161,7 @@ print <<END;
<INPUT TYPE="hidden" NAME="dir" VALUE="$dir">
END
-my($shell)=$svc_acct->shell;
+$shell = $svc_acct->shell;
if ( $part_svc->svc_acct__shell_flag eq "F" ) {
print qq!<INPUT TYPE="hidden" NAME="shell" VALUE="$shell">!;
} else {
@@ -170,7 +174,7 @@ if ( $part_svc->svc_acct__shell_flag eq "F" ) {
print "</SELECT>";
}
-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;
<FORM ACTION="${p1}process/svc_acct_sm.cgi" METHOD=POST>
END
@@ -191,7 +194,7 @@ print qq!<INPUT TYPE="hidden" NAME="pkgnum" VALUE="$pkgnum">!;
#svcpart
print qq!<INPUT TYPE="hidden" NAME="svcpart" VALUE="$svcpart">!;
-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", ''), <<END;
<FORM ACTION="${p1}process/svc_domain.cgi" METHOD=POST>
<INPUT TYPE="hidden" NAME="svcnum" VALUE="$svcnum">