[freeside-commits] freeside/httemplate/misc batch-cust_pay.html, 1.6, 1.7 bill.cgi, 1.9, 1.10 cancel-unaudited.cgi, 1.10, 1.11 cancel_pkg.cgi, 1.4, 1.5 catchall.cgi, 1.8, 1.9 cdr-import.html, 1.2, 1.3 change_pkg.cgi, 1.1, 1.2 counties.cgi, 1.1, 1.2 cust_main-cancel.cgi, 1.3, 1.4 cust_main-import.cgi, 1.3, 1.4 cust_main-import_charges.cgi, 1.2, 1.3 delete-cust_credit.cgi, 1.1, 1.2 delete-cust_pay.cgi, 1.2, 1.3 delete-customer.cgi, 1.10, 1.11 delete-domain_record.cgi, 1.1, 1.2 delete-part_export.cgi, 1.3, 1.4 download-batch.cgi, 1.11, 1.12 dump.cgi, 1.2, 1.3 email-invoice.cgi, 1.5, 1.6 email_invoice_events.cgi, 1.3, 1.4 email_invoices.cgi, 1.4, 1.5 expire_pkg.cgi, 1.6, 1.7 fax-invoice.cgi, 1.3, 1.4 fax_invoice_events.cgi, 1.3, 1.4 fax_invoices.cgi, 1.4, 1.5 inventory_item-import.html, 1.1, 1.2 link.cgi, 1.10, 1.11 meta-import.cgi, 1.3, 1.4 payment.cgi, 1.7, 1.8 print-invoice.cgi, 1.9, 1.10 print_invoice_events.cgi, 1.3, 1.4 print_invoices.cgi, 1.4, 1.5 queue.cgi, 1.4, 1.5 states.cgi, 1.2, 1.3 susp_pkg.cgi, 1.4, 1.5 unapply-cust_credit.cgi, 1.1, 1.2 unapply-cust_pay.cgi, 1.2, 1.3 unprovision.cgi, 1.2, 1.3 unsusp_pkg.cgi, 1.4, 1.5 unvoid-cust_pay_void.cgi, 1.1, 1.2 upload-batch.cgi, 1.6, 1.7 void-cust_pay.cgi, 1.1, 1.2 whois.cgi, 1.2, 1.3 xmlhttp-cust_main-search.cgi, 1.1, 1.2 xmlrpc.cgi, 1.1, 1.2

Ivan,,, ivan at wavetail.420.am
Wed Aug 23 15:25:40 PDT 2006


Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail:/tmp/cvs-serv18630/httemplate/misc

Modified Files:
	batch-cust_pay.html bill.cgi cancel-unaudited.cgi 
	cancel_pkg.cgi catchall.cgi cdr-import.html change_pkg.cgi 
	counties.cgi cust_main-cancel.cgi cust_main-import.cgi 
	cust_main-import_charges.cgi delete-cust_credit.cgi 
	delete-cust_pay.cgi delete-customer.cgi 
	delete-domain_record.cgi delete-part_export.cgi 
	download-batch.cgi dump.cgi email-invoice.cgi 
	email_invoice_events.cgi email_invoices.cgi expire_pkg.cgi 
	fax-invoice.cgi fax_invoice_events.cgi fax_invoices.cgi 
	inventory_item-import.html link.cgi meta-import.cgi 
	payment.cgi print-invoice.cgi print_invoice_events.cgi 
	print_invoices.cgi queue.cgi states.cgi susp_pkg.cgi 
	unapply-cust_credit.cgi unapply-cust_pay.cgi unprovision.cgi 
	unsusp_pkg.cgi unvoid-cust_pay_void.cgi upload-batch.cgi 
	void-cust_pay.cgi whois.cgi xmlhttp-cust_main-search.cgi 
	xmlrpc.cgi 
Log Message:
Will things ever be the same again?
It's the final masonize


Index: catchall.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/catchall.cgi,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- catchall.cgi	29 Apr 2003 19:49:37 -0000	1.8
+++ catchall.cgi	23 Aug 2006 22:25:38 -0000	1.9
@@ -1,133 +1,134 @@
 <!-- mason kludge -->
-<%
-
-my $conf = new FS::Conf;
-
-my($svc_domain, $svcnum, $pkgnum, $svcpart, $part_svc);
-if ( $cgi->param('error') ) {
-  $svc_domain = new FS::svc_domain ( {
-    map { $_, scalar($cgi->param($_)) } fields('svc_domain')
-  } );
-  $svcnum = $svc_domain->svcnum;
-  $pkgnum = $cgi->param('pkgnum');
-  $svcpart = $cgi->param('svcpart');
-  $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart});
-  die "No part_svc entry!" unless $part_svc;
-} else {
-  my($query) = $cgi->keywords;
-  if ( $query =~ /^(\d+)$/ ) { #editing
-    $svcnum=$1;
-    $svc_domain=qsearchs('svc_domain',{'svcnum'=>$svcnum})
-      or die "Unknown (svc_domain) svcnum!";
-
-    my($cust_svc)=qsearchs('cust_svc',{'svcnum'=>$svcnum})
-      or die "Unknown (cust_svc) svcnum!";
-
-    $pkgnum=$cust_svc->pkgnum;
-    $svcpart=$cust_svc->svcpart;
-  
-    $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart});
-    die "No part_svc entry!" unless $part_svc;
-
-  } else { 
-
-    die "Invalid (svc_domain) svcnum!";
-
-  }
-}
-
-my %email;
-if ($pkgnum) {
-
-  #find all possible user svcnums (and emails)
-
-  #starting with that currently attached
-  if ($svc_domain->catchall) {
-    my($svc_acct)=qsearchs('svc_acct',{'svcnum'=>$svc_domain->catchall});
-    $email{$svc_domain->catchall} = $svc_acct->email;
-  }
-
-  #and including the rest for this customer
-  my($u_part_svc, at u_acct_svcparts);
-  foreach $u_part_svc ( qsearch('part_svc',{'svcdb'=>'svc_acct'}) ) {
-    push @u_acct_svcparts,$u_part_svc->getfield('svcpart');
-  }
-
-  my($cust_pkg)=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
-  my($custnum)=$cust_pkg->getfield('custnum');
-  my($i_cust_pkg);
-  foreach $i_cust_pkg ( qsearch('cust_pkg',{'custnum'=>$custnum}) ) {
-    my($cust_pkgnum)=$i_cust_pkg->getfield('pkgnum');
-    my($acct_svcpart);
-    foreach $acct_svcpart (@u_acct_svcparts) {   #now find the corresponding 
-                                              #record(s) in cust_svc ( for this
-                                              #pkgnum ! )
-      my($i_cust_svc);
-      foreach $i_cust_svc ( qsearch('cust_svc',{'pkgnum'=>$cust_pkgnum,'svcpart'=>$acct_svcpart}) ) {
-        my($svc_acct)=qsearchs('svc_acct',{'svcnum'=>$i_cust_svc->getfield('svcnum')});
-        $email{$svc_acct->getfield('svcnum')}=$svc_acct->email;
-      }  
-    }
-  }
-
-} else {
-
-  my($svc_acct)=qsearchs('svc_acct',{'svcnum'=>$svc_domain->catchall});
-  $email{$svc_domain->catchall} = $svc_acct->email;
-}
-
-# add an absence of a catchall
-$email{''} = "(none)";
-
-my $p1 = popurl(1);
-print header("Domain Catchall Edit", '');
-
-print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
-      "</FONT>"
-  if $cgi->param('error');
-
-print qq!<FORM ACTION="${p1}process/catchall.cgi" METHOD=POST>!;
-
-#display
-
-	#formatting
-	print "<PRE>";
-
-#svcnum
-print qq!<INPUT TYPE="hidden" NAME="svcnum" VALUE="$svcnum">!;
-print qq!Service #<FONT SIZE=+1><B>!, $svcnum ? $svcnum : " (NEW)", "</B></FONT>";
-
-#pkgnum
-print qq!<INPUT TYPE="hidden" NAME="pkgnum" VALUE="$pkgnum">!;
- 
-#svcpart
-print qq!<INPUT TYPE="hidden" NAME="svcpart" VALUE="$svcpart">!;
-
-my($domain,$catchall)=(
-  $svc_domain->domain,
-  $svc_domain->catchall,
-);
-
-print qq!<INPUT TYPE="hidden" NAME="domain" VALUE="$domain">!;
-
-#catchall
-print qq!\n\nMail to <I>(anything)</I>@<B>$domain</B> forwards to <SELECT NAME="catchall" SIZE=1>!;
-foreach $_ (keys %email) {
-  print "<OPTION", $_ eq $catchall ? " SELECTED" : "",
-        qq! VALUE="$_">$email{$_}!;
-}
-print "</SELECT>";
-
-	#formatting
-	print "</PRE>\n";
-
-print qq!<CENTER><INPUT TYPE="submit" VALUE="Submit"></CENTER>!;
-
-print <<END;
-
-    </FORM>
-  </BODY>
-</HTML>
-END
+%
+%
+%my $conf = new FS::Conf;
+%
+%my($svc_domain, $svcnum, $pkgnum, $svcpart, $part_svc);
+%if ( $cgi->param('error') ) {
+%  $svc_domain = new FS::svc_domain ( {
+%    map { $_, scalar($cgi->param($_)) } fields('svc_domain')
+%  } );
+%  $svcnum = $svc_domain->svcnum;
+%  $pkgnum = $cgi->param('pkgnum');
+%  $svcpart = $cgi->param('svcpart');
+%  $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart});
+%  die "No part_svc entry!" unless $part_svc;
+%} else {
+%  my($query) = $cgi->keywords;
+%  if ( $query =~ /^(\d+)$/ ) { #editing
+%    $svcnum=$1;
+%    $svc_domain=qsearchs('svc_domain',{'svcnum'=>$svcnum})
+%      or die "Unknown (svc_domain) svcnum!";
+%
+%    my($cust_svc)=qsearchs('cust_svc',{'svcnum'=>$svcnum})
+%      or die "Unknown (cust_svc) svcnum!";
+%
+%    $pkgnum=$cust_svc->pkgnum;
+%    $svcpart=$cust_svc->svcpart;
+%  
+%    $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart});
+%    die "No part_svc entry!" unless $part_svc;
+%
+%  } else { 
+%
+%    die "Invalid (svc_domain) svcnum!";
+%
+%  }
+%}
+%
+%my %email;
+%if ($pkgnum) {
+%
+%  #find all possible user svcnums (and emails)
+%
+%  #starting with that currently attached
+%  if ($svc_domain->catchall) {
+%    my($svc_acct)=qsearchs('svc_acct',{'svcnum'=>$svc_domain->catchall});
+%    $email{$svc_domain->catchall} = $svc_acct->email;
+%  }
+%
+%  #and including the rest for this customer
+%  my($u_part_svc, at u_acct_svcparts);
+%  foreach $u_part_svc ( qsearch('part_svc',{'svcdb'=>'svc_acct'}) ) {
+%    push @u_acct_svcparts,$u_part_svc->getfield('svcpart');
+%  }
+%
+%  my($cust_pkg)=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
+%  my($custnum)=$cust_pkg->getfield('custnum');
+%  my($i_cust_pkg);
+%  foreach $i_cust_pkg ( qsearch('cust_pkg',{'custnum'=>$custnum}) ) {
+%    my($cust_pkgnum)=$i_cust_pkg->getfield('pkgnum');
+%    my($acct_svcpart);
+%    foreach $acct_svcpart (@u_acct_svcparts) {   #now find the corresponding 
+%                                              #record(s) in cust_svc ( for this
+%                                              #pkgnum ! )
+%      my($i_cust_svc);
+%      foreach $i_cust_svc ( qsearch('cust_svc',{'pkgnum'=>$cust_pkgnum,'svcpart'=>$acct_svcpart}) ) {
+%        my($svc_acct)=qsearchs('svc_acct',{'svcnum'=>$i_cust_svc->getfield('svcnum')});
+%        $email{$svc_acct->getfield('svcnum')}=$svc_acct->email;
+%      }  
+%    }
+%  }
+%
+%} else {
+%
+%  my($svc_acct)=qsearchs('svc_acct',{'svcnum'=>$svc_domain->catchall});
+%  $email{$svc_domain->catchall} = $svc_acct->email;
+%}
+%
+%# add an absence of a catchall
+%$email{''} = "(none)";
+%
+%my $p1 = popurl(1);
+%print header("Domain Catchall Edit", '');
+%
+%print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
+%      "</FONT>"
+%  if $cgi->param('error');
+%
+%print qq!<FORM ACTION="${p1}process/catchall.cgi" METHOD=POST>!;
+%
+%#display
+%
+%	#formatting
+%	print "<PRE>";
+%
+%#svcnum
+%print qq!<INPUT TYPE="hidden" NAME="svcnum" VALUE="$svcnum">!;
+%print qq!Service #<FONT SIZE=+1><B>!, $svcnum ? $svcnum : " (NEW)", "</B></FONT>";
+%
+%#pkgnum
+%print qq!<INPUT TYPE="hidden" NAME="pkgnum" VALUE="$pkgnum">!;
+% 
+%#svcpart
+%print qq!<INPUT TYPE="hidden" NAME="svcpart" VALUE="$svcpart">!;
+%
+%my($domain,$catchall)=(
+%  $svc_domain->domain,
+%  $svc_domain->catchall,
+%);
+%
+%print qq!<INPUT TYPE="hidden" NAME="domain" VALUE="$domain">!;
+%
+%#catchall
+%print qq!\n\nMail to <I>(anything)</I>@<B>$domain</B> forwards to <SELECT NAME="catchall" SIZE=1>!;
+%foreach $_ (keys %email) {
+%  print "<OPTION", $_ eq $catchall ? " SELECTED" : "",
+%        qq! VALUE="$_">$email{$_}!;
+%}
+%print "</SELECT>";
+%
+%	#formatting
+%	print "</PRE>\n";
+%
+%print qq!<CENTER><INPUT TYPE="submit" VALUE="Submit"></CENTER>!;
+%
+%print <<END;
+%
+%    </FORM>
+%  </BODY>
+%</HTML>
+%END
+%
+%
 
