📄 fyonline.asp
字号:
<!--#include file="Connections.asp" -->
<!--#include file="top.asp" -->
<%cpbtitle="在线列表"
call toptitle(l_title,cpbtitle)
call head(4,cpbusername&"的控制面板首页","userindex.asp",cpbtitle)
if h_viewcpb=1 and isuser=false then response.redirect("login.asp")
sqlonline = "update online set o_lanmu ='-1', o_topic=0 where o_ip = '" & o_ip & "'"
conn.Execute (sqlonline)
page=request.querystring("page")
if page="" then page=1
pages = "30"
set rs = server.createobject("adodb.recordset")
sql = "select * from online order by o_lasttime desc"
rs.open sql,conn,1,1
if not(rs.BOF or rs.EOF) then
rs.pagesize = pages
maxpagecount=rs.pagecount
r=cint(rs.RecordCount)'记录总数
rs.absolutepage = page '当前页数
rcount=0
%>
<table border=1 borderColor=<%=tdc2%> cellPadding=1 cellSpacing=0 width=<%=tdc3%> style="border-collapse: collapse" align=center>
<tr align="center">
<td width="55%" <%=hColor%> class=tdc1 colspan="6" height=23>目前论坛上总共有 <%=r%> 人在线</td>
</tr>
<tr align="center" height=23>
<td width="12%" <%=tColor%> class=tdc1>用户名</td>
<td width="20%" <%=tColor%> class=tdc1>当前位置</td>
<td width="20%" <%=tColor%> class=tdc1>具体位置</td>
<td width="16%" <%=tColor%> class=tdc1>用户信息</td>
<td width="15%" <%=tColor%> class=tdc1>IP来源</B></FONT></td>
<td width="18%" <%=tColor%> class=tdc1>登陆时间</td>
</tr>
<% do while not rs.eof and rcount <rs.pagesize%>
<tr align="center" height=23>
<td width="12%" bgcolor=<%=tColor2%> class=tdc><% if rs("o_username")<>"客人" and ( int(rs("o_hidden"))<>1 or issupermaster) then%>
<a href="viewuser.asp?username=<%=rs("o_username")%>" target=_blank><%=rs("o_username")%></a>
<%elseif rs("o_hidden")=1 and issupermaster=false then
response.write("隐身会员")
else%>
<%=rs("o_username")%>
<%end if%> </td>
<td width="20%" bgcolor=<%=tColor2%> class=tdc>
<%if rs("o_lanmu")="0" then
response.write("论坛首页")
elseif rs("o_lanmu")="-1" then
response.write("查看论坛在线人员")
else
sql1="select l_title from lanmu where l_id="&rs("o_lanmu")&""
set rs1=conn.execute(sql1)
response.write("<a href=list.asp?l_id="&rs("o_lanmu")&">"&rs1("l_title")&"</a>")
set rs1=nothing
end if
%> </td>
<td width="20%" bgcolor=<%=tColor2%> class=tdc>
<%if trim(rs("o_topic"))="0" then
response.write("好象四处游荡:)")
else
on error resume next
sql1="select t_title from topic where t_id="&rs("o_topic")&""
set rs1=conn.execute(sql1)
if not rs1.eof then
response.write("<a href=topic.asp?l_id="&rs("o_lanmu")&"&t_id="&rs("o_topic")&" title=""查看主题:"&rs1("t_title")&""">查看主题:"&left(htmlencode(rs1("t_title")),15)&"</a>")
end if
set rs1=nothing
if err then
err.clear
response.write "错误"
end if
end if
%> </td>
<td width="16%" bgcolor=<%=tColor2%> class=tdc><%=rs("o_system")%> </td>
<td width="15%" bgcolor=<%=tColor2%> class=tdc> <%
o_ip1=rs("o_ip")
oip = Split(o_ip1,".")
if Ubound(oip)<3 then'多这个判断是为了防止有些ip为空的
response.write(o_ip1)
elseif issupermaster then
response.write(oip(0)&"."&oip(1)&"."&oip(2)&"."&oip(3))
else
response.write(oip(0)&"."&oip(1)&".*.*")
end if
%> </td>
<td width="18%" bgcolor=<%=tColor2%> class=tdc><%=rs("o_lasttime")%> </td>
</tr>
<%
rs.MoveNext
rcount=rcount+1
loop
end if
rs.close
set rs=nothing
%>
<tr align="left" height=23>
<td colspan="6" bgcolor=<%=tColor2%> class=tdc > <% if maxpagecount="" then maxpagecount=1
if r="" then r=0
pagestart=page-5
pageend=page+5
if pagestart<1 then pagestart=1
if pageend>maxpagecount then pageend=maxpagecount
response.write(" [ ")
if maxpagecount > 6 then Response.Write ("<a href=?page=1>1</a> ... ")
for i=pagestart to pageend
if i<>int(page) then
Response.Write (" <a href=?page="&i&">" & i & "</a> ")
else
Response.Write ("<b>"&i&"</b> ")
end if
next
if maxpagecount > page +5 then Response.Write( " ... <a href=?page="&maxpagecount&">"&maxpagecount&"</a>")
response.write(" ] ")
response.write("..页次:"&page&"/"&maxpagecount&"页 每页:"&pages&" 记录数:"&r&" ")%> </td></tr>
</table>
<!--#include file="bq.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -