<% dim subject,smtpserver,signature,mailadmin,notify,sendcopy dim xlaparsing,bannerid,zoneid,todaydate %> <% bannerid=request("b") zoneid=request("z") if bannerid="" or not(isnumeric(bannerid)) then bannerid=0 if zoneid="" or not(isnumeric(zoneid)) then zoneid=0 psql="select * from xlaABMbanners where bannerid="&bannerid set conn=server.createobject("ADODB.Connection") conn.open connection set rs=conn.execute(psql) if not(rs.eof) then link=rs("link") paymenttype=rs("paymenttype") impressions=rs("impressions") status=rs("status") clicks=rs("clicks")+1 bannername=rs("bannername") if zoneid>0 then psql2="update xlaABMbanners set clicks=clicks+1" if zoneid>0 and paymenttype=2 and status=1 and clicks>=impressions and impressions>0 then psql2=psql2&",status=3,dateexpired='"&todaydate&"'" if notify<>"" and mailadmin<>"" then donotification=true end if if psql2<>"" then conn.execute(psql2 & " where bannerid="&bannerid) else link=siteurl end if rs.close set rs=nothing if bannerid>0 and zoneid>0 then call xlaABMtrackbanner(bannerid,zoneid,"clicks") if donotification then call xlaABMsendnotification(bannerid,bannername) conn.close set conn=nothing if instr(1,link,"$$TIMESTAMP$$",1) then link=xlaABMtimestamp(link) response.redirect link %>