X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fadmin.pl;h=e936b2a12430c68d8f04527ea53e822502bbb511;hb=c1d8418b5244d224298431369c69ea971a69f3c2;hp=e55c999843027df1857508a494e4591980ef8cd1;hpb=ab56e3a45aae82289da09151f1530250d766dd20;p=kivitendo-erp.git
diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl
index e55c99984..e936b2a12 100644
--- a/bin/mozilla/admin.pl
+++ b/bin/mozilla/admin.pl
@@ -34,19 +34,20 @@
$menufile = "menu.ini";
+use DBI;
use SL::Form;
use SL::User;
+require "bin/mozilla/common.pl";
+
$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 +56,7 @@ $form->{favicon} = "favicon.ico";
if ($form->{action}) {
+
$subroutine = $locale->findsub($form->{action});
if ($subroutine eq 'login') {
@@ -65,7 +67,7 @@ if ($form->{action}) {
&check_password;
- &$subroutine;
+ call_sub($subroutine);
} else {
@@ -123,8 +125,6 @@ sub adminlogin {
. $locale->text('Login') . qq|">
-
-{path}>
@@ -163,6 +163,10 @@ sub add_user {
}
$myconfig->{vclimit} = 200;
+ $myconfig->{"countrycode"} = "de";
+ $myconfig->{"numberformat"} = "1000,00";
+ $myconfig->{"dateformat"} = "dd.mm.yy";
+
&form_header;
&form_footer;
@@ -192,9 +196,7 @@ sub form_footer {
print qq|
-
-
-{path}>
+
{rpw}>
{path}&root=$form->{root}&rpw=$form->{rpw}";
+ "$script?action=edit&login=$key&rpw=$form->{rpw}";
$href =~ s/ /%20/g;
$member{$key}{templates} =~ s/^$templates\///;
@@ -298,7 +300,7 @@ sub list_users {
$member{$key}{dbname} = $member{$key}{dbuser}
if ($member{$key}{dbdriver} eq 'Oracle');
- $column_data{login} = qq|
$key | |;
+ $column_data{login} = qq|$key | |;
$column_data{name} = qq|$member{$key}{name} | |;
$column_data{company} = qq|$member{$key}{company} | |;
$column_data{dbdriver} = qq|$member{$key}{dbdriver} | |;
@@ -309,7 +311,7 @@ sub list_users {
$i++;
$i %= 2;
print qq|
- |;
+
|;
map { print "$column_data{$_}\n" } @column_index;
@@ -326,9 +328,7 @@ sub list_users {
-{path}>
{rpw}>
-
@@ -370,7 +370,6 @@ $nologin
|
-{path}>
@@ -437,11 +436,13 @@ 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)$/, @all;
+ @alldir = grep !/\.(html|tex|sty|odt|xml|txb)$/, @alldir;
+ @alldir = grep !/^(webpages|\.svn)$/, @alldir;
@allhtml = reverse grep !/Default/, @allhtml;
push @allhtml, 'Default';
@@ -462,14 +463,19 @@ sub form_header {
$item =~ s/-.*//g;
if ($item ne $lastitem) {
- $mastertemplates .= qq|