-%>

Index: unapply-cust_pay.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/unapply-cust_pay.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- unapply-cust_pay.cgi	23 Oct 2002 15:49:44 -0000	1.2
+++ unapply-cust_pay.cgi	23 Aug 2006 22:25:38 -0000	1.3
@@ -1,18 +1,19 @@
-<%
-
-#untaint paynum
-my($query) = $cgi->keywords;
-$query =~ /^(\d+)$/ || die "Illegal paynum";
-my $paynum = $1;
-
-my $cust_pay = qsearchs('cust_pay', { 'paynum' => $paynum } );
-my $custnum = $cust_pay->custnum;
-
-foreach my $cust_bill_pay ( $cust_pay->cust_bill_pay ) {
-  my $error = $cust_bill_pay->delete;
-  eidiot($error) if $error;
-}
-
-print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
+%
+%
+%#untaint paynum
+%my($query) = $cgi->keywords;
+%$query =~ /^(\d+)$/ || die "Illegal paynum";
+%my $paynum = $1;
+%
+%my $cust_pay = qsearchs('cust_pay', { 'paynum' => $paynum } );
+%my $custnum = $cust_pay->custnum;
+%
+%foreach my $cust_bill_pay ( $cust_pay->cust_bill_pay ) {
+%  my $error = $cust_bill_pay->delete;
+%  eidiot($error) if $error;
+%}
+%
+%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
+%
+%
 
-%>

Index: link.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/link.cgi,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- link.cgi	31 Jan 2006 04:26:54 -0000	1.10
+++ link.cgi	23 Aug 2006 22:25:38 -0000	1.11
@@ -1,73 +1,83 @@
 <!-- mason kludge -->
-<%
-
-my %link_field = (
-  'svc_acct'    => 'username',
-  'svc_domain'  => 'domain',
-);
-
-my %link_field2 = (
-  'svc_acct'    => { label => 'Domain',
-                     field => 'domsvc',
-                     type  => 'select',
-                     select_table => 'svc_domain',
-                     select_key   => 'svcnum',
-                     select_label => 'domain'
-                   },
-);
-
-my($query) = $cgi->keywords;
-my($pkgnum, $svcpart) = ('', '');
-foreach $_ (split(/-/,$query)) { #get & untaint pkgnum & svcpart
-  $pkgnum=$1 if /^pkgnum(\d+)$/;
-  $svcpart=$1 if /^svcpart(\d+)$/;
-}
-
-my $part_svc = qsearchs('part_svc',{'svcpart'=>$svcpart});
-my $svc = $part_svc->getfield('svc');
-my $svcdb = $part_svc->getfield('svcdb');
-my $link_field = $link_field{$svcdb};
-my $link_field2 = $link_field2{$svcdb};
+%
+%
+%my %link_field = (
+%  'svc_acct'    => 'username',
+%  'svc_domain'  => 'domain',
+%);
+%
+%my %link_field2 = (
+%  'svc_acct'    => { label => 'Domain',
+%                     field => 'domsvc',
+%                     type  => 'select',
+%                     select_table => 'svc_domain',
+%                     select_key   => 'svcnum',
+%                     select_label => 'domain'
+%                   },
+%);
+%
+%my($query) = $cgi->keywords;
+%my($pkgnum, $svcpart) = ('', '');
+%foreach $_ (split(/-/,$query)) { #get & untaint pkgnum & svcpart
+%  $pkgnum=$1 if /^pkgnum(\d+)$/;
+%  $svcpart=$1 if /^svcpart(\d+)$/;
+%}
+%
+%my $part_svc = qsearchs('part_svc',{'svcpart'=>$svcpart});
+%my $svc = $part_svc->getfield('svc');
+%my $svcdb = $part_svc->getfield('svcdb');
+%my $link_field = $link_field{$svcdb};
+%my $link_field2 = $link_field2{$svcdb};
+%
+%
 
-%>
 
-<%= include("/elements/header.html","Link to existing $svc") %>
-<FORM ACTION="<%= popurl(1) %>process/link.cgi" METHOD=POST>
+<% include("/elements/header.html","Link to existing $svc") %>
+<FORM ACTION="<% popurl(1) %>process/link.cgi" METHOD=POST>
+% if ( $link_field ) { 
 
-<% if ( $link_field ) { %>
   <INPUT TYPE="hidden" NAME="svcnum" VALUE="">
-  <INPUT TYPE="hidden" NAME="link_field" VALUE="<%= $link_field %>">
-  <%= $link_field %> of existing service: <INPUT TYPE="text" NAME="link_value">
+  <INPUT TYPE="hidden" NAME="link_field" VALUE="<% $link_field %>">
+  <% $link_field %> of existing service: <INPUT TYPE="text" NAME="link_value">
   <BR>
-  <% if ( $link_field2 ) { %>
-    <INPUT TYPE="hidden" NAME="link_field2" VALUE="<%= $link_field2->{field} %>">
-    <%= $link_field2->{'label'} %> of existing service: 
-    <% if ( $link_field2->{'type'} eq 'select' ) { %>
-      <% if ( $link_field2->{'select_table'} ) { %>
+% if ( $link_field2 ) { 
+
+    <INPUT TYPE="hidden" NAME="link_field2" VALUE="<% $link_field2->{field} %>">
+    <% $link_field2->{'label'} %> of existing service: 
+% if ( $link_field2->{'type'} eq 'select' ) { 
+% if ( $link_field2->{'select_table'} ) { 
+
         <SELECT NAME="link_value2">
         <OPTION> </OPTION>
-        <% foreach my $r ( qsearch( $link_field2->{'select_table'}, {})) { %>
-          <% my $key = $link_field2->{'select_key'}; %>
-          <% my $label = $link_field2->{'select_label'}; %>
-          <OPTION VALUE="<%= $r->$key() %>"><%= $r->$label() %></OPTION>
-        <% } %>
+% foreach my $r ( qsearch( $link_field2->{'select_table'}, {})) { 
+% my $key = $link_field2->{'select_key'}; 
+% my $label = $link_field2->{'select_label'}; 
+
+          <OPTION VALUE="<% $r->$key() %>"><% $r->$label() %></OPTION>
+% } 
+
         </SELECT>
-      <% } else { %>
-        Don't know how to process secondary link field for <%= $svcdb %>
+% } else { 
+
+        Don't know how to process secondary link field for <% $svcdb %>
         (type=>select but no select_table)
-      <% } %>
-    <% } else { %>
-      Don't know how to process secondary link field for <%= $svcdb %>
-        (unknown type <%= $link_field2->{'type'} %>)
-    <% } %>
+% } 
+% } else { 
+
+      Don't know how to process secondary link field for <% $svcdb %>
+        (unknown type <% $link_field2->{'type'} %>)
+% } 
+
     <BR>
-  <% } %>
-<% } else { %>
+% } 
+% } else { 
+
   Service # of existing service: <INPUT TYPE="text" NAME="svcnum" VALUE="">
-<% } %>
+% } 
 
-<INPUT TYPE="hidden" NAME="pkgnum" VALUE="<%= $pkgnum %>">
-<INPUT TYPE="hidden" NAME="svcpart" VALUE="<%= $svcpart %>">
+
+<INPUT TYPE="hidden" NAME="pkgnum" VALUE="<% $pkgnum %>">
+<INPUT TYPE="hidden" NAME="svcpart" VALUE="<% $svcpart %>">
 <BR><INPUT TYPE="submit" VALUE="Link">
     </FORM>
   </BODY>

Index: email_invoice_events.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/email_invoice_events.cgi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- email_invoice_events.cgi	11 Mar 2006 05:21:20 -0000	1.3
+++ email_invoice_events.cgi	23 Aug 2006 22:25:38 -0000	1.4
@@ -1,3 +1,4 @@
-<%
-my $server = new FS::UI::Web::JSRPC 'FS::cust_bill_event::process_reemail', $cgi;
-%><%= $server->process %>
+%
+%my $server = new FS::UI::Web::JSRPC 'FS::cust_bill_event::process_reemail', $cgi;
+%
+<% $server->process %>

Index: bill.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/bill.cgi,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- bill.cgi	22 Jun 2003 14:21:57 -0000	1.9
+++ bill.cgi	23 Aug 2006 22:25:38 -0000	1.10
@@ -1,38 +1,40 @@
-<%
-
-#untaint custnum
-my($query) = $cgi->keywords;
-$query =~ /^(\d*)$/;
-my $custnum = $1;
-my $cust_main = qsearchs('cust_main',{'custnum'=>$custnum});
-die "Can't find customer!\n" unless $cust_main;
-
-my $error = $cust_main->bill(
-#                          'time'=>$time
-                         );
-#&eidiot($error) if $error;
-
-unless ( $error ) {
-  $cust_main->apply_payments;
-  $cust_main->apply_credits;
-
-  $error = $cust_main->collect(
-  #                             'invoice-time'=>$time,
-                               #'batch_card'=> 'yes',
-                               #'batch_card'=> 'no',
-                               #'report_badcard'=> 'yes',
-                               #'retry_card' => 'yes',
-                               'retry' => 'yes',
-                              );
-}
-#&eidiot($error) if $error;
+%
+%
+%#untaint custnum
+%my($query) = $cgi->keywords;
+%$query =~ /^(\d*)$/;
+%my $custnum = $1;
+%my $cust_main = qsearchs('cust_main',{'custnum'=>$custnum});
+%die "Can't find customer!\n" unless $cust_main;
+%
+%my $error = $cust_main->bill(
+%#                          'time'=>$time
+%                         );
+%#&eidiot($error) if $error;
+%
+%unless ( $error ) {
+%  $cust_main->apply_payments;
+%  $cust_main->apply_credits;
+%
+%  $error = $cust_main->collect(
+%  #                             'invoice-time'=>$time,
+%                               #'batch_card'=> 'yes',
+%                               #'batch_card'=> 'no',
+%                               #'report_badcard'=> 'yes',
+%                               #'retry_card' => 'yes',
+%                               'retry' => 'yes',
+%                              );
+%}
+%#&eidiot($error) if $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");
+%}
+%
+

Index: unapply-cust_credit.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/unapply-cust_credit.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- unapply-cust_credit.cgi	12 Mar 2004 12:39:57 -0000	1.1
+++ unapply-cust_credit.cgi	23 Aug 2006 22:25:38 -0000	1.2
@@ -1,18 +1,19 @@
-<%
-
-#untaint crednum
-my($query) = $cgi->keywords;
-$query =~ /^(\d+)$/ || die "Illegal crednum";
-my $crednum = $1;
-
-my $cust_credit = qsearchs('cust_credit', { 'crednum' => $crednum } );
-my $custnum = $cust_credit->custnum;
-
-foreach my $cust_credit_bill ( $cust_credit->cust_credit_bill ) {
-  my $error = $cust_credit_bill->delete;
-  eidiot($error) if $error;
-}
-
-print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
+%
+%
+%#untaint crednum
+%my($query) = $cgi->keywords;
+%$query =~ /^(\d+)$/ || die "Illegal crednum";
+%my $crednum = $1;
+%
+%my $cust_credit = qsearchs('cust_credit', { 'crednum' => $crednum } );
+%my $custnum = $cust_credit->custnum;
+%
+%foreach my $cust_credit_bill ( $cust_credit->cust_credit_bill ) {
+%  my $error = $cust_credit_bill->delete;
+%  eidiot($error) if $error;
+%}
+%
+%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
+%
+%
 
-%>

Index: print_invoice_events.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/print_invoice_events.cgi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- print_invoice_events.cgi	11 Mar 2006 05:21:20 -0000	1.3
+++ print_invoice_events.cgi	23 Aug 2006 22:25:38 -0000	1.4
@@ -1,3 +1,4 @@
-<%
-my $server = new FS::UI::Web::JSRPC 'FS::cust_bill_event::process_reprint', $cgi; %>
-<%= $server->process %>
+%
+%my $server = new FS::UI::Web::JSRPC 'FS::cust_bill_event::process_reprint', $cgi; 
+
+<% $server->process %>

Index: dump.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/dump.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- dump.cgi	21 Jan 2004 23:45:03 -0000	1.2
+++ dump.cgi	23 Aug 2006 22:25:38 -0000	1.3
@@ -1,19 +1,20 @@
-<%
-  if ( driver_name =~ /^Pg$/ ) {
-    my $dbname = (split(':', datasrc))[2];
-    if ( $dbname =~ /[;=]/ ) {
-      my %elements = map { /^(\w+)=(.*)$/; $1=>$2 } split(';', $dbname);
-      $dbname = $elements{'dbname'};
-    }
-    open(DUMP,"pg_dump $dbname |");
-  } else {
-    eidiot "don't (yet) know how to dump ". driver_name. " databases\n";
-  }
-
-  http_header('Content-Type' => 'text/plain' );
+%
+%  if ( driver_name =~ /^Pg$/ ) {
+%    my $dbname = (split(':', datasrc))[2];
+%    if ( $dbname =~ /[;=]/ ) {
+%      my %elements = map { /^(\w+)=(.*)$/; $1=>$2 } split(';', $dbname);
+%      $dbname = $elements{'dbname'};
+%    }
+%    open(DUMP,"pg_dump $dbname |");
+%  } else {
+%    eidiot "don't (yet) know how to dump ". driver_name. " databases\n";
+%  }
+%
+%  http_header('Content-Type' => 'text/plain' );
+%
+%  while (<DUMP>) {
+%    print $_;
+%  }
+%  close DUMP;
+%
 
-  while (<DUMP>) {
-    print $_;
-  }
-  close DUMP;
-%>

Index: email_invoices.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/email_invoices.cgi,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- email_invoices.cgi	11 Mar 2006 05:21:20 -0000	1.4
+++ email_invoices.cgi	23 Aug 2006 22:25:38 -0000	1.5
@@ -1,3 +1,4 @@
-<%
-my $server = new FS::UI::Web::JSRPC 'FS::cust_bill::process_reemail', $cgi;
-%><%= $server->process %>
+%
+%my $server = new FS::UI::Web::JSRPC 'FS::cust_bill::process_reemail', $cgi;
+%
+<% $server->process %>

