<% Option Explicit %> <% ' Response.write Session("MySql") 'If this is the first passthru, and not a request for details, do the following: If Request.Querystring("OrgID") = "" then Dim connectme, mypage, mypagesize, maxcount, howmanyrecs, rs, sql, pad, conn, scriptname, counter, ref %> Fungal Genetics Strain Search Interim Return Page <% 'make database connection Set connectme = Server.CreateObject("ADODB.Connection") connectme.open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=D:\fgsc_data\OrderData.mdb" sql = Session("MySql") 'grab Session sql statement mypage=request.querystring("whichpage") 'determine current page increment If mypage="" then 'if first pass, then set page to 1 mypage=1 end if mypagesize=Session("No") 'set maximum records per page to 10 set rs=Server.CreateObject("ADODB.Recordset") rs.cursorlocation=aduseclient rs.cachesize=5 rs.open sql, connectme If rs.RecordCount < 1 then 'display error page if no records found %>


The Fungal Genetics Stock Centers
Organism Strain Search Form
Your request did not produce any records. Please return to the search form and redefine your query.

Thank you.
<% Else 'if records are found, display interim page rs.movefirst rs.pagesize=mypagesize 'set recordset page size to 10 maxcount=cint(rs.pagecount) 'set maxcount to number of pages rs.absolutepage=mypage 'set current page marker howmanyrecs=0 'set counter to 0 %>


FGSC Strain Search Results = <%= rs.RecordCount %>
Each page may contain a maximum of <%= mypagesize %> records.
This is page <%= mypage %> of <%= maxcount %>, or you can select another page    :
<% 'print page pad for navigation if there are more than 10 records If rs.RecordCount > 10 then pad="0" scriptname=request.servervariables("script_name") for counter=1 to maxcount If counter>=10 then pad="" end if ref="" & pad & counter & "" response.write ref & " " 'if counter mod 10 = 0 then 'set to 10 per line for display ' response.write "
" 'end if next End If %>
Return to Strain Search Form.


<% 'start printing the information for the 10 records do while not rs.eof and howmanyrecs < rs.pagesize %> <% rs.movenext howmanyrecs=howmanyrecs+1 'increment variable to count records loop %>
<%= rs.Fields("StrainName").Value %> ; <% If rs.Fields("MT").Value <> "" then response.write "Mating Types: " & rs.Fields("MT").Value & "- - -" %> Species: <%= rs.Fields("Species").Value %>">More details?...
Genotype: <%= rs.Fields("REPORTING GENES").Value %>
<% If rs.Fields("ALLELE").Value <> "" then response.write "Alleles: " & rs.Fields("ALLELE").Value & "
" %> <% If rs.Fields("LNKGRP").Value <> "" then response.write "Linkage Group(s): " & rs.Fields("LNKGRP").Value & "
" %> <% If rs.Fields("GENEBACK").Value <> "" then response.write "Genetic Background: " & rs.Fields("GENEBACK").Value & "
" %> <% If rs.Fields("MUTAGEN").Value <> "" then response.write "Mutagen: " & rs.Fields("MUTAGEN").Value & "
" %> <% If rs.Fields("STOCK").Value <> "" then response.write "Stock No. from Other Collection: " & rs.Fields("STOCK").Value & "
" %> <% If rs.Fields("DEPOSNAME").Value <> "" then response.write "Depositor of Strain: "& rs.Fields("DEPOSNAME").Value & "
" %> <% If rs.Fields("OPPMT").Value <> "" then response.write "Strain of Opposite Mating Type: " & rs.Fields("OPPMT").Value & "
" %> <% If rs.Fields("GLASGOW").Value <> "" then response.write "Glasgow Number: " & rs.Fields("GLASGOW").Value & "
" %> <% If rs.Fields("TRANS").Value <> "" then response.write "Translocations: " & rs.Fields("TRANS").Value & "
" %> <% If rs.Fields("REF1").Value <> "" then response.write " Reference: " & rs.Fields("REF1").Value & "
" %> <% If rs.Fields("REF2").Value <> "" then response.write " Reference: " & rs.Fields("REF2").Value & "
" %>

<% 'print page pad at bottom for navigation If rs.RecordCount > 10 then Response.write "" End If %>
Select another page:
" pad="0" scriptname=request.servervariables("script_name") for counter=1 to maxcount If counter>=10 then pad="" end if ref="" & pad & counter & "" response.write ref & " " 'if counter mod 10 = 0 then ' response.write "
" 'end if next Response.write "
FGSC fees are described here

Return to Strain Search Form.

