<!-- #include file="include/skin.asp" -->
<!-- #include file="include/functions.asp" -->
<!-- #include file="include/jk_ip_sys.asp" -->
<%
'****************************************************
' 阳光情缘 2006V3.0      Power by sdsun.com.cn
' Email: 27072320@qq.com  , sdsun163@163.com
' Web: http://www.sdsun.com.cn
' Copyright (C) 2006 sdsun.com.cn All Rights Reserved.
'****************************************************
dim ip_cx,html_temp,l_username,guest_name,forumid
html_temp=""
tit="在线列表（论坛）"
call web_head(0,0,5,0,0)
forumid=int(request.querystring("forum_id"))
guest_name=request.cookies(joekoe_cms.web_cookies)("guest_name")
sql="select user_login.*,user_data.power from user_data inner join user_login on user_login.l_username=user_data.username where user_login.l_type=0 order by user_login.l_id"
if var_null(trim(request.querystring("uppath")))="forum_list_view" and isnumeric(forumid)=true then sql="select user_login.*,user_data.power from user_data inner join user_login on user_login.l_username=user_data.username where user_login.l_type=0 and l_forum_online="&forumid&" order by user_login.l_id"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
  html_temp=html_temp&"<tr>"
  for i=1 to 5
    if rs.eof then exit for
    l_username=rs("l_username")
		if login_mode=format_power2(1,1) then
		ip_cx="<a href=ip_address.asp?ip="&ip_ip(rs("l_ip"))&">"&img_skin("icon_"&rs("power"))&"</a>"
		else
		ip_cx=img_skin("icon_"&rs("power"))
		end if
    html_temp=html_temp&"<td>"&ip_cx&"<a href='user_view.asp?username="&server.urlencode(l_username)&"' alt='目前位置："&rs("l_where")&"<br>来访时间："&rs("l_tim_login")&"<br>活动时间："&rs("l_tim_end")&"<br>"&ip_types(rs("l_ip"),l_username,1)&"<br>"&view_sys(rs("l_sys"))&"' target=_blank"
    if cstr(l_username)=cstr(login_username) then
      html_temp=html_temp&" class=blue"
    end if
    html_temp=html_temp&">"&l_username&"</a></td>"
    rs.movenext
  next
  html_temp=html_temp&"</tr>"
loop
rs.close

sql="select * from user_login where l_type=1 order by l_id"
if var_null(trim(request.querystring("uppath")))="forum_list_view" and isnumeric(forumid)=true then sql="select * from user_login where l_type=1 and l_forum_online="&forumid&" order by l_id"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
  html_temp=html_temp&"<tr>"
  for i=1 to 5
    if rs.eof then exit for
    l_username=rs("l_username")
		if login_mode=format_power2(1,1) then
		ip_cx="<a href=ip_address.asp?ip="&ip_ip(rs("l_ip"))&">"&img_skin("icon_other")&"</a>"
		else
		ip_cx=img_skin("icon_other")
		end if
    html_temp=html_temp&"<td>"&ip_cx&"<font alt='目前位置："&rs("l_where")&"<br>来访时间："&rs("l_tim_login")&"<br>活动时间："&rs("l_tim_end")&"<br>"&ip_types(rs("l_ip"),l_username,1)&"<br>"&view_sys(rs("l_sys"))&"' target=_blank"
    if cstr(l_username)=cstr(guest_name) then
      html_temp=html_temp&" class=blue"
    end if
    html_temp=html_temp&">"&l_username&"</font></td>"
    rs.movenext
  next
  html_temp=html_temp&"</tr>"
loop
rs.close

html_temp="<table border=0 width='100%' align=right cellspacing=2 cellpadding=0>" & _
	  "<tr><td width='20%'></td><td width='20%'></td><td width='20%'></td><td width='20%'></td><td width='20%'></td></tr>" & _
	  html_temp&"</table>"
html_temp=replace(html_temp,"""","\""")

response.write vbcrlf&joekoe_cms.js_put("window.parent.forum_online.innerHTML="""&html_temp&""";",1)

call web_end(0,1)
'****************************************************
' 阳光情缘 2006V3.0      Power by sdsun.com.cn
' Email: 27072320@qq.com  , sdsun163@163.com
' Web: http://www.sdsun.com.cn
' Copyright (C) 2006 sdsun.com.cn All Rights Reserved.
'****************************************************
%>
