From: ivan Date: Wed, 1 Dec 2004 18:38:22 +0000 (+0000) Subject: add processing for ship state/county/country X-Git-Tag: BEFORE_FINAL_MASONIZE~833 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=3a110af6ccf1b8b7a4926ef5cd42594b61c5a5c9 add processing for ship state/county/country --- diff --git a/fs_signup/FS-SignupClient/cgi/signup.cgi b/fs_signup/FS-SignupClient/cgi/signup.cgi index a1b9ed427..f49ad3285 100755 --- a/fs_signup/FS-SignupClient/cgi/signup.cgi +++ b/fs_signup/FS-SignupClient/cgi/signup.cgi @@ -1,7 +1,7 @@ #!/usr/bin/perl -T #!/usr/bin/perl -Tw # -# $Id: signup.cgi,v 1.53 2004-11-22 18:20:21 ivan Exp $ +# $Id: signup.cgi,v 1.54 2004-12-01 18:38:22 ivan Exp $ use strict; use vars qw( @payby $cgi $locales $packages @@ -166,6 +166,21 @@ if ( defined $cgi->param('magic') ) { } else { die "illegal state: ". $cgi->param('state'); } + if ( $cgi->param('ship_state') =~ /^(\w*)( \(([\w ]+)\))? ?\/ ?(\w+)$/ ) { + $ship_state = $1; + $ship_county = $3 || ''; + $ship_country = $4; + } elsif ( $cgi->param('ship_state') =~ /^(\w*)$/ ) { + $ship_state = $1; + $cgi->param('ship_county') =~ /^([\w ]*)$/ + or die "illegal county: ". $cgi->param('ship_county'); + $ship_county = $1; + $cgi->param('ship_country') =~ /^(\w+)$/ + or die "illegal ship_country: ". $cgi->param('ship_country'); + $ship_country = $1; + #} else { + # die "illegal ship_state: ". $cgi->param('ship_state'); + } $payby = $cgi->param('payby'); if ( $payby eq 'CHEK' || $payby eq 'DCHK' ) {