⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vote.asp

📁 多用户管理分权限发布、管理软件信息;  自由选择系统默认为静态HTML或动态ASP;  无限制添加下载服务器
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
Dim voteid, Choose, nowid, i, Rs
Set Rs = server.CreateObject("adodb.recordset")
voteid = CLng(Request.QueryString("voteid"))
If voteid = "" Then
	Set rs = conn.Execute("select top 1 * from NC_Vote where isLock<>1 order by id desc")
Else
	Set rs = conn.Execute("select * from NC_Vote where id="&voteid)
End If
If rs.EOF Then
	response.Write("连接数据发生错误")
	Response.End
End If
For i = 1 To 5
	If IsNull(rs("Choose_"&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"<Topic><![CDATA["
Response.Write rs("Topic")
Response.Write "]]></Topic>"
Response.Write "<VoteNum>"
Response.Write rs("VoteNum")
Response.Write "</VoteNum>"
Response.Write "<votebgcolor><![CDATA["
Response.Write rs("bgcolor")
Response.Write "]]></votebgcolor>"
Response.Write "<votewordcolor><![CDATA["
Response.Write rs("FontColor")
Response.Write "]]></votewordcolor>"
Response.Write "<Topicunt>"
Response.Write i -1
Response.Write "</Topicunt>"
Response.Write "<FontSize>"
Response.Write rs("FontSize")
Response.Write "</FontSize>"
Response.Write "<VoteType>"
Response.Write CBool(rs("VoteType"))
Response.Write "</VoteType>"
Response.Write "</system>"

For i = 2 To 6
	If IsNull(rs(i)) Then Exit For
	Response.Write "<Choose>"
	Response.Write"<csco><![CDATA["
	Response.Write rs(i)
	Response.Write "]]></csco>"
	Response.Write "<Choosenum>"
	Response.Write rs(i + 5)
	Response.Write "</Choosenum>"
	Response.Write "</Choose>"
Next
rs.Close
Set rs = Nothing
Set rs = conn.Execute("select * from NC_Vote where id>"&nowid&" and isLock<>1 ")
Response.Write "<prenext>"
Response.Write "<next>"
Response.Write rs("id")
Response.Write "</next>"
rs.Close
Set rs = Nothing
Set rs = conn.Execute("select * from NC_Vote where id<"&nowid&" and isLock<>1 order by id desc")
Response.Write "<pre>"
Response.Write rs("id")
Response.Write "</pre>"
rs.Close
Set rs = Nothing
Response.Write "</prenext>"
Response.Write "</vote>"
conn.Close
Set conn = Nothing
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -