<%
Dim objConn, objRS, objSQLStmt
set objConn = Server.CreateObject("ADODB.Connection")
Set objSQLStmt = Server.CreateObject("ADODB.Command")
objConn.ConnectionTimeout = 15
objConn.CommandTimeout = 30
objConn.Open strConnect
set objRS = Server.CreateObject("ADODB.Recordset")
Set objSQLStmt.ActiveConnection = objConn
objSQLStmt.CommandType = 1
objRS.CursorType=1
objSQLStmt.CommandText = "SELECT Taxa.SDir_key, Taxa.Binomial, Taxa.Authority, Taxa.TaxonCode, Photographs.Filename, Taxa.Abbreviation, Phyla.Phylum, Phyla.Directory, Photographs.Caption, People.Fullname, Photographs.Format, Photographs.ImageMap, Slides.CatNo, Sites.PlaceName FROM (((((marine.Taxa LEFT JOIN marine.Phyla ON Taxa.PhylumLetter = Phyla.PhylumLetter) RIGHT JOIN marine.Photographs ON Taxa.SDir_key = Photographs.SDir_key) LEFT JOIN marine.People ON Photographs.PhotographerID = People.PersonID) LEFT JOIN marine.Slides ON Photographs.Filename = Slides.FilledScanNo) LEFT JOIN marine.Specimens ON Slides.CatNo = Specimens.CatNo) LEFT JOIN marine.Sites ON Specimens.SiteID = Sites.SiteID WHERE (((Taxa.Included)=1)) ORDER BY Taxa.TaxonCode, Photographs.SortOrder "
objRS.Open objSQLStmt
'objRS.Open "qryPhotoDisplay", objConn, adOpenDynamic, adLockReadOnly, adCmdStoredProc
Dim strCriteria, strItem, strCaption, strPhylum, strDirectory, strAbbrev, strLatinName, strAuthority, strSpeciesNo, strImageMap
Dim strPhotographer, strPhotoID, strFormat, strWidth, strHeight
Dim strCatNo, strPlace
Dim strFilename, blnEOF, blnBOF
Dim intSpeciesNext, intSpeciesPrevious
strItem = Request.QueryString("item")
strCriteria = "Filename = '" & strItem & "'"
objRS.Find = strCriteria
strSpeciesNo = objRS("SDir_Key")
strPhylum = objRS("Phylum")
strAbbrev=objRS("Abbreviation")
strLatinName=objRS("Binomial")
strAuthority=objRS("Authority")
strImageMap=objRS("ImageMap")
strDirectory=lcase(objRS("Directory"))
strPhotographer=objRS("Fullname")
strPhotoID=lCase(objRS("Filename"))
strCaption=objRS("Caption")
strPlace=objRS("Placename")
strCatNo=objRS("CatNo")
If not IsNull(strCatNo) Then strCatNo="
" & strCatNo & ""
If not IsNull(strPlace) then strCaption=strPlace & " " & strCaption
If not IsNull(strCatNo) then strCaption=strCatNo & ": " & strCaption
If Not IsNull(objRS("Format")) Then strFormat=objRS("Format") Else strFormat="800600"
If strFormat="l" or strFormat = "L" Then strFormat ="800600"
strWidth=left(strFormat,3)
strHeight=Right(strFormat,3)
strFilename=strItem
strDirectory="http://www.habitas.org.uk/marinelife/" & strDirectory
intSpeciesNext=objRS("Filename")
intSpeciesPrevious=objRS("Filename")
objRS.MovePrevious
If Not objRS.BOF Then
intSpeciesPrevious=objRS("Filename")
Else
blnBOF=True
End If
objRS.MoveNext
objRS.MoveNext
If Not objRS.EOF Then
intSpeciesNext=objRS("Filename")
Else
blnEOF=True
End If
objRS.Close
objConn.Close
set objRS=Nothing
set objConn=Nothing
strCaption=FixItalics(strCaption)
strCaption=FixLinks(strCaption)
Response.Write "
" & vbCrLf
Response.Write "![]() |
" & vbCrLf
Response.Write "" & vbCrLf
Response.Write "| " & strLatinName & " " & strAuthority & " |
" & vbCrLf
Response.Write "| " & strCaption & " |
" & vbCrLf
Response.Write "| |
" & vbCrLf
Response.Write "| " & vbCrLf
Response.Write "" & vbCrLf
Response.Write " |
" & vbCrLf
Response.Write "
"
Response.Write "
"
Response.Write "
[ Description ] "
Response.Write "[ Home ]
"
Response.Write "
"
%>