<%@ Language=VBScript %> <% Option Explicit %> <% dim str,val ' 해피정닷컴 추가 2008-05-27 function sqlCheck(str) val=UCASE(str) if instr(val, ";") <> 0 Or _ instr(val, "'") <> 0 Or _ instr(val, "--") <> 0 Or _ instr(val, "/*") <> 0 Or _ instr(val, "*/") <> 0 Or _ instr(val, "XP_") <> 0 Or _ instr(val, "DECLARE") <> 0 Or _ instr(val, "SELECT") <> 0 Or _ instr(val, "UPDATE") <> 0 Or _ instr(val, "DELETE") <> 0 Or _ instr(val, "INSERT") <> 0 Or _ instr(val, "SHUTDOWN") <> 0 Or _ instr(val, "DROP") <> 0 then ' response.write "오류발생" response.Write("") response.End Else sqlCheck=str end if end function 'Dim idx : idx=sqlCheck(request("idx")) Dim NewGetTable,GetPage, intTotalCount, intTotalPage, intBlockPage, intPageSize Dim intTemp, intLoop ,order_num Dim GetSearchStr, GetSearchPart, wc , Rs1 NewGetTable = "noticesofBoard1" GetPage = sqlCheck(request("page")) intPageSize = 10 intBlockPage = 10 GetSearchStr = sqlCheck(request("SearchStr")) GetSearchPart= sqlCheck(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 10 BD_SEQ , BD_THREAD , BD_DEPTH , BD_NAME , BD_SUBJECT, BD_INPUTDATE, BD_READCOUNT " sql = sql & " ,(SELECT COUNT(seq) FROM BizBoard_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) %> PLM Consortium
현재위치 : HOME >PLM Community > 공지사항
 
<% if session("admin") = "administrator" then %> "> <% else %> <% end if %>
<% 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 Rs.close set rs = nothing con.close set con= nothing %>
번호 제목 작성자 작성일 조회수
등록된 테이터가 없습니다.
<%=order_num%>   <% 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 %> <% Sql = "SELECT Right(File_NAME,3) , File_Name FROM " & NewGetTable & "_PDS WHERE FILE_BD_SEQ = " & RS(0) & " and FILE_BD_TABLE ='" & NewGetTable &"'" Set Rs1 = Con.Execute(Sql) if not Rs1.Eof then Response.Write (""&Rs1(1)&"") end if Rs1.close %> <%=Rs(3)%> <%=left(Rs(5),10)%> <%=Rs(6)%>
<% intTemp = Int((GetPage - 1) / intBlockPage) * intBlockPage + 1 If intTemp = 1 Then Response.Write "[이전 " & intBlockPage & "개]  " Else Response.Write"[이전 " & intBlockPage & "개]  " End If intLoop = 1 Do Until intLoop > intBlockPage Or intTemp > intTotalPage If intTemp = CInt(GetPage) Then Response.Write "" & intTemp &"  " Else Response.Write"" & intTemp & "  " End If intTemp = intTemp + 1 intLoop = intLoop + 1 Loop If intTemp > intTotalPage Then Response.Write "[다음 " &intBlockPage&"개]  " Else Response.Write"[다음 " & intBlockPage & "개]" End If %>
<%if session("admin") = "administrator" then%> <% end if%>