load('XSLT/DNA/en_ABCD1.2_Summary.xslt')) { $xsl->load('XSLT/DNA/en_ABCD1.2_Summary.xslt'); $TestLoad2 = $xsl->load('XSLT/DNA/en_ABCD1.2_Summary.xslt'); } } if($ID_Schema2 == 2) { if($xsl->load('XSLT/DNA/en_ABCD2.0_Summary.xslt')) { $xsl->load('XSLT/DNA/en_ABCD2.0_Summary.xslt'); $TestLoad2 = $xsl->load('XSLT/DNA/en_ABCD2.0_Summary.xslt'); } } if($ID_Schema2 == 3) { if($xsl->load('XSLT/DNA/en_DarwinCore_UnitDetail.xslt')) { $xsl->load('XSLT/DNA/en_DarwinCore_UnitDetail.xslt'); $TestLoad2 = $xsl->load('XSLT/DNA/en_DarwinCore_UnitDetail.xslt'); } } if($ID_Schema2 == 4) { if($xsl->load('XSLT/DNA/en_ABCD2.05_Summary.xslt')) { $xsl->load('XSLT/DNA/en_ABCD2.05_Summary.xslt'); $TestLoad2 = $xsl->load('XSLT/DNA/en_ABCD2.05_Summary.xslt'); } } $inf = parse_url($Provider2); $host = $inf['host']; $path = $inf['path']; if (isset($inf['query'])) $path .= '?'.$inf['query']; if (isset($inf['port'])) $port = $inf['port']; else $port = 80; if($Provider2) { error_reporting(E_ALL ^ E_WARNING ^ E_NOTICE); $fp2 = fsockopen($host, $port, $errno, $error, 5); if(!$fp2 or !$TestLoad2) { echo "

Provider not available. Show data from cache.

"; } else { // $TestStyleSheet = $processor->importStyleSheet($xsl); if($TestLoad2) { $processor->setParameter('', 'ReplaceTaxonName', $ReplaceTaxonName); $processor->importStyleSheet($xsl); $xml = new DOMDocument; $xml->load($file2); $Test = $xml->getElementsByTagName('UnitID'); $TestUnitID2 = addslashes(utf8_decode($Test->item(0)->nodeValue)); $html = $processor->transformToXML($xml); $find = array("µ"); $replace = array("µ"); $html2 = str_replace($find, $replace, $html); echo utf8_decode($html2); } } if(!$TestUnitID2 or !$fp2) { $result1 = mysql_query ("SELECT tablecache.ID_Cache AS ID_Cache, " . " tablecache.UnitID_DNA AS UnitID_DNA, " . " tablecache.CollectionCode_DNA AS CollectionCode_DNA, " . " tablecache.InstitutionCode_DNA AS InstitutionCode_DNA, " . " tablecache.Tissue AS Tissue, " . " tablecache.DNA_Quality AS DNA_Quality, " . " tablecache.InstitutionCode_DNA AS InstitutionCode_DNA " . " FROM tablecache" . " WHERE tablecache.ID_Cache = $ID"); $result2 = mysql_query ("SELECT tablecachegenbanknumbers.ID_Cache, " . " tablecachegenbanknumbers.GenBankNumber AS GenBankNumber " . " FROM tablecachegenbanknumbers " . " WHERE tablecachegenbanknumbers.ID_Cache = $ID"); // $result = mysql_query($result3) or die($result3.'
'.mysql_error()); while($row = mysql_fetch_object($result2)) { $GenBank = "true"; if(isset($GenBankNumber[$row->ID_Cache])) { $GenBankNumber[$row->ID_Cache] .= "
"; } else { $GenBankNumber[$row->ID_Cache] = ""; } $tmp = $row->GenBankNumber; $GenBankNumber[$row->ID_Cache] .= $tmp; } $result3 = mysql_query ("SELECT tablecachetaxonidentified.ID_Cache, " . " tablecachetaxonidentified.NameAuthorYear AS NameAuthorYear1, " . " tablecachetaxonidentified.PreferredFlag AS PreferredFlag " . " FROM tablecachetaxonidentified " . " WHERE tablecachetaxonidentified.ID_Cache = $ID"); // $result = mysql_query($result3) or die($result3.'
'.mysql_error()); while($row = mysql_fetch_object($result3)) { if(isset($PreferredFlag[$row->ID_Cache])) { $Flag = $PreferredFlag[$row->ID_Cache]; if($Flag == 'true' or $Flag == '1') {$Preferred = "(Preferred Taxon Name)";} else {$Preferred = ""; } } else { $PreferredFlag[$row->ID_Cache] = ""; } if(isset($NameAuthorYear1[$row->ID_Cache])) { $NameAuthorYear1[$row->ID_Cache] .= " " . $Preferred . ", Other Identifications: "; } else { $NameAuthorYear1[$row->ID_Cache] = ""; } $tmp = $row->NameAuthorYear1; $NameAuthorYear1[$row->ID_Cache] .= $tmp; $tmp2 = $row->PreferredFlag; $PreferredFlag[$row->ID_Cache] .= $tmp2; } $result4 = mysql_query ("SELECT tablecache.ID_Cache, " . " tablecachetaxonidentified.ID_TaxonIdentified, " . " tablecachehighertaxa.HigherTaxon AS HigherTaxon1, " . " tablecachehighertaxa.TaxonRank AS TaxonRank1 " . " FROM tablecache, tablecachetaxonidentified, tablecachehighertaxa, tmpDnaIDs " . " WHERE tablecachehighertaxa.ID_CacheTaxonIdentified = tablecachetaxonidentified.ID_TaxonIdentified " . " AND tablecachetaxonidentified.ID_Cache = tablecache.ID_Cache " . " AND tablecache.ID_Cache = $ID"); while($row = mysql_fetch_object($result4)) { if(isset($TaxonRank1[$row->ID_Cache])) { $TaxonRank1[$row->ID_Cache] .= "
"; } else { $TaxonRank1[$row->ID_Cache] = ""; } if(isset($HigherTaxon1[$row->ID_Cache])) { $HigherTaxon1[$row->ID_Cache] .= "
"; } else { $HigherTaxon1[$row->ID_Cache] = ""; } $tmp = $row->HigherTaxon1; $HigherTaxon1[$row->ID_Cache] .= $tmp; $tmp2 = $row->TaxonRank1; $TaxonRank1[$row->ID_Cache] .= $tmp2; } while($row = mysql_fetch_object($result1)) { echo "

DNA details

"; echo ''; echo ''; echo ''; echo ''; echo ''; echo '' : ''; echo '
Taxon Name: '.$NameAuthorYear1[$row->ID_Cache].'
Taxonomy: '.$HigherTaxon1[$row->ID_Cache].' '.$TaxonRank1[$row->ID_Cache].'
Unit ID/DNA Bank No:
'; echo 'Institution Code:
'; echo 'Collection Code:
'; echo 'Record Basis:
'; echo $row->Tissue ? 'Tissue:
' : ''; echo $row->Quality ? 'Quality:
' : ''; echo $GenBank ? 'Gen Bank Accession No(s):
'.$row->UnitID_DNA.'
'; echo ''.$row->InstitutionCode_DNA.'
'; echo ''.$row->CollectionCode_DNA.'
'; echo 'DNA Sample
'; echo $row->Tissue ? ''.$row->Tissue.'
' : ''; echo $row->Quality ? ''.$row->Quality.'
' : ''; echo $GenBank ? ''.$GenBankNumber[$row->ID_Cache].'' : ''; echo '
'; #######################################Error 2############################################################### $msg = "UnitID DNA: ".$row->UnitID_DNA."\n"; $msg .= "\nInstitution Code DNA: ".$row->InstitutionCode_DNA."\n"; $msg .= "\nCollection Code DNA: ".$row->CollectionCode_DNA."\n"; $msg .= "\nID Cache: ".$row->ID_Cache."\n"; if(!$TestUnitID2) { $msg .= "\nKein Treffer bei Wrapper-Abfrage für: \n"; } if(!$fp2) { $msg .= "\nProvider nicht erreichbar: \n"; } $msg .= "\n".$file2."\n"; trigger_error($msg, E_USER_ERROR); ############################################################################################################# } } } ?>