INT));
authenticate();
if ( $Globals['ppboards'] == "closed" && $User['adminedit'] != 1 )
{
diewell( $Globals['closedmsg'] );
}
if ( !isset($page) )
{
$page = 0;
}
topmenu();
$limit = $page * 50;
$whoonline = $guestonline = NULL;
$orecs = ppmysql_query("SELECT o.*,p.title AS title,p.cat AS cat FROM {$Globals['pp_db_prefix']}iponline o LEFT JOIN {$Globals['pp_db_prefix']}photos p ON (p.id=o.item) ORDER BY o.uid DESC,o.date DESC LIMIT $limit,50", $link);
$numrows = mysql_num_rows($orecs);
$totalpages = ceil($numrows/50)-1;
while( $rows = mysql_fetch_assoc($orecs) )
{
$cctime = formatpptime( $rows['date'] );
$ccdate = formatppdate( $rows['date'] );
$location = $rows['what'];
if ( $location == "index" ) $location = "{$Globals['pp_lang']['tablehead']}";
elseif ( ($location == "showphoto" || $location == "showfull") && $rows['item'] ) $location = " $rows['item'], 'title' => $rows['title'], 'cat' => $rows['cat'] ) ) . "\">{$Globals['pp_lang']['viewingphoto']}";
elseif ( $location == "register" ) $location = $Globals['pp_lang']['registering'];
elseif ( $location == "member" ) $location = " $rows['item'], 'username' => $rows['userid']) ) ."\">{$Globals['pp_lang']['viewingprofile']}";
elseif ( $location == "showgallery" ) $location = " $rows['item']) ) . "\">{$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['uid'], 'username' => $rows['userid']) ) ."\">{$rows['userid']}";
$whoonline .= "