<% picsperpage=42 picsperpage=picsperpage-1 Dim DirectoryList(350) Colcount=0 TotalPicsCount=0 StartOn = Request.querystring("StartOn") if StartOn="" then StartOn=1 end if EndOn=StartOn+picsperpage 'DirectoryList="" APPL_PHYSICAL_PATH = Request.ServerVariables("APPL_PHYSICAL_PATH") If Request("Dir") = "" Then Directory = APPL_PHYSICAL_PATH & "miscpics\thumbs\" Else Directory = Request("Dir") End If Set Upload = Server.CreateObject("Persits.Upload.1") Set Dir = Upload.Directory( Directory & "*.*", SORTBY_NAME) %> <% For Each Item in Dir %> <% If Item.IsSubdirectory Then else Colcount=Colcount+1 TotalPicsCount=TotalPicsCount+1 DirectoryList(totalpicscount)=Server.URLEncode( Item.FileName )%> <% End If Next%> <% if endon > totalpicscount then endon=totalpicscount end if Colcount=0 for showpic=starton to endon Colcount=Colcount+1 picname=directorylist(showpic) response.write "" if Colcount=6 then response.write " " Colcount=0 end if next %>

<% if starton>1 then response.write "<----Previous        " end if if totalpicscount>endon then response.write "Next----> " end if %>