#===================================================================== # LedgerSMB # Small Medium Business Accounting software # # See COPYRIGHT file for copyright information #====================================================================== # # This file has NOT undergone whitespace cleanup. # #====================================================================== # # login frontend # ####################################################################### use DBI; use LedgerSMB::User; use LedgerSMB::Form; 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} = "sql-ledger.css"; $form->{favicon} = "favicon.ico"; $form->{endsession} = 1; $form->header(1); if ($form->{login}) { $sf = qq|function sf() { document.login.password.focus(); }|; } else { $sf = qq|function sf() { document.login.login.focus(); }|; } print qq| |; print qq|
|.$locale->text('Version').qq| $form->{version}
|