% option explicit %>
<%
dim SpCode
dim genus
dim family
dim common
dim species
dim habitat
dim taxonname
dim intCount
dim blnPhotos, blnDotMap, blnHandMap
dim rs, rs1, rs2, rsPhotoCheck, rsMapCheck
dim MySQL
dim Criteria
Dim strpagetitle
dim Thumb
'variables for "If Exists" process
dim temp_array
dim temp_array2
dim URL_XL_photo, URL_Photofilename, URL_Mainphotofilename, URL_Dotmapfilename, URL_ThumbPhotofilename, URL_Handmapfilename
dim XLfilename
dim filepath
dim fs
'Set variable values
SpCode = ""
blnPhotos = FALSE
blnDotMap = FALSE
blnHandMap = FALSE
'Retrieve values from form
IF Request.ServerVariables("REQUEST_METHOD")="POST" THEN
SpCode = trim(Request.Form("SpCode"))
genus = trim(Request.Form("genus"))
family = trim(Request.Form("Family"))
common = trim(Request.Form("common"))
species = trim(Request.Form("species"))
Habitat = trim(Request.Form("Habitat"))
END IF
'Retrieve values from URL string
IF Request.ServerVariables("REQUEST_METHOD")="GET" THEN
SpCode = trim(Request.QueryString("SpCode"))
genus = trim(Request.Querystring("genus"))
family = trim(Request.Querystring("Family"))
common = trim(Request.Querystring("common"))
species = trim(Request.Querystring("species"))
Habitat = trim(Request.Querystring("Habitat"))
END IF
if SpCode = "" then
response.end
else
MySQL="SELECT * FROM spdetail WHERE (Taxcd = '" & SpCode & "') ORDER BY Syncd"
if retrieveRS(RS, MySQL, interrornum, strerrormsg) then call ffWriteODBCError(MySQL)
if RS.EOF then response.end
'Retrieve link info (paths to important external/internal webpages, images, maps, etc.)
MySQL = "SELECT * FROM link "
Criteria = "WHERE Taxcd = '" & SpCode & "' ORDER BY Type, Taxcd, Link"
MySQL = MySQL & Criteria
Set RS1 = MyConn.Execute(MySQL)
'Retrieve species habitat(s)
MySQL = "SELECT * FROM habitat "
Criteria = "WHERE Taxcd = '" & SpCode & "'"
MySQL = MySQL & Criteria
Set RS2 = MyConn.Execute(MySQL)
'Determine if there are photos for the photo gallery (denoted by types starting with '3')
MySQL = "SELECT * from link WHERE taxcd = '" & SpCode & "' AND type like '3%'"
Set rsPhotoCheck = MyConn.Execute(MySQL)
IF NOT rsPhotoCheck.EOF THEN
blnPhotos = TRUE
END IF
'Determine if there are dot maps available for species (denoted by types '1a')
MySQL = "SELECT * from link WHERE taxcd = '" & SpCode & "' AND type = '1a'"
Set rsMapCheck = MyConn.Execute(MySQL)
IF NOT rsMapCheck.EOF THEN
blnDotMap = TRUE
END IF
'Determine if there are hand drawn maps available for species (denoted by types '1b')
MySQL = "SELECT * from link WHERE taxcd = '" & SpCode & "' AND type = '1b'"
Set rsMapCheck = MyConn.Execute(MySQL)
IF NOT rsMapCheck.EOF THEN
blnHandMap = TRUE
END IF
end if
'* * *
'taxonname = getTaxonNm(RS("Taxcd"), RS("Syncd"))
taxonname = trim(RS("TAXA"))
'* * *
if not isnothing(RS("Thumbmaps")) then
'reconstruct photo path to accomodate for new directory (this is only temporary)
temp_array = split(RS("Thumbmaps"),"/")
Thumb = "../pictures/thumbmap/" & temp_array(ubound(temp_array))
ELSE
Thumb = ""
END IF
%>
<% IF trim(Thumb) > "." THEN
IF blnDotMap THEN
Response.Write" "
Response.Write"View specimen location map"
ELSEIF blnHandMap THEN
Response.Write" "
Response.Write"View specimen location map"
ELSE
Response.Write" "
END IF
END IF %>
Family - <%=RS("Family")%> Taxon - <%=taxonname%>
Common name - <%=RS("Common")%>
<%
IF RS("Status") = "Excluded" Then
Response.Write "[Excluded] "
Else
if isnothing(RS("Status")) then
Response.Write ""
if not isnothing(RS("origin")) then response.write trim(RS("origin")) & " "
if not isnothing(RS("growth_habit")) then response.write trim(RS("growth_habit")) & " "
if not isnothing(RS("blooming_dt")) then response.write trim(RS("blooming_dt"))
Response.Write ""
else
Response.Write "" & RS("Status") & ""
end if
END IF
%>
<%
IF NOT RS2.EOF THEN
Response.write" Habitat - Based on data collected by John T. Curtis (1959) as compiled by C.E. Umbanhowar, Jr."
Response.write "
<%
intCount=0
RS1.movefirst
RS.movefirst
DO WHILE NOT RS1.EOF
IF LEFT(RS1("Type"),1)<>"1" THEN EXIT DO
IF intCount=0 THEN
Response.Write ""
Response.Write "
Distribution Maps
"
END IF
'reconstruct photo path to accomodate for new directory (this is only temporary)
temp_array = split(RS1("Link"),"/")
URL_Dotmapfilename = "../pictures/dotmap/" & temp_array(ubound(temp_array))
URL_Handmapfilename = "../pictures/handmap/" & temp_array(ubound(temp_array))
'Added 10/22 to test handling USDA links at the page level instead of DB level
'Will want to rename link title and maybe description?
IF RS1("Type") = "1c" THEN
Response.Write "
"
intCount=0
DO WHILE NOT RS1.EOF
IF LEFT(RS1("Type"),1)<>"3" THEN
'Added 10/22 to test handling USDA links at the page level instead of DB level
'More descriptive link title and description?
IF RS1("Type") = "5" THEN
Response.Write "
Find more images for " & RS("genus") & " " & RS("species") & "
"
Response.Write "
"
Response.Write "
"
%>
<%
IF RS("Photo")<>"" THEN
'new code here
temp_array = split(RS("Photo"),"/")
temp_array2 = split(temp_array(ubound(temp_array,1)), ".")
XLfilename = temp_array2(ubound(temp_array2)-1)& "_XL."& temp_array2(ubound(temp_array2))
URL_XL_photo = "../pictures/xl_photos/" & XLfilename
filepath="E:/wwwherbarium/wisflora/pictures/xl_photos/" & XLfilename
'reconstruct photo path to accomodate for new directory (this is only temporary)
temp_array = split(RS("Photo"),"/")
URL_Mainphotofilename = "../pictures/mainphoto/" & temp_array(ubound(temp_array))
Set fs=Server.CreateObject("Scripting.FileSystemObject")
If (fs.FileExists(filepath))=true Then
Response.write""
response.write(" View Large Image")
ELSE
Response.write""
End IF
IF RS("Photographer")<>"" THEN
Response.write" "
Response.write"Photographer: " & RS("Photographer") & ""
END IF
ELSE
Response.Write"No photograph available - We request that you submit a photo "
set fs=nothing
END IF
%>
<%IF blnPhotos THEN%>
More Photos
<%
intCount=0
RS1.movefirst
DO WHILE NOT RS1.EOF
'IF LEFT(RS1("Type"),1)<>"3" THEN EXIT DO
IF LEFT(RS1("Type"),1) = "3" THEN
IF intCount=0 THEN
%>
<%
END IF
IF (intCount MOD 4) = 0 THEN
%>
<%
END IF
intCount=intCount+1
Response.Write "
"
IF RS1("Title")<>"" THEN
temp_array = split(RS1("Title"),"/")
temp_array2 = split(temp_array(ubound(temp_array,1)), ".")
XLfilename = temp_array2(ubound(temp_array2)-1)& "_XL."& temp_array2(ubound(temp_array2))
URL_XL_photo = "../pictures/xl_photos/" & XLfilename
filepath="E:/wwwherbarium/wisflora/pictures/xl_photos/" & XLfilename
'reconstruct photo path to accomodate for new directory (this is only temporary)
temp_array = split(RS1("Link"),"/")
URL_Photofilename = "../pictures/photo/" & temp_array(ubound(temp_array))
temp_array = split(RS1("Title"),"/")
URL_ThumbPhotofilename = "../pictures/thumbphoto/" & temp_array(ubound(temp_array))
Response.Write " "
Response.Write " View Image"
Set fs=Server.CreateObject("Scripting.FileSystemObject")
If (fs.FileExists(filepath))=true Then
response.write(" View Large Image")
Else
End If
set fs=nothing
ELSE
Response.Write "(Photo) "
END IF
IF RS1("Desc")<>"" THEN
Response.Write "
<%
dim SQLtype
dim RStype
dim thumbname
dim thumbURL
dim smallURL
dim mediumURL
dim largeURL
' SQLtype = "Select ACCESSION, TYPE from specimen where ((taxcd='"&SpCode&"') and (scan=1) and (type <> ''));"
SQLtype = "Select ACCESSION, TYPE from specimen where ((taxcd='"&SpCode&"') and (scan=1));"
set RStype = MyConn.Execute(SQLtype)
if not RStype.eof then
'if (RStype("TYPE")<> null) then
thumbname = "E:/wwwherbarium/wisflora/pictures/specimenscans/200px/"&RStype("ACCESSION")&"thumb"&".jpg"
thumbURL = "../pictures/specimenscans/200px/"&RStype("ACCESSION")&"_thumb"&".jpg"
smallURL = "../pictures/specimenscans/500px/"&RStype("ACCESSION")&"_medium.jpg"
mediumURL = "../pictures/specimenscans/800px/"&RStype("ACCESSION") & "_large"&".jpg"
largeURL = "../pictures/specimenscans/full size/"&RStype("ACCESSION")&".jpg"
'Set fs=Server.CreateObject("Scripting.FileSystemObject")
'If (fs.FileExists(thumbname)=true) Then
response.write("