klasörden çalışan asp galeri kodlarını vt ye bağlamak

Web tabanlı uygulama geliştirme araçları(PHP, ASP vb...) ile ilgili konuları buraya yazabilirsiniz.
Cevapla
Kullanıcı avatarı
ALUCARD
Üye
Mesajlar: 1262
Kayıt: 27 Eyl 2003 10:12
Konum: Samsun
İletişim:

klasörden çalışan asp galeri kodlarını vt ye bağlamak

Mesaj gönderen ALUCARD »

arkadaşlar elimde klasördeki resimleri kullanarak çalışan güzel bir asp kod var
ancak benim bunu vt ye uyumlu hale getirmem gerekiyor

yani resimleri klsaörden değilde acces vt den almasını istiyorum

elimde olan kodu da veriyorum

Kod: Tümünü seç


<%@LANGUAGE="VBSCRIPT"%>

<%

PageTitle = 			"- Foto Galeri"
BackgroundColor = 		"#0f0f0f"
HyperlinkColor = 		"#ffffff"
FontFace = 			"Verdana" 
FontColor = 			"#c0c0c0"
TextAlign = 			"Justified"
HeaderAlign =			"Center"
FolderPath = 			"/hast/foto/" 'Path must be mapped from root
PageWidth =			"800"
BorderWidth =			"1"
BorderColor =			"#ffffff"
BorderMargin =			"10"
PageHeader =			"  - Foto Galeri"
PageMessage =			""
ImageHorizontalSpace =		"10"
ImageVerticalSpace =		"10"
ImageThumbnailWidth = 		"100"
ImageBorderSize =		"1"
ImagesPerRow =			"3"
UseFilenameALT =		"YES"
ShowCopyright  =		"YES"
DebugPath =			"NO"
TurnOnPaging =			"YES"
ImagesPerPage =			"6" 'Only relevant if paging is turned on
DisplayImageCountFooter = 	"YES"
TurnOnSlideshow	=		"YES"
SlideShowTimer =		"5" 'Number of Seconds to pause between transitions in slideshow mode.
SlideShowImageWidth =		"500"
GalleryAutoPreview =		"YES"
GalleryPreviewZoomImageWidth =	"300"
TurnOnThumbnailSupport =	"NO" 'This does not create thumbnails. See documenation for full explination.
ThumbnailIdentifier =		"_thumbnail" '(Example: "Image1_thumbnail.jpg" would be the thumbnail image file for "Image1.jpg")
UseGreyscaleMouseover =		"YES" 'Note: Only works for Internet Explorer users
PersonalCopyrightTagline =	" - Foto Galeri"
UseNoRightClick =		"YES" 'Note: Only works for Internet Explorer users
ViewImageWidth =		"600"
UseViewImageDownload =		"YES"
UseViewSendToFriend =		"YES"
VeiwSendToFriendMessage =	" - Foto Galeri:"
UseFilenameDescriptions = 	"NO"





varMode = request.querystring("mode")

Whichfolder=server.mappath("" & FolderPath & "")
if lcase(TurnOnPaging) = "yes" then
Dim fs, f, f1, fc  
Set fs = CreateObject("Scripting.FileSystemObject")  
Set f = fs.GetFolder(Whichfolder)  
Set fc = f.files 
For Each f1 in fc  


if lcase(UseFilenameALT) = "yes" then 
ImageAlt = f1.name
ImageAltLen = Len(ImageAlt)
ImageAltCrop = (int(ImageAltLen) - 4)
ImageAlt = Left(ImageAlt, ImageAltCrop)
end if


ImageFileFound = "No"
if right(f1.name, 4) = ".jpg" then ImageFileFound = "Yes"
if right(f1.name, 4) = ".gif" then ImageFileFound = "Yes"
if right(f1.name, 4) = ".png" then ImageFileFound = "Yes"
if right(f1.name, 4) = ".bmp" then ImageFileFound = "Yes"



TN_IsThumbnailFlag = ""
if lcase(TurnOnThumbnailSupport) = "yes" then
TN_OriginalFilename = Len(f1.name)
TN_FilenameLenWithoutExt = int(TN_OriginalFilename) - 4
TN_IdentifierLen = Len(ThumbnailIdentifier) 
TN_Filename = Left(f1.name, TN_FilenameLenWithoutExt)
TN_ThumbnailCheck = Right(TN_Filename, TN_IdentifierLen)
if TN_ThumbnailCheck = ThumbnailIdentifier then TN_IsThumbnailFlag = "True"
end if

if TN_IsThumbnailFlag = "" and ImageFileFound = "Yes" then
intImageCount = intImageCount + 1

end if 
Next  
end if




Whichfolder=server.mappath("" & FolderPath & "")
if lcase(TurnOnPaging) <> "yes" then
Set fs = CreateObject("Scripting.FileSystemObject")  
Set f = fs.GetFolder(Whichfolder)  
Set fc = f.files 
For Each f1 in fc  
ImageFileFound = "No"
if right(f1.name, 4) = ".jpg" then ImageFileFound = "Yes"
if right(f1.name, 4) = ".gif" then ImageFileFound = "Yes"
if right(f1.name, 4) = ".png" then ImageFileFound = "Yes"
if right(f1.name, 5) = ".bmp" then ImageFileFound = "Yes"
if f1.name <> "index.asp" and ImageFileFound = "Yes" then
intImageCount = intImageCount + 1
end if 
Next  
end if



intTotalNumberOfImages = intImageCount


			if varMode = "" then


intNumberOfPages = (intImageCount/ImagesPerPage)
if intNumberOfPages > int(intNumberOfPages) then intNumberOfPages = int(intNumberOfPages) + 1%><HTML><HEAD><TITLE><%=PageTitle%> [Gallery]</TITLE>


<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--

// canManipulateImages - check if the browser we're using can do
// clever stuff with document images.

function canManipulateImages() {
	if (document.images)
		return true;
	else
		return false;
}

// loadPosterImage

function loadPosterImage(imageURL) {
	if (gImageCapableBrowser) {
		document.imagePoster.src = imageURL;
		return false;
	}
	else {
		return true;
	}
}

// gImageCapableBrowser - is this browser hip to images? Set up
// a global variable so that we don't have to keep calling a function
// (useful if the function becomes costly to compute).

gImageCapableBrowser = canManipulateImages();

// -->
</SCRIPT>


<% if lcase(UseGreyscaleMouseover) = "yes" then %>
<style type="text/css">a:link img {filter:none; } a:hover img{filter:gray}</style>
<% end if %>




<% if lcase(UseNoRightClick) = "yes" then %>
<script language="JavaScript"> <!--
var message="<% response.write(PersonalCopyrightTagline) %>"; 
function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {

return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// --> </script>
<% end if %>



</HEAD><BODY BGCOLOR="<%=BackgroundColor%>" LINK="<%=HyperlinkColor%>" ALINK="<%=HyperlinkColor%>" VLINK="<%=HyperlinkColor%>"><CENTER><table border="0" cellpadding="<%=BorderWidth%>" CELLSPACING="0" WIDTH="<%=PageWidth%>"><TR><TD bgcolor="<%=BorderColor%>"><table border="0" width="100%"cellpadding="<%=BorderMargin%>" CELLSPACING="0 WIDTH="100%"><TR><TD BGCOLOR="<%=BackgroundColor%>"><FONT FACE="<%=FontFace%>" SIZE="2" COLOR="<%=FontColor%>"><% if lcase(DebugPath) = "yes" then %><BR><BR><CENTER><FONT COLOR="RED">(Fotoğraf 
	Klasörü: <%=Whichfolder%>)</FONT></CENTER><BR><BR><% end if %><DIV ALIGN="<%=HeaderAlign%>"><% if lcase(HeaderAlign) = "center" then %><CENTER><% end if %><BIG><B><%=PageHeader%></B></BIG><% if PageHeader <> "" then %><BR><BR><% end if %><% if lcase(HeaderAlign) = "center" then %></CENTER><% end if %></DIV><DIV ALIGN="<%=TextAlign%>"><% if lcase(TextAlign) = "center" then %><CENTER><% end if %><%=PageMessage%><% if PageMessage <> "" then %><BR><BR><% end if %><% if lcase(TextAlign) = "center" then %></CENTER><% end if %></DIV><%
