Go to the source code of this file.
Functions | |
| MySQL_is_ipv4 ($ip) | |
| MySQL_ip2sql ($ip) | |
Variables | |
| $ipv6_schema = 1 | |
| $address = 'localhost' | |
| $user = 'nufwuser' | |
| $password = 'nufwpasswd' | |
| $database = 'nufwdb' | |
| $ssl = 0 | |
| $cacert = NULL | |
| $netmask_check = 1 | |
| else | $query = "SELECT user_id,username,no_logout FROM ipauth_sessions WHERE ip_saddr = (".MySQL_ip2sql($_SERVER['REMOTE_ADDR'])." & netmask) AND (end_time is NULL OR end_time > NOW()) LIMIT 1;" |
| else | $query = "SELECT user_id,username,no_logout FROM ipauth_sessions WHERE ip_saddr=".MySQL_ip2sql($_SERVER['REMOTE_ADDR'])." LIMIT 1;" |
| $res = $MySQL_fd->query($query) | |
| $userinfo = $res->fetch_row() | |
| $res = $MySQL_fd->query("UPDATE users SET end_time=NOW() WHERE user_id=".$userinfo[0]." and ip_saddr=".MySQL_ip2sql($_SERVER['REMOTE_ADDR']).";") | |
| MySQL_ip2sql | ( | $ | ip | ) |
Definition at line 33 of file index.php.
References $ipv6_schema, and MySQL_is_ipv4().
Here is the call graph for this function:

| MySQL_is_ipv4 | ( | $ | ip | ) |
| $ipv6_schema = 1 |
| else $query = "SELECT user_id,username,no_logout FROM ipauth_sessions WHERE ip_saddr=".MySQL_ip2sql($_SERVER['REMOTE_ADDR'])." LIMIT 1;" |
| else $query = "SELECT user_id,username,no_logout FROM ipauth_sessions WHERE ip_saddr = (".MySQL_ip2sql($_SERVER['REMOTE_ADDR'])." & netmask) AND (end_time is NULL OR end_time > NOW()) LIMIT 1;" |
| $res = $MySQL_fd->query("UPDATE users SET end_time=NOW() WHERE user_id=".$userinfo[0]." and ip_saddr=".MySQL_ip2sql($_SERVER['REMOTE_ADDR']).";") |
1.4.7