20 Reais Grátis Apostas Online
<% ban_codigo = request("ban_codigo") ban_link = request("ban_link") if (not isempty(ban_codigo)) or (not isempty(ban_link)) then if isempty(ban_codigo) then queryselbanner="SELECT ban_codigo FROM banner WHERE ban_link="&ban_link set selbanner = conexao.execute(queryselbanner) ban_codigo = selbanner("ban_codigo") end if queryupdbanner="UPDATE banner SET banner.ban_qtd_click = banner.ban_qtd_click+1 WHERE banner.ban_codigo="&ban_codigo set updbanner = Conexao.Execute(queryupdbanner) if isempty(ban_link) then queryselbanner="SELECT ban_link FROM banner WHERE ban_codigo = "&ban_codigo set selbanner = conexao.execute(queryselbanner) ban_link = selbanner("ban_link") end if response.redirect(ban_link) else %> <% queryselbanner="SELECT banner.ban_codigo, banner.ban_figura, banner.ban_link, banner.ban_qtd_view, banner.ban_atual_view, banner.ban_data_vencimento, banner.ban_data_ini, banner.ban_qtd_click, banner.ban_pagina, banner.ban_ativo FROM banner WHERE (banner.ban_pagina='"&request.servervariables("PATH_INFO")&"' or banner.ban_pagina='/') AND banner.ban_ativo=True AND (banner.ban_qtd_view > banner.ban_atual_view OR banner.ban_data_vencimento >= Date())" set selbanner = ExecuteSelectCount(queryselbanner,contador) if not selbanner.eof then selbanner.movefirst if contador = 1 then if InStr(ucase(selbanner("ban_figura")),".GIF") = 0 then response.write(" ") response.write(" ") response.write(" ") response.write(" ") response.write(" ") response.write(" ") else response.write("") end if ban_codigo=selbanner("ban_codigo") end if if contador > 1 then numbanner = randomico(contador) x=1 while (not selbanner.eof) if numbanner=x then if InStr(ucase(selbanner("ban_figura")),".GIF") = 0 then response.write(" ") response.write(" ") response.write(" ") response.write(" ") response.write(" ") response.write(" ") else response.write("") end if ban_codigo=selbanner("ban_codigo") end if selbanner.movenext x=x+1 wend end if queryupdbanner="UPDATE banner SET banner.ban_atual_view = banner.ban_atual_view + 1 WHERE banner.ban_codigo="&ban_codigo set updbanner = Conexao.Execute(queryupdbanner) queryselbanner="SELECT banner.ban_codigo, banner.ban_figura, banner.ban_link, banner.ban_qtd_view, banner.ban_atual_view, banner.ban_data_vencimento, banner.ban_data_ini, banner.ban_qtd_click, banner.ban_pagina, banner.ban_ativo FROM banner WHERE banner.ban_codigo="&ban_codigo Set selbanner = Conexao.Execute(queryselbanner) if selbanner("ban_qtd_view")=selbanner("ban_atual_view") or selbanner("ban_data_vencimento") < Date() then queryupdbanner="UPDATE banner SET banner.ban_data_fim = Date() WHERE banner.ban_codigo="&ban_codigo set updbanner = Conexao.Execute(queryupdbanner) end if end if end if %>