Statistics.Asp
上传用户:qfkgdy
上传日期:2020-06-18
资源大小:1888k
文件大小:2k
源码类别:

手机WAP编程

开发平台:

ASP/ASPX

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
  2. <%Response.ContentType = "text/vnd.wap.wml; charset=utf-8"%><?xml version="1.0" encoding="utf-8"?>
  3. <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd">
  4. <!--#include file="conn.ini"-->
  5. <%
  6. e=request("e")
  7. if request.servervariables("HTTP_X_UP_subno")<>"" then
  8. m=request.servervariables("HTTP_X_UP_subno")
  9. elseif request.servervariables("HTTP_X_UP_CALLING_LINE_ID")<>"" then
  10. m=request.servervariables("HTTP_X_UP_CALLING_LINE_ID")
  11. else
  12. m=request("MISC_MSISDN")
  13. end if
  14. if m<>"" then
  15. m=right(m,11)
  16. else
  17. if e="" then
  18. if request.servervariables("HTTP_VIA")<>"" then
  19. response.redirect "http://211.137.86.21/PullServlet?SPID=823513&ServiceID=10000028&MISC_U=http://wapck.com/Statistics.Asp?e=1"
  20. end if
  21. end if
  22. end if
  23. %>
  24. <wml>
  25. <head>
  26. <meta http-equiv="Cache-Control" content="must-revalidate" forua="true"/>
  27. <meta http-equiv="Cache-Control" content="no-cache" forua="true"/>
  28. <meta http-equiv="Cache-Control" content="max-age=0" forua="true"/>
  29. <meta http-equiv="Expires" content="0" forua="true"/>
  30. <meta http-equiv="Pragma" content="no-cache" forua="true"/>
  31. </head>
  32. <card id="id" title="a">
  33. <p>
  34. <% 
  35. function sqlstr(data)
  36.    sqlstr="'" & Replace(data,"'","'") & "'"
  37. end function
  38. 'http://211.137.86.21/PullServlet?SPID=823513&ServiceID=10000028&MISC_U=
  39. 'DataBasePath="count.mdb" '设置数据库的路径。
  40. 'set conn=Createobject("ADODB.Connection")
  41. 'conn.ConnectionString="DBQ="&server.mappath("" & DataBasePath & "")&";DRIVER={Microsoft Access Driver (*.mdb)}"
  42. 'conn.open
  43. sql="update count set Accept=0 Where DATEDIFF(S, times, getdate()) > 30*60"
  44. conn.Execute(sql)
  45. ua=request.servervariables("HTTP_USER_AGENT")
  46. if ua="" then ua=request("ua")
  47. if instr(ua,"/")>0 then ua=left(ua,instr(ua,"/")-1)
  48. if m<>"" then
  49. set ssss=Server.CreateObject("ADODB.Recordset")
  50. rtss="select * from count where mo='" & m & "' and DATEDIFF(S, times, getdate()) < 30*60"
  51. ssss.open rtss,conn,1,2
  52. if ssss.recordcount=0 then
  53.   sql="insert into count(mo,ua) values ("
  54.   sql=sql & sqlstr(m) & ","
  55.   sql=sql & sqlstr(ua) & ")"
  56.   Application.Lock
  57.   conn.execute sql
  58.   Application.Unlock
  59. end if 
  60. ssss.close
  61. set ssss=nothing
  62. end if
  63. response.redirect "/images/logo.gif"
  64. %>
  65. </p></card></wml>