X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fsession.inc;h=e87f8bf187b75acd6c56f66c0805bfc19aa7cade;hb=3a089b809c344067abc7ca15ed754ab5c09c8f39;hp=71206521fda2bd2d89471b85e868862fed4b4e99;hpb=e1ba133463ff567e87d812a5d1663fb66b70a072;p=fa-stable.git diff --git a/includes/session.inc b/includes/session.inc index 71206521..e87f8bf1 100644 --- a/includes/session.inc +++ b/includes/session.inc @@ -133,15 +133,13 @@ function kill_login() function login_fail() { global $path_to_root; - + header("HTTP/1.1 401 Authorization Required"); echo "


" . _("Incorrect Password") . "

"; echo "" . _("The user and password combination is not valid for the system.") . "

"; - echo _("If you are not an authorized user, please contact your system administrator to obtain an account to enable you to use the system."); echo "
" . _("Try again") . ""; echo "
"; - kill_login(); die(); } @@ -533,9 +531,10 @@ if (!defined('FA_LOGOUT_PHP_FILE')){ '', html_specials_encode($_SERVER['REQUEST_URI'])), 'post' => $_POST); + if (in_ajax()) + $Ajax->popup($path_to_root ."/access/timeout.php"); + else include($path_to_root . "/access/login.php"); - if (in_ajax()) - $Ajax->activate('_page_body'); exit; } else { if (isset($_POST["company_login_nickname"]) && !isset($_POST["company_login_name"])) { @@ -555,7 +554,11 @@ if (!defined('FA_LOGOUT_PHP_FILE')){ if (!$succeed) { // Incorrect password - login_fail(); + if (isset($_SESSION['timeout'])) { + include($path_to_root . "/access/login.php"); + exit; + } else + login_fail(); } elseif(isset($_SESSION['timeout']) && !$_SESSION['timeout']['post']) {