<%@ Language=VBScript %> <% Dim NewGetTable,GetPage, intTotalCount, intTotalPage, intBlockPage, intPageSize Dim intTemp, intLoop ,order_num Dim GetSearchStr, GetSearchPart, wc , Rs1 %> PLM BEST PRACTICE CONFERENCE 2007
<% 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) %>
<% order_num = intTotalCount - Int((GetPage - 1))*intPageSize If Rs.BOF or Rs.EOF Then %> <% Else Do Until Rs.EOF %> <% order_num = order_num - 1 Rs.MoveNext Loop End If %>
µî·ÏµÈ Å×ÀÌÅÍ°¡ ¾ø½À´Ï´Ù.
  <% If Rs(2) > 0 Then Response.Write ("") Response.Write ("") End IF %> <% if len( Rs(4) ) >22 Then Response.write ( mid(rs(4), 1 ,22) & "..." ) Else Response.write rs(4) End If if not cint(Rs(7) )=0 Then Response.write "("&rs(7)&")" End If %> <% If( Rs(8) < 48 ) Then Response.write (" ") End If %>
<% 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) %>
<% order_num = intTotalCount - Int((GetPage - 1))*intPageSize If Rs.BOF or Rs.EOF Then %> <% Else Do Until Rs.EOF %> <% order_num = order_num - 1 Rs.MoveNext Loop End If %>
<% If Rs(2) > 0 Then Response.Write ("") Response.Write ("") End IF %>   <% if len( Rs(4) ) >27 Then Response.write ( mid(rs(4), 1 ,27) & "..." ) Else Response.write rs(4) End If if not cint(Rs(7) )=0 Then Response.write "("&rs(7)&")" End If %> <% If( Rs(8) < 48 ) Then Response.write (" ") End If %>
     
 
<% Rs.close set rs = nothing con.close set con= nothing %>