index.php File Reference

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']).";")


Function Documentation

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  ) 

Definition at line 25 of file index.php.

Referenced by MySQL_ip2sql().


Variable Documentation

$address = 'localhost'

Definition at line 7 of file index.php.

$cacert = NULL

Definition at line 12 of file index.php.

$database = 'nufwdb'

Definition at line 10 of file index.php.

$ipv6_schema = 1

Definition at line 5 of file index.php.

Referenced by MySQL_ip2sql().

$netmask_check = 1

Definition at line 14 of file index.php.

$password = 'nufwpasswd'

Definition at line 9 of file index.php.

else $query = "SELECT user_id,username,no_logout FROM ipauth_sessions WHERE ip_saddr=".MySQL_ip2sql($_SERVER['REMOTE_ADDR'])." LIMIT 1;"

Definition at line 79 of file index.php.

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;"

Definition at line 77 of file index.php.

$res = $MySQL_fd->query("UPDATE users SET end_time=NOW() WHERE user_id=".$userinfo[0]." and ip_saddr=".MySQL_ip2sql($_SERVER['REMOTE_ADDR']).";")

Definition at line 92 of file index.php.

$res = $MySQL_fd->query($query)

Definition at line 81 of file index.php.

$ssl = 0

Definition at line 11 of file index.php.

$user = 'nufwuser'

Definition at line 8 of file index.php.

$userinfo = $res->fetch_row()

Definition at line 83 of file index.php.


Generated on Sat Nov 22 04:00:38 2008 for NuFW by  doxygen 1.4.7