<%
sql = "SELECT Calendars.*, CalendarDates.ID, CalendarDates.NewsDate, CalendarType.CDescription FROM (CalendarDates INNER JOIN Calendars ON CalendarDates.NewsID = Calendars.NewsID) INNER JOIN CalendarType ON Calendars.type = CalendarType.CTypeID "
If Request("Type") = "" or Request("Type") = "0" then
sql = sql & "where visible = 1 and NewsDate=#" & CheckforInsertion(Request("Date1")) & "#"
else
sql = sql & "where visible = 1 and Calendars.type=" & Request("Type") & " and NewsDate=#"& CheckforInsertion(Request("Date1")) &"#"
End if
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 3, 3
For xx = 1 to rs.recordcount
if rs("show_flyer") = 1 then
'do nothing
Elseif rs("link_to_site") = 1 then %>
- "><%= rs("EventName") %>
<%
Else
%>
-
"><%= rs("EventName") %>
<%
End If
rs.movenext
Next
rs.close
set rs=nothing
%>
|