<% DIM pPic(100) DIM pNr DIM max FUNCTION hentBilleder() sti ="\images\billeder\" SET fso = CreateObject("Scripting.FileSystemObject") SET folder = fso.GetFolder(Server.Mappath(sti)) SET files = folder.Files pNr = 0 FOR Each file in Files IF MID(file.name,LEN(file.name)-2,3) = "jpg" OR MID(file.name,LEN(file.name)-2,3) = "gif" THEN pNr = pNr + 1 pPic(pNr) = file.Name END IF NEXT SET files = folder.Files SET file = Nothing SET fso = Nothing max = pNr FOR i = 1 TO max FOR j = i + 1 TO max IF pPic(i) > pPic(j) THEN temp_pic = pPic(i) pPic(i) = pPic(j) pPic(j) = temp_pic END IF NEXT NEXT END FUNCTION CALL hentBilleder() %> <%FOR i = 0 TO max-1%> <%NEXT%>

© 2012 Blue Elephant International Plc. All rights reserved