예제 #1
0
         // Topic info
         $sql_tt = "SELECT topic_title, forum_id FROM " . TOPICS_TABLE . " WHERE topic_id='" . $topic_id . "'";
         $result_tt = $db->sql_query($sql_tt);
         $topic_title = $db->sql_fetchrow($result_tt);
         /*
         $location['lang'] = ((!empty($forum_id)) ? ($forum_data[$forum_id] . ' » ') : '') . $topic_title['topic_title'];
         $location['url'] = CMS_PAGE_VIEWTOPIC . '?' . ((!empty($forum_id)) ? (POST_FORUM_URL . '=' . $forum_id . '&') : '') . POST_TOPIC_URL . '=' . $topic_id;
         */
         $location['lang'] = $forum_data[$topic_title['forum_id']] . ' » ' . $topic_title['topic_title'];
         $location['url'] = CMS_PAGE_VIEWTOPIC . '?' . POST_FORUM_URL . '=' . $topic_title['forum_id'] . '&' . POST_TOPIC_URL . '=' . $topic_id;
     } else {
         if (!empty($forum_id)) {
             $location['lang'] = $forum_data[$forum_id];
             $location['url'] = CMS_PAGE_VIEWFORUM . '?' . POST_FORUM_URL . '=' . $forum_id;
         } else {
             $location = get_online_page($onlinerow_guest[$i]['session_page']);
         }
     }
     $location['url'] = append_sid(IP_ROOT_PATH . $location['url']);
     $row_class = $guest_users % 2 ? $theme['td_class1'] : $theme['td_class2'];
     // MG BOTS Parsing - BEGIN
     $guest_ip = $onlinerow_guest[$i]['session_ip'];
     $bot_name_tmp = bots_parse($onlinerow_guest[$i]['session_ip'], $config['bots_color']);
     if ($bot_name_tmp['name'] != false) {
         $name_guest = $bot_name_tmp['name'];
     } else {
         $name_guest = '<b>' . $lang['Guest'] . '</b>';
     }
     // MG BOTS Parsing - END
     $template->assign_block_vars('guest_user_row', array('ROW_CLASS' => $row_class, 'USERNAME' => $name_guest, 'STARTED' => create_date($config['default_dateformat'], $onlinerow_guest[$i]['session_start'], $config['board_timezone']), 'LASTUPDATE' => create_date($config['default_dateformat'], $onlinerow_guest[$i]['session_time'], $config['board_timezone']), 'FORUM_LOCATION' => $location['lang'], 'IP_ADDRESS' => $guest_ip, 'U_WHOIS_IP' => 'http://whois.sc/' . htmlspecialchars(urlencode($guest_ip)), 'U_FORUM_LOCATION' => $location['url']));
 }
예제 #2
0
			{
				$location['lang'] = $lang['Forum_index'];
				$location['url'] = CMS_PAGE_FORUM;
			}
		}
		else
		{
			if (!empty($forum_id) && $is_auth_view)
			//if (!empty($forum_id))
			{
				$location['lang'] = $forum_data[$forum_id];
				$location['url'] = CMS_PAGE_VIEWFORUM . '?' . POST_FORUM_URL . '=' . $forum_id;
			}
			else
			{
				$location = get_online_page($row['session_page']);
			}
		}

		$location['url'] = append_sid(IP_ROOT_PATH . $location['url']);

		$row_class = ($$which_counter % 2) ? $theme['td_class1'] : $theme['td_class2'];

		// Start Advanced IP Tools Pack MOD
		$mode = htmlspecialchars($_GET['mode']);

		$test_ip = request_get_var('ip', '');
		if ((($user->data['user_level'] == ADMIN) || ($user->data['user_level'] == MOD)) && ($mode == 'lookup') && isset($_GET['ip']) && ($row['session_ip'] == $test_ip))
		{
			$ip = gethostbyaddr($row['session_ip']);
		}