<% 'Option Explicit Response.CacheControl = "no-cache" Response.AddHeader "Pragma", "no-cache" Response.Expires = -1 %> <% Page = Request ("Page") sTextKind = trim(Request ("sTextKind")) sText = trim(Request ("sText")) sFileN = "/jongha/pds_list.asp" sFileName = sFileN & "?sText=" & sText & "&sTextKind=" & sTextKind & "&" PageSize = 10 PageRange = 10 if Len (Page) = 0 then Page = 1 end if Set adoRs = Server.CreateObject("ADODB.Recordset") %> 종하
 
 
 
 

<% SQL = "SELECT COUNT(*) AS TOTAL FROM JONGHA_PDS" if len(sTextKind)>0 then SQL = SQL & " where " & sTextKind & " like '%" & sText & "%'" end if adoRs.Open SQL, adoCn, 1 totalcount = adoRs("total") adoRs.close If totalcount=0 then totalcount = "0" totalpage = "1" else totalpage = (int)((totalcount/PageSize)+0.9999) End If intTopCnt=(page-1)*PageSize SQL = "SELECT top "&PageSize&" * FROM JONGHA_PDS where PK not in(select top "&intTopCnt&" PK from JONGHA_NOTICE" if len(sTextKind)>0 then SQL = SQL & " where " & sTextKind & " like '%" & sText & "%'" end if SQL=SQL&" order by PK desc)" if len(sTextKind)>0 then SQL = SQL & " AND " & sTextKind & " like '%" & sText & "%'" end if SQL=SQL&" ORDER BY PK DESC" 'RESPONSE.WRITE SQL adoRs.Open SQL, adoCn, 1 If adoRs.BOF Or adoRs.EOF Then %> <% Else intNum=totalcount-PageSize*(page-1) Do Until adoRs.EOF pk = adoRs("pk") title = adoRs("title") cont = setHtmlText(adoRs("cont")) writedate = adoRs("writedate") readcnt = adoRs("readcnt") 'If Len(title)>20 Then ' title=Left(title, 20)&"..." 'End If %> <% adoRs.movenext intNum = intNum-1 Loop end if adoRs.close set adoRs = nothing %>
등록된 자료가 없습니다.
<%=intNum%> <%=title%>

<%=cont%>
<%=writeDate%> <%=readCnt%>
<% If totalcount > 0 Then Call PageNavigation(totalcount,PageSize,Page,sFileName,PageRange) End if %>