Hi, try this and let me know
Open:
includes/ezstats.php
Find:
// If IP exists, do update. Else, do insert.
//
if ( $row = $db->sql_fetchrow($result) )
{
$sql = "UPDATE " . EZSTATS_TABLE . "
SET stamp = " . time () . ",
user_id = " . $userdata['user_id'] . ",
username = '" . $userdata['username'] . "',
user_level = " . $userdata['user_level'] . ",
user_allow_viewonline = " . $userdata['user_allow_viewonline'] . "
WHERE ip = '" . $_SERVER['REMOTE_ADDR'] . "'
LIMIT 1";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update Eazystats table', '', __LINE__, __FILE__, $sql);
}
}
else
{
$sql = "INSERT INTO " . EZSTATS_TABLE . "
(stamp, ip, user_id, username, user_level, user_allow_viewonline)
VALUES
(". time() .",
'".$_SERVER['REMOTE_ADDR']."',
" . $userdata['user_id'] . ",
'" . $userdata['username'] . "',
" . $userdata['user_level'] . ",
" . $userdata['user_allow_viewonline'] . ")";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not insert to Eazystats table', '', __LINE__, __FILE__, $sql);
}
}
$db->sql_freeresult($result);
Replace With:
// If IP exists, do update. Else, do insert.
//
if ( $row = $db->sql_fetchrow($result) )
{
$sql = "UPDATE " . EZSTATS_TABLE . "
SET stamp = " . time () . ",
user_id = '" . $userdata['user_id'] . "',
username = '" . $userdata['username'] . "',
user_level = '" . $userdata['user_level'] . "',
user_allow_viewonline = '" . $userdata['user_allow_viewonline'] . "'
WHERE ip = '" . $_SERVER['REMOTE_ADDR'] . "'
LIMIT 1";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update Eazystats table', '', __LINE__, __FILE__, $sql);
}
}
else
{
$sql = "INSERT INTO " . EZSTATS_TABLE . "
(stamp, ip, user_id, username, user_level, user_allow_viewonline)
VALUES
(". time() .",
'".$_SERVER['REMOTE_ADDR']."',
'" . $userdata['user_id'] . "',
'" . $userdata['username'] . "',
'" . $userdata['user_level'] . "',
'" . $userdata['user_allow_viewonline'] . "')";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not insert to Eazystats table', '', __LINE__, __FILE__, $sql);
}
}
$db->sql_freeresult($result);
Remember to back-up all files you edit
____________
I know this is an old post but I got bored and clicked "View Unanswered Posts" in hopes that I could help and maybe.. just maybe.. these people are watching this topic, also marking SOLVED on all posts that have been solved to tidy up a bit