X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=access%2Flogin.php;h=3bbf0060ec37fcab5ebe32d4a7ee4ad04be2267a;hb=76ca9fef9bb510236a6a7740fa0f60eb7db384c9;hp=9fd3356dc8125de92f935f9bc7114861632678e8;hpb=91859838e082d79f45ea0416cadab86c568a64f7;p=fa-stable.git diff --git a/access/login.php b/access/login.php index 9fd3356d..3bbf0060 100644 --- a/access/login.php +++ b/access/login.php @@ -1,139 +1,140 @@ . +***********************************************************************/ 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"); + die(_("Restricted access")); + 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" is true - $demo_text = ""; - if ($allow_demo_mode == True) + if ($allow_demo_mode == true) { - $demo_text = "Login as user: demouser and password: cooldemo"; + $demo_text = _("Login as user: demouser and password: password"); } else { - $demo_text = "Please login here"; + $demo_text = _("Please login here"); } if (!isset($def_coy)) $def_coy = 0; - $def_theme = $path_to_root . '/themes/default'; -?> - - - - - <?php echo $app_title . " " . $version;?> - - - + $def_theme = "default"; - - - - - + $login_timeout = $_SESSION["wa_current_user"]->last_act; - - - - - - - - - - - - - - - - - - - - -
FrontAccounting
+ $title = $login_timeout ? _('Authorization timeout') : $app_title." ".$version." - "._("Login"); + $encoding = isset($_SESSION['language']->encoding) ? $_SESSION['language']->encoding : "iso-8859-1"; + $rtl = isset($_SESSION['language']->dir) ? $_SESSION['language']->dir : "ltr"; + $onload = !$login_timeout ? "onload='defaultCompany()'" : ""; - - - - \n"; + end_row(); + echo "\n"; + if (!$login_timeout) + table_section_title(_("Version")." $version Build $build_version - "._("Login")); + $value = $login_timeout ? $_SESSION['wa_current_user']->loginname : ($allow_demo_mode ? "demouser":""); + text_row(_("User name"), "user_name_entry_field", $value, 20, 30); - + $password = $allow_demo_mode ? "password":""; - - - - - - - -


- - - - + echo "\n"; + echo "\n"; + echo "$title\n"; + echo "\n"; + echo " \n"; + send_scripts(); + if (!$login_timeout) + { + echo $js; + } + echo "\n"; - + echo "\n"; - + echo "
$title
\n"; + + div_start('_page_body'); + br();br(); + start_form(false, false, $_SESSION['timeout']['uri'], "loginform"); + start_table(false, "class='login'"); + start_row(); + echo "
"; + if (!$login_timeout) { // FA logo + echo "FrontAccounting"; + } else { + echo ""._('Authorization timeout').""; + } + echo "
-
 
+ foreach($_SESSION['timeout']['post'] as $p => $val) { + // add all request variables to be resend together with login data + if (!in_array($p, array('ui_mode', 'user_name_entry_field', + 'password', 'SubmitUser', 'company_login_name'))) + echo ""; + } + end_form(1); + $Ajax->addScript(true, "document.forms[0].password.focus();"); - - - - - - + "; + div_end(); + echo "\n"; + echo ""; + if (isset($_SESSION['wa_current_user'])) + $date = Today() . " | " . Now(); + else + $date = date("m/d/Y") . " | " . date("h.i am"); + echo "\n"; + echo "
$date
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "

\n"; + echo "\n"; + +?> \ No newline at end of file