<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <meta http-equiv="Page-Enter" content="Revealtrans(Duration=2,Transition=23)">
<% function showpic(pic) response.write("<center><a href='"&pic.name&"' target='blank'><img id='pic' src='"&pic.name&"' width='640' height='480' alt='拍摄于"&pic.DateCreated&"' ><br>"&pic.name&"</a></center>") end function function GetExtName(fn) GetExtName = lcase(Right(fn,(Len(fn)-Instr(fn,".")))) end function %> <% dim objfilesys 'dim myfolder dim myfolders dim myfile dim count count = 0 set objfilesys=server.CreateObject("Scripting.filesystemobject") set myfolder=objfilesys.getfolder(Server.MapPath("./")) set myfiles=myfolder.files
%> <% dim page,sPageSize,ecount,scount page = (Request.QueryString("page")) if page = "" or not IsNumeric(page) Then page = 1 dim filecount, pagecount '准备分页 sPageSize = 1 '每页显示数 filecount = clng(myfiles.count) pagecount = clng(filecount / sPageSize) 'response.write (filecount&"---"&pagecount) '''''''''''''''' 'if page > pagecount Then page = pagecount page = clng(page) scount = (page-1) * sPageSize + 1 ecount = page * sPageSize %> <table align = center> <% for each myfile in myfiles 'SumSize =SumSize + myfile.size fp = cstr(myfile.path) if GetExtName(fp) = "jpg" Then count = count +1 if scount <= count and ecount >= count Then if ((count-1) mod 5) = 0 then %> <tr> <% end if %> <td> <% showpic(myfile) 'response.write(count) %> </td> <% if ((count) mod 5) = 0 then %> </tr> <% end if end if end if next %> </table> <script language=javascript> function go() { setTimeout("autoshow()",1000); } function gourl(pg) { location.href="?page="+pg+""; } function autoshow() { var pagecount; var page; var ul; pagecount = <%=pagecount%>; page = <%=page%> +1; if (page > pagecount) { page = 1; } setTimeout('gourl('+page+')',2000); } </script> |