<% rs.close set rs=nothing End If %> <% Else 'if a record has been selected on the interim return page, display it %> <% 'Declare variables Dim rsS, rsLC, rsL, rsT, rsO, rsR, rsW, rsX, rsY, strOrgCntr, strName Dim strStNo, strMT, strSpecies, strGeno, strAllele, strLnkGrp, strGene, strMute Dim strStock, strDepos, strOpp, strGlasgow, strTrans, strRef1, strRef2, strLocus, strLocName Dim strEnz, strMLnkGrp, strNL, strNR, strCult, strRefNo, strFullRef, strPID, strCrassa Dim strInter, strSit, strCelata, strTet, strData, strColor, strSk, strSite, strCountry, strState Dim strColdata,strSub, strCollect, strDate, strPAuth, strPYear, strPTitle, strPJrnl, strLink 'open database connection and select FGSC Report header information %><% sql = "Select * from qryWebCounter where OrgStrainCounter = "& Request.Querystring("OrgID") &"" Set rsS = Server.CreateObject("ADODB.Recordset") rsS.Open sql, conn, 3, 3 'populate report header variables strOrgCntr = Server.HTMLEncode(rsS.Fields("OrgStrainCounter").Value) strName = rsS.Fields("StrainName").Value strMT = rsS.Fields("MT").Value strSpecies = rsS.Fields("Species").Value strGeno = rsS.Fields("REPORTING GENES").Value strAllele = rsS.Fields("ALLELE").Value strLnkGrp = rsS.Fields("LNKGRP").Value strGene = rsS.Fields("GENEBACK").Value strMute = rsS.Fields("MUTAGEN").Value strStock = rsS.Fields("STOCK").Value strDepos = rsS.Fields("DEPOSNAME").Value strOpp = rsS.Fields("OPPMT").Value strGlasgow = rsS.Fields("GLASGOW").Value strTrans = rsS.Fields("TRANS").Value strRef1 = rsS.Fields("REF1").Value strRef2 = rsS.Fields("REF2").Value %> Fungal Genetics Strain Search Detail Return Page <% do while Not rsS.eof %> <% rsW.MoveNext loop rsW.Close ' end of WildType Subreport %> <% rsS.MoveNext loop rsS.Close %>


<%= strName %> <% If strMT <> "" then response.write "Mating Types: " & strMT %> Species: <%= strSpecies %>
<% If strAllele <> "" then response.write "" %> <% If strLnkGrp <> "" then response.write ""%> <% If strGene <> "" then response.write ""%> <% If strMute <> "" then response.write ""%> <% If strStock <> "" then response.write "" %> <% If strDepos <> "" then response.write "" %> <% If strOPP <> "" then response.write ""%> <% If strGlasgow <> "" then response.write "" %> <% If strTrans <> "" then response.write "Translocations: " & strTrans & " "%> <% If ((strRef1 <> "") or (strRef2 <> "")) then %> <% End If %>
Genotype : <%= strGeno %>
Alleles: " & strAllele & "
Linkage Group(s): " & strLnkGrp & "
Genetic Background: " & strGene & "
Mutagen: " & strMute & "
Stock No. from Other Collection: " & strStock & "
Depositor of Strain: "& strDepos & "
Strain of Opposite Mating Type: " & strOPP & "
Glasgow Number: " & strGlasgow & "
<% If strRef1 <> "" then response.write "Reference: " & strRef1 & "
"%> <% If strRef2 <> "" then response.write "Reference: " & strRef2 & "
"%>
<% 'Begin Lesion Marker Subreport if a mutant type was selected 'First select is the many-to-many lesion breakout sql = "SELECT * from qryWebStLesionLink WHERE OrgStrainCounter = " & Server.HTMLEncode(rsS.Fields("OrgStrainCounter").Value) & "" Set rsL = Server.CreateObject("ADODB.Recordset") rsL.Open sql, conn, 3, 3 if rsL.RecordCount > 0 then response.write "
Markers
" End If do while NOT rsL.eof 'select Marker subreport items and populate variables sql = "SELECT * FROM qryWebMarkers WHERE [Lesion ID] = " & Server.HTMLEncode(rsL.Fields("Lesion ID").Value) & "" Set rs = Server.CreateObject("ADODB.Recordset") rs.Open sql, conn, 3, 3 strLocus = rs.Fields("Locus").Value strLocName = rs.Fields("Locus Name").Value strEnz = rs.Fields("Enzyme Name").Value strMLnkGrp = rs.Fields("LnkGrp").Value strNL = rs.Fields("NEAR_L").Value strNR = rs.Fields("NEAR_R").Value strCult = rs.Fields("Cultural Requirements").Value strLink = rs.Fields("Link").Value response.write "Error below?" %> <% do while Not rs.eof %> <% If ((strEnz <> "") and (strEnz <> "none")) then %> <% End If %> <% If ((strMLnkGrp <> "") or (strNL <> "") or (strNR <> "")) then %> <% End If %> <% If strCult <> "" then %> <% End If %> <% 'First select is many-to-many reference breakout for marker subreport sql = "SELECT * FROM qryWebLesionToRef WHERE [Lesion ID] = " & Server.HTMLEncode(rs.Fields("Lesion ID").Value) & "" Set rsO = Server.CreateObject("ADODB.Recordset") rsO.Open sql, conn, 3, 3 do while Not rsO.eof 'Select Marker references and populate variables for marker subreport sql = "SELECT * from qryWebRef WHERE [Ref Number] = " & Server.HTMLEncode(rsO.Fields("REF Num").Value) & "" Set rsR = Server.CreateObject("ADODB.Recordset") rsR.Open sql,conn, 3, 3 strRefNo = rsR.Fields("Ref Number").Value strFullRef = rsR.Fields("Full Reference").Value do while Not rsR.eof %> <% rsR.MoveNext loop %> <% rsO.MoveNext loop %> <% rs.MoveNext loop %>
Lesion: <% If (strLink <> "") then %> <%= strLocus %> (Click to see genbank listing) <% Else %> <%= strLocus %> <% End If %> <%= strLocName %>
Enzyme Name: <%= strEnz %>
Lesion Information for Marker:
<% If strMLnkGrp <> "" then response.write "      Linkage Group of " & strLocus & ": " & strMLnkGrp & "
" %> <% If strNL <> "" then response.write "      Markers Left of " & strLocus & ": " & strNL & "
" %> <% If strNR <> "" then response.write "      Markers Right of" & strLocus & ": " & strNR %>
Marker description or requirements:
      <%= strCult %>
Reference for: <%= strLocus %>: <%= strRefNo %>. <%=strFullRef %>
<% rsL.MoveNext loop %>
<% 'End of Marker Subreport 'Beginning of WildType Subreport 'Select Wild Types and populate variables sql = "SELECT * FROM qryWebWild WHERE [Org Strain Counter] = " & Server.HTMLEncode(rsS.Fields("OrgStrainCounter").Value) &"" Set rsW = Server.CreateObject("ADODB.Recordset") rsW.Open sql, conn, 3, 3 do while Not rsW.eof 'declare variables strPID = rsW.Fields("ID").Value strCrassa = rsW.Fields("CROSS TO CRASSA").Value strInter = rsW.Fields("INTERMEDIA").Value strSit = rsW.Fields("SITOPHILA").Value strCelata = rsW.Fields("CELATA").Value strTet = rsW.Fields("TETRASPERMA").Value strData = rsW.Fields("DATA").Value strColor = rsW.Fields("COLOR").Value strSk = rsW.Fields("Sk").Value strSite = rsW.Fields("site").Value strCountry = rsW.Fields("country").Value strState = rsW.Fields("state").Value strColdata = rsW.Fields("long:coldata").Value strSub = rsW.Fields("substrate").Value strCollect = rsW.Fields("Collector").Value strDate = rsW.Fields("Date").Value %>
<% If strPID <> "" then response.write "Perkins ID Number: " & strPID & "
" %> <% If strCrassa <> "" then response.write "Results of cross to Neurospora crassa: " & strCrassa & "
" %> <% If strInter <> "" then response.write "Results of cross to Neurospora intermedia: " & strInter & "
" %> <% If strSit <> "" then response.write "Results of cross to Neurospora Sitophila: " & strSit & "
" %> <% If strCelata <> "" then response.write "Results of cross to Neurospora celata: " & strCelata & "
" %> <% If strTet <> "" then response.write "Results of cross to Neurospora Tetrasperma: " & strTet & "
" %> <% If strData <> "" then response.write "Comments: " & strData & "
" %> <% If strColor <> "" then response.write "Color: " & strColor & "
" %> <% If strSk <> "" then response.write "Spore Killer: " & strSk & "
" %> <% If ((strSite <> "") or (strCountry <> "") or (strState <> "")) then response.write "Collection Site: " & strSite & "," & strState & " " & strCountry & "
" %> <% If strColdata <> "" then response.write "Site Data: " & strColdata & "
" %> <% If strSub <> "" then response.write "Substrate from which the sample was collected: " & strSub & "
" %> <% If strCollect <> "" then response.write "Collected by: " & strCollect & "
" %> <% If strDate <> "" then response.write "Date Colleted: " & strDate & "
" %> <% 'First select is for many-to-many reference breakout sql = "SELECT * FROM qryWebWildLnk WHERE ID = '"& rsW.Fields("ID").Value & "'" Set rsX = Server.CreateObject("ADODB.Recordset") rsX.Open sql, conn, 3, 3 do while Not rsX.eof 'Select Wild Type References and populate variables sql = "SELECT * FROM qryWebWildref WHERE [index of pubs] = "& rsX.Fields("index of pub").Value & "" Set rsY = Server.CreateObject("ADODB.Recordset") rsY.Open sql, conn, 3, 3 strPAuth = rsY.Fields("authors").Value strPYear = rsY.Fields("year").Value strPTitle = rsY.Fields("title").Value strPJrnl = rsY.Fields("journal").Value %>
<% do while Not rsY.eof %> Perkins Reference: <%= strPAuth %> <%= strPYear %>. <%= strPTitle %> <%= strPJrnl %> <% rsY.MoveNext loop rsY.close %>
<% rsX.MoveNext loop rsX.Close %>


Back to Strain Search Form <% End If %>