<% Option Explicit %><% '***************************************************** '***************************************************** '** ** '** CrazyBeavers RSS Class v 1.0 ** '** ** '** If you wish to use this piece of code in ** '** your own applications you have to let this ** '** statement remain in it's current state. If ** '** you plan to redistribute your application ** '** you will have to have inform the users ** '** that you are using CB RSS Class and that ** '** they can find more information about it on ** '** CrazyBeaver Softwares homepage located at the ** '** URL below: ** '** ** '** http://www.crazybeavers.se/ ** '** ** '** / Karl-johan Sjögren ** '** http://www.crazybeavers.se/ ** '** © 2005 CrazyBeaver Software ** '** ** '***************************************************** '***************************************************** class cls_CBRSS_Item public Title public Link public Comments public Description public PubDate end class class cls_CBRSS public Name public Link public Description public PubDate public GMT public Encoding public Language public IncludeStyleSheet public StyleSheet public Items private function rfc822date(d) dim sWeekDay dim sMonth select case Weekday(d) case 1 sWeekday = "Mon" case 2 sWeekday = "Tue" case 3 sWeekday = "Wed" case 4 sWeekday = "Thu" case 5 sWeekday = "Fri" case 6 sWeekday = "Sat" case else sWeekday = "Sun" end select select case Month(d) case 1 sMonth = "Jan" case 2 sMonth = "Feb" case 3 sMonth = "Mar" case 4 sMonth = "Apr" case 5 sMonth = "May" case 6 sMonth = "Jun" case 7 sMonth = "Jul" case 8 sMonth = "Aug" case 9 sMonth = "Sep" case 10 sMonth = "Oct" case 11 sMonth = "Nov" case else sMonth = "Dec" end select rfc822date = _ sWeekDay & ", " & _ Right(string(2,"0") & Day(d),2) & " " & _ sMonth & " " & Year(d) & " " & _ Right(string(2,"0") & Hour(d),2) & ":" & _ Right(string(2,"0") & Minute(d),2) & ":" & _ Right(string(2,"0") & Second(d),2) & " " & _ GMT end function public sub RenderRSS Response.Clear Response.ContentType = "text/xml" call Response.AddHeader("Content-Disposition", "filename=""beaverrss.xml""") Response.Write("" & vbCrLf) if(IncludeStyleSheet) then Response.Write("" & vbCrLf) end if Response.Write("" & vbCrLf) Response.Write(" " & vbCrLf) Response.Write(" " & Server.HTMLEncode(Name) & " RSS" & vbCrLf) Response.Write(" " & Server.HTMLEncode(Link) & "" & vbCrLf) Response.Write(" " & Server.HTMLEncode(Description) & "" & vbCrLf) Response.Write(" " & Language & "" & vbCrLf) Response.Write(" " & rfc822date(PubDate) & "" & vbCrLf) dim Item for each Item in Items set Item = Items(Item) Response.Write(" " & vbCrLf) Response.Write(" " & Item.Title & "" & vbCrLf) Response.Write(" " & Server.HTMLEncode(Item.Link) & "" & vbCrLf) if(Item.Comments <> "") then Response.Write(" " & Server.HTMLEncode(Item.Comments) & "" & vbCrLf) end if Response.Write(" " & vbCrLf) Response.Write(" " & rfc822date(Item.PubDate) & "" & vbCrLf) Response.Write(" " & vbCrLf) next Response.Write(" " & vbCrLf) Response.Write("") end sub public sub AddItem(oItem) call Items.Add(oItem.Title, oItem) end sub public function NewItem set NewItem = new cls_CBRSS_Item end function sub Class_Initialize set Items = CreateObject("Scripting.Dictionary") GMT = "+0000" Encoding = "ISO-8859-1" Language = "es-ES" IncludeStyleSheet = false StyleSheet = "cbrss.xsl" end sub sub Class_Terminate set Items = nothing end sub end class %><% dim oRSS, oItem set oRSS = new cls_CBRSS oRSS.Name = "Cruz Roja Boliviana - Oficina Nacional" oRSS.Link = "http://www.cruzrojaboliviana.org/" oRSS.Description = "ULTIMAS NOTICIAS DE CRUZ ROJA BOLIVIANA" oRSS.GMT = "+0000" oRSS.IncludeStyleSheet = true '*** Create new item and add it to the feed set oItem = oRSS.NewItem oItem.Title = " PROMESA 25:  UNA ESTRATEGIA PARA LLEGAR A LOS JÓVENES DONANTES DE SANGRE EN BOLIVIA " oItem.Link = "http://www.cruzrojaboliviana.org/dndo/uncodi/noticias/2007/03-10/prom25.htm" oItem.Comments = "http://www.cruzrojaboliviana.org/dndo/uncodi/noticias/2007/03-10/prom25.htm" oItem.Description = "En septiembre se iniciaron talleres de sensibilización interna en Filiales de Cruz Roja Boliviana" oItem.PubDate = Now() oRSS.AddItem(oItem) '*** Create new item and add it to the feed set oItem = oRSS.NewItem oItem.Title = " TALLER PARA PERIODISTAS SOBRE PRENSA, VIOLENCIA Y ACCIÓN HUMANITARIA " oItem.Link = "http://www.cruzrojaboliviana.org/dndo/uncodi/noticias/2007/03-10/periodistas.htm" oItem.Comments = "http://www.cruzrojaboliviana.org/dndo/uncodi/noticias/2007/03-10/periodistas.htm" oItem.Description = "El pasado 30 de septiembre finalizo el taller internacional para periodistas de las ciudades de La Paz y Oruro que fue organizado por Cruz Roja Boliviana y tuvo el apoyo del Comité Internacional de la Cruz Roja (C.I.C.R.)." oItem.PubDate = Now() oRSS.AddItem(oItem) '*** Create new item and add it to the feed set oItem = oRSS.NewItem oItem.Title = " INTERVENCION DE LA CRUZ ROJA Y LA MEDIA LUNA ROJA FRENTE AL TERROMOTO EN PERU " oItem.Link = "http://www.cruzroja.org/emergencias/2007/Peru%20Terre/Com_FICR_CICR.pdf" oItem.Comments = "http://www.cruzroja.org/emergencias/2007/Peru%20Terre/Com_FICR_CICR.pdf" oItem.Description = "En el marco de las actividades de restablecimiento de lazos familiares, las Delegaciones Regionales de la Federación Internacional y del Comité Internacional de la Cruz Roja (CICR) en Lima, comunican a todas las Sociedades Nacionales de la Cruz Roja y de la Media Luna Roja que, tras el terremoto ocurrido el día 15 de agosto en el sur del país, el Ministerio de Salud del Perú está preparando una lista de personas heridas, cubriendo inicialmente la región de Lima y Callao, la misma que será puesta (y actualizada) en su página web www.minsa.gob.pe" oItem.PubDate = Now() oRSS.AddItem(oItem) '*** Create new item and add it to the feed set oItem = oRSS.NewItem oItem.Title = " DIA INTERNACIONAL DE LA JUVENTUD 12 DE AGOSTO 2007 " oItem.Link = "http://www.cruzroja.org/esp/dijuv07/index.htm" oItem.Comments = "http://www.cruzroja.org/esp/dijuv07/index.htm" oItem.Description = "Esta conmemoración es una oportunidad importante para promover la toma de conciencia de la importancia de la participación de los jóvenes y de su inclusión en los procesos que viven las sociedades para construir su desarrollo " oItem.PubDate = Now() oRSS.AddItem(oItem) '*** Create new item and add it to the feed set oItem = oRSS.NewItem oItem.Title = " TALLER BÁSICO DE EQUIPOS NACIONALES DE INTERVENCIÓN PARA DESASTRES (ENI´S) " oItem.Link = "http://www.cruzrojaboliviana.org/socorro/default.htm" oItem.Comments = "http://www.cruzrojaboliviana.org/socorro/default.htm" oItem.Description = "El propósito de la actividad es fortalecer los recursos humanos de la Unidad Nacional de Socorro y Desastres, mediante la formación de quipos nacionales de intervención, que mejorarán la capacidad de atención en situaciones de emergencia y desastres. " oItem.PubDate = Now() oRSS.AddItem(oItem) '*** Create new item and add it to the feed set oItem = oRSS.NewItem oItem.Title = " Ier. CONCURSO PERIODÍSTICO 2007 - BOLIVIA: RETOS DE LA ACCIÓN HUMANITARIA " oItem.Link = "http://www.cruzrojaboliviana.org/periodistas/default.htm" oItem.Comments = "http://www.cruzrojaboliviana.org/periodistas/default.htm" oItem.Description = "La Cruz Roja Boliviana como parte del Movimiento Internacional de la Cruz Roja y de la Media Luna Roja con el fin de reconocer y estimular el trabajo periodístico en la región convocan, con el apoyo de la Asociación de Periodistas de La Paz, al Concurso de Periodismo “Bolivia: Retos de la Acción Humanitaria”. " oItem.PubDate = Now() oRSS.AddItem(oItem) oRSS.RenderRSS set oRSS = nothing Response.End %>