<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="inc.asp"-->



<%


sql="select * from websen_Last20Vister order by id desc"

Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,3 
rs.pagesize=5 
if rs.eof then
response.Write"<br><br><div align='center'>暂无数据信息</div><br><br>"
else
pagecu=rs.recordcount 
pages=rs.pagecount
rs.movefirst
nowpage=request("page") '用request获取当前页数，注意page是自己定义的变量并非函数
if nowpage&"x"="x" then '处理页码为空时的情况
nowpage=1
else
nowpage=cint(nowpage) '将页码转换成数字型
end if
rs.absolutepage=nowpage '将指针移动到当前显示页的第一条记录

	response.Write "<table width=90% border=0 cellpadding=2 cellspacing=1><tr align=center bgcolor=#CDDDF1><td width=12% >时间</td><td width=13% >操作系统</td><td width=21% >浏览器</td><td width=11% >地区</td><td width=16% >IP地址</td><td width=27% >来源</td></tr>"
	

icolor=1
while not rs.eof and icolor<=rs.pagesize


response.Write"<tr align=center><td width=""12%"">"&month(Rs("cCT"))&"-"&day(Rs("cCT"))&" "&formatdatetime(Rs("cCT"),4)&"</td><td  width=""13%"">"&Rs("cCOS")&"</td><td width=""21%"">"&Rs("cCEXP")&"</td><td width=""11%"">"&Rs("cCW")&"</td><td width=""16%"">"&Rs("cCIP")&"</td><td width=""27%"" align=left><a href="""&Rs("cCR")&""" target=_blank  title="""&Rs("cCR")&""">"&Mid(Rs("cCR"),1,24)&"..</a></td></tr>"&chr(13)	

	
icolor=icolor+1
rs.movenext
wend
end if
%>
  </table>
  <span class="STYLE8">共:<%=pages%>页当前为:<%=nowpage%>页
  <%if nowpage>1 then%>
 <a href="cheshi.asp?page=<%=nowpage-1%>">上一页</a>
  <%else%>
上一页
<%end if%>
<%for k=1 to pages%>
<%if k<>nowpage then %>
<a href="cheshi.asp?page=<%=k%>"><%=k%></a>
<%else%>
<%=k%>
<%end if%>
<%next%>
<%if nowpage < pages then%>
<a href="cheshi.asp?page=<%=nowpage+1%>">下一页</a>
<%else%>
下一页
<%end if%>
<%if nowpage>1 then%>
<a href="cheshi.asp?page=<%=1%>"> 首页</a>
<%else%>
首页
<%end if%>
<%if nowpage<pages then %>
<a href="cheshi.asp?page=<%=pages%>">末页</a>
<%else%>
末页
<%end if%>








