X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fadmin.pl;h=edbb35cc48ee10dada3917bf2042f6e19ef1f3bf;hb=369f24c62cc49720af63a2eef4d93768de10008e;hp=e478d6ba1f68e86c657c61b9711272ef8b7856c2;hpb=2d6988532a665bd7e42bb88a38a8b52cbb352646;p=kivitendo-erp.git
diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl
index e478d6ba1..edbb35cc4 100644
--- a/bin/mozilla/admin.pl
+++ b/bin/mozilla/admin.pl
@@ -36,10 +36,19 @@ $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";
@@ -70,7 +79,7 @@ if ($form->{action}) {
}
}
- &check_password;
+ check_password();
call_sub($subroutine);
@@ -82,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]
@@ -92,7 +101,7 @@ password=
close FH;
}
- &adminlogin;
+ adminlogin();
}
@@ -117,7 +126,7 @@ sub list_users {
$form->error($locale->text('File locked!')) if (-f "${memberfile}.LCK");
- open(FH, "$memberfile") or $form->error("$memberfile : $!");
+ open(FH, "$memberfile") or $form->error("$memberfile : $ERRNO");
my %members;
@@ -156,22 +165,16 @@ sub add_user {
. $locale->text('Administration') . " / "
. $locale->text('Add User');
- $form->{Oracle_sid} = $sid;
- $form->{Oracle_dbport} = '1521';
- $form->{Oracle_dbhost} = `hostname`;
-
- if (-f "css/lx-office-erp.css") {
- $myconfig->{stylesheet} = "lx-office-erp.css";
- }
-
- $myconfig->{vclimit} = 200;
- $myconfig->{countrycode} = "de";
- $myconfig->{numberformat} = "1000,00";
- $myconfig->{dateformat} = "dd.mm.yy";
-
- &form_header;
- &form_footer;
+ my $myconfig = {
+ "vclimit" => 200,
+ "countrycode" => "de",
+ "numberformat" => "1000,00",
+ "dateformat" => "dd.mm.yy",
+ "stylesheet" => "lx-office-erp.css",
+ "menustyle" => "v3",
+ };
+ edit_user_form($myconfig);
}
sub edit {
@@ -182,91 +185,46 @@ sub edit {
. $locale->text('Edit User');
$form->{edit} = 1;
- &form_header;
- &form_footer;
-
-}
-
-sub form_footer {
-
- if ($form->{edit}) {
- $delete =
- qq|
-|;
- }
-
- print qq|
+ $form->isblank("login", $locale->text("The login is missing."));
-
-{rpw}>
+ # get user
+ my $myconfig = new User "$memberfile", "$form->{login}";
-
-$delete
+ $myconfig->{signature} =~ s/\\n/\r\n/g;
+ $myconfig->{address} =~ s/\\n/\r\n/g;
-
-
-