%@ CODEPAGE = "936" %> <% '================================= ' ' 阿江酷站访问统计系统 ' Ajiang info@ajiang.net ' www.ajiang.net ' ' 版权所有·抄袭挪用必究 ' '================================= %> <% '权限检查 if session.Contents("master")=false and whatcan<4 then Response.Redirect "help.asp?id=004&error=您没有使用自定义统计的权限。" '********************************** 处理查询条件 ********************************** '================================ ' ' 从浏览器或者数据并处理 ' '================================ '从浏览器获取数据 onyear =trim(Request("onyear")) onmonth =trim(Request("onmonth")) onday =trim(Request("onday")) offyear =trim(Request("offyear")) offmonth =trim(Request("offmonth")) offday =trim(Request("offday")) vip =trim(Request("vip")) vwhere =trim(Request("vwhere")) vos1 =trim(Request("vos1")) vos2 =trim(Request("vos2")) vsoft1 =trim(Request("vsoft1")) vsoft2 =trim(Request("vsoft2")) vcome =trim(Request("vcome")) vpage =trim(Request("vpage")) outtype =trim(Request("outtype")) wherestr =trim(Request("wherestr")) name =trim(Request("name")) content =trim(Request("content")) '处理获取的数据 ontime=onyear & "-" & onmonth & "-" & onday if (ontime <> "--") and (not isdate(ontime)) then Response.Redirect "help.asp?id=001&error=日期填写不合乎要求。" offtime=offyear & "-" & offmonth & "-" & offday if (offtime <> "--") and (not isdate(offtime)) then Response.Redirect "help.asp?id=001&error=日期填写不合乎要求。" if (offtime <> "--") then offtime=cdate(offtime)+1 '因为SQL总是按所指日期的0时计算的,所以应该改为下一日 if (outtype ="") then Response.Redirect "help.asp?id=001&error=您没有指明要查看的项目。" vos=vos2 if vos = "" then vos=vos1 vsoft=vsoft2 if vsoft="" then vsoft=vsoft1 '************************************ 运算和输出 ************************************ '================================ ' ' 转换为 SQL 指令 ' '================================ '将查询条件转换为SQL查询指令 if wherestr="" then wherestr=" where " '如果存在查询条件,则将查询条件加入查询字串 if ontime <> "--" then wherestr=wherestr & "and (vtime>=datevalue('" & ontime & "')) " if offtime <> "--" then wherestr=wherestr & "and (vtime<=datevalue('" & offtime & "')) " if vip <> "" then wherestr=wherestr & "and (vip like '%" & vip & "%') " if vwhere <> "" then wherestr=wherestr & "and ((vwhere like '%" & vwhere & "%') or (vwheref like '%" & vwhere & "%')) " if vos <> "" then vherestr=wherestr & "and (vos like '%" & vos & "%') " if vsoft <> "" then wherestr=wherestr & "and (vsoft like '%" & vsoft & "%') " if vcome <> "" then wherestr=wherestr & "and (vcome like '%" & vcome & "%') " if vpage <> "" then wherestr=wherestr & "and (vpage like '%" & vpage & "%') " '去除第一个查询条件和 where 之间的 and wherestr=replace(wherestr,"where and","where") '如果没有查询条件,则查询字串应为空 if trim(wherestr)="where" then wherestr="" end if '如果要查看的内容只有详细记录,则直接转入详细记录页 if outtype="详细" then Response.Redirect "tj_all.asp?wherestr=" & server.URLEncode(wherestr) '================================ ' ' 主 程 序 ' '================================ '打开数据库 set conn=server.createobject("adodb.connection") DBPath = Server.MapPath(connpath) conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath Set rs = Server.CreateObject("ADODB.Recordset") %>
|
恭喜: 下面显示的就是您要查询的内容的分析结果。 |
![]() | |||
![]() | |||
![]() | |||
![]() | |||
![]() | ||||||||||||||
∷∷∷ <%=statname%> ∷∷∷
|
||||||||||||||
![]() | ||||||||||||||
![]() | ||||||||||
∷∷∷ <%=statname%> ∷∷∷
|
||||||||||
![]() | ||||||||||