diff options
Diffstat (limited to 'httemplate/edit/process/cust_pkg.cgi')
-rwxr-xr-x | httemplate/edit/process/cust_pkg.cgi | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/httemplate/edit/process/cust_pkg.cgi b/httemplate/edit/process/cust_pkg.cgi deleted file mode 100755 index f8c9f5151..000000000 --- a/httemplate/edit/process/cust_pkg.cgi +++ /dev/null @@ -1,36 +0,0 @@ -<% - -my $error = ''; - -#untaint custnum -$cgi->param('custnum') =~ /^(\d+)$/; -my $custnum = $1; - -my @remove_pkgnums = map { - /^(\d+)$/ or die "Illegal remove_pkg value!"; - $1; -} $cgi->param('remove_pkg'); - -my @pkgparts; -foreach my $pkgpart ( map /^pkg(\d+)$/ ? $1 : (), $cgi->param ) { - if ( $cgi->param("pkg$pkgpart") =~ /^(\d+)$/ ) { - my $num_pkgs = $1; - while ( $num_pkgs-- ) { - push @pkgparts,$pkgpart; - } - } else { - $error = "Illegal quantity"; - last; - } -} - -$error ||= FS::cust_pkg::order($custnum,\@pkgparts,\@remove_pkgnums); - -if ($error) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "cust_pkg.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum"); -} - -%> |