votexml.asp
来自「一个FLASH投票源代码,支持多种定义,并附有后台管理」· ASP 代码 · 共 72 行
ASP
72 行
<!--#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 "</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
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?