- <!--#include file="wml.ini"-->
- <%
- call wmlbegin("在线用户","wrap")
- %>
- <%
- p=cint(request.QueryString("p"))
- if p="" or p<1 then p=1
- d=request("d")
- if d="" then d="a"
- pag=10
- '-------------------------------------------------------------------------------------
- set rs=Server.CreateObject("ADODB.Recordset")
- if d="a" then
- rsstr="select * from [count] where Accept='1' order by [times] desc"
- elseif d="b" then
- rsstr="select * from [count] order by [times] desc"
- else
- rsstr="select * from [count] WHERE DATEDIFF(d, times, getdate()) ='" & d & "' order by [times] desc"
- end if
- rs.open rsstr,conn,1,2
- if d="a" then
- Response.write("在线|")
- else
- Response.write "<a href='online.Asp?p="&p&"&d=a'>在线</a>"
- Response.write "|"
- end if
- if d="0" then
- Response.write("今天|")
- else
- Response.write "<a href='online.Asp?p="&p&"&d=0'>今天</a>"
- Response.write "|"
- end if
- if d="1" then
- Response.write("昨天|")
- else
- Response.write "<a href='online.Asp?p="&p&"&d=1'>昨天</a>"
- Response.write "|"
- end if
- if d="b" then
- Response.write("全部<br/>")
- else
- Response.write "<a href='online.Asp?p="&p&"&d=b'>全部</a><br/>"
- end if
- if d="a" then
- Response.write("在线手机号码(" & rs.recordcount & ")")
- end if
- if d="0" then
- Response.write("今天手机号码(" & rs.recordcount & ")")
- end if
- if d="1" then
- Response.write("昨天手机号码(" & rs.recordcount & ")")
- end if
- if d="b" then
- Response.write("全部手机号码(" & rs.recordcount & ")")
- end if
- Response.write "<br/>"
- if rs.eof then
- Response.write("暂无记录<br/>")
- else
- maxpage=int((rs.recordcount-1)/pag)+1
- if p>maxpage then p=maxpage
- if rs.recordcount > 0 then
- rs.Move((P-1)*10)
- dim j
- j=1
- do while ((not rs.EOF) and j<=clng(10))
- if rs("Accept")=1 then
- Oline="在线"
- else
- Oline="离线"
- end if
- c=left(rs("mo"),7)
- 'formdzs=formdz()
- Response.write ("手机号码:" & wap.safeMobile(rs("mo")) & "[" & Oline & "][" & formdzs & "]" & rs("ua") & "<br/>")
- rs.MoveNext
- j=j+1
- loop
- end if
- end if
- if p*10<rs.recordcount or p>1 then Response.write("第" & p & "页,共" & (int((rs.recordcount-1)/10)+1) & "页<br/>")
- if p*10<rs.recordcount then Response.write("<a href='online.Asp?d=" & d & "&p=" & p+1 & "'>下一页</a> ")
- if p>1 then Response.write("<a href='online.Asp?d=" & d & "&p=" & p-1 & "'>上一页</a> ")
- %>
- <% if p*10<rs.recordcount or p>1 then %>
- <%Response.write "<br/>跳页"
- Response.write "<input name='p' title='页码' type='text' format='*N' emptyok='true' size='2' maxlength='4' value='"
- if p>=maxpage then
- response.write(p-1)
- else
- response.write(p+1)
- end if
- Response.write "'/>页"
- Response.write ("<anchor>去吧<go method=""GET"" href=""online.Asp?d=" & d & """>")
- Response.write ("<postfield name=""p"" value=""$(p)""/>")
- Response.write ("</go></anchor><br/>")
- %>
- <% end if %>
- <%
- rs.close
- set rs=nothing
- Function formdz()
- aa="Microsoft Access Driver (*.mdb)"
- bb=server.mappath("081208.mdb")
- dbname="DRIVER={" & aa &"}; dbq=" & bb & ";"
- set connmobile=Server.CreateObject("ADODB.Connection")
- connmobile.open dbname
- set srs=Server.CreateObject("ADODB.Recordset")
- connmobile.CommandTimeOut = 999
- sql="select * from num where num='"&c&"'"
- set srs=connmobile.execute(sql)
- if not srs.eof then
- formdz=srs("city")
- set srs=nothing
- else
- formdz="wapck.com"
- end if
- connmobile.close
- set connmobile=nothing
- set srs=nothing
- End function
- conn.close
- set conn=nothing
- call wap.navs("在线用户,")
- call wmlend
- %>