Index: states.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/states.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- states.cgi	3 Apr 2006 09:46:57 -0000	1.2
+++ states.cgi	23 Aug 2006 22:25:38 -0000	1.3
@@ -1,6 +1,7 @@
-<%
-
-  my $country = $cgi->param('arg');
-  my @output = states_hash($country);
-
-%>[ <%= join(', ', map { qq("$_") } @output) %> ]
+%
+%
+%  my $country = $cgi->param('arg');
+%  my @output = states_hash($country);
+%
+%
+[ <% join(', ', map { qq("$_") } @output) %> ]

Index: print_invoices.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/print_invoices.cgi,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- print_invoices.cgi	11 Mar 2006 05:21:20 -0000	1.4
+++ print_invoices.cgi	23 Aug 2006 22:25:38 -0000	1.5
@@ -1,3 +1,4 @@
-<% 
-my $server = new FS::UI::Web::JSRPC 'FS::cust_bill::process_reprint', $cgi;
-%><%= $server->process %>
+% 
+%my $server = new FS::UI::Web::JSRPC 'FS::cust_bill::process_reprint', $cgi;
+%
+<% $server->process %>

Index: fax_invoice_events.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/fax_invoice_events.cgi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- fax_invoice_events.cgi	11 Mar 2006 05:21:20 -0000	1.3
+++ fax_invoice_events.cgi	23 Aug 2006 22:25:38 -0000	1.4
@@ -1,3 +1,4 @@
-<% 
-my $server = new FS::UI::Web::JSRPC 'FS::cust_bill_event::process_refax', $cgi;
-%><%= $server->process %>
+% 
+%my $server = new FS::UI::Web::JSRPC 'FS::cust_bill_event::process_refax', $cgi;
+%
+<% $server->process %>

Index: email-invoice.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/email-invoice.cgi,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- email-invoice.cgi	2 Jun 2005 09:29:52 -0000	1.5
+++ email-invoice.cgi	23 Aug 2006 22:25:38 -0000	1.6
@@ -1,17 +1,18 @@
-<%
-
-#untaint invnum
-my($query) = $cgi->keywords;
-$query =~ /^((.+)-)?(\d+)$/;
-my $template = $2;
-my $invnum = $3;
-my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
-die "Can't find invoice!\n" unless $cust_bill;
-
-$cust_bill->email($template); 
-
-my $custnum = $cust_bill->getfield('custnum');
-
-print $cgi->redirect("${p}view/cust_main.cgi?$custnum");
+%
+%
+%#untaint invnum
+%my($query) = $cgi->keywords;
+%$query =~ /^((.+)-)?(\d+)$/;
+%my $template = $2;
+%my $invnum = $3;
+%my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
+%die "Can't find invoice!\n" unless $cust_bill;
+%
+%$cust_bill->email($template); 
+%
+%my $custnum = $cust_bill->getfield('custnum');
+%
+%print $cgi->redirect("${p}view/cust_main.cgi?$custnum");
+%
+%
 
-%>

Index: meta-import.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/meta-import.cgi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- meta-import.cgi	31 Jan 2006 04:26:54 -0000	1.3
+++ meta-import.cgi	23 Aug 2006 22:25:38 -0000	1.4
@@ -1,45 +1,54 @@
 <!-- mason kludge -->
-<%= include("/elements/header.html",'Import') %>
+<% include("/elements/header.html",'Import') %>
 <FORM ACTION="process/meta-import.cgi" METHOD="post" ENCTYPE="multipart/form-data">
 Import data from a DBI data source<BR><BR>
+%
+%  #false laziness with edit/cust_main.cgi
+%  my @agents = qsearch( 'agent', {} );
+%  die "No agents created!" unless @agents;
+%  my $agentnum = $agents[0]->agentnum; #default to first
+%
+%  if ( scalar(@agents) == 1 ) {
+%
 
-<%
-  #false laziness with edit/cust_main.cgi
-  my @agents = qsearch( 'agent', {} );
-  die "No agents created!" unless @agents;
-  my $agentnum = $agents[0]->agentnum; #default to first
+    <INPUT TYPE="hidden" NAME="agentnum" VALUE="<% $agentnum %>">
+% } else { 
 
-  if ( scalar(@agents) == 1 ) {
-%>
-    <INPUT TYPE="hidden" NAME="agentnum" VALUE="<%= $agentnum %>">
-<% } else { %>
     <BR><BR>Agent <SELECT NAME="agentnum" SIZE="1">
-  <% foreach my $agent (sort { $a->agent cmp $b->agent } @agents) { %>
-    <OPTION VALUE="<%= $agent->agentnum %>" <%= " SELECTED"x($agent->agentnum==$agentnum) %>><%= $agent->agent %></OPTION>
-  <% } %>
+% foreach my $agent (sort { $a->agent cmp $b->agent } @agents) { 
+
+    <OPTION VALUE="<% $agent->agentnum %>" <% " SELECTED"x($agent->agentnum==$agentnum) %>><% $agent->agent %></OPTION>
+% } 
+
     </SELECT><BR><BR>
-<% } %>
+% } 
+%
+%  my @referrals = qsearch('part_referral',{});
+%  die "No advertising sources created!" unless @referrals;
+%  my $refnum = $referrals[0]->refnum; #default to first
+%
+%  if ( scalar(@referrals) == 1 ) {
+%
 
-<%
-  my @referrals = qsearch('part_referral',{});
-  die "No advertising sources created!" unless @referrals;
-  my $refnum = $referrals[0]->refnum; #default to first
+    <INPUT TYPE="hidden" NAME="refnum" VALUE="<% $refnum %>">
+% } else { 
 
-  if ( scalar(@referrals) == 1 ) {
-%>
-    <INPUT TYPE="hidden" NAME="refnum" VALUE="<%= $refnum %>">
-<% } else { %>
     <BR><BR>Advertising source <SELECT NAME="refnum" SIZE="1">
-  <% foreach my $referral ( sort { $a->referral <=> $b->referral } @referrals) { %>
-    <OPTION VALUE="<%= $referral->refnum %>" <%= " SELECTED"x($referral->refnum==$refnum) %>><%= $referral->refnum %>: <%= $referral->referral %></OPTION>
-  <% } %>
+% foreach my $referral ( sort { $a->referral <=> $b->referral } @referrals) { 
+
+    <OPTION VALUE="<% $referral->refnum %>" <% " SELECTED"x($referral->refnum==$refnum) %>><% $referral->refnum %>: <% $referral->referral %></OPTION>
+% } 
+
     </SELECT><BR><BR>
-<% } %>
+% } 
+
 
     First package: <SELECT NAME="pkgpart"><OPTION VALUE="">(none)</OPTION>
-<% foreach my $part_pkg ( qsearch('part_pkg',{'disabled'=>'' }) ) { %>
-     <OPTION VALUE="<%= $part_pkg->pkgpart %>"><%= $part_pkg->pkg. ' - '. $part_pkg->comment %></OPTION>
-<% } %>
+% foreach my $part_pkg ( qsearch('part_pkg',{'disabled'=>'' }) ) { 
+
+     <OPTION VALUE="<% $part_pkg->pkgpart %>"><% $part_pkg->pkg. ' - '. $part_pkg->comment %></OPTION>
+% } 
+
 </SELECT><BR><BR>
 
   <table>

Index: upload-batch.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/upload-batch.cgi,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- upload-batch.cgi	25 Mar 2006 02:23:26 -0000	1.6
+++ upload-batch.cgi	23 Aug 2006 22:25:38 -0000	1.7
@@ -1,30 +1,34 @@
-<%
-
-  my $fh = $cgi->upload('batch_results');
-  my $filename = $cgi->param('batch_results');
-  $filename =~ /^(.*[\/\\])?([^\/\\]+)$/
-    or die "unparsable filename: $filename\n";
-  my $paybatch = $2;
-
-  my $error = defined($fh)
-    ? FS::cust_pay_batch::import_results( {
-        'filehandle' => $fh,
-        'format'     => $cgi->param('format'),
-        'paybatch'   => $paybatch,
-      } )
-    : 'No file';
+%
+%
+%  my $fh = $cgi->upload('batch_results');
+%  my $filename = $cgi->param('batch_results');
+%  $filename =~ /^(.*[\/\\])?([^\/\\]+)$/
+%    or die "unparsable filename: $filename\n";
+%  my $paybatch = $2;
+%
+%  my $error = defined($fh)
+%    ? FS::cust_pay_batch::import_results( {
+%        'filehandle' => $fh,
+%        'format'     => $cgi->param('format'),
+%        'paybatch'   => $paybatch,
+%      } )
+%    : 'No file';
+%
+%  if ( $error ) {
+%    
 
-  if ( $error ) {
-    %>
     <!-- mason kludge -->
-    <%
-    eidiot($error);
-#    $cgi->param('error', $error);
-#    print $cgi->redirect( "${p}cust_main-import.cgi
-  } else {
-    %>
+%
+%    eidiot($error);
+%#    $cgi->param('error', $error);
+%#    print $cgi->redirect( "${p}cust_main-import.cgi
+%  } else {
+%    
+
     <!-- mason kludge -->
-    <%= include("/elements/header.html",'Batch results upload successful') %> <%
-  }
-%>
+    <% include("/elements/header.html",'Batch results upload successful') %> 
+%
+%  }
+%
+
 

Index: cdr-import.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/cdr-import.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cdr-import.html	12 Jul 2006 00:20:21 -0000	1.2
+++ cdr-import.html	23 Aug 2006 22:25:38 -0000	1.3
@@ -1,4 +1,4 @@
-<%= include("/elements/header.html",'Call Detail Record Import') %>
+<% include("/elements/header.html",'Call Detail Record Import') %>
 <FORM ACTION="process/cdr-import.html" METHOD="POST" ENCTYPE="multipart/form-data">
 Import a CSV file containing Call Detail Records (CDRs).<BR><BR>
 CDR Format: <SELECT NAME="format">
@@ -12,5 +12,5 @@
 <INPUT TYPE="submit" VALUE="Upload">
 </FORM>
 
-<%= include('/elements/footer.html') %>
+<% include('/elements/footer.html') %>
 

Index: cust_main-import_charges.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/cust_main-import_charges.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cust_main-import_charges.cgi	31 Jan 2006 04:26:54 -0000	1.2
+++ cust_main-import_charges.cgi	23 Aug 2006 22:25:38 -0000	1.3
@@ -1,5 +1,5 @@
 <!-- mason kludge -->
-<%= include("/elements/header.html",'Batch Customer Charge') %>
+<% include("/elements/header.html",'Batch Customer Charge') %>
 <FORM ACTION="process/cust_main-import_charges.cgi" METHOD="post" ENCTYPE="multipart/form-data">
 Import a CSV file containing customer charges.<BR><BR>
 Default file format is CSV, with the following field order: <i>custnum, amount, description</i><BR><BR>

Index: expire_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/expire_pkg.cgi,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- expire_pkg.cgi	31 Jan 2006 04:26:54 -0000	1.6
+++ expire_pkg.cgi	23 Aug 2006 22:25:38 -0000	1.7
@@ -1,22 +1,23 @@
 <!-- mason kludge -->
-<%
-
-my($query) = $cgi->keywords;
-$query =~ /^(\d+)$/;
-my $pkgnum = $1;
-
-#get package record
-my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
-die "Unknown pkgnum $pkgnum" unless $cust_pkg;
-my $part_pkg = $cust_pkg->part_pkg;
-
-my $custnum = $cust_pkg->getfield('custnum');
-
-my $date = $cust_pkg->expire ? time2str('%D', $cust_pkg->expire) : '';
+%
+%
+%my($query) = $cgi->keywords;
+%$query =~ /^(\d+)$/;
+%my $pkgnum = $1;
+%
+%#get package record
+%my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
+%die "Unknown pkgnum $pkgnum" unless $cust_pkg;
+%my $part_pkg = $cust_pkg->part_pkg;
+%
+%my $custnum = $cust_pkg->getfield('custnum');
+%
+%my $date = $cust_pkg->expire ? time2str('%D', $cust_pkg->expire) : '';
+%
+%
 
-%>
 