if TurnOnPaging = "YES" then 
intCurrentPage = request.querystring("Page")
if intCurrentPage = "" then intCurrentPage = "1"
FirstImageAllowedOnPage = ((int(intCurrentPage) * int(ImagesPerPage)) - int(ImagesPerPage)) + 1
FinalImageAllowedOnPage = (int(intCurrentPage) * int(ImagesPerPage))
%><CENTER><table border="0" cellpadding="<%=BorderWidth%>" CELLSPACING="0"><TR><TD bgcolor="<%=BorderColor%>"><table border="0" WIDTH="100%" cellpadding="<%=BorderMargin%>" CELLSPACING="0"><TR><TD BGCOLOR="<%=BackgroundColor%>"><CENTER><FONT FACE="<%=FontFace%>" SIZE="2" COLOR="<%=FontColor%>">Şu Anda Gösterilen Sayfa # <%=intCurrentPage%> to <%=intNumberOfPages%><br><SMALL><< <% if int(intCurrentPage) > 1 then %><A HREF="index.asp?Page=<%=(intCurrentPage-1)%>"><% end if %> Önceki Sayfa </A> | <% if int(intCurrentPage) < (intNumberOfPages) then %><A HREF="index.asp?Page=<%=(intCurrentPage+1)%>"><% end if %>Sonraki Sayfa</A> >><br>

<% if lcase(TurnOnSlideshow) = "yes" then %>
<br><a href="index.asp?mode=slideshow">Görüntülenme Şeklini Değiştir</a>
<% end if %>
</SMALL><br></FONT></CENTER></td></tr></table></td></tr></table>


<%
end if %>



<% if lcase(TurnOnSlideshow) = "yes" and lcase(TurnOnPaging) = "no" then %>
<CENTER><table border="0" cellpadding="<%=BorderWidth%>" CELLSPACING="0"><TR><TD bgcolor="<%=BorderColor%>"><table border="0" WIDTH="100%" cellpadding="<%=BorderMargin%>" CELLSPACING="0"><TR><TD BGCOLOR="<%=BackgroundColor%>"><CENTER><FONT FACE="<%=FontFace%>" SIZE="2" COLOR="<%=FontColor%>">
<a href="index.asp?mode=slideshow">Görüntülenme Şeklini Değiştir</a>
</SMALL><br></FONT></CENTER></td></tr></table></td></tr></table>
<% end if %>


<CENTER><%
PassCount = 1
intImageCount = 0
Set fs = CreateObject("Scripting.FileSystemObject")  
Set f = fs.GetFolder(Whichfolder)  
Set fc = f.files 
For Each f1 in fc  

if lcase(UseFilenameALT) = "yes" then 
ImageAlt = f1.name
ImageAltLen = Len(ImageAlt)
ImageAltCrop = (int(ImageAltLen) - 4)
ImageAlt = Left(ImageAlt, ImageAltCrop)
end if

ImageFileFound = "No"
if right(f1.name, 4) = ".jpg" then ImageFileFound = "Yes"
if right(f1.name, 4) = ".gif" then ImageFileFound = "Yes"
if right(f1.name, 4) = ".png" then ImageFileFound = "Yes"
if right(f1.name, 4) = ".bmp" then ImageFileFound = "Yes"

if lcase(TurnOnThumbnailSupport) = "yes" then
TN_OriginalFilename = Len(f1.name)
TN_FilenameLenWithoutExt = int(TN_OriginalFilename) - 4
TN_IdentifierLen = Len(ThumbnailIdentifier) 
TN_Filename = Left(f1.name, TN_FilenameLenWithoutExt)
TN_ThumbnailCheck = Right(TN_Filename, TN_IdentifierLen)
end if


if TN_ThumbnailCheck <> ThumbnailIdentifier and ImageFileFound = "Yes" then
intImageCount = intImageCount + 1
PassCount = PassCount + 1 
if lcase(TurnOnPaging) = "yes" and int(intImageCount) > int(FirstImageAllowedOnPage)-1 then 
if lcase(TurnOnPaging) = "yes" and int(intImageCount) < int(FinalImageAllowedOnPage)+1 then 
if PassCount > ImagesPerRow + 2 then PassCount = ImagesPerRow -1
if PassCount = ImagesPerRow + 2 then %><BR><% PassCount = 2 %><% end if%><%

if lcase(TurnOnPaging) = "yes" and varPosterDefault = "" then varPosterDefault = WichFolder & f1.name


