<?php
include ("inc/inc_common.php");

if ($from == "logout" and $gfcookie[1] != "")
{
    header("Location: logout.php");
    exit;
}

if ($statistictracking == 2)
{
    $referrer = $HTTP_REFERER;
    $strip = $REMOTE_ADDR;
    $browser = $HTTP_USER_AGENT;
    if (isset($gfcookie[1]))
    {
        $username = $gfcookie[1];
    }
    else
    {
        $username = "Not Logged In";
    }

    $query = "INSERT INTO $statstable (strName, strRefer, strIp, strBrowser, strPage) values( '$username', '$referrer', '$strip', '$browser', '$page')";
    mysql_query( $query, $link ) or die ( "Error in Stats Tracking! : ".mysql_error() );
}

if (isset($gfcookie[1]))
{
    header("Location: forums.php");
    exit;
}

// If you want, you can comment out / delete the two lines below and add some code for a home page for non-logged in users of your forum.
// If you don't have a clue about PHP, just delete the two lines below (not ' ? > ', the ones before it) and add HTML code AFTER the ' ? > '.


header("Location: forums.php");
exit;

?>