|
<%
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 "
sqlList = sqlList & " FROM " & BBS_TABLE_NAME & " " &" WHERE BBS_Category = '"&BBS_Category&"' AND is_notice = 'N' and (BBS_TEXT LIKE '%" + 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 "
sqlList = sqlList & " FROM " & BBS_TABLE_NAME & " " &" WHERE BBS_Category = '"&BBS_Category&"' AND is_notice = 'N' and (BBS_EDITOR LIKE '%" + 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 "
sqlList = sqlList & " FROM " & BBS_TABLE_NAME & "" &" WHERE BBS_Category = '"&BBS_Category&"' AND is_notice = 'N' and (BBS_SUBJECT LIKE '%" + 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 "
sqlList = sqlList & " FROM " & BBS_TABLE_NAME & " 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 = 10
intBlockPage = 10
' DB¿Í ¿¬°á
Set rsCon = GetDBRecordset()
rsCon.PageSize = intCountPerPage
rsCon.Open sqlList, objQuery, 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 \ 10
LastRecord = TotCount mod 10
' ÆäÀÌÁö º¯¼ö ¼³Á¤
FirstPg = 1
PrevPg = CurrentPage - 1
NextPg = CurrentPage + 1
'LastPg = 1 + ((TotCount) / Cint(intCountPerPage) - 1)
LastPg = rsCon.PageCount
ind="bbs"
rowNumber = TotCount - ((CurrentPage - 1) * intCountPerPage)
%>
<% If rsCon.EOF = True and rsCon.BOF = True Then %>
|
<% else %>
[ <%=CurrentPage%> / <%=rsCon.PageCount%> ] Total <%=TotCount%> Results
|
<% end if %>
|
<%
' ·¹Äڵ尡 Çϳªµµ ¾øÀ¸¸é
If rsCon.EOF = True and rsCon.BOF = True Then
%>
µî·ÏµÈ ³»¿ëÀÌ ¾ø½À´Ï´Ù. |
<%
' ·¹Äڵ尡 ÀÖÀ¸¸é º¸¿©ÁØ´Ù.
Else
%>
¹øÈ£ |
Á¦¸ñ |
ÀÛ¼ºÀÚ |
ÀÛ¼ºÀÏ |
Á¶È¸ |
|
<%
Dim arrNotice, idx
arrNotice = funcGetBoardNotice1(objQuery, BBS_Category)
If IsArray(arrNotice) Then
For idx = 0 To Ubound(arrNotice, 2)
%>
°øÁö |
&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)%> |
<% 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------½Å±Ô¿©ºÎ ½ì--------------%>
<%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 Year(Now)=Year(rsCon("BBS_Date")) and Month(Now)=Month(rsCon("BBS_Date")) and Day(Now)=Day(rsCon("BBS_Date")) Then
%> <%End If%>
|
<% ' Changed BBS_Editor ÀÛ¼ºÀÚ À̸§ to ***
%>
">***
|
<%= 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%>
|
<%
rsCon.MoveNext
rowNumber = rowNumber - 1
Dim j
if rsCon.EOF = True And LastRecord <> 0 then
For j=1 to (10-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
%>
<%
'//ÆäÀÌÁö Ãâ·Â
Dim intTemp, intLoop
intTemp = Int((CurrentPage - 1) / intBlockPage) * intBlockPage + 1
If intTemp = 1 Then
Response.Write "  "
Else
Response.Write"  "
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"  "
End If
%>
<%IF strcomp(SESSION("User_Group"),"MEMBER") = 0 Then%>
<%IF BBS_Category = "qna" or BBS_Category = "travel" or BBS_Category = "ticket" Then%>
<%End IF%>
<%ELSE%>
<%End IF%>
|
<%
rsCon.close
Set rsCon = Nothing
%>
|
|
|
|
|
|