| 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" alt="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" alt="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
%>
|