<% ipp = 10 if Request("GoTopage")="" then curpage=1 else curpage = cint(Request("GoTopage")) end if %> <% sql = "select count(numm)from JILMOON" set rs=Dbcon.Execute(sql) postcount = rs(0) Set DbRec=Server.CreateObject("ADODB.RecordSet") DbRec.Open "SELECT * FROM JILMOON order by ref desc, step asc", Dbcon totpage = postcount \ ipp if (totpage * ipp) <> postcount Then totpage = totpage + 1 For a = 1 To (curpage - 1) * ipp DbRec.MoveNext Next 'totalrcount = DbRec.RecordCount 'a = totalrcount 'b = page-1 'c = b*10 'vnum = a-c str_today = Left(Now(),10) %> mh01 질문과 답변

HOME

회사소개

제품소개

솔루션

구축사례

지원사항

유익한정보

다운로드

질문과답변

협력업체

 
 
질문과 답변
질문과 답변
      
<% if DbRec.bof or DbRec.eof then ' 만일 레코드가 하나도 없다면%> <% i=i+1 j=j-1 DbRec.movenext loop end if %>

제목

글쓴이

날자

조회

등록된 글이 없습니다. <% else totalpage = DbRec.pagecount 'DbRec.absolutepage = page 데이타가 있다면 %> <% i= 1 j= vnum do until DbRec.eof or i>DbRec.pagesize name = (DbRec("name")) mail = DbRec("mail") 'wdate = left(DbRec("writeday"),10) title = replace(DbRec("title"),"'","'") If Len(name) > 5 Then name = Mid(name,1,6) & ".." End If If Len(title) > 26 Then title = Mid(title,1,18) & "..." End If %>
<% if Dbrec("re_level") > 0 then %> <% wid = 4 * Dbrec("re_level") %> <% end if %> <% If Left(DbRec("writeday"),10) = str_today Then 'if DateDiff("h",DbRec("writeday"),Now()) < 24 then %> ../images/new.gif <% end if %> <%=title %>
<%=DbRec("name")%>
<%=left(DbRec("writeday"),10)%>
<%=DbRec("readnum")%>
<% mychoice = 10 total_block = int(totpage / mychoice) if int(totpage) mod mychoice = 0 then total_block=total_block-1 end if if request("block") <> "" then nowblock = request("block") else nowblock=0 end if 'int함수는 소수점이하버림.. 'fix 함수는 소수점이하 올림.. %>

페이지 <% if totpage > 0 then %> <% if Cint(nowblock) >0 then %> <% curpage=(int(nowblock*mychoice) - (mychoice-1)) %> [이전 <%=mychoice%>개] <% end if %> <% if Cint(total_block) <> Cint(nowblock) then %> | <% for Gopage = 1 to mychoice %> <% if CurPage <> Gopage then %> <% end if %> <%=(int(nowblock*mychoice) + Gopage)%> | <% next %> <% else %> | <% for Gopage = 1 to (totpage mod mychoice) %> <% if CurPage <> Gopage then %> <% end if %> <%=(int(nowblock*mychoice) + Gopage)%> | <% next %> <% end if %> <% curpage=(int(nowblock*mychoice) + Gopage) %> <% if (Cint(total_block) > 0) and (Cint(nowblock) < Cint(total_block)) then %> [다음 <%=mychoice%>개]

<% end if %> <% end if %>

<% if Cint(curpage) < Cint(totpage) then nextpage = curpage+1 else nextpage = totpage end if if curpage > 1 then prevpage = Cint(curpage)-1 else prevpage = 1 end if %> <% if Cint(curpage) <> 1 then %> <% end if %> <% if Cint(curpage) <> Cint(totpage) then %> <% end if %>
<% if Cint(curpage) <> Cint(totpage) then %> <% end if %>

글찾기
<% '사용한 개체들을 모두 반납한다 DbRec.Close Dbcon.Close Set DbRec = Nothing Set Dbcon = Nothing %>






 
 
Copyright [CallNet Korea Co., Ltd].All rights reserved