原作者:东子
在你要再线人数显示的地方的页首添加
<%@ language=vbscript %>
<% option explicit %>
在你要再线人数显示的地方
<!– #include file="show_count.asp" –>
详细列表
<!– #include file="show_users.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>
