Wrance的图片系统目录直读版1.0

2019-01-14 03:41:12王冬梅

sub showContent()
       dim c
    FileCount=1
    TotleSize=0
%>
      <table width="100%" border="0" align="center" cellpadding="5" cellspacing="5">
                  <tr class="tdbg"> 
        <% For Each theFile In theFolder.Files
    c=c+1
    if FileCount>MaxPerPage then
        exit for
    elseif c>MaxPerPage*(CurrentPage-1) then %>
          <td><a href="<%=(UploadDir & theFile.Name)%>" target="_blank">
<img src=<%=(UploadDir & theFile.Name)%> border=0 width=120 height=150></a></td>
<% if FileCount mod 5 =0 then%>
              </TR>
              <tr> 
                <%end if%>
        <%    FileCount=FileCount+1
        TotleSize=TotleSize+theFile.Size
    end if
Next
%>                </tr>
      </table>
      <%
end sub
%>
    </td>
  </tr>
</table>
<%
sub showpage2(sfilename,totalnumber,maxperpage)
    dim n, i,strTemp
    if totalnumber mod maxperpage=0 then
        n= totalnumber  maxperpage
      else
        n= totalnumber  maxperpage+1
      end if
      strTemp= "<table align='center'><form name='showpages' method='Post' action='" & sfilename & "'><tr><td>"
    strTemp=strTemp & "共 <b>" & totalnumber & "</b> 个文件  "
      if CurrentPage<2 then
            strTemp=strTemp & "首页 上一页 "
      else
            strTemp=strTemp & "<a href='" & sfilename & "page=1'>首页</a> "
            strTemp=strTemp & "<a href='" & sfilename & "page=" & (CurrentPage-1) & "'>上一页</a> "
      end if