<% '****************************************************************************************************************** 'System Name : ELIS Ver 1.0 '****************************************************************************************************************** 'File Name : BBS.asp 'File Description : ELIS Main Summary 'Developer : Taejin Kwon 'Date : 9/1/2009 'Modifier(Date) : None '****************************************************************************************************************** Dim G_MENU G_MENU = "BOARD" %> <%Call SubGlobalMenu() %>
<% CALL subTabIndexLink("BOARD") %>
<% CALL subTopMenu() %>
°Ô½ÃÆÇ
<% Dim BBS_Category BBS_Category = Trim(Request("BBS_Category")) %> <% Dim dbConn SET dbConn = GetDBConn() Dim CurrentPage, keyword, Keytype, sqlList If Request("Page")="" Then CurrentPage = 1 Else CurrentPage = Request("Page") End If If Request("isSearch")="true" Then keyword = Request("Keyword") Keytype = Request("KeyType") If keyType = "BBS_TEXT" Then sqlList = "SELECT BBS_NO, BBS_MID, BBS_TREEID, BBS_CHILDID, BBS_LINKID, BBS_EDITOR, " sqlList = sqlList & " BBS_SUBJECT, BBS_EMAIL, BBS_PASSWD, BBS_VISITED, BBS_DATE, BBS_TEXT, file_name " sqlList = sqlList & " FROM E_bbs " &" WHERE BBS_Category = '"&BBS_Category&"' AND is_notice = 'N' and (UPPER(BBS_TEXT) LIKE UPPER('%" + Keyword + "%'))" &" ORDER BY BBS_MID desc" ElseIf keyType = "BBS_EDITOR" Then sqlList = "SELECT BBS_NO, BBS_MID, BBS_TREEID, BBS_CHILDID, BBS_LINKID, BBS_EDITOR, " sqlList = sqlList & " BBS_SUBJECT, BBS_EMAIL, BBS_PASSWD, BBS_VISITED, BBS_DATE, BBS_TEXT, file_name " sqlList = sqlList & " FROM E_bbs " &" WHERE BBS_Category = '"&BBS_Category&"' AND is_notice = 'N' and (UPPER(BBS_EDITOR) LIKE UPPER('%" + Keyword + "%'))" &" ORDER BY BBS_MID desc" Else sqlList = "SELECT BBS_NO, BBS_MID, BBS_TREEID, BBS_CHILDID, BBS_LINKID, BBS_EDITOR, " sqlList = sqlList & " BBS_SUBJECT, BBS_EMAIL, BBS_PASSWD, BBS_VISITED, BBS_DATE, BBS_TEXT, file_name " sqlList = sqlList & " FROM E_bbs" &" WHERE BBS_Category = '"&BBS_Category&"' AND is_notice = 'N' and (UPPER(BBS_SUBJECT) LIKE UPPER('%" + Keyword + "%'))" &" ORDER BY BBS_MID desc" End If '=== Response.Write keyType & "
sql" & sqlList Else sqlList = "SELECT BBS_NO, BBS_MID, BBS_TREEID, BBS_CHILDID, BBS_LINKID, BBS_EDITOR, " sqlList = sqlList & " BBS_SUBJECT, BBS_EMAIL, BBS_PASSWD, BBS_VISITED, BBS_DATE, BBS_TEXT, file_name " sqlList = sqlList & " FROM E_bbs WHERE BBS_Category = '"&BBS_Category&"' and is_notice = 'N' ORDER BY BBS_MID desc, BBS_LINKID desc" End If 'Response.write sqlList 'Response.end Dim intCountPerPage, intBlockPage, rsCon intCountPerPage = 15 intBlockPage = 15 ' DB¿Í ¿¬°á Set rsCon = GetDBRecordset() rsCon.PageSize = intCountPerPage rsCon.Open sqlList, dbConn, 1 'response.write sqlList 'response.end ' ·¹Äڵ尡 ÀÖÀ¸¸é ÇöÀçÆäÀÌÁö°¡ º¸¿©ÁÖ´Â ÆäÀÌÁö if rsCon.EOF = True and rsCon.BOF = True Then Else rsCon.AbsolutePage = CurrentPage End If Dim TotCount, LastCount, LastRecord, FirstPg, PrevPg, NextPg, ind, LastPg, rowNumber ' ·¹ÄÚµåÀÇ Àüü °¹¼ö¸¦ ±¸ÇÔ TotCount = rsCon.RecordCount '==Response.write rsCon.pageCount & " +++" '¸¶Áö¸· ÆäÀÌÁö ±¸ÇÔ LastCount = TotCount \ 15 LastRecord = TotCount mod 15 ' ÆäÀÌÁö º¯¼ö ¼³Á¤ FirstPg = 1 PrevPg = CurrentPage - 1 NextPg = CurrentPage + 1 'LastPg = 1 + ((TotCount) / Cint(intCountPerPage) - 1) LastPg = rsCon.PageCount ind="bbs" rowNumber = TotCount - ((CurrentPage - 1) * intCountPerPage) Dim sPage Select Case BBS_Category Case "ticket" sPage = "Ç×°ø±Ç ¹®ÀÇ" Case "travel" sPage = "¿©ÇàÈıâ" Case "qna" sPage = "ÀÚÀ¯°Ô½ÃÆÇ" End Select %> <%'Start ========================================================================================================================%>
<%=sPage%>
<% If rsCon.EOF = True and rsCon.BOF = True Then %> <% else %> <% end if %>
  Total <%=TotCount%> Rows Result.    Page : <%= CurrentPage %> / <%=rsCon.PageCount%>
