No hits. Please verify your entry and selection of specimen database. ";} else { $result01 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT sptoolcollection.ID_Collection, " . " sptoolcollection.UnitID_Specimen, " . " sptoolcollection.CollectionCode_Specimen, " . " sptoolcollection.InstitutionCode_Specimen, " . " sptoolcollection.Collectors, " . " sptoolcollection.CollectionDateMin, " . " sptoolcollection.CollectionDateMax, " . " sptoolcollection.CollectionYear, " . " sptoolcollection.CollectorsNo, " . " sptoolcollection.Locality_ID, " . " sptoolcollection.ExpeditionDetails, " . " sptoolcollection.Region, " . " sptoolcollection.Locality, " . " sptoolcollection.Habitat, " . " sptoolcollection.DepthMin, " . " sptoolcollection.DepthMax, " . " sptoolcollection.DepthUnit, " . " sptoolcollection.DepthAccuracyStatement, " . " sptoolcollection.AltitudeMin, " . " sptoolcollection.AltitudeMax, " . " sptoolcollection.AltitudeUnit, " . " sptoolcollection.AltitudeAccuracyStatement, " . " sptoolcollection.LongitudeMin, " . " sptoolcollection.LatitudeMin, " . " sptoolcollection.LongitudeMax, " . " sptoolcollection.LatitudeMax, " . " sptoolcollection.LongitudeRaw, " . " sptoolcollection.LatitudeRaw, " . " sptoolcollection.CoordinatesAccuracyStatement, " . " sptoolcollection.CoordinatesErrorDistance, " . " sptoolcollection.EscapedCoordinates, " . " sptoolcollection.Permission, " . " sptoolcollection.Blocked_For_Publishing, " . " sptoolcollection.Blocked_For_Loaning, " . " sptoolcollection.Blocked_Until, " . " sptoolcollection.Loan_Conditions, " . " sptoolcollection.AccessionNo, " . " sptoolcollection.AccessionName, " . " sptoolcollection.LifeStage, " . " sptoolcollection.LifeForm, " . " sptoolcollection.Notes, " . " basisofrecordspecimen.BasisOfRecord_Specimen AS BasisOfRecord, " . " kindofunit.KindOfUnit, " . " sex.Sex, " . " specimentype.SpecimenType, " . " countryisocode.Country, " . " countryisocode.IsoCode, " . " slope.Slope, " . " seasandoceans.SeasAndOceans " . " FROM sptoolcollection JOIN tmpSpToolIDs " . " LEFT JOIN basisofrecordspecimen ON sptoolcollection.FK_BasisOfRecord = basisofrecordspecimen.ID_BasisOfRecord_Specimen " . " LEFT JOIN kindofunit ON sptoolcollection.FK_KindOfUnit = kindofunit.ID_KindOfUnit " . " LEFT JOIN sex ON sptoolcollection.FK_Sex = sex.ID_Sex " . " LEFT JOIN specimentype ON sptoolcollection.FK_Type = specimentype.ID_SpecimenType " . " LEFT JOIN countryisocode ON sptoolcollection.FK_Country = countryisocode.ID_Country " . " LEFT JOIN seasandoceans ON sptoolcollection.FK_SeasAndOceans = seasandoceans.ID_SeasAndOceans " . " LEFT JOIN slope ON sptoolcollection.FK_Slope = slope.ID_Slope " . " WHERE sptoolcollection.ID_Collection = tmpSpToolIDs.ID_Collection"); $result2 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT sptoolcollection.ID_Collection, " . " sptooltaxa.NameAuthorYear, " . " sptooltaxa.Genus, " . " sptooltaxa.Subgenus, " . " sptooltaxa.SpecificEpithet, " . " sptooltaxa.Rank, " . " sptooltaxa.InfraspecificEpithet, " . " sptooltaxa.AuthorParenth, " . " sptooltaxa.YearParenth, " . " sptooltaxa.Author, " . " sptooltaxa.Year, " . " sptooltaxa.KindOfIdentification, " . " sptooltaxa.Identifier, " . " sptooltaxa.IdentificationDate, " . " sptooltaxa.IdentificationNotes, " . " sptooltaxa.PreferredFlag " . " FROM sptoolcollection, sptooltaxa, tmpSpToolIDs " . " WHERE sptooltaxa.FK_Collection = sptoolcollection.ID_Collection " . " AND sptooltaxa.PreferredFlag = '1' " . " AND sptooltaxa.Synecology IS NULL " . " AND sptoolcollection.ID_Collection = tmpSpToolIDs.ID_Collection"); while($row = mysqli_fetch_object($result2)) { $NameAuthorYear = $row->NameAuthorYear; $Genus = $row->Genus; $Subgenus = $row->Subgenus; $SpecificEpithet = $row->SpecificEpithet; $InfraspecificEpithet = $row->InfraspecificEpithet; $Rank = $row->Rank; $AuthorParenth = $row->AuthorParenth; $YearParenth = $row->YearParenth; $Author = $row->Author; $Year = $row->Year; $KindOfIdentification = $row->KindOfIdentification; $Identifier = $row->Identifier; $IdentificationDate = $row->IdentificationDate; $IdentNotes = $row->IdentificationNotes; $PreferredFlag = "Yes"; } $result2b = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT sptoolcollection.ID_Collection, " . " sptooltaxa.NameAuthorYear AS NameAuthorYearB, " . " sptooltaxa.PreferredFlag AS PreferredFlagB " . " FROM sptoolcollection, sptooltaxa, tmpSpToolIDs " . " WHERE sptooltaxa.FK_Collection = sptoolcollection.ID_Collection " . " AND sptooltaxa.PreferredFlag = '0' " . " AND sptooltaxa.Synecology IS NULL " . " AND sptoolcollection.ID_Collection = tmpSpToolIDs.ID_Collection"); while($row = mysqli_fetch_object($result2b)) { $NameAuthorYearB = $row->NameAuthorYear; $GenusB = $row->Genus; $SubgenusB = $row->Subgenus; $SpecificEpithetB = $row->SpecificEpithet; $InfraspecificEpithetB = $row->InfraspecificEpithet; $RankB = $row->Rank; $AuthorParenthB = $row->AuthorParenth; $YearParenthB = $row->YearParenth; $AuthorB = $row->Author; $YearB = $row->Year; $KindOfIdentificationB = $row->KindOfIdentification; $IdentifierB = $row->Identifier; $IdentificationDateB = $row->IdentificationDate; $IdentNotesB = $row->IdentificationNotes; } $result3a = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT sptoolcollection.ID_Collection, " . " sptooltaxa.ID_TaxonIdentified, " . " sptoolhighertaxon.HigherTaxon, " . " sptoolhighertaxon.TaxonRank " . " FROM sptoolcollection, sptooltaxa, sptoolhighertaxon, tmpSpToolIDs " . " WHERE sptoolhighertaxon.FK_TaxonIdentified = sptooltaxa.ID_TaxonIdentified " . " AND sptooltaxa.FK_Collection = sptoolcollection.ID_Collection " . " AND sptooltaxa.PreferredFlag = '1' " . " AND sptoolcollection.ID_Collection = tmpSpToolIDs.ID_Collection"); $result3b = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT sptoolcollection.ID_Collection, " . " sptooltaxa.ID_TaxonIdentified, " . " sptoolhighertaxon.HigherTaxon, " . " sptoolhighertaxon.TaxonRank " . " FROM sptoolcollection, sptooltaxa, sptoolhighertaxon, tmpSpToolIDs " . " WHERE sptoolhighertaxon.FK_TaxonIdentified = sptooltaxa.ID_TaxonIdentified " . " AND sptooltaxa.FK_Collection = sptoolcollection.ID_Collection " . " AND sptooltaxa.PreferredFlag = '0' " . " AND sptoolcollection.ID_Collection = tmpSpToolIDs.ID_Collection"); $result4 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT sptoolcollection.ID_Collection, " . " sptoolmeasurementorfact.Value, " . " sptoolmeasurementorfact.Unit, " . " sptoolmeasurementorfact.Parameter, " . " sptoolmeasurementorfact.Method " . " FROM sptoolcollection, sptoolmeasurementorfact, tmpSpToolIDs " . " WHERE sptoolmeasurementorfact.FK_Collection = sptoolcollection.ID_Collection " . " AND sptoolcollection.ID_Collection = tmpSpToolIDs.ID_Collection"); $result5 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT sptoolcollection.ID_Collection, " . " sptoolmultimedia.FK_Collection, " . " sptoolmultimedia.File_Path AS ImageLink " . " FROM sptoolmultimedia, sptoolcollection, tmpSpToolIDs " . " WHERE sptoolmultimedia.FK_Collection = sptoolcollection.ID_Collection " . " AND sptoolcollection.ID_Collection = tmpSpToolIDs.ID_Collection"); while($row = mysqli_fetch_object($result5)) { if(isset($ImageLink[$row->ID_Collection])) { $ImageLink .= build_href1($row->Images,$row->Images) . "
"; } else {$ImageLink .= build_href1($row->Images,$row->Images) . "
"; } } $result2Host = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT sptoolcollection.ID_Collection, " . " sptooltaxa.ID_TaxonIdentified, " . " sptooltaxa.NameAuthorYear, " . " sptooltaxa.Genus, " . " sptooltaxa.Subgenus, " . " sptooltaxa.SpecificEpithet, " . " sptooltaxa.Rank, " . " sptooltaxa.InfraspecificEpithet, " . " sptooltaxa.AuthorParenth, " . " sptooltaxa.YearParenth, " . " sptooltaxa.Author, " . " sptooltaxa.Year, " . " sptooltaxa.KindOfIdentification, " . " sptooltaxa.Identifier, " . " sptooltaxa.IdentificationDate, " . " sptooltaxa.IdentificationNotes, " . " sptooltaxa.PreferredFlag " . " FROM sptoolcollection, sptooltaxa, tmpSpToolIDs " . " WHERE sptooltaxa.FK_Collection = sptoolcollection.ID_Collection " . " AND sptooltaxa.Synecology = 'host' " . " AND sptoolcollection.ID_Collection = tmpSpToolIDs.ID_Collection"); while($row = mysqli_fetch_object($result2Host)) { $NameAuthorYearHost = $row->NameAuthorYear; $GenusHost = $row->Genus; $SubgenusHost = $row->Subgenus; $SpecificEpithetHost = $row->SpecificEpithet; $InfraspecificEpithetHost = $row->InfraspecificEpithet; $RankHost = $row->Rank; $AuthorParenthHost = $row->AuthorParenth; $YearParenthHost = $row->YearParenth; $AuthorHost = $row->Author; $YearHost = $row->Year; $KindOfIdentificationHost = $row->KindOfIdentification; $IdentifierHost = $row->Identifier; $IdentificationDateHost = $row->IdentificationDate; $IdentificationNotesHost = $row->IdentificationNotes; } $result3Host = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT sptoolcollection.ID_Collection, " . " sptooltaxa.ID_TaxonIdentified, " . " sptoolhighertaxon.HigherTaxon, " . " sptoolhighertaxon.TaxonRank " . " FROM sptoolcollection, sptooltaxa, sptoolhighertaxon, tmpSpToolIDs " . " WHERE sptoolhighertaxon.FK_TaxonIdentified = sptooltaxa.ID_TaxonIdentified " . " AND sptooltaxa.FK_Collection = sptoolcollection.ID_Collection " . " AND sptoolhighertaxon.Synecology = 'host' " . " AND sptoolcollection.ID_Collection = tmpSpToolIDs.ID_Collection"); $all = mysqli_num_rows($result01); if($all == 1) { while($row = mysqli_fetch_object($result01)) { echo ""; echo "

Unit details

"; echo ""; echo "
Preferred Taxon Name: ".$NameAuthorYear.""; echo "
Unit ID: ".$row->UnitID_Specimen.""; echo "
Basis of Record: ".$row->BasisOfRecord.""; echo "
Institution Code: ".$row->InstitutionCode_Specimen.""; echo "
Collection Code: ".$row->CollectionCode_Specimen."
"; echo $row->KindOfUnit ? "Kind of Unit: ".$row->KindOfUnit."" : ""; echo "
"; echo "

Identification(s):

"; echo ""; echo ""; echo ""; echo $IdentNotes ? "" : ""; echo ""; echo $NameAuthorYearB ? "" : ""; echo $IdentifierB ? "" : ""; echo $IdentificationDateB ? "" : ""; echo $IdentNotesB ? "" : ""; if(mysqli_num_rows($result3b)) { echo ""; } echo "
Name: " . $NameAuthorYear. "
Identifier: " . $Identifier. "
Date: " . $IdentificationDate. "
Notes: " . $IdentNotes. "
Taxonomy:"; while($rowa = mysqli_fetch_object($result3a)) { echo $rowa->HigherTaxon." (".$rowa->TaxonRank.")
"; } echo "
Name: " . $NameAuthorYearB. "
Identifier: " . $IdentifierB. "
Date: " . $IdentificationDateB. "
Notes: " . $IdentNotesB. "
Taxonomy:"; while($rowb = mysqli_fetch_object($result3b)) { echo $rowb->HigherTaxon." (".$rowb->TaxonRank.")
"; } echo "
"; if($Image == 'true') { echo "

Multimedia:

".$ImageLink[$row->ID_Collection]."
"; } echo "

Gathering:

"; echo ""; echo $row->ContinentOrOcean ? "" : ""; echo $row->Country ? "" : ""; echo $row->SeasAndOceans ? "" : ""; echo $row->Collectors ? "" : ""; echo $row->AltitudeMin || $row->AltitudeMax ? "" : ""; echo ""; echo $row->Region ? "" : "" : ""; echo ""; echo $row->Locality ? "" : ""; echo $row->CollectionDateMin || $row->CollectionDateMax ? "" : ""; echo ""; echo $row->LatitudeMin || $row->LongitudeMin ? "" : ""; echo $row->CollectorsNo ? "" : ""; echo $row->ExpeditionDetails ? "" : ""; echo ""; echo "
"; echo "
Locality:Collector(s):Other info:
Continent/Ocean: ".$row->ContinentOrOcean."
Country: ".$row->Country." (".$row->IsoCode.")
Sea: ".$row->SeasAndOceans."".$row->Collectors."Altitude: " : ""; echo $row->AltitudeAccuracyStatement ? $row->AltitudeAccuracyStatement." " : ""; echo $row->AltitudeMin ? $row->AltitudeMin : ""; echo $row->AltitudeMax ? " to ".$row->AltitudeMax : ""; echo $row->AltitudeMin || $row->AltitudeMax ? $row->AltitudeUnit."
Region: ".$row->Region."
"; echo $row->Habitat ? "Habitat: ".$row->Habitat."
Locality: ".$row->Locality."
Date: ".$row->CollectionDateMin : ""; echo $row->CollectionDateMax ? " to ".$row->CollectionDateMax : ""; echo $row->CollectionDateMin || $row->CollectionDateMax ? "
Coordinates (Lat|Lon): ".$row->LatitudeMin." | ".$row->LongitudeMin."
Collectors No: ".$row->CollectorsNo."Project: ".$row->ExpeditionDetails."
"; } } if($all > 1) { echo "".$all." entries found! Please select a specimen or verify your entry!"; //$Offlinecount=0; if($formAddLimits == '1') { echo "

Data with existing DNA sample only! To see all hits without search limits press 'Verify' again!
"; } if($formAddLimits == '2') { echo "

Data without existing DNA sample only! To see all hits without search limits press 'Verify' again!
"; } if($formAddLimits == '' ) { echo "
Please press 'Verify' again!"; } for ($i=1; $i<=$all; $i++) { $row=mysqli_fetch_array($result01); { $SpToolCount++; // while($row = mysql_fetch_object($result01)) // { echo ""; echo "
"; echo ""; echo "

".$i.". Unit details:

"; echo "
Preferred Taxon Name: ".$NameAuthorYear1[$row['ID_Collection']]." ".$TaxonRank1[$row['ID_Collection']]; echo " ".$NameAuthorYear[$row['ID_Collection']]." ".$TaxonRank2[$row['ID_Collection']]; echo $Notes1[$row['ID_Collection']] ? " Notes: " . $Notes1[$row['ID_Gathering']] : ""; echo "
Unit ID: ".$row['UnitID_Specimen']." "; echo "Institution Code: ".$row['InstitutionCode_Specimen']." "; echo "Collection Code: ".$row['CollectionCode_Specimen']."
"; if($Image = 'true') { echo "

Multimedia2:

".$ImageLink[$row->ID_Collection]."
"; } echo ""; echo ""; echo $row['ContinentOrOcean'] ? "" : ""; echo $row['CountryName'] ? "" : ""; echo $row['SeasAndOceans'] ? "" : ""; echo $row['Collectors'] ? "" : ""; echo $row['AltitudeMin'] ? "" : ""; echo ""; echo $row['Region'] ? "" : "" : ""; echo ""; echo $row['Locality'] ? "" : ""; echo $row['CollectionDateMin'] ? "" : ""; echo ""; echo $row['LatitudeDecimalMin'] || $row['LongitudeDecimalMin'] ? "" : ""; echo $row['CollectorsNo'] ? "" : ""; echo $row['ExpedtionDetails'] ? "" : ""; echo ""; echo ""; echo "
Locality:Collector(s):Other info:
Continent/Ocean: ".$row['ContinentOrOcean']."
Country: ".$row['CountryName']." (".$row['CountryISO2'].")
Sea: ".$row['SeasAndOceans']."
".$row['Collectors']."Altitude: ".$row['AltitudeMin']."
Region: ".$row['Region']."
"; echo $row['Habitat'] ? "Biotope: ".$row['Habitat']."
Locality: ".$row['Locality']."
Date: ".$row['CollectionDateMin']."
Coordinates: ".$row['LatitudeDecimalMax']." | ".$row['LongitudeDecimalMax']."
Collection No: ".$row['CollectorsNo']."Project: ".$row['ExpeditionDetails']."

"; }} }} } //if (!empty($sql)) } $variable5 = $_POST['formTest']; if($variable5 != "" and !$formSubmitVerify and !$formSubmitSave) { $mykey = key($variable5); $sqlcreate2 = "CREATE TEMPORARY TABLE tmpSpToolIDs AS "; $sql2 = $sqlcreate2 . $sql2 = "SELECT DISTINCT ID_Collection FROM sptoolcollection WHERE ID_Collection = '$mykey'"; $Offlinecount=0; if(!empty($sql2)) { // just in case it is still here: drop tmpTitleIDs mysqli_query($GLOBALS["___mysqli_ston"], "DROP TABLE IF EXISTS tmpSpToolIDs"); // create new table with title IDs mysqli_query($GLOBALS["___mysqli_ston"], $sql2); if(!mysqli_affected_rows($sql2)) { echo "No hits. Please verify your entry and selection of specimen database. ";} else { $result01 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT sptoolcollection.ID_Collection, " . " sptoolcollection.UnitID_Specimen, " . " sptoolcollection.CollectionCode_Specimen, " . " sptoolcollection.InstitutionCode_Specimen, " . " sptoolcollection.FormerCollection, " . " sptoolcollection.Collectors, " . " sptoolcollection.CollectionDateMin, " . " sptoolcollection.CollectionDateMax, " . " sptoolcollection.CollectionYear, " . " sptoolcollection.CollectorsNo, " . " sptoolcollection.Locality_ID, " . " sptoolcollection.ExpeditionDetails, " . " sptoolcollection.Region, " . " sptoolcollection.Locality, " . " sptoolcollection.Habitat, " . " sptoolcollection.Slope, " . " sptoolcollection.DepthMin, " . " sptoolcollection.DepthMax, " . " sptoolcollection.DepthUnit, " . " sptoolcollection.DepthAccuracyStatement, " . " sptoolcollection.AltitudeMin, " . " sptoolcollection.AltitudeMax, " . " sptoolcollection.AltitudeUnit, " . " sptoolcollection.AltitudeAccuracyStatement, " . " sptoolcollection.LongitudeMin, " . " sptoolcollection.LatitudeMin, " . " sptoolcollection.LongitudeMax, " . " sptoolcollection.LatitudeMax, " . " sptoolcollection.LongitudeOther, " . " sptoolcollection.LatitudeOther, " . " sptoolcollection.CoordinatesAccuracyStatement, " . " sptoolcollection.CoordinatesErrorDistance, " . " sptoolcollection.Protected, " . " sptoolcollection.Permission, " . " sptoolcollection.Blocked, " . " sptoolcollection.AccessionNo, " . " sptoolcollection.AccessionName, " . " sptoolcollection.LifeStage, " . " sptoolcollection.LifeForm, " . " sptoolcollection.KindOfUnit, " . " sptoolcollection.Notes, " . " basisofrecordspecimen.BasisOfRecord_Specimen AS BasisOfRecord, " . " sex.Sex, " . " specimentype.SpecimenType, " . " countryisocode.Country, " . " countryisocode.IsoCode, " . " seasandoceans.SeasAndOceans " . " FROM sptoolcollection JOIN tmpSpToolIDs " . " LEFT JOIN basisofrecordspecimen ON sptoolcollection.FK_BasisOfRecord = basisofrecordspecimen.ID_BasisOfRecord_Specimen " . " LEFT JOIN sex ON sptoolcollection.FK_Sex = sex.ID_Sex " . " LEFT JOIN specimentype ON sptoolcollection.FK_Type = specimentype.ID_SpecimenType " . " LEFT JOIN countryisocode ON sptoolcollection.FK_Country = countryisocode.ID_Country " . " LEFT JOIN seasandoceans ON sptoolcollection.FK_SeasAndOceans = seasandoceans.ID_SeasAndOceans " . " WHERE sptoolcollection.ID_Collection = tmpSpToolIDs.ID_Collection"); $result2 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT sptoolcollection.ID_Collection, " . " sptooltaxa.NameAuthorYear, " . " sptooltaxa.Genus, " . " sptooltaxa.Subgenus, " . " sptooltaxa.SpecificEpithet, " . " sptooltaxa.Rank, " . " sptooltaxa.InfraspecificEpithet, " . " sptooltaxa.AuthorParenth, " . " sptooltaxa.YearParenth, " . " sptooltaxa.Author, " . " sptooltaxa.Year, " . " sptooltaxa.KindOfIdentification, " . " sptooltaxa.Identifier, " . " sptooltaxa.IdentificationDate, " . " sptooltaxa.IdentificationNotes, " . " sptooltaxa.PreferredFlag " . " FROM sptoolcollection, sptooltaxa, tmpSpToolIDs " . " WHERE sptooltaxa.FK_Collection = sptoolcollection.ID_Collection " . " AND sptooltaxa.PreferredFlag = '1' " . " AND sptooltaxa.Synecology IS NULL " . " AND sptoolcollection.ID_Collection = tmpSpToolIDs.ID_Collection"); while($row = mysqli_fetch_object($result2)) { $NameAuthorYear = $row->NameAuthorYear; $Genus = $row->Genus; $Subgenus = $row->Subgenus; $SpecificEpithet = $row->SpecificEpithet; $InfraspecificEpithet = $row->InfraspecificEpithet; $Rank = $row->Rank; $AuthorParenth = $row->AuthorParenth; $YearParenth = $row->YearParenth; $Author = $row->Author; $Year = $row->Year; $KindOfIdentification = $row->KindOfIdentification; $Identifier = $row->Identifier; $IdentificationDate = $row->IdentificationDate; $IdentificationNotes = $row->IdentificationNotes; $PreferredFlag = "Yes"; } $result2a = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT sptoolcollection.ID_Collection, " . " sptooltaxa.ID_TaxonIdentified, " . " sptooltaxa.NameAuthorYear, " . " sptooltaxa.Genus, " . " sptooltaxa.Subgenus, " . " sptooltaxa.SpecificEpithet, " . " sptooltaxa.Rank, " . " sptooltaxa.InfraspecificEpithet, " . " sptooltaxa.AuthorParenth, " . " sptooltaxa.YearParenth, " . " sptooltaxa.Author, " . " sptooltaxa.Year, " . " sptooltaxa.KindOfIdentification, " . " sptooltaxa.Identifier, " . " sptooltaxa.IdentificationDate, " . " sptooltaxa.IdentificationNotes, " . " sptooltaxa.PreferredFlag " . " FROM sptoolcollection, sptooltaxa, tmpSpToolIDs " . " WHERE sptooltaxa.FK_Collection = sptoolcollection.ID_Collection " . " AND sptooltaxa.PreferredFlag != '1' " . " AND sptooltaxa.Synecology IS NULL " . " AND sptoolcollection.ID_Collection = tmpSpToolIDs.ID_Collection"); $result2b = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT sptoolcollection.ID_Collection, " . " sptooltaxa.NameAuthorYear AS NameAuthorYearB, " . " sptooltaxa.PreferredFlag AS PreferredFlagB " . " FROM sptoolcollection, sptooltaxa, tmpSpToolIDs " . " WHERE sptooltaxa.FK_Collection = sptoolcollection.ID_Collection " . " AND sptooltaxa.Synecology IS NULL " . " AND sptoolcollection.ID_Collection = tmpSpToolIDs.ID_Collection"); while($row = mysqli_fetch_object($result2b)) {if(isset($PreferredFlagB[$row->ID_Collection])) { $Flag = $PreferredFlagB[$row->ID_Collection]; if($Flag == 'true' or $Flag == '1') {$Preferred = "(preferred species name)";} else {$Preferred = ""; } } else { $PreferredFlagB[$row->ID_Collection] = ""; } if(isset($NameAuthorYearB[$row->ID_Collection])) { $NameAuthorYearB[$row->ID_Collection] .= " " . $Preferred . ", Other Identifications: "; } else { $NameAuthorYearB[$row->ID_Collection] = ""; } $tmp = $row->NameAuthorYearB; $NameAuthorYearB[$row->ID_Collection] .= $tmp; $tmp2 = $row->PreferredFlagB; $PreferredFlagB[$row->ID_Collection] .= $tmp2; } $result3 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT sptoolcollection.ID_Collection, " . " sptooltaxa.ID_TaxonIdentified, " . " sptoolhighertaxon.HigherTaxon, " . " sptoolhighertaxon.TaxonRank " . " FROM sptoolcollection, sptooltaxa, sptoolhighertaxon, tmpSpToolIDs " . " WHERE sptoolhighertaxon.FK_TaxonIdentified = sptooltaxa.ID_TaxonIdentified " . " AND sptooltaxa.FK_Collection = sptoolcollection.ID_Collection " . " AND sptooltaxa.PreferredFlag = '1' " . " AND sptoolcollection.ID_Collection = tmpSpToolIDs.ID_Collection"); $result4 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT sptoolcollection.ID_Collection, " . " sptoolmeasurementorfact.Value, " . " sptoolmeasurementorfact.Unit, " . " sptoolmeasurementorfact.Parameter, " . " sptoolmeasurementorfact.Method " . " FROM sptoolcollection, sptoolmeasurementorfact, tmpSpToolIDs " . " WHERE sptoolmeasurementorfact.FK_Collection = sptoolcollection.ID_Collection " . " AND sptoolcollection.ID_Collection = tmpSpToolIDs.ID_Collection"); $result2Host = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT sptoolcollection.ID_Collection, " . " sptooltaxa.ID_TaxonIdentified, " . " sptooltaxa.NameAuthorYear, " . " sptooltaxa.Genus, " . " sptooltaxa.Subgenus, " . " sptooltaxa.SpecificEpithet, " . " sptooltaxa.Rank, " . " sptooltaxa.InfraspecificEpithet, " . " sptooltaxa.AuthorParenth, " . " sptooltaxa.YearParenth, " . " sptooltaxa.Author, " . " sptooltaxa.Year, " . " sptooltaxa.KindOfIdentification, " . " sptooltaxa.Identifier, " . " sptooltaxa.IdentificationDate, " . " sptooltaxa.IdentificationNotes, " . " sptooltaxa.PreferredFlag " . " FROM sptoolcollection, sptooltaxa, tmpSpToolIDs " . " WHERE sptooltaxa.FK_Collection = sptoolcollection.ID_Collection " . " AND sptooltaxa.Synecology = 'host' " . " AND sptoolcollection.ID_Collection = tmpSpToolIDs.ID_Collection"); while($row = mysqli_fetch_object($result2Host)) { $NameAuthorYearHost = $row->NameAuthorYear; $GenusHost = $row->Genus; $SubgenusHost = $row->Subgenus; $SpecificEpithetHost = $row->SpecificEpithet; $InfraspecificEpithetHost = $row->InfraspecificEpithet; $RankHost = $row->Rank; $AuthorParenthHost = $row->AuthorParenth; $YearParenthHost = $row->YearParenth; $AuthorHost = $row->Author; $YearHost = $row->Year; $KindOfIdentificationHost = $row->KindOfIdentification; $IdentifierHost = $row->Identifier; $IdentificationDateHost = $row->IdentificationDate; $IdentificationNotesHost = $row->IdentificationNotes; } $result3Host = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT sptoolcollection.ID_Collection, " . " sptooltaxa.ID_TaxonIdentified, " . " sptoolhighertaxon.HigherTaxon, " . " sptoolhighertaxon.TaxonRank " . " FROM sptoolcollection, sptooltaxa, sptoolhighertaxon, tmpSpToolIDs " . " WHERE sptoolhighertaxon.FK_TaxonIdentified = sptooltaxa.ID_TaxonIdentified " . " AND sptooltaxa.FK_Collection = sptoolcollection.ID_Collection " . " AND sptoolhighertaxon.Synecology = 'host' " . " AND sptoolcollection.ID_Collection = tmpSpToolIDs.ID_Collection"); while($row = mysqli_fetch_object($result01)) { echo ""; echo "

