指引网

当前位置: 主页 > 编程开发 > ASP >

asp投票系统一

来源:网络 作者:佚名 点击: 时间:2017-08-23 21:44
[摘要] 指引教程为您提供asp投票系统一等资源,欢迎您收藏本站,我们将为您提供最新的asp投票系统一资源
<script>ec(2);</script>
<table width="620" align="center" border="0" cellpadding="1" cellspacing="1" style="background:#FB7"> <tr> <td width="464" height="27" bgcolor="#FFE7CE"> 代码如下</td> <td width="109" align="center" bgcolor="#FFE7CE" style="cursor:pointer;" onclick="doCopy('copy8291')">复制代码</td> </tr> <tr> <td height="auto" colspan="2" valign="top" bgcolor="#FFFFFF" style="padding:10px;" class="copyclass" id=copy8291>

<%
Dim voteid, Choose, nowid, i, Rs,SQL
If Not IsObject(Conn) Then ConnectionDatabase

If IsNumeric(Request("voteid")) Then
 voteid = CLng(Request("voteid"))
Else
 voteid = 0
End If
If voteid = 0 Then
 SQL = "SELECT TOP 1 * FROM NC_Vote WHERE isLock<>1 ORDER BY id DESC"
Else
 SQL = "SELECT * FROM NC_Vote WHERE id="& voteid
End If
Set Rs = Conn.Execute(SQL)
If Rs.EOF Then
 Response.Write("连接数据发生错误")
 Response.End
Else
 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""?> " & vbNewLine
 Response.Write "<vote>" & vbNewLine
 Response.Write " <system>" & vbNewLine
 Response.Write "  <voteid>"
 Response.Write Rs("id")
 Response.Write "</voteid>" & vbNewLine
 Response.Write "  <Topic><![CDATA["
 Response.Write Rs("Topic")
 Response.Write "]]></Topic>" & vbNewLine
 Response.Write "  <VoteNum>"
 Response.Write Rs("VoteNum")
 Response.Write "</VoteNum>" & vbNewLine
 Response.Write "  <votebgcolor><![CDATA["
 Response.Write Rs("bgcolor")
 Response.Write "]]></votebgcolor>" & vbNewLine
 Response.Write "  <votewordcolor><![CDATA["
 Response.Write Rs("FontColor")
 Response.Write "]]></votewordcolor>" & vbNewLine
 Response.Write "  <Topicunt>"
 Response.Write i - 1
 Response.Write "</Topicunt>" & vbNewLine
 Response.Write "  <FontSize>"
 Response.Write Rs("FontSize")
 Response.Write "</FontSize>" & vbNewLine
 Response.Write "  <VoteType>"
 Response.Write CBool(Rs("VoteType"))
 Response.Write "</VoteType>" & vbNewLine
 Response.Write " </system>" & vbNewLine

 For i = 2 To 6
  If IsNull(Rs(i)) Then Exit For
  Response.Write " <Choose>" & vbNewLine
  Response.Write "  <csco><![CDATA["
  Response.Write Rs(i)
  Response.Write "]]></csco>" & vbNewLine
  Response.Write "  <Choosenum>"
  Response.Write Rs(i 5)
  Response.Write "</Choosenum>" & vbNewLine
  Response.Write " </Choose>" & vbNewLine
 Next
End If
Rs.Close
Set Rs = Nothing
Response.Write " <prenext>" & vbNewLine
Response.Write "  <next>"
SQL = "SELECT * FROM NC_Vote WHERE id>"& nowid &" And isLock<>1"
Set Rs = Conn.Execute(SQL)
If Not (Rs.BOF And Rs.EOF) Then
 Response.Write Rs("id")
End If
Rs.Close
Set Rs = Nothing
Response.Write "</next>" & vbNewLine
Response.Write "  <pre>"
SQL = "SELECT * FROM NC_Vote WHERE id<"& nowid &" And isLock<>1 ORDER BY id DESC"
Set Rs = Conn.Execute(SQL)
If Not (Rs.BOF And Rs.EOF) Then
 Response.Write Rs("id")
End If
Rs.Close
Set Rs = Nothing
Response.Write "</pre>" & vbNewLine
Response.Write " </prenext>" & vbNewLine
Response.Write "</vote>" & vbNewLine

CloseConn
%>

</td> </tr> </table></td> </tr> </table>

------分隔线----------------------------