<% ' ·¹Äڵ尡 Çϳªµµ ¾øÀ¸¸é If rsCon.EOF = True and rsCon.BOF = True Then %> <% ' ·¹Äڵ尡 ÀÖÀ¸¸é º¸¿©ÁØ´Ù. Else %> <% Dim arrNotice, idx arrNotice = funcGetBoardNotice1(dbConn, BBS_Category) If IsArray(arrNotice) Then For idx = 0 To Ubound(arrNotice, 2) %> <% Next End IF Dim i, blank, loopIndex, blank01 For i = 1 to rsCon.PageSize ' ´äº¯ÀÇ °£°ÝÀ» ¶ç±â À§ÇØ blank = "" Select Case cint(rsCon("BBS_TreeID")) Case 0 blank = "" Case Else ' ´äº¯ÀÇ Â÷¼ö¸¸Å­ °£°ÝÀ» ¶è´Ù. For loopIndex = 1 to cint(rsCon("BBS_TreeID")) blank = blank & "  " If loopIndex >= 2 Then blank = blank & "  " End if blank01=" " Next End Select Dim Subject ' Á¦¸ñÀÌ 20ÀÚ°¡ ³ÑÀ¸¸é ÀÏÁ¤·®À¸·Î ÀÚ¸¥´Ù. If Len(rsCon("BBS_Subject")) > 50 Then Subject = Left(rsCon("BBS_Subject"),50) & "..." Else Subject = rsCon("BBS_Subject") End If %> <% if i mod 2 = 0 then%> <%else%> <%end if%> <%rem------½Å±Ô¿©ºÎ ½ì--------------%> <% rsCon.MoveNext rowNumber = rowNumber - 1 Dim j if rsCon.EOF = True And LastRecord <> 0 then For j=1 to (15-LastRecord) if (LastRecord mod 2 = 1) then if j mod 2 = 1 then%> <%else%> <%end if else if j mod 2 =0 then%> <%else%> <%end if%> <% end if %> <% next end if ' ·¹ÄÚµåÀÇ ³¡ÀÌ¸é ·çÇÁ¸¦ Å»Ãâ If rsCon.EOF = True Then Exit For Next %> <%End If%>
<%=NO_RESULT%>
No.  Subject Writer Date Access
°øÁö &keyword=<%=keyword%>&keytype=<%=keytype%>"><%=arrNotice(6, idx)%> <%=arrNotice(5, idx)%> <%= Month(arrNotice(10, idx))%>/<%= Day(arrNotice(10, idx))%>/<%= Year(arrNotice(10, idx))%> <%=arrNotice(9, idx)%>
<%' ¿À´Ã ¿Ã¶ó¿Â °Ô½Ã¹° üũ If Year(Now)=Year(rsCon("BBS_Date")) and Month(Now)=Month(rsCon("BBS_Date")) and Day(Now)=Day(rsCon("BBS_Date")) Then %>  [New !] <%else%>    <%End If%> <%if cint(rsCon("BBS_TreeID")) = 0 Then%> <%=rowNumber%> <%Else%> <%=rowNumber%> <%end if%>   <%if cint(rsCon("BBS_TreeID")) = 0 Then%> <%= blank%>&Page=<%= CurrentPage %>&LinkID=<%= rsCon("BBS_LinkID") %>&isSearch=<%=Request("isSearch")%>&keyword=<%=keyword%>&keytype=<%=keytype%>"><%= Subject %> <%else%> <%= blank & blank01%>&Page=<%= CurrentPage %>&LinkID=<%= rsCon("BBS_LinkID") %>&isSearch=<%=Request("isSearch")%>&keyword=<%=keyword%>&keytype=<%=keytype%>"><%= Subject %> <%end if%> <%IF rsCon("file_name") <> "" Then%>[÷ºÎÆÄÀÏ]<%End If%> "><%=rsCon("BBS_Editor")%> <%= Month(rsCon("BBS_Date"))%>/<%= Day(rsCon("BBS_Date"))%>/<%= Year(rsCon("BBS_Date"))%> <% IF rsCon("BBS_Visited") > 30 Then %> <%=rsCon("BBS_Visited")%> <% Else%> <%=rsCon("BBS_Visited")%> <% End IF%>
           
