| | |
| | | |
| | | // Maintenance mode |
| | | $maintenance_mode = false; |
| | | $maintenance_mode_error = ''; |
| | | $app->uses('ini_parser,getconf'); |
| | | $server_config_array = $app->getconf->get_global_config('misc'); |
| | | if($server_config_array['maintenance_mode'] == 'y'){ |
| | |
| | | //* Check if there are already wrong logins |
| | | $sql = "SELECT * FROM `attempts_login` WHERE `ip`= '{$ip}' AND `login_time` > (NOW() - INTERVAL 1 MINUTE) LIMIT 1"; |
| | | $alreadyfailed = $app->db->queryOneRecord($sql); |
| | | //* login to much wrong |
| | | //* too many failedlogins |
| | | if($alreadyfailed['times'] > 5) { |
| | | $error = $app->lng('error_user_too_many_logins'); |
| | | } else { |
| | |
| | | } |
| | | |
| | | $app->tpl->setVar('error', $error); |
| | | $app->tpl->setVar('pw_lost_txt', $app->lng('pw_lost_txt')); |
| | | $app->tpl->setVar('username_txt', $app->lng('username_txt')); |
| | | $app->tpl->setVar('password_txt', $app->lng('password_txt')); |
| | | $app->tpl->setVar('login_button_txt', $app->lng('login_button_txt')); |