WHO IS ONLINE'; $result_guests = safe_query("SELECT * FROM ".PREFIX."whoisonline WHERE userID=''"); $guests = mysql_num_rows($result_guests); $result_user = safe_query("SELECT * FROM ".PREFIX."whoisonline WHERE ip=''"); $user = mysql_num_rows($result_user); $useronline = $guests + $user; if($user==1) $user_on='1 registered user'; else $user_on=''.$user.' registered users'; if($guests==1) $guests_on='1 guest'; else $guests_on= ''.$guests.' guests'; $online='Now online: '.$user_on.' and '.$guests_on; $sort = $_GET['sort']; $type = $_GET['type']; if(!isset($sort)) $sort = "time"; if(!isset($type)) $type = "DESC"; if($type=="ASC") $sorter='Sort: '; else $sorter='Sort: '; echo'
'.$sorter.' | '.$online.' |
'.$sorter.' |