#===================================================================== # LedgerSMB # Small Medium Business Accounting software # # See COPYRIGHT file for copyright information #====================================================================== # # This file has undergone whitespace cleanup. # #====================================================================== # # login frontend # ####################################################################### use DBI; use LedgerSMB::User; use LedgerSMB::Form; ## will need this later when session_destroy will be used #use LedgerSMB::Session; $form = new Form; $locale = new Locale $language, "login"; $form->{charset} = $locale->{charset}; # customization if (-f "$form->{path}/custom_$form->{script}") { eval { require "$form->{path}/custom_$form->{script}"; }; $form->error($@) if ($@); } # per login customization if (-f "$form->{path}/$form->{login}_$form->{script}") { eval { require "$form->{path}/$form->{login}_$form->{script}"; }; $form->error($@) if ($@); } # window title bar, user info $form->{titlebar} = "LedgerSMB ".$locale->text('Version'). " $form->{version}"; if ($form->{action}) { $form->{titlebar} .= " - $myconfig{name} - $myconfig{dbname}"; &{ $locale->findsub($form->{action}) }; } else { &login_screen; } 1; sub login_screen { $form->{stylesheet} = "ledger-smb.css"; $form->{favicon} = "favicon.ico"; $form->{endsession} = 1; if ($form->{login}) { $sf = q|function sf() { document.login.password.focus(); }|; } else { $sf = q|function sf() { document.login.login.focus(); }|; } my $headeradd = qq| |; $form->header(1, $headeradd) print qq|
|.$locale->text('Version').qq| $form->{version}
|