Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 540c0b5e

Von Moritz Bunkus vor etwa 12 Jahren hinzugefügt

User-Login auf Controller umgestellt

Unterschiede anzeigen:

SL/Auth.pm
149 149

  
150 150
  my ($self, $password) = @_;
151 151

  
152
  my $session_root_auth = $self->get_session_value(SESSION_KEY_ROOT_AUTH);
152
  my $session_root_auth = $self->get_session_value(SESSION_KEY_ROOT_AUTH());
153 153
  if (defined $session_root_auth && $session_root_auth == OK) {
154 154
    $::lxdebug->leave_sub;
155 155
    return OK;
......
164 164
  my $admin_password    = SL::Auth::Password->hash_if_unhashed(login => 'root', password => $self->{admin_password}->());
165 165

  
166 166
  my $result = $password eq $admin_password ? OK : ERR_PASSWORD;
167
  $self->set_session_value(SESSION_KEY_ROOT_AUTH ,=> $result);
168

  
169
  sleep 5 if $result != OK;
167
  $self->set_session_value(SESSION_KEY_ROOT_AUTH() => $result);
170 168

  
171 169
  $::lxdebug->leave_sub;
172 170
  return $result;
......
177 175

  
178 176
  my ($self, $login, $password) = @_;
179 177

  
180
  my $session_auth = $self->get_session_value(SESSION_KEY_USER_AUTH);
178
  my $session_auth = $self->get_session_value(SESSION_KEY_USER_AUTH());
181 179
  if (defined $session_auth && $session_auth == OK) {
182 180
    $::lxdebug->leave_sub;
183 181
    return OK;
......
189 187
  }
190 188

  
191 189
  my $result = $login ? $self->{authenticator}->authenticate($login, $password) : ERR_USER;
192
  $self->set_session_value(SESSION_KEY_USER_AUTH ,=> $result, login => $login);
193

  
194
  sleep 5 if $result != OK;
190
  $self->set_session_value(SESSION_KEY_USER_AUTH() => $result, login => $login);
195 191

  
196 192
  $::lxdebug->leave_sub;
197 193
  return $result;
198 194
}
199 195

  
196
sub punish_wrong_login {
197
  sleep 5;
198
}
199

  
200 200
sub get_stored_password {
201 201
  my ($self, $login) = @_;
202 202

  
SL/Controller/Base.pm
21 21

  
22 22
  my %params      = ref($_[0]) eq 'HASH' ? %{ $_[0] } : @_;
23 23
  my $controller  = delete($params{controller}) || $self->_controller_name;
24
  my $action      = delete($params{action})     || 'dispatch';
25
  $params{action} = "${controller}/${action}";
24
  my $action      = $params{action}             || 'dispatch';
25

  
26
  my $script;
27
  if ($controller =~ m/\.pl$/) {
28
    # Old-style controller
29
    $script = $controller;
30
  } else {
31
    $params{action} = "${controller}/${action}";
32
    $script         = "controller.pl";
33
  }
34

  
26 35
  my $query       = join '&', map { uri_encode($_->[0]) . '=' . uri_encode($_->[1]) } @{ flatten(\%params) };
27 36

  
28
  return "controller.pl?${query}";
37
  return "${script}?${query}";
29 38
}
30 39

  
31 40
sub redirect_to {
......
172 181
  return 'user';
173 182
}
174 183

  
184
sub keep_auth_vars_in_form {
185
  return 0;
186
}
187

  
175 188
#
176 189
# private functions -- for use in Base only
177 190
#
......
517 530
future value C<none> (which would require no authentication but is not
518 531
yet implemented).
519 532

  
533
=item C<keep_auth_vars_in_form>
534

  
535
May be overridden by a controller. If falsish (the default) all form
536
variables whose name starts with C<{AUTH}> are removed before the
537
request is routed. Only controllers that handle login requests
538
themselves should return trueish for this function.
539

  
520 540
=back
521 541

  
522 542
=head2 PRIVATE FUNCTIONS
SL/Controller/LoginScreen.pm
1
package SL::Controller::LoginScreen;
2

  
3
use strict;
4

  
5
use parent qw(SL::Controller::Base);
6

  
7
use SL::Dispatcher::AuthHandler::User;
8
use SL::User;
9

  
10
#
11
# actions
12
#
13

  
14
sub action_user_login {
15
  my ($self) = @_;
16

  
17
  $self->render('login_screen/user_login');
18
}
19

  
20
sub action_logout {
21
  my ($self) = @_;
22

  
23
  $::auth->destroy_session;
24
  $::auth->create_or_refresh_session;
25
  $self->render('login_screen/user_login', error => $::locale->text('You are logged out!'));
26
}
27

  
28
sub action_login {
29
  my ($self) = @_;
30

  
31
  %::myconfig      = $::form->{'{AUTH}login'} ? $::auth->read_user(login => $::form->{'{AUTH}login'}) : ();
32
  %::myconfig      = SL::Dispatcher::AuthHandler::User->new->handle(countrycode => $::myconfig{countrycode});
33
  $::form->{login} = $::myconfig{login};
34
  $::locale        = Locale->new($::myconfig{countrycode}) if $::myconfig{countrycode};
35
  my $user         = User->new(login => $::myconfig{login});
36

  
37
  # if we get an error back, bale out
38
  my $result = $user->login($::form);
39

  
40
  # Database update available?
41
  ::end_of_request() if -2 == $result;
42

  
43
  # Auth DB needs update? If so log the user out forcefully.
44
  if (-3 == $result) {
45
    $::auth->destroy_session;
46
    return $self->render('login_screen/auth_db_needs_update');
47
  }
48

  
49
  # Other login errors.
50
  if (0 > $result) {
51
    $::auth->punish_wrong_login;
52
    return $self->render('login_screen/user_login', error => $::locale->text('Incorrect username or password!'));
53
  }
54

  
55
  # Everything is fine.
56
  $::auth->set_cookie_environment_variable();
57

  
58
  return $self->redirect_to($::form->{callback}) if $::form->{callback};
59

  
60
  my %style_to_script_map = (
61
    v3  => 'v3',
62
    neu => 'new',
63
    v4  => 'v4',
64
  );
65

  
66
  my $menu_script = $style_to_script_map{$user->{menustyle}} || '';
67

  
68
  $self->redirect_to(controller => "menu${menu_script}.pl", action => 'display');
69
}
70

  
71
#
72
# settings
73
#
74
sub get_auth_level {
75
  return 'none';
76
}
77

  
78
sub keep_auth_vars_in_form {
79
  return 1;
80
}
81

  
82
1;
SL/Dispatcher.pm
56 56
      ::run();
