用asp显示当前在线用户信息,不是简单只显示人数那种![3]

发表于:2007-06-30来源:作者:点击数: 标签:
东子 于 00-9-3 上午 02:52:23 发表在:ASP地带 这里是show_users.asp的原程序 % If rstActiveUsers.RecordCount 0 Then rstActiveUsers.MoveFirst Response.Write table border=1 vb CrLf Response.Write thead vbCrLf Response.Write thSession Id/ td vbCr
东子 于 00-9-3 上午 02:52:23 发表在:ASP地带

这里是show_users.asp的原程序
<%
If rstActiveUsers.RecordCount > 0 Then
rstActiveUsers.MoveFirst

Response.Write "<table border=""1"">" & vbCrLf

Response.Write " <thead>" & vbCrLf
Response.Write " <th>Session Id</td>" & vbCrLf
Response.Write " <th>IP Address</th>" & vbCrLf
Response.Write " <th>User Agent</th>" & vbCrLf
Response.Write " <th>Session Start Time</th>" & vbCrLf
Response.Write " </thead>" & vbCrLf

Do While Not rstActiveUsers.EOF

Response.Write " <tr>" & vbCrLf
Response.Write " <td>" & rstActiveUsers.Fields("id").Value & "</td>" & vbCrLf
Response.Write " <td>" & rstActiveUsers.Fields("ip").Value & "</td>" & vbCrLf
Response.Write " <td>" & rstActiveUsers.Fields("browser").Value & "</td>" & vbCrLf
Response.Write " <td>" & rstActiveUsers.Fields("started").Value & "</td>" & vbCrLf
Response.Write " </tr>" & vbCrLf

rstActiveUsers.MoveNext
Loop
Response.Write "</table>" & vbCrLf

End If
%>

这里是show_count.asp的原程序
<b><font color="#CC0000"><%= rstActiveUsers.RecordCount %></font> 在线用户</b>

原文转自:http://www.ltesting.net