summaryrefslogtreecommitdiff
path: root/htdocs/search
diff options
context:
space:
mode:
authorivan <ivan>1999-01-19 05:14:23 +0000
committerivan <ivan>1999-01-19 05:14:23 +0000
commitc116ce940c33dcd7e37a87a8eb2936e17cc68b11 (patch)
tree504ed73e822a6ae40aae152134e7d022a88bd566 /htdocs/search
parent65a4f2fb7d37996f89b5e22dac831e57d467d050 (diff)
for mod_perl: no more top-level my() variables; use vars instead
also the last s/create/new/;
Diffstat (limited to 'htdocs/search')
-rwxr-xr-xhtdocs/search/cust_bill.cgi13
-rwxr-xr-xhtdocs/search/cust_main.cgi21
-rwxr-xr-xhtdocs/search/cust_pkg.cgi15
-rwxr-xr-xhtdocs/search/svc_acct.cgi15
-rwxr-xr-xhtdocs/search/svc_acct_sm.cgi21
-rwxr-xr-xhtdocs/search/svc_domain.cgi16
6 files changed, 58 insertions, 43 deletions
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',{});