File: timeout.php

package info (click to toggle)
frontaccounting 2.2.10-3.1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 6,252 kB
  • sloc: php: 64,938; sql: 3,014; sh: 390; makefile: 38
file content (32 lines) | stat: -rw-r--r-- 1,230 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/**********************************************************************
    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>.
***********************************************************************/
/*
	User authentication page popped up after login timeout during ajax call.
*/
$path_to_root = '..';
$page_security = 'SA_OPEN';
include_once($path_to_root . "/includes/session.inc");

include($path_to_root .'/access/login.php');

if (get_post('SubmitUser') && $_SESSION['wa_current_user']->logged_in()) {
	// After successfull login repeat last ajax call.
	// Login form consists all post variables from last ajax call.
echo "<script>
	var o = opener;
	if (o) {
		o.JsHttpRequest.request(document.getElementsByName('SubmitUser')[0], o.document.forms[0]);
		close();
	}
</script>";
}
?>