-<%= include("/elements/header.html",'Expire package', menubar(
+<% include("/elements/header.html",'Expire package', menubar(
   "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
   'Main Menu' => popurl(2)
 )) %>
@@ -26,15 +27,15 @@
 <SCRIPT TYPE="text/javascript" SRC="../elements/calendar-en.js"></SCRIPT>
 <SCRIPT TYPE="text/javascript" SRC="../elements/calendar-setup.js"></SCRIPT>
 
-<%= $pkgnum %>: <%= $part_pkg->pkg. ' - '. $part_pkg->comment %>
+<% $pkgnum %>: <% $part_pkg->pkg. ' - '. $part_pkg->comment %>
 
 <FORM NAME="formname" ACTION="process/expire_pkg.cgi" METHOD="post">
-<INPUT TYPE="hidden" NAME="pkgnum" VALUE="<%= $pkgnum %>">
+<INPUT TYPE="hidden" NAME="pkgnum" VALUE="<% $pkgnum %>">
 <TABLE>
   <TR>
     <TD>Cancel package on </TD>
-    <TD><INPUT TYPE="text" NAME="date" ID="expire_date" VALUE="<%= $date %>">
-        <IMG SRC="<%= $p %>images/calendar.png" ID="expire_button" STYLE="cursor:pointer" TITLE="Select date">
+    <TD><INPUT TYPE="text" NAME="date" ID="expire_date" VALUE="<% $date %>">
+        <IMG SRC="<% $p %>images/calendar.png" ID="expire_button" STYLE="cursor:pointer" TITLE="Select date">
         <BR><I>m/d/y</I>
     </TD>
   </TR>

Index: delete-cust_credit.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/delete-cust_credit.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- delete-cust_credit.cgi	9 Jan 2004 22:11:54 -0000	1.1
+++ delete-cust_credit.cgi	23 Aug 2006 22:25:38 -0000	1.2
@@ -1,16 +1,17 @@
-<%
-
-#untaint crednum
-my($query) = $cgi->keywords;
-$query =~ /^(\d+)$/ || die "Illegal crednum";
-my $crednum = $1;
-
-my $cust_credit = qsearchs('cust_credit',{'crednum'=>$crednum});
-my $custnum = $cust_credit->custnum;
-
-my $error = $cust_credit->delete;
-eidiot($error) if $error;
-
-print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
+%
+%
+%#untaint crednum
+%my($query) = $cgi->keywords;
+%$query =~ /^(\d+)$/ || die "Illegal crednum";
+%my $crednum = $1;
+%
+%my $cust_credit = qsearchs('cust_credit',{'crednum'=>$crednum});
+%my $custnum = $cust_credit->custnum;
+%
+%my $error = $cust_credit->delete;
+%eidiot($error) if $error;
+%
+%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
+%
+%
 
-%>

Index: cancel_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/cancel_pkg.cgi,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- cancel_pkg.cgi	10 Feb 2002 13:21:31 -0000	1.4
+++ cancel_pkg.cgi	23 Aug 2006 22:25:38 -0000	1.5
@@ -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'));
+%
+%
 
-%>

Index: susp_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/susp_pkg.cgi,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- susp_pkg.cgi	10 Feb 2002 13:21:31 -0000	1.4
+++ susp_pkg.cgi	23 Aug 2006 22:25:38 -0000	1.5
@@ -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->suspend;
-&eidiot($error) if $error;
-
-print $cgi->redirect(popurl(2). "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->suspend;
+%&eidiot($error) if $error;
+%
+%print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum'));
+%
+%
 
-%>

Index: fax_invoices.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/fax_invoices.cgi,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- fax_invoices.cgi	11 Mar 2006 05:21:20 -0000	1.4
+++ fax_invoices.cgi	23 Aug 2006 22:25:38 -0000	1.5
@@ -1,3 +1,4 @@
-<% 
-my $server = new FS::UI::Web::JSRPC 'FS::cust_bill::process_refax', $cgi;
-%><%= $server->process %>
+% 
+%my $server = new FS::UI::Web::JSRPC 'FS::cust_bill::process_refax', $cgi;
+%
+<% $server->process %>

Index: cust_main-cancel.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/cust_main-cancel.cgi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- cust_main-cancel.cgi	27 Aug 2005 08:46:58 -0000	1.3
+++ cust_main-cancel.cgi	23 Aug 2006 22:25:38 -0000	1.4
@@ -1,22 +1,23 @@
-<%
-
-my $custnum;
-my $ban = '';
-if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
-  $custnum = $1;
-  $ban = $cgi->param('ban');
-} else {
-  my($query) = $cgi->keywords;
-  $query =~ /^(\d+)$/ || die "Illegal custnum";
-  $custnum = $1;
-}
-
-my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } );
-
-my @errors = $cust_main->cancel( 'ban' => $ban );
-eidiot(join(' / ', @errors)) if scalar(@errors);
-
-#print $cgi->redirect($p. "view/cust_main.cgi?". $cust_main->custnum);
-print $cgi->redirect($p);
+%
+%
+%my $custnum;
+%my $ban = '';
+%if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
+%  $custnum = $1;
+%  $ban = $cgi->param('ban');
+%} else {
+%  my($query) = $cgi->keywords;
+%  $query =~ /^(\d+)$/ || die "Illegal custnum";
+%  $custnum = $1;
+%}
+%
+%my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } );
+%
+%my @errors = $cust_main->cancel( 'ban' => $ban );
+%eidiot(join(' / ', @errors)) if scalar(@errors);
+%
+%#print $cgi->redirect($p. "view/cust_main.cgi?". $cust_main->custnum);
+%print $cgi->redirect($p);
+%
+%
 
-%>

