%if dev="yes" then response.Write "news_events.asp"%>
|
<%
Set MyConnSC = Server.CreateObject("ADODB.Connection")
MyConnSC.Open "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=" & connn & ";"
'--------- List events----------- start
if request("id") = "" then
if request("ztitle")= "news_events" and request("level_2") = "Technical News" then
sqll1="Select * from tbl_events where "&_
" zactive = 'yes' and "&_
" events_type = '"& request("level_2") &"' and "&_
" date_end > #"& now() &"# "&_
" order by events_date desc"
elseif request("ztitle")= "news_events" and request("level_2") = ""then
sqll1="Select * from tbl_events where "&_
" zactive = 'yes' and "&_
" date_end > #"& now() &"# "&_
" order by events_date desc"
elseif request("level_2") <> "" then
sqll1="Select * from tbl_events where "&_
" zactive = 'yes' and "&_
" events_type = '"& request("level_2") &"' and "&_
" date_end > #"& now() &"# "&_
" order by events_date desc"
end if
' ' " date_start >= #"& mydate1(now()) &"#" &_
q1 = "&ztitle=news_events"
if dev="yes" then response.write " sqll1"& sqll1 '@ if sqll1 <> "" then ' response.write " sqll1"& sqll1 '@ Set rsl1=MyConnSC.Execute(sqll1) If rsl1.eof = false then response.Write "
sqll2:"& sqll2 if sqll2 <> "" then Set rsl2=MyConnSC.Execute(sqll2) If rsl2.eof = false then next_id = "" previous_id = "" this_id = "" while not rsl2.eof if int(request("id")) = int(rsl2("id")) then events_date = rsl2("events_date") events_content = rsl2("events_content") events_title= rsl2("events_title") this_id = int(rsl2("id")) previous_id = z_previous_id else if this_id = "" and previous_id = "" then z_previous_id = int(rsl2("id")) if this_id = "" and first_id = "" then first_id = int(rsl2("id")) if this_id <> "" and next_id = "" then next_id = int(rsl2("id")) end if last_id = int(rsl2("id")) rsl2.movenext wend 'rsl2 ' response.Write "
|
||||||||||||||||||||||||