my ($self, $password) = @_;
- my $session_root_auth = $self->get_session_value(SESSION_KEY_ROOT_AUTH);
+ my $session_root_auth = $self->get_session_value(SESSION_KEY_ROOT_AUTH());
if (defined $session_root_auth && $session_root_auth == OK) {
$::lxdebug->leave_sub;
return OK;
my $admin_password = SL::Auth::Password->hash_if_unhashed(login => 'root', password => $self->{admin_password}->());
my $result = $password eq $admin_password ? OK : ERR_PASSWORD;
- $self->set_session_value(SESSION_KEY_ROOT_AUTH ,=> $result);
-
- sleep 5 if $result != OK;
+ $self->set_session_value(SESSION_KEY_ROOT_AUTH() => $result);
$::lxdebug->leave_sub;
return $result;
my ($self, $login, $password) = @_;
- my $session_auth = $self->get_session_value(SESSION_KEY_USER_AUTH);
+ my $session_auth = $self->get_session_value(SESSION_KEY_USER_AUTH());
if (defined $session_auth && $session_auth == OK) {
$::lxdebug->leave_sub;
return OK;
}
my $result = $login ? $self->{authenticator}->authenticate($login, $password) : ERR_USER;
- $self->set_session_value(SESSION_KEY_USER_AUTH ,=> $result, login => $login);
-
- sleep 5 if $result != OK;
+ $self->set_session_value(SESSION_KEY_USER_AUTH() => $result, login => $login);
$::lxdebug->leave_sub;
return $result;
}
+sub punish_wrong_login {
+ sleep 5;
+}
+
sub get_stored_password {
my ($self, $login) = @_;
my %params = ref($_[0]) eq 'HASH' ? %{ $_[0] } : @_;
my $controller = delete($params{controller}) || $self->_controller_name;
- my $action = delete($params{action}) || 'dispatch';
- $params{action} = "${controller}/${action}";
+ my $action = $params{action} || 'dispatch';
+
+ my $script;
+ if ($controller =~ m/\.pl$/) {
+ # Old-style controller
+ $script = $controller;
+ } else {
+ $params{action} = "${controller}/${action}";
+ $script = "controller.pl";
+ }
+
my $query = join '&', map { uri_encode($_->[0]) . '=' . uri_encode($_->[1]) } @{ flatten(\%params) };
- return "controller.pl?${query}";
+ return "${script}?${query}";
}
sub redirect_to {
return 'user';
}
+sub keep_auth_vars_in_form {
+ return 0;
+}
+
#
# private functions -- for use in Base only
#
future value C<none> (which would require no authentication but is not
yet implemented).
+=item C<keep_auth_vars_in_form>
+
+May be overridden by a controller. If falsish (the default) all form
+variables whose name starts with C<{AUTH}> are removed before the
+request is routed. Only controllers that handle login requests
+themselves should return trueish for this function.
+
=back
=head2 PRIVATE FUNCTIONS
--- /dev/null
+package SL::Controller::LoginScreen;
+
+use strict;
+
+use parent qw(SL::Controller::Base);
+
+use SL::Dispatcher::AuthHandler::User;
+use SL::User;
+
+#
+# actions
+#
+
+sub action_user_login {
+ my ($self) = @_;
+
+ $self->render('login_screen/user_login');
+}
+
+sub action_logout {
+ my ($self) = @_;
+
+ $::auth->destroy_session;
+ $::auth->create_or_refresh_session;
+ $self->render('login_screen/user_login', error => $::locale->text('You are logged out!'));
+}
+
+sub action_login {
+ my ($self) = @_;
+
+ %::myconfig = $::form->{'{AUTH}login'} ? $::auth->read_user(login => $::form->{'{AUTH}login'}) : ();
+ %::myconfig = SL::Dispatcher::AuthHandler::User->new->handle(countrycode => $::myconfig{countrycode});
+ $::form->{login} = $::myconfig{login};
+ $::locale = Locale->new($::myconfig{countrycode}) if $::myconfig{countrycode};
+ my $user = User->new(login => $::myconfig{login});
+
+ # if we get an error back, bale out
+ my $result = $user->login($::form);
+
+ # Database update available?
+ ::end_of_request() if -2 == $result;
+
+ # Auth DB needs update? If so log the user out forcefully.
+ if (-3 == $result) {
+ $::auth->destroy_session;
+ return $self->render('login_screen/auth_db_needs_update');
+ }
+
+ # Other login errors.
+ if (0 > $result) {
+ $::auth->punish_wrong_login;
+ return $self->render('login_screen/user_login', error => $::locale->text('Incorrect username or password!'));
+ }
+
+ # Everything is fine.
+ $::auth->set_cookie_environment_variable();
+
+ return $self->redirect_to($::form->{callback}) if $::form->{callback};
+
+ my %style_to_script_map = (
+ v3 => 'v3',
+ neu => 'new',
+ v4 => 'v4',
+ );
+
+ my $menu_script = $style_to_script_map{$user->{menustyle}} || '';
+
+ $self->redirect_to(controller => "menu${menu_script}.pl", action => 'display');
+}
+
+#
+# settings
+#
+sub get_auth_level {
+ return 'none';
+}
+
+sub keep_auth_vars_in_form {
+ return 1;
+}
+
+1;
::run();
::end_of_request();
} else {
- show_error('login/auth_db_unreachable');
+ show_error('login_screen/auth_db_unreachable');
}
}
}
my $error_type = shift || '';
my %params = @_;
- $::locale = Locale->new($::lx_office_conf{system}->{language});
+ $::myconfig{countrycode} = delete($params{countrycode}) || $::lx_office_conf{system}->{language};
+ $::locale = Locale->new($::myconfig{countrycode});
$::form->{error} = $::locale->text('The session is invalid or has expired.') if ($error_type eq 'session');
- $::form->{error} = $::locale->text('Incorrect password!.') if ($error_type eq 'password');
- $::myconfig{countrycode} = $::lx_office_conf{system}->{language};
+ $::form->{error} = $::locale->text('Incorrect password!') if ($error_type eq 'password');
$::form->header;
print $::form->parse_html_template($template, \%params);
$::form->error($::locale->text('System currently down for maintenance!')) if -e ($::lx_office_conf{paths}->{userspath} . "/nologin") && $script ne 'admin';
- if ($script eq 'login' or $script eq 'admin') {
- $::form->{titlebar} = "Lx-Office " . $::locale->text('Version') . " $::form->{version}";
+ ($routing_type, $script, $script_name, $action) = qw(controller controller LoginScreen login) if ($script eq 'login') && ($action eq 'login');
+
+ if (($script eq 'login') && !$action) {
+ print $::request->{cgi}->redirect('controller.pl?action=LoginScreen/user_login');
+
+ } elsif ($script eq 'admin') {
+ $::form->{titlebar} = "kivitendo " . $::locale->text('Version') . " $::form->{version}";
::run($session_result);
} else {
- show_error('login/password_error', 'session') if SL::Auth::SESSION_EXPIRED == $session_result;
+ show_error('login_screen/user_login', 'session') if SL::Auth::SESSION_EXPIRED == $session_result;
- my $auth_level = $self->{auth_handler}->handle(
+ my %auth_result = $self->{auth_handler}->handle(
routing_type => $routing_type,
script => $script,
controller => $script_name,
action => $action,
);
- delete @{ $::form }{ grep { m/^\{AUTH\}/ } keys %{ $::form } };
+ delete @{ $::form }{ grep { m/^\{AUTH\}/ } keys %{ $::form } } unless $auth_result{keep_auth_vars};
if ($action) {
- $::instance_conf->init if $auth_level eq 'user';
+ $::instance_conf->init if $auth_result{auth_level} eq 'user';
map { $::form->{$_} = $::myconfig{$_} } qw(charset)
unless $action eq 'save' && $::form->{type} eq 'preferences';
my @old_files = grep { -f "config/${_}" } qw(authentication.pl console.conf lx-erp.conf lx-erp-local.conf);
return unless @old_files;
- $::form->{title} = $::locale->text('Old configuration files');
+ $::form->{title} = $::locale->text('Old configuration files');
$::form->header;
- print $::form->parse_html_template('login/old_configuration_files', { FILES => \@old_files });
+ print $::form->parse_html_template('login_screen/old_configuration_files', { FILES => \@old_files });
::end_of_request();
}
use parent qw(Rose::Object);
use SL::Dispatcher::AuthHandler::Admin;
+use SL::Dispatcher::AuthHandler::None;
use SL::Dispatcher::AuthHandler::User;
+my %valid_auth_levels = map { ($_ => 1) } qw(user admin none);
+
sub handle {
my ($self, %param) = @_;
$self->{handlers}->{$handler_name} ||= $handler_name->new;
$self->{handlers}->{$handler_name}->handle;
- return $auth_level;
+ return (
+ auth_level => $auth_level,
+ keep_auth_vars => $self->get_keep_auth_vars(%param),
+ );
}
sub get_auth_level {
: $param{routing_type} eq 'controller' ? "SL::Controller::$param{controller}"->get_auth_level($param{action})
: 'user';
- return $auth_level eq 'user' ? 'user' : 'admin';
+ return $valid_auth_levels{$auth_level} ? $auth_level : 'user';
+}
+
+sub get_keep_auth_vars {
+ my ($self, %param) = @_;
+
+ return $param{routing_type} eq 'controller' ? "SL::Controller::$param{controller}"->keep_auth_vars_in_form : 0;
}
1;
return if $::form->{'{AUTH}admin_password'} && ($::auth->authenticate_root($::form->{'{AUTH}admin_password'}) == $::auth->OK());
return if !$::form->{'{AUTH}admin_password'} && ($::auth->authenticate_root($::auth->get_session_value('admin_password')) == $::auth->OK());
+ $::auth->punish_wrong_login;
$::auth->delete_session_value('admin_password');
- SL::Dispatcher::show_error('login/password_error', 'password', is_admin => 1);
+ SL::Dispatcher::show_error('admin/adminlogin', 'password');
}
1;
--- /dev/null
+package SL::Dispatcher::AuthHandler::None;
+
+use strict;
+
+use parent qw(Rose::Object);
+
+sub handle {
+ %::myconfig = ();
+}
+
+1;
use parent qw(Rose::Object);
sub handle {
+ my ($self, %param) = @_;
+
my $login = $::form->{'{AUTH}login'} || $::auth->get_session_value('login');
- SL::Dispatcher::show_error('login/password_error', 'password') if not defined $login;
+ $self->_error(%param) if !defined $login;
%::myconfig = $::auth->read_user(login => $login);
- SL::Dispatcher::show_error('login/password_error', 'password') unless $::myconfig{login};
+ $self->_error(%param) unless $::myconfig{login};
$::locale = Locale->new($::myconfig{countrycode});
- my $ok = $::form->{'{AUTH}login'} && (SL::Auth::OK == $::auth->authenticate($login, $::form->{'{AUTH}password'}));
- $ok ||= !$::form->{'{AUTH}login'} && (SL::Auth::OK == $::auth->authenticate($login, undef));
+ my $ok = $::form->{'{AUTH}login'} && (SL::Auth::OK() == $::auth->authenticate($::myconfig{login}, $::form->{'{AUTH}password'}));
+ $ok ||= !$::form->{'{AUTH}login'} && (SL::Auth::OK() == $::auth->authenticate($::myconfig{login}, undef));
- SL::Dispatcher::show_error('login/password_error', 'password') if !$ok;
+ $self->_error(%param) if !$ok;
$::auth->create_or_refresh_session;
$::auth->delete_session_value('FLASH');
+
+ return %::myconfig;
+}
+
+sub _error {
+ my $self = shift;
+
+ $::auth->punish_wrong_login;
+ SL::Dispatcher::show_error('login_screen/user_login', 'password', @_);
}
1;
if ($form->{action}) {
if ($auth->authenticate_root($form->{'{AUTH}admin_password'}) != $auth->OK()) {
+ $auth->punish_wrong_login;
$form->{error_message} = $locale->text('Incorrect Password!');
$auth->delete_session_value('admin_password');
adminlogin();
our $form;
our $auth;
-sub run {
- $::lxdebug->enter_sub;
- my $session_result = shift;
-
- $form = $::form;
- $auth = $::auth;
-
- $form->{stylesheet} = "lx-office-erp.css";
- $form->{favicon} = "favicon.ico";
-
- if (SL::Auth::SESSION_EXPIRED == $session_result) {
- $form->{error_message} = $::locale->text('The session is invalid or has expired.');
- login_screen();
- ::end_of_request();
- }
- my $action = $form->{action};
- if (!$action && $auth->{SESSION}->{login}) {
- $action = 'login';
- }
- if ($action) {
- $form->{login} = $form->{'{AUTH}login'} || $form->{login};
- %::myconfig = $auth->read_user(login => $form->{login}) if $form->{login};
-
- $::locale = Locale->new($::myconfig{countrycode}) if $::myconfig{countrycode};
-
- if (SL::Auth::OK != $auth->authenticate($::myconfig{login}, $form->{'{AUTH}password'})) {
- $form->{error_message} = $::locale->text('Incorrect username or password!');
- login_screen();
- } else {
- $auth->create_or_refresh_session();
- delete $form->{'{AUTH}password'};
-
- $form->{titlebar} .= " - $::myconfig{name} - $::myconfig{dbname}";
- call_sub($::locale->findsub($action));
- }
- } else {
- login_screen();
- }
-
- $::lxdebug->leave_sub;
-}
-
-sub login_screen {
- $main::lxdebug->enter_sub();
- my ($msg) = @_;
-
- if (-f "css/lx-office-erp.css") {
- $form->{stylesheet} = "lx-office-erp.css";
- }
-
- $form->{msg} = $msg;
- $form->header();
-
- print $form->parse_html_template('login/login_screen');
-
- $main::lxdebug->leave_sub();
-}
-
-sub login {
- $main::lxdebug->enter_sub();
-
- unless ($form->{login}) {
- login_screen($::locale->text('You did not enter a name!'));
- ::end_of_request();
- }
-
- my $user = User->new(login => $form->{login});
-
- # if we get an error back, bale out
- my $result;
- if (($result = $user->login($form)) <= -1) {
- if ($result == -3) {
- show_error('login/auth_db_needs_update');
- $::auth->destroy_session;
- ::end_of_request();
- }
-
- ::end_of_request() if $result == -2;
- login_screen($::locale->text('Incorrect username or password!'));
- ::end_of_request();
- }
-
- my %style_to_script_map = (
- v3 => 'v3',
- neu => 'new',
- v4 => 'v4',
- );
-
- my $menu_script = $style_to_script_map{$user->{menustyle}} || '';
-
- # made it this far, execute the menu
- # standard redirect does not seem to work for this invocation, (infinite loops?)
- # do a manual invocation instead
-# $form->{callback} = build_std_url("script=menu${menu_script}.pl", 'action=display', "callback=" . $form->escape($form->{callback}));
-
- $main::auth->set_cookie_environment_variable();
-
- $::form->{script} = "menu${menu_script}.pl";
- $::form->{action} = 'display';
- $::form->{callback} = $::form->escape($::form->{callback});
-
- require "bin/mozilla/$::form->{script}";
- display();
-
-# $form->redirect();
-
- $main::lxdebug->leave_sub();
-}
-
-sub logout {
- $main::lxdebug->enter_sub();
-
- $main::auth->destroy_session();
-
- # remove the callback to display the message
- $form->{callback} = "login.pl?action=";
- $form->redirect($::locale->text('You are logged out!'));
-
- $main::lxdebug->leave_sub();
-}
-
sub company_logo {
$main::lxdebug->enter_sub();
$main::lxdebug->leave_sub();
}
-sub show_error {
- my $template = shift;
- my %myconfig = %main::myconfig;
- $myconfig{countrycode} = $::lx_office_conf{system}->{language};
- $form->{stylesheet} = 'css/lx-office-erp.css';
-
- $form->header();
- print $form->parse_html_template($template);
-
- # $form->parse_html_template('login/auth_db_unreachable');
- # $form->parse_html_template('login/auth_db_needs_update');
- # $form->parse_html_template('login/authentication_pl_missing');
-
- ::end_of_request();
-}
-
1;
__END__
my $login = "[Nutzer "
. $form->{login}
- . " - <a href=\"login.pl?action=logout\" target=\"_top\">"
+ . " - <a href=\"controller.pl?action=LoginScreen/logout\" target=\"_top\">"
. $::locale->text('Logout')
. "</a>] ";
my ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat,
<html>
<head>
- <meta http-equiv="refresh" content="0;URL=login.pl">
+ <meta http-equiv="refresh" content="0;URL=controller.pl?action=LoginScreen/user_login">
</head>
<body>
- <a href="login.pl">Lx-Office-Login</a>
+ <a href="controller.pl?action=LoginScreen/user_login">kivitendo-Login</a>
</body>
</html>
'Incoming Payments' => 'Zahlungseingänge',
'Incoming invoice number' => 'Eingangsrechnungsnummer',
'Incorrect Password!' => 'Ungültiges Passwort!',
- 'Incorrect password!.' => 'Ungültiges Passwort!.',
'Incorrect username or password!' => 'Ungültiger Benutzername oder falsches Passwort!',
'Increase' => 'Erhöhen',
'Individual Items' => 'Einzelteile',
'Incoming Payments' => 'Zahlungseingänge',
'Incoming invoice number' => 'Eingangsrechnungsnummer',
'Incorrect Password!' => 'Passwort falsch!',
- 'Incorrect password!.' => 'Ungültiges Passwort!.',
'Incorrect username or password!' => 'Ungültiger Benutzername oder falsches Passwort!',
'Increase' => 'Erhöhen',
'Individual Items' => 'Einzelteile',
no_todo_list=1
[Program--Logout]
-module=login.pl
-action=logout
+module=controller.pl
+action=LoginScreen/logout
target=_top
<h2>[% 'Administration' | $T8 %]</h2>
- [% IF error_message %]
- <p><span class="message_error_login">[% error_message %]</span></p>
+ [% IF error %]
+ <p><span class="message_error_login">[% error %]</span></p>
[% END %]
<form method="post" action="admin.pl">
<p>[% 'kivitendo Homepage' | $T8 %]: <a href="http://kivitendo.de" target="_blank" title="[% 'kivitendo Homepage' | $T8 %]">http://kivitendo.de</a></p>
- <p><a href="login.pl" target="_top">[%- LxERP.t8('Back to the login page') %]</a></p>
+ <p><a href="controller.pl?action=LoginScreen/user_login" target="_top">[%- LxERP.t8('Back to the login page') %]</a></p>
</div>
</div>
</form>
- <form method="post" action="login.pl">
+ <form method="post" action="controller.pl">
+ <input type="hidden" name="action" value="LoginScreen/login">
<div class="listheading">[% 'User Login' | $T8 %]</div>
<tr>
<th align="right">[% 'Password' | $T8 %]</th>
<td><input class="login" type="password" name="{AUTH}password"></td>
- <td><input type="submit" name="action" value="[% 'Login' | $T8 %]"></td>
+ <td><input type="submit" value="[% 'Login' | $T8 %]"></td>
</tr>
</table>
[%- USE T8 %]
[%- USE HTML %]
[%- USE LxERP %]
-<form name="Form" method="post" action="login.pl">
+<form name="Form" method="post" action="controller.pl">
- <input type="hidden" name="action" value="login">
+ <input type="hidden" name="action" value="LoginScreen/login">
<p><input type="button" class="submit" onclick="history.back()" value="[% 'Back' | $T8 %]"></p>
<p class="message_hint">
[% LxERP.t8('kivitendo is about to update the database [ #1 ].', dbname) | html %]
+++ /dev/null
-[%- USE LxERP %]
-<body>
-
- <p><b>[% LxERP.t8('Error!') %]</b></p>
-
- <p>
- [% LxERP.t8('Kivitendo needs to update the authentication database before you can proceed.') %]
- [% LxERP.t8('Please log in to the administration panel.') %]
- [% LxERP.t8('Kivitendo will then update the database automatically.') %]
- </p>
-
- <hr>
- <p>
- [% LxERP.t8('For further information read this: ') %] <a href="doc/html/index.html" target="_blank">Kivitendo Installation</a><br>
- [% 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>
- </p>
-
- <hr>
-
- <p>
- <a href="login.pl" target="_top">[% LxERP.t8('Login') %]</a> |
- <a href="admin.pl" target="_top">[% LxERP.t8('Administration') %]</a>
- </p>
-
-</body>
-</html>
+++ /dev/null
-[%- USE T8 %]
-<body>
-
- <p><b>[% 'Error!' | $T8 %]</b></p>
-
- <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>
-
- <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>
- <hr>
- <p>[% 'For further information read this: ' | $T8 %] <a href="doc/html/index.html" target="_blank">kivitendo Installation</a><br>
- [% '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>
-
- <hr>
-
- <p>
- <a href="login.pl" target="_top">[% 'Login' | $T8 %]</a> |
- <a href="admin.pl" target="_top">[% 'Administration' | $T8 %]</a>
- </p>
-
-</body>
-</html>
+++ /dev/null
-[%- USE T8 %]
-<body>
-
- <p><b>[% 'Error!' | $T8 %]</b></p>
-
- <p>[% 'The authentication configuration file "config/lx_office.conf" does not exist. This kivitendo installation has probably not been updated correctly yet. Please contact your administrator.' | $T8 %]</p>
-
- <p>[% 'If you yourself want to upgrade the installation then please read the file "doc/UPGRADE" and follow the steps outlined in this file.' | $T8 %]</p>
-
- <p>
- <a href="login.pl" target="_top">[% 'Login' | $T8 %]</a> |
- <a href="admin.pl" target="_top">[% 'Administration' | $T8 %]</a>
- </p>
-
-</body>
-</html>
+++ /dev/null
-[%- USE T8 %]
-[% USE HTML %]<body class="login" onLoad="document.loginscreen.login.focus()">
-
- <center>
- <table class="login" border="3" cellpadding="20">
- <tr>
- <td class="login" align="center">
- <a href="http://www.kivitendo.de" target="_top"><img src="image/kivitendo.png" border="0"></a>
- <h3 class="login" align="center">[% 'kivitendo' | $T8 %] [% version %]</h3>
-
- [% IF error_message %]
- <p><span class="message_error_login">[% error_message %]</span></p>
- [% END %]
-
- <p>
-
- <form method="post" name="loginscreen" action="login.pl" target="_top">
-
- <input type="hidden" name="show_dbupdate_warning" value="1">
-
- <table width="100%">
- <tr>
- <td align="center">
- <table>
- <tr>
- <th align="right">[% 'Login Name' | $T8 %]</th>
- <td><input class="login" name="{AUTH}login" size="30" tabindex="1"></td>
- </tr>
- <tr>
- <th align="right">[% 'Password' | $T8 %]</th>
- <td><input class="login" type="password" name="{AUTH}password" size="30" tabindex="2"></td>
- </tr>
- </table>
-
- <br>
- <input type="hidden" name="action" value="login">
- <input type="submit" value="[% 'Login' | $T8 %]" tabindex="3">
-
- </td>
- </tr>
- </table>
-
- </form>
-
- </td>
- </tr>
- </table>
-
-</body>
-</html>
+++ /dev/null
-[% USE LxERP %][% USE HTML %]
-<body>
- <div class="listtop">[% title %]</div>
-
- <p>
- [%- LxERP.t8('Starting with version 2.6.3 the configuration files in "config" have been consolidated.') %]
- [%- LxERP.t8('The following old files whose settings have to be merged manually into the new configuration file "config/lx_office.conf" still exist:') %]
- </p>
-
- <ul>
- [%- FOREACH file = FILES %]
- <li><code>config/[%- HTML.escape(file) %]</code></li>
- [%- END %]
- </ul>
-
- <p>
- [%- LxERP.t8('Due to security concerns these files have to be deleted or moved after the migration before you can continue using kivitendo.') %]
- </p>
-
- <p>
- [%- LxERP.t8('You can find information on the migration in the upgrade chapter of the documentation.') %]
- </p>
- <p>
-
- [%- LxERP.t8('Which is located at doc/Kivitendo-Dokumentation.pdf. Click here: ') %] <a href ="doc/Kivitendo-Dokumentation.pdf">doc/Kivitendo-Dokumentation.pdf</a>
-</p>
-
- <p>
- <a href="login.pl">[%- LxERP.t8('Back to login') %]</a>
- </p>
-</body>
-</html>
+++ /dev/null
-[%- USE T8 %]
-<body>
-
- <p><b>[% 'Error!' | $T8 %]</b></p>
-
- <p>[% error %]</p>
-
- <p><a href="[% IF is_admin %]admin.pl[% ELSE %]login.pl[% END %]" target="_top">[% 'Login' | $T8 %]</a></p>
-
-</body>
-</html>
--- /dev/null
+[%- USE LxERP %]
+<body>
+
+ <p><b>[% LxERP.t8('Error!') %]</b></p>
+
+ <p>
+ [% LxERP.t8('Kivitendo needs to update the authentication database before you can proceed.') %]
+ [% LxERP.t8('Please log in to the administration panel.') %]
+ [% LxERP.t8('Kivitendo will then update the database automatically.') %]
+ </p>
+
+ <hr>
+ <p>
+ [% LxERP.t8('For further information read this: ') %] <a href="doc/html/index.html" target="_blank">Kivitendo Installation</a><br>
+ [% 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>
+ </p>
+
+ <hr>
+
+ <p>
+ <a href="controller.pl?action=show" target="_top">[% LxERP.t8('Login') %]</a> |
+ <a href="admin.pl" target="_top">[% LxERP.t8('Administration') %]</a>
+ </p>
+
+</body>
+</html>
--- /dev/null
+[%- USE T8 %]
+<body>
+
+ <p><b>[% 'Error!' | $T8 %]</b></p>
+
+ <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>
+
+ <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>
+ <hr>
+ <p>[% 'For further information read this: ' | $T8 %] <a href="doc/html/index.html" target="_blank">kivitendo Installation</a><br>
+ [% '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>
+
+ <hr>
+
+ <p>
+ <a href="controller.pl?action=LoginScreen/user_login" target="_top">[% 'Login' | $T8 %]</a> |
+ <a href="admin.pl" target="_top">[% 'Administration' | $T8 %]</a>
+ </p>
+
+</body>
+</html>
--- /dev/null
+[% USE LxERP %][% USE HTML %]
+<body>
+ <div class="listtop">[% title %]</div>
+
+ <p>
+ [%- LxERP.t8('Starting with version 2.6.3 the configuration files in "config" have been consolidated.') %]
+ [%- LxERP.t8('The following old files whose settings have to be merged manually into the new configuration file "config/lx_office.conf" still exist:') %]
+ </p>
+
+ <ul>
+ [%- FOREACH file = FILES %]
+ <li><code>config/[%- HTML.escape(file) %]</code></li>
+ [%- END %]
+ </ul>
+
+ <p>
+ [%- LxERP.t8('Due to security concerns these files have to be deleted or moved after the migration before you can continue using kivitendo.') %]
+ </p>
+
+ <p>
+ [%- LxERP.t8('You can find information on the migration in the upgrade chapter of the documentation.') %]
+ </p>
+ <p>
+
+ [%- LxERP.t8('Which is located at doc/Kivitendo-Dokumentation.pdf. Click here: ') %] <a href ="doc/Kivitendo-Dokumentation.pdf">doc/Kivitendo-Dokumentation.pdf</a>
+</p>
+
+ <p>
+ <a href="controller.pl?action=LoginScreen/user_login">[%- LxERP.t8('Back to login') %]</a>
+ </p>
+</body>
+</html>
--- /dev/null
+[%- USE T8 %]
+[% USE HTML %]<body class="login" onLoad="document.loginscreen.login.focus()">
+
+ <center>
+ <table class="login" border="3" cellpadding="20">
+ <tr>
+ <td class="login" align="center">
+ <a href="http://www.kivitendo.de" target="_top"><img src="image/kivitendo.png" border="0"></a>
+ <h3 class="login" align="center">[% 'kivitendo' | $T8 %] [% version %]</h3>
+
+ [% IF error %]
+ <p><span class="message_error_login">[% error %]</span></p>
+ [% END %]
+
+ <p>
+
+ <form method="post" name="loginscreen" action="controller.pl" target="_top">
+
+ <input type="hidden" name="show_dbupdate_warning" value="1">
+
+ <table width="100%">
+ <tr>
+ <td align="center">
+ <table>
+ <tr>
+ <th align="right">[% 'Login Name' | $T8 %]</th>
+ <td><input class="login" name="{AUTH}login" size="30" tabindex="1"></td>
+ </tr>
+ <tr>
+ <th align="right">[% 'Password' | $T8 %]</th>
+ <td><input class="login" type="password" name="{AUTH}password" size="30" tabindex="2"></td>
+ </tr>
+ </table>
+
+ <br>
+ <input type="hidden" name="action" value="LoginScreen/login">
+ <input type="submit" value="[% 'Login' | $T8 %]" tabindex="3">
+
+ </td>
+ </tr>
+ </table>
+
+ </form>
+
+ </td>
+ </tr>
+ </table>
+
+</body>
+</html>
[% UNLESS is_links %]
<span class="frame-header-element frame-header-left">
[<a href="JavaScript:Switch_Menu();" title="[% 'Switch Menu on / off' | $T8 %]">[% 'Menu' | $T8 %]</a>]
- [<a HREF="login.pl" target="_blank" title="[% 'Open a further kivitendo Window or Tab' | $T8 %]">[% 'New Win/Tab' | $T8 %]</a>]
+ [<a href="controller.pl?action=LoginScreen/user_login" target="_blank" title="[% 'Open a further kivitendo Window or Tab' | $T8 %]">[% 'New Win/Tab' | $T8 %]</a>]
[<a href="JavaScript:top.main_window.print();" title="[% 'Hardcopy' | $T8 %]">[% 'Print' | $T8 %]</a>]
[<a href="Javascript:top.main_window.history.back();" title="[% 'Go one step back' | $T8 %]">[% 'Back' | $T8 %]</a>]
[<a href="Javascript:top.main_window.history.forward();" title="[% 'Go one step forward' | $T8 %]">[% 'Fwd' | $T8 %]</a>]
<span class="frame-header-element frame-header-right">
[% 'User' | $T8 %]:
[% MYCONFIG.login %]
- [<a href="login.pl?action=logout" target="_top" title="[% 'Logout now' | $T8 %]">[% 'Logout' | $T8 %]</a>]
+ [<a href="controller.pl?action=LoginScreen/logout" target="_top" title="[% 'Logout now' | $T8 %]">[% 'Logout' | $T8 %]</a>]
[% now.to_lxoffice %] -
[% now.hms %]
</span>
</td>
<td align="right" nowrap>
[[% 'User' | $T8 %]: [% HTML.escape(login) %] -
- <a href="login.pl?action=logout" target="_top">[% 'logout' | $T8 %]</a>]
+ <a href="controller.pl?action=LoginScreen/logout" target="_top">[% 'logout' | $T8 %]</a>]
[% date %] <span id='clock_id' style='position:relative'></span>
</td>
</tr>
</td>
<td align="right" style="vertical-align:middle; color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>
[[% 'User' | $T8 %]: [% HTML.escape(login) %] -
- <a href="login.pl?action=logout" target="_top">[% 'logout' | $T8 %]</a>]
+ <a href="controller.pl?action=LoginScreen/logout" target="_top">[% 'logout' | $T8 %]</a>]
[% date %] <span id='clock_id' style='position:relative'></span>
</td>
</tr>
</span>
<span class="frame-header-element frame-header-right">
[[% 'User' | $T8 %]: [% HTML.escape(login) %] -
- <a href="login.pl?action=logout" target="_top">[% 'logout' | $T8 %]</a>]
+ <a href="controller.pl?action=LoginScreen/logout" target="_top">[% 'logout' | $T8 %]</a>]
[% date %] <span id='clock_id' style='position:relative'></span>
</span>
</div>