Unit details:

"; echo ""; echo "
Prefered Taxon Name: ".$NameAuthorYear1[$row->ID_Collection].""; echo "
Unit ID: ".$row->UnitID_Specimen.""; echo "
Basis of Record: ".$row->BasisOfRecord_Specimen.""; echo "
Institution Code: ".$row->InstitutionCode_Specimen.""; echo "
Collection Code: ".$row->CollectionCode_Specimen."
"; echo "

Identification(s):

"; echo ""; echo ""; echo ""; echo $Ausgabe1 ? "" : ""; while($row = mysqli_fetch_object($result2a)) { echo $NameAuthorYear[$row->ID_Collection] ? "" : ""; echo $Identifier[$row->ID_Collection] ? "" : ""; echo $IdentificationDate[$row->ID_Collection] ? "" : ""; echo $Notes[$row->ID_Collection] ? "" : ""; echo $Ausgabe2 ? "" : ""; } echo "
Name: " . $NameAuthorYear1[$row->ID_Collection]. "
Identifier: " . $Identifier1[$row->ID_Collection]. "
Date: " . $IdentificationDate1[$row->ID_Collection]. "
Taxonomy:" . $Ausgabe1 . "
Name: " . $NameAuthorYear[$row->ID_Collection]. "
Identifier: " . $Identifier[$row->ID_Collection]. "
Date: " . $IdentificationDate[$row->ID_Collection]. "
Date: " . $Notes[$row->ID_Collection]. "
Taxonomy:" . $Ausgabe2 . "
"; echo $ImageLink ? "

