ASP里如何修改限制一天的投票次数,或一个IP只能投一次。 30
<%Setconn=Server.CreateObject("ADODB.Connection")conn.openConnStrIFRequest.Form("IsSu...
<%
Set conn=Server.CreateObject("ADODB.Connection")
conn.open ConnStr
IF Request.Form("IsSub")="YES" THEN
SS=Request.Form("SS")
Set rs=conn.execute("Select Limit From Gq_Jzdata Where ID="&SS)
Limit=Cint(rs(0))
rs.close
No_Ok=False
IF Limit=2 THEN
IF Request.Cookies("cycoo_No_"&SS)="DONE" THEN
No_Ok=True
ELSE
Response.Cookies("cycoo_No_"&SS) = "DONE"
Response.Cookies("cycoo_No_"&SS).Expires = date()+1 '设置cookie的过期日
END IF
END IF
IF No_Ok=True THEN
Response.write "<script>alert('谢谢你对的支持\n\n请明天在来投票!');javascript:window.close()</script>"
ELSE
FOR each id IN Request.Form("rc")
conn.execute "Update Gq_Jzdata Set hits=hits+1 where ulock<>0 and id="&id
NEXT
rs.close
set rs=nothing
Response.write "<script>alert('谢谢的支持!');javascript:window.close()</script>"
END IF
Response.write "<Script language=JavaScript>window.open('Cycoo_VoteView.asp?ID="&SS&"','','width=420,height=350,scrollbars=yes');window.close();</Script>"
END IF
call CloseConn()
%>
cookie过期日那里,如何修改,可以限制一个IP每天只能投十票。
如果能修改成一个IP只能投一票 防刷票器一IP投无数票,那就太感谢了。
求高手解答!
session验证如何加。求解 展开
Set conn=Server.CreateObject("ADODB.Connection")
conn.open ConnStr
IF Request.Form("IsSub")="YES" THEN
SS=Request.Form("SS")
Set rs=conn.execute("Select Limit From Gq_Jzdata Where ID="&SS)
Limit=Cint(rs(0))
rs.close
No_Ok=False
IF Limit=2 THEN
IF Request.Cookies("cycoo_No_"&SS)="DONE" THEN
No_Ok=True
ELSE
Response.Cookies("cycoo_No_"&SS) = "DONE"
Response.Cookies("cycoo_No_"&SS).Expires = date()+1 '设置cookie的过期日
END IF
END IF
IF No_Ok=True THEN
Response.write "<script>alert('谢谢你对的支持\n\n请明天在来投票!');javascript:window.close()</script>"
ELSE
FOR each id IN Request.Form("rc")
conn.execute "Update Gq_Jzdata Set hits=hits+1 where ulock<>0 and id="&id
NEXT
rs.close
set rs=nothing
Response.write "<script>alert('谢谢的支持!');javascript:window.close()</script>"
END IF
Response.write "<Script language=JavaScript>window.open('Cycoo_VoteView.asp?ID="&SS&"','','width=420,height=350,scrollbars=yes');window.close();</Script>"
END IF
call CloseConn()
%>
cookie过期日那里,如何修改,可以限制一个IP每天只能投十票。
如果能修改成一个IP只能投一票 防刷票器一IP投无数票,那就太感谢了。
求高手解答!
session验证如何加。求解 展开
2个回答
2010-08-08
展开全部
session验证
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询