57 57
      ::end_of_request();
58 58
    } else {
59
      show_error('login/auth_db_unreachable');
59
      show_error('login_screen/auth_db_unreachable');
60 60
    }
61 61
  }
62 62
}
......
67 67
  my $error_type           = shift || '';
68 68
  my %params               = @_;
69 69

  
70
  $::locale                = Locale->new($::lx_office_conf{system}->{language});
70
  $::myconfig{countrycode} = delete($params{countrycode}) || $::lx_office_conf{system}->{language};
71
  $::locale                = Locale->new($::myconfig{countrycode});
71 72
  $::form->{error}         = $::locale->text('The session is invalid or has expired.') if ($error_type eq 'session');
72
  $::form->{error}         = $::locale->text('Incorrect password!.')                   if ($error_type eq 'password');
73
  $::myconfig{countrycode} = $::lx_office_conf{system}->{language};
73
  $::form->{error}         = $::locale->text('Incorrect password!')                    if ($error_type eq 'password');
74 74

  
75 75
  $::form->header;
76 76
  print $::form->parse_html_template($template, \%params);
......
200 200

  
201 201
    $::form->error($::locale->text('System currently down for maintenance!')) if -e ($::lx_office_conf{paths}->{userspath} . "/nologin") && $script ne 'admin';
