rendered paste body#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
if (defined('SHOW_ONLINE'))
{
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Index Online Location
$online_is_auth_ary = array();
$online_is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata);
$sql = "SELECT forum_name, forum_id
FROM " . FORUMS_TABLE;
if ( $result = $db->sql_query($sql) )
{
while( $row = $db->sql_fetchrow($result) )
{
$online_forum_data[$row['forum_id']] = $row['forum_name'];
}
}
else
{
message_die(GENERAL_ERROR, 'Could not obtain user/online forums information', '', __LINE__, __FILE__, $sql);
}
// Index Online Location
#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT u.username, u.user_id,
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, s.session_ip
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, s.session_page
#
#-----[ FIND ]------------------------------------------
#
if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Index Online Location
if ( $row['session_page'] < 1 || !$online_is_auth_ary[$row['session_page']]['auth_view'] )
{
switch( $row['session_page'] )
{
case PAGE_INDEX:
$location = $lang['Forum_index'];
break;
case PAGE_POSTING:
$location = $lang['Posting_message'];
break;
case PAGE_PROFILE:
$location = $lang['Viewing_profile'];
break;
case PAGE_VIEWONLINE:
$location = $lang['Viewing_online'];
break;
case PAGE_VIEWMEMBERS:
$location = $lang['Viewing_member_list'];
break;
case PAGE_PRIVMSGS:
$location = $lang['Viewing_priv_msgs'];
break;
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
break;
default:
$location = $lang['Forum_index'];
}
}
else
{
$location = $online_forum_data[$row['session_page']];
}
if ( $location )
{
$location = " <i>($location)</i>";
$user_online_link = $user_online_link . $location;
}
// Index Online Location
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM