# NOTE NOT PASTING FULL CODE JUST RELEVANT PARTS #module Gatekeeper allows for a standard password and user #access method for PUCK access. package Gatekeeper; use DBI; use Digest::MD5 qw(md5_hex); #time to lock out users who have failed login 3 times #in seconds my $lockout_time = 180; #number of attempts before system locks users out my $max_failed_login_attempts = 3; #html error strings that are used for creating blocked login #pages for the end user to see my $login_blocked = "<font face=\"Arial, Helvetica, sans-serif\" +size=\"2\" color=\"red\"> Login Blocked please wait 3 minutes and try +again<\/font>"; my $username_malformed = "<font face=\"Arial, Helvetica, sans-serif\" +size=\"2\" color=\"red\"> Re-enter username<\/font>"; my $password_malformed = "<font face=\"Arial, Helvetica, sans-serif\" +size=\"2\" color=\"red\"> Re-enter password<\/font>"; my $username_invalid = "<font face=\"Arial, Helvetica, sans-serif\" +size=\"2\" color=\"red\"> Username not found<\/font>"; my $password_invalid = "<font face=\"Arial, Helvetica, sans-serif\" +size=\"2\" color=\"red\"> Password not found<\/font>"; my $password_blank = "<font face=\"Arial, Helvetica, sans-serif\" +size=\"2\" color=\"red\"> Please enter password<\/font>"; my $username_blank = "<font face=\"Arial, Helvetica, sans-serif\" +size=\"2\" color=\"red\"> Please enter username<\/font>"; #constructor sub new { my $self = {}; $self->{user_id} = undef; $self->{login_valid} = undef; $self->{error_type} = undef; $self->{html_error_string } = undef; bless( $self ); return( $self ); } sub get_html_error_string { my $self = shift; return( $self->{html_error_string} ); } sub get_error_type { my $self = shift; return( $self->{error_type} ); } sub get_password_valid { my $self = shift; return( $self->{login_valid} ); } sub get_user_id { my $self = shift; return( $self->{user_id} ); }
edited: Mon Nov 18 15:37:46 2002 by jeffa - added <reamore> tag
In reply to Returing Multiple Items and possibly using an object by Angel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |