X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=maps%2Fbin%2Fupdateprofile.cgi;h=db2e20136103ff8e999e33170f6278d2bc1b1c11;hb=fbbb29c20458b289f2e66825684a21b5143833a4;hp=a2f9a82a064eec781e78f112ed3c8353a3120516;hpb=020a4a5ea2be725b155cae3a2cadc9aba3911b9b;p=clearscm.git diff --git a/maps/bin/updateprofile.cgi b/maps/bin/updateprofile.cgi index a2f9a82..db2e201 100755 --- a/maps/bin/updateprofile.cgi +++ b/maps/bin/updateprofile.cgi @@ -2,8 +2,8 @@ ################################################################################ # # File: $RCSfile: updateprofile.cgi,v $ -# Revision: $Revision: 1.1 $ -# Description: Update the users profile +# Revision: $Revision: 1.1 $ +# Description: Update the users profile # Author: Andrew@DeFaria.com # Created: Mon Jan 16 20:25:32 PST 2006 # Modified: $Date: 2013/06/12 14:05:47 $ @@ -18,7 +18,7 @@ use warnings; use FindBin; $0 = $FindBin::Script; -use lib $FindBin::Bin; +use lib "$FindBin::Bin/../lib"; use MAPS; use MAPSWeb; @@ -27,56 +27,57 @@ use CGI qw (:standard); my $userid; my $Userid; -my $fullname = param ("fullname"); -my $email = param ("email"); -my $old_password = param ("old_password"); -my $new_password = param ("new_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 $fullname = param('fullname'); +my $email = param('email'); +my $old_password = param('old_password'); +my $new_password = param('new_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'); sub Body { 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, ); - if (defined $old_password && $old_password ne "") { - my $dbpassword = UserExists $userid; - my $encrypted_old_password = Encrypt $old_password, $userid; + if ($old_password && $old_password ne '') { + my $dbpassword = UserExists($userid); + my $encrypted_old_password = Encrypt($old_password, $userid); if ($dbpassword ne $encrypted_old_password) { - DisplayError "Your old password was not correct!"; + DisplayError 'Your old password was not correct!'; } # if } # if - if (UpdateUser ($userid, $fullname, $email, $new_password) != 0) { + if (UpdateUser($userid, $fullname, $email, $new_password) != 0) { DisplayError "Unable to update user record for user $userid"; } # if - if (UpdateUserOptions ($userid, %options) != 0) { + if (UpdateUserOptions($userid, %options) != 0) { DisplayError "Unable to update user options for user $userid"; } # if - print h2 {-class => "header", - -align => "center"}, + print h2 {-class => 'header', + -align => 'center'}, "${Userid}'s profile has been updated"; } # Body $userid = Heading ( - "getcookie", - "", - "Update Profile", - "Update user's profile" + 'getcookie', + '', + 'Update Profile', + "Update user's profile", ); $Userid = ucfirst $userid; -SetContext $userid; -NavigationBar $userid; -Body; -Footing; + +SetContext($userid); +NavigationBar($userid); +Body(); +Footing();