<% 'folderpicture.asp Set fso = Server.CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder (Server.MapPath("/PhotoRes/thumbnails/")) Set fc = f.Files %> <% 'findpicture.asp total = 0 for Each f1 in fc if Instr(f1.name,".gif") or Instr(f1.name,".jpg") or Instr(f1.name,".jpeg") or Instr(f1.name,".bmp") then total = total + 1 end if Next%> <%if total=0 then%>
ѧٻҾѺ
<%else if request("no") ="" then pageno =1 start = 1 else pageno=int(request("no")) start = int(request("start")) end if pagesize=20 NumPicInRow = 4 totalpage=total\pagesize if (total mod pagesize) <> "0" then totalpage= totalpage+1 end if if pageno <> totalpage then endrecord = pagesize else if (total mod pagesize)=0 then endrecord=pagesize else endrecord=(total mod pagesize) end if end if end if %>
˹ | <%For page=1 to totalpage%> <%=page%> |  <%Next%>
ӹǹٻ <%=total%> ٻ

<% NumPic = 0 MaxNumPic = 0 %> <%for Each f1 in fc%> <%if Instr(f1.name,".gif") or Instr(f1.name,".jpg") or Instr(f1.name,".jpeg") or Instr(f1.name,".bmp") then NumPic = NumPic + 1%> <%if MaxNumPic >= endrecord then exit for%> <%if NumPic >= start then MaxNumPic = MaxNumPic + 1 %> <%if NumPic mod NumPicInRow = 1 then%><%end if%> <%end if%> <%end if%> <%Next%>
> alt = <%=f1.name %> border="0"> <%'=f1.name%>