| data |
evento |
local |
uf |
<%
call abre_conexao
call abre_conexao2
hoje= month(date) & "/" & day(date) & "/" & year(date)
mesatual=month(now)
'testes
intervalo = true
submit3 = request("submit3")
if request("filtro") <> 1 then
strselsqldiasem = "select distinct dt_evento from vw_evento where dt_evento=#"&hoje&"# and month(dt_evento)="&mesatual
else
strselsqldiasem = "select distinct dt_evento from vw_evento where dt_evento>=#"&hoje&"# and month(dt_evento)="&mesatual
if request("datadia")<>empty then
strdt2 = month(now) & "/" & request("datadia") & "/" & year(now)
if isdate(strdt2)= false then
response.write ""
end if
strselsqldiasem = "select distinct dt_evento from vw_evento where (dt_evento between #"&hoje&"# and #"&strdt2&"#) "
end if
if request("intdia1")<>empty and request("intdia2")<>empty then
data1 = month(now) & "/" & request("intdia1") & "/" & year(now)
data2 = month(now) & "/" & request("intdia2") & "/" & year(now)
if isdate(data1)= false or isdate(data2)= false then
response.write ""
end if
strselsqldiasem = "select distinct dt_evento from vw_evento where (dt_evento between #"&hoje&"# and #"&data1&"#) and dt_evento<= #"&data2&"# "
intervalo = true
end if
if request("filtrop")<> empty then
intervalo = true
if request("filtrop")="2" then
proximo=month(now)+1
if proximo = 13 then
proximo =1
end if
strselsqldiasem = "select distinct dt_evento from vw_evento where month(dt_evento)="&proximo
else
atual=month(now)
strselsqldiasem = "select distinct dt_evento from vw_evento where dt_evento>=#"&hoje&"# and month(dt_evento)="&atual 'atual
end if
end if
if request("clube") <> empty then
strselsqldiasem = strselsqldiasem & " and id_clube ="&request("clube")
submit3 = "link"
else
if request("estado") <> empty then
sqlclube = "select id_clube from vw_clubes where id_estado="&request("estado")
intervalo = true
set rsclube = objconexao2.execute(sqlclube)
x="*"
if rsclube.eof then
strselsqldiasem = strselsqldiasem & " and id_clube=0"
else
while not rsclube.eof
if x ="*" then
strselsqldiasem = strselsqldiasem & " and id_clube="&rsclube("id_clube")
x=""
else
strselsqldiasem = strselsqldiasem & " or id_clube="&rsclube("id_clube")
end if
rsclube.movenext
wend
end if
end if
end if
strselsqldiasem = strselsqldiasem& " order by dt_evento"
end if
'teste
' strselsqldiasem = "select distinct dt_evento from vw_evento where dt_evento>#"&hoje&"#"
' response.write(strselsqldiasem)
set strrsdiasem = objconexao.execute(strselsqldiasem)
do while not strrsdiasem.eof
strdatarr = split(strrsdiasem("dt_evento"),"/",-1,1)
if strdatarr(0) < 10 then
strdia = "0" & strdatarr(0)
else
strdia = strdatarr(0)
end if
if strdatarr(1) < 10 then
strmes = "0" & strdatarr(1)
else
strmes = strdatarr(1)
end if
strdt = strmes& "/" & strdia & "/" & year(now)
strdtcons = strmes & "/" & strdia & "/" & year(now)
if intervalo = false then
%>
|
<% if weekday(strdtcons) = "7" then
session("quebra") = true
else
session("quebra") = false
end if
'response.write weekday(strdt)
%>
<%=diasemana(strdtcons)%>
|
|
|
<%
end if
if request("filtro") <> 1 then
hoje= month(date) & "/" & day(date) & "/" & year(date)
if submit3 <> "link" then
strselsqldia = "select * from vw_evento where dt_evento=#"&hoje&"# and month(dt_evento)="&mesatual
else
strselsqldia = "select * from vw_evento where month(dt_evento)="&mesatual
end if
else
if submit3 <> "link" then
strselsqldia = "select * from vw_evento where dt_evento>=#"&hoje&"# and month(dt_evento)="&mesatual
else
strselsqldia = "select * from vw_evento where month(dt_evento)="&mesatual
end if
if request("datadia")<>empty then
strdt2 = month(now)& "/" & request("datadia") & "/" & year(now)
strselsqldia = "select * from vw_evento where (dt_evento = #"&strdt2&"#)"
end if
if request("intdia1")<>empty and request("intdia2")<>empty then
data1 = month(now)& "/" & request("intdia1") & "/" & year(now)
data2 = month(now)& "/" & request("intdia2") & "/" & year(now)
strselsqldia = "select * from vw_evento where (dt_evento between #"&data1&"# and #"&data2&"#)"
intervalo = true
submit3 = "link"
end if
if request("filtrop")<> empty then
if request("filtrop")="2" then
proximo=month(now)+1
if proximo = 13 then
proximo =1
end if
strselsqldia = "select distinct * from vw_evento where month(dt_evento)="&proximo
else
atual=month(now)
strselsqldia = "select distinct * from vw_evento where dt_evento>=#"&hoje&"# and month(dt_evento)="&atual
'atual
end if
end if
if request("clube") <> empty then
strselsqldia = strselsqldia & " and id_clube ="&request("clube")
submit3 = "link"
else
if request("estado") <> empty then
sqlclube = "select id_clube from vw_clubes where id_estado="&request("estado")
set rsclube = objconexao2.execute(sqlclube)
x="*"
while not rsclube.eof
if x ="*" then
strselsqldia = strselsqldia & " and id_clube="&rsclube("id_clube")
x=""
else
strselsqldia = strselsqldia & " or id_clube="&rsclube("id_clube")
end if
rsclube.movenext
wend
end if
end if
strselsqldia = strselsqldia& " order by dt_evento"
end if
' response.write(strselsqldia)
set strrsdia = objconexao2.execute(strselsqldia)
while not strrsdia.eof
if submit3 = "link" then
arrone = split(strrsdia("dt_evento"),"/",-1,1)
if arrone(0) < 10 then
strdiaone = "0" & arrone(0)
else
strdiaone = arrone(0)
end if
if arrone(1) < 10 then
strmesone = "0" & arrone(1)
else
strmesone = arrone(1)
end if
strdatamesdia = strmesone & "/" & strdiaone
strdatadiames = strdiaone& "/" &strmesone
strdatacomp = strdiaone & "/" & strmesone & "/" & year(now)
'mostra evento se for o mesmo dia da semana.
%>
| <%=formatdatetime(strdatadiames,2)%> |
<%=strrsdia("txt_evento")%> |
&estado=&datadia=&filtro=1&intdia1=&intdia2=&submit3=link" title="ver todo os eventos de <%=strrsdia("txt_clube")%>" ><%=strrsdia("txt_clube")%> |
<%=strrsdia("txt_uf")%> |
<%
if strrsdia("st_ativourl") = true then
response.write " "
end if
%>
|
<%
response.write " "
%>
|
<%
if strrsdia("st_ativoemail") = true then
response.write " "
end if
%>
|
<%
if strrsdia("st_desconto") = true then
response.write " "
end if
%>
|
<%
'########
'response.write "link"
else
'response.write "outra coisa"
if datediff("d", date(), strrsdia("dt_evento")) >= 0 then
'response.write datediff("d", date(), strrsdia("dt_evento")) &" "
arrone = split(strrsdia("dt_evento"),"/",-1,1)
if arrone(0) < 10 then
strdiaone = "0" & arrone(0)
else
strdiaone = arrone(0)
end if
if arrone(1) < 10 then
strmesone = "0" & arrone(1)
else
strmesone = arrone(1)
end if
strdatamesdia = strmesone & "/" & strdiaone
strdatadiames = strdiaone& "/" &strmesone
strdatacomp = strdiaone & "/" & strmesone & "/" & year(now)
'mostra evento se for o mesmo dia da semana.
%>
| <%=formatdatetime(strdatadiames,2)%> |
<%=strrsdia("txt_evento")%> |
&estado=&datadia=&filtro=1&intdia1=&intdia2=&submit3=link" title="ver todo os eventos de <%=strrsdia("txt_clube")%>" ><%=strrsdia("txt_clube")%> |
<%=strrsdia("txt_uf")%> |
<%
if strrsdia("st_ativourl") = true then
response.write " "
end if
%>
|
<%
response.write " "
%>
|
<%
if strrsdia("st_ativoemail") = true then
response.write " "
end if
%>
|
<%
if strrsdia("st_desconto") = true then
response.write " "
end if
%>
|
<%
end if
end if
strrsdia.movenext
wend
if session("quebra") = true then
'response.write strdatacomp & " - " & strdt
'response.write ""
'response.write "| "
'response.write " | "
'response.write " "
response.write " "
response.write "
"
response.write ""
end if
if intervalo=true then
exit do
end if
strrsdiasem.movenext
loop
%>
|