X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fadmin.pl;h=879ccd7498cc27d19298fb2adb8e185226191940;hb=599030d5e26bcef0f9850ddbbedba106ded70ebb;hp=86d66018825165f0ffbe3049f91614d559f52532;hpb=311d35807a9a5fe47b24f7dc7b457ba832d53c1b;p=kivitendo-erp.git diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index 86d660188..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}> @@ -473,9 +474,13 @@ sub form_header { } } - opendir CSS, "css/."; - @all = sort(grep({ /\.css$/ && ($_ ne "tabcontent.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}) { @@ -508,16 +513,16 @@ sub form_header { - + - - {password}> + + - + @@ -575,10 +580,6 @@ sub form_header { - - - - @@ -635,24 +636,25 @@ sub form_header { print qq| - + - + |; if ($item eq 'Pg') { + print qq| - + - + - + - + |; } @@ -668,13 +670,13 @@ sub form_header { - + |; } print qq| - {dbpasswd}> +
| . $locale->text('Login') . qq|
| . $locale->text('Password') . qq|{password}>
| . $locale->text('Name') . qq|
| . $locale->text('E-mail') . qq|| . $locale->text('Language') . qq|
| . $locale->text('Character Set') . qq|
| . $locale->text('Stylesheet') . qq| | . $locale->text('Driver') . qq| $item $item | . $locale->text('Host') . qq|{"${item}_dbhost"}>
| . $locale->text('Dataset') . qq|{Pg_dbname}> | . $locale->text('Port') . qq|{Pg_dbport}>
| . $locale->text('User') . qq|{"${item}_dbuser"}> | . $locale->text('Password') . qq|{"${item}_dbpasswd"}>
| . $locale->text('Dataset') . qq| {"${item}_dbuser"}> | . $locale->text('Password') . qq|{"${item}_dbpasswd"}>
@@ -1142,7 +1144,6 @@ sub change_admin_password { -{path}> {rpw}>

@@ -1183,7 +1184,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!')); @@ -1286,9 +1287,9 @@ sub dbselect_source { | . $locale->text('User') . qq| - {dbuser}> + | . $locale->text('Password') . qq| - + @@ -1304,8 +1305,7 @@ sub dbselect_source { - -{path}> + {rpw}>
@@ -1339,9 +1339,7 @@ print qq|

{script}> -{dbdriver}> -{dbhost}> -{dbport}> -{dbuser}> -{dbpasswd}> -{dbdefault}> + + + + + + | . $locale->text('The following Datasets need to be updated') . qq| @@ -1401,9 +1399,8 @@ $upd - + -{path}> {rpw}> @@ -1455,7 +1452,7 @@ sub dbupdate {
| . $locale->text("Continue") . qq||; } @@ -1467,7 +1464,7 @@ sub create_dataset { } opendir SQLDIR, "sql/." or $form - error($!); - foreach $item (sort grep /-chart\.sql/, readdir SQLDIR) { + foreach $item (sort grep /-chart\.sql\z/, readdir SQLDIR) { next if ($item eq 'Default-chart.sql'); $item =~ s/-chart\.sql//; push @charts, @@ -1475,24 +1472,24 @@ sub create_dataset { } closedir SQLDIR; - $selectencoding = qq|