X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/6dc16826718038718653bb07b130299fe2366e45..a3ae31c:/bin/mozilla/admin.pl diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl old mode 100644 new mode 100755 index 20bb28071..8d0e4426f --- a/bin/mozilla/admin.pl +++ b/bin/mozilla/admin.pl @@ -32,1657 +32,228 @@ # #====================================================================== -$menufile = "menu.ini"; - +use DBI; +use Encode; +use English qw(-no_match_vars); +use Fcntl; +use File::Copy; +use File::Find; +use File::Spec; +use Cwd; +use IO::Dir; +use IO::File; +use POSIX qw(strftime); +use Sys::Hostname; + +use SL::Auth; +use SL::Auth::PasswordPolicy; +use SL::DB::AuthClient; +use SL::DB::AuthUser; use SL::Form; +use SL::Iconv; +use SL::Mailer; use SL::User; - -$form = new Form; -$form->{"root"} = "root login"; - -$locale = new Locale $language, "admin"; - -eval { require DBI; }; -$form->error($locale->text('DBI not installed!')) if ($@); - -# customization -if (-f "$form->{path}/custom_$form->{script}") { - eval { require "$form->{path}/custom_$form->{script}"; }; - $form->error($@) if ($@); -} - -$form->{stylesheet} = "lx-office-erp.css"; -$form->{favicon} = "favicon.ico"; - -if ($form->{action}) { - - - $subroutine = $locale->findsub($form->{action}); - - if ($subroutine eq 'login') { - if ($form->{rpw}) { - $form->{rpw} = crypt $form->{rpw}, "ro"; - } - } - - &check_password; - - &$subroutine; - -} else { - - # if there are no drivers bail out - $form->error($locale->text('No Database Drivers available!')) - unless (User->dbdrivers); - - # create memberfile - if (!-f $memberfile) { - open(FH, ">$memberfile") or $form->error("$memberfile : $!"); - print FH qq|# SQL-Ledger Accounting members - -[root login] -password= - -|; - close FH; - } - - &adminlogin; - -} - -1; - -# end - -sub adminlogin { - - $form->{title} = - qq|Lx-Office ERP $form->{version} | . $locale->text('Administration'); - - $form->header; - - print qq| -
- - -
-| - . $locale->text('Administration') - . qq| - -
- -Lx-Office | - . $locale->text('website') . qq| - -