From 1e4aa8069f25e1b4101da20bb9e0d3f60357ea52 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 4 Sep 2001 14:44:07 +0000 Subject: new admin documentation, quick one-pkg order --- httemplate/edit/process/quick-cust_pkg.cgi | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 httemplate/edit/process/quick-cust_pkg.cgi (limited to 'httemplate/edit/process/quick-cust_pkg.cgi') 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 @@ +<% +# + +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 ); +} + +%> + -- cgit v1.2.1 From 89301379ac6f1e2ebab203e458849001d3f8fb49 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 11 Sep 2001 09:56:27 +0000 Subject: fix quick order --- httemplate/edit/process/quick-cust_pkg.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/edit/process/quick-cust_pkg.cgi') diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index 5ac315d87..ff0c5b229 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -1,12 +1,12 @@ <% -# +# 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::CGI qw(popurl eidiot); use FS::cust_pkg; $cgi = new CGI; # create form object -- cgit v1.2.1 From 34678d474a3710a38e42fd681607fe98edb56658 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 11 Sep 2001 10:05:30 +0000 Subject: s/die/ediot/ --- httemplate/edit/process/quick-cust_pkg.cgi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'httemplate/edit/process/quick-cust_pkg.cgi') diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index ff0c5b229..c4f5172ad 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -1,5 +1,5 @@ <% -# +# use strict; use vars qw( $cgi $custnum $pkgpart $error ); #@remove_pkgnums @pkgparts @@ -15,10 +15,10 @@ $error = ''; #untaint custnum $cgi->param('custnum') =~ /^(\d+)$/ - or die 'illegal custnum '. $cgi->param('custnum'); + or eidiot 'illegal custnum '. $cgi->param('custnum'); $custnum = $1; $cgi->param('pkgpart') =~ /^(\d+)$/ - or die 'illegal pkgpart '. $cgi->param('pkgpart'); + or eidiot 'illegal pkgpart '. $cgi->param('pkgpart'); $pkgpart = $1; my @cust_pkg = (); -- cgit v1.2.1 From 1fd6d8cf5d7854860ef4fd10ed89828e0c04ec39 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 30 Jan 2002 14:18:09 +0000 Subject: remove use Module; and $cgi = new CGI; &cgisuidsetup(); from all templates. should work better under Mason. --- httemplate/edit/process/quick-cust_pkg.cgi | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'httemplate/edit/process/quick-cust_pkg.cgi') diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index c4f5172ad..29a954cc9 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -1,28 +1,16 @@ + <% -# - -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 eidiot); -use FS::cust_pkg; - -$cgi = new CGI; # create form object -&cgisuidsetup($cgi); -$error = ''; #untaint custnum $cgi->param('custnum') =~ /^(\d+)$/ or eidiot 'illegal custnum '. $cgi->param('custnum'); -$custnum = $1; +my $custnum = $1; $cgi->param('pkgpart') =~ /^(\d+)$/ or eidiot 'illegal pkgpart '. $cgi->param('pkgpart'); -$pkgpart = $1; +my $pkgpart = $1; my @cust_pkg = (); -$error ||= FS::cust_pkg::order($custnum, [ $pkgpart ], [], \@cust_pkg, ); +my $error = FS::cust_pkg::order($custnum, [ $pkgpart ], [], \@cust_pkg, ); if ($error) { eidiot($error); -- cgit v1.2.1 From 22a35047ecdffff80110e06cc08fc84f9ddba9b0 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 10 Feb 2002 13:21:31 +0000 Subject: removed from all files to fix any redirects, whew Mason handler.pl overrides CGI::redirect fixed strict; problems in edit/part_pkg.cgi & edit/process/part_pkg.cgi --- httemplate/edit/process/quick-cust_pkg.cgi | 1 - 1 file changed, 1 deletion(-) (limited to 'httemplate/edit/process/quick-cust_pkg.cgi') diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index 29a954cc9..5a4fb7797 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -1,4 +1,3 @@ - <% #untaint custnum -- cgit v1.2.1 From a4c96748eb6eab29a70f3a944c6520283a635c78 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 10 Feb 2002 16:05:22 +0000 Subject: *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. *finally* seems to be working under Mason. sheesh. --- httemplate/edit/process/quick-cust_pkg.cgi | 3 +++ 1 file changed, 3 insertions(+) (limited to 'httemplate/edit/process/quick-cust_pkg.cgi') diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index 5a4fb7797..c663dce32 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -12,6 +12,9 @@ my @cust_pkg = (); my $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 ); -- cgit v1.2.1 From ecb895ccbbf52ed2babc0885c9925022175e33a0 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 26 Jun 2002 01:35:08 +0000 Subject: working one-time charges --- httemplate/edit/process/quick-cust_pkg.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/edit/process/quick-cust_pkg.cgi') diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index c663dce32..a8f5b1453 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -2,10 +2,10 @@ #untaint custnum $cgi->param('custnum') =~ /^(\d+)$/ - or eidiot 'illegal custnum '. $cgi->param('custnum'); + or die 'illegal custnum '. $cgi->param('custnum'); my $custnum = $1; $cgi->param('pkgpart') =~ /^(\d+)$/ - or eidiot 'illegal pkgpart '. $cgi->param('pkgpart'); + or die 'illegal pkgpart '. $cgi->param('pkgpart'); my $pkgpart = $1; my @cust_pkg = (); -- cgit v1.2.1 From e3f327b2af9e6a591bae41d315fda731ec7f5128 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 22 Mar 2004 11:05:58 +0000 Subject: remove everything that links to package view also, closes: Bug#569 --- httemplate/edit/process/quick-cust_pkg.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'httemplate/edit/process/quick-cust_pkg.cgi') diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index a8f5b1453..fd9e59472 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -17,7 +17,8 @@ if ($error) { <% eidiot($error); } else { - print $cgi->redirect(popurl(3). "view/cust_pkg.cgi?". $cust_pkg[0]->pkgnum ); + print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum". + "#cust_pkg". $cust_pkg[0]->pkgnum ); } %> -- cgit v1.2.1