<%
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
strItem = Request.QueryString("item")
strCriteria = "PhotoNo = '" & strItem & "'"
objSQLStmt.CommandText = "SELECT Sems.PhotoNo, Specimens.CatNo, Taxa.Binomial, Taxa.Authority, Taxa.SDir_key, Sems.Format, PHYLA.Phylum, PHYLA.Directory, Taxa.TaxonCode, Sites.PlaceName FROM ((marine.Sems INNER JOIN (marine.Specimens INNER JOIN marine.Taxa ON Specimens.SpeciesNo = Taxa.SDir_key) ON Sems.CatNo = Specimens.CatNo) INNER JOIN marine.PHYLA ON Taxa.PhylumLetter = PHYLA.PhylumLetter) INNER JOIN marine.Sites ON Specimens.SiteID = Sites.SiteID ORDER BY Taxa.TaxonCode, Sems.CatNo, Sems.PhotoNo;"
objRS.Open objSQLStmt
'objRS.Open "qrySemDisplay", objConn, adOpenDynamic, adLockReadOnly, adCmdStoredProc
Dim strCriteria, strItem, strCaption, strPhylum, strDirectory, strAbbrev, strLatinName, strAuthority, strSpeciesNo, strImageMap
Dim strPhotographer, strPhotoID, strFormat, strWidth, strHeight, strCatNo
Dim strFilename, blnEOF, blnBOF
Dim intSpeciesNext, intSpeciesPrevious
objRS.Find = strCriteria
strSpeciesNo = objRS("SDir_Key")
strPhylum = objRS("Phylum")
strLatinName=objRS("Binomial")
strAuthority=objRS("Authority")
strDirectory=lcase(objRS("Directory")) & "/sem"
strDirectory="http://www.habitas.org.uk/marinelife/" & strDirectory
strPhotoID=objRS("PhotoNo")
strCaption=objRS("Placename")
strCatNo=objRS("CatNo")
If not IsNull(strCatNo) Then strCatNo="
" & strCatNo & ": "
If Not IsNull(objRS("Format")) Then strFormat=objRS("Format") Else strFormat="800533"
If strFormat="l" or strFormat = "L" Then strFormat ="800533"
strWidth=left(strFormat,3)
strHeight=Right(strFormat,3)
strFilename=strItem
intSpeciesNext=objRS("PhotoNo")
intSpeciesPrevious=objRS("PhotoNo")
objRS.MovePrevious
If Not objRS.BOF Then
intSpeciesPrevious=objRS("PhotoNo")
Else
blnBOF=True
End If
objRS.MoveNext
objRS.MoveNext
If Not objRS.EOF Then
intSpeciesNext=objRS("PhotoNo")
Else
blnEOF=True
End If
objRS.Close
objConn.Close
set objRS=Nothing
set objConn=Nothing
set objSQLStmt=Nothing
strCaption=FixItalics(strCaption)
Response.Write "
"
Response.Write "![]() |
"
Response.Write ""
Response.Write "| " & strLatinName & " " & strAuthority & " |
" & vbCrLf
Response.Write "| " & strCatNo & " " & strCaption & " |
"
Response.Write "| |
"
Response.Write "| " & vbCrLf
Response.Write "" & vbCrLf
Response.Write " |
" & vbCrLf
Response.Write "
"
Response.Write "
"
Response.Write "
[ Description ] "
Response.Write "[ Home ]
"
Response.Write "
"
%>