online.asp

来自「自由领域ASP+WAP同学录(V1.0)系统是一套仿ChinaRen的即可用电脑」· ASP 代码 · 共 41 行

ASP
41
字号
<!--#include file="tra.asp"-->
<!--#include file="cconst.asp"-->
<!--#include file="conn.asp"-->
<%
response.ContentType="text/vnd.wap.wml;charset=utf-8"
Response.Expires = -1
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "Cache-Control", "no-cache, must-revalidate"
sub showonlineinfo
	dim rs,onlinetotalcount,onlineusercount,onlineuserstr
	onlinetotalcount=0
	onlineusercount=0
	onlineuserstr=""
	set rs=conn.execute("select ec.studentid,ec.sname,ec.userid,online.ip,online.entertime,online.newtime from online left join  ec on ec.studentid=online.sname")
	while not rs.eof
		IF not isnull(rs("studentid")) Then
			onlineusercount=onlineusercount+1
			onlineuserstr=onlineuserstr&"|<a href='viewmember.asp?userid="&rs(2)&"'>"&rs(1)&"</a>"
		End IF
		onlinetotalcount=onlinetotalcount+1
		rs.movenext
	wend
	rs.close
	set rs=nothing
	Response.Write "<p>&#x603B;&#x5728;&#x7EBF;:<b>"&onlinetotalcount&"</b>&#x4EBA;</p>"
	Response.Write "<p>&#x767B;&#x5F55;&#x4F1A;&#x5458;:<b>"&onlineusercount&"</b>&#x4EBA; &#x6E38;&#x5BA2;:<b>"&onlinetotalcount-onlineusercount&"</b>&#x4EBA;</p>"
	Response.Write "<p>&#x5728;&#x7EBF;&#x4F1A;&#x5458;:"&onlineuserstr&"</p>"
	Response.Flush
end sub
%>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml><head><meta http-equiv="Cache-Control" content="max-age=0"/></head>
<card id="people" title="&#x5F53;&#x524D;&#x5728;&#x7EBF;&#x4EBA;&#x6570;">
<p align="center"><%=tra(ctitle)%></p>
<%showonlineinfo%>
<p><a href="main.asp"><%=tra(cback)%></a></p>
</card>
</wml>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?