Index: batch-cust_pay.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/batch-cust_pay.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- batch-cust_pay.html	23 Aug 2006 21:53:40 -0000	1.6
+++ batch-cust_pay.html	23 Aug 2006 22:25:38 -0000	1.7
@@ -1,14 +1,15 @@
-<%= include("/elements/header.html", 'Quick payment entry',
+<% include("/elements/header.html", 'Quick payment entry',
             menubar(
                      'Main Menu' => $p, #popurl(1),
                    ),
             ( $cgi->param('error') ? '' : 'onload="addRow()"' ),
           )
 %>
+% if ( $cgi->param('error') ) { 
+
+  <FONT SIZE="+1" COLOR="#ff0000"><% $cgi->param('error') %></FONT><BR><BR>
+% } 
 
-<% if ( $cgi->param('error') ) { %>
-  <FONT SIZE="+1" COLOR="#ff0000"><%= $cgi->param('error') %></FONT><BR><BR>
-<% } %>
 
 
 <FORM ACTION="process/batch-cust_pay.cgi" NAME="OneTrueForm" METHOD="POST" onsubmit="document.OneTrueForm.submit.disabled=true;">
@@ -237,60 +238,60 @@
   <TH>Check #</TH>
   <TH BGCOLOR="#e8e8e8"></TH>
 </TR>
+% my $row = 0;
+%   if ( $cgi->param('error') ) {
+%     my $param = $cgi->Vars;
+%
+% for ( $row = 0; exists($param->{"custnum$row"}); $row++ ) { 
 
-<% my $row = 0;
-   if ( $cgi->param('error') ) {
-     my $param = $cgi->Vars;
-%>
-
-  <% for ( $row = 0; exists($param->{"custnum$row"}); $row++ ) { %>
 
     <TR>
 
       <TD>
-        <INPUT TYPE="text" NAME="custnum<%= $row %>" ID="custnum<%= $row %>" SIZE=8 MAXLENGTH=12 VALUE="<%= $param->{"custnum$row"} %>" rownum="<%= $row %>">
+        <INPUT TYPE="text" NAME="custnum<% $row %>" ID="custnum<% $row %>" SIZE=8 MAXLENGTH=12 VALUE="<% $param->{"custnum$row"} %>" rownum="<% $row %>">
           <SCRIPT TYPE="text/javascript">
-            var custnum_input<%= $row %> = document.getElementById("custnum<%= $row %>");
-            custnum_input<%= $row %>.onfocus = clearhint_custnum;
-            custnum_input<%= $row %>.onchange = search_custnum;
+            var custnum_input<% $row %> = document.getElementById("custnum<% $row %>");
+            custnum_input<% $row %>.onfocus = clearhint_custnum;
+            custnum_input<% $row %>.onchange = search_custnum;
           </SCRIPT>
       </TD>
 
       <TD>
-        <INPUT TYPE="text" NAME="customer<%= $row %>" ID="customer<%= $row %>" SIZE=64 VALUE="<%= $param->{"customer$row"} %>" rownum="<%= $row %>">
+        <INPUT TYPE="text" NAME="customer<% $row %>" ID="customer<% $row %>" SIZE=64 VALUE="<% $param->{"customer$row"} %>" rownum="<% $row %>">
           <SCRIPT TYPE="text/javascript">
-            var customer_input<%= $row %> = document.getElementById("customer<%= $row %>");
-            customer_input<%= $row %>.onfocus = clearhint_customer;
-            customer_input<%= $row %>.onclick = clearhint_customer;
-            customer_input<%= $row %>.onchange = search_customer;
+            var customer_input<% $row %> = document.getElementById("customer<% $row %>");
+            customer_input<% $row %>.onfocus = clearhint_customer;
+            customer_input<% $row %>.onclick = clearhint_customer;
+            customer_input<% $row %>.onchange = search_customer;
           </SCRIPT>
-        <SELECT NAME="cust_select<%= $row %>" ID="cust_select<%= $row %>" rownum="<%= $row %>" STYLE="color:#ff0000; display:none">
+        <SELECT NAME="cust_select<% $row %>" ID="cust_select<% $row %>" rownum="<% $row %>" STYLE="color:#ff0000; display:none">
         </SELECT>
           <SCRIPT TYPE="text/javascript">
-            var customer_select<%= $row %> = document.getElementById("cust_select<%= $row %>");
-            customer_select<%= $row %>.onchange = select_customer;
+            var customer_select<% $row %> = document.getElementById("cust_select<% $row %>");
+            customer_select<% $row %>.onchange = select_customer;
           </SCRIPT>
       </TD>
 
       <TD>
-        $<INPUT TYPE="text" NAME="paid<%= $row %>" SIZE=8 MAXLENGTH=8 VALUE="<%= $param->{"paid$row"} %>" >
+        $<INPUT TYPE="text" NAME="paid<% $row %>" SIZE=8 MAXLENGTH=8 VALUE="<% $param->{"paid$row"} %>" >
       </TD>
 
       <TD>
-        <INPUT TYPE="text" NAME="payinfo<%= $row %>" SIZE=10 VALUE="<%= $param->{"payinfo$row"} %>" >
+        <INPUT TYPE="text" NAME="payinfo<% $row %>" SIZE=10 VALUE="<% $param->{"payinfo$row"} %>" >
       </TD>
 
       <TD BGCOLOR="#e8e8e8">
-      <% if ( $param->{"error$row"} ) { %>
-        <FONT SIZE="-1" COLOR="#ff0000">Error: <%= $param->{"error$row"} %></FONT>
-      <% } %>
+% if ( $param->{"error$row"} ) { 
+
+        <FONT SIZE="-1" COLOR="#ff0000">Error: <% $param->{"error$row"} %></FONT>
+% } 
+
       </TD>
 
     </TR>
+% } 
+% } 
 
-  <% } %>
-
-<% } %>
 
 </TABLE>
 
@@ -303,7 +304,7 @@
 </FORM>
 
 
-<%= include('/elements/xmlhttp.html',
+<% include('/elements/xmlhttp.html',
               'url'  => $p. 'misc/xmlhttp-cust_main-search.cgi',
               'subs' => [qw( custnum_search smart_search )],
            )
@@ -311,7 +312,7 @@
 
 <SCRIPT TYPE="text/javascript">
 
-  var rownum = <%= $row %>;
+  var rownum = <% $row %>;
 
   function addRow() {
 

Index: queue.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/queue.cgi,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- queue.cgi	21 Apr 2006 12:45:29 -0000	1.4
+++ queue.cgi	23 Aug 2006 22:25:38 -0000	1.5
@@ -1,47 +1,48 @@
-<%
-
-$cgi->param('action') =~ /^(new|del|(retry|remove) selected)$/
-  or die "Illegal action";
-my $action = $1;
-
-my $job;
-if ( $action eq 'new' || $action eq 'del' ) {
-  $cgi->param('jobnum') =~ /^(\d+)$/ or die "Illegal jobnum";
-  my $jobnum = $1;
-  $job = qsearchs('queue', { 'jobnum' => $1 })
-    or die "unknown jobnum $jobnum - ".
-           "it probably completed normally or was removed by another user";
-}
-
-if ( $action eq 'new' ) {
-  my %hash = $job->hash;
-  $hash{'status'} = 'new';
-  $hash{'statustext'} = '';
-  my $new = new FS::queue \%hash;
-  my $error = $new->replace($job);
-  die $error if $error;
-} elsif ( $action eq 'del' ) {
-  my $error = $job->delete;
-  die $error if $error;
-} elsif ( $action =~ /^(retry|remove) selected$/ ) {
-  foreach my $jobnum (
-    map { /^jobnum(\d+)$/; $1; } grep /^jobnum\d+$/, $cgi->param
-  ) {
-    my $job = qsearchs('queue', { 'jobnum' => $jobnum });
-    if ( $action eq 'retry selected' && $job ) { #new
-      my %hash = $job->hash;
-      $hash{'status'} = 'new';
-      $hash{'statustext'} = '';
-      my $new = new FS::queue \%hash;
-      my $error = $new->replace($job);
-      die $error if $error;
-    } elsif ( $action eq 'remove selected' && $job ) { #del
-      my $error = $job->delete;
-      die $error if $error;
-    }
-  }
-}
-
-print $cgi->redirect(popurl(2). "search/queue.html");
+%
+%
+%$cgi->param('action') =~ /^(new|del|(retry|remove) selected)$/
+%  or die "Illegal action";
+%my $action = $1;
+%
+%my $job;
+%if ( $action eq 'new' || $action eq 'del' ) {
+%  $cgi->param('jobnum') =~ /^(\d+)$/ or die "Illegal jobnum";
+%  my $jobnum = $1;
+%  $job = qsearchs('queue', { 'jobnum' => $1 })
+%    or die "unknown jobnum $jobnum - ".
+%           "it probably completed normally or was removed by another user";
+%}
+%
+%if ( $action eq 'new' ) {
+%  my %hash = $job->hash;
+%  $hash{'status'} = 'new';
+%  $hash{'statustext'} = '';
+%  my $new = new FS::queue \%hash;
+%  my $error = $new->replace($job);
+%  die $error if $error;
+%} elsif ( $action eq 'del' ) {
+%  my $error = $job->delete;
+%  die $error if $error;
+%} elsif ( $action =~ /^(retry|remove) selected$/ ) {
+%  foreach my $jobnum (
+%    map { /^jobnum(\d+)$/; $1; } grep /^jobnum\d+$/, $cgi->param
+%  ) {
+%    my $job = qsearchs('queue', { 'jobnum' => $jobnum });
+%    if ( $action eq 'retry selected' && $job ) { #new
+%      my %hash = $job->hash;
+%      $hash{'status'} = 'new';
+%      $hash{'statustext'} = '';
+%      my $new = new FS::queue \%hash;
+%      my $error = $new->replace($job);
+%      die $error if $error;
+%    } elsif ( $action eq 'remove selected' && $job ) { #del
+%      my $error = $job->delete;
+%      die $error if $error;
+%    }
+%  }
+%}
+%
+%print $cgi->redirect(popurl(2). "search/queue.html");
+%
+%
 
-%>

Index: unvoid-cust_pay_void.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/unvoid-cust_pay_void.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- unvoid-cust_pay_void.cgi	15 Dec 2005 04:04:51 -0000	1.1
+++ unvoid-cust_pay_void.cgi	23 Aug 2006 22:25:38 -0000	1.2
@@ -1,16 +1,17 @@
-<%
-
-#untaint paynum
-my($query) = $cgi->keywords;
-$query =~ /^(\d+)$/ || die "Illegal paynum";
-my $paynum = $1;
-
-my $cust_pay_void = qsearchs('cust_pay_void', { 'paynum' => $paynum } );
-my $custnum = $cust_pay_void->custnum;
-
-my $error = $cust_pay_void->unvoid;
-eidiot($error) if $error;
-
-print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
+%
+%
+%#untaint paynum
+%my($query) = $cgi->keywords;
+%$query =~ /^(\d+)$/ || die "Illegal paynum";
+%my $paynum = $1;
+%
+%my $cust_pay_void = qsearchs('cust_pay_void', { 'paynum' => $paynum } );
+%my $custnum = $cust_pay_void->custnum;
+%
+%my $error = $cust_pay_void->unvoid;
+%eidiot($error) if $error;
+%
+%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
+%
+%
 
-%>

Index: void-cust_pay.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/void-cust_pay.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- void-cust_pay.cgi	6 Jul 2004 13:26:21 -0000	1.1
+++ void-cust_pay.cgi	23 Aug 2006 22:25:38 -0000	1.2
@@ -1,16 +1,17 @@
-<%
-
-#untaint paynum
-my($query) = $cgi->keywords;
-$query =~ /^(\d+)$/ || die "Illegal paynum";
-my $paynum = $1;
-
-my $cust_pay = qsearchs('cust_pay',{'paynum'=>$paynum});
-my $custnum = $cust_pay->custnum;
-
-my $error = $cust_pay->void;
-eidiot($error) if $error;
-
-print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
+%
+%
+%#untaint paynum
+%my($query) = $cgi->keywords;
+%$query =~ /^(\d+)$/ || die "Illegal paynum";
+%my $paynum = $1;
+%
+%my $cust_pay = qsearchs('cust_pay',{'paynum'=>$paynum});
+%my $custnum = $cust_pay->custnum;
+%
+%my $error = $cust_pay->void;
+%eidiot($error) if $error;
+%
+%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
+%
+%
 
-%>

Index: counties.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/counties.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- counties.cgi	10 Sep 2005 14:50:57 -0000	1.1
+++ counties.cgi	23 Aug 2006 22:25:38 -0000	1.2
@@ -1,17 +1,18 @@
-<%
-
-  my( $state, $country ) = $cgi->param('arg');
-
-  my @counties = 
-     sort
-     map { s/[\n\r]//g; $_; }
-     map { $_->county; }
-     qsearch( 'cust_main_county',
-              { 'state'   => $state,
-                'country' => $country,
-              },
-            )
-  ;
-
-
-%>[ <%= join(', ', map { qq("$_") } @counties) %> ]
+%
+%
+%  my( $state, $country ) = $cgi->param('arg');
+%
+%  my @counties = 
+%     sort
+%     map { s/[\n\r]//g; $_; }
+%     map { $_->county; }
+%     qsearch( 'cust_main_county',
+%              { 'state'   => $state,
+%                'country' => $country,
+%              },
+%            )
+%  ;
+%
+%
+%
+[ <% join(', ', map { qq("$_") } @counties) %> ]

Index: whois.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/whois.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- whois.cgi	31 Jan 2006 04:26:54 -0000	1.2
+++ whois.cgi	23 Aug 2006 22:25:38 -0000	1.3
@@ -1,10 +1,11 @@
-<%
-  my $svcnum = $cgi->param('svcnum');
-  my $custnum = $cgi->param('custnum');
-  my $domain = $cgi->param('domain');
+%
+%  my $svcnum = $cgi->param('svcnum');
+%  my $custnum = $cgi->param('custnum');
+%  my $domain = $cgi->param('domain');
+%
+%
 
-%>
-<%= include("/elements/header.html","Whois $domain", menubar(
+<% include("/elements/header.html","Whois $domain", menubar(
   ( $custnum
     ? ( "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
       )
@@ -13,13 +14,14 @@
   "View this domain (#$svcnum)" => "${p}view/svc_domain.cgi?$svcnum",
   "Main menu" => $p,
 )) %>
-<% my $whois = eval { whois($domain) };
-   if ( $@ ) {
-     ( $whois = $@ ) =~ s/ at \/.*Net\/Whois\/Raw\.pm line \d+.*$//s;
-   } else {
-     $whois =~ s/^\n+//;
-   }
-%>
-<PRE><%= $whois %></PRE>
+% my $whois = eval { whois($domain) };
+%   if ( $@ ) {
+%     ( $whois = $@ ) =~ s/ at \/.*Net\/Whois\/Raw\.pm line \d+.*$//s;
+%   } else {
+%     $whois =~ s/^\n+//;
+%   }
+%
+
+<PRE><% $whois %></PRE>
 </BODY>
 </HTML>

Index: delete-cust_pay.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/delete-cust_pay.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- delete-cust_pay.cgi	10 Feb 2002 13:21:31 -0000	1.2
+++ delete-cust_pay.cgi	23 Aug 2006 22:25:38 -0000	1.3
@@ -1,16 +1,17 @@
-<%
-
-#untaint paynum
-my($query) = $cgi->keywords;
-$query =~ /^(\d+)$/ || die "Illegal paynum";
-my $paynum = $1;
-
-my $cust_pay = qsearchs('cust_pay',{'paynum'=>$paynum});
-my $custnum = $cust_pay->custnum;
-
-my $error = $cust_pay->delete;
-eidiot($error) if $error;
-
-print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
+%
+%
+%#untaint paynum
+%my($query) = $cgi->keywords;
+%$query =~ /^(\d+)$/ || die "Illegal paynum";
+%my $paynum = $1;
+%
+%my $cust_pay = qsearchs('cust_pay',{'paynum'=>$paynum});
+%my $custnum = $cust_pay->custnum;
+%
+%my $error = $cust_pay->delete;
+%eidiot($error) if $error;
+%
+%print $cgi->redirect($p. "view/cust_main.cgi?". $custnum);
+%
+%
 
-%>

Index: delete-part_export.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/delete-part_export.cgi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- delete-part_export.cgi	22 May 2002 18:44:01 -0000	1.3
+++ delete-part_export.cgi	23 Aug 2006 22:25:38 -0000	1.4
@@ -1,15 +1,16 @@
-<%
-
-#untaint exportnum
-my($query) = $cgi->keywords;
-$query =~ /^(\d+)$/ || die "Illegal exportnum";
-my $exportnum = $1;
-
-my $part_export = qsearchs('part_export',{'exportnum'=>$exportnum});
-
-my $error = $part_export->delete;
-eidiot($error) if $error;
-
-print $cgi->redirect($p. "browse/part_export.cgi");
+%
+%
+%#untaint exportnum
+%my($query) = $cgi->keywords;
+%$query =~ /^(\d+)$/ || die "Illegal exportnum";
+%my $exportnum = $1;
+%
+%my $part_export = qsearchs('part_export',{'exportnum'=>$exportnum});
+%
+%my $error = $part_export->delete;
+%eidiot($error) if $error;
+%
+%print $cgi->redirect($p. "browse/part_export.cgi");
+%
+%
 
-%>

Index: fax-invoice.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/fax-invoice.cgi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- fax-invoice.cgi	2 Jun 2005 09:29:52 -0000	1.3
+++ fax-invoice.cgi	23 Aug 2006 22:25:38 -0000	1.4
@@ -1,17 +1,18 @@
-<%
-
-#untaint invnum
-my($query) = $cgi->keywords;
-$query =~ /^((.+)-)?(\d+)$/;
-my $template = $2;
-my $invnum = $3;
-my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
-die "Can't find invoice!\n" unless $cust_bill;
-
-$cust_bill->fax($template);
-
-my $custnum = $cust_bill->getfield('custnum');
-
-print $cgi->redirect("${p}view/cust_main.cgi?$custnum");
+%
+%
+%#untaint invnum
+%my($query) = $cgi->keywords;
+%$query =~ /^((.+)-)?(\d+)$/;
+%my $template = $2;
+%my $invnum = $3;
+%my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
+%die "Can't find invoice!\n" unless $cust_bill;
+%
+%$cust_bill->fax($template);
+%
+%my $custnum = $cust_bill->getfield('custnum');
+%
+%print $cgi->redirect("${p}view/cust_main.cgi?$custnum");
+%
+%
 
-%>

Index: inventory_item-import.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/inventory_item-import.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- inventory_item-import.html	8 Mar 2006 12:14:04 -0000	1.1
+++ inventory_item-import.html	23 Aug 2006 22:25:38 -0000	1.2
@@ -1,20 +1,21 @@
-<%
-
-my $classnum = $cgi->param('classnum');
-$classnum =~ /^(\d+)$/ or eidiot "illegal classnum $classnum";
-$classnum = $1;
-my $inventory_class = qsearchs('inventory_class', { 'classnum' => $classnum } );
-
-%><%= include("/elements/header.html", $inventory_class->classname. 's') %>
+%
+%
+%my $classnum = $cgi->param('classnum');
+%$classnum =~ /^(\d+)$/ or eidiot "illegal classnum $classnum";
+%$classnum = $1;
+%my $inventory_class = qsearchs('inventory_class', { 'classnum' => $classnum } );
+%
+%
+<% include("/elements/header.html", $inventory_class->classname. 's') %>
 
 <FORM ACTION="process/inventory_item-import.html" METHOD="POST" ENCTYPE="multipart/form-data">
-<INPUT TYPE="hidden" NAME="classnum" VALUE="<%= $classnum %>">
-Import a file containing <%= $inventory_class->classname %>s, one per line.<BR><BR>
+<INPUT TYPE="hidden" NAME="classnum" VALUE="<% $classnum %>">
+Import a file containing <% $inventory_class->classname %>s, one per line.<BR><BR>
 
 Filename: <INPUT TYPE="file" NAME="filename"><BR><BR>
 
 <INPUT TYPE="submit" VALUE="Upload">
 </FORM>
 
-<%= include('/elements/footer.html') %>
+<% include('/elements/footer.html') %>
 

Index: delete-customer.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/delete-customer.cgi,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- delete-customer.cgi	30 May 2002 21:51:48 -0000	1.10
+++ delete-customer.cgi	23 Aug 2006 22:25:38 -0000	1.11
@@ -1,60 +1,61 @@
 <!-- mason kludge -->
-<%
-
-my $conf = new FS::Conf;
-die "Customer deletions not enabled" unless $conf->exists('deletecustomers');
-
-my($custnum, $new_custnum);
-if ( $cgi->param('error') ) {
-  $custnum = $cgi->param('custnum');
-  $new_custnum = $cgi->param('new_custnum');
-} else {
-  my($query) = $cgi->keywords;
-  $query =~ /^(\d+)$/ or die "Illegal query: $query";
-  $custnum = $1;
-  $new_custnum = '';
-}
-my $cust_main = qsearchs( 'cust_main', { 'custnum' => $custnum } )
-  or die "Customer not found: $custnum";
-
-print header('Delete customer');
-
-print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
-      "</FONT>"
-  if $cgi->param('error');
-
-print 
-  qq!<form action="!, popurl(1), qq!process/delete-customer.cgi" method=post>!,
-  qq!<input type="hidden" name="custnum" value="$custnum">!;
-
-if ( qsearch('cust_pkg', { 'custnum' => $custnum, 'cancel' => '' } ) ) {
-  print "Move uncancelled packages to customer number ",
-        qq!<input type="text" name="new_custnum" value="$new_custnum"><br><br>!;
-}
-
-print <<END;
-This will <b>completely remove</b> all traces of this customer record.  This
-is <B>not</B> what you want if this is a real customer who has simply
-canceled service with you.  For that, cancel all of the customer's packages.
-(you can optionally hide cancelled customers with the <a href="../config/config-view.cgi#hidecancelledcustomers">hidecancelledcustomers</a> configuration option)
-<br>
-<br>Are you <b>absolutely sure</b> you want to delete this customer?
-<br><input type="submit" value="Yes">
-</form></body></html>
-END
-
-#Deleting a customer you have financial records on (i.e. credits) is
-#typically considered fraudulant bookkeeping.  Remember, deleting   
-#customers should ONLY be used for completely bogus records.  You should
-#NOT delete real customers who simply discontinue service.
-#
-#For real customers who simply discontinue service, cancel all of the
-#customer's packages.  Customers with all cancelled packages are not  
-#billed.  There is no need to take further action to prevent billing on
-#customers with all cancelled packages.
-#
-#Also see the "hidecancelledcustomers" and "hidecancelledpackages"
-#configuration options, which will allow you to surpress the display of
-#cancelled customers and packages, respectively.
+%
+%
+%my $conf = new FS::Conf;
+%die "Customer deletions not enabled" unless $conf->exists('deletecustomers');
+%
+%my($custnum, $new_custnum);
+%if ( $cgi->param('error') ) {
+%  $custnum = $cgi->param('custnum');
+%  $new_custnum = $cgi->param('new_custnum');
+%} else {
+%  my($query) = $cgi->keywords;
+%  $query =~ /^(\d+)$/ or die "Illegal query: $query";
+%  $custnum = $1;
+%  $new_custnum = '';
+%}
+%my $cust_main = qsearchs( 'cust_main', { 'custnum' => $custnum } )
+%  or die "Customer not found: $custnum";
+%
+%print header('Delete customer');
+%
+%print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
+%      "</FONT>"
+%  if $cgi->param('error');
+%
+%print 
+%  qq!<form action="!, popurl(1), qq!process/delete-customer.cgi" method=post>!,
+%  qq!<input type="hidden" name="custnum" value="$custnum">!;
+%
+%if ( qsearch('cust_pkg', { 'custnum' => $custnum, 'cancel' => '' } ) ) {
+%  print "Move uncancelled packages to customer number ",
+%        qq!<input type="text" name="new_custnum" value="$new_custnum"><br><br>!;
+%}
+%
+%print <<END;
+%This will <b>completely remove</b> all traces of this customer record.  This
+%is <B>not</B> what you want if this is a real customer who has simply
+%canceled service with you.  For that, cancel all of the customer's packages.
+%(you can optionally hide cancelled customers with the <a href="../config/config-view.cgi#hidecancelledcustomers">hidecancelledcustomers</a> configuration option)
+%<br>
+%<br>Are you <b>absolutely sure</b> you want to delete this customer?
+%<br><input type="submit" value="Yes">
+%</form></body></html>
+%END
+%
+%#Deleting a customer you have financial records on (i.e. credits) is
+%#typically considered fraudulant bookkeeping.  Remember, deleting   
+%#customers should ONLY be used for completely bogus records.  You should
+%#NOT delete real customers who simply discontinue service.
+%#
+%#For real customers who simply discontinue service, cancel all of the
+%#customer's packages.  Customers with all cancelled packages are not  
+%#billed.  There is no need to take further action to prevent billing on
+%#customers with all cancelled packages.
+%#
+%#Also see the "hidecancelledcustomers" and "hidecancelledpackages"
+%#configuration options, which will allow you to surpress the display of
+%#cancelled customers and packages, respectively.
+%
+%
 
-%>

Index: delete-domain_record.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/delete-domain_record.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- delete-domain_record.cgi	22 May 2002 18:44:01 -0000	1.1
+++ delete-domain_record.cgi	23 Aug 2006 22:25:38 -0000	1.2
@@ -1,15 +1,16 @@
-<%
-
-#untaint recnum
-my($query) = $cgi->keywords;
-$query =~ /^(\d+)$/ || die "Illegal recnum";
-my $recnum = $1;
-
-my $domain_record = qsearchs('domain_record',{'recnum'=>$recnum});
-
-my $error = $domain_record->delete;
-eidiot($error) if $error;
-
-print $cgi->redirect($p. "view/svc_domain.cgi?". $domain_record->svcnum);
+%
+%
+%#untaint recnum
+%my($query) = $cgi->keywords;
+%$query =~ /^(\d+)$/ || die "Illegal recnum";
+%my $recnum = $1;
+%
+%my $domain_record = qsearchs('domain_record',{'recnum'=>$recnum});
+%
+%my $error = $domain_record->delete;
+%eidiot($error) if $error;
+%
+%print $cgi->redirect($p. "view/svc_domain.cgi?". $domain_record->svcnum);
+%
+%
 
-%>

Index: download-batch.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/download-batch.cgi,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- download-batch.cgi	9 Aug 2006 06:43:02 -0000	1.11
+++ download-batch.cgi	23 Aug 2006 22:25:38 -0000	1.12
@@ -1,117 +1,132 @@
-<%
-
-my $conf=new FS::Conf;
-
-#http_header('Content-Type' => 'text/comma-separated-values' ); #IE chokes
-http_header('Content-Type' => 'text/plain' );
-
-my $batchnum;
-if ( $cgi->param('batchnum') =~ /^(\d+)$/ ) {
-  $batchnum = $1;
-} else {
-  die "No batch number (bad URL) \n";
-}
-
-my $format;
-if ( $cgi->param('format') =~ /^([\w\- ]+)$/ ) {
-  $format = $1;
-} else {
-  $format = $conf->config('batch-default_format');
-}
-
-my $oldAutoCommit = $FS::UID::AutoCommit;
-local $FS::UID::AutoCommit = 0;
-my $dbh = dbh;
-
-my $pay_batch = qsearchs('pay_batch', {'batchnum'=>$batchnum, 'status'=>'O'} );
-die "No pending batch. \n" unless $pay_batch;
-
-my %batchhash = $pay_batch->hash;
-$batchhash{'status'} = 'I';
-$batchhash{'download'} = time unless $batchhash{'download'};
-my $new = new FS::pay_batch \%batchhash;
-my $error = $new->replace($pay_batch);
-die "error updating batch status: $error\n" if $error;
-
-my $batchtotal=0;
-my $batchcount=0;
-
-my (@date)=localtime($new->download);
-my $jdate = sprintf("%03d", $date[5] % 100).sprintf("%03d", $date[7] + 1);
-my $cdate = sprintf("%02d", $date[3]).sprintf("%02d", $date[4] + 1).
-            sprintf("%02d", $date[5] % 100);
-
-if ($format eq "BoM") {
-
-  my($origid,$datacenter,$typecode,$shortname,$longname,$mybank,$myacct) =
-    $conf->config("batchconfig-$format");
-  %><%= sprintf( "A%10s%04u%06u%05u%54s\n",$origid,$pay_batch->batchnum,$jdate,$datacenter,"").
+%
+%
+%my $conf=new FS::Conf;
+%
+%#http_header('Content-Type' => 'text/comma-separated-values' ); #IE chokes
+%http_header('Content-Type' => 'text/plain' );
+%
+%my $batchnum;
+%if ( $cgi->param('batchnum') =~ /^(\d+)$/ ) {
+%  $batchnum = $1;
+%} else {
+%  die "No batch number (bad URL) \n";
+%}
+%
+%my $format;
+%if ( $cgi->param('format') =~ /^([\w\- ]+)$/ ) {
+%  $format = $1;
+%} else {
+%  $format = $conf->config('batch-default_format');
+%}
+%
+%my $oldAutoCommit = $FS::UID::AutoCommit;
+%local $FS::UID::AutoCommit = 0;
+%my $dbh = dbh;
+%
+%my $pay_batch = qsearchs('pay_batch', {'batchnum'=>$batchnum, 'status'=>'O'} );
+%die "No pending batch. \n" unless $pay_batch;
+%
+%my %batchhash = $pay_batch->hash;
+%$batchhash{'status'} = 'I';
+%$batchhash{'download'} = time unless $batchhash{'download'};
+%my $new = new FS::pay_batch \%batchhash;
+%my $error = $new->replace($pay_batch);
+%die "error updating batch status: $error\n" if $error;
+%
+%my $batchtotal=0;
+%my $batchcount=0;
+%
+%my (@date)=localtime($new->download);
+%my $jdate = sprintf("%03d", $date[5] % 100).sprintf("%03d", $date[7] + 1);
+%my $cdate = sprintf("%02d", $date[3]).sprintf("%02d", $date[4] + 1).
+%            sprintf("%02d", $date[5] % 100);
+%
+%if ($format eq "BoM") {
+%
+%  my($origid,$datacenter,$typecode,$shortname,$longname,$mybank,$myacct) =
+%    $conf->config("batchconfig-$format");
+%  
+<% sprintf( "A%10s%04u%06u%05u%54s\n",$origid,$pay_batch->batchnum,$jdate,$datacenter,"").
         sprintf( "XD%03u%06u%-15s%-30s%09u%-12s   \n",$typecode,$jdate,$shortname,$longname,$mybank,$myacct )
-  %><%
-
-}elsif ($format eq "PAP"){
-
-  my($origid,$datacenter,$typecode,$shortname,$longname,$mybank,$myacct) =
-    $conf->config("batchconfig-$format");
-  %><%= sprintf( "H%10sD%3s%06u%-15s%09u%-12s%04u%19s\n",$origid,$typecode,$cdate,$shortname,$mybank,$myacct,$pay_batch->batchnum,"")
-
-  %><%
-
-}elsif ($format eq "csv-td_canada_trust-merchant_pc_batch"){
-#  1;
-}else{
-  die "Unknown format for batch in batchconfig. \n";
-}
-
-
-for my $cust_pay_batch ( sort { $a->paybatchnum <=> $b->paybatchnum }
-                           qsearch('cust_pay_batch',
-			      {'batchnum'=>$pay_batch->batchnum} )
-) {
-
-  $cust_pay_batch->exp =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/;
-  my( $mon, $y ) = ( $2, $1 );
-  $mon = "0$mon" if $mon < 10;
-  my $exp = "$mon$y";
-  $batchcount++;
-  $batchtotal += $cust_pay_batch->amount;
-  
-  if ($format eq "BoM") {
-
-    my( $account, $aba ) = split( '@', $cust_pay_batch->payinfo );
-    %><%= sprintf( "D%010.0f%09u%-12s%-29s%-19s\n",$cust_pay_batch->amount*100,$aba,$account,$cust_pay_batch->payname,$cust_pay_batch->paybatchnum) %><%
-
-  } elsif ($format eq "PAP"){
-
-    my( $account, $aba ) = split( '@', $cust_pay_batch->payinfo );
-    %><%= sprintf( "D%-23s%06u%-19s%09u%-12s%010.0f\n",$cust_pay_batch->payname,$cdate,$cust_pay_batch->paybatchnum,$aba,$account,$cust_pay_batch->amount*100) %><%
-
-  } elsif ($format eq "csv-td_canada_trust-merchant_pc_batch") {
-
-    %>,,,,<%= $cust_pay_batch->payinfo %>,<%= $exp %>,<%= $cust_pay_batch->amount %>,<%= $cust_pay_batch->paybatchnum %><%
-
-  } else {
-    die "I'm already dead, but you did not know that.\n";
-  }
-
-}
-
-if ($format eq "BoM") {
-
-  %><%= sprintf( "YD%08u%014.0f%56s\n",$batchcount,$batchtotal*100,"" ).
-        sprintf( "Z%014u%05u%014u%05u%41s\n",$batchtotal*100,$batchcount,"0","0","" ) %><%
-
-} elsif ($format eq "PAP"){
-
-  %><%= sprintf( "T%08u%014.0f%57s\n",$batchcount,$batchtotal*100,"" ) %><%
-
-} elsif ($format eq "csv-td_canada_trust-merchant_pc_batch"){
-  #1;
-} else {
-  die "I'm already dead (again), but you did not know that.\n";
-}
+  %>
+%
+%
+%}elsif ($format eq "PAP"){
+%
+%  my($origid,$datacenter,$typecode,$shortname,$longname,$mybank,$myacct) =
+%    $conf->config("batchconfig-$format");
+%  
+<% sprintf( "H%10sD%3s%06u%-15s%09u%-12s%04u%19s\n",$origid,$typecode,$cdate,$shortname,$mybank,$myacct,$pay_batch->batchnum,"")
 
-$dbh->commit or die $dbh->errstr if $oldAutoCommit;
+  %>
+%
+%
+%}elsif ($format eq "csv-td_canada_trust-merchant_pc_batch"){
+%#  1;
+%}else{
+%  die "Unknown format for batch in batchconfig. \n";
+%}
+%
+%
+%for my $cust_pay_batch ( sort { $a->paybatchnum <=> $b->paybatchnum }
+%                           qsearch('cust_pay_batch',
+%			      {'batchnum'=>$pay_batch->batchnum} )
+%) {
+%
+%  $cust_pay_batch->exp =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/;
+%  my( $mon, $y ) = ( $2, $1 );
+%  $mon = "0$mon" if $mon < 10;
+%  my $exp = "$mon$y";
+%  $batchcount++;
+%  $batchtotal += $cust_pay_batch->amount;
+%  
+%  if ($format eq "BoM") {
+%
+%    my( $account, $aba ) = split( '@', $cust_pay_batch->payinfo );
+%    
+<% sprintf( "D%010.0f%09u%-12s%-29s%-19s\n",$cust_pay_batch->amount*100,$aba,$account,$cust_pay_batch->payname,$cust_pay_batch->paybatchnum) %>
+%
+%
+%  } elsif ($format eq "PAP"){
+%
+%    my( $account, $aba ) = split( '@', $cust_pay_batch->payinfo );
+%    
+<% sprintf( "D%-23s%06u%-19s%09u%-12s%010.0f\n",$cust_pay_batch->payname,$cdate,$cust_pay_batch->paybatchnum,$aba,$account,$cust_pay_batch->amount*100) %>
+%
+%
+%  } elsif ($format eq "csv-td_canada_trust-merchant_pc_batch") {
+%
+%    
+,,,,<% $cust_pay_batch->payinfo %>,<% $exp %>,<% $cust_pay_batch->amount %>,<% $cust_pay_batch->paybatchnum %>
+%
+%
+%  } else {
+%    die "I'm already dead, but you did not know that.\n";
+%  }
+%
+%}
+%
+%if ($format eq "BoM") {
+%
+%  
+<% sprintf( "YD%08u%014.0f%56s\n",$batchcount,$batchtotal*100,"" ).
+        sprintf( "Z%014u%05u%014u%05u%41s\n",$batchtotal*100,$batchcount,"0","0","" ) %>
+%
+%
+%} elsif ($format eq "PAP"){
+%
+%  
+<% sprintf( "T%08u%014.0f%57s\n",$batchcount,$batchtotal*100,"" ) %>
+%
+%
+%} elsif ($format eq "csv-td_canada_trust-merchant_pc_batch"){
+%  #1;
+%} else {
+%  die "I'm already dead (again), but you did not know that.\n";
+%}
+%
+%$dbh->commit or die $dbh->errstr if $oldAutoCommit;
+%
+%
 
-%>
 

Index: unprovision.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/unprovision.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- unprovision.cgi	22 Mar 2004 11:05:58 -0000	1.2
+++ unprovision.cgi	23 Aug 2006 22:25:38 -0000	1.3
@@ -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;
+%
+%
+%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 ) {
+%  
 
-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");
+%}
+%
+%
 
-%>

Index: print-invoice.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/print-invoice.cgi,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- print-invoice.cgi	2 Jun 2005 09:29:52 -0000	1.9
+++ print-invoice.cgi	23 Aug 2006 22:25:38 -0000	1.10
@@ -1,17 +1,18 @@
-<%
-
-#untaint invnum
-my($query) = $cgi->keywords;
-$query =~ /^((.+)-)?(\d+)$/;
-my $template = $2;
-my $invnum = $3;
-my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
-die "Can't find invoice!\n" unless $cust_bill;
-
-$cust_bill->print($template);
-
-my $custnum = $cust_bill->getfield('custnum');
-
-print $cgi->redirect("${p}view/cust_main.cgi?$custnum");
+%
+%
+%#untaint invnum
+%my($query) = $cgi->keywords;
+%$query =~ /^((.+)-)?(\d+)$/;
+%my $template = $2;
+%my $invnum = $3;
+%my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
+%die "Can't find invoice!\n" unless $cust_bill;
+%
+%$cust_bill->print($template);
+%
+%my $custnum = $cust_bill->getfield('custnum');
+%
+%print $cgi->redirect("${p}view/cust_main.cgi?$custnum");
+%
+%
 
-%>

Index: xmlhttp-cust_main-search.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/xmlhttp-cust_main-search.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- xmlhttp-cust_main-search.cgi	10 Oct 2005 12:20:57 -0000	1.1
+++ xmlhttp-cust_main-search.cgi	23 Aug 2006 22:25:38 -0000	1.2
@@ -1,21 +1,22 @@
-<%
-   my $sub = $cgi->param('sub');
- 
-   if ( $sub eq 'custnum_search' ) {
- 
-     my $custnum = $cgi->param('arg');
-     my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } );
-
-     %>"<%= $cust_main ? $cust_main->name : '' %>"
-
-<% } elsif ( $sub eq 'smart_search' ) {
-
-     my $string = $cgi->param('arg');
-     my @cust_main = smart_search( 'search' => $string );
-     my $return = [ map [ $_->custnum, $_->name ], @cust_main ];
-
-     %><%= objToJson($return) %>
+%
+%   my $sub = $cgi->param('sub');
+% 
+%   if ( $sub eq 'custnum_search' ) {
+% 
+%     my $custnum = $cgi->param('arg');
+%     my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } );
+%
+%     
+"<% $cust_main ? $cust_main->name : '' %>"
+% } elsif ( $sub eq 'smart_search' ) {
+%
+%     my $string = $cgi->param('arg');
+%     my @cust_main = smart_search( 'search' => $string );
+%     my $return = [ map [ $_->custnum, $_->name ], @cust_main ];
+%
+%     
+<% objToJson($return) %>
+% } 
 
-<% } %>
 
 

Index: change_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/change_pkg.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- change_pkg.cgi	4 Oct 2002 12:57:06 -0000	1.1
+++ change_pkg.cgi	23 Aug 2006 22:25:38 -0000	1.2
@@ -1,66 +1,67 @@
 <!-- mason kludge -->
-<%
-
-my $pkgnum;
-if ( $cgi->param('error') ) {
-  #$custnum = $cgi->param('custnum');
-  #%remove_pkg = map { $_ => 1 } $cgi->param('remove_pkg');
-  $pkgnum = ($cgi->param('remove_pkg'))[0];
-} else {
-  my($query) = $cgi->keywords;
-  $query =~ /^(\d+)$/;
-  #$custnum = $1;
-  $pkgnum = $1;
-  #%remove_pkg = ();
-}
-
-my $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } )
-  or die "unknown pkgnum $pkgnum";
-my $custnum = $cust_pkg->custnum;
-
-my $conf = new FS::Conf;
-
-my $p1 = popurl(1);
-
-my $cust_main = $cust_pkg->cust_main
-  or die "can't get cust_main record for custnum ". $cust_pkg->custnum.
-         " ( pkgnum ". cust_pkg->pkgnum. ")";
-my $agent = $cust_main->agent;
-
-print header("Change Package",  menubar(
-  "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
-  'Main Menu' => $p,
-));
-
-print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
-      "</FONT><BR><BR>"
-  if $cgi->param('error');
-
-my $part_pkg = $cust_pkg->part_pkg;
-
-print small_custview( $cust_main, $conf->config('countrydefault') ).
-      qq!<FORM ACTION="${p}edit/process/cust_pkg.cgi" METHOD=POST>!.
-      qq!<INPUT TYPE="hidden" NAME="custnum" VALUE="$custnum">!.
-      qq!<INPUT TYPE="hidden" NAME="remove_pkg" VALUE="$pkgnum">!.
-      '<BR>Current package: '. $part_pkg->pkg. ' - '. $part_pkg->comment.
-      qq!<BR>New package: <SELECT NAME="new_pkgpart"><OPTION VALUE=0></OPTION>!;
-
-foreach my $part_pkg (
-  grep { ! $_->disabled && $_->pkgpart != $cust_pkg->pkgpart }
-    map { $_->part_pkg } $agent->agent_type->type_pkgs
-) {
-  my $pkgpart = $part_pkg->pkgpart;
-  print qq!<OPTION VALUE="$pkgpart"!;
-  print ' SELECTED' if $cgi->param('error')
-                       && $cgi->param('new_pkgpart') == $pkgpart;
-  print qq!>$pkgpart: !. $part_pkg->pkg. ' - '. $part_pkg->comment. '</OPTION>';
-}
+%
+%
+%my $pkgnum;
+%if ( $cgi->param('error') ) {
+%  #$custnum = $cgi->param('custnum');
+%  #%remove_pkg = map { $_ => 1 } $cgi->param('remove_pkg');
+%  $pkgnum = ($cgi->param('remove_pkg'))[0];
+%} else {
+%  my($query) = $cgi->keywords;
+%  $query =~ /^(\d+)$/;
+%  #$custnum = $1;
+%  $pkgnum = $1;
+%  #%remove_pkg = ();
+%}
+%
+%my $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } )
+%  or die "unknown pkgnum $pkgnum";
+%my $custnum = $cust_pkg->custnum;
+%
+%my $conf = new FS::Conf;
+%
+%my $p1 = popurl(1);
+%
+%my $cust_main = $cust_pkg->cust_main
+%  or die "can't get cust_main record for custnum ". $cust_pkg->custnum.
+%         " ( pkgnum ". cust_pkg->pkgnum. ")";
+%my $agent = $cust_main->agent;
+%
+%print header("Change Package",  menubar(
+%  "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
+%  'Main Menu' => $p,
+%));
+%
+%print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
+%      "</FONT><BR><BR>"
+%  if $cgi->param('error');
+%
+%my $part_pkg = $cust_pkg->part_pkg;
+%
+%print small_custview( $cust_main, $conf->config('countrydefault') ).
+%      qq!<FORM ACTION="${p}edit/process/cust_pkg.cgi" METHOD=POST>!.
+%      qq!<INPUT TYPE="hidden" NAME="custnum" VALUE="$custnum">!.
+%      qq!<INPUT TYPE="hidden" NAME="remove_pkg" VALUE="$pkgnum">!.
+%      '<BR>Current package: '. $part_pkg->pkg. ' - '. $part_pkg->comment.
+%      qq!<BR>New package: <SELECT NAME="new_pkgpart"><OPTION VALUE=0></OPTION>!;
+%
+%foreach my $part_pkg (
+%  grep { ! $_->disabled && $_->pkgpart != $cust_pkg->pkgpart }
+%    map { $_->part_pkg } $agent->agent_type->type_pkgs
+%) {
+%  my $pkgpart = $part_pkg->pkgpart;
+%  print qq!<OPTION VALUE="$pkgpart"!;
+%  print ' SELECTED' if $cgi->param('error')
+%                       && $cgi->param('new_pkgpart') == $pkgpart;
+%  print qq!>$pkgpart: !. $part_pkg->pkg. ' - '. $part_pkg->comment. '</OPTION>';
+%}
+%
+%print <<END;
+%</SELECT>
+%<BR><BR><INPUT TYPE="submit" VALUE="Change package">
+%    </FORM>
+%  </BODY>
+%</HTML>
+%END
+%
 
-print <<END;
-</SELECT>
-<BR><BR><INPUT TYPE="submit" VALUE="Change package">
-    </FORM>
-  </BODY>
-</HTML>
-END
-%>

Index: payment.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/payment.cgi,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- payment.cgi	14 May 2006 16:47:30 -0000	1.7
+++ payment.cgi	23 Aug 2006 22:25:38 -0000	1.8
@@ -1,40 +1,41 @@
-<%
-   my %type = ( 'CARD' => 'credit card',
-                'CHEK' => 'electronic check (ACH)',
-              );
-
-   $cgi->param('payby') =~ /^(CARD|CHEK)$/
-     or die "unknown payby ". $cgi->param('payby');
-   my $payby = $1;
-
-   $cgi->param('custnum') =~ /^(\d+)$/
-     or die "illegal custnum ". $cgi->param('custnum');
-   my $custnum = $1;
-
-   my $cust_main = qsearchs( 'cust_main', { 'custnum'=>$custnum } );
-   die "unknown custnum $custnum" unless $cust_main;
-
-   my $balance = $cust_main->balance;
-
-   my $payinfo = '';
-
-   #false laziness w/selfservice make_payment.html shortcut for one-country
-   my $conf = new FS::Conf;
-   my %states = map { $_->state => 1 }
-                  qsearch('cust_main_county', {
-                    'country' => $conf->config('countrydefault') || 'US'
-                  } );
-   my @states = sort { $a cmp $b } keys %states;
-
-   my $paybatch = "webui-payment-". time. "-$$-". rand() * 2**32;
+%
+%   my %type = ( 'CARD' => 'credit card',
+%                'CHEK' => 'electronic check (ACH)',
+%              );
+%
+%   $cgi->param('payby') =~ /^(CARD|CHEK)$/
+%     or die "unknown payby ". $cgi->param('payby');
+%   my $payby = $1;
+%
+%   $cgi->param('custnum') =~ /^(\d+)$/
+%     or die "illegal custnum ". $cgi->param('custnum');
+%   my $custnum = $1;
+%
+%   my $cust_main = qsearchs( 'cust_main', { 'custnum'=>$custnum } );
+%   die "unknown custnum $custnum" unless $cust_main;
+%
+%   my $balance = $cust_main->balance;
+%
+%   my $payinfo = '';
+%
+%   #false laziness w/selfservice make_payment.html shortcut for one-country
+%   my $conf = new FS::Conf;
+%   my %states = map { $_->state => 1 }
+%                  qsearch('cust_main_county', {
+%                    'country' => $conf->config('countrydefault') || 'US'
+%                  } );
+%   my @states = sort { $a cmp $b } keys %states;
+%
+%   my $paybatch = "webui-payment-". time. "-$$-". rand() * 2**32;
+%
+%
 
