쿠키를 이용해서 중복 추천 방지하기
본문
Sub VoteComment
req_comment_idx = Request("comment_idx")
x.Init "TT_COMMENT",""
if request.cookies("vote")(req_comment_idx) = "ok" then
szMsg = "msgː♪이미 추천하셨습니다♪ː"
else
szField = "vote"
szValue = "vote + 1"
szWhere = "comment_idx="&req_comment_idx
if x.UpWhere(szField, szValue, szWhere) = false then
szMsg = "msgː♪코멘트 삭제 실패♪ː"
else
szMsg = "msgː♪추천 하였습니다.♪ː"
end if
Response.Cookies("vote").expires = #12/31/2010 00:00:00#
Response.Cookies("vote")(req_comment_idx) = "ok"
end if
Response.Write szMsg
REsponse.End
End Sub
req_comment_idx = Request("comment_idx")
x.Init "TT_COMMENT",""
if request.cookies("vote")(req_comment_idx) = "ok" then
szMsg = "msgː♪이미 추천하셨습니다♪ː"
else
szField = "vote"
szValue = "vote + 1"
szWhere = "comment_idx="&req_comment_idx
if x.UpWhere(szField, szValue, szWhere) = false then
szMsg = "msgː♪코멘트 삭제 실패♪ː"
else
szMsg = "msgː♪추천 하였습니다.♪ː"
end if
Response.Cookies("vote").expires = #12/31/2010 00:00:00#
Response.Cookies("vote")(req_comment_idx) = "ok"
end if
Response.Write szMsg
REsponse.End
End Sub
[이 게시물은 듀라님에 의해 2015-04-03 10:08:13 워드프레스에서 이동 됨]
[이 게시물은 듀라님에 의해 2015-04-03 10:27:24 Public에서 이동 됨]
[이 게시물은 듀라님에 의해 2015-04-03 10:33:53 팁과강좌에서 이동 됨]
[이 게시물은 최고관리자님에 의해 2017-06-10 14:24:30 ASP에서 이동 됨]
0
0
페이지 정보
l2j (121.♡.101.20) 작성일07-05-02 14:54 조회2,052회 댓글0건관련링크
댓글목록
등록된 댓글이 없습니다.