X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fadmin.pl;h=8cd34c35e225207fb69048c50a9f63a8b63865d6;hb=ccd0b365250f57021a756203f65a4d153709b45d;hp=8cd79a4c558e747d2fea8726a3f17b0a0f82acb0;hpb=a1b353ecfa73af25d82af151077d9bc25253d253;p=kivitendo-erp.git diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index 8cd79a4c5..8cd34c35e 100644 --- a/bin/mozilla/admin.pl +++ b/bin/mozilla/admin.pl @@ -34,20 +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 ($@); } @@ -65,9 +79,9 @@ if ($form->{action}) { } } - &check_password; + check_password(); - &$subroutine; + call_sub($subroutine); } else { @@ -77,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] @@ -87,7 +101,7 @@ password= close FH; } - &adminlogin; + adminlogin(); } @@ -100,52 +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 (