X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=access%2Flogin.php;h=fbabe47ef317ca7ce1c3efa48e6223fba2df687a;hb=66dfa9cf59409247c48a73257ee840bf58bd3937;hp=efdd276dad79b6ac6e4620b5294f0b0b30adcbe7;hpb=ebc600101ceab69c06eac4b1bd4d1782af45de05;p=fa-stable.git diff --git a/access/login.php b/access/login.php index efdd276d..fbabe47e 100644 --- a/access/login.php +++ b/access/login.php @@ -12,21 +12,15 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_to_root'])) die(_("Restricted access")); include_once($path_to_root . "/includes/ui.inc"); - + include_once($path_to_root . "/includes/page/header.inc"); + $js = ""; - $js2 = ""; - + add_js_file('login.js'); // Display demo user name and password within login form if "$allow_demo_mode" is true if ($allow_demo_mode == true) { @@ -36,6 +30,16 @@ function set_fullmode() { { $demo_text = _("Please login here"); } + + if (check_faillog()) + { + $blocked_msg = ''._('Too many failed login attempts.
Please wait a while or try later.').'
'; + + $js .= ""; + $demo_text = $blocked_msg; + } if (!isset($def_coy)) $def_coy = 0; $def_theme = "default"; @@ -49,23 +53,25 @@ function set_fullmode() { echo "\n"; echo "\n"; - echo "$title\n"; + echo "$title\n"; echo "\n"; - echo " \n"; - echo $js2; + echo " \n"; + echo " \n"; + send_scripts(); if (!$login_timeout) { echo $js; - } + } echo "\n"; - echo "\n"; + echo "\n"; echo "
$title
\n"; + div_start('_page_body'); br();br(); start_form(false, false, $_SESSION['timeout']['uri'], "loginform"); - start_table($table_style2); + start_table(false, "class='login'"); start_row(); echo ""; if (!$login_timeout) { // FA logo @@ -85,7 +91,7 @@ function set_fullmode() { $password = $allow_demo_mode ? "password":""; - echo ""._("Password")."\n"; + password_row(_("Password:"), 'password', $password); if ($login_timeout) { hidden('company_login_name', $_SESSION["wa_current_user"]->company); @@ -94,17 +100,23 @@ function set_fullmode() { $coy = $_SESSION['wa_current_user']->company; else $coy = $def_coy; - echo ""._("Company")."\n"; + if (!@$text_company_selection) { + echo ""._("Company")."\n"; + echo ""; + } else { +// $coy = $def_coy; + text_row(_("Company"), "company_login_nickname", "", 20, 50); + } start_row(); - label_cell($demo_text, "colspan=2 align='center'"); + label_cell($demo_text, "colspan=2 align='center' id='log_msg'"); end_row(); }; end_table(1); - echo "
\n"; - end_form(1); + echo "
\n"; foreach($_SESSION['timeout']['post'] as $p => $val) { // add all request variables to be resend together with login data @@ -112,6 +124,9 @@ function set_fullmode() { 'password', 'SubmitUser', 'company_login_name'))) echo ""; } + end_form(1); + $Ajax->addScript(true, "document.forms[0].password.focus();"); + echo ""; + div_end(); echo "\n"; echo ""; if (isset($_SESSION['wa_current_user']))