_._ use User; use Widgets; use URI::Escape; use DBS::HTMLInput; Apache->request->header_out("expires"=>"0"); my $usr = new User(); my $fmt = new Widgets( LOGIN => !$usr->loggedIn ); # only use the cgi params if this was a post my $parms = ( ($ENV{REQUEST_METHOD} ne 'GET') ? $usr->{CGI} : undef ); #Apache->request->log_error("parms = $parms"); my $pgb = new DBS::HTMLInput( 'DB'=> $usr->{DB}, 'Table'=> 'users', 'CGI'=> $parms, 'Hide'=> [ 'cityid' ], ); #Apache->request->log_error("At construction, $pgb => userid = $$pgb{userid}"); # where do you want to go next ? $pgb->{next} ||= $usr->{CGI}->param('next'); $pgb->{next} ||= "$ENV{HTTP_REFERER}"; $pgb->{next} = "/top/index.html" if ($pgb->{next}=~/login.html/); $pgb->{reload} ||= $usr->{CGI}->param('reload'); my ($message, $tag, $value); #while (($tag, $value) = each %{$pgb} ) { # print "$tag = $value\n"; #} if ($pgb->{join} eq 'Cancel') { if ($usr->{CGI}->param("reload") eq 'yes') { print qq{ }; } else { print $usr->{CGI}->redirect($pgb->{next}); } } elsif ($pgb->{join} eq 'Submit this form') { if ($pgb->{password} ne $pgb->{password2}) { $message = "
Your passwords didn't match, you must type the same password twice"; } elsif (length($pgb->{password}) < 6) { $message = "
The password you choose must be at least 6 charactors long"; } else { if ($pgb->{city} && $pgb->{state}) { delete( $pgb->{province} ); delete( $pgb->{country} ); } else { $pgb->{state} = delete( $pgb->{province} ); } $pgb->insert_the; # if the user just became a full fledged user, fixup there # tracks if ($usr->unregistered && $pgb->{email} eq $usr->{email}) { $usr->{DB}->do("exec user_promote '$$usr{userid}', '$$pgb{userid}'"); } if ($pgb->{Errors}) { if (${$pgb->{Errors}}[0] =~/^2601/) { $message = qq[
ID "$pgb->{userid}" has already been chosen, please choose another]; delete $pgb->{userid}; } elsif (${$pgb->{Errors}}[0] =~/^\d+:\d+:/) { Apache->request->log_error("error while processing join.html\n".$pgb->errors); $message = "
We are currently unable to process membership request"; } else { $message = "
".${$pgb->{Errors}}[0].""; } } else { $usr->setId($pgb->{userid}); $usr->validate($pgb->{password2}); $usr->login; if ($usr->{CGI}->param("reload") eq 'yes') { print qq{ }; } else { print $usr->{CGI}->redirect($pgb->{next}); } } } } elsif ($usr->unregistered) { foreach ( qw( name email address1 address2 city state zip ) ) { $pgb->{$_} = $usr->{$_}; } } my %in; foreach ('userid','password','name','email','address1','address2','city','state','country','zip') { $in{$_} = $pgb->input_field($_); } _._ _._header_nav $fmt 'Privacy'_._

Sign up! easy as A-B-C, 1-2-3, do-re-mi....
_._ $message ||= <all of NEWWW's Personalized Services, including:
Your Calendar, Contests, Smart-E-vents
Web Space, E-mail, Calendar Accounts, SmartForms
BLOCK ;print $message;_._
(A) Choose Your NEWWW ID and Password
 
NEWWW ID:
(examples: rozb or frank-N-stein)
_._=$in{userid}_._
Password:
at least 6 characters
_._=$in{password}_._
Re-enter Password:
your Full Name _._=$in{name}_._
Current E-mail Address:
used to verify your account

_._=$in{email}_._
 
(B) NEWWW User Information
This information in required to enter all NEWWW contests and make requests for further details about specific events. Fill this out once and you won't have to do it again and again, thanks to our SmartForm system. The information below will not be released by NEWWW to any person or organization without you permission. See our Privacy Policy for more information.
your Address: _._=$in{address1}_._
if more than one line: _._=$in{address2}_._
your City: _._=$in{city}_._ and State: _._=$in{state}_._ if in the US
-OR- Province 
and country:
  _._=$in{country}_._
your Zip Code:
or post code
_._=$in{zip}_._
 
(C) Review and Submit
Please review your entries above.

 

_._trailer_nav $fmt_._