<% 'dBlog 2.0 CMS Open Source 'Versione file 2.0.0 'FUNZIONE: questo script si occupa di generare il feed RSS in un formato utilizzabile da programmi e siti esterni Dim SQLArticoli, RSArticoli, SQLCommenti, RSCommenti, ExpTags, CurTag Response.ContentType = "text" 'Cerco tutti gli articoli e li visualizzo in formato xml SQLArticoli = " SELECT [ID], [Autore], [Sezione], [Tags], [Titolo], [Testo], [Data], [Ora] FROM Articoli WHERE Articoli.Data <= '"& DataToStr(Date()) &"' AND NOT Articoli.Bozza ORDER BY Articoli.Data DESC, Articoli.Ora DESC " Set RSArticoli = Server.CreateObject("ADODB.Recordset") RSArticoli.Open SQLArticoli, Conn, 1, 3 If NOT RSArticoli.EOF Then Do While NOT RSArticoli.EOF FID = RSArticoli("ID") ExpTags = "" Response.Write "TITLE: "& SostituisciCaratteri(NoHTML(DecodeEntities(RSArticoli("Titolo"))),"No") & VbCrLf Response.Write "AUTHOR: " & RSArticoli("Autore") & VbCrLf Response.Write "DATE: "& Mid(RSArticoli("Data"), 1, 4) & "/" & Mid(RSArticoli("Data"), 5, 2) & "/" & Mid(RSArticoli("Data"), 7, 2) & " " & Mid(RSArticoli("Ora"), 1, 2) & ":" & Mid(RSArticoli("Ora"), 3, 2) & ":" & Mid(RSArticoli("Ora"), 5, 2) & VbCrLf Response.Write "CATEGORY: " & SostituisciCaratteri(RSArticoli("Sezione"),"No") & VbCrLf '---INIZIO GENERAZIONE DEI TAGS---- stringa = RSArticoli("tags") s = Split(stringa, ",") FOR i=0 to UBound(s) CurTag = SostituisciCaratteri(s(i),"No") ExpTags = ExpTags & replace(CurTag,"+"," ") If i"),"Si") & VbCrLf Response.Write "-----" & VbCrLf 'Esporto i commenti SQLCommenti = " SELECT * FROM [Commenti] WHERE Commenti.IDArticolo = "& cInt(FID) &" AND Commenti.IDArticolo <> 0 " Set RSCommenti = Server.CreateObject("ADODB.Recordset") RSCommenti.Open SQLCommenti, Conn, 1, 3 If NOT RSCommenti.EOF Then Do While NOT RSCommenti.EOF Response.Write "COMMENT:" & VbCrLf Response.Write "AUTHOR: "& RSCommenti("Autore") & VbCrLf Response.Write "DATE: "& Mid(RSCommenti("Data"), 1, 4) & "/" & Mid(RSCommenti("Data"), 5, 2) & "/" & Mid(RSCommenti("Data"), 7, 2) & " " & Mid(RSCommenti("Ora"), 1, 2) & ":" & Mid(RSCommenti("Ora"), 3, 2) & ":" & Mid(RSCommenti("Ora"), 5, 2) & VbCrLf Response.Write "IP: " & RSCommenti("IP") & VbCrLf If left(RSCommenti("Link"),7) = "mailto:" then Response.Write "EMAIL: " & right(RSCommenti("Link"),len(RSCommenti("Link"))-7) & VbCrLf If left(RSCommenti("Link"),7) = "http://" then Response.Write "URL: " & RSCommenti("Link") & VbCrLf Response.Write SostituisciCaratteri(RSCommenti("Testo"),"Si") & VbCrLf Response.Write "-----" & VbCrLf RSCommenti.MoveNext Loop End If 'Fine Esporto i commenti RSArticoli.MoveNext Response.Write "--------" & VbCrLf Loop End If set RSArticoli = Nothing Conn.Close Set Conn = Nothing %>