<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% response.write("" & vbcrlf) response.write("" & vbcrlf) response.write("" & vbcrlf) response.write("" & SITE_NAME & " - nouvelles" & vbcrlf) response.write("" & SITE_PATH & CMS_PATH & "" & vbcrlf) response.write("" & SITE_NAME & " - nouvelles" & vbcrlf) response.write("fr-CA" & vbcrlf & vbcrlf) ' Connect to the database and retrieve the last 15 articles published. sql = "select * from PageDetail where pageSectionID = " & NEWSIDSTR & " order by pageStartDate Desc" set rs = Conn.execute(sql) x=0 while not rs.eof if x < 15 then if rs("pagevisible") = true and ((date >= rs("pagestartdate") and date < rs("pageenddate")) or (displaytype = "archive" and date >= rs("pagestartdate"))) then response.write("" & vbcrlf) response.write(""& rs("pagetitle") & "" & vbcrlf) response.write("" & CheckString(SITE_PATH & CMS_PATH & "page.asp?pageid=" & rs("pageid")) & "" & vbcrlf) SetLocale(1033) session.LCID = 1033 response.write("" & CheckString(day(rs("pagestartdate")) & " " & monthname(month(rs("pagestartdate"))) & " " & year(rs("pagestartdate")) & " " & FormatDateTime(rs("pagestartdate"), vbShortTime)) & " EST" & vbcrlf) SetLocale(3084) session.LCID = 3084 response.write("" & CheckString(rs("pagebody")) & "" & vbcrlf) response.write("" & vbcrlf) response.write(vbcrlf) end if end if x=x+1 rs.movenext wend ' Write out the End Channel Data tag and End RSS tag. response.write("" & vbcrlf) response.write("") Response.CacheControl = "no-cache" ' Not to allow the server/browser cache this page Response.Expires = -1 ' Not to allow the server/browser cache this page Response.ContentType = "text/xml" ' In case you view the file in a browser, you will see XML parsed file (IE) Function CheckString(xmldata) ' < or & in the string is not valid xml : this function encloses it with CDATA need = false if instr(xmldata, "<") then need = true if instr(xmldata, "&") then need = true if need then CheckString = "" else CheckString = xmldata end if end function %>