📄 votes.asp
字号:
<!-- #include file="conn.asp"-->
<%
on error resume next
dim id,rs,v,chk,vv,vvv
id=request.form("id")
v=request.form("v")
chk=request.form("chk")
idd=request.form("idd")
if session(idd)=idd then
response.write "<script>alert('您已经投过票了,请不要重复投票');history.back();</script>"
response.end
end if
if id<>"" and v<>"" and idd<>"" then
select case chk
case "1" '单选
conn.execute("update V_vote set vcount=vcount+1 where id=cint('"&v&"')")
case "2" '多选
vvv=replace(v," ","")
vv=split(vvv,",")
for i= 0 to ubound(vv)
conn.execute("update V_vote set vcount=vcount+1 where id=cint('"&vv(i)&"')")
next
end select
session(idd)=idd
response.write "<script>alert('投票成功');history.back();</script>"
response.end
else
response.write "<script>alert('投票选项不能为空');history.back();</script>"
response.end
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -