📄 showonline.asp
字号:
<!--#INCLUDE FILE="inc/db_inc.asp"-->
<!--#INCLUDE FILE="inc/char_inc.asp"-->
<!--#INCLUDE FILE="header.asp"-->
<HTML>
<HEAD>
<TITLE>在线列表 - <%= boardtitle %></TITLE>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE type="text/css">
<!--
a { font-family: "Tahoma", "Verdana"; font-size: 12px; color: #333333}
body { font-family: "Tahoma", "Verdana"; font-size: 12px; color: #333333}
td { font-family: "Tahoma", "Verdana"; font-size: 12px; color: #333333; word-wrap: break-word}
-->
</STYLE>
</HEAD>
<BODY background="style/apple/image/bg.gif" bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="20">
<center>
<%
page = request("page")
if page = "" then
page = 1
else
if not IsNumeric(page) then
page = 1
else
page = clng(page)
end if
end if
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open StrConn
Set rs = Server.CreateObject("ADODB.Recordset")
strsql = "select userid, username, invisible, posts, country, joindate, lastposttitle, lastpostid from sf_user where lastactivity > #" & dateadd("n", onlinetime * -1, now()) & "# order by lastactivity DESC"
rs.Open strsql, Conn, 1, 1
if not (rs.bof or rs.eof) then
i = 1
rs.PageSize = 30
if page > rs.PageCount then page = rs.PageCount
rs.AbsolutePage = page
pagecount = rs.PageCount
StrHtml = "<table width=""98%"" border=""0"" cellspacing=""1"" cellpadding=""4"" align=""center"">"
StrHtml = StrHtml & "<tr bgcolor=""#6A813A""><td width=""20%"" align=""center""><font color=""#ECECDF"">用户</font></td><td width=""10%"" align=""center""><font color=""#ECECDF"">发帖数</font></td><td width=""20%"" align=""center""><font color=""#ECECDF"">来自</font></td><td width=""20%"" align=""center""><font color=""#ECECDF"">注册日期</font></td><td width=""30%"" align=""center""><font color=""#ECECDF"">最后发表</font></td></tr>"
do until rs.eof or i > rs.PageSize
if (i mod 2) = 0 then
StrHtml = StrHtml & "<tr bgcolor=""#EEEEEE"">"
else
StrHtml = StrHtml & "<tr bgcolor=""#F5F5F5"">"
end if
' if rs("invisible") <> 1 then StrHtml = StrHtml & "<td><a href=""../showuser.asp?userid=" & rs("userid") & """ target=_blank>" & rs("username") & "</a></td>"
StrHtml = StrHtml & "<td><a href=""../showuser.asp?userid=" & rs("userid") & """ target=_blank>" & rs("username") & "</a></td>"
StrHtml = StrHtml & "<td align=""center"">" & rs("posts") & "</td>"
StrHtml = StrHtml & "<td>" & rs("country") & "</td>"
StrHtml = StrHtml & "<td>" & rs("joindate") & "</td>"
if rs("lastposttitle") = "" then
StrHtml = StrHtml & "<td></td>"
else
StrHtml = StrHtml & "<td><a href=""../showthread.asp?threadid=" & rs("lastpostid") & """ target=_blank>" & rs("lastposttitle") & "</a></td>"
end if
StrHtml = StrHtml & "</tr>"
i = i + 1
rs.MoveNext
loop
StrHtml = StrHtml & "</table><br><br>"
response.write StrHtml & "共"& rs.RecordCount & "名注册用户在线, 当前为第" & page & "页, 选择页数:"
Set Conn = nothing
Set rs = nothing
for i=1 to pagecount
if i = page then
response.write " <b>" & i & "</b>"
else
response.write " <a href=""showonline.asp?page=" & i & """>" & i & "</a>"
end if
next
else
response.write "注册用户当前无人在线"
end if
%>
<br><br><b>showonline v1.1</b> for SF2
</center>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -