www.gusucode.com > 全球营销软件站整站源码4月最新数据 4.0源码程序 > 801wyxqf\8\hits.asp
<!--#include file="config.asp" --> <% Response.ContentType="text/html" Response.Expires = -9999 Response.AddHeader "pragma", "no-cache" Response.AddHeader "cache-ctrol", "no-cache" Dim softid,Rs,SQL Dim AllHits,DayHits,WeekHits,MonthHits,HitsTime,hits,stype,s NewAsp.ChkPostAgent() softid=NewAsp.ChkNumeric(Request.Querystring("id")) If softid=0 Then softid=NewAsp.ChkNumeric(Request.Querystring("softid")) stype = NewAsp.ChkNumeric(Request.Querystring("type")) s = NewAsp.ChkNumeric(Request.Querystring("s")) If Not IsObject(Conn) Then ConnectionDatabase Set Rs = NewAsp.CreateAXObject("ADODB.Recordset") SQL = "SELECT AllHits,DayHits,WeekHits,MonthHits,HitsTime FROM NC_SoftList WHERE softid="& softid Rs.Open SQL,Conn,1,3 If Not(Rs.BOF And Rs.EOF) Then If s=1 Then hits = CLng(Rs("AllHits"))+1 Rs("AllHits").Value = hits If DateDiff("Ww", Rs("HitsTime"), Now) <= 0 Then Rs("WeekHits").Value = Rs("WeekHits").Value + 1 Else Rs("WeekHits").Value = 1 End If If DateDiff("M", Rs("HitsTime"), Now) <= 0 Then Rs("MonthHits").Value = Rs("MonthHits").Value + 1 Else Rs("MonthHits").Value = 1 End If If DateDiff("D", Rs("HitsTime"), Now) <= 0 Then Rs("DayHits").Value = Rs("DayHits").Value + 1 Else Rs("DayHits").Value = 1 Rs("HitsTime").Value = Now End If Rs.Update End If AllHits = Rs("AllHits") DayHits = Rs("DayHits") WeekHits = Rs("WeekHits") MonthHits = Rs("MonthHits") End If Rs.close Set Rs=nothing NewAsp.PageEnd() If stype = 1 Then Response.Write "var oHits=document.getElementById(""NewAsp_Hits"");" & vbNewLine Response.Write "if (oHits!=null) {" & vbNewLine Response.Write "oHits.style.display='';" & vbNewLine Response.Write "oHits.innerHTML="& Chr(34) &"本日:"& DayHits &" 本周:"& WeekHits &" 本月:"& MonthHits &" 总数:"& AllHits &" "& Chr(34) &";" & vbNewLine Response.Write "}" & vbNewLine ElseIf stype = 2 Then Response.Write "本日:"& DayHits &" 本周:"& WeekHits &" 本月:"& MonthHits &" 总数:"& AllHits ElseIf stype = 3 Then Response.Write "" ElseIf stype = 4 Then Response.Write "document.write (' ');" Else Response.Write "document.write ("& Chr(34) &"本日:"& DayHits &" 本周:"& WeekHits &" 本月:"& MonthHits &" 总数:"& AllHits &" "& Chr(34) &");" End If %>