Revision 1040,
966 bytes
checked in by amuller, 15 years ago
(diff) |
Ticket #559 - Atualização de download de arquivos e sessão
|
Line | |
---|
1 | <?php |
---|
2 | $connection_id = $GLOBALS['phpgw']->session->sessionid; |
---|
3 | if (strlen($connection_id) != 32){ |
---|
4 | $GLOBALS['phpgw']->redirect($GLOBALS['phpgw_info']['server']['webserver_url'].'/login.php?cd=2'); |
---|
5 | exit; |
---|
6 | } |
---|
7 | $connection_id .= $GLOBALS['phpgw']->session->getuser_ip(); |
---|
8 | $connection_id .= $_SERVER[ 'HTTP_USER_AGENT' ]; |
---|
9 | |
---|
10 | if (!isset($_SESSION['connection_db_info'])) |
---|
11 | { |
---|
12 | $GLOBALS['phpgw']->db->query("select sessionid, ip, browser from phpgw_access_log where account_id <> 0 and lo = 0 and sessionid='{$GLOBALS['phpgw']->session->sessionid}' limit 1",__LINE__,__FILE__); |
---|
13 | $GLOBALS['phpgw']->db->next_record( ); |
---|
14 | $_SESSION['connection_db_info']['user_auth'] = $GLOBALS['phpgw']->db->row( ); |
---|
15 | } |
---|
16 | |
---|
17 | if ($_SESSION['connection_db_info']['user_auth'] && implode('',$_SESSION['connection_db_info']['user_auth']) !== $connection_id) |
---|
18 | { |
---|
19 | echo lang("An important error has occured with your login, please contact your system administrator"); |
---|
20 | exit; |
---|
21 | } |
---|
22 | |
---|
23 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.