<% Sub SubMain(ByRef objQuery) Call SubContent(objQuery) End Sub Sub SubContent(ByRef objQuery) Dim BBS_Category BBS_Category = Trim(Request("BBS_Category")) Dim sLeftTitleImg, sTitleImg Dim subMenu subMenu = Trim(Request("subMenu")) Select Case subMenu Case "M1" sLeftTitleImg = "" sTitleImg = "title1_2.gif" Case "M5" sLeftTitleImg = "" IF BBS_Category = "qna" Then sTitleImg = "title5_2.gif" Else sTitleImg = "title5_4.gif" End IF End Select %>

<% IF (Request("LinkID") = "-1") Then %> <% Else 'Page¿Í PIDº¯¼ö¸¦ ¹Þ´Â´Ù. Dim Page, PID, LinkID, TreeID Page = Request("Page") PID = Request("PID") LinkID = Request("LinkID") TreeID = Request("TreeID") ' Á¶È¸¼ö¸¦ 1À» Áõ°¡½ÃŲ´Ù. Dim sqlVisit, sqlContent sqlVisit = "Update " & BBS_TABLE_NAME & " Set BBS_Visited = BBS_Visited + 1 WHERE BBS_Category = '"&BBS_Category&"' AND BBS_No = " & PID objQuery.Execute(sqlVisit) sqlContent = "Select BBS_No, BBS_MID, BBS_TreeID, BBS_ChildID, BBS_LinkID, BBS_Subject, " sqlContent = sqlContent & " BBS_Editor, BBS_Email, BBS_Visited, BBS_Date, BBS_Text, BBS_DocTypeCd, BBS_TreeCheck, BBS_PASSWD " sqlContent = sqlContent & " From " & BBS_TABLE_NAME & " Where BBS_Category = '"&BBS_Category&"' AND BBS_No = " & PID Dim rsContent, BBS_NO, disp_content Set rsContent = rsGetDBResult(objQuery,sqlContent) BBS_NO = rsContent("BBS_No") disp_content = rsContent("BBS_Text") Dim sqlNextLID, rsNextLID sqlNextLID = "Select Max(BBS_LinkID) as NextLinkID From " & BBS_TABLE_NAME & " Where BBS_Category = '"&BBS_Category&"' AND BBS_LinkID < " & LinkID Set rsNextLID = rsGetDBResult(objQuery,sqlNextLID) 'response.write sqlNextLID 'response.end ' ´ÙÀ½ ±Û¹øÈ£°¡ ÀÖÀ¸¸é ±¸ÇÏ°í ¾Æ´Ï¸é -1·Î ÇÑ´Ù. Dim NextLinkID, sqlNextPID, rsNextPID, NextPID If rsNextLID.EOF = true and rsNextLID.BOF = true then NextLinkID = -1 Else 'Response.Write rsNextLID("NextLinkID") & "!!!" NextLinkID = rsNextLID("NextLinkID") If isnull(NextLinkID) then NextLinkID = -1 Else sqlNextPID = "Select BBS_No From " & BBS_TABLE_NAME & " Where BBS_Category = '"&BBS_Category&"' AND BBS_LinkID = " &NextLinkID Set rsNextPID = rsGetDBResult(objQuery,sqlNextPID) NextPID = rsNextPID("BBS_No") Set rsNextPID = Nothing 'response.write sqlNextPID 'response.end End if End if Set rsNextLID = Nothing Dim sqlPreLID, rsPreLID sqlPreLID = "Select Min(BBS_LinkID) as PreLinkID From " & BBS_TABLE_NAME & " Where BBS_Category = '"&BBS_Category&"' AND BBS_LinkID > " & LinkID Set rsPreLID = rsGetDBResult(objQuery,sqlPreLID) ' ÀÌÀü ±Û¹øÈ£°¡ ÀÖÀ¸¸é ±¸ÇÏ°í ¾Æ´Ï¸é -1·Î ÇÑ´Ù. Dim PreLinkID, sqlPrePID, rsPrePID, PrePID if rsPreLID.EOF = true and rsPreLID.BOF = true then PreLinkID = -1 else 'Response.Write rsPreLID("PreLinkID") & "!!!" PreLinkID = rsPreLID("PreLinkID") if isnull(PreLinkID) then PreLinkID = -1 else sqlPrePID = "SELECT BBS_No From " & BBS_TABLE_NAME & " WHERE BBS_Category = '"&BBS_Category&"' AND BBS_LinkID = " & PreLinkID Set rsPrePID = rsGetDBResult(objQuery,sqlPrePID) PrePID = rsPrePID("BBS_No") Set rsPrePID = Nothing end if end if Set rsPreLID = Nothing %>
Á¦¸ñ <%= rsContent("BBS_Subject") %>
  Writer   "><%= rsContent("BBS_Editor") %>     Date   <%= rsContent("BBS_Date") %>   Access : <%= rsContent("BBS_Visited") %> 

<%= replace(disp_content, chr(10), "
")%>

 
¼öÁ¤Çϱ⠠ ¸ñ·ÏÀ¸·Î
<% rsContent.close Set rsContent = Nothing End IF %>
 
 
<% End Sub %>