if lcase(TurnOnThumbnailSupport) = "yes" then
TN_OriginalFilename = Len(f1.name)
TN_FilenameLenWithoutExt = int(TN_OriginalFilename) - 4
TN_Filename = Left(f1.name, TN_FilenameLenWithoutExt)
TN_FileExtension = Right(f1.name, 4)
DisplayThumbnail = TN_Filename & ThumbnailIdentifier & TN_FileExtension
end if


if lcase(TurnOnThumbnailSupport) <> "yes" then
varPosterTranslation = Replace(f1.name, " ", "%20")
Response.write ("<A HREF='index.asp?mode=view&Image=" & intImageCount & "&ReturnPage=" & intCurrentPage  &"'><IMG SRC='" & FolderPath & f1.name & "' BORDER='"& ImageBorderSize &"' WIDTH='" & ImageThumbnailWidth & "' VSPACE='" & ImageVerticalSpace & "' HSPACE='" & ImageHorizontalSpace & "' ALT='Image #" & intImageCount & " of " & intTotalNumberOfImages &": " & ImageAlt & "' onMouseOver=return(loadPosterImage('" & FolderPath & varPosterTranslation & "'))></a>")  
end if
if lcase(TurnOnThumbnailSupport) = "yes" then
varPosterTranslation = Replace(f1.name, " ", "%20")
Response.write ("<A HREF='index.asp?mode=view&Image=" & intImageCount & "&ReturnPage=" & intCurrentPage  &"'><IMG SRC='" & FolderPath & DisplayThumbnail & "' BORDER='"& ImageBorderSize &"' WIDTH='" & ImageThumbnailWidth & "' VSPACE='" & ImageVerticalSpace & "' HSPACE='" & ImageHorizontalSpace & "' ALT='Image #" & intImageCount & " of " & intTotalNumberOfImages &": " & ImageAlt & "' onMouseOver=return(loadPosterImage('" & FolderPath & varPosterTranslation & "'))></a>")  
end if


end if
end if
if lcase(TurnOnPaging) <> "yes" then 
if PassCount > ImagesPerRow + 2 then PassCount = ImagesPerRow -1
if PassCount = ImagesPerRow + 2 then %><BR><% PassCount = 2 %><% end if%><%
if lcase(TurnOnPaging) <> "yes" and varPosterDefault = "" then varPosterDefault = WichFolder & f1.name



if lcase(TurnOnThumbnailSupport) = "yes" then
TN_OriginalFilename = Len(f1.name)
TN_FilenameLenWithoutExt = int(TN_OriginalFilename) - 4
TN_Filename = Left(f1.name, TN_FilenameLenWithoutExt)
TN_FileExtension = Right(f1.name, 4)
DisplayThumbnail = TN_Filename & ThumbnailIdentifier & TN_FileExtension
end if


if lcase(TurnOnThumbnailSupport) <> "yes" then
Response.write ("<A HREF='index.asp?mode=view&Image=" & intImageCount & "&ReturnPage=" & intCurrentPage  &"'><IMG SRC='" & FolderPath & f1.name & "' BORDER='"& ImageBorderSize &"' WIDTH='" & ImageThumbnailWidth & "' VSPACE='" & ImageVerticalSpace & "' HSPACE='" & ImageHorizontalSpace & "' ALT='Image #" & intImageCount & " of " & intTotalNumberOfImages &": " & ImageAlt & "' onMouseOver=return(loadPosterImage('" & FolderPath & f1.name & "'))></a>")  
end if
if lcase(TurnOnThumbnailSupport) = "yes" then
Response.write ("<A HREF='index.asp?mode=view&Image=" & intImageCount & "&ReturnPage=" & intCurrentPage  &"'><IMG SRC='" & FolderPath & DisplayThumbnail & "' BORDER='"& ImageBorderSize &"' WIDTH='" & ImageThumbnailWidth & "' VSPACE='" & ImageVerticalSpace & "' HSPACE='" & ImageHorizontalSpace & "' ALT='Image #" & intImageCount & " of " & intTotalNumberOfImages &": " & ImageAlt & "' onMouseOver=return(loadPosterImage('" & FolderPath & f1.name & "'))></a>")  
end if