<% Set rsCon = Nothing set dbConn = Nothing %>

<% '//ÆäÀÌÁö Ãâ·Â Dim intTemp, intLoop intTemp = Int((CurrentPage - 1) / intBlockPage) * intBlockPage + 1 If intTemp = 1 Then Response.Write "      " Else Response.Write"First Page      " End If intLoop = 1 Do Until intLoop > intBlockPage Or intTemp > rsCon.PageCount If intTemp = CInt(CurrentPage) Then Response.Write "[" & intTemp &"]" Else Response.Write"[" & intTemp & "]" End If intTemp = intTemp + 1 intLoop = intLoop + 1 Loop If intTemp > rsCon.PageCount Then Response.Write "      " Else Response.Write"      Last Page" End If %>
   " onkeypress="key_enter()" class="TxtBasis">   ">
<% Dim BtnWrite BtnWrite = FuncRenderButton2("Write", "javascript:document.location.href('"&ADMIN_ROOT&"/bbs/BBS_Write.asp?BBS_Category="&BBS_Category&"');", "right") %>

<%'End =========================================================================================================================%>
<% Function funcGetBoardNotice1(byRef objQuery, ByVal BBS_Category) Dim strQuery strQuery = " SELECT BBS_NO, BBS_MID, BBS_TREEID, BBS_CHILDID, BBS_LINKID, BBS_EDITOR, " &_ " BBS_SUBJECT, BBS_EMAIL, BBS_PASSWD, BBS_VISITED, BBS_DATE, BBS_TEXT, file_name " &_ " FROM E_bbs " &_ " WHERE BBS_Category = '"&BBS_Category&"' and is_notice = 'Y' Order by BBS_MID desc, BBS_LINKID desc " 'response.write strQuery 'response.end funcGetBoardNotice1 = arrGetDBResult(objQuery, strQuery) End Function %>