<% '----------------------------------------------------------------------------------------------------------------------- ' NamesDetail.asp - Februar 2006 - Andreas Müller ' ' This file shows information about one name. ' ' Parameters: ' NameId: Integer --> Id of the Name of the potential taxons ' '----------------------------------------------------------------------------------------------------------------------- %> <% 'Show back buttons backToSearch = 1 'Shows the backToSearch-Button backToResult = 1 'Shows the backToResult-Button %> <% ' ****************************** BEGIN 1 NAME ********************************************* ' Construct the SQL statement depending on the paramenter passed. SQLName = _ " SELECT NameFrom.NameId, NameFrom.NameCache AS NameCache, NameFrom.FullNameCache AS FullNameCache, NameFrom.Notes, " & _ " RelName.NameFk2, NameTo.NameCache AS NameTo, NameTo.FullNameCache AS FullNameTo, " & _ " NomStatus.NomStatus, " & _ " Rank.Rank, RefDetail.FullNomRefCache, RefDetail.Notes as RefNote, RefDetail.Details " & _ " FROM Name NameFrom INNER JOIN " & _ " Rank ON NameFrom.RankFk = Rank.RankId LEFT OUTER JOIN " & _ " RefDetail ON NameFrom.NomRefDetailFk = RefDetail.RefDetailId AND NameFrom.NomRefFk = RefDetail.RefFk LEFT OUTER JOIN " & _ " NomStatus INNER JOIN " & _ " NomStatusRel ON NomStatus.NomStatusId = NomStatusRel.NomStatusFk ON " & _ " NameFrom.NameId = NomStatusRel.NameFk LEFT OUTER JOIN " & _ " RelName INNER JOIN " & _ " Name NameTo ON RelName.NameFk2 = NameTo.NameId ON " & _ " NameFrom.NameId = RelName.NameFk1 " & _ " WHERE (NameFrom.NameId = " & Request("NameId")& ") " & _ " ORDER BY RelName.RelNameQualifierFk " Set Rname = Server.CreateObject("ADODB.Recordset") openRecordset Rname, SQLName if (Rname.RecordCount > 0) then %>
Details for Name:
<% '------------------------- printer friendly ------------------------ ' Show the google images link only if is not a printer-frendly request if Request("Print")<>1 then %>
" target="_blank">Link to species in Tropicos | &num=20&btnG=Google%2BSearch&as_epq=&hl=&as_oq=&as_eq=&imgsz=&as_filetype=&imgc=&as_sitesearch=&imgsafe=active" target="_blank">Google Images

