$auth = $::auth;
$form->{stylesheet} = "lx-office-erp.css";
$form->{favicon} = "favicon.ico";
if (SL::Auth::SESSION_EXPIRED == $session_result) {
$auth = $::auth;
$form->{stylesheet} = "lx-office-erp.css";
$form->{favicon} = "favicon.ico";
if (SL::Auth::SESSION_EXPIRED == $session_result) {
our %myconfig = $auth->read_user($form->{login}) if ($form->{login});
if (!$myconfig{login} || (SL::Auth::OK != $auth->authenticate($form->{login}, $form->{password}, 0))) {
our %myconfig = $auth->read_user($form->{login}) if ($form->{login});
if (!$myconfig{login} || (SL::Auth::OK != $auth->authenticate($form->{login}, $form->{password}, 0))) {
login_screen();
} else {
$auth->set_session_value('login', $form->{login}, 'password', $form->{password});
$auth->create_or_refresh_session();
$form->{titlebar} .= " - $myconfig{name} - $myconfig{dbname}";
login_screen();
} else {
$auth->set_session_value('login', $form->{login}, 'password', $form->{password});
$auth->create_or_refresh_session();
$form->{titlebar} .= " - $myconfig{name} - $myconfig{dbname}";
$form->{todo_list} = create_todo_list('login_screen' => 1) if (!$form->{no_todo_list});
$form->{stylesheet} = $myconfig{stylesheet};
$form->{todo_list} = create_todo_list('login_screen' => 1) if (!$form->{no_todo_list});
$form->{stylesheet} = $myconfig{stylesheet};