From bd1548445984137d6cef0bf2779db5bfcfbb0fba Mon Sep 17 00:00:00 2001 From: christopherm Date: Tue, 14 Nov 2006 06:40:49 +0000 Subject: When the user enters an incorrect password, they're redirect to the login screen again with an 'Access Denied' message instead of the ugly input field only. git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@587 4979c152-3d1c-0410-bac9-87ea11338e46 --- bin/admin.pl | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/admin.pl b/bin/admin.pl index 2c8d8214..0b62f6e1 100755 --- a/bin/admin.pl +++ b/bin/admin.pl @@ -85,6 +85,8 @@ if ($form->{action}) { sub adminlogin { + my ($errorMessage) = @_; + $form->{title} = qq|LedgerSMB $form->{version} |.$locale->text('Administration'); $myheaderadd = qq| @@ -114,12 +116,19 @@ sub adminlogin { + |; + + if($errorMessage){ + print qq|

$errorMessage


|; + } + print qq| +

|.$locale->text("Application Login").qq|

- - |.$locale->text('LedgerSMB website').qq| +

+ |.$locale->text('LedgerSMB website').qq| @@ -930,7 +939,7 @@ sub check_password { $form->{callback} .= "&password=$form->{password}" if $form->{callback}; if ($root->{password} ne (Digest::MD5::md5_hex $form->{password}) ) { - &getpassword; + &adminlogin($locale->text('Access Denied!')); exit; } else{ -- cgit v1.2.3