<% '**************************************************************** '* 함수설명 : 전체 페이지수 '* 변수설명 : intTotalCount=총 게시물수, intPageSize=페이지 사이즈 '**************************************************************** Function getTotalPage(intTotalCount, intPageSize) If (intTotalCount Mod intPageSize) = 0 Then getTotalPage = intTotalCount \ intPageSize Else getTotalPage = intTotalCount \ intPageSize + 1 End If End Function '**************************************************************** '* 함수설명 : 페이지 게시물 번호 '* 변수설명 : intTotalCount=총 게시물수, intPageSize=페이지 사이즈, intPage=페이지번호 '**************************************************************** Function getPageStartNum(intTotalCount, intPageSize, intPage) If intPage = 1 Then getPageStartNum = intTotalCount Else getPageStartNum = intTotalCount - intPageSize*(intPage-1) End If End Function '**************************************************************** '* 함수설명 : 페이지 URL '* 변수설명 : strPageUrl=페이징 URL, intPage=페이지번호 '**************************************************************** Function setPageURL(strPageUrl, intPage) setPageURL = Replace(strPageUrl, "[[page]]", intPage) End Function '**************************************************************** '* 함수설명 : 페이징 함수 '* 변수설명 : strPageType=페이징 스타일, strPageUrl=페이징 URL '* intPage=현재페이지, intTotalPage=총페이지수, intPageList=출력번호수 '**************************************************************** Function pagingPrint(strPageType, strPageUrl, intPage, intTotalPage, intPageList, intTotalCount) Dim strPaging, intStartPage, intCurrPage intPage = Int(intPage) If intPage > intPageList Then If (intPage mod intPageList) <> 0 Then intStartPage = (intPage\intPageList)*intPageList+1 Else intStartPage = intPage-intPageList+1 End If Else intStartPage = 1 End If strPaging = "" If intTotalCount > 0 Then strPaging = strPaging &"
" strPaging = strPaging &"" If intPage > intPageList Then If (intPage Mod intPageList) = 0 Then intCurrPage = (((intPage \ intPageList) - 1) * intPageList) - intPageList + 1 Else intCurrPage = (((intPage \ intPageList) - 1) * intPageList) + 1 End If strPaging = strPaging &"" Else strPaging = strPaging &"" End If If intTotalPage > intPageList Then For intCurrPage = intStartPage To intStartPage+intPageList-1 If intCurrPage > intTotalPage Then Exit for ElseIf intCurrPage = intPage Then strPaging = strPaging &""& intCurrPage &"" Else strPaging = strPaging &""& intCurrPage &"" End If Next Else For intCurrPage = intStartPage To intTotalPage If intCurrPage = intPage Then strPaging = strPaging &""& intCurrPage &"" Else strPaging = strPaging &""& intCurrPage &"" End If Next End If If intPage < (((intTotalPage \ intPageList) * intPageList) + 1) Then If (intPage Mod intPageList) = 0 Then intCurrPage = ((intPage \ intPageList) * intPageList) + 1 Else intCurrPage = (((intPage \ intPageList) + 1) * intPageList) + 1 End If strPaging = strPaging &"" Else strPaging = strPaging &"" End If strPaging = strPaging &"" strPaging = strPaging &"
" End If pagingPrint = strPaging End Function '**************************************************************** '* 함수설명 : 페이징 함수 CUG '* 변수설명 : strPageType=페이징 스타일, strPageUrl=페이징 URL '* intPage=현재페이지, intTotalPage=총페이지수, intPageList=출력번호수 '**************************************************************** Function pagingPrintCUG(strPageType, strPageUrl, intPage, intTotalPage, intPageList, intTotalCount) Dim strPaging, intStartPage, intCurrPage intPage = Int(intPage) If intPage > intPageList Then If (intPage mod intPageList) <> 0 Then intStartPage = (intPage\intPageList)*intPageList+1 Else intStartPage = intPage-intPageList+1 End If Else intStartPage = 1 End If strPaging = "" If intTotalCount > 0 Then strPaging = strPaging &"
" strPaging = strPaging &"" If intPage > intPageList Then If (intPage Mod intPageList) = 0 Then intCurrPage = (((intPage \ intPageList) - 1) * intPageList) - intPageList + 1 Else intCurrPage = (((intPage \ intPageList) - 1) * intPageList) + 1 End If strPaging = strPaging &"" Else strPaging = strPaging &"" End If If intTotalPage > intPageList Then For intCurrPage = intStartPage To intStartPage+intPageList-1 If intCurrPage > intTotalPage Then Exit for ElseIf intCurrPage = intPage Then strPaging = strPaging &""& intCurrPage &"" Else strPaging = strPaging &""& intCurrPage &"" End If Next Else For intCurrPage = intStartPage To intTotalPage If intCurrPage = intPage Then strPaging = strPaging &""& intCurrPage &"" Else strPaging = strPaging &""& intCurrPage &"" End If Next End If If intPage < (((intTotalPage \ intPageList) * intPageList) + 1) Then If (intPage Mod intPageList) = 0 Then intCurrPage = ((intPage \ intPageList) * intPageList) + 1 Else intCurrPage = (((intPage \ intPageList) + 1) * intPageList) + 1 End If strPaging = strPaging &"" Else strPaging = strPaging &"" End If strPaging = strPaging &"" strPaging = strPaging &"
" End If pagingPrintCUG = strPaging End Function %>