-%>
-<%= include( '/elements/header.html', "Process $type{$payby} payment" ) %>
-<%= include( '/elements/small_custview.html', $cust_main ) %>
+<% include( '/elements/header.html', "Process $type{$payby} payment" ) %>
+<% include( '/elements/small_custview.html', $cust_main ) %>
 <FORM NAME="OneTrueForm" ACTION="process/payment.cgi" METHOD="POST" onSubmit="document.OneTrueForm.process.disabled=true">
-<INPUT TYPE="hidden" NAME="custnum" VALUE="<%= $custnum %>">
-<INPUT TYPE="hidden" NAME="payby" VALUE="<%= $payby %>">
-<INPUT TYPE="hidden" NAME="paybatch" VALUE="<%= $paybatch %>">
+<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
+<INPUT TYPE="hidden" NAME="payby" VALUE="<% $payby %>">
+<INPUT TYPE="hidden" NAME="paybatch" VALUE="<% $paybatch %>">
 
 <SCRIPT TYPE="text/javascript" SRC="../elements/overlibmws.js"></SCRIPT>
 <SCRIPT TYPE="text/javascript" SRC="../elements/overlibmws_iframe.js"></SCRIPT>
@@ -46,53 +47,58 @@
    +'<div>[iframe not supported]</div></iframe>');
 }
 </SCRIPT>
+% #include( '/elements/table.html', '#cccccc' ) 
 
-<% #include( '/elements/table.html', '#cccccc' ) %>
-<%= ntable('#cccccc') %>
+<% ntable('#cccccc') %>
   <TR>
     <TD ALIGN="right">Payment amount</TD>
     <TD>
       <TABLE><TR><TD BGCOLOR="#ffffff">
-        $<INPUT TYPE="text" NAME="amount" SIZE=8 VALUE="<%= $balance > 0 ? sprintf("%.2f", $balance) : '' %>">
+        $<INPUT TYPE="text" NAME="amount" SIZE=8 VALUE="<% $balance > 0 ? sprintf("%.2f", $balance) : '' %>">
       </TD></TR></TABLE>
     </TD>
   </TR>
