<!--#include file="conn.asp" -->
<!--#include file="ftbbs_nav.asp" -->
<!--#include file="pagefun.asp" -->
<%
usertype=Request.QueryString("usertype")
if usertype="" then
usertype=1
end if
root=""
if usertype<>"" then
pagestr= "&"&tyname1&"="&usertype
else
pagestr= ""
end if	
call FTBBS_HTML_MB
defaulthome=Application("FTBBSMB")(31,0)
homepage=ft_home(defaulthome)
dim rssql,getstring
'******************************************
dim wzcount,wzrep,wzpage,wzpagecount,wzpagerep,boardstr
wzrep = Application("FTBBSMB")(5,0)
'+++++++++++++++++++++++++++
select case usertype
case 1
    strsql="select * from ftbbs_Online Order By ID desc "
case 2
    strsql="select * from ftbbs_Online where useradmin=2 Order By ID desc "
case 3
    strsql="select * from ftbbs_Online where useradmin=1 Order By ID desc "
end select
set rs=server.createobject("adodb.recordset")
rs.open strsql,conn,1,1
%>
<HTML><HEAD>
<title>在线用户列表</title>
<META http-equiv=Content-Type content=text/html;charset=gb2312>
<script language=javascript src="inc/cookies.js"></script>
<script>
//载入上次cookies记录的样式
var stylecook = getCookie("STYLESHOW");
var style;
var strstyle;
if(stylecook=="")
{
 stylecook=1;
}
else
{
 stylecook++;
}
//style="style0"+stylecook;
style="main0"+stylecook+".css";
strstyle="<link href=\"css/"+style+"\"  rel=\"stylesheet\" type=\"text/css\"> ";
document.write(strstyle);
//alert(strstyle);
</script>
</HEAD>
</head>
<body>
<%
if request.cookies("ftbbstype")=1 then
  response.write headhtml
end if
%>
<table width="99%" border="0" cellspacing="0" cellpadding="0" align="center" class="maintbbg">
  <tr>
    <td> 
      <table width="100%" border=0 cellpadding=2 cellspacing=1 class="maintbbg">
        <tbody>
		<%if request.cookies("ftbbstype")<>1 then%>
          <tr> 
            <td height="25" colspan="3" class="f12bg">&nbsp;<%=userinfo%></td>
          </tr>
		<%end if%>
          <tr> 
            <td height="25" colspan="3" class="maintbtr3">&nbsp;<a href="<%=homepage%>">论坛首页</a> 
              >> 在线用户</td>
          </tr>
          <tr> 
            <td height="26" class="maintbtr3"><div align="center"><a href="disonline.asp?usertype=1">用户在线情况</a></div></td>
            <td class="maintbtr3"><div align="center"><a href="disonline.asp?usertype=2">版主在线情况</a></div></td>
            <td class="maintbtr3"><div align="center"><a href="disonline.asp?usertype=3">管理员在线情况</a></div></td>
          </tr>
        </tbody>
      </table>
      <table width="100%" border=0 cellpadding=2 cellspacing=1 class="maintbbg" align="center">
        <tbody>
          <tr align=middle class=f12> 
            <td width="16%" height="25" class="f12bg"><div align="center">用户名</div></td>
            <td width="26%" class="f12bg" ><div align="center">当前位置</div></td>
            <td width="17%" class="f12bg" ><div align="center">权限</div></td>
            <td width="20%" class="f12bg" ><div align="center">IP</div></td>
            <td width="21%" class="f12bg" ><div align="center">登陆时间</div></td>
          </tr>
          <%
if not rs.eof then
   wzpage = clng(request.querystring("page"))
   if len(wzpage) = 0 or wzpage = 0 then wzpage = 1
   rs.PageSize=wzrep
   rs.AbsolutePage=wzpage
   wzpagecount=rs.PageCount
   wzcount=rs.RecordCount
  for i = 0 to wzrep-1
    if rs.eof then exit for
        select case rs("useradmin")
        case 0
            If rs("username")="匿名" then
                useradmin="游客"
            else
                useradmin="注册用户"
            end if
        case 1
            useradmin="管理员"
        case 2
            useradmin="版主"
        end select
		iparr=split(rs("ip"),".")
		ip=iparr(0)&"."&iparr(1)&"."&iparr(2)&".*"
%>
          <tr align=middle> 
            <td width="16%" height="28" class="maintbtr1">
              <div align="center"><%=rs("username")%></div></td>
            <td width="26%"  align=left valign="middle" class="maintbtr2"> <div align="center"><%=rs("stats")%></div></td>
            <td width="17%" class="maintbtr1"><div align="center"><%=useradmin%></div></td>
            <td width="20%" class="maintbtr3"> <div align="center"><%=ip%></div></td>
            <td width="21%" class="maintbtr3"> <div align="center"><%=rs("logintime")%></div></td>
          </tr>
          <%
rs.movenext
next
%>
          <tr valign="middle"> 
            <td height="25" colspan="6" class="maintbtr1"><%= pageclass(wzpagecount,wzcount,wzrep,pagestr,root)%></td>
          </tr>
          <%else%>
          <tr class="maintbtr3"> 
            <td colspan=6 align=center height=25> 没有人在线</td>
          </tr>
          <%end if%>
        </tbody>
      </table>
    </td>
  </tr>
</table>
<!--#include file="inc/bbstail.htm"-->