<%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 "" response.Write "" response.Write "" response.Write "" response.Write "" response.Write "" response.Write "
 
" response.Write "" response.Write "" response.Write "" while not rsl1.eof X = X + 1 this_bg_color = "#EDEDED" Response.Write " onMouseOver="this.style.backgroundColor='<%=this_bg_color %>';" onmouseout="this.style.backgroundColor='transparent';"> <% response.Write "" response.Write "" rsl1.movenext wend response.Write "
"& X response.Write "Title" response.write "Release Date" response.Write "
"& X response.write ""&rsl1("events_title")&""& mydate1(rsl1("events_date")) response.Write "
" else 'rsl1 'response.Write "no record 2" end if 'rsl1 else end if 'sqll1 end if 'if request("id") = "" then '--------- List events----------- end %> <% '--------- List events content----------- start if request("id") <> "" then sqll2="Select * from tbl_events where "&_ " zactive = 'yes' and "&_ " events_type = '"& request("event_type") &"' and "&_ " date_end > #"& now() &"# "&_ " order by events_date desc" if dev ="yes" 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 "" ' response.Write "" ' response.Write "
" & events_title ' response.Write "" ' if isnumeric(first_id) = true and first_id <> "" then response.Write "" ' response.Write "" ' if isnumeric(previous_id) = true and previous_id <> "" then response.Write " " ' response.Write "" ' response.Write "" ' if isnumeric(next_id) = true and next_id <> "" then response.Write "" ' response.Write "" ' if isnumeric(last_id) = true and last_id <> "" and last_id <> this_id then response.Write "" ' response.Write "
" response.Write "" response.Write "" response.Write "" response.Write "" response.Write "" response.Write " <% response.Write "
" & events_title &"
"& mydate1(events_date) response.Write "
" if isnumeric(first_id) = true and first_id <> "" then response.Write "" response.Write "" if isnumeric(previous_id) = true and previous_id <> "" then response.Write " " response.Write "" if isnumeric(next_id) = true and next_id <> "" then response.Write "" response.Write "" if isnumeric(last_id) = true and last_id <> "" and last_id <> this_id then response.Write "" response.Write "

"& events_content &"
" %> &ztitle=news_events" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image32','','images/btn_back_over.png',1)">
" end if ' rsl2 end if 'sqll2 end if ' if request("id") <> "" then '--------- List events content----------- end %>