일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- javascript
- synology
- jQuery
- 시놀로지
- ajax
- FileSystemObject
- include
- euc-kr
- Getrows
- Injection
- 따라다니는 배너
- AC1300
- readonly
- PHP GCM
- XMLHTTP
- form
- 커널
- 무선랜카드
- replace
- jquery 레이어
- 크로스 컴파일
- lsusb
- utf-8
- ASP
- SQL Injection
- DS718+
- RTL88x2BU
- disabled
- println
- submit
- Today
- Total
아는 것이 좋은 것이다.
[ASP] 중복 조회수 처리 본문
함수 적용
' ***************************************************************************************
' 쿠키 중복 체크
' ***************************************************************************************
Function CookieDuplicateCheck(tableName, idx)
dim dupliChk
dim c_read_idx
dim i
dupliChk = false
c_read_idx = Request.Cookies("C_TABLE_NAME")("READ")
Response.Cookies("C_TABLE_NAME") = tableName
Response.Cookies("C_TABLE_NAME").Path = "/"
Response.Cookies("C_TABLE_NAME").Expires = date+1
arrRead = split(c_read_idx,",")
for i = 1 to UBound(arrRead)
if CInt(idx) = CInt(Trim(arrRead(i))) then
dupliChk = true
end if
next
if dupliChk = true then
Response.Cookies("C_TABLE_NAME")("READ") = c_read_idx
else
Response.Cookies("C_TABLE_NAME")("READ") = c_read_idx & "," & idx
end if
CookieDuplicateCheck = dupliChk
End Function
실제 소스 코드
<%
dupliChk = CookieDuplicateCheck("GA_BOARD",bseq)
IF dupliChk = false THEN
strSql="update BOARDNAME set iread=iread+1 where bseq=" & bseq
Dbcon.Execute strSql
END IF
%>
'ASP' 카테고리의 다른 글
[ASP] 파일이동, 폴더이동, 파일삭제 (0) | 2014.04.27 |
---|---|
[ASP] 클래스로 xml 생성 (0) | 2014.04.24 |
[ASP] 해당루트에 파일 존재 여부 확인 (0) | 2014.04.24 |
[ASP] fso 특정 문자를 포함한 파일 일괄 삭제 (0) | 2014.04.24 |
[ASP] 숫자열 포맷 전환 (0) | 2014.04.24 |