X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=maps%2Fbin%2Fsignup.cgi;h=fb4541ed2e048719862d47f2ac5fd46370646a8f;hb=16babf81ce331af378de565ba73e927ff5491f65;hp=a4296982d83662d7f80b33ee3c15144f7e77a5ba;hpb=020a4a5ea2be725b155cae3a2cadc9aba3911b9b;p=clearscm.git diff --git a/maps/bin/signup.cgi b/maps/bin/signup.cgi index a429698..fb4541e 100755 --- a/maps/bin/signup.cgi +++ b/maps/bin/signup.cgi @@ -18,39 +18,39 @@ use warnings; use FindBin; $0 = $FindBin::Script; -use lib $FindBin::New; +use lib "$FindBin::Bin/../lib"; use MAPS; use MAPSWeb; use CGI qw (:standard); -my $userid = param ("userid"); -my $fullname = param ("fullname"); -my $email = param ("email"); -my $password = param ("password"); -my $repeated_password = param ("repeated_password"); -my $mapspop = param ("MAPSPOP"); -my $history = param ("history"); -my $days = param ("days"); -my $dates = param ("dates"); -my $tag_and_forward = param ("tag_and_forward"); +my $userid = param('userid'); +my $fullname = param('fullname'); +my $email = param('email'); +my $password = param('password'); +my $repeated_password = param('repeated_password'); +my $mapspop = param('MAPSPOP'); +my $history = param('history'); +my $days = param('days'); +my $dates = param('dates'); +my $tag_and_forward = param('tag_and_forward'); my $message; sub MyError { my $errmsg = shift; $userid = Heading ( - "getcookie", - "", - "Signup", - "Signup" + 'getcookie', + '', + 'Signup', + 'Signup' ); NavigationBar $userid; - print h2 {-align => "center", - -class => "error"}, "Error: " . $errmsg; + print h2 {-align => 'center', + -class => 'error'}, 'Error: ' . $errmsg; Footing; @@ -59,42 +59,42 @@ sub MyError { sub Body { # Check required fields - if ($userid eq "" ) { - MyError "You must specify a userid!"; + if ($userid eq '' ) { + MyError 'You must specify a userid!'; } # if - if ($email eq "" ) { - MyError "You must specify an email address!"; + if ($email eq '' ) { + MyError 'You must specify an email address!'; } # if - if ($password eq "") { - MyError "You must specify a password!"; + if ($password eq '') { + MyError 'You must specify a password!'; } # if - if ($fullname eq "") { - MyError "You must specify your full name!"; + if ($fullname eq '') { + MyError 'You must specify your full name!'; } # if # Password field checks if (length $password < 6) { - MyError "Password must be longer than 6 characters!"; + MyError 'Password must be longer than 6 characters!'; } # if if ($password ne $repeated_password) { - MyError "Passwords do not match"; + MyError 'Passwords do not match'; } # if - my $status = AddUser $userid, $fullname, $email, $password; + my $status = AddUser($userid, $fullname, $email, $password); if ($status ne 0) { - MyError "Username already exists"; + MyError 'Username already exists'; } # if my %options = ( - "MAPSPOP" => $mapspop, - "History" => $history, - "Page" => $days, - "Dates" => $dates, - "Tag&Forward" => $tag_and_forward + MAPSPOP => $mapspop, + History => $history, + Page => $days, + Dates => $dates, + 'Tag&Forward' => $tag_and_forward, ); - my $status = AddUserOptions $userid, %options; + my $status = AddUserOptions($userid, %options); if ($status == 0) { print redirect ("/maps/?errormsg=User account \"$userid\" created.
You may now login");