*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.
57 files changed:
data_dir=>'/home/ivan/freeside_current/masondata',
out_mode=>'stream',
);
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.
# Activate the following if running httpd as root (the normal case).
# Resets ownership of all files created by Mason at startup.
$r->method('GET');
$r->headers_in->unset('Content-length');
$r->content_type('text/html');
$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);
'';
$r->header_out('Content-Type' => 'text/html');
$m->abort(302);
'';
#&cgisuidsetup($r);
$p = popurl(2);
}
#&cgisuidsetup($r);
$p = popurl(2);
}
$r->content_type('text/html');
#eorar
$r->content_type('text/html');
#eorar
$headers->{'Pragma'} = $headers->{'Cache-control'} = 'no-cache';
#$r->no_cache(1);
$headers->{'Expires'} = '0';
$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;
<%
print header("Agent Type Listing", menubar(
<%
print header("Agent Type Listing", menubar(
<%
print header("Tax Rate Listing", menubar(
<%
print header("Tax Rate Listing", menubar(
<%
print header("Pending credit card batch", menubar(
<%
print header("Pending credit card batch", menubar(
<%
print header('NAS ports', menubar(
<%
print header('NAS ports', menubar(
<%
print header("Referral Listing", menubar(
<%
print header("Referral Listing", menubar(
<%
print header("Job Queue", menubar(
<%
print header("Job Queue", menubar(
<%
print header('POP Listing', menubar(
<%
print header('POP Listing', menubar(
%>
<%= $cgi->redirect("config-view.cgi") %>
%>
<%= $cgi->redirect("config-view.cgi") %>
<%= header('View Configuration', menubar( 'Main Menu' => $p,
'Edit Configuration' => 'config.cgi' ) ) %>
<%= header('View Configuration', menubar( 'Main Menu' => $p,
'Edit Configuration' => 'config.cgi' ) ) %>
<%= header('Edit Configuration', menubar( 'Main Menu' => $p ) ) %>
<% my $conf = new FS::Conf; my @config_items = $conf->config_items; %>
<%= header('Edit Configuration', menubar( 'Main Menu' => $p ) ) %>
<% my $conf = new FS::Conf; my @config_items = $conf->config_items; %>
-# <!-- $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 = '';
my $error ='';
my $pkgnum = '';
<%
my($paynum, $amount, $invnum);
<%
my($paynum, $amount, $invnum);
<%
my $conf = new FS::Conf;
<%
my $conf = new FS::Conf;
<%
my($crednum, $amount, $invnum);
<%
my($crednum, $amount, $invnum);
<%
#for misplaced logic below
<%
#for misplaced logic below
<%
my($taxnum, $delim, $expansion );
<%
my($taxnum, $delim, $expansion );
<%
print header("Edit tax rates", menubar(
<%
print header("Edit tax rates", menubar(
<%
my $conf = new FS::Conf;
<%
my $conf = new FS::Conf;
<%
if ( $cgi->param('eventpart') && $cgi->param('eventpart') =~ /^(\d+)$/ ) {
<%
if ( $cgi->param('eventpart') && $cgi->param('eventpart') =~ /^(\d+)$/ ) {
<%
if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) {
<%
if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) {
<%
my $part_svc;
if ( $cgi->param('error') ) { #error
<%
my $part_svc;
if ( $cgi->param('error') ) { #error
my $error = FS::cust_pkg::order($custnum, [ $pkgpart ], [], \@cust_pkg, );
if ($error) {
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 );
eidiot($error);
} else {
print $cgi->redirect(popurl(3). "view/cust_pkg.cgi?". $cust_pkg[0]->pkgnum );
<%
my $conf = new FS::Conf;
<%
my $conf = new FS::Conf;
<%
my $conf = new FS::Conf;
<%
my $conf = new FS::Conf;
<%
my($svcnum, $pkgnum, $svcpart, $kludge_action, $purpose, $part_svc,
<%
my($svcnum, $pkgnum, $svcpart, $kludge_action, $purpose, $part_svc,
<%
my $conf = new FS::Conf;
<%
my $conf = new FS::Conf;
#&eidiot($error) if $error;
if ( $error ) {
#&eidiot($error) if $error;
if ( $error ) {
+%>
+<!-- mason kludge -->
+<%
&idiot($error);
} else {
print $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum");
&idiot($error);
} else {
print $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum");
&myeidiot($error) if $error;
$error = $cust_svc->delete;
&myeidiot($error) if $error;
$error = $cust_svc->delete;
-&myeidiot($error) if $error;
-
-$dbh->commit or die $dbh->errstr;
-
-print $cgi->redirect(popurl(2));
+ %>
+<!-- mason kludge -->
+<%
+} else {
+
+ $dbh->commit or die $dbh->errstr;
+
+ print $cgi->redirect(popurl(2));
<%
my $conf = new FS::Conf;
<%
my $conf = new FS::Conf;
<%
my $conf = new FS::Conf;
<%
my $conf = new FS::Conf;
#no errors, so let's view this customer.
print $cgi->redirect(popurl(3). "view/cust_pkg.cgi?$pkgnum");
} else {
#no errors, so let's view this customer.
print $cgi->redirect(popurl(3). "view/cust_pkg.cgi?$pkgnum");
} else {
+%>
+<!-- mason kludge -->
+<%
my $invnum = $cust_bill[0]->invnum;
print $cgi->redirect(popurl(2). "view/cust_bill.cgi?$invnum"); #redirect
} elsif ( scalar(@cust_bill) == 0 ) {
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 {
eidiot("Invoice not found.");
} else {
+%>
+<!-- mason kludge -->
+<%
my $total = scalar(@cust_bill);
print header("Invoice Search Results", menubar(
'Main Menu', popurl(2)
my $total = scalar(@cust_bill);
print header("Invoice Search Results", menubar(
'Main Menu', popurl(2)
}
#exit;
} elsif ( scalar(@cust_main) == 0 ) {
}
#exit;
} elsif ( scalar(@cust_main) == 0 ) {
+%>
+<!-- mason kludge -->
+<%
eidiot "No matching customers found!\n";
} else {
eidiot "No matching customers found!\n";
} else {
+%>
+<!-- mason kludge -->
+<%
$total ||= scalar(@cust_main);
print header("Customer Search Results",menubar(
$total ||= scalar(@cust_main);
print header("Customer Search Results",menubar(
# my $invnum = $cust_bill[0]->invnum;
# print $cgi->redirect(popurl(2). "view/cust_bill.cgi?$invnum"); #redirect
} elsif ( scalar(@cust_pay) == 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' : '';
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;
print header("Check # Search Results", menubar(
'Main Menu', popurl(2)
)), "$total matching check$s found<BR>", &table(), <<END;
print $cgi->redirect(popurl(2). "view/cust_pkg.cgi?$pkgnum");
#exit;
} elsif ( scalar(@cust_pkg) == 0 ) { #error
print $cgi->redirect(popurl(2). "view/cust_pkg.cgi?$pkgnum");
#exit;
} elsif ( scalar(@cust_pkg) == 0 ) { #error
+%>
+<!-- mason kludge -->
+<%
eidiot("No packages found");
} else {
eidiot("No packages found");
} else {
+%>
+<!-- mason kludge -->
+<%
$total ||= scalar(@cust_pkg);
#begin pager
$total ||= scalar(@cust_pkg);
#begin pager
print $cgi->redirect(popurl(2). "view/svc_acct.cgi?$svcnum"); #redirect
#exit;
} elsif ( scalar(@svc_acct) == 0 ) { #error
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 {
idiot("Account not found");
} else {
+%>
+<!-- mason kludge -->
+<%
$total ||= scalar(@svc_acct);
#begin pager
$total ||= scalar(@svc_acct);
#begin pager
my($svcnum)=$svc_acct_sm[0]->svcnum;
print $cgi->redirect(popurl(2). "view/svc_acct_sm.cgi?$svcnum");
} elsif ( 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>
print header('Mail Alias Search Results'), &table(), <<END;
<TR>
<TH>Mail to<BR><FONT SIZE=-1>(click to view mail alias)</FONT></TH>
print $cgi->redirect(popurl(2). "view/svc_domain.cgi?". $svc_domain[0]->svcnum);
#exit;
} elsif ( scalar(@svc_domain) == 0 ) {
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 {
eidiot "No matching domains found!\n";
} else {
+%>
+<!-- mason kludge -->
+<%
my($total)=scalar(@svc_domain);
print header("Domain Search Results",''), <<END;
my($total)=scalar(@svc_domain);
print header("Domain Search Results",''), <<END;
<%
my $conf = new FS::Conf;
<%
my $conf = new FS::Conf;
<%
my $conf = new FS::Conf;
<%
my $conf = new FS::Conf;
<%
my $conf = new FS::Conf;
<%
my $conf = new FS::Conf;
<%
my($query) = $cgi->keywords;
<%
my($query) = $cgi->keywords;
<%
my $conf = new FS::Conf;
<%
my $conf = new FS::Conf;
<%
my($query) = $cgi->keywords;
<%
my($query) = $cgi->keywords;