Multimedia:

".$ImageLink."
" : ""; echo "

Gathering:

"; echo ""; echo $row->ContinentOrOcean ? "" : ""; echo $row->CountryName ? "" : ""; echo $row->SeasAndOceans ? "" : ""; echo $row->Collectors ? "" : ""; echo $row->AltitudeMin ? "" : ""; echo ""; echo $row->Region ? "" : "" : ""; echo ""; echo $row->Locality ? "" : ""; echo $row->CollectionDateMin ? "" : ""; echo ""; echo $row->LatitudeDecimalMin || $row->LongitudeDecimalMin ? "" : ""; echo $row->CollectorsNo ? "" : ""; echo $row->ExpedtionDetails ? "" : ""; echo ""; echo "
"; echo "
Locality:Collector(s):Other info:
Continent/Ocean: ".$row->ContinentOrOcean."
Country: ".$row->CountryName." (".$row->CountryISO2.")
Sea/Ocean: ".$row->SeasAndOceans."
".$row->Collectors."Altitude: ".$row->AltitudeMin."
Region: ".$row->Region."
"; echo $row->Habitat ? "Biotope: ".$row->Habitat."
Locality: ".$row->Locality."
Date: ".$row->CollectionDateMin."
Coordinates: ".$row->LatitudeDecimalMin." | ".$row->LongitudeDecimalMin."
Collection No: ".$row->CollectorsNo."Project: ".$row->ExpeditionDetails."
"; } }} } //if (!empty($sql)) ?>