end if
end if 
Next  %><% if int(intTotalNumberOfImages) < 1 then %><FONT FACE="<%=FontFace%>" SIZE="2" COLOR="<%=FontColor%>"><BR><BR>
<b><small>Henüz Herhangi Bir Resim dosyası Eklenmemiş:<BR><i> <%=Whichfolder%></i>.</small> <BR><BR></b></FONT><b><% end if %><% if lcase(TurnOnPaging) = "yes" then %>
<table border="0" cellpadding="<%=BorderWidth%>" CELLSPACING="0"><TR><TD bgcolor="<%=BorderColor%>"><table border="0" WIDTH="100%" cellpadding="<%=BorderMargin%>" CELLSPACING="0"><TR><TD BGCOLOR="<%=BackgroundColor%>"><FONT FACE="<%=FontFace%>" SIZE="2" COLOR="<%=FontColor%>">Sayfa Seçiniz: </FONT></TD><TD BGCOLOR="<%=BackgroundColor%>"><FONT FACE="<%=FontFace%>" SIZE="2" COLOR="<%=FontColor%>"><SMALL><%
DO UNTIL varPageParsing = int(intNumberOfPages)
varPageParsing = varPageParsing + 1 %><A HREF="index.asp?Page=<%=varPageParsing%>"><%=varPageParsing%></a>&nbsp;<% LOOP %></SMALL></FONT></td></tr></table></TD></TR></TABLE><% end if %>


<% if lcase(GalleryAutoPreview) = "yes" then %>
<br><center><table border="0" cellpadding="3" CELLSPACING="0"><TR><TD bgcolor="<%=BorderColor%>">
<table border="0" cellpadding="0" CELLSPACING="0"><TR><TD BGCOLOR="<%=BackgroundColor%>">
<IMG NAME="imagePoster" WIDTH=<%=GalleryPreviewZoomImageWidth%> SRC="<%=varPosterDefault%>" ALT="Image Preview Zoom"></td></tr></table>
</td></tr></table></center>
<% end if %>



<% if lcase(DisplayImageCountFooter) = "yes" then %><br><FONT FACE="<%=FontFace%>" SIZE="2" COLOR="<%=FontColor%>"><SMALL><SMALL><CENTER><%=PageTitle%> Foto Galerisi Toplam <%=intTotalNumberOfImages%> Resim Bulunmaktadır</CENTER></SMALL></SMALL><% end if %></TR></TD></TABLE></TR></TD></TABLE>

<center>
<% if lcase(PersonalCopyrightTagline) <> "" then %><BR><FONT FACE="<%=FontFace%>" SIZE="2" COLOR="<%=FontColor%>"><SMALL><SMALL><CENTER><%=PersonalCopyrightTagline%></SMALL></SMALL><% end if%>

<% if lcase(ShowCopyright) = "yes" then %><BR>&nbsp;</CENTER><% end if%></BODY></HTML>

					<% end if %>






					<% if lcase(varMode) = "slideshow" then %>

<HEAD><TITLE><%=PageTitle%> [Slideshow]</TITLE>


<% 

CurrentPic = request.querystring("CurrentPic")
if CurrentPic="" then CurrentPic = 1
CurrentPic = int(CurrentPic)


if int(CurrentPic) < int(intTotalNumberOfImages) then %>
<meta http-equiv="Refresh" content="<%=SlideShowTimer%>;url=index.asp?mode=slideshow&CurrentPic=<%=(CurrentPic)+1%>">
<% end if %>

<% if int(CurrentPic) = int(intTotalNumberOfImages) then %>
<meta http-equiv="Refresh" content="<%=SlideShowTimer%>;url=index.asp?mode=slideshow&CurrentPic=1">
<% end if %>


