<% mTop=5 %> <% Set objConn = Server.CreateObject("ADODB.Connection") objConn.Open strConnect mSearchFlag = Request.QueryString("search") if mSearchFlag = 1 then mSearchType = Request.Form("SearchType") mSearchWord = Request.Form("SearchWord") mSearchType = "4" if mSearchType = "" then %> <% Response.end else if mSearchType = "1" or mSearchType = "2" or mSearchType = "3" or mSearchType = "4" then if mSearchWord = "" then %> <% Response.end end if end if mSql = "select * from tbl_kcsBoard where " mSql = mSql & " fText like '%" & mSearchWord & "%' or fTitle like '%" & mSearchWord & "%' " mSql = mSql & " order by fParent desc, fReplyNo " end if else mSql = "select * from tbl_kcsBoard order by fParent desc, fReplyNo " end if Set oRs = Server.CreateObject("ADODB.RecordSet") oRs.PageSize = mMaxNum oRs.Open mSql,objConn,1 if Not oRs.EOF then mRecordCount = oRs.RecordCount mPageCount = oRs.PageCount mAbsPage = Request.QueryString("pg") if mAbsPage = "" then oRs.AbsolutePage = 1 mAbsPage = 1 else oRs.AbsolutePage = mAbsPage end if mRealPage = cint(mPageCount)-cint(mAbsPage) +1 end if %>
  Total Lists:<%=mRecordCount%>, Page:<%=mRealPage%>/<%=mPageCount%>
<% if Not oRs.EOF then iRc = 1 do until oRs.EOF or cint(iRc) > cint(oRs.PageSize) mTextNo = oRs("fTextNo") mParent = oRs("fParent") mReplyNo = oRs("fReplyNo") mDate = formatdatetime(oRs("fDate"),2) mAuthor = oRs("fAuthor") mEmail = oRs("fEmail") mListTitle = oRs("fTitle") mType = oRs("fType") mRead = oRs("fRead") mText = mid(oRs("fText"),1,200) mTextLink = "" 'title='" & mText & "'>" if len(mReplyNo) > 0 then mStrString = "" for i=1 to len(mReplyNo)/2 mStrString = mStrString & "  " Next mListTitle = mStrString & "" & mTextLink & mListTitle & "" else mListTitle = mTextLink & mListTitle & "" end if %> <% oRs.MoveNext iRc = cint(iRc) + 1 mTextLink = "" mListTitle = "" Loop else %> <%end if%>
No. Title Name Date Read
<%=mTextNo%> <%=mListTitle%> <%=mAuthor%> <%=mDate%> <%=mRead%>
No data.

<% if cint(mPageCount) > 0 then mModLast = cint(mPageCount) mod 10 '10°³¾¿ ÆäÀÌÁö¸¦ ³ª´©°í ³ª¸ÓÁö °¹¼ö mModFirst = int(cint(mRealPage)/10)*10 ' mModCheck = cint(mRealPage) mod 10 if mModCheck > mModLast then mStartPage = cint(mModFirst)+cint(mModLast) + 10 else mStartPage = cint(mModFirst)+cint(mModLast) end if if cint(mStartPage) < cint(mPageCount) then mSetPage1 = cint(mPageCount)-cint(mStartPage)-1 %> [Previous 10] <% end if for i = cint(mStartPage) to cint(mStartPage)-9 step -1 if i <= 0 then exit for end if mSetPage = cint(mPageCount)-cint(i)+1 if cint(mSetPage) = cint(mAbsPage) then mNtPage = cint(mSetPage)-1 mPrPage = cint(mSetPage)+1 Response.Write "[" & i & "]" else %> <%=i%> <% end if Next if i > 0 then mSetPage = cint(mPageCount)-cint(i)+1 %> [Next 10] <% end if end if %>
<%if cint(mNtPage) > 0 then%> Next <%end if%> <%if mPermWrite <= mStatus then%> Write <%end if%> <%if cint(mPrPage) <= cint(mPageCount) then%> Previous <%end if%>