Vous êtes sur la page 1sur 1

<%

' define the number of pictures in your gallery, this will be the highest image
number ex: 18.jpg
numPix = 18
imageWidth = 400
imageHeight = 303
' use the querystring to request the image
pic = Request.QueryString("pic")
' if this is the first page, default to picture 1
If len(pic) = 0 Then pic = 1
' build BACK functionality, I'm using an image called left.gif.
If CINT(pic) = 1 Then
Response.Write "<a href=""default.asp?pic=" & numPix & """>"
Else
prevPic = pic - 1
Response.Write "<a href=""default.asp?pic=" & prevPic & """>"
End If
Response.Write "<img src=""images/left.gif"" width=""40"" hspace=""10"" height="
"30"" border=""0"" alt=""Go back""></a>"
' draw selected image
Response.Write "<img src=""images/" & pic & ".jpg"" width=""" & imageWidth & """
height=""" & imageHeight & """ vspace=""10"" alt=""photo"">"
' build FORWARD functionality
If CINT(pic) = numPix Then
Response.Write "<a href=""default.asp?pic=1"">"
Else
nextPic = pic + 1
Response.Write "<a href=""default.asp?pic=" & nextPic & """>"
End If
Response.Write "<img src=""images/right.gif"" width=""40"" height=""30"" hspace=
""10"" border=""0"" alt=""Next Photo""></a>"
Response.Write "<br/>"
' draw image number list below photo. This allows the user to jump around the ga
llery.
For j= 1 to numPix
If j = CINT(pic) Then
Response.Write j & " "
Else
Response.Write "<a href=""default.asp?pic=" & j & """>" & j & "</a> "
End If
Next
%>

Vous aimerez peut-être aussi