<%@ Language=VBScript CODEPAGE="936"%>
<!--#include file="../conn.asp"-->
<%
typeID = Request("typeID")
if typeID <> "" then
set rs=server.CreateObject("ADODB.RecordSet")
rs.Source="select * from xmlNewsList n,xmlNewsType t where n.typeID = t.typeID and n.typeID="&typeID&" order by n.newsCount asc,n.flowNo desc"
rs.Open rs.Source,conn,3,1

Response.Write "<?xml version='1.0' encoding='GB2312'?>"&chr(13)
Response.Write "<newsList>"&chr(13)

		for i=1 to rs.recordcount
			if rs.EOF then
			exit for
			else
			
				Response.Write "<news>" & chr(13)
			
				Response.Write "<date>"
				Response.Write rs("postTime")
				Response.Write "</date>" & chr(13)
	
				Response.Write "<title>"
				Response.Write rs("newsTitle")
				Response.Write "</title>" & chr(13)
				
				
				if typeID = 1 then
				
				Response.Write "<topic>"

				Response.Write "<![CDATA["
					if len(rs("newsContent"))>153 then
                    Response.Write left(rs("newsContent"),150)+"..." 
                    else
                    Response.Write rs("newsContent")
                	end if
				Response.Write "]]"& chr(62)
				Response.Write "</topic>" & chr(13)
				
				else
				
				Response.Write "<topic>"

				Response.Write "<![CDATA["
					if len(rs("newsContent"))>353 then
                    Response.Write left(rs("newsContent"),350)+"..." 
                    else
                    Response.Write rs("newsContent")
                	end if
				Response.Write "]]"& chr(62)
				Response.Write "</topic>" & chr(13)
				
				end if
				
				Response.Write "<description>"
				Response.Write "<![CDATA["
                Response.Write replace(rs("newsContent"),"","")
				Response.Write "]]"& chr(62)
				Response.Write "</description>" & chr(13)
				
				Response.Write "<source>"
				Response.Write ("xmlEditor/upLoadPic/")
				Response.Write rs("newsImg")
				Response.Write "</source>" & chr(13)

				Response.Write "<url>"
				Response.Write rs("url")
				Response.Write "</url>" & chr(13)
	
				Response.Write "</news>" & chr(13)
				
				rs.MoveNext
			end if
		next
	rs.Close
	Set rs=nothing
	conn.Close
	Set conn=nothing
	
Response.Write "</newsList>"
end if
%>