diff options
author | ivan <ivan> | 2002-08-24 03:29:16 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-08-24 03:29:16 +0000 |
commit | 96fd4cf172f2b9fbdd00f7b7fe7a7797132b88c2 (patch) | |
tree | 9c412371be15bf29d292788e1d71cbe148f252a4 /httemplate/misc | |
parent | e0729955b2ad10fba02399afafec68fe5ccab97a (diff) |
unprovision a single service
Diffstat (limited to 'httemplate/misc')
-rwxr-xr-x | httemplate/misc/unprovision.cgi | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/httemplate/misc/unprovision.cgi b/httemplate/misc/unprovision.cgi new file mode 100755 index 000000000..8f2a7d13d --- /dev/null +++ b/httemplate/misc/unprovision.cgi @@ -0,0 +1,33 @@ +<% + +my $dbh = dbh; + +#untaint svcnum +my($query) = $cgi->keywords; +$query =~ /^(\d+)$/; +my $svcnum = $1; + +#my $svc_acct = qsearchs('svc_acct',{'svcnum'=>$svcnum}); +#die "Unknown svcnum!" unless $svc_acct; + +my $cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum}); +die "Unknown svcnum!" unless $cust_svc; +#&eidiot(qq!This account has already been audited. Cancel the +# <A HREF="!. popurl(2). qq!view/cust_pkg.cgi?! . $cust_svc->getfield('pkgnum') . +# qq!pkgnum"> package</A> instead.!) +# if $cust_svc->pkgnum ne '' && $cust_svc->pkgnum ne '0'; + +my $custnum = $cust_svc->cust_pkg->custnum; + +my $error = $cust_svc->cancel; + +if ( $error ) { + %> +<!-- mason kludge --> +<% + &eidiot($error); +} else { + print $cgi->redirect(popurl(2)."view/cust_main.cgi?$custnum"); +} + +%> |