summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2002-02-10 16:05:22 +0000
committerivan <ivan>2002-02-10 16:05:22 +0000
commita4c96748eb6eab29a70f3a944c6520283a635c78 (patch)
tree8feec69d7a64f5f7c88aaffae8440c19e506123b
parent22a35047ecdffff80110e06cc08fc84f9ddba9b0 (diff)
*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.
-rw-r--r--htetc/handler.pl16
-rwxr-xr-xhttemplate/browse/agent.cgi1
-rwxr-xr-xhttemplate/browse/agent_type.cgi1
-rwxr-xr-xhttemplate/browse/cust_main_county.cgi1
-rwxr-xr-xhttemplate/browse/cust_pay_batch.cgi1
-rwxr-xr-xhttemplate/browse/nas.cgi1
-rwxr-xr-xhttemplate/browse/part_bill_event.cgi1
-rwxr-xr-xhttemplate/browse/part_pkg.cgi1
-rwxr-xr-xhttemplate/browse/part_referral.cgi1
-rwxr-xr-xhttemplate/browse/part_svc.cgi1
-rwxr-xr-xhttemplate/browse/queue.cgi1
-rwxr-xr-xhttemplate/browse/svc_acct_pop.cgi1
-rw-r--r--httemplate/config/config-process.cgi1
-rw-r--r--httemplate/config/config-view.cgi1
-rw-r--r--httemplate/config/config.cgi1
-rwxr-xr-xhttemplate/edit/REAL_cust_pkg.cgi3
-rwxr-xr-xhttemplate/edit/agent.cgi1
-rwxr-xr-xhttemplate/edit/agent_type.cgi1
-rwxr-xr-xhttemplate/edit/cust_bill_pay.cgi1
-rwxr-xr-xhttemplate/edit/cust_credit.cgi1
-rwxr-xr-xhttemplate/edit/cust_credit_bill.cgi1
-rwxr-xr-xhttemplate/edit/cust_main.cgi1
-rwxr-xr-xhttemplate/edit/cust_main_county-expand.cgi1
-rwxr-xr-xhttemplate/edit/cust_main_county.cgi1
-rwxr-xr-xhttemplate/edit/cust_pay.cgi1
-rwxr-xr-xhttemplate/edit/cust_pkg.cgi1
-rwxr-xr-xhttemplate/edit/part_bill_event.cgi1
-rwxr-xr-xhttemplate/edit/part_pkg.cgi1
-rwxr-xr-xhttemplate/edit/part_referral.cgi1
-rwxr-xr-xhttemplate/edit/part_svc.cgi1
-rw-r--r--httemplate/edit/process/quick-cust_pkg.cgi3
-rwxr-xr-xhttemplate/edit/svc_acct.cgi1
-rwxr-xr-xhttemplate/edit/svc_acct_pop.cgi1
-rwxr-xr-xhttemplate/edit/svc_acct_sm.cgi1
-rwxr-xr-xhttemplate/edit/svc_domain.cgi1
-rwxr-xr-xhttemplate/edit/svc_forward.cgi1
-rwxr-xr-xhttemplate/misc/bill.cgi3
-rwxr-xr-xhttemplate/misc/cancel-unaudited.cgi15
-rwxr-xr-xhttemplate/misc/catchall.cgi1
-rwxr-xr-xhttemplate/misc/delete-customer.cgi1
-rwxr-xr-xhttemplate/misc/link.cgi1
-rwxr-xr-xhttemplate/misc/process/link.cgi3
-rwxr-xr-xhttemplate/search/cust_bill.cgi6
-rwxr-xr-xhttemplate/search/cust_main.cgi6
-rwxr-xr-xhttemplate/search/cust_pay.cgi6
-rwxr-xr-xhttemplate/search/cust_pkg.cgi6
-rwxr-xr-xhttemplate/search/svc_acct.cgi6
-rwxr-xr-xhttemplate/search/svc_acct_sm.cgi3
-rwxr-xr-xhttemplate/search/svc_domain.cgi7
-rwxr-xr-xhttemplate/view/cust_bill.cgi1
-rwxr-xr-xhttemplate/view/cust_main.cgi1
-rwxr-xr-xhttemplate/view/cust_pkg.cgi1
-rwxr-xr-xhttemplate/view/svc_acct.cgi1
-rwxr-xr-xhttemplate/view/svc_acct_sm.cgi1
-rwxr-xr-xhttemplate/view/svc_domain.cgi1
-rwxr-xr-xhttemplate/view/svc_forward.cgi1
-rw-r--r--httemplate/view/svc_www.cgi1
57 files changed, 113 insertions, 14 deletions
diff --git a/htetc/handler.pl b/htetc/handler.pl
index 5544ebb..cac9004 100644
--- a/htetc/handler.pl
+++ b/htetc/handler.pl
@@ -34,7 +34,9 @@ my $interp = new HTML::Mason::Interp (parser=>$parser,
data_dir=>'/home/ivan/freeside_current/masondata',
out_mode=>'stream',
);
-my $ah = new HTML::Mason::ApacheHandler (interp=>$interp);
+my $ah = new HTML::Mason::ApacheHandler ( interp => $interp,
+ #auto_send_headers => 0,
+ );
# Activate the following if running httpd as root (the normal case).
# Resets ownership of all files created by Mason at startup.
@@ -111,12 +113,12 @@ sub handler
$r->method('GET');
$r->headers_in->unset('Content-length');
$r->content_type('text/html');
- $r->err_header_out('Location' => $location);
+ #$r->err_header_out('Location' => $location);
+ $r->header_out('Location' => $location);
$r->header_out('Content-Type' => 'text/html');
$m->abort(302);
'';
-
};
$cgi = new CGI;
@@ -124,6 +126,7 @@ sub handler
#&cgisuidsetup($r);
$p = popurl(2);
}
+
$r->content_type('text/html');
#eorar
@@ -131,9 +134,12 @@ sub handler
$headers->{'Pragma'} = $headers->{'Cache-control'} = 'no-cache';
#$r->no_cache(1);
$headers->{'Expires'} = '0';
-
- $ah->handle_request($r);
+# $r->send_http_header;
+
+ my $status = $ah->handle_request($r);
+
+ $status;
}
1;
diff --git a/httemplate/browse/agent.cgi b/httemplate/browse/agent.cgi
index 8079c72..ebec068 100755
--- a/httemplate/browse/agent.cgi
+++ b/httemplate/browse/agent.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
#Begin silliness
diff --git a/httemplate/browse/agent_type.cgi b/httemplate/browse/agent_type.cgi
index ba74e0d..eb20c64 100755
--- a/httemplate/browse/agent_type.cgi
+++ b/httemplate/browse/agent_type.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
print header("Agent Type Listing", menubar(
diff --git a/httemplate/browse/cust_main_county.cgi b/httemplate/browse/cust_main_county.cgi
index 7273dd0..8fbd7fa 100755
--- a/httemplate/browse/cust_main_county.cgi
+++ b/httemplate/browse/cust_main_county.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
print header("Tax Rate Listing", menubar(
diff --git a/httemplate/browse/cust_pay_batch.cgi b/httemplate/browse/cust_pay_batch.cgi
index 2202967..608a58d 100755
--- a/httemplate/browse/cust_pay_batch.cgi
+++ b/httemplate/browse/cust_pay_batch.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
print header("Pending credit card batch", menubar(
diff --git a/httemplate/browse/nas.cgi b/httemplate/browse/nas.cgi
index f1057ce..9ccbfe6 100755
--- a/httemplate/browse/nas.cgi
+++ b/httemplate/browse/nas.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
print header('NAS ports', menubar(
diff --git a/httemplate/browse/part_bill_event.cgi b/httemplate/browse/part_bill_event.cgi
index d850ae5..1d674f7 100755
--- a/httemplate/browse/part_bill_event.cgi
+++ b/httemplate/browse/part_bill_event.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my %search;
diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi
index 03326d0..0af64e7 100755
--- a/httemplate/browse/part_pkg.cgi
+++ b/httemplate/browse/part_pkg.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my %search;
diff --git a/httemplate/browse/part_referral.cgi b/httemplate/browse/part_referral.cgi
index 3ca36b2..76cc226 100755
--- a/httemplate/browse/part_referral.cgi
+++ b/httemplate/browse/part_referral.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
print header("Referral Listing", menubar(
diff --git a/httemplate/browse/part_svc.cgi b/httemplate/browse/part_svc.cgi
index 5bfb803..4590dc8 100755
--- a/httemplate/browse/part_svc.cgi
+++ b/httemplate/browse/part_svc.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my %search;
diff --git a/httemplate/browse/queue.cgi b/httemplate/browse/queue.cgi
index e38e40b..7fce1f5 100755
--- a/httemplate/browse/queue.cgi
+++ b/httemplate/browse/queue.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
print header("Job Queue", menubar(
diff --git a/httemplate/browse/svc_acct_pop.cgi b/httemplate/browse/svc_acct_pop.cgi
index c6a661a..f3b2966 100755
--- a/httemplate/browse/svc_acct_pop.cgi
+++ b/httemplate/browse/svc_acct_pop.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
print header('POP Listing', menubar(
diff --git a/httemplate/config/config-process.cgi b/httemplate/config/config-process.cgi
index 6905129..50f0d34 100644
--- a/httemplate/config/config-process.cgi
+++ b/httemplate/config/config-process.cgi
@@ -43,4 +43,3 @@
%>
<%= $cgi->redirect("config-view.cgi") %>
-
diff --git a/httemplate/config/config-view.cgi b/httemplate/config/config-view.cgi
index 4b66849..b041ada 100644
--- a/httemplate/config/config-view.cgi
+++ b/httemplate/config/config-view.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%= header('View Configuration', menubar( 'Main Menu' => $p,
'Edit Configuration' => 'config.cgi' ) ) %>
diff --git a/httemplate/config/config.cgi b/httemplate/config/config.cgi
index 56da069..b9e84a8 100644
--- a/httemplate/config/config.cgi
+++ b/httemplate/config/config.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%= header('Edit Configuration', menubar( 'Main Menu' => $p ) ) %>
<% my $conf = new FS::Conf; my @config_items = $conf->config_items; %>
diff --git a/httemplate/edit/REAL_cust_pkg.cgi b/httemplate/edit/REAL_cust_pkg.cgi
index 8ea0e08..abfaac3 100755
--- a/httemplate/edit/REAL_cust_pkg.cgi
+++ b/httemplate/edit/REAL_cust_pkg.cgi
@@ -1,5 +1,6 @@
+<!-- mason kludge -->
<%
-# <!-- $Id: REAL_cust_pkg.cgi,v 1.1 2001-10-15 14:58:03 ivan Exp $ -->
+# <!-- $Id: REAL_cust_pkg.cgi,v 1.2 2002-02-10 16:05:22 ivan Exp $ -->
my $error ='';
my $pkgnum = '';
diff --git a/httemplate/edit/agent.cgi b/httemplate/edit/agent.cgi
index 25e4765..3fca343 100755
--- a/httemplate/edit/agent.cgi
+++ b/httemplate/edit/agent.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my $agent;
diff --git a/httemplate/edit/agent_type.cgi b/httemplate/edit/agent_type.cgi
index 8b72920..4a4cd9a 100755
--- a/httemplate/edit/agent_type.cgi
+++ b/httemplate/edit/agent_type.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my($agent_type);
diff --git a/httemplate/edit/cust_bill_pay.cgi b/httemplate/edit/cust_bill_pay.cgi
index bfa2b3b..d906597 100755
--- a/httemplate/edit/cust_bill_pay.cgi
+++ b/httemplate/edit/cust_bill_pay.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my($paynum, $amount, $invnum);
diff --git a/httemplate/edit/cust_credit.cgi b/httemplate/edit/cust_credit.cgi
index 3162265..aae0df2 100755
--- a/httemplate/edit/cust_credit.cgi
+++ b/httemplate/edit/cust_credit.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my $conf = new FS::Conf;
diff --git a/httemplate/edit/cust_credit_bill.cgi b/httemplate/edit/cust_credit_bill.cgi
index 7528d85..1a97e13 100755
--- a/httemplate/edit/cust_credit_bill.cgi
+++ b/httemplate/edit/cust_credit_bill.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my($crednum, $amount, $invnum);
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi
index a0472bd..41643a3 100755
--- a/httemplate/edit/cust_main.cgi
+++ b/httemplate/edit/cust_main.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
#for misplaced logic below
diff --git a/httemplate/edit/cust_main_county-expand.cgi b/httemplate/edit/cust_main_county-expand.cgi
index 05bfa6f..66e8aaf 100755
--- a/httemplate/edit/cust_main_county-expand.cgi
+++ b/httemplate/edit/cust_main_county-expand.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my($taxnum, $delim, $expansion );
diff --git a/httemplate/edit/cust_main_county.cgi b/httemplate/edit/cust_main_county.cgi
index 1936885..a117117 100755
--- a/httemplate/edit/cust_main_county.cgi
+++ b/httemplate/edit/cust_main_county.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
print header("Edit tax rates", menubar(
diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi
index 6738dcd..27d36eb 100755
--- a/httemplate/edit/cust_pay.cgi
+++ b/httemplate/edit/cust_pay.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my $conf = new FS::Conf;
diff --git a/httemplate/edit/cust_pkg.cgi b/httemplate/edit/cust_pkg.cgi
index 7fb88c3..d546f74 100755
--- a/httemplate/edit/cust_pkg.cgi
+++ b/httemplate/edit/cust_pkg.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my %pkg = ();
diff --git a/httemplate/edit/part_bill_event.cgi b/httemplate/edit/part_bill_event.cgi
index 25d9bc0..4001643 100755
--- a/httemplate/edit/part_bill_event.cgi
+++ b/httemplate/edit/part_bill_event.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
if ( $cgi->param('eventpart') && $cgi->param('eventpart') =~ /^(\d+)$/ ) {
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi
index a98179e..d327026 100755
--- a/httemplate/edit/part_pkg.cgi
+++ b/httemplate/edit/part_pkg.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) {
diff --git a/httemplate/edit/part_referral.cgi b/httemplate/edit/part_referral.cgi
index 22277ce..73be9e3 100755
--- a/httemplate/edit/part_referral.cgi
+++ b/httemplate/edit/part_referral.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my $part_referral;
diff --git a/httemplate/edit/part_svc.cgi b/httemplate/edit/part_svc.cgi
index 9199567..63ec1dc 100755
--- a/httemplate/edit/part_svc.cgi
+++ b/httemplate/edit/part_svc.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my $part_svc;
if ( $cgi->param('error') ) { #error
diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi
index 5a4fb77..c663dce 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) {
+%>
+<!-- mason kludge -->
+<%
eidiot($error);
} else {
print $cgi->redirect(popurl(3). "view/cust_pkg.cgi?". $cust_pkg[0]->pkgnum );
diff --git a/httemplate/edit/svc_acct.cgi b/httemplate/edit/svc_acct.cgi
index fed39e7..73ecdd9 100755
--- a/httemplate/edit/svc_acct.cgi
+++ b/httemplate/edit/svc_acct.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my $conf = new FS::Conf;
diff --git a/httemplate/edit/svc_acct_pop.cgi b/httemplate/edit/svc_acct_pop.cgi
index 97d42f5..5db48a3 100755
--- a/httemplate/edit/svc_acct_pop.cgi
+++ b/httemplate/edit/svc_acct_pop.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my $svc_acct_pop;
diff --git a/httemplate/edit/svc_acct_sm.cgi b/httemplate/edit/svc_acct_sm.cgi
index 0cb27b8..0fd5f76 100755
--- a/httemplate/edit/svc_acct_sm.cgi
+++ b/httemplate/edit/svc_acct_sm.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my $conf = new FS::Conf;
diff --git a/httemplate/edit/svc_domain.cgi b/httemplate/edit/svc_domain.cgi
index 671a12d..d20e1f3 100755
--- a/httemplate/edit/svc_domain.cgi
+++ b/httemplate/edit/svc_domain.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my($svcnum, $pkgnum, $svcpart, $kludge_action, $purpose, $part_svc,
diff --git a/httemplate/edit/svc_forward.cgi b/httemplate/edit/svc_forward.cgi
index 88558ca..5f1466b 100755
--- a/httemplate/edit/svc_forward.cgi
+++ b/httemplate/edit/svc_forward.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my $conf = new FS::Conf;
diff --git a/httemplate/misc/bill.cgi b/httemplate/misc/bill.cgi
index 8c21fe1..6f523a5 100755
--- a/httemplate/misc/bill.cgi
+++ b/httemplate/misc/bill.cgi
@@ -26,6 +26,9 @@ unless ( $error ) {
#&eidiot($error) if $error;
if ( $error ) {
+%>
+<!-- mason kludge -->
+<%
&idiot($error);
} else {
print $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum");
diff --git a/httemplate/misc/cancel-unaudited.cgi b/httemplate/misc/cancel-unaudited.cgi
index a73b2ce..5d3c873 100755
--- a/httemplate/misc/cancel-unaudited.cgi
+++ b/httemplate/misc/cancel-unaudited.cgi
@@ -30,15 +30,18 @@ $error = $svc_acct->delete;
&myeidiot($error) if $error;
$error = $cust_svc->delete;
-&myeidiot($error) if $error;
-
-$dbh->commit or die $dbh->errstr;
-
-print $cgi->redirect(popurl(2));
-sub myeidiot {
+if ( $error ) {
$dbh->rollback;
+ %>
+<!-- mason kludge -->
+<%
&eidiot(@_);
+} else {
+
+ $dbh->commit or die $dbh->errstr;
+
+ print $cgi->redirect(popurl(2));
}
%>
diff --git a/httemplate/misc/catchall.cgi b/httemplate/misc/catchall.cgi
index cc4adb8..9aa84be 100755
--- a/httemplate/misc/catchall.cgi
+++ b/httemplate/misc/catchall.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my $conf = new FS::Conf;
diff --git a/httemplate/misc/delete-customer.cgi b/httemplate/misc/delete-customer.cgi
index 0ed3d01..5088fef 100755
--- a/httemplate/misc/delete-customer.cgi
+++ b/httemplate/misc/delete-customer.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my $conf = new FS::Conf;
diff --git a/httemplate/misc/link.cgi b/httemplate/misc/link.cgi
index 81e1bc4..efc762c 100755
--- a/httemplate/misc/link.cgi
+++ b/httemplate/misc/link.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my %link_field = (
diff --git a/httemplate/misc/process/link.cgi b/httemplate/misc/process/link.cgi
index af96c0b..4b220a8 100755
--- a/httemplate/misc/process/link.cgi
+++ b/httemplate/misc/process/link.cgi
@@ -31,6 +31,9 @@ unless ($error) {
#no errors, so let's view this customer.
print $cgi->redirect(popurl(3). "view/cust_pkg.cgi?$pkgnum");
} else {
+%>
+<!-- mason kludge -->
+<%
idiot($error);
}
diff --git a/httemplate/search/cust_bill.cgi b/httemplate/search/cust_bill.cgi
index 0c9f27f..d838518 100755
--- a/httemplate/search/cust_bill.cgi
+++ b/httemplate/search/cust_bill.cgi
@@ -50,8 +50,14 @@ if ( scalar(@cust_bill) == 1 ) {
my $invnum = $cust_bill[0]->invnum;
print $cgi->redirect(popurl(2). "view/cust_bill.cgi?$invnum"); #redirect
} elsif ( scalar(@cust_bill) == 0 ) {
+%>
+<!-- mason kludge -->
+<%
eidiot("Invoice not found.");
} else {
+%>
+<!-- mason kludge -->
+<%
my $total = scalar(@cust_bill);
print header("Invoice Search Results", menubar(
'Main Menu', popurl(2)
diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi
index 89e325d..b962c7c 100755
--- a/httemplate/search/cust_main.cgi
+++ b/httemplate/search/cust_main.cgi
@@ -152,8 +152,14 @@ if ( scalar(@cust_main) == 1 && ! $cgi->param('referral_custnum') ) {
}
#exit;
} elsif ( scalar(@cust_main) == 0 ) {
+%>
+<!-- mason kludge -->
+<%
eidiot "No matching customers found!\n";
} else {
+%>
+<!-- mason kludge -->
+<%
$total ||= scalar(@cust_main);
print header("Customer Search Results",menubar(
diff --git a/httemplate/search/cust_pay.cgi b/httemplate/search/cust_pay.cgi
index 8ebd654..b5bdf82 100755
--- a/httemplate/search/cust_pay.cgi
+++ b/httemplate/search/cust_pay.cgi
@@ -13,11 +13,17 @@ if (0) {
# my $invnum = $cust_bill[0]->invnum;
# print $cgi->redirect(popurl(2). "view/cust_bill.cgi?$invnum"); #redirect
} elsif ( scalar(@cust_pay) == 0 ) {
+%>
+<!-- mason kludge -->
+<%
idiot("Check # not found.");
#exit;
} else {
my $total = scalar(@cust_pay);
my $s = $total > 1 ? 's' : '';
+%>
+<!-- mason kludge -->
+<%
print header("Check # Search Results", menubar(
'Main Menu', popurl(2)
)), "$total matching check$s found<BR>", &table(), <<END;
diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi
index 6b25fec..54e02ce 100755
--- a/httemplate/search/cust_pkg.cgi
+++ b/httemplate/search/cust_pkg.cgi
@@ -77,8 +77,14 @@ if ( scalar(@cust_pkg) == 1 ) {
print $cgi->redirect(popurl(2). "view/cust_pkg.cgi?$pkgnum");
#exit;
} elsif ( scalar(@cust_pkg) == 0 ) { #error
+%>
+<!-- mason kludge -->
+<%
eidiot("No packages found");
} else {
+%>
+<!-- mason kludge -->
+<%
$total ||= scalar(@cust_pkg);
#begin pager
diff --git a/httemplate/search/svc_acct.cgi b/httemplate/search/svc_acct.cgi
index a3fed83..0918275 100755
--- a/httemplate/search/svc_acct.cgi
+++ b/httemplate/search/svc_acct.cgi
@@ -63,8 +63,14 @@ if ( scalar(@svc_acct) == 1 ) {
print $cgi->redirect(popurl(2). "view/svc_acct.cgi?$svcnum"); #redirect
#exit;
} elsif ( scalar(@svc_acct) == 0 ) { #error
+%>
+<!-- mason kludge -->
+<%
idiot("Account not found");
} else {
+%>
+<!-- mason kludge -->
+<%
$total ||= scalar(@svc_acct);
#begin pager
diff --git a/httemplate/search/svc_acct_sm.cgi b/httemplate/search/svc_acct_sm.cgi
index bcfe44c..4ee3006 100755
--- a/httemplate/search/svc_acct_sm.cgi
+++ b/httemplate/search/svc_acct_sm.cgi
@@ -25,6 +25,9 @@ if ( scalar(@svc_acct_sm) == 1 ) {
my($svcnum)=$svc_acct_sm[0]->svcnum;
print $cgi->redirect(popurl(2). "view/svc_acct_sm.cgi?$svcnum");
} elsif ( scalar(@svc_acct_sm) > 1 ) {
+%>
+<!-- mason kludge -->
+<%
print header('Mail Alias Search Results'), &table(), <<END;
<TR>
<TH>Mail to<BR><FONT SIZE=-1>(click to view mail alias)</FONT></TH>
diff --git a/httemplate/search/svc_domain.cgi b/httemplate/search/svc_domain.cgi
index 334b6c0..fb372db 100755
--- a/httemplate/search/svc_domain.cgi
+++ b/httemplate/search/svc_domain.cgi
@@ -35,9 +35,14 @@ if ( scalar(@svc_domain) == 1 ) {
print $cgi->redirect(popurl(2). "view/svc_domain.cgi?". $svc_domain[0]->svcnum);
#exit;
} elsif ( scalar(@svc_domain) == 0 ) {
+%>
+<!-- mason kludge -->
+<%
eidiot "No matching domains found!\n";
} else {
-
+%>
+<!-- mason kludge -->
+<%
my($total)=scalar(@svc_domain);
print header("Domain Search Results",''), <<END;
diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index da79d79..7c2af06 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
#untaint invnum
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
index bc76301..90299e4 100755
--- a/httemplate/view/cust_main.cgi
+++ b/httemplate/view/cust_main.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my $conf = new FS::Conf;
diff --git a/httemplate/view/cust_pkg.cgi b/httemplate/view/cust_pkg.cgi
index 3cf9083..e9670cd 100755
--- a/httemplate/view/cust_pkg.cgi
+++ b/httemplate/view/cust_pkg.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my %uiview = ();
diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi
index 31327a6..90ca1a2 100755
--- a/httemplate/view/svc_acct.cgi
+++ b/httemplate/view/svc_acct.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my $conf = new FS::Conf;
diff --git a/httemplate/view/svc_acct_sm.cgi b/httemplate/view/svc_acct_sm.cgi
index ccb81f1..4e5acc4 100755
--- a/httemplate/view/svc_acct_sm.cgi
+++ b/httemplate/view/svc_acct_sm.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my $conf = new FS::Conf;
diff --git a/httemplate/view/svc_domain.cgi b/httemplate/view/svc_domain.cgi
index f4aa42b..f302110 100755
--- a/httemplate/view/svc_domain.cgi
+++ b/httemplate/view/svc_domain.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my($query) = $cgi->keywords;
diff --git a/httemplate/view/svc_forward.cgi b/httemplate/view/svc_forward.cgi
index a5096e9..cafb9e5 100755
--- a/httemplate/view/svc_forward.cgi
+++ b/httemplate/view/svc_forward.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my $conf = new FS::Conf;
diff --git a/httemplate/view/svc_www.cgi b/httemplate/view/svc_www.cgi
index 2fc8ac4..bd8ae36 100644
--- a/httemplate/view/svc_www.cgi
+++ b/httemplate/view/svc_www.cgi
@@ -1,3 +1,4 @@
+<!-- mason kludge -->
<%
my($query) = $cgi->keywords;