<% dim onglet const TypeSecu = 2 onglet = cint(2^(CG_ONGLET_GENERAL)) '--------------------- 'CONSTANTES const nbrep="../" const CF_ChoixMenu = "2" %> Slide Show Library - CDN Slide show index
Slideshow Library Index
<% Response.Expires = -1 ' =========== RSS2HTML.ASP for ASP/ASP.NET ========== ' copyright 2005-2008 (c) www.Bytescout.com ' version 1.27, 16 August 2008 ' =========== configuration ===================== ' ##### URL to RSS Feed to display ######### 'here is the example for the xml feed 'URLToRSS = "http://www.itbusiness.ca/it/client/en/CDN/buildRss.asp?cid=91" URLToRSS = "http://www.itbusiness.ca/IT/client/en/CDN/slideshow/slideshow_feed.xml" ' ##### Item template. ' ##### {LINK} will be replaced with item link ' ##### {TITLE} will be replaced with item title ' ##### {DESCRIPTION} will be replaced with item description ' ##### {DATE} will be replaced with item date and time ItemTemplate = "
 &{TITLE}

{DESCRIPTION}

" ' ##### Error message that will be displayed if not items etc ErrorMessage = "Error has occured while trying to process " &URLToRSS & "
Please contact web-master" ' ================================================ Set xmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0") xmlHttp.Open "GET", URLToRSS, false xmlHttp.Send() RSSXML = xmlHttp.ResponseText Set xmlDOM = Server.CreateObject("MSXML2.DomDocument.3.0") xmlDOM.async = False xmlDOM.validateOnParse = False xmlDom.resolveExternals = False If not xmlDOM.LoadXml(RSSXML) Then ErrorMessage = "Can not load XML:" & vbCRLF & xmlDOM.parseError.reason & vbCRLF & ErrorMessage End If Set xmlHttp = Nothing ' clear HTTP object Set RSSItems = xmlDOM.getElementsByTagName("item") ' collect all "items" from downloaded RSS RSSItemsCount = RSSItems.Length-1 ' ##### max number of displayed items ##### MaxNumberOfItems =RSSItems.Length+1 ' if not .. entries, then try to get .. if RSSItemsCount = -1 Then Set RSSItems = xmlDOM.getElementsByTagName("entry") ' collect all "entry" (atom format) from downloaded RSS RSSItemsCount = RSSItems.Length-1 End If Set xmlDOM = Nothing ' clear XML jjf = -1 For g = 0 To RSSItemsCount Set RSSItem = RSSItems.Item(g) ' fix for the issue when a description from a previous item ' is used if current item description is empty provided by George Sexton RSSLink=" " RSSdescription=" " RSSCommentsLink=" " RSSimgurl=" " for each child in RSSItem.childNodes Select case lcase(child.nodeName) case "title" RSStitle = child.text case "imgurl" RSSimage = child.text case "link" RSSlink = child.text case "description" RSSdescription = child.text case "content" ' atom format RSSdescription = child.text case "published"' atom format RSSDate = child.text case "pubdate" RSSDate = child.text End Select next ' now check filter If (InStr(RSSTitle,Keyword1)>0) or (InStr(RSSTitle,Keyword2)>0) or (InStr(RSSDescription,Keyword1)>0) or (InStr(RSSDescription,Keyword2)>0) then jjf = jjf+1 if jjf 0 then else Response.Write ErrorMessage End If ' Response.End ' uncomment this for use in on-the-fly output %>