<% cnt = 0 SQL = "select top 5 seq, thread, depth, subject, writer, email, content, regdate, readcnt, usenotice, usesecret, commentcnt, dept_code from [SBoard_Board_notice] where usenotice = '0' order by thread desc" Set rs = dbcon.execute(SQL) If Not (rs.eof Or rs.bof) Then Do Until rs.eof cnt = cnt + 1 intSeq = rs("seq") intThread = rs("thread") intDepth = rs("depth") strSubject = rs("subject") strWriter = rs("writer") strEmail = rs("email") strContent = rs("content") strRegdate = rs("regdate") intReadCnt = rs("readcnt") strUseNotice = rs("usenotice") strUseSecret = rs("usesecret") intCommentCnt = rs("commentcnt") strDeptCode = rs("dept_code") if len(strSubject) > intNoticeCnt then strSubject = left(strSubject,intNoticeCnt) '& "..." strSubject = ""&strSubject&"" If datediff("h", strRegdate, now()) < 24 Then strSubject = strSubject & " " strRegdate = Replace(Left(strRegdate,10), "-", ".") response.write "
  • "&strSubject&"
  • "&Chr(10) response.write "["&strRegdate&"]"&Chr(10) rs.movenext Loop End If rs.close Set rs = Nothing If cnt < 5 Then For k = cnt + 1 To 5 response.write "
  •  
  • >"&Chr(10) response.write " >"&Chr(10) Next End If %>