Ad.Asp
上传用户:qfkgdy
上传日期:2020-06-18
资源大小:1888k
文件大小:1k
- <!--#include file="wml.ini"-->
- <%
- id=wap.req("id","")
- id=wap.limitInt(id,0,"")
- Set picture=load(id)
- Public Sub analyze(ByVal d,c)
- sql="SELECT anid FROM analysis WHERE adate='"&d&"'"
- Set DAORS=getRecordSet(conn,sql,1,1)
- if(not DAORS.eof) then
- conn.execute("UPDATE analysis SET "&c&"="&c&"+1 WHERE anid="&DAORS("anid"))
- else
- conn.execute("INSERT INTO analysis(adate,"&c&") VALUES('"&d&"',1)")
- end if
- DAORS.close
- Set DAORS=nothing
- End Sub
-
- dim rss
- set rss = server.CreateObject ("adodb.recordset")
- sql="select * from ad where id=" & id & ""
- set rss=getRecordSet(conn,sql,1,2)
- if not rss.eof then
- Call analyze(date,"ad_view")
- conn.execute("UPDATE ad SET view_count=view_count+1 WHERE id=" &id & "")
- response.write rss("view_count")
- response.redirect rss("Url")
- end if
- rss.close
- set rss=Nothing
- %>