+ if (@$SysPrefs->allow_password_reset) {
+ $demo_text .= " "._("or")." <a href='$path_to_root/index.php?reset=1'>"._("request new password")."</a>";
+ }
+ }
+
+ if (check_faillog())
+ {
+ $blocked = true;
+
+ $js .= "<script>setTimeout(function() {
+ document.getElementsByName('SubmitUser')[0].disabled=0;
+ document.getElementById('log_msg').innerHTML='$demo_text'}, 1000*".$SysPrefs->login_delay.");</script>";
+ $demo_text = '<span class="redfg">'._('Too many failed login attempts.<br>Please wait a while or try later.').'</span>';
+ } elseif ($_SESSION["wa_current_user"]->login_attempt > 1) {
+ $demo_text = '<span class="redfg">'._("Invalid password or username. Please, try again.").'</span>';