指引网

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

asp投票系统二

来源:网络 作者:佚名 点击: 时间:2017-08-23 21:44
[摘要] 指引教程为您提供asp投票系统二等资源,欢迎您收藏本站,我们将为您提供最新的asp投票系统二资源
<script>ec(2);</script>

<%
Dim voteid, MyChoose, i, Rs, SQL
If Not IsObject(Conn) Then ConnectionDatabase
voteid = CLng(Request("voteid"))
If Request.Cookies("vote_"&voteid) = "newaspvote_" &voteid Then
 Response.Write("&back=已经参与过投票,谢谢")
 Response.End
Else
 Response.Cookies("vote_"&voteid) = "newaspvote_" &voteid
 Response.Cookies("vote_"&voteid).expires = Date 3650
 Response.Cookies("vote_"&voteid).domain = Request.ServerVariables("SERVER_NAME")
 MyChoose = Split(Request("myChoose"), ",", -1, 1)
 Set Rs = server.CreateObject("adodb.recordset")
 SQL = "SELECT * FROM NC_Vote WHERE id = " &voteid
 Rs.Open SQL, Conn, 1, 3
 If Not (Rs.BOF And Rs.EOF) Then
  For i = 1 To 5
   If MyChoose(i -1) = "true" Then
    Rs("ChooseNum_"&i&"") = Rs("ChooseNum_"&i&"") 1
   End If
  Next
  Rs.update
  For i = 1 To 5
   If MyChoose(i -1) = "true" Then
    Conn.Execute ("UPDATE NC_Vote SET VoteNum=VoteNum 1 WHERE id=" &Rs("id"))
   End If
  Next
 End If
 Rs.Close
 Set Rs = Nothing
 Response.Write("&back=投票已经送达,谢谢参与")
End If
CloseConn
%>

此文件和来判断是否己投票并进行数据处理.

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

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