
=falls over=
I have been putting the code outside of the switch statement.. The switch ends right after the default and bracket, right?
PHP Code:
case 'printthread.php':
$userinfo[activity] = 'printthread';
$blowup = explode('=', $token1);
$threadid = intval($blowup[1]);
$threadids .= ",$threadid";
$userinfo[threadid] = $threadid;
break;
case 'chat.php':
$userinfo[activity] = 'chat';
break;
case 'gallery.php':
$userinfo[activity] = 'gallery';
break;
case '/robots.txt':
$userinfo[activity] = 'spider';
break;
default:
$userinfo[activity] = 'unknown';
} <-- switch ends here right?
[MY CODE goes here]
return $userinfo;
}
$allusers= $DB_site->query("SELECT user.username, session.location, session.lastactivity, user.userid, user.usergroupid, user.invisible, session.host, user.showemail, user.receivepm
FROM session
". iif($WOLguests, " LEFT JOIN user USING (userid) ", ",user") ."
WHERE session.lastactivity > $datecut
". iif(!$WOLguests, " AND session.userid = user.userid", "") ."
ORDER BY user.username
");
$moderators = $DB_site->query("SELECT DISTINCT userid FROM moderator");
while ($mods = $DB_site->fetch_array($moderators)) {
$mod[$mods[userid]] = 1;
}
And in the area where it says [MY CODE goes here], I placed this:
PHP Code:
if ($loc == 'http://www.mysite.com/multimedia.php') {
$userinfo['activity'] = 'multimedia';
}
Changed to my URL ofcourse.
Which is outside and after the switch statement.. So I'm a bit lost :disappointed: