<%call close_Rs(con)'µðºñ´Ý±â%>
<%public sub page_setting(rs,page,total_page,total_count,page_name)
'ÀÔ·Â : rs,page,page_name
'Ãâ·Â : total_page,total_count%>
<%
rs.PageSize=10
total_count = rs.RecordCount
total_page = rs.PageCount
if request(page_name)="" then
page=1
else
page = cint(request(page_name))
end if
if page<1 then
page=1
else
if total_page = 0 then
total_page = 1
end if
if page>total_page then
page=total_page
end if
end if
'response.write page%>
<%end sub%>
<%public sub print_under_title(total_count,page,total_page)%>
<%end sub%>
<%public sub print_under_search()%>
<%end sub%>
<%public sub print_table_title()%>
<%'list_trtitle1,2,3,4%>
<%'tr_title%>
<%end sub%>
<%public sub print_tree_top(parent_no,super_no,depth,bullet,con,search_list,keyword)
'treeÇüÅ·Πȸ鿡 ÇÁ¸°Æ®ÇÑ´Ù.%>
<% dim sql,brother_no,count,record_no,depth1,wherekeyword
set rs = server.createobject("adodb.recordset")
if keyword > "" then
wherekeyword = " and "& search_list &" like '%"& keyword &"%' "
end if
sql = "select record_no,title,last_date,view_no from "& table_name &" where home_name= '"& home_name &"' and parent_no=" & parent_no & " and super_no = " & super_no & wherekeyword &" order by record_no desc,last_date desc"
' response.write " 341 sql = "& SQL
rs.open sql,con,1
brother_no = rs.RecordCount
count = 0
call page_setting(rs,page,total_page,total_count,"page")%>
<% if total_count = 0 then %>
ÀÔ·ÂµÈ Ç׸ñÀÌ ¾ø°Å³ª °Ë»öÇÏ´Â ´Ü¾î°¡ ¾ø½À´Ï´Ù.
<%'tr¹Ýº¹%>
<%
else
dim i,imax
rs.AbsolutePage = page
imax = rs.PageSize
gasang_num = total_count - rs.PageSize * (page - 1)
if page=rs.PageCount then
imax = rs.RecordCount mod imax
if imax=0 then imax = rs.PageSize
end if
for i = 1 to imax'
count = count + 1
record_no = rs("record_no")%>
<%rs.MoveNext
gasang_num= gasang_num-1
next
end if
call close_rs(rs)%>
<%'_______________________________________ ³¡ _____________________________%>
<%end sub%>
<%private function limitText(title,number)'±ÛÀÚÀÇ ¼ö¸¦ Á¦ÇÑÇÑ´Ù.
if len(title) > cint(number) then 'titleÀÇ ±ÛÀÚÀÇ ¼ö°¡ numberº¸´Ù Ŭ¶§
title = left(title,number-1)&".." :
end if
limitText=title :
end function
%>
<%public sub select_sql(con,rs,sql)
'response.write sql
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql,con,1
end sub%>
<%public sub close_con(con)
con.close
set con=nothing
end sub%>
<%public sub close_rs(rs)
rs.close
set rs=nothing
end sub%>