<!--#include file="conn.asp"-->
<% 
thisid=Trim(Request.QueryString("voteid"))
if thisid="" then 
	set rs=conn.execute("select top 1 * from votepro where oorc<>false order by id desc")
else
	set rs=conn.execute("select * from votepro where id="&thisid)
end if
if rs.eof then response.Write("连接数据发生错误"):response.End()
conn.execute "update votepro set votevi=votevi+1 where id="&rs("id")
for i=1 to 5
if isnull(rs("cs_"&i)) then exit for 
next

nowid=rs("id")

Response.ContentType = "text/xml"
Response.Expires = -1
Response.Write "<?xml version=""1.0"" encoding=""GB2312""?> "
Response.Write "<vote>"

Response.Write "<system>"
Response.Write "<voteid>"
Response.Write rs("id")
Response.Write "</voteid>"
Response.Write"<voteco><![CDATA["
Response.Write rs("voteco")
Response.Write "]]></voteco>"
Response.Write "<votevi>"
Response.Write rs("votevi")
Response.Write "</votevi>"
Response.Write "<votebgcolor><![CDATA["
Response.Write rs("bg_color")
Response.Write "]]></votebgcolor>"
Response.Write "<votewordcolor><![CDATA["
Response.Write rs("word_color")
Response.Write "]]></votewordcolor>"
Response.Write "<votecount>"
Response.Write i-1
Response.Write "</votecount>"
Response.Write "<word_size>"
Response.Write rs("word_size")
Response.Write "</word_size>"
Response.Write "<sorm>"
Response.Write rs("sorm")
Response.Write "</sorm>"
Response.Write "</system>"

for i=2 to 6
if isnull(rs(i)) then exit for
Response.Write "<cs>"
Response.Write"<csco><![CDATA["
Response.Write rs(i)
Response.Write "]]></csco>"
Response.Write "<csnum>"
Response.Write rs(i+5)
Response.Write "</csnum>"
Response.Write "</cs>"
next
closers
set rs=conn.execute("select * from votepro where id>"&nowid&" and oorc<>false ")
Response.Write "<prenext>"
Response.Write "<next>"
Response.Write rs("id")
Response.Write "</next>"
closers
set rs=conn.execute("select * from votepro where id<"&nowid&" and oorc<>false order by id desc")
Response.Write "<pre>"
Response.Write rs("id")
Response.Write "</pre>"
closers
Response.Write "</prenext>"
Response.Write "</vote>"
closedb
%>