X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=access%2Flogin.php;h=c1d1ebf94c6bd429bc3f096eacd7f99e4778f7b2;hb=3218c355d9455506febbd3a8a7d9bd61fc9a0a34;hp=7d4389f68f858f826b1bfe1816b1ad1b57ea2f6f;hpb=8f7ac519b7aaf8ec219862597e878d3a28316ac6;p=fa-stable.git
diff --git a/access/login.php b/access/login.php
index 7d4389f6..c1d1ebf9 100644
--- a/access/login.php
+++ b/access/login.php
@@ -11,183 +11,167 @@
***********************************************************************/
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/ui_view.inc");
- // Display demo user name and password within login form if "$allow_demo_mode" is true
- if ($allow_demo_mode == true)
+ include_once($path_to_root . "/includes/ui.inc");
+ include_once($path_to_root . "/includes/page/header.inc");
+
+ $js = "";
+
+ add_js_file('login.js');
+ // Display demo user name and password within login form if allow_demo_mode option is true
+ if ($SysPrefs->allow_demo_mode == true)
{
$demo_text = _("Login as user: demouser and password: password");
}
else
{
$demo_text = _("Please login here");
+ if (@$SysPrefs->allow_password_reset) {
+ $demo_text .= " "._("or")." "._("request new password")."";
+ }
}
+
+ if (check_faillog())
+ {
+ $blocked = true;
+
+ $js .= "";
+ $demo_text = ''._('Too many failed login attempts.
Please wait a while or try later.').'';
+ } elseif ($_SESSION["wa_current_user"]->login_attempt > 1) {
+ $demo_text = ''._("Invalid password or username. Please, try again.").'';
+ }
+
+ flush_dir(user_js_cache());
if (!isset($def_coy))
$def_coy = 0;
- $def_theme = $path_to_root . '/themes/default';
+ $def_theme = "default";
-$ajax_timeout = strstr($_SERVER['PHP_SELF'], 'timeout.php');
+ $login_timeout = $_SESSION["wa_current_user"]->last_act;
- echo "
-
$date | \n"; + echo "
".$SysPrefs->app_title." $version - " . _("Theme:") . " " . $def_theme . " | \n"; + echo "
".$SysPrefs->power_by." | \n"; + echo "