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 = "<script language='JavaScript' type='text/javascript'>
function defaultCompany()
{
document.forms[0].company_login_name.options[".$_SESSION["wa_current_user"]->company."].selected = true;
}
-".get_js_png_fix()."</script>";
- $js2 = "<script language='JavaScript' type='text/javascript'>
-function set_fullmode() {
- document.getElementById('ui_mode').value = 1;
- document.loginform.submit();
- return true;
-}
</script>";
-
+ 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)
{
echo "<head><title>$title</title>\n";
echo "<meta http-equiv='Content-type' content='text/html; charset=$encoding' />\n";
echo "<link href='$path_to_root/themes/$def_theme/default.css' rel='stylesheet' type='text/css'> \n";
+ send_scripts();
if (!$login_timeout)
{
echo $js;
- }
- echo $js2;
+ }
echo "</head>\n";
echo "<body id='loginscreen' $onload>\n";
password_row(_("Password:"), 'password', $password);
- if ($login_timeout) {
+ if ($login_timeout) {
hidden('company_login_name', $_SESSION["wa_current_user"]->company);
} else {
if (isset($_SESSION['wa_current_user']->company))
echo "<input type='hidden' name='$p' value='$val'>";
}
end_form(1);
+ $Ajax->addScript(true, "document.forms[0].password.focus();");
+
echo "<script language='JavaScript' type='text/javascript'>
//<![CDATA[
<!--
$page_security = 'SA_OPEN';
$path_to_root="..";
include($path_to_root . "/includes/session.inc");
+add_js_file('login.js');
include($path_to_root . "/includes/page/header.inc");
-page_header(_("Logout"), true, false, '', get_js_png_fix());
+page_header(_("Logout"), true, false, '');
echo "<table width='100%' border='0'>
<tr>
unset($_POST['_focus']);
}
-function get_js_png_fix()
-{
- $js = "function fixPNG(myImage)\n"
- . "{\n"
- . " var arVersion = navigator.appVersion.split(\"MSIE\")\n"
- . " var version = parseFloat(arVersion[1])\n"
- . " if ((version >= 5.5) && (version < 7) && (document.body.filters))\n"
- . " {\n"
- . " var imgID = (myImage.id) ? \"id='\" + myImage.id + \"' \" : \"\"\n"
- . " var imgClass = (myImage.className) ? \"class='\" + myImage.className + \"' \" : \"\"\n"
- . " var imgTitle = (myImage.title) ?\n"
- . " \"title='\" + myImage.title + \"' \" : \"title='\" + myImage.alt + \"' \"\n"
- . " var imgStyle = \"display:inline-block;\" + myImage.style.cssText\n"
- . " var strNewHTML = \"<span \" + imgID + imgClass + imgTitle\n"
- . " + \" style=\\\"\" + \"width:\" + myImage.width\n"
- . " + \"px; height:\" + myImage.height\n"
- . " + \"px;\" + imgStyle + \";\"\n"
- . " + \"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader\"\n"
- . " + \"(src=\'\" + myImage.src + \"\', sizingMethod='scale');\\\"></span>\"\n"
- . " myImage.outerHTML = strNewHTML\n"
- . " }\n"
- . "}\n";
- return $js;
-}
-
function get_js_date_picker()
{
global $go_debug;
--- /dev/null
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU General Public License, GPL,
+ as published by the Free Software Foundation, either version 3
+ of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
+***********************************************************************/
+function fixPNG(myImage)
+{
+ var arVersion = navigator.appVersion.split("MSIE")
+ var version = parseFloat(arVersion[1])
+ if ((version >= 5.5) && (version < 7) && (document.body.filters)) {
+ var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
+ var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
+ var imgTitle = (myImage.title) ?
+ "title='" + myImage.title + "' " : "title='" + myImage.alt + "' "
+ var imgStyle = "display:inline-block;" + myImage.style.cssText
+ var strNewHTML = "<span " + imgID + imgClass + imgTitle
+ + " style=width:" + myImage.width + "px; height:" + myImage.height + "px;"
+ + imgStyle + ";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+ + "(src='" + myImage.src + "', sizingMethod='scale');></span>"
+ myImage.outerHTML = strNewHTML
+ }
+}
+
+function set_fullmode() {
+ document.getElementById('ui_mode').value = 1;
+ document.loginform.submit();
+ return true;
+}