📄 postvote.asp
字号:
<!-- #include file="setup.asp" -->
<%
id=Request("id")
if Request("postvote")="" then
error("<li>请选择,你要投票的项目!")
end if
if instr(Request.Cookies("vote"),""&Request("id")&"|")>0 then
error2("你已经投过票了,无需重复投票!")
end if
sql="select * from forum where id="&Request("id")&""
rs.Open sql,Conn,1,3
for each ho in request.form("postvote")
pollresult=split(rs("pollresult"),"|")
for i = 0 to ubound(pollresult)
if not pollresult(i)="" then
if cint(ho)=i then
pollresult(i)=pollresult(i)+1
end if
allpollresult=""&allpollresult&""&pollresult(i)&"|"
end if
next
rs("pollresult")=allpollresult
rs("lasttime")=now
rs.update
allpollresult=""
next
rs.close
Response.Cookies("vote")=""&Request.Cookies("vote")&""&Request("id")&"|"
error2("投票成功!")
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -