FSO分页排列问题
FSO读取文件夹里所有图片,然后按照横5竖3的方式排列,并且分页,程序我已经写好了,问题在按照横5竖3排列就比较难了,对FSO比较熟悉的兄弟帮我修改一下这个程序<table width="100%" border="1" cellpadding="0" style="border-collapse:collapse" cellspacing="0" bordercolor="#D4D0C8">
<tr height="18" align="center" bgcolor="#19A1DD" style="color:#fff;">
<td colspan="5">我的相册</td>
</tr>
<tr bgcolor="#f9f9f9" align="center">
<%
Page=Request.QueryString("Page")
if Page="" then Page=1 else Page=cint(Page) end if
PatentFolder = "pic/2007联欢会/" '图片文件夹
FoldPage = 15
Set Fso = CreateObject("Scripting.FileSystemObject")
if Fso.FolderExists(Server.Mappath(PatentFolder)) then
Set FolderCount = Fso.GetFolder(Server.Mappath(PatentFolder)).files
For Each F1 in FolderCount
if (Page-1)*FoldPage<=i and i<(Page-1)*FoldPage+FoldPage then '循环部分
%>
<td height="170">
<img src="<%=PatentFolder&F1.Name%>" style="width:150px; height:119px;" /><br>
<%=F1.DateLastAccessed%><br>
<input type="button" value="删除" style="cursor:pointer; width:30px; height:16px;" />
</td>
<%
end if
i=i+1
next
ThePageCount = Sgn(FolderCount.Count/FoldPage)+fix(FolderCount.Count/FoldPage)-1 '总页数
TheFileCount = FolderCount.Count '总记录数
Set FolderCount = Nothing
Set Fso = Nothing
%>
</tr>
<tr align="center" bgcolor="#e7e7e7" height="20">
<td colspan="15">
<%
Response.Write "共<b>"&TheFileCount&"</b>张 共<b>"&ThepageCount&"</b>页 当前第<b>"&page&"</b>页 "
Response.Write "<a href=?page=1>首页</a> "
IF page>1 Then
Response.Write "<a href=?page="&page-1&">上一页</a> "
Else
Response.Write "上一页 "
End IF
IF page<ThepageCount Then
Response.Write "<a href=?page="&page+1&">下一页</a> "
Else
Response.Write "下一页 "
End IF
Response.Write "<a href=?page="&ThepageCount&">尾页</a> "
Else
Response.write "无指定目录"
End IF
%>
</td>
</tr>
</table>