X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fadmin.pl;h=4e33ef200c80fedbd94c2434962d5c38103f5007;hb=8482e69b2e36af353705a84e4465668f7431dddf;hp=3b37dab5ea5800b456fd19e9c63ee8542fc5f3dc;hpb=98fca2dc32e5603558ac019cf47df2656ec69214;p=kivitendo-erp.git diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index 3b37dab5e..4e33ef200 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}> @@ -579,10 +580,6 @@ sub form_header { | . $locale->text('Language') . qq| - - | . $locale->text('Character Set') . qq| - - | . $locale->text('Stylesheet') . qq| @@ -697,11 +694,6 @@ sub form_header { @a = ; close(FH); - if (open(FH, "custom_$menufile")) { - push @a, ; - } - close(FH); - foreach $item (@a) { next unless $item =~ /\[/; next if $item =~ /\#/; @@ -974,6 +966,9 @@ sub save { } } + $form->{templates} =~ s|.*/||; + $form->{mastertemplates} =~ s|.*/||; + # create user template directory and copy master files if (!-d "$form->{templates}") { umask(002); @@ -1147,7 +1142,6 @@ sub change_admin_password { -{path}> {rpw}>

@@ -1188,7 +1182,7 @@ sub change_password { $root->save_member($memberfile); $form->{callback} = - "$form->{script}?action=list_users&path=$form->{path}&rpw=$root->{password}"; + "$form->{script}?action=list_users&rpw=$root->{password}"; $form->redirect($locale->text('Password changed!')); @@ -1309,8 +1303,7 @@ sub dbselect_source { - -{path}> + {rpw}>
@@ -1344,9 +1337,7 @@ print qq| - + -{path}> {rpw}> @@ -1460,7 +1450,7 @@ sub dbupdate {
| . $locale->text("Continue") . qq||; } @@ -1480,24 +1470,24 @@ sub create_dataset { } closedir SQLDIR; - $selectencoding = qq|