diff options
author | ivan <ivan> | 2001-09-04 14:44:07 +0000 |
---|---|---|
committer | ivan <ivan> | 2001-09-04 14:44:07 +0000 |
commit | 1e4aa8069f25e1b4101da20bb9e0d3f60357ea52 (patch) | |
tree | 15f9087d887b3767656a2336673ba928610ff407 /httemplate/edit/process/quick-cust_pkg.cgi | |
parent | feafaf45ee709ef15b6cf7892abf89e4878c627b (diff) |
new admin documentation, quick one-pkg order
Diffstat (limited to 'httemplate/edit/process/quick-cust_pkg.cgi')
-rw-r--r-- | httemplate/edit/process/quick-cust_pkg.cgi | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi new file mode 100644 index 000000000..5ac315d87 --- /dev/null +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -0,0 +1,34 @@ +<% +#<!-- $Id: quick-cust_pkg.cgi,v 1.1 2001-09-04 14:44:07 ivan Exp $ --> + +use strict; +use vars qw( $cgi $custnum $pkgpart $error ); #@remove_pkgnums @pkgparts +use CGI; +use CGI::Carp qw(fatalsToBrowser); +use FS::UID qw(cgisuidsetup); +use FS::CGI qw(popurl); +use FS::cust_pkg; + +$cgi = new CGI; # create form object +&cgisuidsetup($cgi); +$error = ''; + +#untaint custnum +$cgi->param('custnum') =~ /^(\d+)$/ + or die 'illegal custnum '. $cgi->param('custnum'); +$custnum = $1; +$cgi->param('pkgpart') =~ /^(\d+)$/ + or die 'illegal pkgpart '. $cgi->param('pkgpart'); +$pkgpart = $1; + +my @cust_pkg = (); +$error ||= FS::cust_pkg::order($custnum, [ $pkgpart ], [], \@cust_pkg, ); + +if ($error) { + eidiot($error); +} else { + print $cgi->redirect(popurl(3). "view/cust_pkg.cgi?". $cust_pkg[0]->pkgnum ); +} + +%> + |