59ff7043a20ed20a21e02e15c8008e23b7aaf3f5
[freeside.git] / htdocs / edit / cust_main_county-expand.cgi
1 #!/usr/bin/perl -Tw
2 #
3 # cust_main_county-expand.cgi: Expand a state into counties (output form)
4 #
5 # ivan@sisd.com 97-dec-16
6 #
7 # Changes to allow page to work at a relative position in server
8 #       bmccane@maxbaud.net     98-apr-3
9 #
10 # lose background, FS::CGI ivan@sisd.com 98-sep-2
11
12 use strict;
13 use CGI::Base;
14 use CGI::Carp qw(fatalsToBrowser);
15 use FS::UID qw(cgisuidsetup);
16 use FS::Record qw(qsearch qsearchs);
17 use FS::CGI qw(header menubar);
18
19 my($cgi) = new CGI::Base;
20 $cgi->get;
21
22 &cgisuidsetup($cgi);
23
24 SendHeaders(); # one guess.
25
26 $cgi->var('QUERY_STRING') =~ /^(\d+)$/
27   or die "Illegal taxnum!";
28 my($taxnum)=$1;
29
30 my($cust_main_county)=qsearchs('cust_main_county',{'taxnum'=>$taxnum});
31 die "Can't expand entry!" if $cust_main_county->getfield('county');
32
33 print header("Tax Rate (expand state)", menubar(
34   'Main Menu' => '../',
35 )), <<END;
36     <FORM ACTION="process/cust_main_county-expand.cgi" METHOD=POST>
37       <INPUT TYPE="hidden" NAME="taxnum" VALUE="$taxnum">
38       Separate counties by
39       <INPUT TYPE="radio" NAME="delim" VALUE="n" CHECKED>line
40       (rumor has it broken on some browsers) or
41       <INPUT TYPE="radio" NAME="delim" VALUE="s">whitespace.
42       <BR><INPUT TYPE="submit" VALUE="Submit">
43       <BR><TEXTAREA NAME="counties" ROWS=100></TEXTAREA>
44     </FORM>
45     </CENTER>
46   </BODY>
47 </HTML>
48 END
49