X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fadmin.pl;h=edbb35cc48ee10dada3917bf2042f6e19ef1f3bf;hb=391d6b54a3a294bb45c4aa52c9c245059f9d4422;hp=9856c29550de158ee6ae7626107498ea81e35101;hpb=4dbb09950c9f5596646537c12d991c99086fe7c1;p=kivitendo-erp.git diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index 9856c2955..edbb35cc4 100644 --- a/bin/mozilla/admin.pl +++ b/bin/mozilla/admin.pl @@ -34,50 +34,64 @@ $menufile = "menu.ini"; +use DBI; +use CGI; +use POSIX qw(strftime); +use IO::File; +use Fcntl; +use English qw(-no_match_vars); +use Sys::Hostname; + use SL::Form; +use SL::Mailer; use SL::User; +use SL::Common; +use SL::Inifile; +use SL::DBUpgrade2; +use SL::DBUtils; + +require "bin/mozilla/common.pl"; +our $cgi = new CGI(''); $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}"; }; +if (-f "bin/mozilla/custom_$form->{script}") { + eval { require "bin/mozilla/custom_$form->{script}"; }; $form->error($@) if ($@); } - $form->{stylesheet} = "lx-office-erp.css"; -$form->{favicon} = "favicon.ico"; +$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; - + + check_password(); + + call_sub($subroutine); + } else { # if there are no drivers bail out - $form->error($locale->text('No Database Drivers available!')) unless (User->dbdrivers); + $form->error($locale->text('No Database Drivers available!')) + unless (User->dbdrivers); # create memberfile - if (! -f $memberfile) { - open(FH, ">$memberfile") or $form->error("$memberfile : $!"); + if (!-f $memberfile) { + open(FH, ">$memberfile") or $form->error("$memberfile : $ERRNO"); print FH qq|# SQL-Ledger Accounting members [root login] @@ -87,784 +101,273 @@ password= close FH; } - &adminlogin; + adminlogin(); } 1; -# end +# 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| - -