最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp投票系统二
时间:2022-07-02 22:44:20 编辑:袖梨 来源:一聚教程网
<%
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
%>
此文件和来判断是否己投票并进行数据处理.
相关文章
- 原神欧洛伦怎么培养 原神欧洛伦培养攻略介绍 11-22
- 炉石传说跳费大哥德卡组怎么样 炉石传说跳费大哥德卡组推荐介绍 11-22
- 蛋仔派对曙光龙女芙瑞怎么样 11-22
- 原神恰斯卡怎么养成 11-22
- 光遇11.22免费魔法有什么 11-22
- 光遇11.22大蜡烛在哪里 11-22