<% if lcase(UseNoRightClick) = "yes" then %>
<script language="JavaScript"> <!--
var message="<% response.write(PersonalCopyrightTagline) %>"; 
function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {

return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// --> </script>
<% end if %>





</HEAD><BODY BGCOLOR="<%=BackgroundColor%>" LINK="<%=HyperlinkColor%>" ALINK="<%=HyperlinkColor%>" VLINK="<%=HyperlinkColor%>"><CENTER><table border="0" cellpadding="<%=BorderWidth%>" CELLSPACING="0" WIDTH="<%=PageWidth%>"><TR><TD bgcolor="<%=BorderColor%>"><table border="0" width="100%"cellpadding="<%=BorderMargin%>" CELLSPACING="0 WIDTH="100%"><TR><TD BGCOLOR="<%=BackgroundColor%>"><FONT FACE="<%=FontFace%>" SIZE="2" COLOR="<%=FontColor%>">


<DIV ALIGN="<%=HeaderAlign%>"><% if lcase(HeaderAlign) = "center" then %><CENTER><% end if %><BIG><B><%=PageHeader%></B></BIG><% if PageHeader <> "" then %><BR><BR><% end if %><% if lcase(HeaderAlign) = "center" then %></CENTER><% end if %></DIV><DIV ALIGN="<%=TextAlign%>"><% if lcase(TextAlign) = "center" then %><CENTER><% end if %><%=PageMessage%><% if PageMessage <> "" then %><BR><BR><% end if %><% if lcase(TextAlign) = "center" then %></CENTER><% end if%>	</DIV>


<center>
<table border="0" cellpadding="<%=BorderWidth%>" CELLSPACING="0"><TR><TD bgcolor="<%=BorderColor%>">
<table border="0" width="100%"cellpadding="<%=BorderMargin%>" CELLSPACING="0"><TR><TD BGCOLOR="<%=BackgroundColor%>">
<FONT FACE="<%=FontFace%>" SIZE="2" COLOR="<%=FontColor%>"><center>

<%

Set fs = CreateObject("Scripting.FileSystemObject")  
Set f = fs.GetFolder(Whichfolder)  
Set fc = f.files 
For Each f1 in fc 

ImageAlt = f1.name
ImageAltLen = Len(ImageAlt)
ImageAltCrop = (int(ImageAltLen) - 4)
ImageAlt = Left(ImageAlt, ImageAltCrop)


 
ImageFileFound = "No"
if right(f1.name, 4) = ".jpg" then ImageFileFound = "Yes"
if right(f1.name, 4) = ".gif" then ImageFileFound = "Yes"
if right(f1.name, 4) = ".png" then ImageFileFound = "Yes"
if right(f1.name, 4) = ".bmp" then ImageFileFound = "Yes"


if lcase(TurnOnThumbnailSupport) = "yes" then
TN_OriginalFilename = Len(f1.name)
TN_FilenameLenWithoutExt = int(TN_OriginalFilename) - 4
TN_IdentifierLen = Len(ThumbnailIdentifier) 
TN_Filename = Left(f1.name, TN_FilenameLenWithoutExt)
TN_ThumbnailCheck = Right(TN_Filename, TN_IdentifierLen)
end if


if TN_ThumbnailCheck <> ThumbnailIdentifier and ImageFileFound = "Yes" then

	PassCount = PassCount + 1 
		if int(PassCount) = int(CurrentPic) then 
	Response.write ("<center><A HREF='index.asp?mode=view&Image=" & CurrentPic & "'><IMG SRC='" & FolderPath & f1.name & "' BORDER='"& ImageBorderSize &"' WIDTH='" & SlideShowImageWidth & "' VSPACE='" & ImageVerticalSpace & "' HSPACE='" & ImageHorizontalSpace & "' ALT=''></a>")  
			%>
			

			<% if lcase(UseFilenameDescriptions) = "yes" then %>
			<BR>"<%=ImageAlt%>"<BR>
			<% end if %>

			<BR>(Gösterilen Resim  <%=CurrentPic%> Toplam  <%=intTotalNumberOfImages%>)<BR><SMALL>

			<% if CurrentPic > 1 then %>
			<A href="index.asp?mode=slideshow&CurrentPic=<%=(CurrentPic-1)%>">
			<% end if %>
			Önceki Resim</A> | 
			<% if CurrentPic < intTotalNumberOfImages then %>
			<A href="index.asp?mode=slideshow&CurrentPic=<%=(CurrentPic+1)%>">
			<% end if %>				
			Sonraki Resim</A></SMALL><BR>
			<A HREF="index.asp"><small><br>Görüntülenme Şeklini Değiştir</small></A>


			<%
		end if
end if
Next  

%>


</font>
</td></tr></table>
</td></tr></table>
</center>

<br>

</td></tr></table>
</td></tr></table>


<center>
<% if lcase(PersonalCopyrightTagline) <> "" then %><BR><FONT FACE="<%=FontFace%>" SIZE="2" COLOR="<%=FontColor%>"><SMALL><SMALL><CENTER><%=PersonalCopyrightTagline%></SMALL></SMALL><% end if%>

<% if lcase(ShowCopyright) = "yes" then %><BR><FONT FACE="<%=FontFace%>" SIZE="2" COLOR="<%=FontColor%>"><SMALL><SMALL></CENTER></SMALL></SMALL><% end if%>




						<% end if %>



<% if lcase(varMode) = "view" then %>

<HEAD><TITLE><%=PageTitle%> [View Image]</TITLE>


<% if lcase(UseNoRightClick) = "yes" then %>
<script language="JavaScript"> <!--
var message="<% response.write(PersonalCopyrightTagline) %>"; 
function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {

return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// --> </script>
<% end if %>

</HEAD>

</HEAD><BODY BGCOLOR="<%=BackgroundColor%>" LINK="<%=HyperlinkColor%>" ALINK="<%=HyperlinkColor%>" VLINK="<%=HyperlinkColor%>"><CENTER><table border="0" cellpadding="<%=BorderWidth%>" CELLSPACING="0" WIDTH="<%=PageWidth%>"><TR><TD bgcolor="<%=BorderColor%>"><table border="0" width="100%"cellpadding="<%=BorderMargin%>" CELLSPACING="0 WIDTH="100%"><TR><TD BGCOLOR="<%=BackgroundColor%>"><FONT FACE="<%=FontFace%>" SIZE="2" COLOR="<%=FontColor%>">


<DIV ALIGN="<%=HeaderAlign%>"><% if lcase(HeaderAlign) = "center" then %><CENTER><% end if %><BIG><B><%=PageHeader%></B></BIG><% if PageHeader <> "" then %><BR><BR><% end if %><% if lcase(HeaderAlign) = "center" then %></CENTER><% end if %></DIV><DIV ALIGN="<%=TextAlign%>"><% if lcase(TextAlign) = "center" then %><CENTER><% end if %><%=PageMessage%><% if PageMessage <> "" then %><BR><BR><% end if %><% if lcase(TextAlign) = "center" then %></CENTER><% end if%>	</DIV>


<center>
<table border="0" cellpadding="<%=BorderWidth%>" CELLSPACING="0"><TR><TD bgcolor="<%=BorderColor%>">
<table border="0" width="100%"cellpadding="<%=BorderMargin%>" CELLSPACING="0"><TR><TD BGCOLOR="<%=BackgroundColor%>">
<FONT FACE="<%=FontFace%>" SIZE="2" COLOR="<%=FontColor%>"><center>





<%

CurrentPic = request.querystring("Image")
ReturnPage = request.querystring("ReturnPage")
if CurrentPic = "" then CurrentPic = "1"
if ReturnPage = "" then ReturnPage = "1"

Set fs = CreateObject("Scripting.FileSystemObject")  
Set f = fs.GetFolder(Whichfolder)  
Set fc = f.files 
For Each f1 in fc

ImageAlt = f1.name
ImageAltLen = Len(ImageAlt)
ImageAltCrop = (int(ImageAltLen) - 4)
ImageAlt = Left(ImageAlt, ImageAltCrop)


  
ImageFileFound = "No"
if right(f1.name, 4) = ".jpg" then ImageFileFound = "Yes"
if right(f1.name, 4) = ".gif" then ImageFileFound = "Yes"
if right(f1.name, 4) = ".png" then ImageFileFound = "Yes"
if right(f1.name, 4) = ".bmp" then ImageFileFound = "Yes"


if lcase(TurnOnThumbnailSupport) = "yes" then
TN_OriginalFilename = Len(f1.name)
TN_FilenameLenWithoutExt = int(TN_OriginalFilename) - 4
TN_IdentifierLen = Len(ThumbnailIdentifier) 
TN_Filename = Left(f1.name, TN_FilenameLenWithoutExt)
TN_ThumbnailCheck = Right(TN_Filename, TN_IdentifierLen)
end if


if TN_ThumbnailCheck <> ThumbnailIdentifier and ImageFileFound = "Yes" then

	PassCount = PassCount + 1 
		if int(PassCount) = int(CurrentPic) then 
	Response.write ("<IMG SRC='" & FolderPath & f1.name & "' BORDER='"& ImageBorderSize &"' WIDTH='" & ViewImageWidth & "' VSPACE='" & ImageVerticalSpace & "' HSPACE='" & ImageHorizontalSpace & "' ALT=''>")  
			%>
			
			<% if lcase(UseFilenameDescriptions) = "yes" then %>
			<BR>"<%=ImageAlt%>"<BR>
			<% end if %>

			<BR>(Gösterilen Resim  <%=CurrentPic%> Toplam  <%=intTotalNumberOfImages%>)<BR><SMALL><SMALL>
			<A HREF="index.asp?Page=<%=ReturnPage%>">Geleriye Geri Dön</A> 

			<% if lcase(UseViewImageDownload) = "yes" then %>
		
			<%
			if left((right(f1.name, 5)), 2) <> ".." then 
			varPosterTranslation = Replace(f1.name, " ", "%20")
			Set fso = CreateObject("Scripting.FileSystemObject")  
			Set a = fso.GetFile(Server.MapPath("/") & FolderPath & f1.name)  
			ImageFileSize = a.Size
			ImageFileSize = int(int(ImageFileSize) * 0.0009765625)
			DisplayKB = "&nbsp;(&nbsp;" & ImageFileSize & "KB&nbsp;)"
			end if
			%>

			| <A HREF="<%=FolderPath & f1.name%>" TARGET="DOWNLOAD__CURRENT_IMAGE">Fotoğrafı Bilgisayarına İndir<%=DisplayKB%></A>
			<% end if %>

			<% if lcase(UseViewSendToFriend) = "yes" then %>
			<% SendURL = " http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("SCRIPT_NAME") & "?Mode=view%26Image=" & CurrentPic  %>
			<% VeiwSendToFriendMessage = VeiwSendToFriendMessage & vbCrLf & vbCrLf %>
			| <A HREF="mailto:?subject=Fotoğraf <%=PageTitle%>&body=<%=VeiwSendToFriendMessage%><%=SendURL%>">Fotoğrafı Bir Arkadaşına Gönder</A>
			<% end if %>


			</SMALL></SMALL>

			


			<%
		end if
end if
Next  

%>














</font>
</td></tr></table>
</td></tr></table>
</center>

<br>

</td></tr></table>
</td></tr></table>


<center>
<% if lcase(PersonalCopyrightTagline) <> "" then %><BR><FONT FACE="<%=FontFace%>" SIZE="2" COLOR="<%=FontColor%>"><SMALL><SMALL><CENTER><%=PersonalCopyrightTagline%></SMALL></SMALL><% end if%>

<% if lcase(ShowCopyright) = "yes" then %><BR>&nbsp;</CENTER><% end if%><% end if %>
not:kodu kullanmak isteyen arkadaş olursa index.asp diye kaydedip kullanabilir.
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
Forumun 365. Üyesi
Hiç Bir Şey İnsan Kadar Yükselemez ve Alçalamaz

Erkan ÇAĞLAR

mkysoft
Kıdemli Üye
Mesajlar: 3051
Kayıt: 26 Ağu 2003 12:35
Konum: İstanbul
İletişim:

Re: klasörden çalışan asp galeri kodlarını vt ye bağlamak

Mesaj gönderen mkysoft »

resimlerin adlarını mı yoksa resim dosyalarını mı vt de tutacaksınız. eğer resim adlarını tutacaksanız kod çok okunabilir değil ancak

Kod: Tümünü seç

For Each f1 in fc
ile her bir resim dosyası için döngü kurmuş oluyor. eğer veri tabanından resim dosyasını kullanacaksanız, önce bir yere yazmalsınız. bu yazıp silmeler sistemi çok fazla uğraştıracaktır.

Kullanıcı avatarı
ALUCARD
Üye
Mesajlar: 1262
Kayıt: 27 Eyl 2003 10:12
Konum: Samsun
İletişim:

Re: klasörden çalışan asp galeri kodlarını vt ye bağlamak

Mesaj gönderen ALUCARD »

ilgilendiğin için tşk ederim sağol
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
Forumun 365. Üyesi
Hiç Bir Şey İnsan Kadar Yükselemez ve Alçalamaz

Erkan ÇAĞLAR

Cevapla