Session Management Menu Logout
'; exit; } if (strpos(strtolower($dbserv),"fail") !== false){ $results = strtolower($dbserv); return $results; exit; } if (strpos(strtolower($dbuser),"fail") !== false){ $results = strtolower($dbuser); return $results; exit; } if (strpos(strtolower($dbpass),"fail") !== false){ $results = strtolower($dbpass); return $results; exit; } if (strpos(strtolower($dbname),"fail") !== false){ $results = strtolower($dbname); return $results; exit; } if (strpos(strtolower($dbtable),"fail") !== false){ $results = strtolower($dbtable); return $results; exit; } if (strpos(strtolower($dbusertable),"fail") !== false){ $results = strtolower($dbusertable); return $results; exit; } $dbconnection = connect_to_database($dbserv,$dbuser,$dbpass,$dbname); if (strpos(strtolower($dbconnection),"fail") !== false){ $results = strtolower($dbconnection); return $results; exit; } $query = mysql_query("SELECT * FROM " . $dbtable . " WHERE ip_address='" . $iptofind . "' order by start_time ASC"); if (!query){ $results = "failed, " . mysql_error(); return $results; exit; } while ($row = mysql_fetch_array($query)){ $regquery = mysql_query("SELECT name FROM " . $dbusertable . " WHERE name='" . $row['user_name'] . "'"); if (!regquery){ $results = "failed, " . mysql_error(); return results; exit; } $regrow = mysql_fetch_array($regquery); echo ''; echo ''; echo ''; if (strtolower($regrow['name']) == strtolower($row['user_name'])){ echo ""; } else { echo ""; } echo ''; if ($row['end_time'] == 'NULL'){ echo ''; } else { echo ''; } echo ''; } mysql_close($dbconnection); ?>
Username IP Address Reg User Login Time Logout Time
Failed to determin ip address to locate
' . $row['user_name'] . '' . $row['ip_address'] . 'YESNO' . $row['start_time'] . '' . $row['end_time'] . '