summaryrefslogtreecommitdiff
path: root/fs_signup/FS-SignupClient
diff options
context:
space:
mode:
Diffstat (limited to 'fs_signup/FS-SignupClient')
-rw-r--r--fs_signup/FS-SignupClient/MANIFEST1
-rw-r--r--fs_signup/FS-SignupClient/Makefile.PL6
-rwxr-xr-xfs_signup/FS-SignupClient/cgi/signup.cgi118
-rwxr-xr-xfs_signup/FS-SignupClient/cgi/signup.html4
-rw-r--r--fs_signup/FS-SignupClient/cgi/stateselect.html176
-rwxr-xr-xfs_signup/FS-SignupClient/fs_signupd86
6 files changed, 191 insertions, 200 deletions
diff --git a/fs_signup/FS-SignupClient/MANIFEST b/fs_signup/FS-SignupClient/MANIFEST
index 365ae660b..b4a9900c8 100644
--- a/fs_signup/FS-SignupClient/MANIFEST
+++ b/fs_signup/FS-SignupClient/MANIFEST
@@ -4,4 +4,5 @@ MANIFEST.SKIP
Makefile.PL
SignupClient.pm
test.pl
+fs_signupd
cgi/signup.cgi
diff --git a/fs_signup/FS-SignupClient/Makefile.PL b/fs_signup/FS-SignupClient/Makefile.PL
index 9850c870d..310200b57 100644
--- a/fs_signup/FS-SignupClient/Makefile.PL
+++ b/fs_signup/FS-SignupClient/Makefile.PL
@@ -4,9 +4,9 @@ use ExtUtils::MakeMaker;
WriteMakefile(
'NAME' => 'FS::SignupClient',
'VERSION_FROM' => 'SignupClient.pm', # finds $VERSION
-# 'EXE_FILES' => [ 'fs_signupd' ],
-# 'INSTALLSCRIPT' => '/usr/local/sbin',
-# 'INSTALLSITEBIN' => '/usr/local/sbin',
+ 'EXE_FILES' => [ 'fs_signupd' ],
+ 'INSTALLSCRIPT' => '/usr/local/sbin',
+ 'INSTALLSITEBIN' => '/usr/local/sbin',
'PERM_RWX' => '750',
'PREREQ_PM' => {
'Business::CreditCard' => 0,
diff --git a/fs_signup/FS-SignupClient/cgi/signup.cgi b/fs_signup/FS-SignupClient/cgi/signup.cgi
index 0a9a51008..28dc4c95b 100755
--- a/fs_signup/FS-SignupClient/cgi/signup.cgi
+++ b/fs_signup/FS-SignupClient/cgi/signup.cgi
@@ -1,6 +1,6 @@
#!/usr/bin/perl -Tw
#
-# $Id: signup.cgi,v 1.50 2004-01-04 03:52:54 ivan Exp $
+# $Id: signup.cgi,v 1.29.2.21 2004-01-04 03:52:57 ivan Exp $
use strict;
use vars qw( @payby $cgi $locales $packages
@@ -130,7 +130,8 @@ $packages = $init_data->{agentnum2part_pkg}{$agentnum} if $agentnum;
%pop = ();
%popnum2pop = ();
foreach (@$pops) {
- push @{ $pop{ $_->{state} }->{ $_->{ac} } }, $_;
+ #push @{ $pop{ $_->{state} }->{ $_->{ac} } }, $_;
+ push @{ $pop{ $_->{state} } }, $_;
$popnum2pop{$_->{popnum}} = $_;
}
@@ -156,10 +157,9 @@ if ( defined $cgi->param('magic') ) {
}
$payby = $cgi->param('payby');
- if ( $payby eq 'CHEK' || $payby eq 'DCHK' ) {
+ if ( $payby eq 'CHEK' ) {
#$payinfo = join('@', map { $cgi->param( $payby. "_payinfo$_" ) } (1,2) );
- $payinfo = $cgi->param($payby. '_payinfo1'). '@'.
- $cgi->param($payby. '_payinfo2');
+ $payinfo = $cgi->param('CHEK_payinfo1').'@'.$cgi->param('CHEK_payinfo2');
} else {
$payinfo = $cgi->param( $payby. '_payinfo' );
}
@@ -215,7 +215,7 @@ if ( defined $cgi->param('magic') ) {
} else {
$password2 = $cgi->param('_password2');
- if ( $payby =~ /^(CARD|DCRD)$/ && $cgi->param('CARD_type') ) {
+ if ( $payby eq 'CARD' && $cgi->param('CARD_type') ) {
$payinfo =~ s/\D//g;
$payinfo =~ /^(\d{13,16})$/
@@ -284,7 +284,7 @@ if ( defined $cgi->param('magic') ) {
$address1 = '';
$address2 = '';
$city = '';
- $state = $init_data->{statedefault};
+ $state = $cgi->param('init_popstate') || $init_data->{statedefault};
$county = '';
$country = $init_data->{countrydefault};
$zip = '';
@@ -362,8 +362,7 @@ sub print_okay {
#horrible false laziness with FS/FS/svc_acct_pop.pm::popselector
sub popselector {
-
- my( $popnum ) = @_;
+ my( $popnum, $state ) = @_;
return '<INPUT TYPE="hidden" NAME="popnum" VALUE="">' unless @$pops;
return $pops->[0]{city}. ', '. $pops->[0]{state}.
@@ -372,96 +371,61 @@ sub popselector {
if scalar(@$pops) == 1;
#my %pop = ();
- #my %popnum2pop = ();
- #foreach (@$pops) {
- # push @{ $pop{ $_->{state} }->{ $_->{ac} } }, $_;
- # $popnum2pop{$_->{popnum}} = $_;
- #}
+ #push @{ $pop{$_->{state}} }, $_ foreach @$pops;
- my $text = <<END;
- <SCRIPT>
- function opt(what,href,text) {
- var optionName = new Option(text, href, false, false)
- var length = what.length;
- what.options[length] = optionName;
- }
-END
+ my $text;
if ( $init_popstate ) {
$text .= '<INPUT TYPE="hidden" NAME="init_popstate" VALUE="'.
$init_popstate. '">';
} else {
$text .= <<END;
- function acstate_changed(what) {
- state = what.options[what.selectedIndex].text;
- what.form.popac.options.length = 0
- what.form.popac.options[0] = new Option("Area code", "-1", false, true);
-END
- }
-
- my @states = $init_popstate ? ( $init_popstate ) : keys %pop;
- foreach my $state ( sort { $a cmp $b } @states ) {
- $text .= "\nif ( state == \"$state\" ) {\n" unless $init_popstate;
-
- foreach my $ac ( sort { $a cmp $b } keys %{ $pop{$state} }) {
- $text .= "opt(what.form.popac, \"$ac\", \"$ac\");\n";
- if ($ac eq $cgi->param('popac')) {
- $text .= "what.form.popac.options[what.form.popac.length-1].selected = true;\n";
+ <SCRIPT>
+ function opt(what,href,text) {
+ var optionName = new Option(text, href, false, false)
+ var length = what.length;
+ what.options[length] = optionName;
}
- }
- $text .= "}\n" unless $init_popstate;
- }
- $text .= "popac_changed(what.form.popac)}\n";
-
- $text .= <<END;
- function popac_changed(what) {
- ac = what.options[what.selectedIndex].text;
- what.form.popnum.options.length = 0;
- what.form.popnum.options[0] = new Option("City", "-1", false, true);
-
+ function popstate_changed(what) {
+ state = what.options[what.selectedIndex].text;
+ what.form.popnum.options.length = 0;
+ what.form.popnum.options[0] = new Option("", "", false, true);
END
- foreach my $state ( @states ) {
- foreach my $popac ( keys %{ $pop{$state} } ) {
- $text .= "\nif ( ac == \"$popac\" ) {\n";
+ foreach my $popstate ( sort { $a cmp $b } keys %pop ) {
+ $text .= "\nif ( state == \"$popstate\" ) {\n";
- foreach my $pop ( @{$pop{$state}->{$popac}}) {
+ foreach my $pop ( @{$pop{$popstate}}) {
my $o_popnum = $pop->{popnum};
my $poptext = $pop->{city}. ', '. $pop->{state}.
' ('. $pop->{ac}. ')/'. $pop->{exch}. '-'. $pop->{loc};
- $text .= "opt(what.form.popnum, \"$o_popnum\", \"$poptext\");\n";
- if ($popnum == $o_popnum) {
- $text .= "what.form.popnum.options[what.form.popnum.length-1].selected = true;\n";
- }
+ $text .= "opt(what.form.popnum, \"$o_popnum\", \"$poptext\");\n"
}
$text .= "}\n";
}
- }
-
-
- $text .= "}\n</SCRIPT>\n";
-
- $text .=
- qq!<TABLE CELLPADDING="0"><TR><TD><SELECT NAME="acstate"! .
- qq!SIZE=1 onChange="acstate_changed(this)"><OPTION VALUE=-1>State!;
- $text .= "<OPTION" . ($_ eq $cgi->param('acstate') ? " SELECTED" : "") .
- ">$_" foreach sort { $a cmp $b } @states;
- $text .= '</SELECT>'; #callback? return 3 html pieces? #'</TD>';
- $text .=
- qq!<SELECT NAME="popac" SIZE=1 onChange="popac_changed(this)">!.
- qq!<OPTION>Area code</SELECT></TR><TR VALIGN="top">!;
+ $text .= "}\n</SCRIPT>\n";
- $text .= qq!<TR><TD><SELECT NAME="popnum" SIZE=1 STYLE="width: 20em"><OPTION>City!;
+ $text .=
+ qq!<SELECT NAME="popstate" SIZE=1 onChange="popstate_changed(this)">!.
+ qq!<OPTION> !;
+ $text .= "<OPTION>$_" foreach sort { $a cmp $b } keys %pop;
+ $text .= '</SELECT>'; #callback? return 3 html pieces? #'</TD><TD>';
+ }
+ $text .= qq!<SELECT NAME="popnum" SIZE=1><OPTION> !;
- #comment this block to disable initial list polulation
+ #comment this block to disable initial list population
my @initial_select = ();
- if ( scalar( @$pops ) > 100 ) {
- push @initial_select, $popnum2pop{$popnum} if $popnum2pop{$popnum};
+ if ( $init_popstate ) {
+ @initial_select = grep { $_->{state} eq $init_popstate } @$pops;
} else {
- @initial_select = @$pops;
+ if ( scalar( @$pops ) > 100 ) {
+ push @initial_select, $popnum2pop{$popnum} if $popnum2pop{$popnum};
+ } else {
+ @initial_select = @$pops;
+ }
}
foreach my $pop ( sort { $a->{state} cmp $b->{state} } @initial_select ) {
$text .= qq!<OPTION VALUE="!. $pop->{popnum}. '"'.
@@ -469,11 +433,9 @@ END
$pop->{city}. ', '. $pop->{state}.
' ('. $pop->{ac}. ')/'. $pop->{exch}. '-'. $pop->{loc};
}
-
- $text .= qq!</SELECT></TD></TR></TABLE>!;
+ $text .= '</SELECT>';
$text;
-
}
sub expselect {
diff --git a/fs_signup/FS-SignupClient/cgi/signup.html b/fs_signup/FS-SignupClient/cgi/signup.html
index 96bdac666..2b35d4a51 100755
--- a/fs_signup/FS-SignupClient/cgi/signup.html
+++ b/fs_signup/FS-SignupClient/cgi/signup.html
@@ -115,9 +115,7 @@ Contact Information
my %payby = (
'CARD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="CARD_payinfo" VALUE="" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("CARD"). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="CARD_payname" VALUE="">!,
- 'DCRD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="DCRD_payinfo" VALUE="" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("DCRD"). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="DCRD_payname" VALUE="">!,
'CHEK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="CHEK_payinfo1" VALUE="" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="CHEK_payinfo2" VALUE="" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="CHEK_month" VALUE="12"><INPUT TYPE="hidden" NAME="CHEK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="CHEK_payname" VALUE="">!,
- 'DCHK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="DCHK_payinfo1" VALUE="" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="DCHK_payinfo2" VALUE="" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="DCHK_month" VALUE="12"><INPUT TYPE="hidden" NAME="DCHK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="DCHK_payname" VALUE="">!,
'LECB' => qq!Phone bill billing<BR>${r}Phone number <INPUT TYPE="text" BANE="LECB_payinfo" VALUE="" MAXLENGTH=15 SIZE=16><INPUT TYPE="hidden" NAME="LECB_month" VALUE="12"><INPUT TYPE="hidden" NAME="LECB_year" VALUE="2037"><INPUT TYPE="hidden" NAME="LECB_payname" VALUE="">!,
'BILL' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE=""><BR><font color="#ff0000">*</font>Exp !. expselect("BILL", "12-2037"). qq!<BR><font color="#ff0000">*</font>Attention<BR><INPUT TYPE="text" NAME="BILL_payname" VALUE="Accounts Payable">!,
'COMP' => qq!Complimentary<BR><font color="#ff0000">*</font>Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE=""><BR><font color="#ff0000">*</font>Exp !. expselect("COMP"),
@@ -133,9 +131,7 @@ Contact Information
my( $account, $aba ) = split('@', $payinfo);
my %paybychecked = (
'CARD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="CARD_payinfo" VALUE="$payinfo" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("CARD", $paydate). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="CARD_payname" VALUE="$payname">!,
- 'DCRD' => qq!Credit card<BR><font color="#ff0000">*</font>$cardselect<INPUT TYPE="text" NAME="DCRD_payinfo" VALUE="$payinfo" MAXLENGTH=19><BR><font color="#ff0000">*</font>Exp !. expselect("DCRD", $paydate). qq!<BR><font color="#ff0000">*</font>Name on card<BR><INPUT TYPE="text" NAME="DCRD_payname" VALUE="$payname">!,
'CHEK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="CHEK_payinfo1" VALUE="$account" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="CHEK_payinfo2" VALUE="$aba" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="CHEK_month" VALUE="12"><INPUT TYPE="hidden" NAME="CHEK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="CHEK_payname" VALUE="$payname">!,
- 'DCHK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="DCHK_payinfo1" VALUE="$account" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="DCHK_payinfo2" VALUE="$aba" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="DCHK_month" VALUE="12"><INPUT TYPE="hidden" NAME="DCHK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="DCHK_payname" VALUE="$payname">!,
'LECB' => qq!Phone bill billing<BR>${r}Phone number <INPUT TYPE="text" BANE="LECB_payinfo" VALUE="$payinfo" MAXLENGTH=15 SIZE=16><INPUT TYPE="hidden" NAME="LECB_month" VALUE="12"><INPUT TYPE="hidden" NAME="LECB_year" VALUE="2037"><INPUT TYPE="hidden" NAME="LECB_payname" VALUE="">!,
'BILL' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE="$payinfo"><BR><font color="#ff0000">*</font>Exp !. expselect("BILL", $paydate). qq!<BR><font color="#ff0000">*</font>Attention<BR><INPUT TYPE="text" NAME="BILL_payname" VALUE="$payname">!,
'COMP' => qq!Complimentary<BR><font color="#ff0000">*</font>Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE="$payinfo"><BR><font color="#ff0000">*</font>Exp !. expselect("COMP", $paydate),
diff --git a/fs_signup/FS-SignupClient/cgi/stateselect.html b/fs_signup/FS-SignupClient/cgi/stateselect.html
index ba55bff74..39823be83 100644
--- a/fs_signup/FS-SignupClient/cgi/stateselect.html
+++ b/fs_signup/FS-SignupClient/cgi/stateselect.html
@@ -6,128 +6,74 @@ function gotoURL(object) {
}
</SCRIPT>
<FORM>
-Select your state from the map or dropdown:
-<MAP NAME=usmap>
-<area shape=poly COORDS="264,157,286,155,292,193,276,195,270,199,264,157" href="signup.cgi?init_popstate=AL">
-<area shape=poly COORDS="28,197,46,185,72,199,72,241,88,243,102,261,92,263,70,241,42,243,28,257,12,259,34,243,20,233,16,223,34,215,22,207,30,205,28,197" href="../states/Alaska.html">
-<area shape=poly COORDS="70,137,106,137,100,189,84,187,60,173,70,133,70,137,70,137" href="signup.cgi?init_popstate=AZ">
-<area shape=poly COORDS="250,153,242,179,220,177,218,171,216,145,252,143,250,155,250,153" href="signup.cgi?init_popstate=AR">
-<area shape=poly COORDS="10,79,38,81,30,109,62,151,56,173,40,169,20,145,4,101,10,75,26,79,10,79,10,79" href="signup.cgi?init_popstate=CA">
-<area shape=poly COORDS="108,103,158,107,154,141,104,137,110,101,128,103,108,103" href="signup.cgi?init_popstate=CO">
-<area shape=poly COORDS="374,107,405,105,405,123,372,125,374,107" href="signup.cgi?init_popstate=CT">
-<area shape=poly COORDS="370,143,402,145,405,157,362,157,370,143" href="signup.cgi?init_popstate=DE">
-<area shape=poly COORDS="275,193,325,187,327,197,341,219,341,233,335,237,317,215,315,205,307,195,293,203,275,193" href="signup.cgi?init_popstate=FL">
-<area shape=poly COORDS="297,153,283,155,297,191,321,189,321,169,297,153" href="signup.cgi?init_popstate=GA">
-<area shape=poly COORDS="98,233,142,263,156,251,162,239,164,229,136,231,94,221,100,235,98,233" href="signup.cgi?init_popstate=HI">
-<area shape=poly COORDS="68,21,76,21,72,35,80,47,80,55,84,65,100,69,94,93,56,83,66,51,70,19,68,21" href="signup.cgi?init_popstate=ID">
-<area shape=poly COORDS="242,91,258,89,266,123,256,139,234,109,248,87,242,91" href="signup.cgi?init_popstate=IL">
-<area shape=poly COORDS="261,95,265,123,265,131,285,117,277,91,261,95" href="signup.cgi?init_popstate=IN">
-<area shape=poly COORDS="198,87,206,111,232,109,240,99,240,91,232,79,198,87" href="signup.cgi?init_popstate=IA">
-<area shape=poly COORDS="158,111,158,135,214,139,214,127,208,113,158,111" href="signup.cgi?init_popstate=KS">
-<area shape=poly COORDS="263,133,275,129,289,115,303,121,307,129,299,135,251,141,269,131,263,133" href="signup.cgi?init_popstate=KY">
-<area shape=poly COORDS="222,179,246,179,244,197,258,193,262,213,226,209,224,177,222,179" href="signup.cgi?init_popstate=LA">
-<area shape=poly COORDS="363,37,373,59,373,47,387,31,377,9,365,15,363,37" href="signup.cgi?init_popstate=ME">
-<area shape=poly COORDS="376,159,405,159,405,175,374,177,376,159" href="signup.cgi?init_popstate=MD">
-<area shape=poly COORDS="378,74,380,88,404,88,404,72,378,74" href="signup.cgi?init_popstate=MA">
-<area shape=poly COORDS="265,73,269,83,265,93,293,91,295,71,281,53,271,53,267,69,265,73,265,73" href="signup.cgi?init_popstate=MI">
-<area shape=poly COORDS="194,31,222,33,242,35,224,51,222,63,222,73,234,79,196,85,194,31" href="signup.cgi?init_popstate=MN">
-<area shape=poly COORDS="265,159,271,199,257,201,259,195,241,197,251,155,265,159" href="signup.cgi?init_popstate=MS">
-<area shape=poly COORDS="206,113,234,111,256,139,248,147,214,145,208,111,206,113" href="signup.cgi?init_popstate=MO">
-<area shape=poly COORDS="78,23,148,31,146,67,84,63,78,35,80,19,78,23" href="signup.cgi?init_popstate=MT">
-<area shape=poly COORDS="146,85,148,103,158,105,164,109,206,109,198,85,144,87,146,85" href="signup.cgi?init_popstate=NE">
-<area shape=poly COORDS="40,83,76,87,64,151,32,109,40,83,40,83" href="signup.cgi?init_popstate=NV">
-<area shape=poly COORDS="298,11,330,9,330,25,298,25,298,11" href="signup.cgi?init_popstate=NH">
-<area shape=poly COORDS="372,127,404,125,405,141,368,139,376,125,372,127" href="signup.cgi?init_popstate=NJ">
-<area shape=poly COORDS="106,137,100,191,122,187,148,187,150,139,106,137,106,137" href="signup.cgi?init_popstate=NM">
-<area shape=poly COORDS="313,79,331,63,337,45,349,45,359,65,357,79,345,65,315,77,313,79,313,79" href="signup.cgi?init_popstate=NY">
-<area shape=poly COORDS="309,137,295,151,319,149,337,153,357,131,351,129,309,137,309,137" href="signup.cgi?init_popstate=NC">
-<area shape=poly COORDS="146,31,148,57,198,57,190,31,146,31,146,31" href="signup.cgi?init_popstate=ND">
-<area shape=poly COORDS="281,93,285,113,299,121,311,101,309,85,299,93,281,93,281,93" href="signup.cgi?init_popstate=OH">
-<area shape=poly COORDS="148,145,174,145,174,163,218,171,216,143,150,139,150,145,156,143,148,145,148,145" href="signup.cgi?init_popstate=OK">
-<area shape=poly COORDS="20,41,8,73,16,77,22,77,28,77,36,79,42,81,48,83,56,83,66,49,20,41,20,41" href="signup.cgi?init_popstate=OR">
-<area shape=poly COORDS="309,83,345,71,351,93,313,105,309,83,309,83" href="signup.cgi?init_popstate=PA">
-<area shape=poly COORDS="376,93,405,93,405,107,376,105,376,93" href="signup.cgi?init_popstate=RI">
-<area shape=poly COORDS="301,155,321,149,337,155,325,175,301,157,301,155,301,155" href="signup.cgi?init_popstate=SC">
-<area shape=poly COORDS="146,59,198,61,198,83,146,83,148,57,146,59,146,59" href="signup.cgi?init_popstate=SD">
-<area shape=poly COORDS="255,145,251,157,297,153,311,133,255,145,255,145" href="signup.cgi?init_popstate=TN">
-<area shape=poly COORDS="150,145,172,145,174,167,198,173,218,173,228,207,204,221,198,231,202,247,180,241,154,207,146,219,120,189,154,189,152,145,150,145,150,145" href="signup.cgi?init_popstate=TX">
-<area shape=poly COORDS="78,89,96,91,96,103,110,103,106,135,70,133,78,89,78,89" href="signup.cgi?init_popstate=UT">
-<area shape=poly COORDS="298,29,332,29,332,47,294,45,298,29" href="signup.cgi?init_popstate=VT">
-<area shape=poly COORDS="307,127,297,137,351,127,349,113,341,111,341,105,329,107,315,131,307,127,307,127" href="signup.cgi?init_popstate=VA">
-<area shape=poly COORDS="32,13,68,19,64,47,20,39,20,13,30,19,32,13,32,13" href="signup.cgi?init_popstate=WA">
-<area shape=poly COORDS="303,119,313,129,329,103,311,105,299,121,313,127,303,119,303,119" href="signup.cgi?init_popstate=WV">
-<area shape=poly COORDS="228,51,256,55,254,89,238,89,234,77,224,71,230,49,236,53,228,51,228,51" href="signup.cgi?init_popstate=WI">
-<area shape=poly COORDS="146,71,144,103,96,99,102,63,148,69,146,71,146,71" href="signup.cgi?init_popstate=WY">
-</MAP>
-<IMG SRC="map.gif" usemap=#usmap WIDTH=405 HEIGHT=270 border=0><BR>
+Select your state:
<SELECT NAME="init_popstate" onChange="gotoURL(this.form.init_popstate)">
<OPTION VALUE="stateselect.html"></OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=AL">Alabama</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=AK">Alaska</OPTION>
-<!--<OPTION VALUE="signup.cgi?init_popstate=AS">American Samoa</OPTION>-->
-<OPTION VALUE="signup.cgi?init_popstate=AZ">Arizona</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=AR">Arkansas</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=CA">California</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=CO">Colorado</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=CT">Connecticut</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=DE">Delaware</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=DC">District of Columbia</OPTION>
-<!--<OPTION VALUE="signup.cgi?init_popstate=FM">Federated States of Micronesia</OPTION>-->
-<OPTION VALUE="signup.cgi?init_popstate=FL">Florida</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=GA">Georgia</OPTION>
-<!--<OPTION VALUE="signup.cgi?init_popstate=GU">Guam</OPTION>-->
-<OPTION VALUE="signup.cgi?init_popstate=HI">Hawaii</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=ID">Idaho</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=IL">Illinois</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=IN">Indiana</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=IA">Iowa</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=KS">Kansas</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=KY">Kentucky</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=LA">Louisiana</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=ME">Maine</OPTION>
-<!--<OPTION VALUE="signup.cgi?init_popstate=MH">Marshall Islands</OPTION>-->
-<OPTION VALUE="signup.cgi?init_popstate=MD">Maryland</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=MA">Massachusetts</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=MI">Michigan</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=MN">Minnesota</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=MS">Mississippi</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=MO">Missouri</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=MT">Montana</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=NE">Nebraska</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=NV">Nevada</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=NH">New Hampshire</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=NJ">New Jersey</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=NM">New Mexico</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=NY">New York</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=NC">North Carolina</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=ND">North Dakota</OPTION>
-<!--<OPTION VALUE="signup.cgi?init_popstate=MP">Northern Mariana Islands</OPTION>-->
-<OPTION VALUE="signup.cgi?init_popstate=OH">Ohio</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=OK">Oklahoma</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=OR">Oregon</OPTION>
-<!--<OPTION VALUE="signup.cgi?init_popstate=PW">Palau</OPTION>-->
-<OPTION VALUE="signup.cgi?init_popstate=PA">Pennsylvania</OPTION>
-<!--<OPTION VALUE="signup.cgi?init_popstate=PR">Puerto Rico</OPTION>-->
-<OPTION VALUE="signup.cgi?init_popstate=RI">Rhode Island</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=SC">South Carolina</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=SD">South Dakota</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=TN">Tennessee</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=TX">Texas</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=UT">Utah</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=VT">Vermont</OPTION>
-<!--<OPTION VALUE="signup.cgi?init_popstate=VI">Virgin Islands</OPTION>-->
-<OPTION VALUE="signup.cgi?init_popstate=VA">Virginia</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=WA">Washington</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=WV">West Virginia</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=WI">Wisconsin</OPTION>
-<OPTION VALUE="signup.cgi?init_popstate=WY">Wyoming</OPTION>
-<!--<OPTION VALUE="signup.cgi?init_popstate=AE">Armed Forces Africa</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=AL">ALABAMA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=AK">ALASKA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=AS">AMERICAN SAMOA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=AZ">ARIZONA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=AR">ARKANSAS</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=CA">CALIFORNIA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=CO">COLORADO</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=CT">CONNECTICUT</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=DE">DELAWARE</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=DC">DISTRICT OF COLUMBIA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=FM">FEDERATED STATES OF MICRONESIA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=FL">FLORIDA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=GA">GEORGIA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=GU">GUAM</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=HI">HAWAII</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=ID">IDAHO</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=IL">ILLINOIS</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=IN">INDIANA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=IA">IOWA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=KS">KANSAS</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=KY">KENTUCKY</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=LA">LOUISIANA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=ME">MAINE</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=MH">MARSHALL ISLANDS</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=MD">MARYLAND</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=MA">MASSACHUSETTS</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=MI">MICHIGAN</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=MN">MINNESOTA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=MS">MISSISSIPPI</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=MO">MISSOURI</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=MT">MONTANA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=NE">NEBRASKA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=NV">NEVADA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=NH">NEW HAMPSHIRE</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=NJ">NEW JERSEY</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=NM">NEW MEXICO</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=NY">NEW YORK</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=NC">NORTH CAROLINA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=ND">NORTH DAKOTA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=MP">NORTHERN MARIANA ISLANDS</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=OH">OHIO</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=OK">OKLAHOMA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=OR">OREGON</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=PW">PALAU</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=PA">PENNSYLVANIA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=PR">PUERTO RICO</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=RI">RHODE ISLAND</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=SC">SOUTH CAROLINA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=SD">SOUTH DAKOTA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=TN">TENNESSEE</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=TX">TEXAS</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=UT">UTAH</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=VT">VERMONT</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=VI">VIRGIN ISLANDS</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=VA">VIRGINIA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=WA">WASHINGTON</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=WV">WEST VIRGINIA</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=WI">WISCONSIN</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=WY">WYOMING</OPTION>
+<OPTION VALUE="signup.cgi?init_popstate=AE">Armed Forces Africa</OPTION>
<OPTION VALUE="signup.cgi?init_popstate=AA">Armed Forces Americas</OPTION>
<OPTION VALUE="signup.cgi?init_popstate=AE">Armed Forces Canada</OPTION>
<OPTION VALUE="signup.cgi?init_popstate=AE">Armed Forces Europe</OPTION>
<OPTION VALUE="signup.cgi?init_popstate=AE">Armed Forces Middle East</OPTION>
<OPTION VALUE="signup.cgi?init_popstate=AP">Armed Forces Pacific</OPTION>
--->
</SELECT>
</FORM>
</BODY>
diff --git a/fs_signup/FS-SignupClient/fs_signupd b/fs_signup/FS-SignupClient/fs_signupd
new file mode 100755
index 000000000..85bd68a2f
--- /dev/null
+++ b/fs_signup/FS-SignupClient/fs_signupd
@@ -0,0 +1,86 @@
+#!/usr/bin/perl -Tw
+#
+# fs_signupd
+#
+# This is run REMOTELY over ssh by fs_signup_server.
+
+use strict;
+use Socket;
+use Storable qw(nstore_fd fd_retrieve);
+use IO::Handle;
+
+use vars qw( $Debug );
+
+$Debug = 1;
+
+my $fs_signupd_socket = "/usr/local/freeside/fs_signupd_socket";
+my $pid_file = "$fs_signupd_socket.pid";
+
+$ENV{'PATH'} ='/usr/local/bin:/usr/bin:/usr/ucb:/bin';
+$ENV{'SHELL'} = '/bin/sh';
+$ENV{'IFS'} = " \t\n";
+$ENV{'CDPATH'} = '';
+$ENV{'ENV'} = '';
+$ENV{'BASH_ENV'} = '';
+
+$|=1;
+
+warn "[fs_signupd] Reading init data...\n" if $Debug;
+my $init_data = fd_retrieve(\*STDIN);
+
+warn "[fs_signupd] Creating $fs_signupd_socket\n" if $Debug;
+my $uaddr = sockaddr_un($fs_signupd_socket);
+my $proto = getprotobyname('tcp');
+socket(Server,PF_UNIX,SOCK_STREAM,0) or die "socket: $!";
+unlink($fs_signupd_socket);
+bind(Server, $uaddr) or die "bind: $!";
+listen(Server,SOMAXCONN) or die "listen: $!";
+
+if ( -e $pid_file ) {
+ open(PIDFILE,"<$pid_file");
+ #chomp( my $old_pid = <PIDFILE> );
+ my $old_pid = <PIDFILE>;
+ close PIDFILE;
+ $old_pid =~ /^(\d+)$/;
+ kill 'TERM', $1;
+}
+open(PIDFILE,">$pid_file");
+print PIDFILE "$$\n";
+close PIDFILE;
+
+warn "[fs_signupd] Entering main loop...\n" if $Debug;
+my $paddr;
+for ( ; $paddr = accept(Client,Server); close Client) {
+
+ chop( my $command = <Client> );
+
+ if ( $command eq "signup_info" ) {
+
+ warn "[fs_signupd] sending signup info...\n" if $Debug;
+ nstore_fd($init_data, \*Client) or die "can't send init data: $!";
+ Client->flush;
+
+ } elsif ( $command eq "new_customer" ) {
+
+ #inefficient...
+
+ warn "[fs_signupd] reading customer signup...\n" if $Debug;
+ my $signup_data = fd_retrieve(\*Client);
+
+ warn "[fs_signupd] sending customer data to remote server...\n" if $Debug;
+ nstore_fd($signup_data, \*STDOUT) or die "can't send signup data: $!";
+ STDOUT->flush;
+
+ warn "[fs_signupd] reading error from remote server...\n" if $Debug;
+ my $error = <STDIN>;
+
+ warn "[fs_signupd] sending error to local client...\n" if $Debug;
+ print Client $error;
+ Client->flush;
+
+ } else {
+ die "unexpected command from client: $command";
+ }
+
+}
+