now im working on getting the "Site visitor" integrated to who is where....
i want to get that Online now to show where the person is or something like that........ or maybe im ognna just rip that part off and use the "Who is where"
// Set Nuke session table
$past = time()-900;
sql_query( "DELETE FROM $prefix"._users." WHERE time < '$past'", $dbi);
$result = sql_query( "SELECT time FROM $prefix"._session." WHERE uname='$username'", $dbi );
$ctime = time();
if ( $row = sql_fetch_array( $result , $dbi ) )
{
sql_query( "UPDATE $prefix"._session." SET uname='$username', time='$ctime', host_addr='$ip', guest='$guest' WHERE uname='$username'", $dbi );
}
else
{
sql_query( "INSERT INTO $prefix"._session." (uname, time, host_addr, guest) VALUES ('$username', '$ctime', '$ip', '$guest')" , $dbi );
}
// Determine last registered user
$result = sql_query( "select username from $prefix"._users." order by user_id DESC limit 0,1", $dbi );
list( $lastuser ) = sql_fetch_row( $result, $dbi );
// Amount of registered users
$numrows = sql_num_rows( sql_query( "select user_id from $prefix"._users." where username != 'Anonymous'", $dbi ) );
// Amount of registered users online
$result2 = sql_query( "SELECT uname, guest FROM $prefix"._session." where guest=0", $dbi );
$member_online_num = sql_num_rows( $result2 );
$Today = getdate();
// Formatting Current Date
$month = $Today['month'];
$mday = $Today['mday'];
$year = $Today['year'];
// Display all information
if (is_user($user) )
{
// Determine how many READ Messages and how many UNREAD Messages
$result = sql_query( "select user_id from $prefix"._users." where username='$username'", $dbi);
list( $user_id ) = sql_fetch_row( $result, $dbi );
$result2 = sql_query( "select privmsgs_type from $prefix"._bbprivmsgs." where privmsgs_to_userid='$user_id' AND (privmsgs_type='1' or privmsgs_type='5')", $dbi );
$MesUnread = sql_num_rows( $result2 );
$result3 = sql_query( "select privmsgs_type from $prefix"._bbprivmsgs." where privmsgs_to_userid='$user_id' AND (privmsgs_type='0')", $dbi );
$MesRead = sql_num_rows( $result3 );
// Info for users who logged in AND Guests
$content .= "<a href=\"modules.php?name=Members_List\"><img src=images/visitors/mem.gif border=\"0\" alt=\"Members List\"></a><b>"._SV_MEMBERS."</b><br>\n";
// Hyperlink last registered user to phpBB viewing profile
$resultName = sql_query( "SELECT user_id FROM ".$prefix."_users where username='$lastuser'", $dbi );
list( $Lastuser_id ) = sql_fetch_row( $resultName, $dbi );
$content .= "<img src=images/visitors/arrow.gif>"._SV_LATEST."<A HREF=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$Lastuser_id\"><b>$lastuser</b></a><br>\n";
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum