echo "<html dir='$rtl' >\n";
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/login.css' rel='stylesheet' type='text/css'> \n";
- echo $js2;
+ echo "<link href='$path_to_root/themes/$def_theme/default.css' rel='stylesheet' type='text/css'> \n";
if (!$login_timeout)
{
echo $js;
}
+ echo $js2;
echo "</head>\n";
- echo "<body $onload>\n";
+ echo "<body id='loginscreen' $onload>\n";
echo "<table class='titletext'><tr><td>$title</td></tr></table>\n";
+ div_start('_page_body');
br();br();
start_form(false, false, $_SESSION['timeout']['uri'], "loginform");
- start_table($table_style2);
+ start_table("class='login' $table_style2");
start_row();
echo "<td align='center' colspan=2>";
if (!$login_timeout) { // FA logo
end_row();
};
end_table(1);
- echo "<center><input type='submit' value=' "._("Login -->")." ' name='SubmitUser' onclick='set_fullmode();' /></center>\n";
- end_form(1);
+ echo "<center><input type='submit' value=' "._("Login -->")." ' name='SubmitUser'"
+ .($login_timeout ? '':" onclick='set_fullmode();'")." /></center>\n";
foreach($_SESSION['timeout']['post'] as $p => $val) {
// add all request variables to be resend together with login data
'password', 'SubmitUser', 'company_login_name')))
echo "<input type='hidden' name='$p' value='$val'>";
}
+ end_form(1);
echo "<script language='JavaScript' type='text/javascript'>
//<![CDATA[
<!--
//-->
//]]>
</script>";
+ div_end();
echo "<table class='bottomBar'>\n";
echo "<tr>";
if (isset($_SESSION['wa_current_user']))
function end_page($no_menu=false, $is_index=false, $hide_back_link=false)
{
- global $path_to_root, $Ajax;
- $hide_menu = $no_menu;
- div_end(); // _page_body section
- include($path_to_root . "/includes/page/footer.inc");
- page_footer($no_menu, $is_index, $hide_back_link);
+ global $path_to_root;
+
+ if (!$is_index && !$hide_back_link && function_exists('hyperlink_back'))
+ hyperlink_back();
+ div_end(); // end of _page_body section
+
+ include($path_to_root . "/includes/page/footer.inc");
+ page_footer($no_menu, $is_index, $hide_back_link);
}
function flush_dir($path, $wipe = false)
{
global $path_to_root, $js_lib, $Validate, $Editors, $Ajax;
- if (!$is_index && !$hide_back_link && function_exists('hyperlink_back'))
- hyperlink_back();
include_once($path_to_root."/themes/".user_theme()."/renderer.php");
$rend = new renderer();
$rend->menu_footer($no_menu, $is_index);
// Show login screen
if (!isset($_POST["user_name_entry_field"]) or $_POST["user_name_entry_field"] == "")
{
- $_SESSION['timeout'] = array( 'uri'=> $_SERVER['REQUEST_URI'],
+ // strip ajax marker from uri, to force synchronous page reload
+ $_SESSION['timeout'] = array( 'uri'=>preg_replace('/JsHttpRequest=(?:(\d+)-)?([^&]+)/s',
+ '', @$_SERVER['REQUEST_URI']),
'post' => $_POST);
- if (!in_ajax()) {
- include($path_to_root . "/access/login.php");
- } else {
- // ajax update of current page elements - open login window in popup
- // to not interfere with ajaxified page.
- $Ajax->popup($path_to_root . "/access/timeout.php");
- }
+ include($path_to_root . "/access/login.php");
+ if (in_ajax())
+ $Ajax->activate('_page_body');
exit;
} else {
$succeed = $_SESSION["wa_current_user"]->login($_POST["company_login_name"],
}
}
-
// POST vars cleanup needed for direct reuse.
// We quote all values later with db_escape() before db update.
$_POST = strip_quotes($_POST);