summaryrefslogtreecommitdiff
path: root/httemplate/misc/cancel_pkg.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/misc/cancel_pkg.cgi')
-rwxr-xr-xhttemplate/misc/cancel_pkg.cgi29
1 files changed, 15 insertions, 14 deletions
diff --git a/httemplate/misc/cancel_pkg.cgi b/httemplate/misc/cancel_pkg.cgi
index 0487677df..00b421f10 100755
--- a/httemplate/misc/cancel_pkg.cgi
+++ b/httemplate/misc/cancel_pkg.cgi
@@ -1,15 +1,16 @@
-<%
+%
+%
+%#untaint pkgnum
+%my($query) = $cgi->keywords;
+%$query =~ /^(\d+)$/ || die "Illegal pkgnum";
+%my $pkgnum = $1;
+%
+%my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
+%
+%my $error = $cust_pkg->cancel;
+%eidiot($error) if $error;
+%
+%print $cgi->redirect($p. "view/cust_main.cgi?".$cust_pkg->getfield('custnum'));
+%
+%
-#untaint pkgnum
-my($query) = $cgi->keywords;
-$query =~ /^(\d+)$/ || die "Illegal pkgnum";
-my $pkgnum = $1;
-
-my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
-
-my $error = $cust_pkg->cancel;
-eidiot($error) if $error;
-
-print $cgi->redirect($p. "view/cust_main.cgi?".$cust_pkg->getfield('custnum'));
-
-%>