Resim Galerisi
<% @Language = "VBscript" %> <% '******************************************************************* ' Darkroom Gallery v.1.0 '******************************************************************* ' Copyright (C) 2004 bjawnie.com ' ' This script is freeware specified as follows: ' ' You may modify the script to fit your needs in anyway you like. ' If you wish to redistribute it, non-commercial or commercial, however ' you are obligated to contact the author to get his permission. ' ' All copyright notices regarding bjawnie.com or links to bjawnie.com ' must remain intact in the scripts and in the outputted HTML. ' ' Support can be obtained through our site at bjawnie.com '******************************************************************* '********* ' SETTINGS ' --> dim PageTitle, ImageDirectory, ThumbnailHeight, ThumbnailWidth, ItemsPerPage, ItemsHorizontal PageTitle = "Resim Galerisi" ImageDirectory = "resimler" ThumbnailHeight = 75 ThumbnailWidth = 75 ItemsPerPage = 10 ItemsHorizontal = 5 ' <-- dim TotalItems, CurrentPage sub PrintGallery() CurrentPage = request.querystring("page") if CurrentPage = "" OR int(CurrentPage) = 0 then CurrentPage = 1 end if dim StartItem StartItem = ((CurrentPage - 1) * ItemsPerPage) + 1 if int(StartItem) = 0 then StartItem = 1 end if dim FileSystemObject, FileSystemObjectFiles set FileSystemObject = server.createobject("scripting.filesystemobject") set FileSystemObjectFiles = FileSystemObject.getfolder(server.mappath(ImageDirectory)) dim item, ItemArray for each item in FileSystemObjectFiles.files TotalItems = TotalItems + 1 if int(StartItem) <= int(TotalItems) AND int(StartItem + ItemsPerPage) > int(TotalItems) then if ItemArray = "" then ItemArray = ItemArray & item.name else ItemArray = ItemArray & "," & item.name end if end if next ItemArray = split(ItemArray, ",") response.write "
| " &_
"" &_
" | " & vbnewline
if int(ItemPrints) = int(ItemsHorizontal) OR i = ubound(ItemArray) then
ItemPrints = 0
response.write "
" &_
"Page: "
dim i
for i = 1 to TotalPages
if int(CurrentPage) = int(i) then
response.write " ("& i &")"
else
response.write " " &_
i &_
""
end if
if NOT i = TotalPages then
response.write ", "
end if
next
response.write "
"
end if
end sub
response.write "" & vbnewline &_
"" & vbnewline &_
"" & vbnewline &_ "
" & vbnewline &_ "
" &_
"" &_
"
" & vbnewline &_
"" & vbnewline &_
""
%>




