summaryrefslogtreecommitdiff
path: root/bin/admin.pl
diff options
context:
space:
mode:
authorchristopherm <christopherm@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-14 06:40:49 +0000
committerchristopherm <christopherm@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-14 06:40:49 +0000
commitbd1548445984137d6cef0bf2779db5bfcfbb0fba (patch)
treeba4f7dc8695182120a0e500c2aaf2b3b262d02a6 /bin/admin.pl
parentc47562684c2e223666292729c690fc49d5b2fb65 (diff)
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
Diffstat (limited to 'bin/admin.pl')
-rwxr-xr-xbin/admin.pl15
1 files changed, 12 insertions, 3 deletions
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 {
<input type="hidden" name="action" value="login" />
<input type="hidden" name="path" value="$form->{path}" />
</form>
+ |;
+
+ if($errorMessage){
+ print qq|<p><span style="font-weight:bold; color:red;">$errorMessage</span></p><br />|;
+ }
+ print qq|
+ <br /><br />
<p><a href="login.pl"
>|.$locale->text("Application Login").qq|</a></p>
-
- <a href="http://www.ledgersmb.org/">|.$locale->text('LedgerSMB website').qq|</a>
+ <br /><br />
+ <a style="font-size: 0.8em;" href="http://www.ledgersmb.org/">|.$locale->text('LedgerSMB website').qq|</a>
</div>
</body>
</html>
@@ -930,7 +939,7 @@ sub check_password {
$form->{callback} .= "&amp;password=$form->{password}" if $form->{callback};
if ($root->{password} ne (Digest::MD5::md5_hex $form->{password}) ) {
- &getpassword;
+ &adminlogin($locale->text('Access Denied!'));
exit;
}
else{