INT)); authenticate(); if ( $Globals['ppboards'] == "closed" && $User['adminedit'] != 1 ) { diewell( $Globals['closedmsg'] ); } if ( !isset($page) ) { $page = 0; } topmenu(); $limit = $page * 50; $orecs = ppmysql_query("SELECT * FROM {$Globals['pp_db_prefix']}iponline ORDER BY uid DESC,date DESC LIMIT $limit,50", $link); $numrows = mysql_num_rows($orecs); $totalpages = ceil($rows/50)-1; $whoonline = $guestonline = null; $rows = mysql_fetch_assoc($orecs); do { $cctime = formatpptime( $rows['date'] ); $ccdate = formatppdate( $rows['date'] ); $location = $rows['what']; if ( $Globals['spider'] == "yes" ) { if ( $location == "index" ) $location = "{$Globals['pp_lang']['tablehead']}"; elseif ( ($location == "showphoto" || $location == "showfull") && $rows['item'] ) $location = "{$Globals['pp_lang']['viewingphoto']}"; elseif ( $location == "register" ) $location = $Globals['pp_lang']['registering']; elseif ( $location == "member" ) $location = "{$Globals['pp_lang']['viewingprofile']}"; elseif ( $location == "showgallery" ) $location = "{$Globals['pp_lang']['viewinggallery']}"; elseif ( $location == "showmember" ) $location = "{$Globals['pp_lang']['viewingmg']}"; elseif ( $location == "search" ) $location = $Globals['pp_lang']['searching']; elseif ( $location == "board" ) $location = "{$Globals['pp_lang']['viewingboard']}"; elseif ( $location == "online" ) $location = "{$Globals['pp_lang']['viewingwho']}"; elseif ( $location == "uploadphoto" ) $location = $Globals['pp_lang']['uploadingphoto']; elseif ( $location == "misc" ) $location = $Globals['pp_lang']['other']; else $location = null; } else { if ( $location == "index" ) $location = "{$Globals['pp_lang']['tablehead']}"; elseif ( ($location == "showphoto" || $location == "showfull") && $rows['item'] ) $location = "{$Globals['pp_lang']['viewingphoto']}"; elseif ( $location == "register" ) $location = $Globals['pp_lang']['registering']; elseif ( $location == "member" ) $location = "{$Globals['pp_lang']['viewingprofile']}"; elseif ( $location == "showgallery" ) $location = "{$Globals['pp_lang']['viewinggallery']}"; elseif ( $location == "showmember" ) $location = "{$Globals['pp_lang']['viewingmg']}"; elseif ( $location == "search" ) $location = $Globals['pp_lang']['searching']; elseif ( $location == "board" ) $location = "{$Globals['pp_lang']['viewingboard']}"; elseif ( $location == "online" ) $location = "{$Globals['pp_lang']['viewingwho']}"; elseif ( $location == "uploadphoto" ) $location = $Globals['pp_lang']['uploadingphoto']; elseif ( $location == "misc" ) $location = $Globals['pp_lang']['other']; else $location = null; } $more = null; if ( $User['adminedit'] == 1 ) { $more = " [ {$rows['ipaddr']} ]"; if ( $rows['referer'] && !stristr($rows['referer'], $_ENV['HOSTNAME']) ) { $more .= "
{$Globals['pp_lang']['referrer']}: [ {$rows['referer']} ]"; } if ( $rows['agent'] ) { $more .= "
{$Globals['pp_lang']['agent']}: [ {$rows['agent']} ]"; } } else { if ( $rows['referer'] && !stristr($rows['referer'], $_ENV['HOSTNAME']) ) { $more .= " [ {$Globals['pp_lang']['referrer']} ]"; } } if ( $rows['uid'] ) { $onlineuser = "{$rows['userid']}"; $whoonline .= "$onlineuser{$more} $cctime $location "; } else { $onlineuser = $Globals['pp_lang']['guest']; $guestonline .= "$onlineuser{$more} $cctime $location "; } } while ( $rows = mysql_fetch_assoc($orecs) ); if ( $guestonline && $whoonline ) { $whoonline .= "{$Globals['pp_lang']['guests']}"; } $whoonline .= $guestonline; $prevlink = null; if ( $page > 0 ) { $prevurl = max(0, $page - 1); $prevlink = "« {$Globals['pp_lang']['prevpage']}"; } $nextlink = null; if ( $page < $totalpages ) { if ( $prevlink ) { $prevlink .= " · "; } $nexturl = min($totalpages, $page + 1); $nextlink = "{$Globals['pp_lang']['nextpage']} »"; } printheader( $cat, $Globals['pp_lang']['whosonline'] ); include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/menubar.tmpl" ); include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/whoonline.tmpl" ); printfooter(); ?>