1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
4 <TITLE><%= $agent || ( $signup_service eq 'svc_phone' ? 'ITSP' : 'ISP' ) %> Signup form</TITLE>
7 <BODY BGCOLOR="<%= $body_bgcolor || '#e8e8e8' %>" onUnload="myclose()">
9 <script type="text/javascript">
11 function myopen(filename,windowname,properties) {
13 mywindow = window.open(filename,windowname,properties);
22 <%= $OUT .= $body_header
24 ( $agent || ( $signup_service eq 'svc_phone' ? 'ITSP' : 'ISP' ) ).
25 ' Signup form</FONT><BR><BR>';
28 <FONT SIZE="+1" COLOR="#ff0000"><%= $error %></FONT>
30 <FORM NAME="OneTrueForm" ACTION="<%= $self_url %>" METHOD=POST onSubmit="document.OneTrueForm.signup.disabled=true">
31 <INPUT TYPE="hidden" NAME="prepaid_shortform" VALUE="<%= $prepaid_shortform %>">
32 <INPUT TYPE="hidden" NAME="session" VALUE="<%= $session_id %>">
33 <INPUT TYPE="hidden" NAME="action" VALUE="process_signup">
34 <INPUT TYPE="hidden" NAME="agentnum" VALUE="<%= $agentnum %>">
35 <INPUT TYPE="hidden" NAME="referral_custnum" VALUE="<%= $referral_custnum %>">
36 <INPUT TYPE="hidden" NAME="ss" VALUE="">
37 <input type="hidden" name="payby">
39 $OUT = join("\n",map { my $method = $_ ; map { qq|<input type="hidden" name="${method}_$_" />| } qw / payinfo payinfo1 payinfo2 payname paystate paytype paycvv month year type / } @payby);
43 $OUT = join("\n", map { qq|<input type="hidden" name="$_" />| } qw / promo_code reg_code pkgpart username _password _password2 sec_phrase popnum mac_addr countrycode phonenum sip_password pin / );
47 if ($override_ban_warn) {
48 $OUT .= 'Are you sure you want to sign up again? <SELECT NAME="override_ban_warn"><OPTION VALUE="0">No<OPTION VALUE="1">Yes</SELECT><BR><BR>';
54 Where did you hear about our service? <SELECT NAME="refnum">
56 $OUT .= '<OPTION VALUE="">' unless $refnum;
57 foreach my $part_referral ( @part_referral ) {
58 $OUT .= '<OPTION VALUE="'. $part_referral->{'refnum'}. '"';
59 $OUT .= ' SELECTED' if $part_referral->{'refnum'} == $refnum;
60 $OUT .= '>'. $part_referral->{'referral'};
65 <%= unless ( $prepaid_template_custnum && $prepaid_shortform ) {
67 my $bgcolor = $box_bgcolor || '#c0c0c0';
70 <TABLE BGCOLOR="$bgcolor" BORDER=0 CELLSPACING=0 WIDTH="100%">
72 <TH ALIGN="right"><font color="#ff0000">*</font>Contact name<BR>(last, first)</TH>
73 <TD COLSPAN=5><INPUT TYPE="text" NAME="last" VALUE="$last">,
74 <INPUT TYPE="text" NAME="first" VALUE="$first"></TD>
77 <TD ALIGN="right">Company</TD>
78 <TD COLSPAN=5><INPUT TYPE="text" NAME="company" SIZE=70 VALUE="$company"></TD>
81 <TH ALIGN="right"><font color="#ff0000">*</font>Address</TH>
82 <TD COLSPAN=5><INPUT TYPE="text" NAME="address1" SIZE=70 VALUE="$address1"></TD>
85 <TD ALIGN="right"> </TD>
86 <TD COLSPAN=5><INPUT TYPE="text" NAME="address2" SIZE=70 VALUE="$address2"></TD>
89 <TH ALIGN="right"><font color="#ff0000">*</font>City</TH>
90 <TD><INPUT TYPE="text" NAME="city" VALUE="$city"></TD> !;
92 my ($county_html, $state_html, $country_html) =
94 selected_county => $county,
95 selected_state => $state,
96 selected_country => $country,
97 default_state => $statedefault,
98 default_country => $countrydefault,
99 locales => \@cust_main_county,
102 $county_out = ($county_html =~ /SELECT/) ? 'County/State' : 'State';
103 $OUT .= qq!<TH ALIGN="right"><font color="#ff0000">*</font> $county_out </TH>
105 $county_html $state_html
107 <TH><font color="#ff0000">*</font>Zip</TH>
108 <TD><INPUT TYPE="text" NAME="zip" SIZE=10 VALUE="$zip"></TD>
111 <TH ALIGN="right"><font color="#ff0000">*</font>Country</TH>
112 <TD>$country_html</TD>
114 <TD ALIGN="right">Day Phone</TD>
115 <TD COLSPAN=5><INPUT TYPE="text" NAME="daytime" VALUE="$daytime" SIZE=18></TD>
118 <TD ALIGN="right">Night Phone</TD>
119 <TD COLSPAN=5><INPUT TYPE="text" NAME="night" VALUE="$night" SIZE=18></TD>
122 <TD ALIGN="right">Fax</TD>
123 <TD COLSPAN=5><INPUT TYPE="text" NAME="fax" VALUE="$fax" SIZE=12></TD>
126 if ( $stateid_enabled ) {
127 my ($county_html, $state_html, $country_html) =
129 prefix => 'stateid_',
130 default_state => $statedefault,
131 default_country => $countrydefault,
132 locales => \@cust_main_county,
134 $OUT .= qq!<TR><TD ALIGN="right">!. $label{stateid}.'</TD>';
135 $OUT .= qq!<TD><INPUT TYPE="text" NAME="stateid" VALUE="$stateid" SIZE=12></TD>!;
136 $OUT .= qq!<TD ALIGN="right">!. $label{stateid_state} .'</TD>';
137 $OUT .="<TD COLSPAN=3>$county_html $state_html</TD></TR>";
140 </TABLE><font color="#ff0000">*</font> required fields<BR>
149 <BR>Billing information<TABLE BGCOLOR="<%= $box_bgcolor || '#c0c0c0' %>" BORDER=0 CELLSPACING=0 WIDTH="100%">
154 unless ( $emailinvoiceonly ) {
155 $OUT .= '<INPUT TYPE="checkbox" NAME="invoicing_list_POST" VALUE="POST"';
156 my @invoicing_list = split(', ', $invoicing_list );
158 if ! @invoicing_list || grep { $_ eq 'POST' } @invoicing_list;
159 $OUT .= '> Postal mail invoice'; }
164 <TR><TD><%= $OUT = ( $emailinvoiceonly ? q|<font color="#ff0000">*</font>| : q|| ) %> Email invoice <INPUT TYPE="text" NAME="invoicing_list" VALUE="<%= join(', ', grep { $_ ne 'POST' } split(', ', $invoicing_list ) ) %>">
166 <%= ( scalar(@payby) > 1 or 1 ) ? '<TR><TD>Billing type ' : '' %>
168 <TABLE BGCOLOR="#c0c0c0" BORDER=1 WIDTH="100%">
173 my $cardselect = '<SELECT NAME="CARD_type"><OPTION></OPTION>';
174 foreach ( keys %card_types ) {
175 $selected = $CARD_type eq $card_types{$_} ? 'SELECTED' : '';
176 $cardselect .= qq!<OPTION $selected VALUE="$card_types{$_}">$_</OPTION>!;
178 $cardselect .= '</SELECT>';
181 '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="">!,
182 '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="">!,
183 '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> Type <SELECT NAME="CHEK_paytype">!. join('', map {qq!<OPTION VALUE="$_">$_</OPTION>!} @paytypes). qq!</SELECT><BR>{$r}Bank State <INPUT TYPE="text" NAME="CHEK_paystate" VALUE="" SIZE=5 MAXLENGTH=4><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="">!,
184 'DCHK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="DCHK_payinfo1" VALUE="" MAXLENGTH=10> Type <SELECT NAME="DCHK_paytype">!. join('', map {qq!<OPTION VALUE="$_">$_</OPTION>!} @paytypes). qq!</SELECT><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="DCHK_payinfo2" VALUE="" SIZE=10 MAXLENGTH=9><BR>{$r}Bank State <INPUT TYPE="text" NAME="DCHK_paystate" VALUE="" SIZE=5 MAXLENGTH=4><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="">!,
185 'LECB' => qq!Phone bill billing<BR>${r}Phone number <INPUT TYPE="text" NAME="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="">!,
186 'BILL' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE=""><BR><INPUT TYPE="hidden" NAME="BILL_month" VALUE="12"><INPUT TYPE="hidden" NAME="BILL_year" VALUE="2037">Attention<INPUT TYPE="text" NAME="BILL_payname" VALUE="Accounts Payable">!,
187 '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"),
188 'PREPAY' => qq!Prepaid card<BR><font color="#ff0000">*</font><INPUT TYPE="text" NAME="PREPAY_payinfo" VALUE="" MAXLENGTH=80>!,
191 if ( $cvv_enabled ) {
192 foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5
193 $payby{$payby} .= qq!<TR><TD ALIGN="right">CVV2 (<A HREF="javascript:myopen('cvv2.html','cvv2','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=480,height=288')">help</A>)</TD><TD><INPUT TYPE="text" NAME=${payby}_paycvv VALUE="" SIZE=4 MAXLENGTH=4></TD></TR>!;
196 if ( $paystate_enabled ) {
197 foreach my $payby ( grep { exists $payby{$_} } qw(CHEK DCHK) ) {
198 my ($county_html, $state_html, $country_html) =
200 prefix => "${payby}_pay",
201 default_state => $statedefault,
202 default_country => $countrydefault,
203 locales => \@cust_main_county,
205 $payby{$payby} .= "<BR>${r}Bank state $county_html $state_html";
209 my( $account, $aba ) = split('@', $payinfo);
211 'CARD' => '<TABLE BGCOLOR="'. ( $box_bgcolor || '#c0c0c0' ). qq!" BORDER=0 CELLSPACING=0 WIDTH="100%"><TR><TD ALIGN="right"><font color="#ff0000">*</font> Card type</TD><TD>$cardselect</TD></TR><TR><TD ALIGN="right"><font color="#ff0000">*</font> Card number</TD><TD><INPUT TYPE="text" NAME="CARD_payinfo" VALUE="$payinfo" MAXLENGTH=19></TD></TR><TR><TD ALIGN="right"><font color="#ff0000">*</font> Expration</TD><TD>!. expselect("CARD", $paydate). qq!</TD></TR><TR><TD ALIGN="right"><font color="#ff0000">*</font> Name on card</TD><TD><INPUT TYPE="text" NAME="CARD_payname" VALUE="$payname"></TD></TR>!,
212 '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">!,
213 'CHEK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="CHEK_payinfo1" VALUE="$account" MAXLENGTH=10> Type <SELECT NAME="CHEK_paytype">!. join('', map {qq!<OPTION VALUE="$_"!.($paytype eq $_ ? 'SELECTED' : '').">$_</OPTION>"} @paytypes). qq!</SELECT><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">!,
214 'DCHK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="DCHK_payinfo1" VALUE="$account" MAXLENGTH=10> Type <SELECT NAME="DCHK_paytype">!. join('', map {qq!<OPTION VALUE="$_"!.($paytype eq $_ ? 'SELECTED' : '').">$_</OPTION>"} @paytypes). qq!</SELECT><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="">!,
215 '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="">!,
216 'BILL' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE="$payinfo"><BR><INPUT TYPE="hidden" NAME="BILL_month" VALUE="12"><INPUT TYPE="hidden" NAME="BILL_year" VALUE="2037">Attention<INPUT TYPE="text" NAME="BILL_payname" VALUE="$payname">!,
217 '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),
218 'PREPAY' => qq!Prepaid card<BR><font color="#ff0000">*</font><INPUT TYPE="text" NAME="PREPAY_payinfo" VALUE="$payinfo" MAXLENGTH=80>!,
221 if ( $cvv_enabled ) {
222 foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5
223 $paybychecked{$payby} .= qq!<TR><TD ALIGN="right">CVV2 (<A HREF="javascript:myopen('cvv2.html','cvv2','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=480,height=288')">help</A>)</TD><TD><INPUT TYPE="text" NAME=${payby}_paycvv VALUE="$paycvv" SIZE=4 MAXLENGTH=4></TD></TR>!;
226 if ( $paystate_enabled ) {
227 foreach my $payby ( grep { exists $payby{$_} } qw(CHEK DCHK) ) {
228 my ($county_html, $state_html, $country_html) =
230 prefix => "${payby}_pay",
231 selected_county => $county,
232 selected_state => $state,
233 selected_country => $country,
234 default_state => $statedefault,
235 default_country => $countrydefault,
236 locales => \@cust_main_county,
238 $paybychecked{$payby} .= "<BR>${r}Bank state $county_html $state_html";
242 my %payby_index = ( 'CARD' => qq/Credit Card/,
243 'DCRD' => qq/Credit Card/,
246 'LECB' => qq/Phone Bill Billing/,
247 'BILL' => qq/Billing/,
248 'COMP' => qq/Complimentary/,
249 'PREPAY' => qq/Prepaid Card/,
253 tie my %options, 'Tie::IxHash', ();
255 foreach my $payby_option ( @payby ) {
256 $options{$payby_option} = $payby_index{$payby_option};
259 my $selected_layer = ( grep { $_ eq 'CARD' } @payby ) ? 'CARD' : $payby[0];
261 HTML::Widgets::SelectLayers->new(
262 options => \%options,
263 selected_layer => $selected_layer,
264 form_name => 'dummy',
265 html_between => '</td></tr></table>',
266 form_action => 'dummy.cgi',
267 layer_callback => sub { my $layer = shift; return ( shift @hide_payment_fields ? '' : $paybychecked{$layer} ) . '</TABLE>'; },
273 </TR></TABLE><font color="#ff0000">*</font> required fields
274 <FORM name="signup_form" action="<%= $self_url %>" METHOD="POST" onsubmit="return fixup_form();"><BR><BR>First package
275 <INPUT TYPE="hidden" NAME="promo_code" VALUE="<%= $promo_code %>">
276 <INPUT TYPE="hidden" NAME="reg_code" VALUE="<%= $reg_code %>">
277 <TABLE BGCOLOR="<%= $box_bgcolor || '#c0c0c0' %>" BORDER=0 CELLSPACING=0 WIDTH="100%">
279 <TD COLSPAN=2><SELECT NAME="pkgpart">
282 $OUT .= '<OPTION VALUE="">(none)'
283 unless scalar(@part_pkg) == 1 or $default_pkgpart;
284 foreach my $part_pkg ( @part_pkg ) {
285 $OUT .= '<OPTION VALUE="'. $part_pkg->{'pkgpart'}. '"';
286 $OUT .= ' SELECTED' if $pkgpart && $part_pkg->{'pkgpart'} == $pkgpart;
287 $OUT .= '>'. $part_pkg->{'pkg'};
294 if ( $signup_service eq 'svc_phone' ) {
296 $OUT .= '<TR><TD ALIGN="right">Phone number</TD><TD>'.
297 didselector( 'field' => 'phonenum',
298 'svcpart' => $default_svcpart,
304 <TD ALIGN="right">Voicemail PIN</TD>
305 <TD><INPUT TYPE="pin" NAME="pin" VALUE="$pin"></TD>
313 <TD ALIGN="right">Username</TD>
314 <TD><INPUT TYPE="text" NAME="username" VALUE="$username"></TD>
317 <TD ALIGN="right">Password</TD>
318 <TD><INPUT TYPE="password" NAME="_password" VALUE="$_password"></TD>
321 <TD ALIGN="right">Re-enter Password</TD>
322 <TD><INPUT TYPE="password" NAME="_password2" VALUE="$_password2"></TD>
326 if ( $security_phrase ) {
329 <TD ALIGN="right">Security Phrase</TD>
330 <TD><INPUT TYPE="text" NAME="sec_phrase" VALUE="$sec_phrase">
335 $OUT .= '<INPUT TYPE="hidden" NAME="sec_phrase" VALUE="">';
345 <INPUT TYPE="hidden" NAME="mac_addr" VALUE="$mac_addr">
352 if ( @svc_acct_pop ) {
353 $OUT .= '<TR><TD ALIGN="right">Access number</TD><TD>'.
354 popselector( 'popnum' => $popnum,
355 'pops' => \@svc_acct_pop,
356 'init_popstate' => $init_popstate,
358 'acstate' => $acstate,
362 $OUT .= popselector(popnum=>$popnum, pops=>\@svc_acct_pop);
370 if ( @optional_packages ) {
372 foreach my $ii ( 0 .. $#optional_packages) {
373 my $friendly_index = $ii + 1;
374 if ($optional_packages[$ii]) {
375 push @html, qq|<BR>Optional Package #$friendly_index <br />|,'<table bgcolor="#c0c0c0"><tr><td>';
377 push @html, qq|<select name="optional_package${ii}">|;
378 push @html, qq|<option value="none"></option>|;
379 push @html, map { qq|<option value="$_->{pkgpart}">$_->{pkg}</option>| } @{$optional_packages[$ii]};
380 push @html, q|</select>|;
382 push @html, '</td></tr></table>';
384 $OUT = join("\n", @html);
391 <BR><INPUT TYPE="submit" NAME="signup" VALUE="Signup">
392 <script language="JavaScript">
394 function fixup_form() {
396 // copy payment method data up to OneTrueForm
398 var payment_method_elements = new Array( 'payinfo', 'payinfo1', 'payinfo2', 'payname', 'paycvv' , 'paystate', 'paytype', 'month', 'year','type' );
399 var payment_method_form_name = document.OneTrueForm.select.options[document.OneTrueForm.select.selectedIndex].value;
400 document.OneTrueForm.elements['payby'].value = payment_method_form_name;
401 var payment_method_form = document.forms[payment_method_form_name];
403 for ( ii = 0 ; ii < payment_method_elements.length ; ii++ ) {
404 var true_element_name = payment_method_form_name + '_' + payment_method_elements[ii];
405 copyelement ( payment_method_form.elements[true_element_name],
406 document.OneTrueForm.elements[true_element_name] );
409 // Copy signup details to OneTrueForm
411 var signup_elements = new Array (
412 'promo_code', 'reg_code', 'pkgpart',
413 'username', '_password', '_password2', 'sec_phrase', 'popnum',
415 'countrycode', 'phonenum', 'sip_password', 'pin'
418 for ( ii = 0 ; ii < signup_elements.length ; ii ++ ) {
419 copyelement ( document.signup_form.elements[signup_elements[ii]],
420 document.OneTrueForm.elements[signup_elements[ii]]);
423 document.OneTrueForm.submit();
427 function copyelement(from, to) {
428 // alert ( from + ' ' + to );
430 if ( from == undefined ) {
433 if ( from.type == 'select-one' ) {
434 to.value = from.options[from.selectedIndex].value;
435 } else if ( from.type == 'checkbox' ) {
436 if ( from.checked ) {
437 to.value = from.value;
442 if ( from.value == undefined ) {
445 to.value = from.value;
448 // alert(from.name + " (" + from.type + "): " + to.name + " => " + to.value);
454 <%= $OUT .= $body_footer %>