65629844deb55f634fbe3b980bf978c2bb1e5628
[freeside.git] / htdocs / edit / cust_main_county-expand.cgi
1 #!/usr/bin/perl -Tw
2 #
3 # $Id: cust_main_county-expand.cgi,v 1.5 1999-01-19 05:13:35 ivan Exp $
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 # $Log: cust_main_county-expand.cgi,v $
13 # Revision 1.5  1999-01-19 05:13:35  ivan
14 # for mod_perl: no more top-level my() variables; use vars instead
15 # also the last s/create/new/;
16 #
17 # Revision 1.4  1999/01/18 09:41:25  ivan
18 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
19 # (good idea anyway)
20 #
21 # Revision 1.3  1998/12/17 06:17:01  ivan
22 # fix double // in relative URLs, s/CGI::Base/CGI/;
23 #
24 # Revision 1.2  1998/11/18 09:01:38  ivan
25 # i18n! i18n!
26 #
27
28 use strict;
29 use vars qw( $cgi $query $taxnum $cust_main_county $p1 );
30 use CGI;
31 use CGI::Carp qw(fatalsToBrowser);
32 use FS::UID qw(cgisuidsetup);
33 use FS::Record qw(qsearch qsearchs);
34 use FS::CGI qw(header menubar popurl);
35 use FS::cust_main_county;
36
37 $cgi = new CGI;
38
39 &cgisuidsetup($cgi);
40
41 ($query) = $cgi->keywords;
42 $query =~ /^(\d+)$/
43   or die "Illegal taxnum!";
44 $taxnum = $1;
45
46 $cust_main_county = qsearchs('cust_main_county',{'taxnum'=>$taxnum});
47 die "Can't expand entry!" if $cust_main_county->getfield('county');
48
49 $p1 = popurl(1);
50 print $cgi->header( '-expires' => 'now' ), header("Tax Rate (expand)", menubar(
51   'Main Menu' => popurl(2),
52 )), <<END;
53     <FORM ACTION="${p1}process/cust_main_county-expand.cgi" METHOD=POST>
54       <INPUT TYPE="hidden" NAME="taxnum" VALUE="$taxnum">
55       Separate by
56       <INPUT TYPE="radio" NAME="delim" VALUE="n" CHECKED>line
57       (rumor has it broken on some browsers) or
58       <INPUT TYPE="radio" NAME="delim" VALUE="s">whitespace.
59       <BR><INPUT TYPE="submit" VALUE="Submit">
60       <BR><TEXTAREA NAME="expansion" ROWS=100></TEXTAREA>
61     </FORM>
62     </CENTER>
63   </BODY>
64 </HTML>
65 END
66