'*****************************************************
'기능 이름 : 쇼 페이지
'기능 : "이전 페이지 다음 페이지"와 같은 정보 표시
'매개 변수 : sfilename ---- 링크 주소
'TotalNumber --- 총 수
'maxperpage ---- 각 페이지의 수
'showtotal ---- 총 숫자가 표시됩니까?
'showallpages- 리디렉션을위한 드롭 다운 목록이있는 모든 페이지를 표시 할 때. 일부 페이지는 사용할 수 없습니다. 그렇지 않으면 JS 오류가 발생합니다.
'strunit ---- 계산 장치
'반환 값 : "이전 페이지 다음 페이지"와 같은 정보에 대한 HTML 코드
'*****************************************************
FunctionShowPage (SfiLename, TotalNumber, MaxPerPage, Showtotal, ShowallPages, Strunit)
Dimtotalpage, Strtemp, Strurl, i
iftotalNumber = 0ormaxperPage = 0orisNull (maxperpage)
showpage = ""
종료 기능
endif
iftotalNumberModMaxPerPage = 0then
TotalPage = TotalNumber/MaxPerpage
또 다른
TotalPage = TotalNumber/MaxPerPage+1
endif
ifcurrentPage> TotalPagetHencurrentPage = TotalPage
strtemp = "<tablealign = 'center'> <tr> <td>"
ifshowtotal = truethen
strtemp = strtemp & "共 <b>"& TotalNumber & "</b>"& strunit & ""
endif
strurl = joinchar (sfilename)
ifcurrentpage <2then
strtemp = strtemp & "홈페이지 이전 페이지"
또 다른
strtemp = strtemp & "<ahref = '"& strurl & "page = 1'> home </a>"
strtemp = strtemp & "<ahref = '"& strurl & "page ="& (currentpage-1) & "'> 이전 페이지 </a>"
endif
ifcurrentPage> = TotalPagethen
strtemp = strtemp & "다음 페이지 마지막 페이지"