<!--#Include File="include/k3_parameter.asp"-->
<!--#Include File="include/cms_parameter.asp"-->
<!--#Include File="include/cms_connection.asp"-->
<!--#Include File="include/sitestats.asp"-->

<%
Response.ContentType = "text/xml"

'Last 10 Reports (K3 Reports: reporty_typ_id = 1)
query = "SELECT TOP 10 report_id, datum, visum, titel, abstract, bild_1 " & _
	"FROM tbl_report AS list " & _
	"WHERE reporttyp_id = 1 AND status = 1 " & _
	"ORDER BY ordnung "
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open query, conn, 3, 3
	
response.Write("" & _
	"<?xml version=""1.0"" encoding=""ISO-8859-1"" ?>" & vbcrlf & _
	"<!--K3 News for free: http://www.k3zh.ch/rss.xml-->" & vbcrlf & _
	"<!--generated with Deimos Web CMS / deimos.ch-->" & vbcrlf & _
	"<rss version=""2.0"">" & vbcrlf & _
	"<channel>" & vbcrlf & _
	"<title>Reports K3 Project Space</title>" & vbcrlf & _
	"<link>http://www.k3zh.ch</link>" & vbcrlf & _
	"<description>K3 Project Space, Maag Areal, Hardstrasse 219, CH 8005 Zürich</description>" & vbcrlf & _
	"<language>en-en</language>" & vbcrlf & _
	"<copyright>2001-" & year(date) & " K3/deimos.ch</copyright>" & vbcrlf & _
	"<pubDate>" & day(date) & "." & month(date) & "." & year(date) & "</pubDate>" & vbcrlf & _
	"<image>" & vbcrlf & _
	"<url>http://www.k3zh.ch/pics/logo_k3zh_rss.gif</url>" & vbcrlf & _
	"<title>Reports K3 Project Space</title>" & vbcrlf & _
	"<link>http://www.k3zh.ch/</link>" & vbcrlf & _
	"<width>70</width>" & vbcrlf & _
	"<height>65</height>" & vbcrlf & _
	"</image>" & vbcrlf )


' News
do while not rs.EOF
				
	title = Server.HTMLEncode(rs.Fields("titel"))
	link = Server.HTMLEncode("http://www.k3zh.ch/home/k3reports.asp?report_id=" & rs.Fields("report_id"))
	
	description = ""
	if rs.Fields("bild_1") & "" <> "" and lcase(right(rs.Fields("bild_1") & "", 3)) <> "gif" then
		description = description & "<a href=""http://www.k3zh.ch/home/k3reports.asp?report_id=" & rs.Fields("report_id") & """><img src=""http://www.k3zh.ch/download/report_preview/"& rs.Fields("bild_1") & """ align=""right"" border=""0"" hspace=""3"" vspace=""3""></a>"
	end if
	if rs.Fields("abstract") & "" <> "" then
		description = description & rs.Fields("abstract")
	end if
	
	author = Server.HTMLEncode("K3/"&rs.Fields("visum"))
	pubDate = day(rs.Fields("datum")) & "." & month(rs.Fields("datum")) & "." & year(rs.Fields("datum"))
	
	response.Write("" & _
		"<item>" & vbcrlf & _
		"<guid>" & link & "</guid>" & vbcrlf & _
		"<title>" & title & "</title>" & vbcrlf & _
		"<link>" & link & "</link>" & vbcrlf & _
		"<description>" & Server.HTMLEncode(description) & "</description>" & vbcrlf & _
		"<author>" & author & "</author>" & vbcrlf & _
		"<pubDate>" & pubDate & "</pubDate>" & vbcrlf & _
		"</item>" & vbcrlf )
	
	rs.MoveNext
		
loop

response.Write("</channel>" & vbcrlf)
response.Write("</rss>" & vbcrlf)

conn.close
set conn = nothing
%>