<% 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 %> WI Vascular plants-<%=taxonname%> <%IF session("adminedit") = "1" THEN%>
<%End IF%>
<% IF trim(Thumb) > "." THEN IF blnDotMap THEN Response.Write"County Distribution Map for " & taxonname & "
" Response.Write"View specimen location map" ELSEIF blnHandMap THEN Response.Write"County Distribution Map for " & taxonname & "
" Response.Write"View specimen location map" ELSE Response.Write"County Distribution Map for " & taxonname & "
" 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 %>
View Herbarium Records
View and download all WBIS database records of this taxon

<% RS.MoveNext IF NOT RS.EOF THEN Response.write "Synonyms 
" Response.write "
    " WHILE NOT RS.EOF Response.Write "
  • " Response.Write(getTaxonNm(RS("Taxcd"), RS("Syncd"))) Response.Write "
  • " Response.Write "
    " RS.MoveNext WEND Response.write "
" 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 "" END IF %>
More Information 
    <% 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 "" ELSE Response.Write "
      " 'Also Temp - dynamic mapping will make obsolete IF temp_array(ubound(temp_array)-1) = "dots" THEN Response.Write "
    • " & RS1("Title") & " - " & RS1("Desc") & "
    • " ELSEIF temp_array(ubound(temp_array)-1) = "hand" THEN Response.Write "
    • " & RS1("Title") & " - " & RS1("Desc") & "
    • " ELSE Response.Write "
    • " & RS1("Title") & " - " & RS1("Desc") & "
    • " END IF Response.Write "
    " END IF intCount=intCount+1 RS1.MoveNext LOOP Response.Write "
  • Other Maps
  • " 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 "
  • USDA Plants Database
  • " Response.Write "
      " Response.Write "
    • Federal Distribution and detailed information including photos
    • " Response.Write "
    " ELSE Response.Write "
  • " & RS1("Title") & "
  • " Response.Write "
      " Response.Write "
    • " & RS1("Desc") & "
    • " Response.Write "
    " END IF intCount=intCount+1 END IF RS1.MoveNext LOOP Response.Write "
  • Search Google
  • " Response.Write "
      " Response.Write "
    • Find more information about " & RS("genus") & " " & RS("species") & "
    • " Response.Write "
    " Response.Write "
  • Search Google Images
  • " Response.Write "
      " Response.Write "
    • Find more images for " & RS("genus") & " " & RS("species") & "
    • " Response.Write "
    " Response.Write "
" %>
<%IF blnPhotos THEN%> " Response.Write "" END IF%>
<% 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"Photograph of " & taxonname & "" response.write("
View Large Image") ELSE Response.write"Photograph of " & taxonname & "" 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 %>
 
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 "" 'Response.write "" END IF RS1.MoveNext LOOP IF intCount>0 THEN %>
" 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 "" & taxonname & "
" 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 "

" Response.Write "" & RS1("Desc") & "" END IF Response.write "
<% ELSE Response.Write "
No additional photos available for this taxon.
" END IF 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("
") response.write("
Specimen Scan
" & taxonname & "") response.write("
View Large Image") response.write("
View X-Large Image") response.write("
View Specimen scan details") response.write("
") 'Else 'End If end if %>

<% call closeRS(RS1) call closeRS(RS) call closeRS(RS2) call closeRS(rsPhotoCheck) call closeRS(rsMapCheck) call closeRS(RStype) %>