Salve, come si fa ad incastonare il seguente codice
codice:
<%
set custRs = Server.CreateObject("ADODB.Recordset")
custRs.Fields.Append "nome", 200, 300 ' adVarChar
custRs.Fields.Append "dimensione", 2, 4 ' smallint
custRs.Fields.Append "data", 7 ' Date
custRs.Open

' popolamento
Set FileObject = Server.CreateObject("Scripting.FileSystemObject")

Set f = FileObject.GetFolder(strPath)

For Each f1 in f.Files
  custRs.AddNew
  custRs("nome") = f1.name
  custRs("data") = f1.DateCreated 
Next

Set f = Nothing
Set FileObject = Nothing

custRs.Sort = "data DESC"

If Not custRS.EOF AND Not custRS.BOF Then
nomefile = custRs("nome")

Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
Set f = FileObject.getfile(StrPath&"\"&nomefile)
he = ImageHeight(StrPathShort & nomefile)
wi = ImageWidth(StrPathShort & nomefile)
resized = ImageResize(StrPathShort & nomefile, 80, 80, "center")
Response.Write "<tr><td align=""center"">Ultima immagine inserita: " & f.DateCreated & "</td></tr>"
Response.Write "<tr><td align=""center"">" & vbcrlf & "<table width=""100%""><tr><td align=""center""><table cellspacing=""0"" cellpadding=""0"" style=""border: 1 solid #6699CC""><tr><td>" & resized & "</td></tr></table></td></tr><tr><td align=""center"">" & nomefile & "
" & wi & "x" & he & "-" & f.size & "byte</td></tr></table></td></tr>" & vbcrlf
Set f = Nothing
Set FileObject = Nothing
Else
%>
 
<%
End If
%>

all' interno del seguente codice ?
codice:
<%
Dim objFSO, objFolder, objFile

Set objFSO = server.createobject("scripting.filesystemobject")
Set objFolder = objFSO.getfolder(strpath)

fileMAX = 8
intTotalFiles = objFolder.Files.Count
If objFolder.Files.Count MOD fileMAX = 0 Then
  intTotalPages = Int(objFolder.Files.Count/fileMAX)
Else
  intTotalPages = Int(objFolder.Files.Count/fileMAX)+1
End If
%>
<%
If intTotalFiles > 0 Then
  col = 0
  imagecounter = 1
  
  If Request.QueryString("page").Count > 0 Then
    intPageNum = CInt(Request.QueryString("page"))
  Else
    intPageNum = 1
  End If
  
  
  For Each objFile in objFolder.Files
  
    'Response.Write imagecounter & "-" & (intPageNum*4)-3 & "-" & (intPageNum*4) &"
"
    
    If (imagecounter >= (intPageNum*fileMAX)-(fileMAX-1)) And (imagecounter <= (intPageNum*fileMAX)) Then
      col = col + 1
      If col = 1 Then Response.Write "<tr>" & vbcrlf
      he = ImageHeight(StrPathShort & objfile.name)
      wi = ImageWidth(StrPathShort & objfile.name)
      resized = ImageResize(StrPathShort & objfile.name, 100, 100, "center")
      Response.Write "<td align=""center"" width=""135"">" & vbcrlf & "<table width=""100%""><tr><td align=""center"" height=""110""><table cellspacing=""0"" cellpadding=""0"" style=""border: 1 solid #6699CC""><tr><td>" & resized & "</td></tr></table></td></tr><tr><td align=""center"">" & objfile.name & "
" & wi & "x" & he & "
" & objfile.size & "byte
" & objFile.DateCreated & "</td></tr></table>
" & vbcrlf & "</td>" & vbcrlf
      If col = 4 Then
        Response.Write "</tr>" & vbcrlf
        col = 0
      End If
      'If col > 4 Then col = 1
    End If
    
    imagecounter = imagecounter + 1
    'If imagecounter > fileMAX Then Exit For
  Next
  
  If col > 0 AND col < 4 Then
    For colonne = col+1 To 4
      Response.Write "<td width=""135""></td>" & vbcrlf
    Next
    Response.Write "</tr>" & vbcrlf
  End If

Else
%>
              
<%
End If
%>
in modo tale che il primo codice vengas ripetuto tante volte quante sono i file?