X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=htdocs%2Fedit%2Fcust_pkg.cgi;h=ed420083014ac7656df4f51d7f03071733a630af;hb=c116ce940c33dcd7e37a87a8eb2936e17cc68b11;hp=68abf9698b843e25dd4bb196601e7ee64000f84f;hpb=b6869885e52ea0e18009350bf59d4eca8aafb0eb;p=freeside.git diff --git a/htdocs/edit/cust_pkg.cgi b/htdocs/edit/cust_pkg.cgi index 68abf9698..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.2 1998-12-17 06:17:04 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,11 +25,21 @@ # 98-jun-1 # # $Log: cust_pkg.cgi,v $ -# Revision 1.2 1998-12-17 06:17:04 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) +# +# Revision 1.2 1998/12/17 06:17:04 ivan # fix double // in relative URLs, s/CGI::Base/CGI/; # 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); @@ -37,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'); @@ -48,14 +57,14 @@ 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); -print $cgi->header, header("Add/Edit Packages", ''), <header( '-expires' => 'now' ), header("Add/Edit Packages", ''), <
END @@ -64,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) { @@ -101,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;