|
|
|
<%
NewGetTable = "noticesofBoard1"
GetPage = request("page")
intPageSize = 5
intBlockPage = 5
GetSearchStr = request("SearchStr")
GetSearchPart= request("SearchPart")
GetBD_FINDS= request("BD_FINDS")
if GetSearchPart = "" then GetSearchPart = "BD_SUBJECT"
if GetSearchStr <> "" then
wc = " where " & GetSearchPart & " like '%"& GetSearchStr & "%' and BD_STATE = 1"
else
wc = " where BD_STATE = 1"
end if
If Len(GetPage) = 0 Then
GetPage = 1
End If
sql = "Select Count(*)"
sql = sql & ",CEILING(CAST(Count(*) AS FLOAT)/" & intPageSize & ")"
sql = sql & " from " & NewGetTable & wc
Set Rs = Con.Execute(sql)
intTotalCount = Rs(0)
intTotalPage = Rs(1)
Rs.Close
sql = "SELECT TOP 5 BD_SEQ , BD_THREAD , BD_DEPTH , BD_NAME , BD_SUBJECT, BD_INPUTDATE, BD_READCOUNT "
sql = sql & " ,(SELECT COUNT(seq) FROM siteboard_Comment WHERE PARENT_SEQ = "&NewGetTable&".BD_SEQ AND Parent_b_kind = '" & NewGetTable & "') AS CommentCount , "
sql = sql & " DATEDIFF(hour, BD_INPUTDATE, GETDATE()) "
sql = sql & " FROM " & NewGetTable & wc
sql = sql & " AND BD_THREAD NOT IN "
sql = sql & " (SELECT Top " & Cstr(10 * (GetPage-1)) & " BD_THREAD FROM " &NewGetTable & wc & " ORDER BY BD_THREAD DESC) "
sql = sql & " ORDER BY BD_THREAD DESC "
set Rs = Con.execute(sql)
%>
|
|
|
|
|
|
<%
NewGetTable = "qaBoardsno1"
GetPage = request("page")
intPageSize = 5
intBlockPage = 5
GetSearchStr = request("SearchStr")
GetSearchPart= request("SearchPart")
if GetSearchPart = "" then GetSearchPart = "BD_SUBJECT"
if GetSearchStr <> "" then
wc = " where " & GetSearchPart & " like '%" & GetSearchStr & "%' and BD_STATE = 1"
else
wc = " where BD_STATE = 1"
end if
If Len(GetPage) = 0 Then
GetPage = 1
End If
sql = "Select Count(*)"
sql = sql & ",CEILING(CAST(Count(*) AS FLOAT)/" & intPageSize & ")"
sql = sql & " from " & NewGetTable & wc
Set Rs = Con.Execute(sql)
intTotalCount = Rs(0)
intTotalPage = Rs(1)
Rs.Close
sql = "SELECT TOP 5 BD_SEQ , BD_THREAD , BD_DEPTH , BD_NAME , BD_SUBJECT, BD_INPUTDATE, BD_READCOUNT "
sql = sql & " ,(SELECT COUNT(seq) FROM qaBoardsno1_Comment WHERE PARENT_SEQ = "&NewGetTable&".BD_SEQ AND Parent_b_kind = '" & NewGetTable & "') AS CommentCount , "
sql = sql & " DATEDIFF(hour, BD_INPUTDATE, GETDATE()) "
sql = sql & " FROM " & NewGetTable & wc
sql = sql & " AND BD_THREAD NOT IN "
sql = sql & " (SELECT Top " & Cstr(10 * (GetPage-1)) & " BD_THREAD FROM " &NewGetTable & wc & " ORDER BY BD_THREAD DESC) "
sql = sql & " ORDER BY BD_THREAD DESC "
set Rs = Con.execute(sql)
%>
|
|