X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fadmin.pl;h=8cd34c35e225207fb69048c50a9f63a8b63865d6;hb=ccd0b365250f57021a756203f65a4d153709b45d;hp=566f29ac24fe0fe47eeddc55c2d1c8c2384445ba;hpb=ee072e4f077213bf6f8792ca8f0a1afebbb6282f;p=kivitendo-erp.git diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index 566f29ac2..8cd34c35e 100644 --- a/bin/mozilla/admin.pl +++ b/bin/mozilla/admin.pl @@ -34,19 +34,34 @@ $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 ($@); } @@ -55,6 +70,7 @@ $form->{favicon} = "favicon.ico"; if ($form->{action}) { + $subroutine = $locale->findsub($form->{action}); if ($subroutine eq 'login') { @@ -63,9 +79,9 @@ if ($form->{action}) { } } - &check_password; + check_password(); - &$subroutine; + call_sub($subroutine); } else { @@ -75,7 +91,7 @@ if ($form->{action}) { # create memberfile if (!-f $memberfile) { - open(FH, ">$memberfile") or $form->error("$memberfile : $!"); + open(FH, ">$memberfile") or $form->error("$memberfile : $ERRNO"); print FH qq|# SQL-Ledger Accounting members [root login] @@ -85,7 +101,7 @@ password= close FH; } - &adminlogin; + adminlogin(); } @@ -98,54 +114,48 @@ sub adminlogin { $form->{title} = qq|Lx-Office ERP $form->{version} | . $locale->text('Administration'); - $form->header; - - print qq| -
- + $form->header(); + print $form->parse_html_template2('admin/adminlogin'); +} -| - . $locale->text('Administration') - . qq| +sub list_users { -
+ while (