<% response.expires = 0 response.expiresabsolute = now() - 0 response.addHeader "pragma","no-cache" response.addHeader "cache-control","private" Response.CacheControl = "no-cache" const advertlistnumber=24 set rs=server.createobject("adodb.recordset") sql="Select * from [SMT_ads] where SMT_act=1 and SMT_class <> 0 order by SMT_time" rs.open sql,conn,1,3 while not rs.eof advertvirtualvalue=0 if rs("SMT_class")=1 then if rs("SMT_click")>=rs("SMT_clicks") then advertvirtualvalue=1 end if elseif rs("SMT_class")=2 then if rs("SMT_show")>=rs("SMT_shows") then advertvirtualvalue=1 end if elseif rs("SMT_class")=3 then if date()>=rs("SMT_lasttime") then advertvirtualvalue=1 end if elseif rs("SMT_class")=4 then if rs("SMT_click")>=rs("SMT_clicks") then advertvirtualvalue=1 end if if rs("SMT_show")>=rs("SMT_shows") then advertvirtualvalue=1 end if elseif rs("SMT_class")=5 then if rs("SMT_click")>=rs("SMT_clicks") then advertvirtualvalue=1 end if if date()>=rs("SMT_lasttime") then advertvirtualvalue=1 end if elseif rs("SMT_class")=6 then if rs("SMT_show")>=rs("SMT_shows") then advertvirtualvalue=1 end if if date()>=rs("SMT_lasttime") then advertvirtualvalue=1 end if elseif rs("SMT_class")=7 then if rs("SMT_click")>=rs("SMT_clicks") then advertvirtualvalue=1 end if if rs("SMT_show")>=rs("SMT_shows") then advertvirtualvalue=1 end if if date()>=rs("SMT_lasttime") then advertvirtualvalue=1 end if end if if advertvirtualvalue>=1 then rs("SMT_act")=2 rs.update end if rs.movenext wend rs.close set rs=nothing getprice=request.querystring("priceid") getplace=cint(request.querystring("place")) set rs=server.createobject("adodb.recordset") sql="Select top 1 * from [SMT_ads] where SMT_act=1 and SMT_place="&getplace&" and SMT_priceid="&getprice&" order by SMT_time" rs.open sql,conn,1,3 if not rs.eof then getshow=rs("SMT_show")+1 rs("SMT_show")=getshow rs("SMT_time")=now() rs.Update if rs("SMT_window")=0 then ttarg = "_blank" else ttarg="_top" end if if rs("SMT_showtype")="i" then '=========================== viewads="" %> document.write('<%=viewads%>'); <% elseif rs("SMT_showtype")="f" then %> document.write('\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=<%=rs("SMT_width")%> height=<%=rs("SMT_height")%>>'); <% else %> document.write(''); <% end if end if rs.close set rs=nothing set conn=nothing %>