- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
tj2.asp
资源名称:shop2.rar [点击查看]
上传用户:btntkt
上传日期:2021-04-16
资源大小:5296k
文件大小:3k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
DOS
- <!--#include file="conn.asp"-->
- <%if session("admin")="" then
- response.Write "<script language='javascript'>alert('网络超时或您还没有登陆!');window.location.href='login.asp';</script>"
- response.End
- end if
- %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <link rel="stylesheet" href="manage.css" type="text/css">
- <style type="text/css">
- <!--
- body {
- background-color: #FFFFFF;
- }
- .STYLE1 {color: #000000}
- -->
- </style></head>
- <BODY>
- <table width="98%" border="1" style="border-collapse: collapse; border-style: dotted; border-width: 0px" bordercolor="#333333" cellspacing="0" cellpadding="2">
- <tr class=backs><td height=18 class=td STYLE1>网站访问数据日报表</td>
- </tr>
- <tr><td>
- <table border="1" width="100%" cellSpacing=0 cellPadding=3 bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" bordercolor="#FFFFFF">
- <tr>
- <td width="33%">日期</td>
- <td width="33%">IP访问量</td>
- <td width="33%">当日明细</td>
- </tr>
- <%
- set rs=Server.CreateObject("ADODB.recordset")
- sql="select count(*) as temp, day from count_shop group by day order by day desc"
- rs.cursorlocation = 3 '游标
- rs.open sql,conn,1,1
- if rs.eof and rs.bof then
- %>
- <tr>
- <td colspan=3>暂时没有统计数据</td>
- </tr>
- <%
- else
- pages = 31 '每页记录数
- rs.pageSize = pages
- allPages = rs.pageCount '计算一共能分多少页
- page = Request("page")
- 'if语句属于基本的排错处理
- if isEmpty(page) or clng(page) < 1 then
- page = 1
- elseif clng(page) >= allPages then
- page = allPages
- end if
- rs.AbsolutePage = page
- do while not rs.eof and pages>0
- %>
- <tr>
- <td><%=rs("day")%></td><td><%=rs("temp")%></td><td><a href="tj3.asp?day=<%=rs("day")%>">查看当日明细</a></td>
- </tr>
- <%
- pages = pages - 1
- rs.movenext
- if rs.eof then exit do
- loop
- end if
- rs.close
- set rs=nothing
- set rs1=nothing
- conn.close
- set conn=nothing
- %>
- </table>
- <%
- call listpages()
- %>
- </td></tr>
- </table>
- </body></html>
- <%
- '分页
- sub listPages()
- if allpages <= 1 then exit sub
- if page = 1 then
- response.write "<font color=darkgray>首页 前页</font>"
- else
- response.write "<a href="&request.ServerVariables("script_name")&"?page=1>首页</a> <a href="&request.ServerVariables("script_name")&"?page="&page-1&">前页</a>"
- end if
- if page = allpages then
- response.write "<font color=darkgray> 下页 末页</font>"
- else
- response.write " <a href="&request.ServerVariables("script_name")&"?page="&page+1&">下页</a> <a href="&request.ServerVariables("script_name")&"?page="&allpages&">末页</a>"
- end if
- response.write " 第"&page&"页 共"&allpages&"页"
- end sub
- %>