202 202

  
203
    if ($script eq 'login' or $script eq 'admin') {
204
      $::form->{titlebar} = "Lx-Office " . $::locale->text('Version') . " $::form->{version}";
203
    ($routing_type, $script, $script_name, $action) = qw(controller controller LoginScreen login) if ($script eq 'login') && ($action eq 'login');
204

  
205
    if (($script eq 'login') && !$action) {
206
      print $::request->{cgi}->redirect('controller.pl?action=LoginScreen/user_login');
207

  
208
    } elsif ($script eq 'admin') {
209
      $::form->{titlebar} = "kivitendo " . $::locale->text('Version') . " $::form->{version}";
205 210
      ::run($session_result);
206 211

  
207 212
    } else {
208
      show_error('login/password_error', 'session') if SL::Auth::SESSION_EXPIRED == $session_result;
213
      show_error('login_screen/user_login', 'session') if SL::Auth::SESSION_EXPIRED == $session_result;
209 214

  
210
      my $auth_level = $self->{auth_handler}->handle(
215
      my %auth_result = $self->{auth_handler}->handle(
211 216
        routing_type => $routing_type,
212 217
        script       => $script,
213 218
        controller   => $script_name,
214 219
        action       => $action,
215 220
      );
216 221

  
217
      delete @{ $::form }{ grep { m/^\{AUTH\}/ } keys %{ $::form } };
222
      delete @{ $::form }{ grep { m/^\{AUTH\}/ } keys %{ $::form } } unless $auth_result{keep_auth_vars};
218 223

  
219 224
      if ($action) {
220
        $::instance_conf->init if $auth_level eq 'user';
225
        $::instance_conf->init if $auth_result{auth_level} eq 'user';
221 226

  
222 227
        map { $::form->{$_} = $::myconfig{$_} } qw(charset)
223 228
          unless $action eq 'save' && $::form->{type} eq 'preferences';
......
371 376
  my @old_files = grep { -f "config/${_}" } qw(authentication.pl console.conf lx-erp.conf lx-erp-local.conf);
372 377
  return unless @old_files;
373 378

  
374
  $::form->{title}      = $::locale->text('Old configuration files');
379
  $::form->{title} = $::locale->text('Old configuration files');
375 380
  $::form->header;
376
  print $::form->parse_html_template('login/old_configuration_files', { FILES => \@old_files });
381
  print $::form->parse_html_template('login_screen/old_configuration_files', { FILES => \@old_files });
377 382

  
378 383
  ::end_of_request();
379 384
}
SL/Dispatcher/AuthHandler.pm
5 5
use parent qw(Rose::Object);
6 6

  
7 7
use SL::Dispatcher::AuthHandler::Admin;
8
use SL::Dispatcher::AuthHandler::None;
8 9
use SL::Dispatcher::AuthHandler::User;
9 10

  
11
my %valid_auth_levels = map { ($_ => 1) } qw(user admin none);
12

  
10 13
sub handle {
11 14
  my ($self, %param) = @_;
12 15

  
......
16 19
  $self->{handlers}->{$handler_name} ||= $handler_name->new;
17 20
  $self->{handlers}->{$handler_name}->handle;
18 21

  
19
  return $auth_level;
22
  return (
23
    auth_level     => $auth_level,
24
    keep_auth_vars => $self->get_keep_auth_vars(%param),
25
  );
20 26
}
21 27

  
22 28
sub get_auth_level {
......
26 32
                 : $param{routing_type} eq 'controller' ? "SL::Controller::$param{controller}"->get_auth_level($param{action})
27 33
                 :                                        'user';
28 34

  
29
  return $auth_level eq 'user' ? 'user' : 'admin';
35
  return $valid_auth_levels{$auth_level} ? $auth_level : 'user';
36
}
37

  
38
sub get_keep_auth_vars {
39
  my ($self, %param) = @_;
40

  
41
  return $param{routing_type} eq 'controller' ? "SL::Controller::$param{controller}"->keep_auth_vars_in_form : 0;
30 42
}
31 43

  
32 44
1;
SL/Dispatcher/AuthHandler/Admin.pm
10 10
  return if  $::form->{'{AUTH}admin_password'} && ($::auth->authenticate_root($::form->{'{AUTH}admin_password'})            == $::auth->OK());
11 11
  return if !$::form->{'{AUTH}admin_password'} && ($::auth->authenticate_root($::auth->get_session_value('admin_password')) == $::auth->OK());
12 12

  
13
  $::auth->punish_wrong_login;
13 14
  $::auth->delete_session_value('admin_password');
14
  SL::Dispatcher::show_error('login/password_error', 'password', is_admin => 1);
15
  SL::Dispatcher::show_error('admin/adminlogin', 'password');
15 16
}
16 17

  
17 18
1;
SL/Dispatcher/AuthHandler/None.pm
1
package SL::Dispatcher::AuthHandler::None;
2

  
3
use strict;
4

  
5
use parent qw(Rose::Object);
6

  
7
sub handle {
8
  %::myconfig = ();
9
}
10

  
11
1;
SL/Dispatcher/AuthHandler/User.pm
5 5
use parent qw(Rose::Object);
6 6

  
7 7
sub handle {
8
  my ($self, %param) = @_;
9

  
8 10
  my $login = $::form->{'{AUTH}login'} || $::auth->get_session_value('login');
9
  SL::Dispatcher::show_error('login/password_error', 'password') if not defined $login;
11
  $self->_error(%param) if !defined $login;
10 12

  
11 13
  %::myconfig = $::auth->read_user(login => $login);
12 14

  
13
  SL::Dispatcher::show_error('login/password_error', 'password') unless $::myconfig{login};
15
  $self->_error(%param) unless $::myconfig{login};
14 16

  
15 17
  $::locale = Locale->new($::myconfig{countrycode});
16 18

  
17
  my $ok   =  $::form->{'{AUTH}login'} && (SL::Auth::OK == $::auth->authenticate($login, $::form->{'{AUTH}password'}));
18
  $ok    ||= !$::form->{'{AUTH}login'} && (SL::Auth::OK == $::auth->authenticate($login, undef));
19
  my $ok   =  $::form->{'{AUTH}login'} && (SL::Auth::OK() == $::auth->authenticate($::myconfig{login}, $::form->{'{AUTH}password'}));
20
  $ok    ||= !$::form->{'{AUTH}login'} && (SL::Auth::OK() == $::auth->authenticate($::myconfig{login}, undef));
19 21

  
20
  SL::Dispatcher::show_error('login/password_error', 'password') if !$ok;
22
  $self->_error(%param) if !$ok;
21 23

  
22 24
  $::auth->create_or_refresh_session;
23 25
  $::auth->delete_session_value('FLASH');
26

  
27
  return %::myconfig;
28
}
29

  
30
sub _error {
31
  my $self = shift;
32

  
33
  $::auth->punish_wrong_login;
34
  SL::Dispatcher::show_error('login_screen/user_login', 'password', @_);
24 35
}
25 36

  
26 37
1;
bin/mozilla/admin.pl
96 96

  
97 97
  if ($form->{action}) {
98 98
    if ($auth->authenticate_root($form->{'{AUTH}admin_password'}) != $auth->OK()) {
99
      $auth->punish_wrong_login;
99 100
      $form->{error_message} = $locale->text('Incorrect Password!');
100 101
      $auth->delete_session_value('admin_password');
101 102
      adminlogin();
bin/mozilla/login.pl
41 41
our $form;
42 42
our $auth;
43 43

  
44
sub run {
45
  $::lxdebug->enter_sub;
46
  my $session_result = shift;
47

  
48
  $form   = $::form;
49
  $auth   = $::auth;
50

  
51
  $form->{stylesheet} = "lx-office-erp.css";
52
  $form->{favicon}    = "favicon.ico";
53

  
54
  if (SL::Auth::SESSION_EXPIRED == $session_result) {
55
    $form->{error_message} = $::locale->text('The session is invalid or has expired.');
56
    login_screen();
57
    ::end_of_request();
58
  }
59
  my $action = $form->{action};
60
  if (!$action && $auth->{SESSION}->{login}) {
61
    $action = 'login';
62
  }
63
  if ($action) {
64
    $form->{login} = $form->{'{AUTH}login'} || $form->{login};
65
    %::myconfig    = $auth->read_user(login => $form->{login}) if $form->{login};
66

  
67
    $::locale   = Locale->new($::myconfig{countrycode}) if $::myconfig{countrycode};
68

  
69
    if (SL::Auth::OK != $auth->authenticate($::myconfig{login}, $form->{'{AUTH}password'})) {
70
      $form->{error_message} = $::locale->text('Incorrect username or password!');
71
      login_screen();
72
    } else {
73
      $auth->create_or_refresh_session();
74
      delete $form->{'{AUTH}password'};
75

  
76
      $form->{titlebar} .= " - $::myconfig{name} - $::myconfig{dbname}";
77
      call_sub($::locale->findsub($action));
78
    }
79
  } else {
80
    login_screen();
81
  }
82

  
83
  $::lxdebug->leave_sub;
84
}
85

  
86
sub login_screen {
87
  $main::lxdebug->enter_sub();
88
  my ($msg) = @_;
89

  
90
  if (-f "css/lx-office-erp.css") {
91
    $form->{stylesheet} = "lx-office-erp.css";
92
  }
93

  
94
  $form->{msg} = $msg;
95
  $form->header();
96

  
97
  print $form->parse_html_template('login/login_screen');
98

  
99
  $main::lxdebug->leave_sub();
100
}
101

  
102
sub login {
103
  $main::lxdebug->enter_sub();
104

  
105
  unless ($form->{login}) {
106
    login_screen($::locale->text('You did not enter a name!'));
107
    ::end_of_request();
108
  }
109

  
110
  my $user = User->new(login => $form->{login});
111

  
112
  # if we get an error back, bale out
113
  my $result;
114
  if (($result = $user->login($form)) <= -1) {
115
    if ($result == -3) {
116
      show_error('login/auth_db_needs_update');
117
      $::auth->destroy_session;
118
      ::end_of_request();
119
    }
120

  
121
    ::end_of_request() if $result == -2;
122
    login_screen($::locale->text('Incorrect username or password!'));
123
    ::end_of_request();
124
  }
125

  
126
  my %style_to_script_map = (
127
    v3  => 'v3',
128
    neu => 'new',
129
    v4  => 'v4',
130
  );
131

  
132
  my $menu_script = $style_to_script_map{$user->{menustyle}} || '';
133

  
134
  # made it this far, execute the menu
135
  # standard redirect does not seem to work for this invocation, (infinite loops?)
136
  # do a manual invocation instead
137
#  $form->{callback} = build_std_url("script=menu${menu_script}.pl", 'action=display', "callback=" . $form->escape($form->{callback}));
138

  
139
  $main::auth->set_cookie_environment_variable();
140

  
141
  $::form->{script}   = "menu${menu_script}.pl";
142
  $::form->{action}   = 'display';
143
  $::form->{callback} = $::form->escape($::form->{callback});
144

  
145
  require "bin/mozilla/$::form->{script}";
146
  display();
147

  
148
#  $form->redirect();
149

  
150
  $main::lxdebug->leave_sub();
151
}
152

  
153
sub logout {
154
  $main::lxdebug->enter_sub();
155

  
156
  $main::auth->destroy_session();
157

  
158
  # remove the callback to display the message
159
  $form->{callback} = "login.pl?action=";
160
  $form->redirect($::locale->text('You are logged out!'));
161

  
162
  $main::lxdebug->leave_sub();
163
}
164

  
165 44
sub company_logo {
166 45
  $main::lxdebug->enter_sub();
167 46

  
......
180 59
  $main::lxdebug->leave_sub();
181 60
}
182 61

  
183
sub show_error {
184
  my $template           = shift;
185
  my %myconfig           = %main::myconfig;
186
  $myconfig{countrycode} = $::lx_office_conf{system}->{language};
187
  $form->{stylesheet}    = 'css/lx-office-erp.css';
188

  
189
  $form->header();
190
  print $form->parse_html_template($template);
191

  
192
  # $form->parse_html_template('login/auth_db_unreachable');
193
  # $form->parse_html_template('login/auth_db_needs_update');
194
  # $form->parse_html_template('login/authentication_pl_missing');
195

  
196
  ::end_of_request();
197
}
198

  
199 62
1;
200 63

  
201 64
__END__
bin/mozilla/menujs.pl
79 79

  
80 80
  my $login = "[Nutzer "
81 81
    . $form->{login}
82
    . " - <a href=\"login.pl?action=logout\" target=\"_top\">"
82
    . " - <a href=\"controller.pl?action=LoginScreen/logout\" target=\"_top\">"
83 83
    . $::locale->text('Logout')
84 84
    . "</a>] ";
85 85
  my ($Sekunden, $Minuten,   $Stunden,   $Monatstag, $Monat,
index.html
1 1
<html>
2 2
 <head>
3
  <meta http-equiv="refresh" content="0;URL=login.pl">
3
  <meta http-equiv="refresh" content="0;URL=controller.pl?action=LoginScreen/user_login">
4 4
 </head>
5 5
 <body>
6
  <a href="login.pl">Lx-Office-Login</a>
6
  <a href="controller.pl?action=LoginScreen/user_login">kivitendo-Login</a>
7 7
 </body>
8 8
</html>
locale/de/all
969 969
  'Incoming Payments'           => 'Zahlungseingänge',
970 970
  'Incoming invoice number'     => 'Eingangsrechnungsnummer',
971 971
  'Incorrect Password!'         => 'Ungültiges Passwort!',
972
  'Incorrect password!.'        => 'Ungültiges Passwort!.',
973 972
  'Incorrect username or password!' => 'Ungültiger Benutzername oder falsches Passwort!',
974 973
  'Increase'                    => 'Erhöhen',
975 974
  'Individual Items'            => 'Einzelteile',
locale/de_DE/all
954 954
  'Incoming Payments'           => 'Zahlungseingänge',
955 955
  'Incoming invoice number'     => 'Eingangsrechnungsnummer',
956 956
  'Incorrect Password!'         => 'Passwort falsch!',
957
  'Incorrect password!.'        => 'Ungültiges Passwort!.',
958 957
  'Incorrect username or password!' => 'Ungültiger Benutzername oder falsches Passwort!',
959 958
  'Increase'                    => 'Erhöhen',
960 959
  'Individual Items'            => 'Einzelteile',
menu.ini
823 823
no_todo_list=1
824 824

  
825 825
[Program--Logout]
826
module=login.pl
827
action=logout
826
module=controller.pl
827
action=LoginScreen/logout
828 828
target=_top
templates/webpages/admin/adminlogin.html
10 10

  
11 11
  <h2>[% 'Administration' | $T8 %]</h2>
12 12

  
13
  [% IF error_message %]
14
  <p><span class="message_error_login">[% error_message %]</span></p>
13
  [% IF error %]
14
  <p><span class="message_error_login">[% error %]</span></p>
15 15
  [% END %]
16 16

  
17 17
  <form method="post" action="admin.pl">
......
29 29

  
30 30
  <p>[% 'kivitendo Homepage' | $T8 %]: <a href="http://kivitendo.de" target="_blank" title="[% 'kivitendo Homepage' | $T8 %]">http://kivitendo.de</a></p>
31 31

  
32
  <p><a href="login.pl" target="_top">[%- LxERP.t8('Back to the login page') %]</a></p>
32
  <p><a href="controller.pl?action=LoginScreen/user_login" target="_top">[%- LxERP.t8('Back to the login page') %]</a></p>
33 33

  
34 34
 </div>
35 35

  
templates/webpages/admin/list_users.html
62 62
  </div>
63 63
 </form>
64 64

  
65
 <form method="post" action="login.pl">
65
 <form method="post" action="controller.pl">
66
  <input type="hidden" name="action" value="LoginScreen/login">
66 67

  
67 68
  <div class="listheading">[% 'User Login' | $T8 %]</div>
68 69

  
......
75 76
   <tr>
76 77
    <th align="right">[% 'Password' | $T8 %]</th>
77 78
    <td><input class="login" type="password" name="{AUTH}password"></td>
78
    <td><input type="submit" name="action" value="[% 'Login' | $T8 %]"></td>
79
    <td><input type="submit" value="[% 'Login' | $T8 %]"></td>
79 80
   </tr>
80 81
  </table>
81 82

  
templates/webpages/dbupgrade/warning.html
1 1
[%- USE T8 %]
2 2
[%- USE HTML %]
3 3
[%- USE LxERP %]
4
<form name="Form" method="post" action="login.pl">
4
<form name="Form" method="post" action="controller.pl">
5 5

  
6
 <input type="hidden" name="action" value="login">
6
 <input type="hidden" name="action" value="LoginScreen/login">
7 7
 <p><input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]"></p>
8 8
 <p class="message_hint">
9 9
  [% LxERP.t8('kivitendo is about to update the database [ #1 ].', dbname) | html %]
templates/webpages/login/auth_db_needs_update.html
1
[%- USE LxERP %]
2
<body>
3

  
4
 <p><b>[% LxERP.t8('Error!') %]</b></p>
5

  
6
 <p>
7
  [% LxERP.t8('Kivitendo needs to update the authentication database before you can proceed.') %]
8
  [% LxERP.t8('Please log in to the administration panel.') %]
9
  [% LxERP.t8('Kivitendo will then update the database automatically.') %]
10
 </p>
11

  
12
 <hr>
13
 <p>
14
  [% LxERP.t8('For further information read this: ') %] <a href="doc/html/index.html" target="_blank">Kivitendo Installation</a><br>
15
  [% LxERP.t8('Or download the whole Installation Documentation as PDF (350kB) for off-line study (currently in German Language): ') %] <a href="doc/Kivitendo-Dokumentation.pdf" target="_blank">Kivitendo-Dokumentation.pdf</a>
16
 </p>
17

  
18
 <hr>
19

  
20
 <p>
21
  <a href="login.pl" target="_top">[% LxERP.t8('Login') %]</a> |
22
  <a href="admin.pl" target="_top">[% LxERP.t8('Administration') %]</a>
23
 </p>
24

  
25
</body>
26
</html>
templates/webpages/login/auth_db_unreachable.html
1
[%- USE T8 %]
2
<body>
3

  
4
 <p><b>[% 'Error!' | $T8 %]</b></p>
5

  
6
 <p>[%- 'The authentication database is not reachable at the moment. Either it hasn\'t been set up yet or the database server might be down. Please contact your administrator.' | $T8 %]</p>
7

  
8
 <p>[% 'If you want to set up the authentication database yourself then log in to the administration panel. kivitendo will then create the database and tables for you.' | $T8 %]</p>
9
 <hr>
10
 <p>[% 'For further information read this: ' | $T8 %] <a href="doc/html/index.html" target="_blank">kivitendo Installation</a><br>
11
 [% 'Or download the whole Installation Documentation as PDF (350kB) for off-line study (currently in German Language): ' | $T8 %] <a href="doc/Kivitendo-Dokumentation.pdf" target="_blank">Kivitendo-Dokumentation.pdf</a></p>
12

  
13
 <hr>
14

  
15
 <p>
16
  <a href="login.pl" target="_top">[% 'Login' | $T8 %]</a> |
17
  <a href="admin.pl" target="_top">[% 'Administration' | $T8 %]</a>
18
 </p>
19

  
20
</body>
21
</html>
templates/webpages/login/authentication_pl_missing.html
1
[%- USE T8 %]
2
<body>
3

  
4
 <p><b>[% 'Error!' | $T8 %]</b></p>
5

  
6
 <p>[% 'The authentication configuration file &quot;config/lx_office.conf&quot; does not exist. This kivitendo installation has probably not been updated correctly yet. Please contact your administrator.' | $T8 %]</p>
7

  
8
 <p>[% 'If you yourself want to upgrade the installation then please read the file &quot;doc/UPGRADE&quot; and follow the steps outlined in this file.' | $T8 %]</p>
9

  
10
 <p>
11
  <a href="login.pl" target="_top">[% 'Login' | $T8 %]</a> |
12
  <a href="admin.pl" target="_top">[% 'Administration' | $T8 %]</a>
13
 </p>
14

  
15
</body>
16
</html>
templates/webpages/login/login_screen.html
1
[%- USE T8 %]
2
[% USE HTML %]<body class="login" onLoad="document.loginscreen.login.focus()">
3

  
4
 <center>
5
  <table class="login" border="3" cellpadding="20">
6
   <tr>
7
    <td class="login" align="center">
8
     <a href="http://www.kivitendo.de" target="_top"><img src="image/kivitendo.png" border="0"></a>
9
     <h3 class="login" align="center">[% 'kivitendo' | $T8 %] [% version %]</h3>
10

  
11
     [% IF error_message %]
12
     <p><span class="message_error_login">[% error_message %]</span></p>
13
     [% END %]
14

  
15
     <p>
16

  
17
      <form method="post" name="loginscreen" action="login.pl" target="_top">
18

  
19
       <input type="hidden" name="show_dbupdate_warning" value="1">
20

  
21
       <table width="100%">
22
        <tr>
23
         <td align="center">
24
          <table>
25
           <tr>
26
            <th align="right">[% 'Login Name' | $T8 %]</th>
27
            <td><input class="login" name="{AUTH}login" size="30" tabindex="1"></td>
28
           </tr>
29
           <tr>
30
            <th align="right">[% 'Password' | $T8 %]</th>
31
            <td><input class="login" type="password" name="{AUTH}password" size="30" tabindex="2"></td>
32
           </tr>
33
          </table>
34

  
35
          <br>
36
          <input type="hidden" name="action" value="login">
37
          <input type="submit" value="[% 'Login' | $T8 %]" tabindex="3">
38

  
39
         </td>
40
        </tr>
41
       </table>
42

  
43
      </form>
44

  
45
    </td>
46
   </tr>
47
  </table>
48

  
49
</body>
50
</html>
templates/webpages/login/old_configuration_files.html
1
[% USE LxERP %][% USE HTML %]
2
<body>
3
 <div class="listtop">[% title %]</div>
4

  
5
 <p>
6
  [%- LxERP.t8('Starting with version 2.6.3 the configuration files in "config" have been consolidated.') %]
7
  [%- LxERP.t8('The following old files whose settings have to be merged manually into the new configuration file "config/lx_office.conf" still exist:') %]
8
 </p>
9

  
10
 <ul>
11
  [%- FOREACH file = FILES %]
12
   <li><code>config/[%- HTML.escape(file) %]</code></li>
13
  [%- END %]
14
 </ul>
15

  
16
 <p>
17
  [%- LxERP.t8('Due to security concerns these files have to be deleted or moved after the migration before you can continue using kivitendo.') %]
18
 </p>
19

  
20
 <p>
21
  [%- LxERP.t8('You can find information on the migration in the upgrade chapter of the documentation.') %]
22
 </p>
23
  <p>
24

  
25
  [%- LxERP.t8('Which is located at doc/Kivitendo-Dokumentation.pdf. Click here: ') %] <a href ="doc/Kivitendo-Dokumentation.pdf">doc/Kivitendo-Dokumentation.pdf</a>
26
</p>
27

  
28
 <p>
29
  <a href="login.pl">[%- LxERP.t8('Back to login') %]</a>
30
 </p>
31
</body>
32
</html>
templates/webpages/login/password_error.html
1
[%- USE T8 %]
2
<body>
3

  
4
 <p><b>[% 'Error!' | $T8 %]</b></p>
5

  
6
 <p>[% error %]</p>
7

  
8
 <p><a href="[% IF is_admin %]admin.pl[% ELSE %]login.pl[% END %]" target="_top">[% 'Login' | $T8 %]</a></p>
9

  
10
</body>
11
</html>
templates/webpages/login_screen/auth_db_needs_update.html
1
[%- USE LxERP %]
2
<body>
3

  
4
 <p><b>[% LxERP.t8('Error!') %]</b></p>
5

  
6
 <p>
7
  [% LxERP.t8('Kivitendo needs to update the authentication database before you can proceed.') %]
8
  [% LxERP.t8('Please log in to the administration panel.') %]
9
  [% LxERP.t8('Kivitendo will then update the database automatically.') %]
10
 </p>
11

  
12
 <hr>
13
 <p>
14
  [% LxERP.t8('For further information read this: ') %] <a href="doc/html/index.html" target="_blank">Kivitendo Installation</a><br>
15
  [% LxERP.t8('Or download the whole Installation Documentation as PDF (350kB) for off-line study (currently in German Language): ') %] <a href="doc/Kivitendo-Dokumentation.pdf" target="_blank">Kivitendo-Dokumentation.pdf</a>
16
 </p>
17

  
18
 <hr>
19

  
20
 <p>
21
  <a href="controller.pl?action=show" target="_top">[% LxERP.t8('Login') %]</a> |
22
  <a href="admin.pl" target="_top">[% LxERP.t8('Administration') %]</a>
23
 </p>
24

  
25
</body>
26
</html>
templates/webpages/login_screen/auth_db_unreachable.html
1
[%- USE T8 %]
2
<body>
3

  
4
 <p><b>[% 'Error!' | $T8 %]</b></p>
5

  
6
 <p>[%- 'The authentication database is not reachable at the moment. Either it hasn\'t been set up yet or the database server might be down. Please contact your administrator.' | $T8 %]</p>
7

  
8
 <p>[% 'If you want to set up the authentication database yourself then log in to the administration panel. kivitendo will then create the database and tables for you.' | $T8 %]</p>
9
 <hr>
10
 <p>[% 'For further information read this: ' | $T8 %] <a href="doc/html/index.html" target="_blank">kivitendo Installation</a><br>
11
 [% 'Or download the whole Installation Documentation as PDF (350kB) for off-line study (currently in German Language): ' | $T8 %] <a href="doc/Kivitendo-Dokumentation.pdf" target="_blank">Kivitendo-Dokumentation.pdf</a></p>
12

  
13
 <hr>
14

  
15
 <p>
16
  <a href="controller.pl?action=LoginScreen/user_login" target="_top">[% 'Login' | $T8 %]</a> |
17
  <a href="admin.pl" target="_top">[% 'Administration' | $T8 %]</a>
18
 </p>
19

  
20
</body>
21
</html>
templates/webpages/login_screen/old_configuration_files.html
1
[% USE LxERP %][% USE HTML %]
2
<body>
3
 <div class="listtop">[% title %]</div>
4

  
5
 <p>
6
  [%- LxERP.t8('Starting with version 2.6.3 the configuration files in "config" have been consolidated.') %]
7
  [%- LxERP.t8('The following old files whose settings have to be merged manually into the new configuration file "config/lx_office.conf" still exist:') %]
8
 </p>
9

  
10
 <ul>
11
  [%- FOREACH file = FILES %]
12
   <li><code>config/[%- HTML.escape(file) %]</code></li>
13
  [%- END %]
14
 </ul>
15

  
16
 <p>
17
  [%- LxERP.t8('Due to security concerns these files have to be deleted or moved after the migration before you can continue using kivitendo.') %]
18
 </p>
19

  
20
 <p>
21
  [%- LxERP.t8('You can find information on the migration in the upgrade chapter of the documentation.') %]
22
 </p>
23
  <p>
24

  
25
  [%- LxERP.t8('Which is located at doc/Kivitendo-Dokumentation.pdf. Click here: ') %] <a href ="doc/Kivitendo-Dokumentation.pdf">doc/Kivitendo-Dokumentation.pdf</a>
26
</p>
27

  
28
 <p>
29
  <a href="controller.pl?action=LoginScreen/user_login">[%- LxERP.t8('Back to login') %]</a>
30
 </p>
31
</body>
32
</html>
templates/webpages/login_screen/user_login.html
1
[%- USE T8 %]
2
[% USE HTML %]<body class="login" onLoad="document.loginscreen.login.focus()">
3

  
4
 <center>
5
  <table class="login" border="3" cellpadding="20">
6
   <tr>
7
    <td class="login" align="center">
8
     <a href="http://www.kivitendo.de" target="_top"><img src="image/kivitendo.png" border="0"></a>
9
     <h3 class="login" align="center">[% 'kivitendo' | $T8 %] [% version %]</h3>
10

  
11
     [% IF error %]
12
     <p><span class="message_error_login">[% error %]</span></p>
13
     [% END %]
14

  
15
     <p>
16

  
17
      <form method="post" name="loginscreen" action="controller.pl" target="_top">
18

  
19
       <input type="hidden" name="show_dbupdate_warning" value="1">
20

  
21
       <table width="100%">
22
        <tr>
23
         <td align="center">
24
          <table>
25
           <tr>
26
            <th align="right">[% 'Login Name' | $T8 %]</th>
27
            <td><input class="login" name="{AUTH}login" size="30" tabindex="1"></td>
28
           </tr>
29
           <tr>
30
            <th align="right">[% 'Password' | $T8 %]</th>
31
            <td><input class="login" type="password" name="{AUTH}password" size="30" tabindex="2"></td>
32
           </tr>
33
          </table>
34

  
35
          <br>
36
          <input type="hidden" name="action" value="LoginScreen/login">
37
          <input type="submit" value="[% 'Login' | $T8 %]" tabindex="3">
38

  
39
         </td>
40
        </tr>
41
       </table>
42

  
43
      </form>
44

  
45
    </td>
46
   </tr>
47
  </table>
48

  
49
</body>
50
</html>
templates/webpages/menu/header.html
4 4
[% UNLESS is_links %]
5 5
 <span class="frame-header-element frame-header-left">
6 6
    [<a href="JavaScript:Switch_Menu();" title="[% 'Switch Menu on / off' | $T8 %]">[% 'Menu' | $T8 %]</a>]
7
    [<a HREF="login.pl" target="_blank" title="[% 'Open a further kivitendo Window or Tab' | $T8 %]">[% 'New Win/Tab' | $T8 %]</a>]
7
    [<a href="controller.pl?action=LoginScreen/user_login" target="_blank" title="[% 'Open a further kivitendo Window or Tab' | $T8 %]">[% 'New Win/Tab' | $T8 %]</a>]
8 8
    [<a href="JavaScript:top.main_window.print();" title="[% 'Hardcopy' | $T8 %]">[% 'Print' | $T8 %]</a>]
9 9
    [<a href="Javascript:top.main_window.history.back();" title="[% 'Go one step back' | $T8 %]">[% 'Back' | $T8 %]</a>]
10 10
    [<a href="Javascript:top.main_window.history.forward();" title="[% 'Go one step forward' | $T8 %]">[% 'Fwd' | $T8 %]</a>]
......
23 23
 <span class="frame-header-element frame-header-right">
24 24
  [% 'User' | $T8 %]:
25 25
  [% MYCONFIG.login %]
26
  [<a href="login.pl?action=logout" target="_top" title="[% 'Logout now' | $T8 %]">[% 'Logout' | $T8 %]</a>]
26
  [<a href="controller.pl?action=LoginScreen/logout" target="_top" title="[% 'Logout now' | $T8 %]">[% 'Logout' | $T8 %]</a>]
27 27
  [% now.to_lxoffice %] -
28 28
  [% now.hms %]
29 29
 </span>
templates/webpages/menu/menunew.html
26 26
   </td>
27 27
   <td align="right" nowrap>
28 28
    [[% 'User' | $T8 %]: [% HTML.escape(login) %] -
29
    <a href="login.pl?action=logout" target="_top">[% 'logout' | $T8 %]</a>]
29
    <a href="controller.pl?action=LoginScreen/logout" target="_top">[% 'logout' | $T8 %]</a>]
30 30
    [% date %] <span id='clock_id' style='position:relative'></span>&nbsp;
31 31
   </td>
32 32
  </tr>
templates/webpages/menu/menuv3.html
51 51
   </td>
52 52
   <td align="right" style="vertical-align:middle; color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>
53 53
    [[% 'User' | $T8 %]: [% HTML.escape(login) %] -
54
    <a href="login.pl?action=logout" target="_top">[% 'logout' | $T8 %]</a>]
54
    <a href="controller.pl?action=LoginScreen/logout" target="_top">[% 'logout' | $T8 %]</a>]
55 55
    [% date %] <span id='clock_id' style='position:relative'></span>&nbsp;
56 56
   </td>
57 57
  </tr>
templates/webpages/menu/menuv4.html
8 8
  </span>
9 9
  <span class="frame-header-element frame-header-right">
10 10
   [[% 'User' | $T8 %]: [% HTML.escape(login) %] -
11
   <a href="login.pl?action=logout" target="_top">[% 'logout' | $T8 %]</a>]
11
   <a href="controller.pl?action=LoginScreen/logout" target="_top">[% 'logout' | $T8 %]</a>]
12 12
   [% date %] <span id='clock_id' style='position:relative'></span>&nbsp;
13 13
  </span>
14 14
 </div>

Auch abrufbar als: Unified diff