IP
########################################################
## : IP MOD
## :
##
## : 1.0
##
## :
## : 3
## : 3
## /includes/page_header.php
## /language/lang_english/lang_main.php
## /templates/subSilver/index_body.tpl
##
################################################################
## !!!
################################################################
##
##-----------[ ]-------------------------------------------
##

/includes/page_header.php

##
##-----------[ ]-------------------------------------------
##
//
// Get basic (usernames + totals) online
// situation
//
$logged_visible_online = 0;
$logged_hidden_online = 0;
$guests_online = 0;
$online_userlist = '';
$l_online_users = '';
##
##-----------[ ]------------------------------------
##
$reg_userlist = ''; // View IP Addresses in Forum Index MOD
$hid_userlist = ''; // View IP Addresses in Forum Index MOD
$guest_list = ''; // View IP Addresses in Forum Index MOD
##
##-----------[ ]-------------------------------------------
##
if ( $row['user_allow_viewonline'] )
{
$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
$logged_visible_online++;
}
else
{
$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
$logged_hidden_online++;
}
##
##-----------[ ]----------------------------------------
##
if ( $row['user_allow_viewonline'] )
{
$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
$logged_visible_online++;
if ($userdata['user_level'] == ADMIN) {$reg_userlist .= ( $reg_userlist != '' ) ? ', ' . $user_online_link . '<i> <a href="http://www.dnsstuff.com/tools/whois.ch?ip=' . decode_ip($row['session_ip']) . '" target="_blank" style="color: #000000;">(' . decode_ip($row['session_ip']) . ')</a></i>': $user_online_link . '<i> <a href="http://www.dnsstuff.com/tools/whois.ch?ip=' . decode_ip($row['session_ip']) . '" target="_blank" style="color: #000000;">(' . decode_ip($row['session_ip']) . ')</a></i>';} // View IP Addresses in Forum Index MOD
else {$reg_userlist .= ( $reg_userlist != '' ) ? ', ' . $user_online_link : $user_online_link;}
}
else
{
$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
$logged_hidden_online++;
if ($userdata['user_level'] == ADMIN) {$hid_userlist .= ( $hid_userlist != '' ) ? ', ' . $user_online_link . '<i> <a href="http://www.dnsstuff.com/tools/whois.ch?ip=' . decode_ip($row['session_ip']) . '" target="_blank" style="color: #000000;">(' . decode_ip($row['session_ip']) . ')</a></i>': $user_online_link . '<i> <a href="http://www.dnsstuff.com/tools/whois.ch?ip=' . decode_ip($row['session_ip']) . '" target="_blank" style="color: #000000;">(' . decode_ip($row['session_ip']) . ')</a></i>';} // View IP Addresses in Forum Index MOD
}
##
##-----------[ ]-------------------------------------------
##
else
{
// Skip multiple sessions for one user
if ( $row['session_ip'] != $prev_session_ip )
{
$guests_online++;
##
##-----------[ ]------------------------------------
##
$guest_list .= ( $guest_list != '' ) ? ', ' . '<i><a href="http://www.dnsstuff.com/tools/whois.ch?ip=' . decode_ip($row['session_ip']) . '" target="_blank" style="color: #000000;">' . decode_ip($row['session_ip']) . '</a></i>': '<i><a href="http://www.dnsstuff.com/tools/whois.ch?ip=' . decode_ip($row['session_ip']) . '" target="_blank" style="color: #000000;">' . decode_ip($row['session_ip']) . '</a></i>'; // View IP Addresses in Forum Index MOD
##
##-----------[ ]-------------------------------------------
##
if ( empty($online_userlist) )
{
$online_userlist = $lang['None'];
}
##
##-----------[ ]------------------------------------
##

// Start View IP Addresses in Forum Index MOD
if ($userdata['user_level'] == ADMIN) {
$reg_users_data = $lang['Registered_users']. ' ' .$reg_userlist. '<br />';
if($logged_hidden_online == 0){$hid_users_data = $lang['Hidden_data']. ' 0 <br />';}
else{$hid_users_data = $lang['Hidden_data']. ' ' . $hid_userlist . '<br />';}
if($guests_online == 0) {$guests_data = $lang['Guests_data']. ' 0';}
else{$guests_data = ( $userdata['user_level'] == ADMIN) ? $lang['Guests_data']. $guest_list : '';}
}
else {$reg_users_data = $lang['Registered_users']. ' ' .$reg_userlist;}
// End View IP Addresses in Forum Index MOD
##
##-----------[ ]-------------------------------------------
##
'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text,
'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread,
'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new,
##
##-----------[ ]------------------------------------
##
'REG_USERS_DATA' => $reg_users_data, // View IP Addresses in Forum Index MOD
'HID_USERS_DATA' => $hid_users_data, // View IP Addresses in Forum Index MOD
'GUESTS_DATA' => $guests_data, // View IP Addresses in Forum Index MOD
##
##--------------[ ]---------------------------------------------
##
/language/lang_english/lang_main.php
##
##--------------[ ]---------------------------------------------
##
//
// That's all, Folks!
// -------------------------------------------------
##
##--------------[ ]---------------------------------------
##
// Start View IP in Forum Index MOD
$lang['Guests_data'] = 'Guests: ';
$lang['Hidden_data'] = 'Hidden Users: ';
// End View IP in Forum Index MOD
##
##--------------[ ]---------------------------------------------
##
/templates/subSilver/index_body.tpl
##
##--------------[ ]---------------------------------------------
##
{LOGGED_IN_USER_LIST}
##
##--------------[ ]---------------------------------------
##
{REG_USERS_DATA}{HID_USERS_DATA}{GUESTS_DATA}
##
##
##--------------[ ]---------------------------------------
##
##

/ /