<%@ Language=VBScript %> <% OPTION EXPLICIT ' =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Dim Rs, Comm Dim bid, b_name, b_memo, write_authority Dim intPageSize, i, intStartPage, intEndPage, intBlockSize, intPageCount Dim pcount, page, stepCount, SText, listcount, st, so Dim short_title ' =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- If Request("bid") = "" Then bid = 21 Else bid = Request("bid") End if IF Request("page") = "" Then page = 1 Else page = Request("page") End if IntPageSize = 10 '한페이지에 출력할 게시물 최대 갯수 intBlockSize = 5 '한페이지에 출력할 페이지 목록 최대 갯수 SText = "&so=" & Request("so") & "&st=" & Request("st") Set Rs = Server.CreateObject("ADODB.RecordSet") Rs.open "SELECT * FROM board_config WHERE b_id = " & bid, Application("ConnectionString") If Rs.Eof or Rs.Bof Then %> <% Response.End Else b_name = Rs("b_name") b_memo = Rs("b_memo") write_authority = Rs("write_authority") End if Rs.Close() %> Seoul Precision Co., Ltd. ::::::::::::::::::::::::::::::::::





No. Subject Name Date Counter
<% Set Comm = server.CreateObject("ADODB.Command") Comm.ActiveConnection = Application("connectionString") Comm.CommandType = adcmdtext if Request("st") <> "" Then Comm.CommandText = "SELECT * FROM board WHERE (writer LIKE ? OR title LIKE ? OR content LIKE ?) AND b_id = ? ORDER BY board_idx DESC" Comm.Parameters.Append Comm.CreateParameter ("@st", adVarChar, adParamInput, 52,"%" & Request("st") & "%") Comm.Parameters.Append Comm.CreateParameter ("@st", adVarChar, adParamInput, 52,"%" & Request("st") & "%") Comm.Parameters.Append Comm.CreateParameter ("@st", adVarChar, adParamInput, 52,"%" & Request("st") & "%") SText = "&st=" & server.URLEncode(Request("st")) '검색후 링크에 삽일할 쿼리 생성 else Comm.CommandText = "SELECT * FROM board WHERE b_id = ? ORDER BY g_id DESC, i_id ASC" end if Comm.Parameters.Append Comm.CreateParameter("@bid", adInteger, adParamInput, 2, bid) Set Rs = Server.CreateObject("ADODB.RecordSet") Rs.CursorType = adOpenKeySet Rs.Open Comm IF Rs.EOF or Rs.BOF Then %> <% listcount = 0 Else Rs.PageSize = IntPageSize 'intpagesize 에 저장된 값만큼 레코드셋의 페이지 크기 설정 listcount = Rs.RecordCount ' listmax 변수에 검색된 게시물 갯수 저장 IF Request("page") = "" Then Rs.AbsolutePage = 1 Else Rs.AbsolutePage = Request("page") End if intStartPage = intBlockSize * int((Rs.AbsolutePage - 1) / intBlockSize) + 1 intEndPage = intstartpage + intBlockSize - 1 intPageCount = Rs.PageCount if intendpage > intPageCount Then intendpage = intPageCount End if Pcount = 0 Do until Rs.Eof or Pcount >= Rs.PageSize short_title = Rs("title") If LenB(short_title) > 40 Then short_title = LeftB(short_title, 36) & "..." End if Pcount = Pcount + 1 %> <% Rs.MoveNext() loop If Pcount < Rs.PageSize Then For Pcount = Pcount + 1 to Rs.PageSize Response.Write "" ' 빈줄 채우기 Next End if RS.Close set Rs = nothing set Comm = nothing end if ' IF Rs.EOF or Rs.BOF Then %>
Not exist the a data.
<%=Rs("num")%> <% If Rs("step") > 0 Then%>px;">→<% End if %> &page=<%=page%><%=stext%>"><%=short_title%><%If DateDiff("h", Rs("u_date"), now()) < 24 Then%> <%End if%> <%=Rs("writer")%> <%=FormatDateTime(Rs("u_date"), 2)%> <%=Rs("v_count")%>
 
<% If intstartPage <> 0 Then if intstartPage > intBlockSize Then %> ?bid=<%=bid%><%=Stext%>"> ?bid=<%=bid%>&page=<%=intStartPage - intBlockSize%><%=Stext%>"> <% End if for i=intstartpage to intendpage If int(i) = int(page) Then %> <%=i%> <% Else %> ?bid=<%=bid%>&page=<%=i%><%=Stext%>"><%=i%> <% End if If i <> intendPage Then %>  |  <% End if Next if intEndPage < intPageCount Then%> ?bid=<%=bid%>&page=<%=intStartPage + intBlockSize%><%=Stext%>"> ?bid=<%=bid%>&page=<%=intPageCount%><%=Stext%>"> <% End if End if %> <% If Session("member") >= write_authority Then %> <% End if %>
"> ?<%=Request.Servervariables("QUERY_STRING")%>&st=' + document.all.st.value">