<%Option Explicit%> <% if Request.Cookies("sinsungfirm") = "" then Response.Write "" end if Dim page,page1 Dim search Dim searchstring Dim sql Dim result Dim i Dim totalpage Dim recordcount Dim blockpage Dim wname Dim subject Dim extension If Request("page") = "" Then page = 1 page1 = 1 Else page = Request("page") page1 = Request("page") End if If Request("search") <> "" Then search = Request("search") searchstring = Request("searchstring") sql = "SELECT num,wname,email,subject,content,filename,date,visit FROM sinsungdata WHERE "&search&" LIKE '%"&searchstring&"%' ORDER BY num DESC" Else sql = "SELECT num,wname,email,subject,content,filename,date,visit FROM sinsungdata ORDER BY num DESC" End If Set result = Server.CreateObject("ADODB.RecordSet") result.pagesize = 10 result.open sql,conn,adOpenStatic totalpage = result.pagecount If totalpage = 0 Then totalpage = 1 %> (주)신성H.S
 

* 이곳은 (주)신성의 업체관련자료실입니다.

번호 파일 제목 성명 작성일 조회
<% If result.bof or result.eof Then %> <% Else recordcount = result.Recordcount result.Absolutepage = page i = 1 Do Until result.eof or i>result.pagesize subject = result("subject") If Len(subject) > 30 Then subject = Left(subject,29)&".." If i <> 1 Then %> <%End If%> <% result.MoveNext i = i + 1 Loop End If %>
등록된 자료가 없습니다.
<%=result("num")%> <% If result("filename") <> "" Then extension = Mid(result("filename"), InstrRev(result("filename"), ".") + 1) Select Case extension Case "zip" Response.Write "" Case "pdf" Response.Write "" Case "ppt" Response.Write "" Case "xls" Response.Write "" Case "doc" Response.Write "" Case "hwp" Response.Write "" Case "gif" Response.Write "" Case "jpg" Response.Write "" Case "bmp" Response.Write "" Case Else Response.Write "" End Select End If %> <%=subject%> <% If Len(result("wname")) > 8 Then wname = Left(result("wname"),7)&".." Else wname = result("wname") End if If result("email") <> "" Then Response.Write ""& wname &"" Else Response.Write wname End If%> <%=result("date")%> <%=result("visit")%>
<% If Not result.bof or Not result.eof Then Response.Write "처음" blockpage=Int((page-1)/10)*10+1 If blockPage = 1 Then Response.Write " << " Else Response.Write " <<  " End If i=1 Do Until i > 10 or blockpage > totalpage If blockpage=int(page) Then Response.Write "[" & blockpage & "]" Else Response.Write "[" & blockpage & "]" End If blockpage=blockpage+1 i = i + 1 Loop If blockpage > totalpage Then Response.Write " >> " Else Response.write "  >> " End If Response.Write "마지막" End If %>

<%If page1 <> 1 Then%><%Else%><%End If%> <%If Cint(page1) <> Cint(totalpage) Then%><%Else%><%End If%>

<% result.close conn.close set result = nothing set conn = nothing %>