############################################################################### # These are replacement subroutines and new subroutines to be placed in the # # html.pl file with the secure password lookup mod. # # # # Use these if you are using the "user-friendly" html.pl file. # ############################################################################### ############################################################################### # Replace the following subroutines # # # ############################################################################### sub html_login_form { # -------------------------------------------------------- # The login screen. $page_title = "Log On"; &html_page_top; $submit_button = "Logon"; $reset_button = "Cancel"; # < -- Start page text -- > print qq| <$font>Welcome! You need to have an active account to access $html_title. For the demo, you can use userid/passwords: 'admin/admin', 'author/author', 'guest/guest'.
|; # < -- End page text --> if ($auth_signup) { print qq| If you do not yet have an account, you may sign up for one here.
|; } print qq| If you have forgotten your password, you may receive another password here.

User ID:
Password:
|; &html_page_bottom; } sub html_login_failure { # -------------------------------------------------------- # There was an error logging in. The error message is stored in $message. my ($message) = $_[0]; $page_title = "Login Error"; &html_page_top; $submit_button = "Logon"; $reset_button = "Cancel"; # < -- Start page text -- > print qq| <$font>Oops, there was a problem logging into the system: $message.

Please try logging in again, or contact the system administrator.
|; # < -- End page text --> if ($auth_signup) { print qq| If you do not yet have an account, you may sign up for one here.
|; } print qq| If you have forgotten your password, you may receive another password here.

User ID:
Password:
|; &html_page_bottom; } sub html_admin_display { # -------------------------------------------------------- # The displays the list of current users. my ($message, $user_list, $password, $permissions, $email) = @_; $page_title = "User Management"; &html_page_top; $submit_button = "Update/Create User"; # < -- Start page text -- > print qq|

<$font>$message

|; # < -- End page text --> print qq|
<$font>User List: $user_list
<$font>New Username:
<$font>Change Password:
<$font>Email Address:
<$font>Permissions:
$permissions

|; &html_footer; &html_page_bottom; } sub html_signup_form { # -------------------------------------------------------- # This form is displayed for new users who want to create an account. # my $error = shift; $page_title = "Sign up"; &html_page_top; $submit_button = "Create"; $reset_button = "Cancel"; # < -- Start page text -- > print qq| <$font>To create your own account, simply enter in your desired username and your email address. Your password will be mailed to you at the address you enter.

|; # < -- End page text --> if ($error) { print "$error

"; } print qq|
User ID:
Email address:
|; &html_page_bottom; } sub html_signup_success { # -------------------------------------------------------- # The user has successfully created a new account. $page_title = "Account Created"; &html_page_top; $submit_button = "Logon"; $reset_button = "Cancel"; # < -- Start page text -- > print qq| <$font>Your account has been set up! After you receive your password, use your username and password to log in.

|; # < -- End page text --> print qq|

User ID:
Password:
|; &html_page_bottom; } ############################################################################### # Add the following subroutines to html.pl # ############################################################################### sub html_lookup_form { # -------------------------------------------------------- # This form is displayed when users want a new password. # my $error = shift; $page_title = "Get a New Password"; &html_page_top; $submit_button = "Lookup"; $reset_button = "Cancel"; # < -- Start page text -- > print qq| <$font>To have a new password sent to you, simply enter the same email address you used when you signed up for your account. Your password will be mailed to you at the address you enter.

|; # < -- End page text --> if ($error) { print "$error

"; } print qq|
Email address:
|; &html_page_bottom; } sub html_lookup_success { # -------------------------------------------------------- $page_title = "New Password Sent"; &html_page_top; $submit_button = "Logon"; $reset_button = "Cancel"; # < -- Start page text -- > print qq| <$font>Your new password has been sent! After you receive your password, use your username and password to log in.

|; # < -- End page text --> print qq|

User ID:
Password:
|; &html_page_bottom; }