%
'@CODEPAGE="65001" language="vbscript"
'Option Explicit
'session.CodePage = "65001"
'Response.CharSet = "utf-8"
'Response.buffer=true
'Response.Expires = 0
%>
<%
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 = "mechanicalboard"
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 mechanicalboard_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)
%>
<%=hp_title%>
|
|
|
ÇöÀçÀ§Ä¡ : HOME >PLM Information >PLM ´º½º |
|
|
|
|