<%end if%> <%'------------------------- NAVIGATION MENU------------------------ 'take the names of the different sources to create the navigation menu in the top '0--> Name Part (Juncus Roemeriani) '1--> Authors string (L.) '2--> Complete Reference starting with ", " (, Byull. Moskovsk. Obshch. Isp. Prir., Otd. Biol., 95: 117 (1990)) '3--> status part (,nom. illeg.) '4--> non part (,non Buchenau(1545)) '5--> total, all in the same 0+1+2+3+4 '6--> 0+1 '7--> Name notes Dim NameA(7) 'I have to add the status of the name (nomenclature status). It's possible to have more than one status, but maximum here is 2 If Rname("NomStatus")<>"" then ' changed for MCL status_part= Replace(Rname("NomStatus"),"nom. rej. prop.","nom. rejic. prop.") if (status_part = "") then status_part = "" end if if Rname.Recordcount > 1 then 'There's more than one status Rname.movenext 'changed for MCL status_part=status_part & ", " & Replace(Rname("NomStatus"),"nom. rej. prop.","nom. rejic. prop.") End if End if NameA(0)=Rname("NameCache") ' by Andreas if (NOT ISNULL(Rname("FullNameCache")) AND NOT ISNULL(Rname("NameCache"))) Then NameA(1)=Replace(Rname("FullNameCache"),Rname("NameCache"),"") else NameA(1)=Rname("FullNameCache") end if ' by Andreas if (NOT ISNUll(Rname("FullNomRefCache"))) Then NameA(2)=Replace(Rname("FullNomRefCache"),"vol. ", "") & " " & Rname("RefNote") else NameA(2)= Rname("FullNomRefCache") & " " & Rname("RefNote") end if 'by Andreas if (Rname("Details") <> "") then NameA(2)=Replace(NameA(2),", " & Rname("Details"), ": " & Rname("Details")) end if NameA(3)=status_part NameA(4)=non_part 'by Andreas 'NameA(5)=Rname("FullNameCache") &", " & Rname("FullNomRefCache") NameA(6)=Rname("FullNameCache") NameA(7)=Rname("Notes") %> <% '--------------------- tabel color---------------------------------- 'If we are in the IOPI project we change the colour of the table if the edition level for this Reference is set to 1 table_color="#E8F8F8" %>
<% if len(NameA(2)) > 0 then %> <%end if %> <% if len(NameA(3)) > 0 then %> <%end if %> <% '---------------- Rank ------------------------------------------------------------------- %> <% ' ---------------------------- RELATED NAMES ------------------------------------------------------------ ' ---------------------------- RELATED TO ------------------------------------------------------------ 'Is this name related to another name ? (e.g. this is basionym of that) SQL=" SELECT NameFrom.NameId, NameTo.NameId AS NameIdTo, NameTo.FullNameCache, RelName.RelNameQualifierFk relQualFk, RelNameQualifier.RelNameQualifier " & _ " FROM Name NameFrom INNER JOIN Name NameTo INNER JOIN RelName ON NameTo.NameId = RelName.NameFk2 ON NameFrom.NameId = RelName.NameFk1 " & _ " INNER JOIN RelNameQualifier On RelNameQualifier.RelNameQualifierId = RelName.RelNameQualifierFk " & _ " WHERE (((NameFrom.NameId)="& Request("NameId")& "))" Set RRelTo = Server.CreateObject("ADODB.Recordset") openRecordset RRelTo, SQL While (NOt RRelTo.EOF) %> <% RRelTo.moveNext WEnd RRelTo.close set RRelTo=Nothing ' ---------------------------- RELATED FROM ------------------------------------------------------------ 'IS a name related to this name ? SQL=" SELECT NameTo.NameId, NameFrom.NameId AS NameIdFrom, NameFrom.FullNameCache, RelName.RelNameQualifierFk relQualFk " & _ " FROM Name NameFrom INNER JOIN Name NameTo INNER JOIN RelName ON NameTo.NameId = RelName.NameFk2 ON NameFrom.NameId = RelName.NameFk1 " & _ " WHERE (((NameTo.NameId)="& Request("NameId")& "))" Set RRelFrom = Server.CreateObject("ADODB.Recordset") openRecordset RRelFrom, SQL While (NOt RRelFrom.EOF) %> <% RRelFrom.moveNext WEnd RRelFrom.close set RRelFrom=Nothing ' ---------------------------- ACCORDING TAXA ------------------------------------------------------------ ' SQL=" SELECT Name.NameId , Reference.RefCache, Reference.RefId, Reference.volume " & _ " FROM Name INNER JOIN PTaxon ON Name.NameId = PTaxon.PTNameFk INNER JOIN Reference ON PTaxon.PTRefFk = Reference.RefId " & _ " WHERE ( (Name.NameId)="& Request("NameId")& ")" Set RTaxa = Server.CreateObject("ADODB.Recordset") openRecordset RTaxa, SQL taxa = 0 While (Not RTaxa.EOF) %> <% if (taxa = 0 ) then Response.write("") else Response.write(" <% RTaxa.moveNext taxa = taxa + 1 WEnd RTaxa.close set RTaxa=Nothing '---------------------------NOTES---------------------------------------------------------------------------------------- 'There are two type of notes here, the one from the potential taxon and the one from the name. Show them if there´s something inside if NameA(7)<>"" then %> <%end if%> <% '-----------END of NAME -------------------------------------------------------------------------------------------------------- %>

Name:

<%=Rname("FullNameCache")%>
Nomencl. ref.: <%=NameA(2)%>
Nomencl. status(es): <%=RName("NomStatus")%>
Rank: <%=RName("Rank")%>
<%=RRelTo("RelNameQualifier")& ":"%> "> <%=RRelTo("FullNameCache")%>
<%=getNameRelation(RRelFrom("relQualFk"))& ":"%> "> <%=RRelFrom("FullNameCache")%>
According Taxa:") end if %> <% if (RTaxa("volume")<>0) then %> &PTRefFk=<%=RTaxa("RefId")%>"> <% else %> &PTRefFk=<%=RTaxa("RefId")%>"> <% end if%> <%="sec. " & RTaxa("RefCache")%>
Name Notes: <%=NameA(7)%>
 
<% ' Message indicating that there was no potential taxon using this name ---------------- '---------------------------------------------------------------------------------------------------------------------- else %>
No according names found!
<% '----------------------------------------------------------------------------------------------------------------------- end if %>