remove $Log$ messages. whew.
[freeside.git] / httemplate / edit / cust_main_county-expand.cgi
1 <%
2 #<!-- $Id: cust_main_county-expand.cgi,v 1.2 2001-08-21 02:31:56 ivan Exp $ -->
3
4 use strict;
5 use vars qw( $cgi $taxnum $cust_main_county $p1 $delim $expansion );
6 use CGI;
7 use CGI::Carp qw(fatalsToBrowser);
8 use FS::UID qw(cgisuidsetup);
9 use FS::Record qw(qsearch qsearchs);
10 use FS::CGI qw(header menubar popurl);
11 use FS::cust_main_county;
12
13 $cgi = new CGI;
14
15 &cgisuidsetup($cgi);
16
17 if ( $cgi->param('error') ) {
18   $taxnum = $cgi->param('taxnum');
19   $delim = $cgi->param('delim');
20   $expansion = $cgi->param('expansion');
21 } else {
22   my ($query) = $cgi->keywords;
23   $query =~ /^(\d+)$/
24     or die "Illegal taxnum!";
25   $taxnum = $1;
26   $delim = 'n';
27   $expansion = '';
28 }
29
30 $cust_main_county = qsearchs('cust_main_county',{'taxnum'=>$taxnum});
31 die "Can't expand entry!" if $cust_main_county->getfield('county');
32
33 $p1 = popurl(1);
34 print $cgi->header( '-expires' => 'now' ), header("Tax Rate (expand)", menubar(
35   'Main Menu' => popurl(2),
36 ));
37
38 print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
39       "</FONT>"
40   if $cgi->param('error');
41
42 print <<END;
43     <FORM ACTION="${p1}process/cust_main_county-expand.cgi" METHOD=POST>
44       <INPUT TYPE="hidden" NAME="taxnum" VALUE="$taxnum">
45       Separate by
46 END
47 print '<INPUT TYPE="radio" NAME="delim" VALUE="n"';
48 print ' CHECKED' if $delim eq 'n';
49 print '>line (rumor has it broken on some browsers) or',
50       '<INPUT TYPE="radio" NAME="delim" VALUE="s"';
51 print ' CHECKED' if $delim eq 's';
52 print '>whitespace.';
53 print <<END;
54       <BR><INPUT TYPE="submit" VALUE="Submit">
55       <BR><TEXTAREA NAME="expansion" ROWS=100>$expansion</TEXTAREA>
56     </FORM>
57     </CENTER>
58   </BODY>
59 </HTML>
60 END
61
62 %>