<%if Session("UID")="" then%> <%else%> <% table=Request("table") Set DbCon=Server.CreateObject("ADODB.Connection") DbCon.Open("DSN=hanwed;UID=sa;PWD=") sql1="SELECT Count(*) as totalcount FROM "&table Set r1=DbCon.Execute(sql1) %> <%if r1("totalcount")=0 then%>
<%if table="maneger1" then%>ÇÑÁ¾Èñ ¿þµù¸Å´ÏÀú »ó´ãÄÚ³Ê <%elseif table="maneger2" then%>Á¤µÎ¿Ï ¿þµù¸Å´ÏÀú »ó´ãÄÚ³Ê <%elseif table="maneger3" then%>¾ÈÇý¼± ¿þµù¸Å´ÏÀú »ó´ãÄÚ³Ê <%elseif table="maneger4" then%>¾çÇö¹Ì ¿þµù¸Å´ÏÀú »ó´ãÄÚ³Ê <%elseif table="maneger5" then%>¿þµù¸Å´ÏÀú5 <%elseif table="maneger6" then%>¿þµù¸Å´ÏÀú6 <%end if%> ¿¡ µî·ÏµÈ ³»¿ëÀÌ ¾ø½À´Ï´Ù
ÀÛ¼º¹öưÀ» ´©¸£½Ã¸é ±ÛÀ» ¾²½Ç ¼ö ÀÖ½À´Ï´Ù

<% else Set DbCon=Server.CreateObject("ADODB.Connection") DbCon.Open("DSN=hanwed;UID=sa;PWD=") if Request("page")="" then curpage=1 page=1 else curpage=cint(Request("page")) end if if Request("startpage")="" then startpage=1 else startpage=cint(Request("startpage")) end if ipp=10 ten=10 Set DbRec=Server.CreateObject("ADODB.Recordset") DbRec.CursorType=1 DbRec.Open "select * from "&table&" order by ref asc, step desc", DbCon DbRec.PageSize = 5 DbRec.MoveLast postcount=DbRec.Recordcount totpage=int(postcount/ipp) totpage=cint(totpage) if (totpage * ipp) = postcount then totpage=totpage For a=1 to (curpage-1) * ipp DbRec.MovePrevious Next elseif (totpage * ipp) <> postcount then totpage = totpage + 1 For a=1 to (curpage-1) * ipp DbRec.MovePrevious Next end if 'pg=Request("page") 'if isEmpty(pg) then ' pg = 1 'else ' pg = pg + 0 'end if 'if pg<1 then ' pg = 1 'end if Set DbCon=Server.CreateObject("ADODB.Connection") DbCon.Open("DSN=hanwed;UID=sa;PWD=") sql="SELECT Count(*) as totalcount FROM "&table Set rs=DbCon.Execute(sql) lastpg=1+Int((rs("totalcount")-1)/ipp) if pg > lastpg then pg=lastpg end if nextpg=curpage+1 prevpg=curpage-1 endpg=curpage*ipp startpg=endpg-ipp+1 y=year(now) m=month(now) if Len(m)=1 then m="0"&m end if D=DAY(NOW) if Len(d)=1 then d="0"&d end if todaydate=y&"."&m&"."&d t_sql="select count(*) as t_day from "&table&" where regdate='"&todaydate&"'" set t_rs=dbcon.execute(t_sql) t_day=t_rs("t_day") %> <% RowCount = 0 for i=1 to ipp if totpage=curpage then value=postcount Mod ipp if i>value and value<>0 then Exit For end if end if if curpage=1 then p=0 else p=curpage-1 end if no=i+10*p %> <%if dbrec("ref") mod 2 =0 then%> <%elseif dbrec("ref") mod 2 = 1 then%> <%end if%> <% RowCount = RowCount + 1 DbRec.MovePrevious Next %>
bbs_list.gif (551 bytes)
¹øÈ£ Á¦ ¸ñ Á¶È¸ ³¯Â¥ ±Û¾´ÀÌ
<%=no%> <% if dbrec("re_level") > 0 then %> <% wid = 5 * dbrec("re_level") %> <% end if %>&startpage=<%=startpage%>&page=<%=curpage%>"><%=dbrec("subject")%> <%=dbrec("visited")%> <%=dbrec("regdate")%> <%=dbrec("writer")%>
<%=no%> <% if dbrec("re_level") > 0 then %> <% wid = 5 * dbrec("re_level") %> <% end if %>&startpage=<%=startpage%>&page=<%=curpage%>"><%=dbrec("subject")%> <%=dbrec("visited")%> <%=dbrec("regdate")%> <%=dbrec("writer")%>
<%if prevpg<>0 then%> <%else%><%end if%> <%if nextpg <= totpage then%> <%else%><%end if%>
Á¦¸ñ ³»¿ë       
<%if totpage>ten then%> <%if startpage=1 then%> ¢¸ <%else%> ¢¸ <%end if%> <% For a=startpage to startpage+ten-1 if a>totpage then exit for else if a=curpage then %> <%=a%> <%else%> <%=a%> <%End if End If Next if ((startpage\ten)=(totpage\ten)) then%> ¢º <%else%> ¢º <%end if%> <%else%> ¢¸ <% For a=startpage to totpage if a=curpage then%> <%=a%> <%else%> <%=a%> <%end if Next%> ¢º <%End If%>
<% DbCon.Close Set r=nothing Set DbRec=nothing Set DbCon=nothing %> <%end if%> <%end if%>