-<% if ( $payby eq 'CARD' ) {
-     my( $payinfo, $paycvv, $month, $year ) = ( '', '', '', '' );
-     my $payname = $cust_main->first. ' '. $cust_main->getfield('last');
-     my $address1 = $cust_main->address1;
-     my $address2 = $cust_main->address2;
-     my $city     = $cust_main->city;
-     my $state    = $cust_main->state;
-     my $zip     = $cust_main->zip;
-     if ( $cust_main->payby =~ /^(CARD|DCRD)$/ ) {
-       $payinfo = $cust_main->payinfo;
-       $paycvv = $cust_main->paycvv;
-       ( $month, $year ) = $cust_main->paydate_monthyear;
-       $payname = $cust_main->payname if $cust_main->payname;
-     }
-%>
+% if ( $payby eq 'CARD' ) {
+%     my( $payinfo, $paycvv, $month, $year ) = ( '', '', '', '' );
+%     my $payname = $cust_main->first. ' '. $cust_main->getfield('last');
+%     my $address1 = $cust_main->address1;
+%     my $address2 = $cust_main->address2;
+%     my $city     = $cust_main->city;
+%     my $state    = $cust_main->state;
+%     my $zip     = $cust_main->zip;
+%     if ( $cust_main->payby =~ /^(CARD|DCRD)$/ ) {
+%       $payinfo = $cust_main->payinfo;
+%       $paycvv = $cust_main->paycvv;
+%       ( $month, $year ) = $cust_main->paydate_monthyear;
+%       $payname = $cust_main->payname if $cust_main->payname;
+%     }
+%
+
   <TR>
     <TD ALIGN="right">Card&nbsp;number</TD>
     <TD>
       <TABLE>
         <TR>
           <TD>
-            <INPUT TYPE="text" NAME="payinfo" SIZE=20 MAXLENGTH=19 VALUE="<%=$payinfo%>"> </TD>
+            <INPUT TYPE="text" NAME="payinfo" SIZE=20 MAXLENGTH=19 VALUE="<%$payinfo%>"> </TD>
           <TD>Exp.</TD>
           <TD>
             <SELECT NAME="month">
-              <% for ( ( map "0$_", 1 .. 9 ), 10 .. 12 ) { %>
-                <OPTION<%= $_ == $month ? ' SELECTED' : '' %>><%= $_ %>
-              <% } %>
+% for ( ( map "0$_", 1 .. 9 ), 10 .. 12 ) { 
+
+                <OPTION<% $_ == $month ? ' SELECTED' : '' %>><% $_ %>
+% } 
+
             </SELECT>
           </TD>
           <TD> / </TD>
           <TD>
             <SELECT NAME="year">
-              <% my @a = localtime; for ( $a[5]+1900 .. $a[5]+1915 ) { %>
-                <OPTION<%= $_ == $year ? ' SELECTED' : '' %>><%= $_ %>
-              <% } %>
+% my @a = localtime; for ( $a[5]+1900 .. $a[5]+1915 ) { 
+
+                <OPTION<% $_ == $year ? ' SELECTED' : '' %>><% $_ %>
+% } 
+
             </SELECT>
           </TD>
         </TR>
@@ -101,22 +107,22 @@
   </TR>
   <TR>
     <TD ALIGN="right">CVV2</TD>
-    <TD><INPUT TYPE="text" NAME="paycvv" VALUE="<%= $paycvv %>" SIZE=4 MAXLENGTH=4>
+    <TD><INPUT TYPE="text" NAME="paycvv" VALUE="<% $paycvv %>" SIZE=4 MAXLENGTH=4>
         (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('../docs/cvv2.html', 480, 352, 'cvv2_popup' ), CAPTION, 'CVV2 Help', STICKY, AUTOSTATUSCAP, CLOSECLICK, DRAGGABLE ); return false;">help</A>)
     </TD>
   </TR>
   <TR>
     <TD ALIGN="right">Exact&nbsp;name&nbsp;on&nbsp;card</TD>
-    <TD><INPUT TYPE="text" SIZE=32 MAXLENGTH=80 NAME="payname" VALUE="<%=$payname%>"></TD>
+    <TD><INPUT TYPE="text" SIZE=32 MAXLENGTH=80 NAME="payname" VALUE="<%$payname%>"></TD>
   </TR><TR>
     <TD ALIGN="right">Card&nbsp;billing&nbsp;address</TD>
     <TD>
-      <INPUT TYPE="text" SIZE=40 MAXLENGTH=80 NAME="address1" VALUE="<%=$address1%>">
+      <INPUT TYPE="text" SIZE=40 MAXLENGTH=80 NAME="address1" VALUE="<%$address1%>">
     </TD>
   </TR><TR>
     <TD ALIGN="right">Address&nbsp;line&nbsp;2</TD>
     <TD>
-      <INPUT TYPE="text" SIZE=40 MAXLENGTH=80 NAME="address2" VALUE="<%=$address2%>">
+      <INPUT TYPE="text" SIZE=40 MAXLENGTH=80 NAME="address2" VALUE="<%$address2%>">
     </TD>
   </TR><TR>
     <TD ALIGN="right">City</TD>
@@ -124,61 +130,63 @@
       <TABLE>
         <TR>
           <TD>
-            <INPUT TYPE="text" NAME="city" SIZE="12" MAXLENGTH=80 VALUE="<%=$city%>">
+            <INPUT TYPE="text" NAME="city" SIZE="12" MAXLENGTH=80 VALUE="<%$city%>">
           </TD>
           <TD>State</TD>
           <TD>
             <SELECT NAME="state">
-              <% for ( @states ) { %>
-                <OPTION<%= $_ eq $state ? ' SELECTED' : '' %>><%= $_ %> 
-              <% } %>
+% for ( @states ) { 
+
+                <OPTION<% $_ eq $state ? ' SELECTED' : '' %>><% $_ %> 
+% } 
+
             </SELECT>
           </TD>
           <TD>Zip</TD>
           <TD>
-            <INPUT TYPE="text" NAME="zip" SIZE=11 MAXLENGTH=10 VALUE="<%=$zip%>">
+            <INPUT TYPE="text" NAME="zip" SIZE=11 MAXLENGTH=10 VALUE="<%$zip%>">
           </TD>
         </TR>
       </TABLE>
     </TD>
   </TR>
+% } elsif ( $payby eq 'CHEK' ) {
+%     my( $payinfo1, $payinfo2, $payname, $ss ) = ( '', '', '', '' );
+%     if ( $cust_main->payby =~ /^(CHEK|DCHK)$/ ) {
+%       $cust_main->payinfo =~ /^(\d+)\@(\d+)$/
+%         or die "unparsable payinfo ". $cust_main->payinfo;
+%       ($payinfo1, $payinfo2) = ($1, $2);
+%       $payname = $cust_main->payname;
+%       $ss = $cust_main->ss;
+%     }
+%
 
-<% } elsif ( $payby eq 'CHEK' ) {
-     my( $payinfo1, $payinfo2, $payname, $ss ) = ( '', '', '', '' );
-     if ( $cust_main->payby =~ /^(CHEK|DCHK)$/ ) {
-       $cust_main->payinfo =~ /^(\d+)\@(\d+)$/
-         or die "unparsable payinfo ". $cust_main->payinfo;
-       ($payinfo1, $payinfo2) = ($1, $2);
-       $payname = $cust_main->payname;
-       $ss = $cust_main->ss;
-     }
-%>
   <INPUT TYPE="hidden" NAME="month" VALUE="12">
   <INPUT TYPE="hidden" NAME="year" VALUE="2037">
   <TR>
     <TD ALIGN="right">Account&nbsp;number</TD>
-    <TD><INPUT TYPE="text" SIZE=10 NAME="payinfo1" VALUE="<%=$payinfo1%>"></TD>
+    <TD><INPUT TYPE="text" SIZE=10 NAME="payinfo1" VALUE="<%$payinfo1%>"></TD>
   </TR>
   <TR>
     <TD ALIGN="right">ABA/Routing&nbsp;number</TD>
     <TD>
-      <INPUT TYPE="text" SIZE=10 MAXLENGTH=9 NAME="payinfo2" VALUE="<%=$payinfo2%>">
+      <INPUT TYPE="text" SIZE=10 MAXLENGTH=9 NAME="payinfo2" VALUE="<%$payinfo2%>">
       (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('../docs/ach.html', 380, 240, 'ach_popup' ), CAPTION, 'ACH Help', STICKY, AUTOSTATUSCAP, CLOSECLICK, DRAGGABLE ); return false;">help</A>)
     </TD>
   </TR>
   <TR>
     <TD ALIGN="right">Bank&nbsp;name</TD>
-    <TD><INPUT TYPE="text" NAME="payname" VALUE="<%=$payname%>"></TD>
+    <TD><INPUT TYPE="text" NAME="payname" VALUE="<%$payname%>"></TD>
   </TR>
   <TR>
     <TD ALIGN="right">
       Account&nbsp;holder<BR>
       Social&nbsp;security&nbsp;or&nbsp;tax&nbsp;ID&nbsp;#
     </TD>
-    <TD><INPUT TYPE="text" NAME="ss" VALUE="<%=$ss%>"></TD>
+    <TD><INPUT TYPE="text" NAME="ss" VALUE="<%$ss%>"></TD>
   </TR>
+% } 
 
-<% } %>
 
 <TR>
   <TD COLSPAN=2>
@@ -187,8 +195,8 @@
   </TD>
 </TR><TR>
   <TD COLSPAN=2>
-    <INPUT TYPE="checkbox"<%= ( ( $payby eq 'CARD' && $cust_main->payby ne 'DCRD' ) || ( $payby eq 'CHEK' && $cust_main->payby eq 'CHEK' ) ) ? ' CHECKED' : '' %> NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }">
-    Charge future payments to this <%= $type{$payby} %> automatically
+    <INPUT TYPE="checkbox"<% ( ( $payby eq 'CARD' && $cust_main->payby ne 'DCRD' ) || ( $payby eq 'CHEK' && $cust_main->payby eq 'CHEK' ) ) ? ' CHECKED' : '' %> NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }">
+    Charge future payments to this <% $type{$payby} %> automatically
   </TD>
 </TR>
 </TABLE>
@@ -196,4 +204,4 @@
 <INPUT TYPE="submit" NAME="process" VALUE="Process payment">
 </FORM>
 
-<%= include('/elements/footer.html') %>
+<% include('/elements/footer.html') %>

Index: cust_main-import.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/cust_main-import.cgi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- cust_main-import.cgi	15 Aug 2006 14:20:51 -0000	1.3
+++ cust_main-import.cgi	23 Aug 2006 22:25:38 -0000	1.4
@@ -1,4 +1,4 @@
-<%= include("/elements/header.html",'Batch Customer Import') %>
+<% include("/elements/header.html",'Batch Customer Import') %>
 
 <FORM ACTION="process/cust_main-import.cgi" METHOD="post" ENCTYPE="multipart/form-data">
 
@@ -16,9 +16,9 @@
 target table.
 <BR><BR>
 
-<%= &ntable("#cccccc") %>
+<% &ntable("#cccccc") %>
 
-<%= include('/elements/tr-select-agent.html', '', #$agentnum,
+<% include('/elements/tr-select-agent.html', '', #$agentnum,
               'label'       => "<B>Agent</B>",
               'empty_label' => 'Select agent',
            )
@@ -38,18 +38,20 @@
   <TH ALIGN="right">CSV filename</TH>
   <TD><INPUT TYPE="file" NAME="csvfile"></TD>
 </TR>
+% #include('/elements/tr-select-part_referral.html')
+%
 
-<% #include('/elements/tr-select-part_referral.html')
-%>
 
 <!--
 <TR>
   <TH>First package</TH>
   <TD>
     <SELECT NAME="pkgpart"><OPTION VALUE="">(none)</OPTION>
-      <% foreach my $part_pkg ( qsearch('part_pkg',{'disabled'=>'' }) ) { %>
-       <OPTION VALUE="<%= $part_pkg->pkgpart %>"><%= $part_pkg->pkg. ' - '. $part_pkg->comment %></OPTION>
-      <% } %>
+% foreach my $part_pkg ( qsearch('part_pkg',{'disabled'=>'' }) ) { 
+
+       <OPTION VALUE="<% $part_pkg->pkgpart %>"><% $part_pkg->pkg. ' - '. $part_pkg->comment %></OPTION>
+% } 
+
     </SELECT>
   </TD>
 </TR>
@@ -61,5 +63,5 @@
 <INPUT TYPE="submit" VALUE="Import">
 </FORM>
 
-<%= include('/elements/footer.html') %>
+<% include('/elements/footer.html') %>
 

Index: xmlrpc.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/xmlrpc.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- xmlrpc.cgi	2 Mar 2005 21:00:58 -0000	1.1
+++ xmlrpc.cgi	23 Aug 2006 22:25:38 -0000	1.2
@@ -1,17 +1,18 @@
-<%
-
-  my $request_xml = $cgi->param('POSTDATA');
-
-  #$r->log_error($request_xml);
-
-  my $fsxmlrpc = new FS::XMLRPC;
-  my ($error, $response_xml) = $fsxmlrpc->serve($request_xml);
-  
-  #$r->log_error($error) if $error;
-
-  http_header('Content-Type' => 'text/xml',
-              'Content-Length' => length($response_xml));
-
-  print $response_xml;
+%
+%
+%  my $request_xml = $cgi->param('POSTDATA');
+%
+%  #$r->log_error($request_xml);
+%
+%  my $fsxmlrpc = new FS::XMLRPC;
+%  my ($error, $response_xml) = $fsxmlrpc->serve($request_xml);
+%  
+%  #$r->log_error($error) if $error;
+%
+%  http_header('Content-Type' => 'text/xml',
+%              'Content-Length' => length($response_xml));
+%
+%  print $response_xml;
+%
+%
 
-%>

Index: unsusp_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/unsusp_pkg.cgi,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- unsusp_pkg.cgi	10 Feb 2002 13:21:31 -0000	1.4
+++ unsusp_pkg.cgi	23 Aug 2006 22:25:38 -0000	1.5
@@ -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->unsuspend;
-&eidiot($error) if $error;
-
-print $cgi->redirect(popurl(2). "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->unsuspend;
+%&eidiot($error) if $error;
+%
+%print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum'));
+%
+%
 
-%>

Index: cancel-unaudited.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/cancel-unaudited.cgi,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- cancel-unaudited.cgi	22 Mar 2004 11:05:58 -0000	1.10
+++ cancel-unaudited.cgi	23 Aug 2006 22:25:38 -0000	1.11
@@ -1,34 +1,36 @@
-<%
-
-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 $cust_pkg = $cust_svc->cust_pkg;
-if ( $cust_pkg ) {
-  &eidiot( 'This account has already been audited.  Cancel the '.
-           qq!<A HREF="${p}view/cust_main.cgi?!. $cust_pkg->custnum.
-           '#cust_pkg'. $cust_pkg->pkgnum. '">'.
-           'package</A> instead.');
-}
-
-my $error = $cust_svc->cancel;
+%
+%
+%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 $cust_pkg = $cust_svc->cust_pkg;
+%if ( $cust_pkg ) {
+%  &eidiot( 'This account has already been audited.  Cancel the '.
+%           qq!<A HREF="${p}view/cust_main.cgi?!. $cust_pkg->custnum.
+%           '#cust_pkg'. $cust_pkg->pkgnum. '">'.
+%           'package</A> instead.');
+%}
+%
+%my $error = $cust_svc->cancel;
+%
+%if ( $error ) {
+%  
 
-if ( $error ) {
-  %>
 <!-- mason kludge -->
-<%
-  &eidiot($error);
-} else {
-  print $cgi->redirect(popurl(2));
-}
+%
+%  &eidiot($error);
+%} else {
+%  print $cgi->redirect(popurl(2));
+%}
+%
+%
 
-%>



More information about the freeside-commits mailing list