<% dim idx_num, page, pr_idx, ne_idx, ftcn, findf, fkeywd, b_name idx_num = Request("idx_num") page = Request("page") findf = Request("findf") ftcn = Request("ftcn") fkeywd = Request("fkeywd") sql = "select top 1 idx_num from (select A.idx_num, A.b_reference, A.b_level, A.b_position from (select idx_num, b_reference, b_level, b_position from "& board_table &" ) as A, (select idx_num, b_reference, b_level, b_position from "& board_table &" where idx_num = "& idx_num &") as B where ((A.b_reference = B.b_reference AND A.b_position < B.b_position) OR (A.b_reference > B.b_reference))) as C ORDER BY C.b_reference Asc, C.b_position Desc" Set rs = Db.execute(sql) if not rs.eof then pr_idx = rs(0) end if sql = "select top 1 A.idx_num from "& board_table &" as A, (select idx_num, b_reference, b_level, b_position from "& board_table &" where idx_num = "& idx_num &") as B where ((A.b_reference = B.b_reference AND A.b_position > B.b_position) OR (A.b_reference < B.b_reference)) ORDER BY A.b_reference Desc, A.b_position Asc" Set rs = Db.execute(sql) if not rs.eof then ne_idx = rs(0) end if sql="update "& board_table &" set b_hitcount=b_hitcount+1 where idx_num ='"& idx_num &"'" db.execute(sql) sql="select * from "& board_table &" where idx_num ='"& idx_num &"'" Set rs = db.execute(sql) b_name = rs("b_name") b_content = rs("b_content") if rs("b_html") = "T" then b_content = Replace(b_content, "<" , "<") b_content = Replace(b_content, ">" , ">") b_content = Replace(b_content, vbcrlf , "
") end if %>
<%=rs("b_title")%> <%=left(rs("b_date"), 10)%> I <%=b_name%>
File : "><%=rs("b_filename")%>
<%=b_content%>
  <% if pr_idx <> "" then %><% end if%>   <% if ne_idx <> "" then%><% end if%>