valign="middle">
<% if session("login")<>"" then %> "> <% =request("msg") %> <% else %> "> <% if request("msg")<>"" then response.write "
" & request("msg") & "" end if %> <% end if %>
<% name="gosamo" sqltc="Select * From boardlist where alias='gosamo'" Set rstc=DbCon.Execute(sqltc) if not rstc.eof then board=rstc("id") boardname=rstc("boardname") openpublic=rstc("openpublic") writepublic=rstc("writepublic") else msg="보드가 존재하지 않습니다." end if rstc.close set rstc=nothing pc=10 rc=5 ' number of lines setsize = pc pgsize = rc if Request("page")="" then page=1 startpage=1 else page=cint(Request("page")) startpage=int(page/setsize) if startpage=(page/setsize) then startpage=page-setsize + 1 else startpage=int(page/setsize)*setsize + 1 end if end if 'dim tn,pgcount sqltc="Select Count(*) as tn From board where boardname=" & board Set rstc=DbCon.Execute(sqltc) tn=rstc("tn") rstc.close set rstc=nothing pgcount=int(tn/pgsize) If pgcount*pgsize <> tn Then pgcount=pgcount+1 End if Set DbRec=Server.CreateObject("ADODB.Recordset") DbRec.CursorType=1 DbCon.Execute("set rowcount "&pgsize*page&"") listsql= "Select * from board where boardname=" & board & " order by id DESC" DbRec.Open listsql, DbCon DbCon.Execute("set rowcount 0") if not DbRec.eof then nextpg = Cint(page)+1 prevpg = Cint(page)-1 n = tn - (page-1) * rc else tn=0 pgcount=0 end if %>

<% =boardname %>

Total :<%=tn%> Item Page:<%=page&"/"&pgcount%>

<% if tn > 0 then DbRec.Move pgsize*(page-1) For i = 1 to pgsize if DbRec.EOF then exit for end if if (n Mod 2) <> 0 then b_color="Black" else b_color="Blacksmoke" end if if bgc="#FFFFCC" then bgc="#FFFF66" else bgc="#FFFFCC" end if %> <% n=n-1 DbRec.MoveNext Next end if %>

날짜

글쓴이 ID

제목

댓글수

조회

width="150"><%=dbrec("inputdate")%> width="100"><% sql="Select * from users where id=" & dbrec("writer") set resultc=dbcon.execute(sql) if not resultc.eof then response.write resultc("userid") else response.write " " end if resultc.close set resultc=nothing %> > <% if openpublic then %> &board=<%=board %>&name=<%=name %>&page=<%=page%>&langinfo=<%=request("langinfo") %>" target="_top"><%=dbrec("subjecthead")%> <% else if session("login")="ok" then %> &board=<%=board %>&name=<%=name %>&page=<%=page%>&langinfo=<%=request("langinfo") %>" target="_top"><%=dbrec("subjecthead")%> <% else %> <%=dbrec("subjecthead")%> <% end if end if %> <% sql="Select count(id) as adnum from boardsub where boardname=" & board & " and boardnum=" & dbrec("id") set rssub=dbcon.execute(sql) if not isnull(rssub("adnum")) then response.write rssub("adnum") else response.write "0" end if rssub.close set rssub=nothing %> <%=dbrec("readnum")%>

<% response.write "Direct : " if startpage=1 then Response.Write "[ 이전 "&setsize&"Item ]" elseif startpage > setsize then Response.Write "[ 이전 "&setsize&"Item ]" end if for i=startpage To setsize+startpage -1 if i > pgcount then exit for end if if i=page then Response.Write ""&i&" " else Response.Write ""&i&" " end if Next if pgcount < setsize then response.write "[ 다음 "&setsize&"Item ]" elseif i>pgcount then response.write "[ 다음 "&setsize&"Item ]" else Response.Write "[ 다음 "&setsize&"Item]" end if %>

Total :<%=tn%> Item Page:<%=page&"/"&pgcount%>

<% if page=1 then response.write "[ 맨앞 | " else response.write "[ 맨앞 | " response.write "이 전 | " end if if nextpg > pgcount then response.write "다음 ] " else response.write "다음 | " response.write "맨뒤 ] " end if %>
<% if writepublic and session("login")="ok" then%> &board=<%=board %>" target="_self" title="글쓰기">글쓰기 <% end if 'else %>

<% dbcon.close set dbcon=nothing set dbrec=nothing %>