Statistics.Asp
上传用户:qfkgdy
上传日期:2020-06-18
资源大小:1888k
文件大小:2k
- <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
- <%Response.ContentType = "text/vnd.wap.wml; charset=utf-8"%><?xml version="1.0" encoding="utf-8"?>
- <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd">
- <!--#include file="conn.ini"-->
- <%
- e=request("e")
- if request.servervariables("HTTP_X_UP_subno")<>"" then
- m=request.servervariables("HTTP_X_UP_subno")
- elseif request.servervariables("HTTP_X_UP_CALLING_LINE_ID")<>"" then
- m=request.servervariables("HTTP_X_UP_CALLING_LINE_ID")
- else
- m=request("MISC_MSISDN")
- end if
- if m<>"" then
- m=right(m,11)
- else
- if e="" then
- if request.servervariables("HTTP_VIA")<>"" then
- response.redirect "http://211.137.86.21/PullServlet?SPID=823513&ServiceID=10000028&MISC_U=http://wapck.com/Statistics.Asp?e=1"
- end if
- end if
- end if
- %>
- <wml>
- <head>
- <meta http-equiv="Cache-Control" content="must-revalidate" forua="true"/>
- <meta http-equiv="Cache-Control" content="no-cache" forua="true"/>
- <meta http-equiv="Cache-Control" content="max-age=0" forua="true"/>
- <meta http-equiv="Expires" content="0" forua="true"/>
- <meta http-equiv="Pragma" content="no-cache" forua="true"/>
- </head>
- <card id="id" title="a">
- <p>
- <%
- function sqlstr(data)
- sqlstr="'" & Replace(data,"'","'") & "'"
- end function
- 'http://211.137.86.21/PullServlet?SPID=823513&ServiceID=10000028&MISC_U=
- 'DataBasePath="count.mdb" '设置数据库的路径。
- 'set conn=Createobject("ADODB.Connection")
- 'conn.ConnectionString="DBQ="&server.mappath("" & DataBasePath & "")&";DRIVER={Microsoft Access Driver (*.mdb)}"
- 'conn.open
- sql="update count set Accept=0 Where DATEDIFF(S, times, getdate()) > 30*60"
- conn.Execute(sql)
- ua=request.servervariables("HTTP_USER_AGENT")
- if ua="" then ua=request("ua")
- if instr(ua,"/")>0 then ua=left(ua,instr(ua,"/")-1)
- if m<>"" then
- set ssss=Server.CreateObject("ADODB.Recordset")
- rtss="select * from count where mo='" & m & "' and DATEDIFF(S, times, getdate()) < 30*60"
- ssss.open rtss,conn,1,2
- if ssss.recordcount=0 then
- sql="insert into count(mo,ua) values ("
- sql=sql & sqlstr(m) & ","
- sql=sql & sqlstr(ua) & ")"
- Application.Lock
- conn.execute sql
- Application.Unlock
- end if
- ssss.close
- set ssss=nothing
- end if
- response.redirect "/images/logo.gif"
- %>
- </p></card></wml>