Will things ever be the same again?
[freeside.git] / httemplate / misc / unprovision.cgi
index 3c92a4e..e42feda 100755 (executable)
@@ -1,29 +1,31 @@
-<%
+%
+%
+%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;
+%
+%my $custnum = $cust_svc->cust_pkg->custnum;
+%
+%my $error = $cust_svc->cancel;
+%
+%if ( $error ) {
+%  
 
-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;
-
-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");
-}
+%
+%  &eidiot($error);
+%} else {
+%  print $cgi->redirect(popurl(2)."view/cust_main.cgi?$custnum");
+%}
+%
+%
 
-%>