<% ' PhotoAlbum Dim CurFile, PopFileShowSub, ShowPic, PictureNo Dim strPathInfo, strPhysicalPath Dim intTotPics, intPicsPerRow, intPicsPerPage, intTotPages, intPage, strPicArray() intPicsPerRow = 2 intPicsPerPage = 4 intPage = CInt(Request.QueryString("Page")) If intPage = 0 Then intPage = 1 End If CurFile = "galleria_2.asp" PopFile = "ShowPicture.asp" %>
Animalandia - Centro Polivalente per cani e gatti
Animalandia - Centro Polivalente per cani e gatti
   
I nostri Album Fotografici :
method="POST">
<% If ShowPic > " " then ShowPic = Replace(ShowPic, " ", "%20") Response.Write "

Go Back
" Else %> <% strPhysicalPath = Server.MapPath(".\" & ShowSub) If ShowSub > " " then ShowSub = Replace(ShowSub, " ", "%20") Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.GetFolder(strPhysicalPath) Set objFolderContents = objFolder.Files 'Get the number of pictures in the subdirectory intTotPics = 0 For Each objFileItem in objFolderContents If Ucase(Right(objFileItem.Name,4))=".pdf" OR Ucase(Right(objFileItem.Name,4))=".JPG" THEN intTotPics = intTotPics + 1 End if Next 'Get the total number of pages in the subdirectory If (intTotPics/intPicsPerPage) = (int(intTotPics/intPicsPerPage)) Then intTotPages = int(intTotPics/intPicsPerPage) Else intTotPages = int(intTotPics/intPicsPerPage)+1 End If Redim strPicArray(2,intTotPics) 'Store picture file names in an array x = 0 For Each objFileItem in objFolderContents If Ucase(Right(objFileItem.Name,4))=".pdf" OR Ucase(Right(objFileItem.Name,4))=".JPG" THEN strPicArray(0,x) = objFileItem.Name strPicArray(1,x) = Cstr(int(x/intPicsPerPage)+1) x = x + 1 End if Next 'Determine if there are multiple pages and if so, display page numbers. If intTotPages > 1 Then Response.Write "" Response.Write "" End If For x = 0 to UBound(strPicArray,2)-1 If CInt(strPicArray(1,x)) = intPage Then ShowPic = Replace(strPicArray(0,x), " ", "%20") Response.write "" & vbcrlf PictureNo = PictureNo + 1 If PictureNo=intPicsPerRow Then Response.write "" PictureNo = 0 End if End If Next Set objFSO = Nothing End if %>
Page:   " For x = 1 to intTotPages If x = intPage Then Response.Write "" & x & "    " Else Response.Write "" & x & "    " End If Next Response.Write "
 
" Response.Write(" ") 'Response.Write("
" & Mid(strPicArray(0,x),1,Len(strPicArray(0,x))-4) & "") Response.write "
<% End if %>
Animalandia - Chi Siamo Animalandia - Pensione Animalandia - Gattile Animalandia - Toelettatura Animalandia - Parco Giochi Animalandia - Listino Prezzi Animalandia - Come Raggiungerci