X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fadmin.pl;h=879ccd7498cc27d19298fb2adb8e185226191940;hb=599030d5e26bcef0f9850ddbbedba106ded70ebb;hp=f0b1c2d78c6e0ba3dd663aad85d22f097627bea2;hpb=77122e512a74c88bf51e401a18f3cae8da25f227;p=kivitendo-erp.git diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index f0b1c2d78..879ccd749 100644 --- a/bin/mozilla/admin.pl +++ b/bin/mozilla/admin.pl @@ -34,20 +34,25 @@ $menufile = "menu.ini"; +use DBI; +use CGI; + use SL::Form; use SL::User; +use SL::Common; + +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 ($@); } @@ -67,7 +72,7 @@ if ($form->{action}) { &check_password; - &$subroutine; + call_sub($subroutine); } else { @@ -125,7 +130,6 @@ sub adminlogin { . $locale->text('Login') . qq|"> -{path}> @@ -197,8 +201,7 @@ sub form_footer { print qq| - -{path}> + {rpw}> {path}&rpw=$form->{rpw}"; + "$script?action=edit&login=$key&rpw=$form->{rpw}"; $href =~ s/ /%20/g; $member{$key}{templates} =~ s/^$templates\///; @@ -330,7 +333,6 @@ sub list_users { -{path}> {rpw}>
text('Login') . qq|"> -{path}> @@ -440,11 +441,12 @@ sub form_header { } opendir TEMPLATEDIR, "$templates/." or $form->error("$templates : $!"); - @all = grep !/^\.\.?$/, readdir TEMPLATEDIR; + my @all = readdir(TEMPLATEDIR); + my @alldir = sort(grep({ -d "$templates/$_" && !/^\.\.?$/ } @all)); + my @allhtml = sort(grep({ -f "$templates/$_" && /\.html$/ } @all)); closedir TEMPLATEDIR; - @allhtml = sort grep /\.html/, @all; - @alldir = grep !/\.(html|tex|sty|odt)$/, @all; + @alldir = grep !/\.(html|tex|sty|odt|xml|txb)$/, @alldir; @alldir = grep !/^(webpages|\.svn)$/, @alldir; @allhtml = reverse grep !/Default/, @allhtml; @@ -472,9 +474,13 @@ sub form_header { } } - opendir CSS, "css/."; - @all = grep /.*\.css$/, readdir CSS; - closedir CSS; +# opendir CSS, "css/."; +# @all = grep /.*\.css$/, readdir CSS; +# closedir CSS; + +# css dir has styles that are not intended as general layouts. +# reverting to hardcoded list + @all = qw(lx-office-erp.css Win2000.css); foreach $item (@all) { if ($item eq $myconfig->{stylesheet}) { @@ -483,12 +489,16 @@ sub form_header { $selectstylesheet .= qq|