<%@ Language=VBScript CODEPAGE="936"%>
<!--#include file="../conn.asp"-->

<% 
Function cutStr(str,strlen)   
dim l,t,c   
l=len(str)   
t=0   
for i=1 to l    
c=Abs(Asc(Mid(str,i,1)))   
if c>255 then   
t=t+2   
else   
t=t+1  
 end if    
 if t>=strlen then  
  cutStr=left(str,i)   
  exit for   
  else   
  cutStr=str   
  end if   
  next    
  cutStr=replace(cutStr,chr(50),"")   
  end Function 
   %> 

<%
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,1,1







Response.Write "<?xml version='1.0' encoding='utf-8'?>"&chr(13)
Response.Write "<staff"&chr(13)
Response.Write "width='900'"&chr(13)
Response.Write "height='410'"&chr(13)
Response.Write "entryheight='200'"&chr(13)
Response.Write "scrollamount='20'"&chr(13)
Response.Write "staffnamecolor='0xb32d07'"&chr(13)
Response.Write "staffpositioncolor='0x000000'"&chr(13)
Response.Write ">"&chr(13)



		for i=1 to rs.recordcount
			if rs.EOF then
			exit for
			else

				Response.Write "<staffentry"&chr(13)
				Response.Write "staffthumb='"
				Response.Write ("xmlEditor/upLoadPic/")
				Response.Write rs("newsImg")
				Response.Write "'"&chr(13)
				Response.Write "staffimage='"
				Response.Write ("xmlEditor/upLoadPic/")
				Response.Write rs("newsImg")
				Response.Write "'"&chr(13)
				Response.Write "staffname='"
				Response.Write rs("postTime")
				Response.Write "'"&chr(13)
				Response.Write "staffposition='"
				Response.Write rs("newsTitle")
				Response.Write "'"&chr(13)
				Response.Write ">"&chr(13)
				Response.Write "<teaser>"
				Response.Write rs("newsContent")
				Response.Write "</teaser>"&chr(13)
				Response.Write "<stafftext>"
				Response.Write rs("newsContent")
				Response.Write "</stafftext>"&chr(13)
				Response.Write "</staffentry>"&chr(13)
				
				rs.MoveNext
			end if
		next
	rs.Close
	Set rs=nothing
	conn.Close
	Set conn=nothing
Response.Write "</staff>"&chr(13)
end if
%>